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

14982 Коммитов

Автор SHA1 Сообщение Дата
CanadaHonk 1ec96570e0 Bug 1854809 - Include quotes in AtomString CSS serialization r=emilio
The serialization of `AtomString` should include quotes itself
rather than users of it having to do so themselves.

Differential Revision: https://phabricator.services.mozilla.com/D189050
2023-09-25 20:39:51 +00:00
Boris Chiou e0ef200999 Bug 1834641 - Fix the serialization of mask shorthand property. r=emilio
1. We should omit `mask-image` if it is the initial value and there are
   any other properties which are not initial values.
2. We should omit `mask-origin` if it is the initial value.
3. Tweak the order of `<masking-mode>`, which should be the last one per spec.

Differential Revision: https://phabricator.services.mozilla.com/D188545
2023-09-25 18:48:55 +00:00
Emilio Cobos Álvarez b2e89b7820 Bug 1854757 - Relax assert to account for snapshots that we take for relative selector invalidation. r=dshin
Not sure how easy would it be to construct a test-case for this...

Differential Revision: https://phabricator.services.mozilla.com/D189061
2023-09-25 15:26:35 +00:00
Nicolas Chevobbe 20921d6819 Bug 1841265 - Add InspectorUtils.getCSSRegisteredProperties. r=emilio,zrhoffman.
Differential Revision: https://phabricator.services.mozilla.com/D188215
2023-09-25 15:02:51 +00:00
Butkovits Atila 699a770452 Backed out changeset f4a2f296a2ea (bug 1854809) for causing build bustages. CLOSED TREE 2023-09-24 01:07:55 +03:00
CanadaHonk ec54a400d5 Bug 1854809 - Include quotes in AtomString CSS serialization r=emilio
The serialization of `AtomString` should include quotes itself
rather than users of it having to do so themselves.

Differential Revision: https://phabricator.services.mozilla.com/D189050
2023-09-23 21:13:18 +00:00
Iulian Moraru 8867443f5d Backed out 2 changesets (bug 1852084) for causing bug 1853970. CLOSED TREE
Backed out changeset 427a6983a14b (bug 1852084)
Backed out changeset aac846ab41a5 (bug 1852084)
2023-09-21 00:41:39 +03:00
David Shin 7b67eb8bae Bug 1854151: Optimize the relative selector check path when no relative selector is used. r=emilio
* Lazily calculate changed states and classes when processing pending state & attribute invalidations
* Avoid constructing empty `SmallVec` invalidations when we know there is no invalidation

Differential Revision: https://phabricator.services.mozilla.com/D188733
2023-09-20 17:01:09 +00:00
CanadaHonk 8826c8dfd7 Bug 1448248 - Implement CSS attr() fallback r=emilio
Implemented support for fallback values in CSS attr():
`attr(<attr-name>, <attr-fallback>)`

Full syntax supported as of this rev:
`[namespace? `|`]? ident [`,` fallback]?`

Spec: https://drafts.csswg.org/css-values-5/#attr-notation

Also added a new WPT reftest for attr fallback without a type,
and some new attr serialization WPTs (namespace and fallback).

Differential Revision: https://phabricator.services.mozilla.com/D176801
2023-09-20 10:50:05 +00:00
Gregory Pappas a7d65ebda6 Bug 1853518 - Remove layout.css.line-height-moz-block-height.content.enabled pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D188408
2023-09-16 18:23:15 +00:00
Emilio Cobos Álvarez 7f1a26e86f Bug 1852834 - Look for animations in all trees where the name might come from. r=boris
This is not _quite_ the thing that the spec asks for, but it's more
correct than what we're doing.

What we were doing before this patch was a poor man's version of this
that didn't deal with shadow DOM.

