Commit Graph

14949 Commits

Author SHA1 Message Date
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
Emilio Cobos Álvarez
162e1a954d Bug 1852084 - Cleanup image function parsing. r=boris
Depends on D187765

Differential Revision: https://phabricator.services.mozilla.com/D187850
2023-09-12 07:50:13 +00:00
Stanca Serban
515e5875fe Backed out 2 changesets (bug 1287054) for causing Android wpt failures in SVGLength-ch.html. CLOSED TREE
Backed out changeset fc8eaef017f9 (bug 1287054)
Backed out changeset 8a94c155e35c (bug 1287054)
2023-09-12 06:54:17 +03:00
Robert Longson
4f727e058f 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-11 23:50:12 +00:00
Robert Longson
02d333f185 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-11 23:50:11 +00:00
Boris Chiou
024f384522 Bug 1850841 - Tweak the formula of computing the ratio of quaternionA in Slerp algorithm. r=emilio
When the progress is 100%, the result from the original formula of calculating
`left_weight` may not be 0 exactly (i.e. approximate zero, e.g. -2.22e-16), and
so this imprecision makes the recomposed Matrix3D have some approximate zeros.

Those approximate zeros (e.g. `_m13` is 2e-16, and `_m23` is 8e-17 in WPT)
make us failed to treat this Matrix3D as a 2D matrix when we serializing it
(because we use `!= 0.0f` to check if the matrix components are not equal to
zero in `Matrix4x4::Is2D()`, and other places).

Differential Revision: https://phabricator.services.mozilla.com/D187814
2023-09-11 20:17:51 +00:00
Stanca Serban
3cf3fd0c79 Backed out 2 changesets (bug 1287054) for causing build bustages in SVGAnimatedLength.cpp. CLOSED TREE
Backed out changeset 5158484e9eab (bug 1287054)
Backed out changeset 35034282dc7c (bug 1287054)
2023-09-11 23:22:43 +03:00
Robert Longson
25ce5c7db4 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-11 18:20:19 +00:00
Robert Longson
6896343e9f 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-11 18:20:18 +00:00
Mike Hommey
5384d789bb Bug 1852201 - Downgrade bitflags in the dom and style crates. r=emilio
This undoes bug 1835681, adjusting for changes that happened since then,
because the crates don't build with the real bitflags 2, and there are
some challenges to make them work with the real bitflags 2.

Differential Revision: https://phabricator.services.mozilla.com/D187748
2023-09-10 22:27:26 +00:00
Zach Hoffman
8928b07f4f Bug 1846628 - [css-properties-values-api] Add computed value-time validation for fallbacks r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187531
2023-09-09 02:02:54 +00:00
Zach Hoffman
dce9257eaa Bug 1846628 - [css-properties-values-api] Add computed value-time validation r=emilio
Computed value-time validation for fallback values is added in a later
patch.

Bug 1852360 is opened for computed value-time validation for properties
that contain references.

Differential Revision: https://phabricator.services.mozilla.com/D186997
2023-09-09 01:39:48 +00:00
Zach Hoffman
a4592ed7e4 Bug 1850370 - [css-properties-values-api] Pass stylist to substitute_block r=zsun,emilio
This will be used in order to perform computed value-time validation.

Differential Revision: https://phabricator.services.mozilla.com/D186966
2023-09-09 01:08:04 +00:00
Zach Hoffman
a9a671d58b Bug 1850370 - [css-properties-values-api] Add stylist to custom properties context r=zsun,emilio
This is necessary in order to pass the stylist to substitute_block.

Differential Revision: https://phabricator.services.mozilla.com/D186965
2023-09-09 00:56:48 +00:00
Logan Rosen
f024d94b2b Bug 1786490 - reformat the tree using black 23.3.0 r=sylvestre,webdriver-reviewers,taskgraph-reviewers,whimboo,jmaher,ahal,perftest-reviewers,geckoview-reviewers,afinder,m_kato
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D186092
2023-09-06 16:14:30 +00:00
Emilio Cobos Álvarez
726f71faf3 Bug 1850827 - Simplify how we draw window decorations. r=stransky,rmader,desktop-theme-reviewers,dao
This makes the rounded bottom corners work on X11, and makes the top
corner drawing less insane.

Differential Revision: https://phabricator.services.mozilla.com/D187345
2023-09-06 11:07:58 +00:00
Boris Chiou
00c109f7d0 Bug 1838106 - Use approx_eq() to compare two direction vectors. r=dholbert
Basically, if two normalized direction vectors are the same, we do
interpolation on the angle only. However, after normalization, there may
be some differences because of the floating-point precision, even though
these two vectors have the same direction. Therefore we have to add an
tolerance when comparing them.

Differential Revision: https://phabricator.services.mozilla.com/D187153
2023-09-05 22:52:13 +00:00
Emilio Cobos Álvarez
884175baf6 Bug 1850827 - Implement rounded bottom corners in GTK. r=rmader
The implementation is uglier than it needs to be. We basically need to
override the GTK styles for the window decorations with the desired
radius.

This is because of two reasons:

 * Adwaita on gtk3 doesn't provide a bottom corner radius.
 * Even if it did we couldn't reasonably query it, see comment 4.

