Граф коммитов

13168 Коммитов

Автор SHA1 Сообщение Дата
Razvan Maries 7155f2665a Backed out changeset ac0d06c0ca93 (bug 1624080) for assertion failures. CLOSED TREE 2020-03-26 16:52:18 +02:00
Emilio Cobos Álvarez c556351cd0 Bug 1624080 - Simplify the implementation of HasAuthorSpecifiedRules. r=heycam
This patch computes the author-specified properties during the CSS cascade, and
removes the complex rule-tree-based implementation that tries to do the cascade
again.

This changes behavior in two ways, one of them which is not observable to
content, I believe:

 * revert now re-enables the native styling. This was brought up in
   https://github.com/w3c/csswg-drafts/issues/4777 and I think it is a bug-fix.

   This is observable to content, and I'm adding a test for it.

 * We don't look at inherited styles from our ancestors when `inherit` is
   specified in a non-author stylesheet. This was introduced for bug 452969 but
   we don't seem to inherit background anymore for file controls or such. It
   seems back then file controls used to have a text-field.

   I audited forms.css and ua.css and we don't explicitly inherit
   padding / border / background-color into any nested form control.

We keep the distinction between border/background and padding, because the later
has some callers. I think we should try to align with Chromium in the long run
and remove the padding bit.

We need to give an appearance to the range-thumb and such so that we can assert
that we don't call HasAuthorSpecifiedRules on non-themed stuff. I used a new
internal value for that.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 13:23:42 +00:00
Emilio Cobos Álvarez 96a8c38b0f Bug 1624298 - Ensure that derived types are right for optimized-away implementations. r=heycam
We have this optimization where, for non-generic structs, we generate just a
clone / move as the ToComputedValue / ToResolvedValue implementation.

This moves the optimization a bit further down, and refines it so that we still
generate all the relevant where clauses that make it sound, that is, that all
the ToComputedValue implementations of the fields return the same type.

Otherwise this wouldn't be sound and the type would need to become generic.

We add an escape hatch (no_field_bound) for fields that need to be cloned but
which don't implement the trait. This is right now only for the RefPtr<> in the
shared font-family list, and a piece of code in PaintWorklet which looks kinda
fishy, and probably should be fixed (but we don't ship it in Firefox and there's
a pre-existing FIXME for servo, so I punted on it for now).

The other thing this patch does is adding a bunch of ToComputedValue /
ToResolvedValue implementations that are trivial and were missing.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 13:04:20 +00:00
Emilio Cobos Álvarez 7c8f8dec97 Bug 1546375 - Don't append the default namespace for featureless host selectors. r=heycam
Per the spec it shouldn't match, and the front-end has been bitten by this
multiple times.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 11:44:01 +00:00
Emilio Cobos Álvarez dd88708d1c Bug 1623396 - Custom properties with invalid variable references should be unset, not invalid. r=heycam
See https://github.com/w3c/csswg-drafts/issues/4075.

There are tests that will get updated and this will make pass in bug 1623347.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 11:34:12 +00:00
Dorel Luca fa0a3dc9d7 Backed out 2 changesets (bug 1581062) for Toolchain failures. CLOSED TREE
Backed out changeset c333f6f9d1bd (bug 1581062)
Backed out changeset 485c738acdb1 (bug 1581062)
2020-03-25 22:23:26 +02:00
Bastien Orivel 1f0110b95e Bug 1581062 - Part 2: Remove the unicode feature from a few crates. r=froydnj,emilio,jgraham,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D65863

--HG--
extra : moz-landing-system : lando
2020-03-25 10:28:00 +00:00
Emily McDonough d3cac52f73 Bug 1341507 part 6 - Enable multiple grid repeat values in Servo r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60931

--HG--
extra : moz-landing-system : lando
2020-03-19 22:11:48 +00:00
Emily McDonough e2096a565d Bug 1341507 part 4 - Add auto-fill length field to line name lists returned from Servo. r=mats,emilio
Rename fill_idx to fill_start, to indicate it is not a single value but a
range. Also change a numeric_limits<>::max() involving the fill_start to use
decltype() to ensure its type matches that of the auto-generated structure's
field, while we're touching that code.

The test to ensure only a single repeat value is allowed will be removed by a
later commit.

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

--HG--
extra : moz-landing-system : lando
2020-03-19 22:11:43 +00:00
Philipp Zech 8b9b6fdab2 Bug 1623410 - Convert mask-composite #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67394

