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

13409 Коммитов

Автор SHA1 Сообщение Дата
Anthony Ramine cd9ba34b12 Bug 1630676 - Replace ScopedTLS::unsafe_get by ScopedTLS::into_slots. r=emilio
We only ever look at the slots after we are done with the thread pool,
so we don't need to expose any unsafety to inspect the slots.
2020-04-16 21:17:42 +02:00
Anthony Ramine 26b6ee1d3a Bug 1630676 - Don't use transmute to create PaintOrder values. r=emilio
I checked that rustc optimises the code just as well as with the transmute.

https://rust.godbolt.org/z/w6UJN4
2020-04-16 21:17:41 +02:00
Anthony Ramine 40593d91fb Bug 1630676 - Don't expose any AtomicRefCell directly from style traits.
This lets us experiment with how we store this data on the DOM side.
2020-04-16 21:17:41 +02:00
Tipowol 538f9d20c8 Bug 1630676 - Update Servo's attribute length parsing code to match spec. 2020-04-16 21:17:40 +02:00
Martin Robinson 51ad515388 Bug 1630676 - Cherry-pick some layout-2020 changes. 2020-04-16 21:17:39 +02:00
Josh Matthews 785ded933e Bug 1630676 - Update ipc-channel and crossbeam-channel in Servo. 2020-04-16 21:17:39 +02:00
Simon Sapin 0158f5c65e Bug 1630676 - Fix some errors and formatting changes when updating rustc to 1.43.0-nightly (5d04ce67f 2020-02-13). 2020-04-16 21:17:38 +02:00
Ciure Andrei aec781a233 Backed out 11 changesets (bug 1630676) for causing multiple failures CLOSED TREE
Backed out changeset c1fbe364b76c (bug 1630676)
Backed out changeset 629970c8f0b7 (bug 1630676)
Backed out changeset 1530f4a9aef2 (bug 1630676)
Backed out changeset a5b60fb5a0e1 (bug 1630676)
Backed out changeset a6e1a31c3e0d (bug 1630676)
Backed out changeset 4df9717e28f0 (bug 1630676)
Backed out changeset c76b0b0e503b (bug 1630676)
Backed out changeset 3c89aec57d0a (bug 1630676)
Backed out changeset 369cf504584d (bug 1630676)
Backed out changeset d7eff4acb616 (bug 1630676)
Backed out changeset 1d47c9354eeb (bug 1630676)
2020-04-16 21:45:51 +03:00
Emilio Cobos Álvarez a891140d96 Bug 1630676 - Fix a typo introduced earlier in this bug.
MANUAL PUSH: orange

CLOSED TREE
2020-04-16 19:25:26 +02:00
Emilio Cobos Álvarez 694173c605 Bug 1630676 - Reformat recent changes, various build fixes, and tidy fixes.
MANUAL PUSH: Review information for upstream patches would get lost otherwise.
2020-04-16 18:38:02 +02:00
Josh Matthews 0bff3e6dfd Bug 1630676 - Refactor some Servo-only animations code. 2020-04-16 18:37:52 +02:00
Anthony Ramine 878b6338d1 Bug 1630676 - Rearrange FontLanguageOverride. r=emilio
Creating one from a u32 should be unsafe because we rely on the fact that the
value is a valid &str.
2020-04-16 18:37:51 +02:00
Anthony Ramine 0f5b32207e Bug 1630676 - Replace ScopedTLS::unsafe_get by ScopedTLS::into_slots. r=emilio
We only ever look at the slots after we are done with the thread pool,
so we don't need to expose any unsafety to inspect the slots.
2020-04-16 18:37:50 +02:00
Anthony Ramine 265f2e8a89 Bug 1630676 - Don't use transmute to create PaintOrder values. r=emilio
I checked that rustc optimises the code just as well as with the transmute.

https://rust.godbolt.org/z/w6UJN4
2020-04-16 18:37:50 +02:00
Anthony Ramine 451e932aaa Bug 1630676 - Don't expose any AtomicRefCell directly from style traits.
This lets us experiment with how we store this data on the DOM side.
2020-04-16 18:37:49 +02:00
Tipowol 2eb18c48ed Bug 1630676 - Update Servo's attribute length parsing code to match spec. 2020-04-16 18:37:48 +02:00
Martin Robinson 42629831e6 Bug 1630676 - Cherry-pick some layout-2020 changes. 2020-04-16 18:37:47 +02:00
Josh Matthews 6d4054a3d3 Bug 1630676 - Update ipc-channel and crossbeam-channel in Servo. 2020-04-16 18:37:45 +02:00
Simon Sapin 7c7a9cf472 Bug 1630676 - Fix some errors and formatting changes when updating rustc to 1.43.0-nightly (5d04ce67f 2020-02-13). 2020-04-16 18:37:44 +02:00
Dzmitry Malyshau 540f1bea3f Bug 1629359 - Update parking_lot to 0.10 r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70646

--HG--
rename : third_party/rust/parking_lot/src/mutex.rs => third_party/rust/parking_lot/src/fair_mutex.rs
extra : moz-landing-system : lando
2020-04-12 19:14:43 +00:00
Stefan Hindli a8922cc7ff Backed out changeset 01cb2f16985e (bug 1629359) for linux x64 qr webgpu bustage
--HG--
extra : rebase_source : 29e879b00d66376a0508bc2df060fcf3f6028590
2020-04-12 22:09:15 +03:00
Dzmitry Malyshau 80f2377b05 Bug 1629359 - Update parking_lot to 0.10 r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70646

