Commit graph

15254 commits

Author SHA1 Message Date
Boris Chiou
ed8e803890 Bug 1805727 - Part 5: Support transition-behavior when animation values fall back to discrete. r=emilio
When transition-behavior is allow-discrete, the animation values are
transitionable even if they are not interpoltable, given that the
animation type of the CSS property is by computed value.

Also, we remove `animate()` check from `needs_transitions_update_per_property`.
This check was added for handling the transition between `auto` and
other values long time ago, but now it may be redundant (because we
still pass the tests without it) and we do the same things in
nsTransitionManager as well, so it should be fine to drop it, especially
after we support discrete transitions.

Differential Revision: https://phabricator.services.mozilla.com/D201865
2024-02-23 21:41:49 +00:00
Boris Chiou
79f4455f37 Bug 1805727 - Part 4: Implement transition-behavior for properties with discrete animation type. r=emilio
The implementation is straight-forward. We have to check
if `transition-behavior` is `allow-discrete` when trying to create a new
transition and when checking if we have to cancel a running transition.

Also, the test case is out-of-date, so I tweak it a little bit and add
more general test cases for transtiion-behavior. Besides, I enable the
preference in the WPT folders which use `transition-behavior` (but
those tests may be passed already or failed due to reasons other than
`transition-behavior`).

Differential Revision: https://phabricator.services.mozilla.com/D201864
2024-02-23 21:41:49 +00:00
Boris Chiou
e40e3017a3 Bug 1805727 - Part 2: Add transition-behavior to transition shorthand in style. r=emilio
Per spec, we put `transition-behavior` last in `transition`.

https://drafts.csswg.org/css-transitions-2/#transition-shorthand-property

Differential Revision: https://phabricator.services.mozilla.com/D200409
2024-02-23 21:41:48 +00:00
Boris Chiou
9f6a2b2041 Bug 1805727 - Part 1: Support transition-behavior longhand in style. r=emilio
Add transition-behavior longhand property. This doesn't include layout
animation support.

Differential Revision: https://phabricator.services.mozilla.com/D200408
2024-02-23 21:41:48 +00:00
sunil mayya
022e5ba65d Bug 1864817 - initialize STYLE_THREAD_POOL in Sevo_initialize. r=emilio,jesup
Differential Revision: https://phabricator.services.mozilla.com/D201022
2024-02-22 10:43:49 +00:00
Emilio Cobos Álvarez
47165ebb0f Bug 1868316 - Remove user-find, make inert not findable. r=dholbert
As per the HTML spec.

Differential Revision: https://phabricator.services.mozilla.com/D201906
2024-02-16 20:18:06 +00:00
Forrest Walker
747be92315 Bug 1876713 - Remove layout.css.overflow-overlay.enabled pref. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D201762
2024-02-14 17:41:49 +00:00
David Shin
7290a1e9fe Bug 1876962: Part 3 - Remove special case handling for :has in style sharing. r=firefox-style-system-reviewers,emilio
Was added in bug 1793012. No longer needed since `:has` is part of
reinvalidation selectors now. The new approach can be potentially-
pricey, but is a lot simpler.

Differential Revision: https://phabricator.services.mozilla.com/D200224
2024-02-12 14:42:08 +00:00
David Shin
f151ebfb32 Bug 1876962: Part 2 - Add :has to revalidation selector. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D200223
2024-02-12 14:42:07 +00:00
David Shin
7865ac1401 Bug 1876962: Part 1 - Fix up logic for determining Rightmost in matches_selector. r=firefox-style-system-reviewers,emilio
Would generate invalid results `:has()` selector if it's in the subject
compound but also uses a pseudo-selector (e.g. `.foo:has(.bar)::after`).

Also rename `Rightmost` to `SubjectOrPseudoElement` to more accurately
describe what it indicates.

Differential Revision: https://phabricator.services.mozilla.com/D200222
2024-02-12 14:42:07 +00:00
Emilio Cobos Álvarez
9013524d23 Bug 1879743 - Rewrite custom property substitution to avoid re-tokenization. r=zrhoffman,firefox-style-system-reviewers
This speeds up custom variable substitution by avoiding re-tokenizing,
and variable reference parsing by avoiding doing duplicate work.

This is a very noticeable improvement in the NewsSite subtests of
speedometer 3 (see comparison posted in bug 1879318 and the #perf-sp3
matrix channel). But it also probably helps most websites using lots of
variables, and the browser UI itself.