--HG--
extra : moz-landing-system : lando
2020-03-19 13:48:57 +00:00
Stefan Hindli f3854a78ed Backed out 7 changesets (bug 1341507) for mochitest failures in dom/grid/test/chrome/test_grid_repeat_auto_fill.html CLOSED TREE
Backed out changeset e4e968fabe2b (bug 1341507)
Backed out changeset 6cafdef7eb79 (bug 1341507)
Backed out changeset eff4ad47440c (bug 1341507)
Backed out changeset 55432ee0cd4b (bug 1341507)
Backed out changeset e798ebf91eca (bug 1341507)
Backed out changeset 08d38f05b160 (bug 1341507)
Backed out changeset 6b35af9ecb38 (bug 1341507)
2020-03-19 02:49:17 +02:00
Emily McDonough 8cc2cae246 Bug 1341507 part 6 - Enable multiple grid repeat values in Servo r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60931

--HG--
extra : moz-landing-system : lando
2020-03-18 22:44:41 +00:00
Emily McDonough 3496717c21 Bug 1341507 part 4 - Add auto-fill length field to line name lists returned from Servo. r=mats,emilio
Rename fill_idx to fill_start, to indicate it is not a single value but a
range. Also change a numeric_limits<>::max() involving the fill_start to use
decltype() to ensure its type matches that of the auto-generated structure's
field, while we're touching that code.

The test to ensure only a single repeat value is allowed will be removed by a
later commit.

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

--HG--
extra : moz-landing-system : lando
2020-03-18 22:44:36 +00:00
Emilio Cobos Álvarez 664a546418 Bug 1618260 - Fix number input so that it honors overflow-clip-box-block. r=mats
This never worked, but it's more visible with the new form controls which have
more padding.

Make the anonymous div and co a pseudo-element, so that they inherit from the
<input> properly in all cases. This works for non-number inputs because the
editor root is a direct child of the <input>, but it doesn't for number inputs
because there's a flex wrapper in between.

This way overflow-clip-box: inherit does what we want. Reset the padding in the
inline direction, as the padding for <input type=number> applies to the arrow
boxes as well, and thus we'd double-apply it.

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

--HG--
extra : moz-landing-system : lando
2020-03-18 09:21:44 +00:00
Emilio Cobos Álvarez 25104b198d Bug 1623178 - Change the parsing order of border shorthands. r=mats
It's not ambiguous, and <width> <style> <color> seems like a more common order.

This is just a minor perf tweak, as the CSS parser token cache will most often
kick in to avoid re-tokenizing values.

Also remove a redundant continue statement.

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

--HG--
extra : moz-landing-system : lando
2020-03-17 21:48:33 +00:00
Sam Mauldin 9f2ec488bb Bug 1590894: Unprefix existing CSS4 system colors r=emilio
Expect forced-colors-mode-backplate tests to fail because they were passing for the wrong reason,
and the backplate is now properly applied, causing them to fail.

Remove tests for field and fieldtext from color-valid.html because they are tested again
in system-color-valid.html.

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

--HG--
extra : moz-landing-system : lando
2020-03-17 16:08:19 +00:00
Emilio Cobos Álvarez 9b76d28bff Bug 1622058 - Cleanup CSS error reporting a bit. r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D66642

--HG--
extra : moz-landing-system : lando
2020-03-16 20:50:21 +00:00
Daniel Varga 2ef4614ee8 Backed out changeset a2030f611422 (bug 1590894) for causing mochitest failure at layout/style/test/test_value_computation.html 2020-03-15 23:09:42 +02:00
Sam Mauldin 2c684678d4 Bug 1590894: Unprefix existing CSS4 system colors r=emilio
Expect forced-colors-mode-backplate tests to fail because they were passing for the wrong reason,
and the backplate is now properly applied, causing them to fail.

Remove tests for field and fieldtext from color-valid.html because they are tested again
in system-color-valid.html.

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

--HG--
extra : moz-landing-system : lando
2020-03-15 19:45:27 +00:00
Philipp Zech 3db72bdd4b Bug 1622332 - Convert style-blend #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D66867

--HG--
extra : moz-landing-system : lando
2020-03-14 21:24:11 +00:00
Erik Nordin 17dbae2125 Bug 1613511 - Disallow @import rules for all Constructable StyleSheets functions r=emilio
- Add enum AllowImportRules to CSS parsing.
- `replaceSync()` will skip over @import rules and continue parsing.
- `replace()` will skip over @import rules and continue parsing.
- `insertRule()` will throw a syntax error on @import rules.
- Modify WPT test cases to reflect these changes.

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

--HG--
extra : moz-landing-system : lando
2020-03-12 18:11:09 +00:00
Philipp Zech 0e22ff2b24 Bug 1621706 - Convert backface-visibility #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D66487

--HG--
extra : moz-landing-system : lando
2020-03-11 20:58:23 +00:00
Emilio Cobos Álvarez 6ef2792e0e Bug 1621044 - Update in-tree consumers of bindgen. r=keeler,rhunt
Differential Revision: https://phabricator.services.mozilla.com/D66281