--HG--
rename : third_party/rust/parking_lot/src/mutex.rs => third_party/rust/parking_lot/src/fair_mutex.rs
extra : moz-landing-system : lando
2020-04-12 16:25:25 +00:00
Mike Hommey b7f3977978 Bug 1629310 - Build mako-generated stylo rust sources deterministically. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D70633

--HG--
extra : moz-landing-system : lando
2020-04-12 01:25:21 +00:00
Bastien Orivel 9c5bd43624 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-04-11 08:55:12 +00:00
Emilio Cobos Álvarez aa270ab824 Bug 1628976 - Update mako in the style system. r=SimonSapin
This uses Mako-1.1.2 wheel format, rather than zip, and works with py3 and py2.

It'd be great to make mako more like other third party python dependencies but
this allows me to build central again.

This is downloaded from:

  f6ade1e18aadce2fcbc7b31be5f615/Mako-1.1.2-py2.py3-none-any.whl

Via pip-download.

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

--HG--
extra : histedit_source : 1129829891d5afd7dcaa913d0ddfb5b0d69b0fc9
2020-04-10 09:29:53 +00:00
Mike Hommey 070b148444 Bug 1621447 - Convert GenerateServoCSSPropList.py to py3. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D70308

--HG--
extra : moz-landing-system : lando
2020-04-09 11:03:02 +00:00
Erik Nordin 8dfda8ef7c Bug 1621849 - Add CSS Error for DisallowedImportRule r=emilio
- Add new CSS Error
- Add new test case for error
- Ensure that test cases use `replace()` and `replaceSync()`

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

--HG--
extra : moz-landing-system : lando
2020-04-08 22:45:24 +00:00
Cameron McCormack 7c920706b1 Bug 1623819 - Part 2: Assert that initial values in style structs match those in property definitions. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67930

--HG--
extra : moz-landing-system : lando
2020-04-08 05:31:26 +00:00
Cameron McCormack 2034bef4c6 Bug 1623819 - Part 1: Fix a few initial values in Rust property definitions. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67929

--HG--
extra : moz-landing-system : lando
2020-04-08 05:31:19 +00:00
Chris Peterson 32270107d9 Bug 1625855 - Replace MOZ_MUST_USE with [[nodiscard]] in some Servo Rust code. r=emilio
Are there any Rust crates outside mozilla-central that include or emit Mozilla C++ code that should be updated to use [[nodiscard]] instead of MOZ_MUST_USE?

Depends on D68751

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

--HG--
extra : moz-landing-system : lando
2020-04-02 08:27:59 +00:00
Emilio Cobos Álvarez fd00ba62b7 Bug 1624968 - Make :host::part work in the same shadow tree as the part. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D68249

--HG--
extra : moz-landing-system : lando
2020-04-06 10:25:08 +00:00
Cameron McCormack c2bc259414 Bug 1623820 - Part 2: Make image-orientation initial value change be Nightly only. r=emilio
We'll let this ride the trains once Chrome 81 is set to be released.

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

--HG--
extra : moz-landing-system : lando
2020-04-05 03:21:24 +00:00
Cameron McCormack 74726cada1 Bug 1623820 - Part 1: Add support for pref-controlled initial values. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67931

--HG--
extra : moz-landing-system : lando
2020-04-05 03:21:16 +00:00
Emilio Cobos Álvarez cce6ca63f5 Bug 1625036 - Tweak background: transparent handling so that color: transparent doesn't override UA sheet backgrounds. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D68408

--HG--
extra : moz-landing-system : lando
2020-03-30 15:09:33 +00:00
Philipp Zech 53a8327ecd Bug 1625699 - Convert control-character-visibility #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D68705

--HG--
extra : moz-landing-system : lando
2020-03-28 22:17:50 +00:00
Tim Nguyen 19ca5d7afa Bug 1618997 - Omit center positions in conic/radial gradient serialization. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67461

--HG--
extra : moz-landing-system : lando
2020-03-27 22:52:32 +00:00
Ciure Andrei 9298499b4d Backed out changeset 9bbf5c41c5ce (bug 1618997) for causing for causing mochitest and wpt failures CLOSED TREE 2020-03-28 00:14:32 +02:00
Tim Nguyen 6f962cb12a Bug 1618997 - Omit center positions in conic/radial gradient serialization. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67461

--HG--
extra : moz-landing-system : lando
2020-03-27 21:17:02 +00:00
Ciure Andrei 28d3eea9d2 Backed out changeset 507a811671f8 (bug 1618997) for causing bustages CLOSED TREE 2020-03-27 21:50:25 +02:00
Tim Nguyen 98b143f22c Bug 1618997 - Omit center positions in conic/radial gradient serialization. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D67461

--HG--
extra : moz-landing-system : lando
2020-03-27 19:36:18 +00:00
Emilio Cobos Álvarez a214514a58 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 16:48:01 +00:00
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
Emilio Cobos Álvarez fff63130d9 Bug 1617421 - Use cbindgen for cursors. r=jwatt
Pretty straight-forward.

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

--HG--
extra : moz-landing-system : lando
2020-02-23 13:07:30 +00:00
Emilio Cobos Álvarez e96098ff1b Bug 1616691 - Properly reject numbers as part of <length-percentage>. r=heycam
We never fast-reject numbers (because they could be part of a product). Without
this refactoring we'd accept stuff like calc(10) and crash during the evaluation
for obvious reasons.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 00:47:02 +00:00
Emilio Cobos Álvarez 7d8ecd8ab1 Bug 1616691 - Fix one minor serialization issue which was causing test failures. r=heycam
We were serializing calc(10% + 4px) as calc(10% + calc(4px)).

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

