Commit Graph

11471 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
cb06f25a7a Bug 1913322 - Make arrowscrollbox use resizeobserver rather than overflow/underflow events. r=Gijs,dao,desktop-theme-reviewers,tabbrowser-reviewers,frontend-codestyle-reviewers
For that, make the <slot> have a box. Keep firing the overflow /
underflow events, but only in cases relative to the arrowScrollbox.

Remove unneeded scrollbox-clip box, and replace it by
`overflow-clip-box-block: content-box` in the only place that we make
the scrollbox grow.

Differential Revision: https://phabricator.services.mozilla.com/D219249
2024-08-20 12:58:16 +00:00
Emilio Cobos Álvarez
3b3eb8622a Bug 1911353 - Unify how we reject !important in keyframe and @position-try. r=dshin
This was more the kind of thing I meant, and allows us to get rid of the
keyframe-rule-specific parser.

Differential Revision: https://phabricator.services.mozilla.com/D218488
2024-08-16 13:14:05 +00:00
David Shin
a0699de833 Bug 1900233: Disallow custom property and important declarations in @position-try. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D217629
2024-08-16 13:14:05 +00:00
David Shin
672b87571d Bug 1909346: Implement CSSPositionTryRule interface. r=firefox-style-system-reviewers,webidl,emilio
Differential Revision: https://phabricator.services.mozilla.com/D217627
2024-08-16 13:14:04 +00:00
David Shin
ff89ee474b Bug 1900233: Implement parsing @position-try rule. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D217626
2024-08-16 13:14:04 +00:00
Emilio Cobos Álvarez
15f82cdb29 Bug 1913459 - More inline declarations. r=firefox-style-system-reviewers,boris
This helps some speedometer subtests, 32 declarations is not really
that uncommon.

Differential Revision: https://phabricator.services.mozilla.com/D219330
2024-08-16 12:58:03 +00:00
Emilio Cobos Álvarez
b0608ef1b9 Bug 1913104 - Remove X11 mask code. r=stransky,desktop-theme-reviewers,dao
It's only used in non-compositing WMs, to implement popup transparency,
and it's completely untested.

Instead, do not draw shadows and rounded corners on those WMs.

Differential Revision: https://phabricator.services.mozilla.com/D219141
2024-08-16 12:48:28 +00:00
Jonathan Watt
17dfe4673b Bug 1909358. Rename inset-area to position-area. r=dshin
Differential Revision: https://phabricator.services.mozilla.com/D219225
2024-08-15 11:30:12 +00:00
David Shin
3c9904dfa9 Bug 1913256: Fix up documentation on parse_is_and_where. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D219214
2024-08-15 09:38:50 +00:00
Norisz Fay
d9e5dbdd0b Backed out 5 changesets (bug 1900233, bug 1911353, bug 1909346) for causing mochitest failures on test_property_syntax_errors.html CLOSED TREE
Backed out changeset e19f73882313 (bug 1911353)
Backed out changeset da10b514e301 (bug 1900233)
Backed out changeset a806c12d47f9 (bug 1909346)
Backed out changeset 46695f2f204a (bug 1909346)
Backed out changeset 82856fd84c5a (bug 1900233)
2024-08-15 04:58:45 +03:00
Emilio Cobos Álvarez
2c8bd9301d Bug 1911353 - Unify how we reject !important in keyframe and @position-try. r=dshin
This was more the kind of thing I meant, and allows us to get rid of the
keyframe-rule-specific parser.

Differential Revision: https://phabricator.services.mozilla.com/D218488
2024-08-14 23:26:14 +00:00
David Shin
b177384e6e Bug 1900233: Disallow custom property and important declarations in @position-try. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D217629
2024-08-14 23:26:14 +00:00
David Shin
d06e12ef20 Bug 1909346: Implement CSSPositionTryRule interface. r=firefox-style-system-reviewers,webidl,emilio
Differential Revision: https://phabricator.services.mozilla.com/D217627
2024-08-14 23:26:13 +00:00
David Shin
c93730502a Bug 1900233: Implement parsing @position-try rule. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D217626
2024-08-14 23:26:13 +00:00
Emilio Cobos Álvarez
1111b564f7 Bug 1912663 - Fix some build issues with cbindgen 0.27. r=firefox-style-system-reviewers,zrhoffman
It updates serde and syn and they are more strict. In particular, syn 2
doesn't parse the rust 2015 syntax where try is not a keyword, and serde
rejects duplicate keys.