Differential Revision: https://phabricator.services.mozilla.com/D188324
2023-09-16 13:30:53 +00:00
Sandor Molnar 2b6bb99fd8 Backed out changeset 6cdd02295e2d (bug 1842478) for causing mochitest failures on layout/style/test/test_transitions_and_zoom.html CLOSED TREE 2023-09-16 11:10:01 +03:00
Gregory Pappas b681733f23 Bug 1842478 - Remove layout.css.individual-transform.enabled pref r=boris,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D184176
2023-09-16 05:55:29 +00:00
Gregory Pappas 740b6eaec0 Bug 1842479 - Remove layout.css.motion-path.enabled pref r=boris
Differential Revision: https://phabricator.services.mozilla.com/D184018
2023-09-16 02:37:11 +00:00
Iulian Moraru b86d5f3fb8 Backed out changeset cb29b79c8842 (bug 1852834) for causing wpt failures on keyframes-004.html. CLOSED TREE 2023-09-16 05:22:29 +03:00
Emilio Cobos Álvarez a0c6e9144d Bug 1852834 - Look for animations in all trees where the name might come from. r=boris
This is not _quite_ the thing that the spec asks for, but it's more
correct than what we're doing.

What we were doing before this patch was a poor man's version of this
that didn't deal with shadow DOM.

Differential Revision: https://phabricator.services.mozilla.com/D188324
2023-09-15 23:04:04 +00:00
Emilio Cobos Álvarez 4726f4afae Bug 1853392 - Remove redundant font-family application.
MANUAL PUSH: Trivial follow-up as caught by jfkthame in post-review comments.
2023-09-16 00:27:30 +02:00
Emilio Cobos Álvarez 6cd30b6fe1 Bug 1853392 - Simplify font-size-adjust: from-font handling. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D188355
2023-09-15 22:17:25 +00:00
Emilio Cobos Álvarez 5bddfadebb Bug 1852084 - Add a -moz-themed(<appearance>) background-image. r=boris
Some appearance values are really just a background.

Being able to draw them using `background-image` instead of appearance
allows us to preserve borders, etc.

Differential Revision: https://phabricator.services.mozilla.com/D187851
2023-09-15 22:16:28 +00:00
Gregory Pappas 4083653f6a Bug 1851097 - Remove layout.css.moz-document.content.enabled pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187349
2023-09-15 18:08:14 +00:00
Emilio Cobos Álvarez 6f915c0111 Bug 1853392 - Be more explicit about the ordering of font properties. r=dshin
This should also do less work, and makes the dependencies more explicit.

Differential Revision: https://phabricator.services.mozilla.com/D188344
2023-09-15 15:38:43 +00:00
Zach Hoffman 2866dc0f33 Bug 1852360 - Remove unneeded TODO r=dshin
Differential Revision: https://phabricator.services.mozilla.com/D188351
2023-09-15 14:49:06 +00:00
Emilio Cobos Álvarez eee14fef6a Bug 1853206 - Fix <svg:text> font unzooming.
Now that we have a proper defined order for these properties, this
uncovered an issue where we were relying on the relative order of the
SMIL override (font-size in this case) and presentational hints
(-x-text-scale), so that the first one got zoomed and then unzoomed to
arrive with the right font-size.

Instead first un-zoom, then apply stuff normally.

MANUAL PUSH: Trivial-ish fix CLOSED TREE.
2023-09-15 13:50:34 +02:00
Emilio Cobos Álvarez a366a1c883 Bug 1853206 - Refactor prioritary property set-up. r=dshin
Instead of cascade groups, track the position in the declaration list of
the small-ish number of prioritary properties, and apply them
out-of-band.

This reduces the amount of cascade groups we need, and makes the amount
of times we need to iterate over the declarations constant.

The DeclarationIndex set-up (having to track the relevant declarations
as needed) is a bit annoying, but is needed to deal with `revert` and
`revert-layer` without exponential time complexity.

