Commit Graph

6280 Commits

Author SHA1 Message Date
Boris Chiou
f28ff20558 Bug 1889496 - Part 2: Implement CSSStartingStyleRule interface. r=webidl,firefox-style-system-reviewers,layout-reviewers,emilio
Introduce CSSStartingStyleRule and add one extra parsing test for
@starting-style rule.

Differential Revision: https://phabricator.services.mozilla.com/D206564
2024-04-05 21:03:07 +00:00
Boris Chiou
8bc06baebe Bug 1889496 - Part 1: Parse @starting-style rule. r=layout-reviewers,firefox-style-system-reviewers,emilio
We introduce this rule and parse it in this patch. Also, fix some wpt
expectations for ERROR.

We will introduce CSSStartingStyleRule in the following patch, and test
it there.

Differential Revision: https://phabricator.services.mozilla.com/D206428
2024-04-05 21:03:06 +00:00
Cristian Tuns
ec18448a53 Backed out 2 changesets (bug 1889496) for causing build bustages in RefPtr.h CLOSED TREE
Backed out changeset 7689f9c266fc (bug 1889496)
Backed out changeset abbbf327c4f1 (bug 1889496)
2024-04-04 19:15:49 -04:00
Boris Chiou
5c44bb5d97 Bug 1889496 - Part 2: Implement CSSStartingStyleRule interface. r=webidl,firefox-style-system-reviewers,layout-reviewers,emilio
Introduce CSSStartingStyleRule and add one extra parsing test for
@starting-style rule.

Differential Revision: https://phabricator.services.mozilla.com/D206564
2024-04-04 19:39:29 +00:00
Boris Chiou
e7e11669a6 Bug 1889496 - Part 1: Parse @starting-style rule. r=layout-reviewers,firefox-style-system-reviewers,emilio
We introduce this rule and parse it in this patch. Also, fix some wpt
expectations for ERROR.

We will introduce CSSStartingStyleRule in the following patch, and test
it there.

Differential Revision: https://phabricator.services.mozilla.com/D206428
2024-04-04 19:39:28 +00:00
Jan-Niklas Jaeschke
81f5e14057 Bug 1867939, part 4: Implemented the ::target-text CSS Pseudo Element. r=emilio,devtools-reviewers,nchevobbe
This patch implements the `::target-text` pseudo element.
Similarly to the Custom Highlight API, this is done implementing
a new Selection type.

Differential Revision: https://phabricator.services.mozilla.com/D195687
2024-04-04 14:39:32 +00:00
Stanca Serban
c9bea63c35 Backed out 6 changesets (bug 1867939) for causing wpt failures in target-text-010.html. CLOSED TREE
Backed out changeset 44101c258e52 (bug 1867939)
Backed out changeset c53267e1b460 (bug 1867939)
Backed out changeset 0748839408e5 (bug 1867939)
Backed out changeset 38631fbd2f2f (bug 1867939)
Backed out changeset d77b9257c842 (bug 1867939)
Backed out changeset 0d269b891421 (bug 1867939)
2024-04-04 00:50:50 +03:00
Jan-Niklas Jaeschke
e58875610d Bug 1867939, part 4: Implemented the ::target-text CSS Pseudo Element. r=emilio,devtools-reviewers,nchevobbe
This patch implements the `::target-text` pseudo element.
Similarly to the Custom Highlight API, this is done implementing
a new Selection type.