Differential Revision: https://phabricator.services.mozilla.com/D219025
2024-08-11 15:12:29 +00:00
Boris Chiou
9ca59b79d4 Bug 1804574 - Part 1: Add auto to animation-duration longhand. r=firefox-style-system-reviewers,layout-reviewers,emilio
Also, in order to backwards-compatibility with Level 1, we have to
serialize auto as 0s for getComputedStyle in some cases, which depend on
the value of animation-timeline.

Differential Revision: https://phabricator.services.mozilla.com/D217871
2024-08-06 18:23:14 +00:00
Narcis Beleuzu
0c2b24def6 Backed out 5 changesets (bug 1909346, bug 1911353, bug 1900233) for Bp bustages on ServoStyleSet.cpp . CLOSED TREE
Backed out changeset f6e3cddaa98e (bug 1911353)
Backed out changeset d8ec18178fed (bug 1900233)
Backed out changeset f6e45aa1a0f9 (bug 1909346)
Backed out changeset 7903b612930c (bug 1909346)
Backed out changeset c400d8d1a91f (bug 1900233)
2024-08-06 21:34:13 +03:00
David Shin
07b4256f45 Bug 1908279: Let the @scope root search cross the shadow boundary if ::part selector is used. r=firefox-style-system-reviewers,emilio
This allows the scope search to extend beyond the shadow tree the element
is in any number of times, which is required to get to the DOM tree defining
the `::part` selector in question. If any shadow DOM tree in the chain does not
use `exportparts`, it is rejected when the style rule selector is matched.

Differential Revision: https://phabricator.services.mozilla.com/D218256
2024-08-06 17:00:37 +00:00
Emilio Cobos Álvarez
ceee51c87e Bug 1911353 - Unify how we reject !important in keyframe and @position-try. r=dshin
This was more the kind of thing I meant, and allows us to get rid of the
keyframe-rule-specific parser.

Differential Revision: https://phabricator.services.mozilla.com/D218488
2024-08-06 16:59:28 +00:00
David Shin
514d497408 Bug 1900233: Disallow custom property and important declarations in @position-try. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D217629
2024-08-06 16:59:28 +00:00
David Shin
9287ae6a8f Bug 1909346: Implement CSSPositionTryRule interface. r=firefox-style-system-reviewers,webidl,emilio
Differential Revision: https://phabricator.services.mozilla.com/D217627
2024-08-06 16:59:27 +00:00
David Shin
c810a2e5b0 Bug 1900233: Implement parsing @position-try rule. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D217626
2024-08-06 16:59:26 +00:00
Emilio Cobos Álvarez
51a726704e Bug 1909165 - Fix a warning that causes bustages.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2024-08-01 20:12:58 +02:00
Emilio Cobos Álvarez
d0777581fa Bug 1909165 - Implement Hash for OwnedSlice and ArcSlice. r=mrobinson,firefox-style-system-reviewers,zrhoffman
And use derive for font-family instead.

Differential Revision: https://phabricator.services.mozilla.com/D218335
2024-08-01 17:14:04 +00:00
Martin Robinson
c1736ef83e Bug 1909165 - Make more stylo code Gecko-specific at compile-time r=emilio
Guard some Gecko-specific code in stylo at compile-time. The goal is to
reduce these as much as possible as Servo gains new features, but some
of these guards prevent compilation failure when trying to use
Gecko-only data structures.

Differential Revision: https://phabricator.services.mozilla.com/D217563
2024-08-01 15:30:47 +00:00
Daniel Holbert
a8c637281f Bug 1909773 part 4: Add support for '-webkit-fill-available' as an alias for the CSS 'stretch' behavior (off-by-default for now). r=emilio
Both '-webkit-fill-available' and 'stretch' are equivalent to '-moz-available'
at this point in the patch series, and both are off-by-default, because
actually supporting them would require that we add special logic to handle them
as block-axis sizes (which I'll do in a separate bug).

Differential Revision: https://phabricator.services.mozilla.com/D217687
2024-07-25 18:18:24 +00:00
Daniel Holbert
6bdbaba6b7 Bug 1909773 part 3: Add off-by-default support for the CSS 'stretch' sizing keyword, just matching the behavior of '-moz-available' for now. r=emilio
This patch is intended to be mechanical, just adding the new keyword as an
alias for the existing behavior, basically.

In a later bug, 'stretch' will gain additional capabilities before we enable
the pref.  After that, I intend to ultimately make '-moz-available' an alias of
'stretch', assuming that doing so is web-compatible.

Differential Revision: https://phabricator.services.mozilla.com/D217686
2024-07-25 18:18:24 +00:00
Emilio Cobos Álvarez
f49da1c698 Bug 1909153 - Fix interaction of transitions and zoom. r=firefox-style-system-reviewers,layout-reviewers,boris
The main issue here is that we transition the zoomed value, which is
generally wrong because the animated value gets injected back into the
cascade (and thus zoomed again).

We happen to cancel the transition in [1], which is kinda nice because
otherwise we would've just transitioned to a completely wrong value (and
maybe indefinitely, since values would keep getting bigger and
bigger...).

