Ziran Sun
e38d2369c5
style: Serialization differences with "columns" with one or more auto
value
...
Differential Revision: https://phabricator.services.mozilla.com/D166087
2023-11-04 08:17:09 +01:00
Ben Freist
2edc1139b6
style: [refactor] Migrate NS_STYLE_LIST_STYLE_POSITION_* defines
...
Differential Revision: https://phabricator.services.mozilla.com/D166140
2023-11-04 08:17:09 +01:00
Zach Hoffman
39b056cf70
style: Move nth-related logic to the NthSelectorData type for reuse
...
Drive-by, but selector_list_specificity() was also renamed to
max_selector_list_specificity().
Differential Revision: https://phabricator.services.mozilla.com/D166263
2023-11-04 08:17:09 +01:00
Zach Hoffman
1c8408e97e
style: Implement parsing and serialization for nth-child(An+B of selector list) and :nth-last-child(An+B of selector list)
...
:nth-{,last-}child parsing is disabled by default for now by pref
layout.css.nth-child-of.enabled.
Differential Revision: https://phabricator.services.mozilla.com/D165895
2023-11-04 08:17:09 +01:00
Jonathan Kew
b7d64ee6a4
style: Animate the 'normal' value of font-style as 'oblique 0deg'
...
This matches what the spec[1] says for font-style:
> Animation type: by computed value type; normal animates as oblique 0deg
A bunch of WPT tests for font-style animation are landing in https://github.com/web-platform-tests/wpt/pull/37570 .
Current Gecko passes 66/129 of the testcases there; with this patch applied it passes all the tests.
[1] https://drafts.csswg.org/css-fonts-4/#font-style-prop
Differential Revision: https://phabricator.services.mozilla.com/D166128
2023-11-04 08:17:09 +01:00
Jonathan Kew
e51b9b8e1c
style: Remove spurious mention of FontStyleAdjust from style/properties/data.py
...
There's no font-style-adjust property, and no FontStyleAdjust type anywhere I can see.
So the mention in data.py is redundant (and potentially confusing).
Differential Revision: https://phabricator.services.mozilla.com/D166127
2023-11-04 08:17:09 +01:00
Jonathan Kew
2f64ef0d81
style: Compute font-size-adjust early, so that we get the correct used font size for font-dependent units
...
Differential Revision: https://phabricator.services.mozilla.com/D165842
2023-11-04 08:17:09 +01:00
Boris Chiou
425a92143d
style: Rename scroll-linked (animations) to scroll-driven (excluding WPT tests)
...
The spec is still using `Scroll-linked`, so we exclude the change of WPT tests.
I believe WPT will get updates once the spec doc is renamed.
Differential Revision: https://phabricator.services.mozilla.com/D165914
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
bc438d725f
style: Minor clean-ups and fixes on top of the previous patch
...
This makes the matching / parsing more self-contained, and I believe
it's generally easier to follow. Also addresses review comments from the
previous patch.
Differential Revision: https://phabricator.services.mozilla.com/D165861
2023-11-04 08:17:09 +01:00
Zach Hoffman
211761ad88
style: Represent FirstChild, FirstOfType, LastChild, LastOfType, OnlyChild, and OnlyOfType as functionless Nth variants
...
Like bug 1808226, this doesn't change any behavior, it just simplifies matching.
I also added a WPT JavaScript test for :only-of-type, since dedicated WPT
JavScript tests already exist for the other pseudo-classes this patch
touches.
Differential Revision: https://phabricator.services.mozilla.com/D165859
2023-11-04 08:17:09 +01:00
Ben Freist
dc225e0b2f
style: [refactor] Migrate NS_STYLE_MASONRY_* defines
...
Differential Revision: https://phabricator.services.mozilla.com/D164422
2023-11-04 08:17:09 +01:00
Zach Hoffman
281ae0748f
style: Store values for :nth- selectors in dedicated struct NthSelectorData
...
To accomplish this, all :nth- Components were replaced with type Nth,
which uses NthSelectorData.
Using NthSelectorData will make it easier to add selector lists for :nth
selectors later on, but this change by itself shouldn't change any
behavior.
Differential Revision: https://phabricator.services.mozilla.com/D165831
2023-11-04 08:17:09 +01:00
Oriol Brufau
b373d9c1c4
Further changes required by Servo
2023-11-04 08:17:09 +01:00
Oriol Brufau
65e8b71b0f
style: Compute column-rule-width to 0 when column-rule-style is none
...
Depends on D164554
Differential Revision: https://phabricator.services.mozilla.com/D164549
2023-11-04 08:17:09 +01:00
Oriol Brufau
7ce706f891
Further changes required by Servo
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
18b9e1b615
style: Use used, rather than computed font-size for font-metric dependent units
...
Differential Revision: https://phabricator.services.mozilla.com/D165737
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
d30400d3ea
style: Fix container orientation evaluation
...
Allow keyword evaluators to return unknown.
Do you know of a good test to extend here? Otherwise I can add a new
one, though I gotta run atm.
Differential Revision: https://phabricator.services.mozilla.com/D165630
2023-11-04 08:17:09 +01:00
Oriol Brufau
2389650734
Further changes required by Servo
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
92742f7f90
style: Avoid generic soup and extra reference count bumps
...
This makes me a bit happier about the previous patch :)
Differential Revision: https://phabricator.services.mozilla.com/D165236
2023-11-04 08:17:09 +01:00
Mike Hommey
cceb538eb0
style: Update darling to 0.14.2
...
Differential Revision: https://phabricator.services.mozilla.com/D165598
2023-11-04 08:17:09 +01:00
Oriol Brufau
58600c7854
Further changes required by Servo
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
042864d34a
style: Implement overflow: overlay as an alias on auto, and enable on Nightly
...
See related webcompat issues and discussion in
https://github.com/w3c/csswg-drafts/issues/8063
Differential Revision: https://phabricator.services.mozilla.com/D165058
2023-11-04 08:17:09 +01:00
Oriol Brufau
40f5dbb1ab
style: Fix container units on ::backdrop
...
Differential Revision: https://phabricator.services.mozilla.com/D165542
2023-11-04 08:17:09 +01:00
Zach Hoffman
a685297bf3
style: Implement the color-gamut media feature
...
Differential Revision: https://phabricator.services.mozilla.com/D165385
2023-11-04 08:17:09 +01:00
Oriol Brufau
65fbb16bb4
style: Partial fix for container units in pseudo-elements
...
When apply_declarations is used for a pseudo-element, make it pass the
parent_style as the originating_element_style for container queries.
This requires changing some parameters from Option<&Arc<ComputedValues>>
to Option<&ComputedValues>.
It's not a complete solution, since e.g. parent_style is not the style
of the originating element of a ::backdrop. But here it's not as simple
as in D164908, so leaving these details for later.
Differential Revision: https://phabricator.services.mozilla.com/D164977
2023-11-04 08:17:09 +01:00
Ben Freist
16207872f9
style: [refactor] Migrate NS_STYLE_TEXT_DECORATION_STYLE_* defines
...
Differential Revision: https://phabricator.services.mozilla.com/D163177
2023-11-04 08:17:09 +01:00
Oriol Brufau
6751b84bab
Further changes required by Servo
2023-11-04 08:17:09 +01:00
Oriol Brufau
9a862da88f
style: Properly handle ::backdrop
...
Depends on D164807
Differential Revision: https://phabricator.services.mozilla.com/D164908
2023-11-04 08:17:09 +01:00
Oriol Brufau
b9e38017e7
Further changes required by Servo
2023-11-04 08:17:09 +01:00
Oriol Brufau
661e7d5c48
style: Fix elements not being query containers for the pseudo-element they originate. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D164807
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
c511b9c3f9
style: Unconditionally enable container properties in UA sheets
...
If the UA sheet gets parsed with the pref off, and then the pref gets
flipped on, we don't re-parse the UA sheet (nor we want to).
Enable the property in UA sheets unconditionally so that the test passes
even when the browser was started-up with the container queries pref
off.
Differential Revision: https://phabricator.services.mozilla.com/D164823
2023-11-04 08:17:09 +01:00
Oriol Brufau
c31db1c937
style: Lint container_rule.rs
...
Just using 'rustup run nightly rustfmt'.
No change in behavior.
Differential Revision: https://phabricator.services.mozilla.com/D164805
2023-11-04 08:17:09 +01:00
Oriol Brufau
12903c51d5
Further changes required by Servo
2023-11-04 08:17:09 +01:00
Oriol Brufau
c4b8e451ed
style: Re-evaluate container queries when container gets display:contents
...
Differential Revision: https://phabricator.services.mozilla.com/D164234
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
cd50d30c31
style: Fix outline-style: inherit behavior if you don't specify outline-width
...
The fix is calling set_outline_style so that we also reset the actual
outline width. Also clean-up surrounding code a little bit to be
marginally more efficient, and do the same change for border-*-style
(which was doing the right thing, but it's better to make sure both stay
in sync).
Differential Revision: https://phabricator.services.mozilla.com/D164554
2023-11-04 08:17:09 +01:00
Daniel Holbert
db4dd48d31
style: Remove the about:config pref for subgrid, layout.css.grid-template-subgrid-value.enabled, since it's been default-enabled for years
...
Differential Revision: https://phabricator.services.mozilla.com/D164389
2023-11-04 08:17:09 +01:00
Ziran Sun
a478c1bf90
style: Don't share style for cousins that are using Container Queries
...
Differential Revision: https://phabricator.services.mozilla.com/D164224
2023-11-04 08:17:09 +01:00
Jonathan Kew
6a6658801f
style: followup - revert the serialization change, and instead fix the test to expect lowercase
...
Differential Revision: https://phabricator.services.mozilla.com/D164219
2023-11-04 08:17:09 +01:00
Jonathan Kew
e7dc4a47cb
style: Serialize font-face src tech() keywords in mixed-case to match the spec; fix the associated WPT test to do case-insensitive comparisons
...
Differential Revision: https://phabricator.services.mozilla.com/D164202
2023-11-04 08:17:09 +01:00
Jonathan Kew
6162f82c6b
style: Remove 'font-palette' from the 'font' shorthand
...
Differential Revision: https://phabricator.services.mozilla.com/D164128
2023-11-04 08:17:09 +01:00
Ben Freist
37c2d4d30a
style: [refactor] Migrate NS_STYLE_LIST_STYLE_* defines
...
Differential Revision: https://phabricator.services.mozilla.com/D163792
2023-11-04 08:17:09 +01:00
Oriol Brufau
e19c955c1c
Further changes required by Servo
2023-11-04 08:17:09 +01:00
Oriol Brufau
0c36795e20
style: Evaluate size feature to unknown if the container lacks size containment
...
For example, inline elements may have container-type:size but they don't
support size containment, so @container(width >= 0) shouldn't match.
Differential Revision: https://phabricator.services.mozilla.com/D163936
2023-11-04 08:17:09 +01:00
Oriol Brufau
1beb9880a9
Further changes required by Servo
2023-11-04 08:17:09 +01:00
Jonathan Kew
6ea75b0646
style: Parse errors in individual @font-face src components should cause only the bad component to be dropped, not the entire descriptor
...
Differential Revision: https://phabricator.services.mozilla.com/D163810
2023-11-04 08:17:09 +01:00
Oriol Brufau
d2bb508272
Further changes required by Servo
2023-11-04 08:17:09 +01:00
Oriol Brufau
647d813c6b
style: @container(width:0) shouldn't match elements with no box
...
Depends on D163879
Differential Revision: https://phabricator.services.mozilla.com/D163844
2023-11-04 08:17:09 +01:00
Oriol Brufau
6c02e9fdaa
style: Implement Kleene logic for query feature expressions
...
Differential Revision: https://phabricator.services.mozilla.com/D163879
2023-11-04 08:17:09 +01:00
Oriol Brufau
134f680503
Further changes required by Servo
2023-11-04 08:17:09 +01:00
Oriol Brufau
748dd1eae2
style: Make container queries check content-box size
...
They were checking the border-box size (with paddings and borders), but
https://drafts.csswg.org/css-contain-3/#size-container says it should
be the content-box size.
Differential Revision: https://phabricator.services.mozilla.com/D163784
2023-11-04 08:17:09 +01:00