Finally, it also avoids some duplication. Now regular substitution and
fallback substitution is handled uniformly, which causes a progression
in some properties-and-values tests.

Differential Revision: https://phabricator.services.mozilla.com/D201116
2024-02-11 15:23:22 +00:00
Emilio Cobos Álvarez
5c2db164a2 Bug 1879318 - Store custom property references in a list. r=zrhoffman,firefox-style-system-reviewers
This is a preliminary patch to keep all references (even duplicates), in
order to speed up substitution by avoiding re-tokenizing.

The assumption is that referencing the same variable multiple times
on the declaration is not common, and thus it's not a big deal to
optimize for that.

Differential Revision: https://phabricator.services.mozilla.com/D201082
2024-02-10 16:57:40 +00:00
Sandor Molnar
032ee988a6 Backed out changeset 0cf3688e2bcf (bug 1879286) for causing mochitest failures at layout/inspector/tests/test_getRegisteredCustomProperties.html CLOSED TREE 2024-02-08 18:49:48 +02:00
Nicolas Chevobbe
2e5692b983 Bug 1879286 - [devtools] Return registered propertly location in InspectorUtils::GetCSSRegisteredProperties. r=emilio.
Differential Revision: https://phabricator.services.mozilla.com/D201059
2024-02-08 13:30:45 +00:00
Emilio Cobos Álvarez
0d81741c6d Bug 1874488 - Make Element.{client,scroll} APIs zoom aware. r=saschanaz,TYLin
Also extend scroll-zoom to cover scroll{Top,Left,To,By}, since that was
completely untested.

Differential Revision: https://phabricator.services.mozilla.com/D200029
2024-02-08 11:13:01 +00:00
Iulian Moraru
fd7cec7036 Backed out 3 changesets (bug 1874488) for causing multiple failures. CLOSED TREE
Backed out changeset 467c5213a79a (bug 1874488)
Backed out changeset 13da2be03857 (bug 1874488)
Backed out changeset 974683909782 (bug 1874488)
2024-02-08 01:29:54 +02:00
Emilio Cobos Álvarez
3f6f4db1d8 Bug 1874488 - Make Element.{client,scroll} APIs zoom aware. r=saschanaz,TYLin
Also extend scroll-zoom to cover scroll{Top,Left,To,By}, since that was
completely untested.

Differential Revision: https://phabricator.services.mozilla.com/D200029
2024-02-07 21:30:36 +00:00
Emilio Cobos Álvarez
47f4e65f6e Bug 1879162 - Rustfmt recent changes. r=firefox-style-system-reviewers,zrhoffman
Differential Revision: https://phabricator.services.mozilla.com/D200997
2024-02-07 21:28:58 +00:00
Emilio Cobos Álvarez
a528778e6f Bug 1879162 - Avoid Option<&PropertyRegistration>. r=firefox-style-system-reviewers,zrhoffman
Inherited properties with universal syntax and unregistered properties should
behave basically the same.

This removes some redundant checks and guarantees that we have the same
code-paths in those two cases.

Differential Revision: https://phabricator.services.mozilla.com/D200995
2024-02-07 21:28:57 +00:00
Emilio Cobos Álvarez
99360600f0 Bug 1879162 - Deduplicate a bit custom property cascade. r=firefox-style-system-reviewers,zrhoffman
Reduce the amount of times we need to manually call the custom property
registration code by handling values with and without references in the same
function.

Differential Revision: https://phabricator.services.mozilla.com/D200993
2024-02-07 21:28:57 +00:00
Robert Longson
a7ad3a40ea Bug 1302722 Part 2 - support SVG properties on first-letter and first-line r=jfkthame,emilio
Differential Revision: https://phabricator.services.mozilla.com/D200596
2024-02-07 13:59:19 +00:00
Robert Longson
677d79495f Bug 1302722 Part 1 - clean up spec references r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D200595
2024-02-07 13:59:19 +00:00
Oriol Brufau
76733658aa Bug 1867565 - Fix mod() and rem() never returning -0. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D199943
2024-02-07 12:09:05 +00:00
Emilio Cobos Álvarez
b59516559d Bug 1876541 - Zoom should affect intrinsic replaced element size. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D199990
2024-02-07 09:51:52 +00:00
Boris Chiou
2fbee88d6d Bug 1878758 - Follow shortest serialization principle for transition shorthand. r=zrhoffman
Per https://github.com/web-platform-tests/wpt/issues/43574, we should
follow the shortest serialization principle for `transition` shorthand.