--HG--
extra : moz-landing-system : lando
2020-03-10 21:07:34 +00:00
Emilio Cobos Álvarez 2a451d978e Bug 1618509 - Allow to export a shadow part under multiple names. r=jwatt
Other browsers allow this and the spec doesn't really disallow it, so fix it,
add a test and carry on.

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

--HG--
extra : moz-landing-system : lando
2020-03-09 13:04:21 +00:00
Emilio Cobos Álvarez 3d29b274ae Bug 1620359 - Don't clear the "uses viewport units" bit when a font that doesn't cause a style change loads. r=jfkthame
This is probably an old-ish bug made more frequent by the font loading
optimizations.

PostRebuildAllStyleData is a bit of a misnomer, but was always calling
ClearCachedData() on the style set, even if we weren't guaranteed to restyle
every element.

This means both wasted work and correctness issues (as the "uses <rare-feature>"
bits are cleared during this call, on the assumption that we'll then visit all
elements and that'd recompute it properly).

For now, unify a bit the different code paths and only clear these bits if we're
guaranteed to restyle all elements.

I should rename this to something better in a follow-up, and ideally also
decouple the ClearCachedData() calls a bit...

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

--HG--
extra : moz-landing-system : lando
2020-03-06 20:11:51 +00:00
Philipp Zech 75033d421b Bug 1620034 - Convert vector-effect #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D65718

--HG--
extra : moz-landing-system : lando
2020-03-06 14:40:50 +00:00
Emilio Cobos Álvarez 5bba05d7c8 Bug 1620307 - Rename -moz-menulist-button to -moz-menulist-arrow-button. r=spohl
This should be less confusing. This is not supported outside of chrome:// or
user-agent stylesheets so we can name this however we want.

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

--HG--
extra : moz-landing-system : lando
2020-03-05 21:13:46 +00:00
Emilio Cobos Álvarez 1febc27ba3 Bug 1619701 - Respect the cascade properly when in high-contrast mode. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D65345

--HG--
extra : moz-landing-system : lando
2020-03-04 21:25:24 +00:00
Makoto Kato 5e7416a046 Bug 1503656 - Part 5. Get safe area insets from Gecko. r=emilio
Add binding to get safe area insets from Gecko.

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

--HG--
extra : moz-landing-system : lando
2020-03-04 08:15:17 +00:00
Csoregi Natalia aa5b814fee Backed out 6 changesets (bug 1503656) as per request. CLOSED TREE
Backed out changeset 27faa3b167a9 (bug 1503656)
Backed out changeset 7111f9b5ad06 (bug 1503656)
Backed out changeset 43fdc889beac (bug 1503656)
Backed out changeset 332ceea26151 (bug 1503656)
Backed out changeset f31efa4ea2ec (bug 1503656)
Backed out changeset 91b847efe591 (bug 1503656)
2020-03-04 10:07:42 +02:00
Makoto Kato e4d96be526 Bug 1503656 - Part 5. Get safe area insets from Gecko. r=emilio
Add binding to get safe area insets from Gecko.

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

--HG--
extra : moz-landing-system : lando
2020-03-04 07:26:42 +00:00
Morgan Reschenberg c1431063a6 Bug 1617678: Modify background image styling to only apply URL-sourced images when backplate is enabled. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D64200

--HG--
extra : moz-landing-system : lando
2020-03-04 01:19:41 +00:00
Hiroyuki Ikezoe f0b17ecc30 Bug 1510120 - Block running background-color animation on the compositor if there is any current-color keyframe. r=boris,flod
Differential Revision: https://phabricator.services.mozilla.com/D63629

--HG--
extra : moz-landing-system : lando
2020-03-03 21:48:01 +00:00
Razvan Maries 0b474b2251 Backed out changeset dc3ad7ffa787 (bug 1617678) for perma failures on bg-image-div-001.html. CLOSED TREE 2020-03-03 23:16:37 +02:00
Morgan Reschenberg 11e8355a59 Bug 1617678: Modify background image styling to only apply URL-sourced images when backplate is enabled. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D64200

--HG--
extra : moz-landing-system : lando
2020-03-03 19:16:30 +00:00
Philipp Zech 05f68040bd Bug 1617644 - Convert color-interpolation #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D64813

--HG--
extra : moz-landing-system : lando
2020-02-29 15:41:13 +00:00
Emilio Cobos Álvarez 551edfd98f Bug 1618303 - Add an inherited style bit to know whether an element is in an opacity: 0 subtree. r=hiro
I think this should work for the animation throttling stuff.

Opacity works on the element tree, so I think this is sound.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 02:26:39 +00:00
Emilio Cobos Álvarez 279cb1fda5 Bug 1618601 - Add non-const accessors to StyleRect. r=hiro
Just minor convenience. Though I don't love the code duplication, oh well.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 20:58:00 +00:00
Emilio Cobos Álvarez 0fd680394f Bug 1617746 - Minor cleanup of ServoStyleSet. r=nordzilla
Removing unused arguments and so on.

The origin can always be inferred from the stylesheet so it wasn't being used.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 01:46:10 +00:00
Cosmin Sabou 3497aa8314 Backed out 2 changesets (bug 1617746) assertion failures on ShadowRoot.cpp.
CLOSED TREE
Backed out changeset 6cb30e866b95 (bug 1617746)
Backed out changeset 3543162b815b (bug 1617746)
2020-02-27 01:12:46 +02:00
Emilio Cobos Álvarez 28effe5605 Bug 1617746 - Minor cleanup of ServoStyleSet. r=nordzilla
Removing unused arguments and so on.

The origin can always be inferred from the stylesheet so it wasn't being used.

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

--HG--
extra : moz-landing-system : lando
2020-02-26 21:20:38 +00:00
Emilio Cobos Álvarez 5824297570 Bug 1617600 - Remove no-longer-used argument to pseudo-class-list-macro. r=firefox-style-system-reviewers,jwatt
This used to be needed for Gecko interop, but now all this is in the Rust side
so we no longer need it.

Depends on D63861

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

--HG--
extra : moz-landing-system : lando
2020-02-26 14:16:27 +00:00
Emilio Cobos Álvarez de54b68ce7 Bug 1617600 - Prototype :focus-visible behind a flag. r=smaug
The heuristic is that we show focus outlines for unknown or key focus, and not
for mouse / touch.

This is probably not the final heuristic we take, but this allows people to play
with it and file bugs.

Once this is mature enough we should remove :-moz-focusring in favor of
:focus-visible.

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

--HG--
extra : moz-landing-system : lando
2020-02-26 14:16:20 +00:00
Noemi Erli 4fb19079c8 Backed out 3 changesets (bug 1617600) for causing wpt failures in focus-visible-009.html CLOSED TREE
Backed out changeset 73d1a5e10337 (bug 1617600)
Backed out changeset b722714830cd (bug 1617600)
Backed out changeset 45464d926bf0 (bug 1617600)
2020-02-26 01:46:31 +02:00
Emilio Cobos Álvarez 95765901de Bug 1617600 - Remove no-longer-used argument to pseudo-class-list-macro. r=firefox-style-system-reviewers,jwatt
This used to be needed for Gecko interop, but now all this is in the Rust side
so we no longer need it.

Depends on D63861

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

--HG--
extra : moz-landing-system : lando
2020-02-25 12:33:33 +00:00
Emilio Cobos Álvarez 490c70ecc0 Bug 1617600 - Prototype :focus-visible behind a flag. r=smaug
The heuristic is that we show focus outlines for unknown or key focus, and not
for mouse / touch.

This is probably not the final heuristic we take, but this allows people to play
with it and file bugs.

Once this is mature enough we should remove :-moz-focusring in favor of
:focus-visible.

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

--HG--
extra : moz-landing-system : lando
2020-02-25 17:58:28 +00:00
Emilio Cobos Álvarez 5e65211744 Bug 1617472 - Use enums for text-align / text-align-last. r=jfkthame
This also fixes some backwards logic in nsBlockFrame::ReflowDirtyLines, and adds
some static assertions to nsGenericHTMLElement that almost cause a very subtle
bug.

Depends on D63792

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

--HG--
extra : moz-landing-system : lando
2020-02-24 13:32:57 +00:00
Emilio Cobos Álvarez 9de9318c48 Bug 1617069 - Minor LengthPercentage improvements. r=heycam
* Use debug_unreachable for really unreachable code (having a release
   unreachable!() there gives us little to no benefit, as a borked union can
   already confuse us into reading an arbitrary pointer as a CalcPercentage).

 * Avoid a clone of the calc variant when clamping. We only need to mutate the
   clamping mode. This was the only clamp_to_non_negative function that didn't
   consume the value.

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

--HG--
extra : moz-landing-system : lando
2020-02-23 22:27:13 +00:00
Emilio Cobos Álvarez f1e371b6fb Bug 1617425 - Minor cleanup of gecko.mako.rs. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D63779

--HG--
extra : moz-landing-system : lando
2020-02-23 15:43:21 +00:00
Emilio Cobos Álvarez 71cc1a2c62 Bug 1617425 - Use cbindgen for SVG lengths. r=jwatt
Depends on D63777

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

--HG--
extra : moz-landing-system : lando
2020-02-23 15:43:03 +00:00