So in order for stuff to look sensible we need to make sure that we and
GTK agree on what radius to use. Using the titlebar radius makes sense
here.

Differential Revision: https://phabricator.services.mozilla.com/D187343
2023-09-05 18:07:08 +00:00
Emilio Cobos Álvarez
5c0f63af95 Bug 1851649 - Simplify and speed-up display parsing. r=mstange
This avoids uselessly rewinding the parser for single-keyword display
values, and generally makes the code easier to follow.

Differential Revision: https://phabricator.services.mozilla.com/D187431
2023-09-05 17:44:09 +00:00
Gregory Pappas
010e86db22 Bug 1851098 - Remove layout.css.page-size.enabled pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187348
2023-09-04 18:11:43 +00:00
Gregory Pappas
6ff411a901 Bug 1851093 - Remove layout.css.font-metrics-overrides.enabled pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187351
2023-09-04 16:02:13 +00:00
Gregory Pappas
119bfeb092 Bug 1842480 - Remove layout.css.overflow-logical.enabled pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187352
2023-09-03 16:58:12 +00:00
Gregory Pappas
f1f85c22d5 Bug 1851096 - Remove layout.css.hyphenate-character.enabled pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187314
2023-09-02 15:24:55 +00:00
Gregory Pappas
9975f85dbe Bug 1842503 - Remove layout.css.scrollbar-gutter.enabled pref r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D187252
2023-09-02 02:18:41 +00:00
Boris Chiou
8828547018 Bug 1737209 - Fix the conversion from (axis,angle) pair to the quaternion vector. r=emilio
Basically, quaternion vectors make sense only when the rotation is within
(-360deg, 360deg). If its angle is larger than or equal to 360deg, its
direction may be different, so we have to tweak the conversion.

Also, tweak the code of interpolation for rotate3D to match the spec and
put more comments there.

Differential Revision: https://phabricator.services.mozilla.com/D186998
2023-09-01 20:15:51 +00:00
Boris Chiou
503c205902 Bug 1737209 - Remove unused functions of decomposing 2d and 3d matrix. r=zrhoffman
We keep these functions because we used them for compositor animations before
merging stylo. Now we always use the equivalent rust version for all the
transform interpolation, on both the main thread and the compositor thread.

Differential Revision: https://phabricator.services.mozilla.com/D187072
2023-09-01 20:15:51 +00:00
Jonathan Kew
66cb47bdc1 Bug 1850170 - Don't use negate-values-and-swap-bounds to negate CSS clamp() when min > max, because the result is order-dependent. r=emilio
This fixes the incorrect result when negating a clamp() where the min value is greater than max.
Added some extra tests to clamp-length-computed.html; the last example fails in Gecko without
the patch here.

Differential Revision: https://phabricator.services.mozilla.com/D187113
2023-08-31 11:27:16 +00:00
Emilio Cobos Álvarez
3d98cc8260 Bug 1850342 - Do not expose :-moz-broken to content. r=boris
This is not standard, and we don't use it internally (some chrome
stylesheets use it tho).

In the past this pseudo-class was more useful because it matched the
state for which <img> elements used an inline, but that's no longer
true, see bug 1196668 and co.

Depends on D186938

Differential Revision: https://phabricator.services.mozilla.com/D186939
2023-08-30 12:06:41 +00:00
Emilio Cobos Álvarez
6070e00f0a Bug 1850342 - Remove non-standard, un-tested :-moz-loading pseudo-class. r=layout-reviewers,jfkthame
This is technically web-exposed, but if we needed to introduce it for
compat we could always re-introduce it matching false.

Differential Revision: https://phabricator.services.mozilla.com/D186938
2023-08-30 10:38:52 +00:00
Emilio Cobos Álvarez
848f2d7c33 Bug 1850414 - Simplify style sheet source-map URL code. r=layout-reviewers,firefox-style-system-reviewers,webidl,smaug,boris
The old code was basically doing string copies that are totally
redundant, in a not-very performant way too.

This was from the time where stylo had to live with the old style
engine, and there's no need to keep the copy around anymore.

Differential Revision: https://phabricator.services.mozilla.com/D186974
2023-08-30 09:27:06 +00:00
Iulian Moraru
9a9b90c906 Backed out changeset f0edb489e577 (bug 1850342) for causing dt failures on browser_rules_inactive_css_visited.js. CLOSED TREE 2023-08-30 01:24:44 +03:00
Emilio Cobos Álvarez
afdec6f2a3 Bug 1850342 - Remove non-standard, un-tested :-moz-loading pseudo-class. r=layout-reviewers,jfkthame
This is technically web-exposed, but if we needed to introduce it for
compat we could always re-introduce it matching false.

Differential Revision: https://phabricator.services.mozilla.com/D186938
2023-08-29 20:57:30 +00:00
Cosmin Sabou
5b129b77c5 Backed out changeset f14569b8319b (bug 1850342) for causing dt failures on browser_rules_inactive_css_visited.js. CLOSED TREE 2023-08-29 21:14:42 +03:00
David Shin
04b9d09912 Bug 1819453: Remove pref for linear easing function. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D186537
2023-08-29 17:55:40 +00:00