--HG--
extra : moz-landing-system : lando
2020-02-21 00:47:00 +00:00
Emilio Cobos Álvarez 4e5b75c288 Bug 1616691 - Simplify math function resolution. r=heycam
So as to avoid allocating an intermediate tree in Rust to resolve
`<length-percentage>` values.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 00:46:53 +00:00
Emilio Cobos Álvarez 1c8cc0fccb Bug 1616691 - Fix C++ side of <length-percentage> values. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D63398

--HG--
extra : moz-landing-system : lando
2020-02-21 00:46:50 +00:00
Emilio Cobos Álvarez 9776b78db8 Bug 1616691 - Make CalcNode the specified representation of <length> and <length-percentage> values. r=heycam
This is the meat of the patch. There are a couple improvements done in a couple
later patches which should hopefully be straight-forward.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 00:46:41 +00:00
Emilio Cobos Álvarez 559a1c5c17 Bug 1616691 - Move the guts of calc nodes into a generic enum. r=heycam
We'll have different leaf nodes as we progress in the value computation stage.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 00:46:33 +00:00
Emilio Cobos Álvarez 49fd79bb94 Bug 1616691 - Implement ToCss for CalcNode. r=heycam
We'll use `CalcNode` as the specified value representation for <length> and
<length-percentage> values, so they'll have to implement ToCss.

There's one minor issue (two calls to to_css() instead of to_css_impl() which
are addressed later in the series).

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

--HG--
extra : moz-landing-system : lando
2020-02-21 00:46:26 +00:00
Emilio Cobos Álvarez af44ad742c Bug 1607553 - Remove an invalid assert. r=heycam
This assert was wrong. The assert may fire if we resurrect the node from a
different thread and insert a kid fast enough.

We allow resurrecting nodes (bumping the nodes from zero to one) to avoid
allocation churn.

In particular, while the thread dropping the node gets to read the children (so
after the fetch_sub from the refcount, but before the read() of the children),
another thread could plausibly bumped the refcount back, and added a children.

This is a very big edge case of course, but I'm kinda sad I hadn't realized
before.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 08:43:08 +00:00
Jonathan Kew 4f84a1029c Bug 1611965 - Add support for the 'all' value of text-decoration-skip-ink. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61184

--HG--
extra : moz-landing-system : lando
2020-02-19 20:04:36 +00:00
Tim Nguyen 91e68d88c0 Bug 1614202 - Implement parsing for CSS conic-gradient syntax. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62148

--HG--
extra : moz-landing-system : lando
2020-02-19 17:43:04 +00:00
Emilio Cobos Álvarez f63532cf6d Bug 1615056 - Remove layout.css.webkit-appearance.enabled. r=jwatt
I don't think we want to keep the ugly widget hacks forever. Let me know if
you'd rather keep the property behind a pref but I don't think there's a point
in doing that.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 14:48:43 +00:00
Ciure Andrei 28fcfbb1ca Backed out changeset 912204a32651 (bug 1614202) for causing xpcshell and mochitests failures CLOSED TREE 2020-02-19 17:21:54 +02:00
Bogdan Tara d9d7ba1ba9 Backed out changeset 222723ab0b5b (bug 1615056) for bustages complaining about nsNativeThemeWin.cpp CLOSED TREE 2020-02-19 16:10:56 +02:00
Tim Nguyen a7a60ebe29 Bug 1614202 - Implement parsing for CSS conic-gradient syntax. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62148

--HG--
extra : moz-landing-system : lando
2020-02-19 13:55:36 +00:00
Emilio Cobos Álvarez 4675433ccc Bug 1615056 - Remove layout.css.webkit-appearance.enabled. r=jwatt
I don't think we want to keep the ugly widget hacks forever. Let me know if
you'd rather keep the property behind a pref but I don't think there's a point
in doing that.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 11:27:27 +00:00
Cameron McCormack ad66f7561b Bug 1607667 - Change initial value of image-orientation to from-image. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62826

--HG--
extra : moz-landing-system : lando
2020-02-14 11:11:27 +00:00
Emilio Cobos Álvarez e02bf215b7 Bug 1615876 - Minor gradient parsing cleanup. r=ntim
I suggested the compat_mode bit in D62923 but it was somehow only applied to one
of the branches.

Also rustfmt the code for consistency, and add a local alias.

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

--HG--
extra : moz-landing-system : lando
2020-02-16 11:00:45 +00:00
Tim Nguyen c15714cbeb Bug 1615489 - Refactor GenericGradient for conic-gradient support. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62923

--HG--
extra : moz-landing-system : lando
2020-02-15 22:04:35 +00:00
Arthur Iakab 8fc81437b1 Backed out changeset 0721d0777474 (bug 1615489) for multiple build bustages.
DONTBUILD
CLOSED TREE
2020-02-15 21:50:33 +02:00
Tim Nguyen cc1ec3b906 Bug 1615489 - Refactor GenericGradient for conic-gradient support. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62923

--HG--
extra : moz-landing-system : lando
2020-02-15 19:07:54 +00:00
shindli ef9b6edae2 Backed out changeset 07fc980b7ed8 (bug 1615489) for causing linux build bustages 2020-02-15 15:41:45 +02:00
Tim Nguyen dc4ed94109 Bug 1615489 - Refactor GenericGradient for conic-gradient support. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62923

--HG--
extra : moz-landing-system : lando
2020-02-15 13:16:36 +00:00
Tim Nguyen a2e4d99a50 Bug 1610597 - Re-introduce display: -moz-stack; as <legacy-stack>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62758

--HG--
extra : moz-landing-system : lando
2020-02-14 16:32:38 +00:00
Martin McNickle 30c6161dca Bug 1615380 - Part 2 - Use the cbindgen output for GridAutoFlow directly in gecko. r=emilio
Depends on D62787

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

