Commit Graph

13011 Commits

Author SHA1 Message Date
Ting-Yu Lin
ab534fe8d2 Bug 1308636 Part 3 - Remove moz-prefixed aliases for column-gap and CSS multi-column properties. r=dbaron
Introduce a new pref "layout.css.prefixes.columns" to guard the prefixed
aliases.

The modification to `properties-db.js` was generated by
`./mach devtools-css-db`.

Differential Revision: https://phabricator.services.mozilla.com/D59564

--HG--
extra : moz-landing-system : lando
2020-01-16 21:45:19 +00:00
Emilio Cobos Álvarez
6110aba7be Bug 1609489 - Remove lazy_static usage from custom_properties.rs. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D60039

--HG--
extra : moz-landing-system : lando
2020-01-16 05:41:16 +00:00
Emilio Cobos Álvarez
595faf4731 Bug 1609428 - Implement min() / max() / clamp() for simple css types behind a pref. r=boris
So for everything but <length> and <length-percentage>, which have more complex
mechanics.

The pref is off for now of course.

Differential Revision: https://phabricator.services.mozilla.com/D60012

--HG--
extra : moz-landing-system : lando
2020-01-15 19:43:08 +00:00
Emilio Cobos Álvarez
28f1dbebc9 Bug 1609256 - Centralize calc function parsing. r=boris
So that extending it to support other math functions like min / max / etc is
simpler.

There should be no behavior change with this patch, though I added a comment to
some places where we don't do calc() clamping correctly (though other browsers
don't either so...).

Differential Revision: https://phabricator.services.mozilla.com/D59939

--HG--
extra : moz-landing-system : lando
2020-01-15 00:46:01 +00:00
nordzilla
5465ed1ec0 Bug 1607268 - Implement replaceSync() Functionality r=emilio,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D58881

--HG--
extra : moz-landing-system : lando
2020-01-14 22:34:40 +00:00
Emilio Cobos Álvarez
fff6c9e1ac Bug 981248 - Rewrite <input type=number> to avoid an anonymous input. r=masayuki,surkov,jwatt,ntim,jfkthame,smaug
Instead, subclass nsTextControlFrame. This simplifies the code and avoids
correctness issues.

I kept the localization functionality though it is not spec compliant. But I
filed a bug to remove it in a followup.

Differential Revision: https://phabricator.services.mozilla.com/D57193

--HG--
extra : moz-landing-system : lando
2020-01-14 19:01:05 +00:00
Emilio Cobos Álvarez
a543b6df2f Bug 844349 - Do not ignore color: transparent in high contrast mode. r=jwatt
PDFJS uses it, for example to allow text selection. It's not great if it shows
on top of the actual PDF :-)

Differential Revision: https://phabricator.services.mozilla.com/D58703

--HG--
extra : moz-landing-system : lando
2020-01-14 20:25:03 +00:00
Mihai Alexandru Michis
0d01c60c37 Backed out 2 changesets (bug 981248) for causing multiple failures.
CLOSED TREE

Backed out changeset 7a96708cc8b7 (bug 981248)
Backed out changeset 1eace7bd28d9 (bug 981248)
2020-01-14 19:28:17 +02:00
Emilio Cobos Álvarez
da2e4ef888 Bug 981248 - Rewrite <input type=number> to avoid an anonymous input. r=masayuki,surkov,jwatt,ntim,jfkthame,smaug
Instead, subclass nsTextControlFrame. This simplifies the code and avoids
correctness issues.

I kept the localization functionality though it is not spec compliant. But I
filed a bug to remove it in a followup.

Differential Revision: https://phabricator.services.mozilla.com/D57193

--HG--
extra : moz-landing-system : lando
2020-01-14 15:05:22 +00:00
Makoto Kato
29c7b3f5dd Bug 1503656 - Part 3. Don't use hardcoded value for safearea. r=emilio
To implement safe area support on Gecko, we should get safe area from Device.

Differential Revision: https://phabricator.services.mozilla.com/D52504