Differential Revision: https://phabricator.services.mozilla.com/D195687
2024-04-03 15:23:02 +00:00
Sandor Molnar
d877f9cfe6 Merge mozilla-central to autoland. a=merge 2024-04-03 17:47:38 +03:00
Sandor Molnar
8340afd1fb Backed out 6 changesets (bug 1867939) for causing a top crash in nightly Bug 1889393 CLOSED TREE
Backed out changeset 2110f57e928c (bug 1867939)
Backed out changeset 51890598ecb4 (bug 1867939)
Backed out changeset 839bc1b11a2c (bug 1867939)
Backed out changeset bb88c4d09e82 (bug 1867939)
Backed out changeset 27c76e65cf58 (bug 1867939)
Backed out changeset c3e3c81f9ceb (bug 1867939)
2024-04-03 17:31:56 +03:00
Mike Hommey
765b7d2fc0 Bug 1889030 - Remove unused CascadeDataCacheEntry::cascade_data. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D206323
2024-04-03 06:35:27 +00:00
Mike Hommey
d1c5f6c450 Bug 1889030 - Remove redundant imports from style. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D206322
2024-04-03 06:35:27 +00:00
David Shin
31f42f9bc3 Bug 1874042: Add support for unknown match result for invalidation by comparing now/then. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D205257
2024-04-02 20:29:05 +00:00
David Shin
c4fa7f1116 Bug 1874042: Refactor KleeneValue for use in selector invalidation. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D205256
2024-04-02 20:29:05 +00:00
Jan-Niklas Jaeschke
2ec51d7c56 Bug 1867939, part 4: Implemented the ::target-text CSS Pseudo Element. r=emilio,devtools-reviewers,nchevobbe
This patch implements the `::target-text` pseudo element.
Similarly to the Custom Highlight API, this is done implementing
a new Selection type.

Differential Revision: https://phabricator.services.mozilla.com/D195687
2024-04-02 13:44:25 +00:00
Cristian Tuns
a1bb69acae Backed out 6 changesets (bug 1867939) for causing build bustages in Document.h CLOSED TREE
Backed out changeset 0853f9a7a06c (bug 1867939)
Backed out changeset 2279e6577c13 (bug 1867939)
Backed out changeset 1b3af4b6a27b (bug 1867939)
Backed out changeset 2fbe643ca483 (bug 1867939)
Backed out changeset 575873406614 (bug 1867939)
Backed out changeset 82f99c0210b0 (bug 1867939)
2024-04-02 09:15:46 -04:00
Jan-Niklas Jaeschke
b764eaf1f8 Bug 1867939, part 4: Implemented the ::target-text CSS Pseudo Element. r=emilio,devtools-reviewers,nchevobbe
This patch implements the `::target-text` pseudo element.
Similarly to the Custom Highlight API, this is done implementing
a new Selection type.

Differential Revision: https://phabricator.services.mozilla.com/D195687
2024-04-02 11:43:21 +00:00
Emilio Cobos Álvarez
716b863fb4 Bug 1888203 - Remove appearance: {toolbar,toolbox}. r=mac-reviewers,desktop-theme-reviewers,mstange,dao
* Linux doesn't support them already.
 * macOS doesn't draw anything either.
 * Windows doesn't have dark-color-scheme support so the relevant
   windows that have them need to set appearance none already.

Remove them and simplify the relevant code.

Differential Revision: https://phabricator.services.mozilla.com/D205872
2024-03-30 12:17:57 +00:00
Emilio Cobos Álvarez
185bbd28bd Bug 1887063 - Use VibrancyManager / regular CSS to implement the unified toolbar looks. r=mstange,mac-reviewers,desktop-theme-reviewers,places-reviewers,dao
This is simpler given we only have a couple of windows with these looks,
and removes the dual mode of the ToolbarWindow class.

We just draw the title into the window frame and rely on CSS reserving
enough space (exposed as a new -moz-mac-titlebar-height environment
variable).

We remove the toolbox and toolbar appearance values on mac, now that
they do nothing (toolbar did, but it didn't support dark mode and is
effectively unused).

Differential Revision: https://phabricator.services.mozilla.com/D205469
2024-03-30 10:29:39 +00:00
Boris Chiou
d9e043e222 Bug 1884425 - Implement interpolation between path() and shape(). r=firefox-style-system-reviewers,zrhoffman
Basically, we implement `Animate` for `PathOrShapeFunction` manually
when either *from* or *to* value is `path()` function, and the other one
is `shape()` function.