--HG--
extra : moz-landing-system : lando
2020-02-14 15:48:10 +00:00
Martin McNickle 338ba52025 Bug 1615380 - Part 1 - Replace existing GridAutoFlow struct with a `bitflags!` backed one. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62787

--HG--
extra : moz-landing-system : lando
2020-02-14 15:48:01 +00:00
Tim Nguyen 5f5b496d2d Bug 1614648 - Make GradientItem and ColorStop support angular color stops. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62544

--HG--
extra : moz-landing-system : lando
2020-02-12 18:22:51 +00:00
Dorel Luca 5e422ce68b Backed out changeset 7e16a18f0f94 (bug 1614648) for build bustages in layout/painting/nsCSSRenderingGradients. CLOSED TREE 2020-02-12 14:33:04 +02:00
Tim Nguyen b4bc3c844a Bug 1614648 - Make GradientItem and ColorStop support angular color stops. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62544

--HG--
extra : moz-landing-system : lando
2020-02-12 11:47:42 +00:00
Emilio Cobos Álvarez daccffdb9f Bug 1614348 - Make font-family serialization algorithm a bit more conservative. r=xidorn
So as to avoid serializing as identifiers font-families with spaces as part of
the identifier. This avoids serializing confusing escaped sequences if the
beginning of the stuff after the space happens to not be a valid ident start.

This is an slightly more restrictive version of the existing logic, which
happens to also match other browsers in my testing.

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

--HG--
extra : moz-landing-system : lando
2020-02-12 11:32:47 +00:00
Boris Chiou 9198a9a26e Bug 1614407 - Drop fallback attribute from animate and distance. r=emilio
Still keep the discriminant checks to avoid generating terrible code.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 01:12:00 +00:00
Emilio Cobos Álvarez bfcb8d06e9 Bug 1614510 - Split clip-path and shape-outside values. r=boris
We don't actually share _that_ much code across them. This makes callers clearer
and code less confusing, IMHO.

This also has the benefit of not autocompleting path from devtools for
shape-outside.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 23:34:53 +00:00
Emilio Cobos Álvarez 628f21dc90 Bug 1614510 - Use cbindgen for shape-outside and clip-path. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D62372

--HG--
extra : moz-landing-system : lando
2020-02-11 22:03:53 +00:00
Emilio Cobos Álvarez 006e5cca66 Bug 1614198 - Use cbindgen instead of nsStyleImage. r=aosmond
The trickier part is that we represent -moz-image-rect as a Rect() type instead
of image with non-null clip-rect. So we need to add a bit of code to
distinguish "image request types" from other types of images.

But it's not too annoying, and we need to do the same for fancier images like
image-set and such whenever we implement it, so seems nice to get rid of
most explicit usages of nsStyleImage::GetType().

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

--HG--
extra : moz-landing-system : lando
2020-02-11 20:56:20 +00:00
Emilio Cobos Álvarez 21f524eca1 Bug 1614198 - Some preparation to start using cbindgen for shape-outside and clip-path. r=boris
Tweak the ShapeSourceRepresentation so that it doesn't store Option<>s.

Some renames so that GeometryBox doesn't conflict with the Gecko type, and some
other usual bits / re-exports to deal with cbindgen and generics.

Also, drive-by derive parsing of GeometryBox as it's trivial.

Doing this unfortunately is not possible without removing nsStyleImage first, so
let's do that before.

This makes us serialize in the shortest form for shape-outside, but that's what
we should do anyway.

(aside: the shapes code is a bit too generic, maybe we should unify
ClippingShape and FloatAreaShape...)

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

--HG--
extra : moz-landing-system : lando
2020-02-11 20:56:13 +00:00
Emilio Cobos Álvarez d7841a5f17 Bug 1614208 - Remove some include dependencies in nsStyleConsts.h. r=jfkthame,jgilbert
We include it everywhere because it's included from gfxTypes.h.

This should avoid including all the generated bindings _everywhere_.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 01:23:37 +00:00
Emilio Cobos Álvarez 52d630ef26 Bug 1614198 - Remove trait bound and comment that snuck from a previous patch accidentally in a CLOSED TREE
MANUAL PUSH: Fixing accidental Lando-relanding of previous version of the patch.
2020-02-10 21:17:59 +01:00
Emilio Cobos Álvarez d6aacafdfd Bug 1614198 - Merge ImageLayer and Image. r=heycam
ImageLayer is almost the only usage of Image, so keeping them in the same enum
makes the resulting C++ struct smaller, and makes it map more cleanly to
nsStyleImage.

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

--HG--
extra : moz-landing-system : lando
2020-02-10 20:02:31 +00:00
Mihai Alexandru Michis a53731fa59 Backed out changeset a3695dec8b66 (bug 1614198) for causing bustages in ImageLayer
CLOSED TREE
2020-02-10 21:48:26 +02:00
Emilio Cobos Álvarez 0ca6f95831 Bug 1614198 - Merge ImageLayer and Image. r=heycam
ImageLayer is almost the only usage of Image, so keeping them in the same enum
makes the resulting C++ struct smaller, and makes it map more cleanly to
nsStyleImage.

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

--HG--
extra : moz-landing-system : lando
2020-02-10 19:25:40 +00:00
Emilio Cobos Álvarez ec32f37af9 Bug 1614394 - Cherry-pick some more formatting changes.
Differential Revision: https://phabricator.services.mozilla.com/D62317