Differential Revision: https://phabricator.services.mozilla.com/D200410
2024-02-06 22:29:33 +00:00
Emilio Cobos Álvarez
9e22724a11 Bug 1877663 - Don't special-case adwaita colors for the yaru theme. r=stransky
Older versions of the yaru theme had dark titlebars even in light mode
(like yaru-remix).

Instead of getting into the version-detection business, just don't
override with the Adwaita colors.

Differential Revision: https://phabricator.services.mozilla.com/D200362
2024-02-02 10:31:02 +00:00
Emilio Cobos Álvarez
b59c93386c Bug 1868316 - Prototype a user-find css property to control findability of text. r=jfkthame
Nightly-only for now waiting on CSSWG discussion.

Differential Revision: https://phabricator.services.mozilla.com/D199727
2024-02-02 09:45:45 +00:00
Tiaan Louw
dc70568658 Bug 1812629 - Remove more_color_4 pref r=emilio,layout-reviewers
Remove the pref that enables additional color-4 colors.

Differential Revision: https://phabricator.services.mozilla.com/D167957
2024-02-01 10:40:38 +00:00
Connor Pearson
3b3b17423c Bug 1867569 - Consider signed zeroes in min(), max() and clamp(). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D195180
2024-01-31 22:29:10 +00:00
Emilio Cobos Álvarez
f9f5d323e0 Bug 1877389 - Simplify Servo static atom setup. r=glandium,firefox-style-system-reviewers,zrhoffman
We hopefully don't hit bug 1517685 again.

Differential Revision: https://phabricator.services.mozilla.com/D199971
2024-01-30 23:30:31 +00:00
Mike Hommey
fb2aa57149 Bug 1874035 - Add custom Debug derives for bitflags with custom derives. r=gfx-reviewers,emilio,ErichDonGubler
bitflags 2 has a shortcoming with using custom derives: you can't use
custom derives (for e.g. MallocSizeOf) at the same time as bitflags's for
the derives it supports.
See https://github.com/bitflags/bitflags/issues/395

Differential Revision: https://phabricator.services.mozilla.com/D199941
2024-01-30 21:13:29 +00:00
Boris Chiou
60e44a0ffc Bug 1872309 - Specialize Procedure::Add for rotate property. r=zrhoffman
Slerp doesn't work well if the sum of `this_weight` and `other_weight` is
larger than 1.0. This may produces a cosine value out of the range.
Therefore, we use the combined transform list, which rely on matrix
multiplication, to compute Procedure::Add. And then decompose it to get the
final quaternion vector.
https://drafts.csswg.org/css-transforms-2/#combining-transform-lists

Differential Revision: https://phabricator.services.mozilla.com/D199678
2024-01-29 19:31:50 +00:00
Emilio Cobos Álvarez
84582c3f1b Bug 1877002 - Detect the yaru-remix theme, to avoid applying the yaru overrides there. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D199854
2024-01-29 14:50:36 +00:00
Jonathan Kew
16f020d34a Bug 1758391 - Rename text-wrap to text-wrap-style, and create the text-wrap shorthand. r=firefox-style-system-reviewers,emilio
This depends on having `text-wrap-mode`, introduced in bug 1852478 as part of
turning `white-space` into a shorthand.

Differential Revision: https://phabricator.services.mozilla.com/D198791
2024-01-26 09:40:03 +00:00
Jonathan Kew
5741b2b190 Bug 1852478 - Convert CSS white-space into a shorthand that expands to white-space-collapse and text-wrap-mode longhands. r=firefox-style-system-reviewers,emilio
Note that although this builds, it would (by itself) result in some test breakage;
this is resolved in the following patches that build on this.

Differential Revision: https://phabricator.services.mozilla.com/D198790
2024-01-26 09:40:02 +00:00
Cristian Tuns
f0be219b00 Backed out 4 changesets (bug 1758391, bug 1852478) for causing build bustages in UseCounterMetrics.cpp CLOSED TREE
Backed out changeset fe673f87d86a (bug 1852478)
Backed out changeset d466ccbd1aad (bug 1852478)
Backed out changeset c0fa98fec39a (bug 1758391)
Backed out changeset 04d322f23fd0 (bug 1852478)
2024-01-25 18:29:39 -05:00
Jonathan Kew
b53d8d1aec Bug 1758391 - Rename text-wrap to text-wrap-style, and create the text-wrap shorthand. r=firefox-style-system-reviewers,emilio
This depends on having `text-wrap-mode`, introduced in bug 1852478 as part of
turning `white-space` into a shorthand.