--HG--
extra : moz-landing-system : lando
2020-01-08 11:56:25 +00:00
Makoto Kato
c2e7d5dc85 Bug 1503656 - Part 2. Use Device for parameter instead of CssEnvironment. r=emilio
CssEnvironment alwasy is in Device, so use Device as parameter instead of CssEnvironment.

Differential Revision: https://phabricator.services.mozilla.com/D52507

--HG--
extra : moz-landing-system : lando
2020-01-08 11:56:25 +00:00
Makoto Kato
7574b8612d Bug 1503656 - Part 1. Always use CssEnvironment from media query's device. r=emilio
Although CssEnvironment is in Device of media query implementation, some code
creates CssEnvironment instance without Device. So I would like always to use it from Device of media query.

Differential Revision: https://phabricator.services.mozilla.com/D52506

--HG--
extra : moz-landing-system : lando
2020-01-08 11:55:28 +00:00
Emilio Cobos Álvarez
ba0cc69e47 Bug 1607049 - Pack LengthPercentage better. r=jwatt
So that it takes one pointer instead of two, and doesn't make nsStylePosition's
size blow up.

This is not as ugly as I was fearing, thankfully, though it requires a bit of
boilerplate. I think it's acceptable.

Differential Revision: https://phabricator.services.mozilla.com/D58702

--HG--
extra : moz-landing-system : lando
2020-01-13 13:23:22 +00:00
Emilio Cobos Álvarez
d4c2489000 Bug 1607049 - Move LengthPercentage to its own file. r=jwatt
I'm (sadly) about to make it a bit more complicated to pack it better. So we
may as well do this so it is easier to reason about navigate.

I also reordered things a bit, and removed some From<> implementations and
such.

Differential Revision: https://phabricator.services.mozilla.com/D58701

--HG--
rename : servo/components/style/values/computed/length.rs => servo/components/style/values/computed/length_percentage.rs
extra : moz-landing-system : lando
2020-01-13 13:23:44 +00:00
Emilio Cobos Álvarez
d10341c0bc Bug 1607049 - Split LengthPercentage again. r=boris
This is needed to support min() / max() / clamp(), etc, as those need to be a
tree of values and thus need heap storage.

This unfortunately grows LengthPercentage to be two pointers, which is bad as
it blows up the size of nsStylePosition enough to trigger the size assertions.

This patch comments out the assertion for now, the follow-up patches will
uncomment them.

Differential Revision: https://phabricator.services.mozilla.com/D58700

--HG--
extra : moz-landing-system : lando
2020-01-13 13:21:58 +00:00
Xidorn Quan
87fdc21f61 Bug 1513275 - Ensure nested ruby level container don't escape from line break suppression. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D58351

--HG--
extra : moz-landing-system : lando
2020-01-10 23:47:28 +00:00
Emilio Cobos Álvarez
74eedc7178 No bug - Minor comment fix.
Differential Revision: https://phabricator.services.mozilla.com/D59310

--HG--
extra : moz-landing-system : lando
2020-01-09 11:36:02 +00:00
Emilio Cobos Álvarez
86a70df5d7 Bug 1607006 - Remove utf-16 versions of nsCSSProps::LookupProperty* and ServoCSSParser::ComputeColor. r=bzbarsky
Now that we have UTF8String in the WebIDL, we can remove quite a few of the
conversions. Do that, and lift the remaining string conversions up as needed.

Also deindent Servo_ComputeColor while touching it.

Most of the remaining copies are because either bug 1606994, or because they're
WebIDL attributes that we still need to serialize back as UTF-16 (bug 1606995).

Differential Revision: https://phabricator.services.mozilla.com/D58687

--HG--
extra : moz-landing-system : lando
2020-01-08 01:21:30 +00:00
Emilio Cobos Álvarez
65ad59b310 Bug 1607553 - Make an assertion a release assert in nightly. r=heycam
If this can happen legitimately, this will help fuzzers to catch it.

Differential Revision: https://phabricator.services.mozilla.com/D59066