--HG--
extra : moz-landing-system : lando
2020-02-10 18:18:27 +00:00
Emilio Cobos Álvarez 888338d969 Bug 1614394 - Cherry-pick a selectors version bump.
Differential Revision: https://phabricator.services.mozilla.com/D62309

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:37 +00:00
Emilio Cobos Álvarez 89edad17e0 Bug 1614394 - Remove now unused dependency from the style system.
Differential Revision: https://phabricator.services.mozilla.com/D62308

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:35 +00:00
Emilio Cobos Álvarez 93611990a4 Bug 1614394 - Rustfmt recent changes.
Differential Revision: https://phabricator.services.mozilla.com/D62307

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:27 +00:00
Emilio Cobos Álvarez f811ee2f3b Bug 1614394 - Fix Servo build.
Differential Revision: https://phabricator.services.mozilla.com/D62306

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:25 +00:00
Emilio Cobos Álvarez 217f3f86df Bug 1614394 - Cherry-pick some servo-2020 changes to the style system.
Differential Revision: https://phabricator.services.mozilla.com/D62305

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:18 +00:00
Patrick Shaughnessy 00d66a376a Bug 1614394 - Cherry-pick Servo changes for :defined support.
Differential Revision: https://phabricator.services.mozilla.com/D62304

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:15 +00:00
Emilio Cobos Álvarez 9ec744b313 Bug 1614394 - Implement num_traits::Zero for CSSPixelLength.
Differential Revision: https://phabricator.services.mozilla.com/D62303

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:13 +00:00
Simon Sapin 583c7b9d38 Bug 1614394 - Move `OpaqueNode` to `style_traits`.
Differential Revision: https://phabricator.services.mozilla.com/D62302

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:11 +00:00
Emilio Cobos Álvarez 741ec04a23 Bug 1614394 - Cherry-pick some servo-only changes to malloc_size_of.
Differential Revision: https://phabricator.services.mozilla.com/D62301

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:09 +00:00
Simon Sapin dd3ef574ef Bug 1614394 - Parse `-moz-image-rect()` and `-moz-element()` only in Gecko.
Differential Revision: https://phabricator.services.mozilla.com/D62300

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:07 +00:00
Emilio Cobos Álvarez 44abf87d9d Bug 1612301 - Fix LengthPercentage on big-endian machines. r=jfkthame
Always store the pointer in little-endian order so that the tag trick works.

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

--HG--
extra : moz-landing-system : lando
2020-02-10 17:12:44 +00:00
Emilio Cobos Álvarez 4103cf7f51 Bug 1613491 - Make rust generate better code for some of the functions introduced here. r=heycam
See https://github.com/rust-lang/rust/issues/68867.

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

--HG--
extra : moz-landing-system : lando
2020-02-10 14:09:38 +00:00
Emilio Cobos Álvarez 7e238a47ba Bug 1613491 - Add some calc infrastructure to deal with simplification / sorting / etc. r=heycam
For now, we still bail out at the stage of getting the calc node into a
CalcLengthPercentage if we couldn't simplify the min() / max() / clamps()
involved.

After this plan is to use just CalcNode everywhere instead of
specified::CalcLengthPercentage, and then modify the computed
CalcLengthPercentage, which would look slightly different as we know all the sum
terms for those are a struct like { Length, Percentage, bool has_percentage } or
such, so all the simplification code for that becomes much simpler, ideally.

Or we could turn CalcNode generic otherwise, if it's too much code... We'll see.

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

--HG--
extra : moz-landing-system : lando
2020-02-10 14:09:27 +00:00
Emilio Cobos Álvarez f98a6411b1 Bug 1613517 - Make rust generate better code for derive(Animate) and derive(ComputeSquaredDistance). r=heycam
See https://github.com/rust-lang/rust/issues/68867.

This technically changes the semantics of #[animate(fallback)] and such when
combined with #[animate(error)]. But no such combination exists and the new
semantics are perfectly reasonable as well, IMHO.

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

--HG--
extra : moz-landing-system : lando
2020-02-10 13:51:49 +00:00
Emilio Cobos Álvarez 451b254453 Bug 1612291 - Fix two issues with themed widgets in high contrast mode. r=heycam
There were two issues with the existing code that we use to determine whether a
widget is styled or not.

First, it was using `color == Color::transparent()` instead of
`color.is_transparent()` to check for transparent backgrounds. That is not sound
as `Color::transparent()` is the literal value `rgba(0, 0, 0, 0)`, not the
`transparent` keyword, so the equality check would fail.

The other issue is that this function was early-returning false if that check
was returning false. It is a bug for this function to early-return false, as it
makes the result of the function dependent of the order of the declarations.

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

--HG--
extra : moz-landing-system : lando
2020-02-10 00:37:36 +00:00
Tim Nguyen 3459492b2f Bug 1614160 - Add AngleOrPercentage to style system. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62158

--HG--
extra : moz-landing-system : lando
2020-02-09 15:11:43 +00:00
Emilio Cobos Álvarez 374cabd6e7 Bug 1606628 - Remove nsStyleImageRequest. r=tnikkel,heycam
This removes nsStyleImageRequest by moving the load state to LoadData instead
(where other lazy state like the resolved URL and load id lives).

That way we can use cbindgen for more stuff (there's no blocker for using it for
all images now), and we can undo the image tracking shenanigans that I had to do
in bug 1605803 in nsImageFrame.

This removes the mDocGroup member because well, there's no real upside of that
now that quantum DOM is not a thing.

It also removes the static clones of the image requests, and the need for each
computed value instance to have its own request. These were needed because we
needed the image loader for the particular document to observe the image
changes. But we were also tracking the request -> loader for other purposes.
Instead, Now all the images get loaded with GlobalImageObserver as a listener,
which looks in the image map and forwards the notification to all the interested
loaders instead dynamically.