Differential Revision: https://phabricator.services.mozilla.com/D205491
2024-03-28 19:42:13 +00:00
Boris Chiou
4385764edf Bug 1884425 - Introduce PathOrShapeFunciton for path() and shape(). r=firefox-style-system-reviewers,zrhoffman
Use this as a wrapper for `path()` and `shape()`, so it'd be easier to
specialize its `Animate` trait.

Differential Revision: https://phabricator.services.mozilla.com/D205490
2024-03-28 19:42:13 +00:00
Emilio Cobos Álvarez
68cb1a8b29 Bug 1887221 - Make zoom recompute implicitly-inherited font-size. r=firefox-style-system-reviewers,boris
This matches what WebKit and Blink ship. Bug 1887627 is the more complex
fix, though I'm a bit concerned about the performance implications
there, and I don't think that necessarily blocks shipping zoom...

This should be uncontroversial and unblocks getting zoom out of the
door.

Differential Revision: https://phabricator.services.mozilla.com/D205562
2024-03-27 22:02:57 +00:00
keithamus
a38bf0da3c Bug 1888098 - optimize nth-of dependency tracking for custom state r=dshin
Differential Revision: https://phabricator.services.mozilla.com/D205804
2024-03-27 21:43:01 +00:00
Norisz Fay
3bf7cbef48 Backed out 2 changesets (bug 1887063) for causing reftest failure on 1291413-1.html and nsCocoaWindow::IsVisible process-crash CLOSED TREE
Backed out changeset 4014cb772d7c (bug 1887063)
Backed out changeset 690b15c54c21 (bug 1887063)
2024-03-28 00:33:28 +02:00
Norisz Fay
d8ad6641ae Backed out changeset 2f7b9a6f09ca (bug 1888203) for causing file conflict while backing out Bug 1887063 2024-03-28 00:30:13 +02:00
Boris Chiou
d2f5968f8b Bug 1884424 - Support shape() for offset-path and render it. r=layout-reviewers,emilio
We treat it as other basic shapes (excluding path(), which has some
special handling and it doesn't rely on the current layout position).

Therefore, we don't have any implementation for caching and we would like to
leave this part to Bug 1837042.

Also, add some more simple tests in css/motion to make sure we render it
properly.

Differential Revision: https://phabricator.services.mozilla.com/D204440
2024-03-27 20:18:38 +00:00
David Shin
b3e5b463c3 Bug 1887745: Correct relative selector parsing for inner rules in @scope. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D205718
2024-03-27 18:31:46 +00:00
Emilio Cobos Álvarez
b36264e372 Bug 1888203 - Remove appearance: {toolbar,toolbox}. r=mac-reviewers,desktop-theme-reviewers,mstange,dao
* Linux doesn't support them already.
 * macOS doesn't draw anything either.
 * Windows doesn't have dark-color-scheme support so the relevant
   windows that have them need to set appearance none already.

Remove them and simplify the relevant code.

Differential Revision: https://phabricator.services.mozilla.com/D205872
2024-03-27 18:00:07 +00:00
Emilio Cobos Álvarez
ceb5cfe890 Bug 1887063 - Use VibrancyManager / regular CSS to implement the unified toolbar looks. r=mstange,mac-reviewers,desktop-theme-reviewers,places-reviewers,dao
This is simpler given we only have a couple of windows with these looks,
and removes the dual mode of the ToolbarWindow class.

We just draw the title into the window frame and rely on CSS reserving
enough space (exposed as a new -moz-mac-titlebar-height environment
variable).

We remove the toolbox and toolbar appearance values on mac, now that
they do nothing (toolbar did, but it didn't support dark mode and is
effectively unused).

Differential Revision: https://phabricator.services.mozilla.com/D205469
2024-03-27 17:07:23 +00:00
Boris Chiou
c77eaa59f4 Bug 1887738 - Remove preferences of motion path (ray(), basic-shapes, coord-box, offset-position). r=layout-reviewers,devtools-reviewers,emilio,nchevobbe
We have shipped them for more than 3 months and we don't have issue
right now. Chromium also removed the flags, so it should be fine to drop
them to make the code simpler.

Differential Revision: https://phabricator.services.mozilla.com/D205615
2024-03-26 16:52:03 +00:00
Oriol Brufau
dfa121dc2b Bug 1887913 - AtomIdent and LocalName are different in Servo. r=emilio
In Gecko, LocalName is an alias for AtomIdent.
But in Servo they aren't the same, so these changes are needed.

Differential Revision: https://phabricator.services.mozilla.com/D205728
2024-03-26 16:21:53 +00:00
Vincent Hilla
048e0da5cf Bug 1873738 - Make non-html elements have a directionality. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D204384
2024-03-26 12:54:25 +00:00
keithamus
c9afd8368f Bug 1865589 - Notify PresShell of CustomState changes, so Restyle can invalidate. r=emilio,dshin
Differential Revision: https://phabricator.services.mozilla.com/D202460
2024-03-22 22:18:05 +00:00
Emilio Cobos Álvarez
f741262fe9 Bug 1876542 - Unzoom resolved values in getComputedStyle. r=firefox-style-system-reviewers,zrhoffman
Extend the existing test to cover most other cases that can cause us to
return a length from getComputedStyle.

Differential Revision: https://phabricator.services.mozilla.com/D205225
2024-03-22 17:20:12 +00:00
Boris Chiou
97e2d80674 Bug 1885013 - Fix ambiguity on timing-function, direction, fill-mode, and running-state. r=zrhoffman,emilio
It's possible to set `animation-name` to any of the keyword of other
properties, and this may cause ambiguity when serializing `animation`
shorthand (because we may reuse this result as an input of another
`animation` shorthand to get the same result).

So we still have to serialize these properties even if they are initial
values if `animation-name` matches them.

e.g.
Set `animation` to `normal normal`. Its serialization should be
`normal normal`, instead `normal`, because using `normal` as an input of
another `animation` shorthand makes its `animation-name` be `none`.
(Note: we parse `animation-direction` first.)

Differential Revision: https://phabricator.services.mozilla.com/D204995
2024-03-21 21:16:21 +00:00
Boris Chiou
047664464c Bug 1885013 - Follow shortest serialization principle on animation shorthand. r=emilio,omc-reviewers,aminomancer
We still have some ambiguous issue when `animation-name` is the same as
other keywords. We will fix it in the following patch.

Differential Revision: https://phabricator.services.mozilla.com/D204692
2024-03-21 21:16:21 +00:00
Noemi Erli
39e44ffc89 Backed out 2 changesets (bug 1885013) for causing failures in browser_aboutwelcome_configurable_ui.js
Backed out changeset b28b26f5606d (bug 1885013)
Backed out changeset c9fc4a8babbe (bug 1885013)
2024-03-21 01:07:18 +02:00
David Shin
c9f9b597b0 Bug 1886596: Update out-of-date comment for ApplicableDeclarationBlock::source_order. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D205265
2024-03-20 21:19:41 +00:00
Boris Chiou
6c30fe5525 Bug 1885013 - Fix ambiguity on timing-function, direction, fill-mode, and running-state. r=zrhoffman,emilio
It's possible to set `animation-name` to any of the keyword of other
properties, and this may cause ambiguity when serializing `animation`
shorthand (because we may reuse this result as an input of another
`animation` shorthand to get the same result).

So we still have to serialize these properties even if they are initial
values if `animation-name` matches them.

e.g.
Set `animation` to `normal normal`. Its serialization should be
`normal normal`, instead `normal`, because using `normal` as an input of
another `animation` shorthand makes its `animation-name` be `none`.
(Note: we parse `animation-direction` first.)

Differential Revision: https://phabricator.services.mozilla.com/D204995
2024-03-20 20:39:07 +00:00
Boris Chiou
5895d014a4 Bug 1885013 - Follow shortest serialization principle on animation shorthand. r=emilio
We still have some ambiguous issue when `animation-name` is the same as
other keywords. We will fix it in the following patch.

Differential Revision: https://phabricator.services.mozilla.com/D204692
2024-03-20 20:39:06 +00:00
Emilio Cobos Álvarez
e6f37004e1 Bug 1885357 - Use a single mako invocation to generate the style crate. r=sergesanspaille
This is significantly faster. While at it:

 * Remove unused "additional_methods".
 * Fix help text to remove an option that no longer exists.

Differential Revision: https://phabricator.services.mozilla.com/D205047
2024-03-20 09:51:02 +00:00
Mike Hommey
5d6b940217 Bug 1878780 - Don't use refs to mut static directly. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D205010
2024-03-20 00:02:22 +00:00
Oriol Brufau
805b20a4fa Bug 1886218 - Unify servo-2013 and servo-2020. r=emilio
This imports https://github.com/servo/stylo/commit/c9ca340 from Servo,
with minor adjustments for D187431, 'baseline-source', and to ensure
that Firefox still compiles.

Differential Revision: https://phabricator.services.mozilla.com/D205110
2024-03-19 23:10:39 +00:00
David Shin
9814aed542 Bug 1882581: Allow parsing scope-end selector as relative, anchoring at :scope. r=firefox-style-system-reviewers,emilio
WPT is adjusted to reflect the resolution of Issue #9621
(https://github.com/w3c/csswg-drafts/issues/9621).
That is, relative selectors are serialized with `:scope` e.g.
`> .foo` becomes `:scope > .foo`.

Differential Revision: https://phabricator.services.mozilla.com/D203154
2024-03-19 13:36:48 +00:00
David Shin
1e31a04af4 Bug 1882581: Implement @scope parsing. r=firefox-style-system-reviewers,saschanaz,emilio
Differential Revision: https://phabricator.services.mozilla.com/D203153
2024-03-19 13:36:48 +00:00
Oriol Brufau
c973ce585b Bug 1886141 - Simplify return type of relative_selector_search_direction(). r=emilio
Instead of Option<ElementSelectorFlags>, it can be ElementSelectorFlags,
representing None as ElementSelectorFlags::empty().

No change in behavior.

Differential Revision: https://phabricator.services.mozilla.com/D205051
2024-03-19 13:20:46 +00:00
Boris Chiou
6605350dc6 Bug 1823463 - Make PathCommand as the specialization of GenericShapeCommand. r=emilio
Also, we don't have Unkonwn type, so we have to do some minor
refactoring in BuildPath(), and templatize this function so we can use
it for both shape() and path().

This patch doesn't change the behavior.

Note that we instantiate BuildPath() with CSSFloat for now. Once we
instantiate it for StyleAngle and LengthPercentage (i.e. shape()), we
have to tweak this function more. Let's do that in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D202883
2024-03-18 21:20:29 +00:00
Boris Chiou
b9d9282f7f Bug 1823463 - Support shape() for clip-path property in style. r=emilio
Implement the style part for shape(). Besides, update some issues in the
test file, e.g. avoid using viewport height so we get the fixed result
on different devices.

I will refactor `PathCommand` to let it be a specialization of
`GenericShapeCommand` in the following path.

Differential Revision: https://phabricator.services.mozilla.com/D202882
2024-03-18 21:20:28 +00:00
Zach Hoffman
09b59a7de6 Bug 1875546 - [css-properties-values-api] Support interpolating custom properties in transitions r=firefox-style-system-reviewers,emilio
There are still some unhandled edge cases, like making the removal of an
@property rule not interpolate (bug 1885798).

Also, a todo is added to more granularly handle custom properties in
is_discrete_animatable (bug 1885995).

Differential Revision: https://phabricator.services.mozilla.com/D204863
2024-03-18 19:42:13 +00:00
Natalia Csoregi
3db9556f81 Backed out 2 changesets (bug 1882581) for causing bustage on InspectorUtils.cpp. CLOSED TREE
Backed out changeset 9f390afd0df5 (bug 1882581)
Backed out changeset 4781bbc7324f (bug 1882581)
2024-03-19 05:38:08 +02:00