--HG--
extra : moz-landing-system : lando
2020-01-08 00:55:18 +00:00
Emilio Cobos Álvarez
547c9db8cd Bug 1606130 - Make display: -moz-box more similar to other display types for block layout. r=jfkthame,surkov
It is unexpected (see bug) that a -moz-box is affected by baseline alignment.
Make -moz-box be block-outside, and -moz-inline-box be inline-outside, instead
of the bespoke thing we have now.

This is more similar to everything else, and fixes the bug.

Differential Revision: https://phabricator.services.mozilla.com/D58726

--HG--
extra : moz-landing-system : lando
2020-01-07 21:00:42 +00:00
Bogdan Tara
6571a2a6fb Backed out changeset 23d862866f3a (bug 1606130) for android crashtest complaining about 1547420-1.html 2020-01-07 22:53:10 +02:00
Emilio Cobos Álvarez
ff938720a8 Bug 1606130 - Make display: -moz-box more similar to other display types for block layout. r=jfkthame,surkov
It is unexpected (see bug) that a -moz-box is affected by baseline alignment.
Make -moz-box be block-outside, and -moz-inline-box be inline-outside, instead
of the bespoke thing we have now.

This is more similar to everything else, and fixes the bug.

Differential Revision: https://phabricator.services.mozilla.com/D58726

--HG--
extra : moz-landing-system : lando
2020-01-07 18:02:05 +00:00
Emilio Cobos Álvarez
8e79d673bb Bug 1607080 - Avoid a silly UTF16 -> UTF8 round-trip in DOMMatrix. r=smaug,boris
Depends on D58710

Differential Revision: https://phabricator.services.mozilla.com/D58711

--HG--
extra : moz-landing-system : lando
2020-01-07 09:46:53 +00:00
Emilio Cobos Álvarez
795502e5b8 Bug 1607080 - More minor serialization improvements. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D58710

--HG--
extra : moz-landing-system : lando
2020-01-07 09:47:20 +00:00
Emilio Cobos Álvarez
6d777c8bf9 Bug 1607069 - Simplify some serialization code in glue.rs. r=jwatt
cbindgen understands references, there's no need to use raw pointers here and
then unwrapping or unsafely dereferencing them.

Also remove one unused function while at it.

Differential Revision: https://phabricator.services.mozilla.com/D58708

--HG--
extra : moz-landing-system : lando
2020-01-05 14:42:23 +00:00
Emilio Cobos Álvarez
ab672d9f29 Bug 1605803 - Use cbindgen for content property. r=xidorn
This cleans up and also allows us to keep the distinction between content: none
and content: normal, which allows us to fix the computed style we return from
getComputedStyle().

Do this last bit from the resolved value instead of StyleAdjuster, because
otherwise we need to tweak every initial struct for ::before / ::after.

Differential Revision: https://phabricator.services.mozilla.com/D58276

--HG--
extra : moz-landing-system : lando
2020-01-05 13:10:39 +00:00
Emilio Cobos Álvarez
bc36653df5 Bug 1449861 - Use UTF8String for some CSSOM APIs. r=bzbarsky
In particular, the ones where we transcode unconditionally atm (property names
and such).

There are others like cssText getters and setters which are a bit harder,
because I either need to rewrite all our serialization code to work with UTF8
(which is fine, but a lot of work), or teach webidl to have a setter that takes
UTF8String as input but returns DOMString as output (which is at best hacky).

Differential Revision: https://phabricator.services.mozilla.com/D58631

--HG--
extra : moz-landing-system : lando
2020-01-04 10:36:49 +00:00
Ting-Yu Lin
9cbd872e72 Bug 1499281 - Remove column-span pref in column.mako.rs. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D58399

--HG--
extra : moz-landing-system : lando
2019-12-31 16:15:12 +00:00
Emilio Cobos Álvarez
233b5958d9 Bug 1604989 - Do not incorrectly share style across elements with different part names. r=nordzilla
Do the same we do for classes for now. We could be more precise and achieve a
bit more sharing with some more effort (left a comment there), but it seems
unlikely to matter in practice (and if we did that, we'd probably want to do the
same for classes).

Differential Revision: https://phabricator.services.mozilla.com/D58453