The style value is only responsible to load the image, and no longer tracks /
locks it. Instead, the loader does so, via the image tracker.

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

--HG--
extra : moz-landing-system : lando
2020-02-07 20:36:34 +00:00
Thomas Dolezal 062c15357a Bug 1611733 - Bug 1611633 - convert ns style position defines to enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61958

--HG--
extra : moz-landing-system : lando
2020-02-07 12:35:30 +00:00
Emilio Cobos Álvarez af73640f4e Bug 1613010 - Don't use a binary tree representation for calc() sums / products. r=heycam
Keep a flat list of sum members. Simpify product and division ASAP.

I want to preserve the tree for a bit longer to implement min / max / clamp.
This doesn't do anything for it that we weren't doing already, but it helps to
eventually keep this specified representation and the equivalent computed
representation for <length-percentage> values.

Enable the tests for the comparison functions too, to prevent regressions.

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

--HG--
extra : moz-landing-system : lando
2020-02-07 00:40:55 +00:00
Mihai Alexandru Michis 823e8c21f1 Backed out changeset c9f4dd3ed78b (bug 1606628) for causing failures in ImageLoader.cpp
CLOSED TREE
2020-02-06 23:19:55 +02:00
Emilio Cobos Álvarez 77c6b3e983 Bug 1606628 - Remove nsStyleImageRequest. r=tnikkel,heycam
This removes nsStyleImageRequest by moving the load state to LoadData instead
(where other lazy state like the resolved URL and load id lives).

That way we can use cbindgen for more stuff (there's no blocker for using it for
all images now), and we can undo the image tracking shenanigans that I had to do
in bug 1605803 in nsImageFrame.

This removes the mDocGroup member because well, there's no real upside of that
now that quantum DOM is not a thing.

It also removes the static clones of the image requests, and the need for each
computed value instance to have its own request. These were needed because we
needed the image loader for the particular document to observe the image
changes. But we were also tracking the request -> loader for other purposes.
Instead, Now all the images get loaded with GlobalImageObserver as a listener,
which looks in the image map and forwards the notification to all the interested
loaders instead dynamically.

The style value is only responsible to load the image, and no longer tracks /
locks it. Instead, the loader does so, via the image tracker.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 20:32:59 +00:00
Emilio Cobos Álvarez 836a705c56 Bug 1607553 - Try to collect some more crash information so that we can diagnose this better. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D59704

--HG--
extra : moz-landing-system : lando
2020-01-22 00:06:35 +00:00
Jonathan Kew 4a153d86a2 Bug 1607308 - Move the from-font value from text-underline-offset to text-underline-position, as per recent spec changes, and fix interaction between position and offset. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D59778

--HG--
extra : moz-landing-system : lando
2020-02-03 14:38:28 +00:00
Jonathan Kew aa8ee28de1 Bug 1607534 - Support percentage values for the CSS text-decoration-thickness and text-underline-offset properties. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D59777

--HG--
extra : moz-landing-system : lando
2020-02-03 14:21:32 +00:00
Ciure Andrei 141db422c6 Backed out 2 changesets (bug 1607308, bug 1607534) for causing text-decoration-underline-position-vertical-ja.html to permafail CLOSED TREE
Backed out changeset e55052ed4064 (bug 1607308)
Backed out changeset 280bd106d48a (bug 1607534)
2020-02-03 16:17:02 +02:00
Emilio Cobos Álvarez ca641d574f Bug 1612114 - Invalidate shadow root style data on insertion if needed. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D61293

--HG--
extra : moz-landing-system : lando
2020-02-03 12:40:36 +00:00
Jonathan Kew 8b019300fc Bug 1607308 - Move the from-font value from text-underline-offset to text-underline-position, as per recent spec changes, and fix interaction between position and offset. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D59778

--HG--
extra : moz-landing-system : lando
2020-02-03 11:12:16 +00:00
Jonathan Kew 1ee6b76d7d Bug 1607534 - Support percentage values for the CSS text-decoration-thickness and text-underline-offset properties. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D59777

--HG--
extra : moz-landing-system : lando
2020-02-03 11:11:52 +00:00
Tim Nguyen 3b6875eeb1 Bug 1610404 - Remove nsGroupBoxFrame (display: -moz-groupbox). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61422

--HG--
extra : moz-landing-system : lando
2020-02-03 09:55:51 +00:00
Thomas Dolezal bfd4477a13 Bug 1612146 - Converting empty-cells defines into enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61398

--HG--
extra : moz-landing-system : lando
2020-02-01 21:43:31 +00:00
Thomas Dolezal 2770364f87 Bug 1612148 - Replace transform style defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61388

--HG--
extra : moz-landing-system : lando
2020-02-01 20:23:26 +00:00
Narcis Beleuzu 585bab844e Backed out 2 changesets (bug 1612148) for reftest failures. CLOSED TREE
Backed out changeset e1432ef26779 (bug 1612148)
Backed out changeset 0c1831f15450 (bug 1612148)
2020-02-01 19:23:06 +02:00
Emilio Cobos Álvarez c84fe1b982 Bug 1612148 - followup: Remove unused include.
MANUAL PUSH: Patch from contributor was missing this, causing bustage.

CLOSED TREE

--HG--
extra : amend_source : ebf9505656921c452d3b2abac2f5a88f1b99db15
2020-02-01 17:08:09 +01:00
Thomas Dolezal 523017b0f6 Bug 1612148 - Replace transform style defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61388

--HG--
extra : moz-landing-system : lando
2020-02-01 15:50:04 +00:00
Emilio Cobos Álvarez 1fdf0e61d3 Bug 1611912 - Add a style flag for the root element style. r=heycam
This is needed to make the root element not a containing block in presence of
filters or what not.

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