We need to do something similar to to_resolved_value, and unzoom lengths
in to_animated_value, that is, interpolate "unzoomed" values.

The extra test to test_transitions_per_property caught some existing
issues with calc() and zoom which are fixed too for the test to pass.

Same for the ToResolvedValue for Au, that is needed for properties like
column-rule-width to return the correct resolved values.

Main thing I left unfixed is bug 1909280, but that deserves a more
subtle test and a bit more thought because only matrix components need
to be zoomed.

While at it, I simplified the animation setup a little bit, removing the
special animation_value_type="ComputedValue", which means that we need
to add a few ToAnimatedValue calls.

Now the only values are "none", "discrete", and "normal", and given it's
not a value type anymore I called it just "animation_type".

This got a bit bigger than I would've liked, but also it fixes more bugs
that what I was originally expecting, so... :)

[1]: https://searchfox.org/mozilla-central/rev/5756c5a3dea4f2896cdb3c8bb15d0ced5e2bf690/layout/style/nsTransitionManager.cpp#168-171

Differential Revision: https://phabricator.services.mozilla.com/D217308
2024-07-23 21:54:01 +00:00
Boris Chiou
1be62642df Bug 1908819 - Add the tentative serialization for animation shorthand. r=firefox-style-system-reviewers,layout-reviewers,emilio
In order to avoid this unexpected fail, we add this tentative
serialization for animation shorthand.
1. animation-timeline is reset-only in this shorthand, so we don't parse
   it and we reset it to `vec![auto]`.
2. we don't serialize the shorthand if animation-timeline is not the initial
   value.