--HG--
extra : moz-landing-system : lando
2019-12-31 18:14:35 +00:00
Emilio Cobos Álvarez
4d1924c9fb Bug 1606019 - Remove unused FFI function to refcount nsIReferrerInfo. r=xidorn
We don't use RefPtr<nsIReferrerInfo> in rust.

Differential Revision: https://phabricator.services.mozilla.com/D58274

--HG--
extra : moz-landing-system : lando
2019-12-26 22:17:35 +00:00
Emilio Cobos Álvarez
2c729a4323 Bug 1604023 - Workaround LLVM ABI bug. r=froydnj
All the gory details in https://bugzilla.mozilla.org/show_bug.cgi?id=1600735 and
related LLVM / GCC bugs. Avoid the issue by forcing the relevant enum to be
32-bit wide, so as to not trigger the LLVM bug.

Differential Revision: https://phabricator.services.mozilla.com/D57868

--HG--
extra : moz-landing-system : lando
2019-12-19 20:43:06 +00:00
Emilio Cobos Álvarez
cae1e55d61 Bug 1581467 - Do not use synthetic display-inside values. r=TYLin
This matches the new servo layout engine too, and thus removes some #[cfg]
gunk.  Just use `flow` since it doesn't simplify the layout code as much.

Differential Revision: https://phabricator.services.mozilla.com/D45973

--HG--
extra : moz-landing-system : lando
2019-12-19 01:19:04 +00:00
Sean Voisen
0e463d054a Bug 1453472 - Add support for logical versions of overscroll-behavior. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D57363

--HG--
extra : moz-landing-system : lando
2019-12-17 11:27:41 +00:00
Emilio Cobos Álvarez
8a91625e5c Bug 1604173 - Cherry-pick various servo-layout-2020 changes.
Depends on D57314

Differential Revision: https://phabricator.services.mozilla.com/D57315

--HG--
extra : moz-landing-system : lando
2019-12-16 13:34:23 +00:00
Emilio Cobos Álvarez
d40bfe4265 Bug 1604173 - Rustfmt recent changes.
Differential Revision: https://phabricator.services.mozilla.com/D57314

--HG--
extra : moz-landing-system : lando
2019-12-16 13:34:20 +00:00
Emilio Cobos Álvarez
1258c314aa Bug 1604160 - Update cbindgen to do proper copy assignment on tagged enums. r=boris
This is needed to support min() / max() / clamp(), as LengthPercentage will have
a potential heap allocation and the current copy-assignment operators just do
bitwise copies.

Differential Revision: https://phabricator.services.mozilla.com/D57300

--HG--
extra : moz-landing-system : lando
2019-12-16 13:31:24 +00:00
Emilio Cobos Álvarez
5758ca4f25 Bug 1604062 - Use less Au in font code. r=boris
Font code is the only thing that was using Au in the style system without
interfacing with Gecko, and there was no real reason for it to do so.

This slightly simplifies the code.

Differential Revision: https://phabricator.services.mozilla.com/D57248

--HG--
extra : moz-landing-system : lando
2019-12-16 13:22:04 +00:00
Emilio Cobos Álvarez
78dbde3534 Bug 1604063 - Make LengthPercentage not copy. r=boris
This is needed to support min() / max() / clamp(), etc.

Differential Revision: https://phabricator.services.mozilla.com/D57249

--HG--
extra : moz-landing-system : lando
2019-12-15 21:33:34 +00:00
Emilio Cobos Álvarez
b498defa90 Bug 1603455 - Remove full-screen-api.unprefix.enabled. r=xidorn,smaug
It's been enabled since Firefox 64.

Differential Revision: https://phabricator.services.mozilla.com/D56951

--HG--
extra : moz-landing-system : lando
2019-12-13 13:27:27 +00:00
jeffin143
8f714c8f81 Bug 1601856 : convert NS_STYLE_VISIBILITY_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D56140

--HG--
extra : moz-landing-system : lando
2019-12-13 05:34:38 +00:00
Emilio Cobos Álvarez
fe173632c7 Bug 1602843 - Preserve CSS input exactly during sanitization. r=hsivonen
This avoids the mutation due to the different serialization in some cases.