--HG--
extra : moz-landing-system : lando
2020-01-31 14:51:06 +00:00
Jonathan Kew fe46c531b3 Bug 1612399 - Don't apply text-combine-upright in sideways-* writing modes. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61326

--HG--
extra : moz-landing-system : lando
2020-01-31 10:11:19 +00:00
Thomas Dolezal 28e6a65cfb Bug 1612143 - Replacing table-layout defines with an enum r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61260

--HG--
extra : moz-landing-system : lando
2020-01-31 01:23:23 +00:00
Emilio Cobos Álvarez 4812f9408a Bug 1611583 - Use cbindgen for css-align types. r=dholbert
This provides stronger typing and removes a bunch of subtle constants matching.

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

--HG--
extra : moz-landing-system : lando
2020-01-31 00:56:49 +00:00
Thomas Dolezal a63c10f0de Bug 1611041 - Convert image-rendering #defines to an enum class. r=emilio
MANUAL PUSH: Contributor didn't use Phabricator and I don't want patch to rot
2020-01-30 04:50:24 +01:00
Martin McNickle 9f727fc9c5 Bug 1611829 - Convert scroll-behavior #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61164

--HG--
extra : moz-landing-system : lando
2020-01-28 09:12:29 +00:00
Martin McNickle 0c665c265e Bug 1611043 - Convert mask-type #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60987

--HG--
extra : moz-landing-system : lando
2020-01-27 14:59:41 +00:00
Emilio Cobos Álvarez f97d7df528 Bug 1610085 - Tweak background-color and color handling in ignored-colors mode. r=jwatt
We're resetting `color` to the default color when there's a declaration that
applies in order to make stuff like this:

<div style="color: transparent">
  <div style="color: red">
    Red
  </div>
</div>

To not show transparent. But the behavior we want is more like "override with
default color iff there's no other declaration that would set the color from an
user or UA sheet".

This implements that behavior, plus avoids it if we're not inheriting
from transparent, so that stuff like this preserves the behavior from before bug
844349:

<a href="foo">
  <span style="color: red">Should be the red color</span>
</a>

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

--HG--
extra : moz-landing-system : lando
2020-01-26 22:57:21 +00:00
Csoregi Natalia 3a270b7de3 Backed out changeset 239f7622187e (bug 1610085) for background color failures on test_dont_use_document_colors.html. CLOSED TREE 2020-01-26 23:14:39 +02:00
Emilio Cobos Álvarez 6bfbf10f25 Bug 1611711 - Remove kCursorKTable. r=jwatt
(And while at it, format the end of the other keyword tables so that
cleanup_ktables.py works).

It seems `Window.setCursor` is only used once in our code, maybe
we should remove it...

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

--HG--
extra : moz-landing-system : lando
2020-01-26 20:17:41 +00:00
Emilio Cobos Álvarez 64099dcf90 Bug 1610085 - Tweak background-color and color handling in ignored-colors mode. r=jwatt
We're resetting `color` to the default color when there's a declaration that
applies in order to make stuff like this:

<div style="color: transparent">
  <div style="color: red">
    Red
  </div>
</div>

To not show transparent. But the behavior we want is more like "override with
default color iff there's no other declaration that would set the color from an
user or UA sheet".

This implements that behavior, plus avoids it if we're not inheriting
from transparent, so that stuff like this preserves the behavior from before bug
844349:

<a href="foo">
  <span style="color: red">Should be the red color</span>
</a>

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

--HG--
extra : moz-landing-system : lando
2020-01-26 20:16:47 +00:00
Sakura Mochizuki edc2287d2f Bug 1611040 - Convert dominant-baseline #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61046

--HG--
extra : moz-landing-system : lando
2020-01-25 10:51:24 +00:00
Boris Chiou cad48f3f6a Bug 1609786 - Make the empty svg path valid. r=emilio
Per SVG2 spec, the EBNF allows the path data string to be empty.
An empty path data string disables rendering of the path.
Therefore, we should make path('') a valid path string.

The related spec issue: https://github.com/w3c/fxtf-drafts/issues/392.
Now we serialize `path("")` as `path("")` for offset-path and clip-path.

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

--HG--
extra : moz-landing-system : lando
2020-01-24 18:59:03 +00:00
Emilio Cobos Álvarez a25126cd0d Bug 1611181 - Make direction use an enum class. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D60857

--HG--
extra : moz-landing-system : lando
2020-01-24 11:46:14 +00:00
Martin McNickle 56f3626ca9 Bug 1611044 - Convert stroke-linejoin #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60865

--HG--
extra : moz-landing-system : lando
2020-01-23 17:19:27 +00:00
Emilio Cobos Álvarez fd83f48756 Bug 1609737 - Simplify calc expressions earlier. r=boris
This simplifies a bit the code, and guarantees that all calc()s have percentages
and lengths.

I also wanted to remove unclamped_length() / specified_percentage() (for the
same reason as the above patch), but they're needed for animations for now. When
I implement min() / max() for <length-percentage> they'll be fixed.

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

--HG--
extra : moz-landing-system : lando
2020-01-23 09:18:39 +00:00
Emilio Cobos Álvarez caa966f9de Bug 1609737 - Forbid accessing the length and percentage parts of a LengthPercentage separately. r=boris
This is just not a thing you can do if you have min() / max() / etc, as the min
/ max value may depend on the percentage basis.

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

