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

15595 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez baba6ff61c Bug 1914449 - Fix stylesheet cloning in presence of both @layer and @import. r=zrhoffman,firefox-style-system-reviewers
Hopefully the test for bug 1912996 would catch this.

Differential Revision: https://phabricator.services.mozilla.com/D220083
2024-08-26 13:01:59 +00:00
Emilio Cobos Álvarez df0fc07466 Bug 1914799 - Move some of the gecko.mako.rs code to property definitions. r=firefox-style-system-reviewers,zrhoffman
This is just a trivial clean-up I noticed reviewing bug 1914777.

Differential Revision: https://phabricator.services.mozilla.com/D220084
2024-08-25 21:47:22 +00:00
Zach Hoffman 3929b2eab0 Bug 1914777 - Use cbindgen for border-image-repeat. r=firefox-style-system-reviewers,layout-reviewers,emilio
nsStyleBorder field mBorderImageRepeat replaces fields
mBorderImageRepeatH and mBorderImageRepeatY.

Differential Revision: https://phabricator.services.mozilla.com/D220074
2024-08-25 15:57:04 +00:00
Zach Hoffman 11860bb190 Bug 1914777 - Use cbindgen for StyleBorderImageRepeatKeyword. r=firefox-style-system-reviewers,layout-reviewers,emilio
Generated enum StyleBorderImageRepeatKeyword replaces enum StyleBorderImageRepeat.

Differential Revision: https://phabricator.services.mozilla.com/D220073
2024-08-25 15:57:04 +00:00
Emily McDonough 042cf5fb44 Bug 1867164 - Share logic for serializing PageRule and StyleRule. r=firefox-style-system-reviewers,emilio
Factor out shared logic into a separate function. This leaves the actual impl
of ToCssWithGuard for the rule itself, and requires the rules to serialize
the preamble separately.

Differential Revision: https://phabricator.services.mozilla.com/D219818
2024-08-23 20:22:45 +00:00
Boris Chiou a20866136d Bug 1823901 - Add view-transition-name longhand in style system. r=layout-reviewers,firefox-style-system-reviewers,emilio
Add `view-transition-name` into style system, behind the preference,
"dom.viewTransitions.enabled".

We will use `view-transition-name` somewhere when we create the pseudo
elements. This patch only add this atom into style system for future
usage.

Differential Revision: https://phabricator.services.mozilla.com/D218120
2024-08-22 07:21:09 +00:00
David Shin 69d671e227 Bug 1912241: Correctly refer to current matching context's shadow root while matching implicit scopes. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D219537
2024-08-21 18:17:21 +00:00
Emilio Cobos Álvarez 4aa1ad81ba Bug 878346 - Make transform a mapped attribute for SVG. r=longsonr,firefox-style-system-reviewers,zrhoffman
The tricky bit is rotate() which in SVG means something different if
there's an origin (you translate-then-untranslate it).

But this seems to work off-hand, and fix the reminder of bug 1906261.

Differential Revision: https://phabricator.services.mozilla.com/D215788
2024-08-21 15:00:48 +00:00
Jonathan Kew be4a19a0da Bug 1913536 - Expose the special shorthands in the SpecifiedValueInfo for the CSS white-space shorthand. r=firefox-style-system-reviewers,devtools-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D219426
2024-08-21 14:48:25 +00:00
Emilio Cobos Álvarez b586de292c 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-21 12:23:34 +00:00
Cristian Tuns 3447333df4 Backed out changeset 6fb2cecebdd8 (bug 1913322) for causing multiple failures. CLOSED TREE 2024-08-20 21:01:50 -04:00
Emilio Cobos Álvarez 9a8a267f79 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 22:31:22 +00:00
Emily McDonough ab8003e318 Bug 1913812 - Remove trivially redundant cases into_boxed_slice following a collect in Servo style code r=firefox-style-system-reviewers,zrhoffman
Differential Revision: https://phabricator.services.mozilla.com/D219544
2024-08-20 21:10:43 +00:00
Iulian Moraru e0e41bf500 Backed out changeset 1658290c1b95 (bug 1913322) for causing overflow related failures. CLOSED TREE 2024-08-20 17:54:54 +03:00
Emilio Cobos Álvarez 47c031614c 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 9c457b174d 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 543946adb5 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 604c5a7898 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 75e9c1f48f 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 e17c4fe0dc 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 4e8cf2fc99 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 11482ce7b8 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 ed09cb9244 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 f156dee704 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 f4e38939cd 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 bdb9486c89 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 aa3062dc34 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 c146f5b834 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 fa0a7f4bdc 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
Nicolas Chevobbe dda5cbcadf Bug 1911619 - [devtools] InspectorUtils.valueMatchesSyntax should always return true for CSS-wide keywords. r=emilio.
Differential Revision: https://phabricator.services.mozilla.com/D218604
2024-08-07 12:04:58 +00:00
Boris Chiou b17423ff3b 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 58825dea6d 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 3346d68b39 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 193ba22517 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 90e368e733 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 b3b50c0377 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 04b99ad553 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 98d7caf645 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 9e34654e50 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
Emilio Cobos Álvarez e1ad6294bf Bug 1910698 - Remove nsIScriptError.sourceLine. r=smaug,devtools-reviewers,webdriver-reviewers,necko-reviewers,nchevobbe,kershaw,jdescottes,credential-management-reviewers,dimi
Afaict the source lines are not exposed anywhere in the UI.

Differential Revision: https://phabricator.services.mozilla.com/D218115
2024-08-01 17:12:48 +00:00
Martin Robinson 8644105a4e 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 2012ee352f 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 e50bd49e33 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
Daniel Holbert 85aeaa814f Bug 1909773 part 2: Create BehavesLikeStretchOnInlineAxis() utility-function as an abstraction for the '-moz-available' sizing behavior. r=emilio
This patch doesn't change behavior.

The '-moz-available' keyword is our closest equivalent to the CSS 'stretch'
keyword, *specifically* for the inline axis (since we currently nerf
'-moz-available' to behave like the initial value in the block axis). Hence, it
makes sense to say that the '-moz-available' keyword "Behaves Like Stretch On
Inline Axis".

By abstracting the existing behavior behind this helper-function, we can
start implementing the actual 'stretch' value in terms of this existing
behavior, in later patches.

Differential Revision: https://phabricator.services.mozilla.com/D217685
2024-07-25 18:18:23 +00:00
Emilio Cobos Álvarez 4f6c4d6e89 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 5be151ad49 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 1e165ea322 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 436aae97d3 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 00e6de8399 Backed out changeset 48baafc34055 (bug 1789166) for causing mochitests failures. CLOSED TREE 2024-07-20 18:43:13 +03:00
Emilio Cobos Álvarez 45d6f3f899 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