This is a tentative solution and we should update it with the new syntax
once the spec gets update (https://github.com/w3c/csswg-drafts/issues/6946).

Differential Revision: https://phabricator.services.mozilla.com/D217164
2024-07-22 22:47:31 +00:00
Martin Robinson
abe042ac45 Bug 1908914 - Remove more Servo specific code from Stylo r=emilio
- Allow animating DropShadow
- Make the Servo ListStyleType interface more similar to Gecko's
- Implement more of `text-decoration`

Differential Revision: https://phabricator.services.mozilla.com/D217152
2024-07-22 06:03:34 +00:00
Emilio Cobos Álvarez
1513819c21 Bug 1789166 - Use content-visibility rather than display: none to hide <details> content. r=smaug
This matches the current shipping version of Chromium, and the last
version of the spec, except for the <slot> display when open, which per
spec ought to be `block`, but it's still `contents`.

animation-canceled-by-parent-details-element-being-closed.html is
invalid because content-visibility doesn't cancel animations, just
pauses them. It also times out in Chrome.

Differential Revision: https://phabricator.services.mozilla.com/D217192
2024-07-20 17:49:39 +00:00
Stanca Serban
fd5b1ecdad Backed out changeset 48baafc34055 (bug 1789166) for causing mochitests failures. CLOSED TREE 2024-07-20 18:43:13 +03:00
Emilio Cobos Álvarez
79779b8643 Bug 1789166 - Use content-visibility rather than display: none to hide <details> content. r=smaug
This matches the current shipping version of Chromium, and the last
version of the spec, except for the <slot> display when open, which per
spec ought to be `block`, but it's still `contents`.

animation-canceled-by-parent-details-element-being-closed.html is
invalid because content-visibility doesn't cancel animations, just
pauses them. It also times out in Chrome.

Differential Revision: https://phabricator.services.mozilla.com/D217192
2024-07-20 14:17:31 +00:00
Boris Chiou
eb5e7e2be3 Bug 1907210 - Part 2: Simplify KeyframeName. r=firefox-style-system-reviewers,zrhoffman
Now, `TimelineOrKeyframeName` is used only for `KeyframeName`, so we can
merge them.

Differential Revision: https://phabricator.services.mozilla.com/D216459
2024-07-16 20:31:52 +00:00
Boris Chiou
200a6b3666 Bug 1907210 - Part 1: Use <dashed-ident> for scroll/view timeline name. r=firefox-style-system-reviewers,zrhoffman
Per the spec change, we only accept `<dashed-ident>` for timeline names.

Differential Revision: https://phabricator.services.mozilla.com/D216458
2024-07-16 20:31:52 +00:00
Nico Burns
f48da20efc Bug 1906995 - Enable grid styles for servo. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D216128
2024-07-16 10:02:32 +00:00
Nico Burns
d1db4459f4 Bug 1906994 - Enable row-gap and gap shorthand for servo. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D216127
2024-07-16 10:02:29 +00:00
Jonathan Watt
cb91c45833 Bug 1907809. Rename CSS position-try-options to position-try-fallbacks. r=emilio,firefox-style-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D216523
2024-07-15 18:50:05 +00:00
David Shin
610a625c9e Bug 1889109: Part 6 - Skip style sharing revalidation for trivial styles. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D212730
2024-07-15 18:41:14 +00:00
David Shin
4295406b2f Bug 1889109: Part 5 - Add scope subject map and use it to early-reject elements that can't be scopes. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D212729
2024-07-15 18:41:14 +00:00
David Shin
3ee570af5f Bug 1889109: Part 4 - Pull out mapping from "unique" selector attribute mappings. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D212728
2024-07-15 18:41:14 +00:00
David Shin
4947714b3d Bug 1889109: Part 3 - Add scope revalidation to style sharing. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D212727
2024-07-15 18:41:13 +00:00
David Shin
fc41d181dc Bug 1889109: Part 2 - Mark all elements considering scoped styles. r=firefox-style-system-reviewers,emilio
This lets us avoid having to run scope matching for revalidation
for elements that don't match scoped styles.

Differential Revision: https://phabricator.services.mozilla.com/D212726
2024-07-15 18:41:13 +00:00
David Shin
abe7475c83 Bug 1889109: Part 1 - Get rid of now-unused relative selector flags. r=firefox-style-system-reviewers,emilio
Supplanted by Bug 1876962 making `:has` a revalidation selector.
Remaining reference was added during Bug 1869771, is still handled
by the revalidation logic (`has-style-sharing-007.html` stil passes).

Differential Revision: https://phabricator.services.mozilla.com/D212725
2024-07-15 18:41:12 +00:00
Emily McDonough
2b62832824 Bug 1906749 - Do not parse an empty page-rule selector list as a single empty selector. r=emilio,firefox-style-system-reviewers
Before this change, `@page {}` was parsed as though the rule had a single
selector with an empty atom as the name. We would generally accept things like
`@page a, {}` to include an empty selector too, since no matching tokens ended
up representing an empty page-name (as is the case with just pseudo-classes
and no page-name), and an empty pseudo-class list (as is the case with just a
page-name and no pseudo-classes).
We shouldn't be accepting both of those at the same time.

This also fixes serialization of empty page-rule selector list.

It seems there are no WPT that check how page-rules are specifically
serialized. This adds a few basic ones to catch at least this issue.

Differential Revision: https://phabricator.services.mozilla.com/D216068
2024-07-12 23:25:05 +00:00
Boris Chiou
8d703e57b7 Bug 1907179 - Repalce horizontal/vertical with x/y for ScrollAxis. r=layout-reviewers,firefox-style-system-reviewers,emilio
Per spec, we should use `x`/`y` to match `scroll-snap-type` and `overflow`.

Differential Revision: https://phabricator.services.mozilla.com/D216233
2024-07-12 19:44:14 +00:00
Emilio Cobos Álvarez
a9a3348226 Bug 1907405 - Add appearance: -moz-sidebar and hook macOS vibrancy. r=mac-reviewers,spohl
Unused for now, but pretty straight-forward.

Bug 1905257 has some code that actually uses it. This allows the
front-end folks to experiment with this effect for the sidebar.

Differential Revision: https://phabricator.services.mozilla.com/D216325
2024-07-12 14:08:13 +00:00
Nico Burns
b7146282b6 Bug 1906395 - servo: unpreference alignment styles. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D216344
2024-07-12 11:36:16 +00:00
Nico Burns
c44d386d20 Bug 1906395 - Switch Servo to use Gecko's alignment style implementations. (r=emilio)
Differential Revision: https://phabricator.services.mozilla.com/D216126
2024-07-12 11:36:16 +00:00
Nico Burns
af373a28e2 Bug 1906395 - AlignFlags: Add flags method. Make value method public. (r=emilio)
A couple of tiny helper method to make accessing the AlignFlag values easier in Servo

Differential Revision: https://phabricator.services.mozilla.com/D216125
2024-07-12 11:36:16 +00:00