--HG--
extra : moz-landing-system : lando
2020-01-23 09:18:39 +00:00
Cosmin Sabou 39c82e1497 Backed out 2 changesets (bug 1609737) for causing build bustages on nsCSSRenderingGradients after backing out Bug 1609711. CLOSED TREE
Backed out changeset d12980bbc425 (bug 1609737)
Backed out changeset 51f3f1a1efb8 (bug 1609737)
2020-01-23 07:39:48 +02:00
Emilio Cobos Álvarez 9b78285fd3 Bug 1609737 - Simplify calc expressions earlier. r=boris
This simplifies a bit the code, and guarantees that all calc()s have percentages
and lengths.

I also wanted to remove unclamped_length() / specified_percentage() (for the
same reason as the above patch), but they're needed for animations for now. When
I implement min() / max() for <length-percentage> they'll be fixed.

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

--HG--
extra : moz-landing-system : lando
2020-01-23 00:36:34 +00:00
Emilio Cobos Álvarez b06718c3dc Bug 1609737 - Forbid accessing the length and percentage parts of a LengthPercentage separately. r=boris
This is just not a thing you can do if you have min() / max() / etc, as the min
/ max value may depend on the percentage basis.

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

--HG--
extra : moz-landing-system : lando
2020-01-23 00:36:27 +00:00
Emilio Cobos Álvarez 031b6afee0 Bug 1610801 - Remove font-size calc() hack to propagate keyword information. r=manishearth
It does not make any sense with min() / max() / clamp. So just forget the
keyword info when calc() is used. This also removes a bit of complex / hacky
code.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 23:46:24 +00:00
Boris Chiou 98e40ec294 Bug 1592822 - Replace StyleVecU8 with ipc::ByteBuf. r=emilio
We generate ByteBuf by rust bindgen, so we can drop StyleVecU8.
One potential follow-up is that we can merge this together with WrVecU8.

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

--HG--
rename : ipc/glue/ByteBuf.h => ipc/glue/ByteBufUtils.h
extra : moz-landing-system : lando
2020-01-22 20:18:40 +00:00
Boris Chiou ffa1ebad7b Bug 1592822 - Use Serde for OffsetRotate and PositionOrAuto. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60088

--HG--
extra : moz-landing-system : lando
2020-01-22 20:18:38 +00:00
Boris Chiou 14387265a7 Bug 1592822 - Use Serde for SVGOffsetPath. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60087

--HG--
extra : moz-landing-system : lando
2020-01-22 20:18:35 +00:00
Boris Chiou 38cc52c091 Bug 1592822 - Use Serde for Transform. r=emilio
Though this may make us use more space when serializing
StyleTransform, but we don't have to do extra conversion on the compostior
side, and this makes us easier to maintain the Rust type.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 20:20:38 +00:00
Boris Chiou 7b90a66fcb Bug 1592822 - Use Serde for rotate, scale, and translate properties. r=emilio
The only drawback is: we resolve LengthPercentage value before passing
translate property through IPC, so its percentage part is redundant.
However, this makes us easier to maintain the Rust type.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 20:18:31 +00:00
Bogdan Tara 958c34b738 Backed out 6 changesets (bug 1592822) for bustages complaining about layout/painting/nsDisplayList.cpp CLOSED TREE
Backed out changeset 90d0f2ebd310 (bug 1592822)
Backed out changeset 9890bad86a0e (bug 1592822)
Backed out changeset 43870cc90433 (bug 1592822)
Backed out changeset d80e0e3f5b87 (bug 1592822)
Backed out changeset 99be49183325 (bug 1592822)
Backed out changeset 9ce641556acc (bug 1592822)

--HG--
extra : histedit_source : fa4e4b2c899510f1d39ee3baa0374e2ce16d2815
2020-01-22 21:17:39 +02:00
Boris Chiou 4f3076794c Bug 1592822 - Replace StyleVecU8 with ipc::ByteBuf. r=emilio
We generate ByteBuf by rust bindgen, so we can drop StyleVecU8.
One potential follow-up is that we can merge this together with WrVecU8.

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

--HG--
rename : ipc/glue/ByteBuf.h => ipc/glue/ByteBufUtils.h
extra : moz-landing-system : lando
2020-01-22 18:42:54 +00:00
Boris Chiou e10013895e Bug 1592822 - Use Serde for OffsetRotate and PositionOrAuto. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60088

--HG--
extra : moz-landing-system : lando
2020-01-22 18:40:19 +00:00
Boris Chiou 40f3cb3d65 Bug 1592822 - Use Serde for SVGOffsetPath. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60087

--HG--
extra : moz-landing-system : lando
2020-01-22 18:40:11 +00:00
Boris Chiou 9735c2e972 Bug 1592822 - Use Serde for Transform. r=emilio
Though this may make us use more space when serializing
StyleTransform, but we don't have to do extra conversion on the compostior
side, and this makes us easier to maintain the Rust type.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 18:40:09 +00:00
Boris Chiou 73f0ae66a9 Bug 1592822 - Use Serde for rotate, scale, and translate properties. r=emilio
The only drawback is: we resolve LengthPercentage value before passing
translate property through IPC, so its percentage part is redundant.
However, this makes us easier to maintain the Rust type.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 18:40:07 +00:00
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
jeffin143 0393375a39 Bug 1600481 : convert NS_STYLE_ISOLATION_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D55378

--HG--
extra : moz-landing-system : lando
2019-12-06 04:42:18 +00:00
Emilio Cobos Álvarez 4695746608 Bug 1601732 - Update in-tree dependencies to smallvec 1.0. r=glandium
We're vendoring it already so no reason not to. Only a couple dependencies left
after these to get rid of 0.6.

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

--HG--
extra : moz-landing-system : lando
2019-12-05 23:30:59 +00:00