Differential Revision: https://phabricator.services.mozilla.com/D188274
2023-09-15 08:44:44 +00:00
David Shin 815cbb0387 Bug 1792501: Part 7 - :has invalidation inside :nth-child(of). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185680
2023-09-14 22:21:26 +00:00
David Shin f19bb58ede Bug 1792501: Part 6 - :has invalidation for :empty and :nth (Without of). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185679
2023-09-14 22:21:26 +00:00
David Shin ff3b1194eb Bug 1792501: Part 5 - :has DOM mutation invalidation. r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185678
2023-09-14 22:21:25 +00:00
David Shin 018c4ad794 Bug 1792501: Part 4 - Basic :has invalidation. r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185677
2023-09-14 22:21:25 +00:00
David Shin aa280d1e29 Bug 1792501: Part 3 - Let :has contribute to dependencies. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185676
2023-09-14 22:21:25 +00:00
David Shin 0dfd1143fd Bug 1792501: Part 2 - Infrastructure for relative selector invalidation. r=emilio
Invalidating a relative selector requires traversal in the opposite direction of
the usual invalidation, i.e. In the directions of ancestor and/or earlier sibling.
However, when there are complex selectors within the relative selector, e.g.
`:has(:is(..) ..)`, we first need to perform invalidation in the usual direction to
reach the relative selector's search space, then perform the relative selector
invalidation.

There are two major changes to this effect:

1. `InvalidationProcessor` has an additional lifetime that separates matching context from
invalidations. This enables storing encountered dependencies (Since we may be in a deep recursion
during the invalidation) to be relative selector invalidated, without requiring that the
matching context live that long.

2. There now exists a separate category for relative selector invalidation depenedencies,
which triggers relative selector invalidation. Dependencies now can be either normal or
relative, since any complex selector inside a relative selector would have normal
dependencies, but with its outer dependency being a relative dependency.

Differential Revision: https://phabricator.services.mozilla.com/D185675
2023-09-14 22:21:25 +00:00
David Shin 4100e7723e Bug 1792501: Part 1 - Mark relative selector search path. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185674
2023-09-14 22:21:24 +00:00
Sandor Molnar 4bd577fefa Backed out 8 changesets (bug 1792501) for causing wpt failures on /css/selectors/...
Backed out changeset 993b0e6567e6 (bug 1792501)
Backed out changeset 7686c9df9ad4 (bug 1792501)
Backed out changeset cf9f855ad80c (bug 1792501)
Backed out changeset 27abe13a5a48 (bug 1792501)
Backed out changeset f708f940e907 (bug 1792501)
Backed out changeset 2a7c57a69803 (bug 1792501)
Backed out changeset 69f1155100f5 (bug 1792501)
Backed out changeset 3f5f59b76a56 (bug 1792501)
2023-09-14 20:08:41 +03:00
Jonathan Kew 0defe56d77 Bug 1852742 - Include 'ex-height in completion keywords for font-size-adjust. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187985
2023-09-14 15:31:46 +00:00
David Shin 85c6ffe7ac Bug 1792501: Part 7 - :has invalidation inside :nth-child(of). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185680
2023-09-14 12:30:57 +00:00
David Shin a1ec796191 Bug 1792501: Part 6 - :has invalidation for :empty and :nth (Without of). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185679
2023-09-14 12:30:56 +00:00
David Shin b2734528a4 Bug 1792501: Part 5 - :has DOM mutation invalidation. r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185678
2023-09-14 12:30:56 +00:00
David Shin a53ddf9908 Bug 1792501: Part 4 - Basic :has invalidation. r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185677
2023-09-14 12:30:56 +00:00
David Shin 63086e5c76 Bug 1792501: Part 3 - Let :has contribute to dependencies. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185676
2023-09-14 12:30:56 +00:00
David Shin ff6e5a74e6 Bug 1792501: Part 2 - Infrastructure for relative selector invalidation. r=emilio
Invalidating a relative selector requires traversal in the opposite direction of
the usual invalidation, i.e. In the directions of ancestor and/or earlier sibling.
However, when there are complex selectors within the relative selector, e.g.
`:has(:is(..) ..)`, we first need to perform invalidation in the usual direction to
reach the relative selector's search space, then perform the relative selector
invalidation.