Differential Revision: https://phabricator.services.mozilla.com/D56732

--HG--
extra : moz-landing-system : lando
2019-12-12 13:57:54 +00:00
Noemi Erli
2b5af87228 Backed out changeset d23f209ada8b (bug 1603455) for causing failures in test_fullscreen-api.html
--HG--
extra : rebase_source : 7b7990746d3884eeced2404ed9bc78590db4b77c
2019-12-12 23:49:35 +02:00
Emilio Cobos Álvarez
8d6730e227 Bug 1603455 - Remove full-screen-api.unprefix.enabled. r=xidorn,smaug
It's been enabled since Firefox 64.

Differential Revision: https://phabricator.services.mozilla.com/D56951

--HG--
extra : moz-landing-system : lando
2019-12-12 19:56:10 +00:00
jeffin143
4298d3f098 Bug 1601990 : convert NS_STYLE_POINTER_EVENTS_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D56203

--HG--
extra : moz-landing-system : lando
2019-12-12 10:24:16 +00:00
Emilio Cobos Álvarez
440c6c136b Bug 1599181 - Fix serialization of @namespace rule. r=boris
This code comes from:

https://hg.mozilla.org/mozilla-central/rev/2418cfba72c33c5623f6fb4c243c5203819c8240

I audited other callers of write_str, they seem ok.

Differential Revision: https://phabricator.services.mozilla.com/D54601

--HG--
extra : moz-landing-system : lando
2019-11-25 23:21:20 +00:00
Emilio Cobos Álvarez
353b658d5a Bug 1600773 - Invalidate shadow part pseudo-class styles correctly. r=heycam
I was going to send a test for `:focus` via wpt, but then realized it was
probably not spec-compliant with the new rules people want to follow for
:focus, so I filed https://github.com/w3c/csswg-drafts/issues/4555 instead.

Testing `:hover` / `:active` via wpt looked quite a bit of a hassle.

Differential Revision: https://phabricator.services.mozilla.com/D55591

--HG--
extra : moz-landing-system : lando
2019-12-09 13:40:16 +00:00
Emilio Cobos Álvarez
85599f3f1b Bug 1602317 - Update cbindgen to 0.11.1. r=jrmuizel
This includes more bitflag operators, which means we can remove some slightly
ugly code.

Differential Revision: https://phabricator.services.mozilla.com/D56308

--HG--
extra : moz-landing-system : lando
2019-12-09 03:20:53 +00:00
Emilio Cobos Álvarez
4a3be9604a Bug 1602317 - Switch style system to associated constants-in-body. r=heycam
This is closer to the equivalent Rust code.

Differential Revision: https://phabricator.services.mozilla.com/D56306

--HG--
extra : moz-landing-system : lando
2019-12-09 03:32:28 +00:00
Emilio Cobos Álvarez
1dc32f9c0f Bug 1602317 - More reliably workaround some silly windows.h defines. r=nical
I couldn't get some Windows sandbox code to build with the other patch in this
bug.

Differential Revision: https://phabricator.services.mozilla.com/D56343

--HG--
extra : moz-landing-system : lando
2019-12-09 12:14:16 +00:00
Cameron McCormack
80142a59ab Bug 1571285 - Correctly style dark scrollbars in tree components. r=emilio
We need to ensure the rules that override all properties for scrollbar
part elements only apply to those that are NAC (and so will be eligible
for NAC style sharing).  We have some uses of non-NAC <scrollbar>
elements that should continue to inherit properties from their parents.

To avoid any changes in rule matching order that come with changing specificity,
we add a new :-moz-native-anonymous-no-specificity pseudo-class.

While we're here, we note :-moz-native-anonymous-no-specificity (and the
regular :-moz-native-anonymous pseudo-class) as not needing style
sharing cache revalidation, as we never share NAC styles.

Differential Revision: https://phabricator.services.mozilla.com/D56154

--HG--
extra : moz-landing-system : lando
2019-12-09 03:16:03 +00:00