Commit graph

47100 commits

Author SHA1 Message Date
Jonathan Kew
d54d9ec25a style: De-dup items with the same tag in the computed value of font-feature-settings and font-variation-settings
Differential Revision: https://phabricator.services.mozilla.com/D167012
2023-11-06 09:35:57 +01:00
Emilio Cobos Álvarez
979637de7d style: Remove some duplicated code for coordinated properties
Differential Revision: https://phabricator.services.mozilla.com/D167130
2023-11-06 09:35:57 +01:00
Emilio Cobos Álvarez
fe8cdbe328 style: Use the same computed time representation between Servo and Gecko
Same as above.

Differential Revision: https://phabricator.services.mozilla.com/D167126
2023-11-06 09:35:57 +01:00
Emilio Cobos Álvarez
b96f8f748c style: Share computed animation-iteration-count representation between Servo and Gecko
This removes the special AnimationIterationCount -> f32 conversion from
gecko.mako.rs which will be useful to simplify coordinated properties.

Differential Revision: https://phabricator.services.mozilla.com/D167123
2023-11-06 09:35:57 +01:00
Zach Hoffman
fa297196ef style: Reuse list_matches_complex_selector() where possible
It can be reused for the Is, Where, and Negation components.

Differential Revision: https://phabricator.services.mozilla.com/D166267
2023-11-06 09:35:57 +01:00
Zach Hoffman
93de6edbc9 style: Apply slow selector flags before matching
This patch fixes a bug introduced by bug 1808228/D166266, where, if an
element does not initially match :nth-child(An+B of selector list) or
:nth-last-child(An+B of selector list), changing a sibling or ancestor
will not invalidate that element.

Differential Revision: https://phabricator.services.mozilla.com/D166982
2023-11-06 09:35:57 +01:00
dependabot[bot]
27f79b1d51
build(deps): bump webxr from 2735ed7 to 21d9e38 (#30691)
Bumps [webxr](https://github.com/servo/webxr) from `2735ed7` to `21d9e38`.
- [Commits](2735ed7483...21d9e38eab)

---
updated-dependencies:
- dependency-name: webxr
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-04 07:43:04 +00:00
Oriol Brufau
9b56e95912 Update test expectations 2023-11-04 08:17:09 +01:00
Jonathan Watt
dd372eb5c2 style: Style changes to support the 'page-orientation' property
Differential Revision: https://phabricator.services.mozilla.com/D161800
2023-11-04 08:17:09 +01:00
Oriol Brufau
9e36918bf0 Further changes required by Servo 2023-11-04 08:17:09 +01:00
Zach Hoffman
3076481c52 style: Implement selector matching for :nth-child(An+B of selector list) and :nth-last-child(An+B of selector list)
Since we have been using a single hash map to cache all :nth-child
indices (with no selector list), each different selector will need its
own cache.

As a side note, this patch does not address invalidation.

Differential Revision: https://phabricator.services.mozilla.com/D166266
2023-11-04 08:17:09 +01:00
Emilio Cobos Álvarez
a973371cf2 style: Remove non-standard values of caption-side for good
They have been disabled since bug 1688695. There's a variety of
table-caption bugs that would be easier to fix if we didn't have to
account for side-captions.

Differential Revision: https://phabricator.services.mozilla.com/D165690
2023-11-04 08:17:09 +01:00
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