There are two major changes to this effect:

1. `InvalidationProcessor` has an additional lifetime that separates matching context from
invalidations. This enables storing encountered dependencies (Since we may be in a deep recursion
during the invalidation) to be relative selector invalidated, without requiring that the
matching context live that long.

2. There now exists a separate category for relative selector invalidation depenedencies,
which triggers relative selector invalidation. Dependencies now can be either normal or
relative, since any complex selector inside a relative selector would have normal
dependencies, but with its outer dependency being a relative dependency.

Differential Revision: https://phabricator.services.mozilla.com/D185675
2023-09-14 12:30:55 +00:00
David Shin 7b00e82664 Bug 1792501: Part 1 - Mark relative selector search path. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D185674
2023-09-14 12:30:54 +00:00
Tiaan Louw b52ec06463 Bug 1851370 - Vendor cssparser-color into Gecko r=emilio
To increase the integration between color and calc it is nescessary to
vendor the current cssparser-color library into Gecko where all the calc
functionality lives.

Differential Revision: https://phabricator.services.mozilla.com/D188216
2023-09-14 10:53:03 +00:00
Mike Hommey 6ebb4786a2 Bug 1852208 - Prepare dom and style crates for a switch to a bitflags 2-derived bitflags 1. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D188061
2023-09-14 00:01:42 +00:00
Emilio Cobos Álvarez 87826cbb08 Bug 1851464 - Be explicit about comparing percentages in calc(). r=tlouw
The root cause here is that percentages when mixed with lengths don't
compare / simplify, because the basis might be negative (bug 1709018),
so PartialOrd returns None for them.

When parsing a plain percentage / resolving to a percentage however, we
do want them to resolve. The regressing bug broke that because min > max
etc would effectively return false.

Differential Revision: https://phabricator.services.mozilla.com/D187974
2023-09-13 19:35:20 +00:00
Robert Longson 4a4ce85eea Bug 1287054 part 2 - support vw, vh, vmin and vmax units for non-CSS lengths r=emilio,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D180619
2023-09-12 21:10:55 +00:00
Robert Longson 1516885758 Bug 1287054 part 1 - support rem, ch, ic and cap units for non-CSS lengths r=emilio,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D180618
2023-09-12 21:10:54 +00:00
Emilio Cobos Álvarez 4dfed1f5fa Bug 1852454 - Standardize on ParserContext::chrome_rules_enabled for chrome rules checks. r=boris
This isn't a behavior different in practice, since UA sheets are already
chrome-rules-enabled via this check [1], because they are loaded with
resource:// URIs.

Let's have just one check for chrome rules, which is also cheaper.

In theory someone could load a UA sheet with a data: URI or something,
but that should arguably get all that chrome_rules_enabled powers too.

[1]: https://searchfox.org/mozilla-central/rev/b04a323df47fa71e27734133c16a9cb6525caee4/layout/style/URLExtraData.cpp#33-39

Differential Revision: https://phabricator.services.mozilla.com/D187855
2023-09-12 20:17:09 +00:00
Emilio Cobos Álvarez cf18ae38db Bug 1852568 - Update cssparser. r=tlouw,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D187910
2023-09-12 16:03:44 +00:00
Sandor Molnar 212efc2d8b Backed out 2 changesets (bug 1287054) for causing wpt failures in svg/types/scripted/SVGLength-ch.html CLOSED TREE
Backed out changeset 4cca882e069d (bug 1287054)
Backed out changeset 2f48a6566514 (bug 1287054)
2023-09-12 16:02:43 +03:00
Robert Longson 7b6c56870c Bug 1287054 part 2 - support vw, vh, vmin and vmax units for non-CSS lengths r=emilio,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D180619
2023-09-12 11:45:27 +00:00
Robert Longson 2c9fa6fab2 Bug 1287054 part 1 - support rem, ch, ic and cap units for non-CSS lengths r=emilio,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D180618
2023-09-12 11:45:26 +00:00