Differential Revision: https://phabricator.services.mozilla.com/D198791
2024-01-25 22:20:05 +00:00
Jonathan Kew
2cd3b24544 Bug 1852478 - Convert CSS white-space into a shorthand that expands to white-space-collapse and text-wrap-mode longhands. r=firefox-style-system-reviewers,emilio
Note that although this builds, it would (by itself) result in some test breakage;
this is resolved in the following patches that build on this.

Differential Revision: https://phabricator.services.mozilla.com/D198790
2024-01-25 22:20:05 +00:00
Emilio Cobos Álvarez
dcf8ed8dd6 Bug 1876266 - Do less work on the ConsiderInitiatingTransition loop. r=firefox-style-system-reviewers,zrhoffman
Differential Revision: https://phabricator.services.mozilla.com/D199483
2024-01-24 23:08:51 +00:00
Emilio Cobos Álvarez
4d92ef6cda Bug 1869185 - Various clean-ups and fixes on top of the previous patch. r=zrhoffman,firefox-style-system-reviewers
* Move the manual code outside the auto-generated animated_properties
   file.

 * Treat unregistered custom properties and universal-syntax properties
   the same.

 * A void a bunch of copy-pasta and extra unnecessary clone() calls.

 * Fix animations with mismatched multipliers, custom property names,
   etc. This isn't really testable, since afaict you can't create such
   an animation (maybe if you override the registration dynamically?),
   but seems better for consistency.

Differential Revision: https://phabricator.services.mozilla.com/D199365
2024-01-24 10:23:23 +00:00
Ziran Sun
cb046dd208 Bug 1869185 - Add initial interpolating animation support for registered custom properties. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D198004
2024-01-24 10:23:22 +00:00
David Shin
72683f0aec Bug 1875673: Do not prevent early substitution of for non-registered or registered non-length variables when they reference font-relative properties. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D199239
2024-01-23 14:03:56 +00:00
Narcis Beleuzu
3b47d28f1e Backed out 4 changesets (bug 1758391, bug 1852478) for failures on test_animation-type-longhand.html . CLOSED TREE
Backed out changeset d6a8b0b97282 (bug 1852478)
Backed out changeset fef9fcec3afc (bug 1852478)
Backed out changeset 01711557e2bf (bug 1758391)
Backed out changeset 8c8a01dbca12 (bug 1852478)
2024-01-22 16:37:15 +02:00
Jonathan Kew
5b0a5a22f6 Bug 1758391 - Rename text-wrap to text-wrap-style, and create the text-wrap shorthand. r=firefox-style-system-reviewers,emilio
This depends on having `text-wrap-mode`, introduced in bug 1852478 as part of
turning `white-space` into a shorthand.

Differential Revision: https://phabricator.services.mozilla.com/D198791
2024-01-22 12:57:55 +00:00
Jonathan Kew
5f45c5f18d Bug 1852478 - Convert CSS white-space into a shorthand that expands to white-space-collapse and text-wrap-mode longhands. r=firefox-style-system-reviewers,emilio
Note that although this builds, it would (by itself) result in some test breakage;
this is resolved in the following patches that build on this.

Differential Revision: https://phabricator.services.mozilla.com/D198790
2024-01-22 12:57:54 +00:00
Zach Hoffman
f775a9010a Bug 1856522 - Remove unneeded TODOs for bug 1856522 r=firefox-style-system-reviewers,emilio
Dependencies between custom properties and font-* properties are
resolved in bug 1855110, so these TODOs for bug 1856522 can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D199208
2024-01-22 11:02:57 +00:00
David Shin
09843d679b Bug 1875348: Provide correct offset into matches_compound_selector_from in :has optimization path. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D199011
2024-01-19 14:52:50 +00:00
David Shin
fcb7e5d6e5 Bug 1875081: Early reject :has that anchors don't match the outer selector. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D198982
2024-01-19 14:52:44 +00:00
Makoto Kato
34342fa8e7 Bug 1847521 - Replace unicode-segmentation with ICU4X in servo. r=firefox-style-system-reviewers,emilio
Now we uses two crates for unicode segmentation, let's replace with ICU4X.

Differential Revision: https://phabricator.services.mozilla.com/D198131
2024-01-18 02:29:19 +00:00
Emilio Cobos Álvarez
1d09fcd2a3 Bug 1875079 - Always enable css zoom in chrome pages. r=saschanaz
Without this beta simulation jobs will fail with the previous patches.

Differential Revision: https://phabricator.services.mozilla.com/D198827
2024-01-17 16:52:14 +00:00