Closed Bug 2086908 Opened 27 days ago Closed 14 days ago

[wpt-sync] Sync PR 64180 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=320984

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 64180 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/64180
Details from upstream follow.

Joanne Pan <jpan0917@gmail.com> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=320984

WebKit export from bug: [<!---->css-<!---->values-<!---->5 inherit(<!---->)<!---->]<!----> Implement inherit(<!---->)<!----> substitution function

<pre>
[css-values-5 inherit()] Implement inherit() substitution function

Implement the inherit() arbitrary substitution function, which resolves to the
inherited value of a custom property, meaning the parent's computed value, with
an optional second argument as a fallback when the first resolves to the
guaranteed-invalid value.

<inherit()> = inherit( <custom-property-name>, <declaration-value>? )

The argument grammar is the same as attr()'s, so parsing and argument
substitution are shared with it. The first argument is substituted before being
parsed as a custom property name, and failing that parse falls through to the
fallback rather than being an error.

Inside a custom function the parent is the calling context's element, whose
custom properties resolve lazily, so the read forces that property first.
Otherwise the result would depend on the calling element's declaration order.

The cascade now re-applies a declaration containing inherit() when the parent's
non-inherited style changes, where it previously recognised only a literally
written inherit keyword. This covers custom property declarations too, which
also fixes the pre-existing case of --y: inherit on a non-inherited
registered property. A declaration that only reads such a property, as in
border-color: var(--y), is still not re-applied; that is the more general
problem tracked in bug 321094.

Behind the CSSInheritFunctionEnabled setting, off by default.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=320984">https://bugs.webkit.org/show_bug.cgi?id=320984</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/318999@main">https://commits.webkit.org/318999@main</a>
</pre>

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 125 tests and 1 subtests

Status Summary

Firefox

OK : 1[GitHub] 111[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 1[GitHub] 7[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 1263[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 1270[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 1[GitHub] 137[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
PASS: 2

Safari

OK : 1
PASS: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

  • /css/css-properties-values-api/at-property-animation.html [wpt.fyi]
    • CSS animation setting "inherit" for a custom property on a keyframe is responsive to changing that custom property on the parent.: FAIL
    • JS-originated animation setting "inherit" for a custom property on a keyframe is responsive to changing that custom property on the parent.: FAIL
  • /css/css-properties-values-api/at-property-shadow.html [wpt.fyi]
    • @property rules in shadow trees should be globally registered: FAIL
  • /css/css-properties-values-api/at-property-typedom.html [wpt.fyi]
    • Properties declared with @property reify correctly: FAIL
    • Re-declaring a property with a different type affects reification: FAIL
  • /css/css-properties-values-api/custom-property-explicit-inherit-invalidation.html [wpt.fyi]
    • inherit() on a non-inherited custom property tracks the parent: FAIL (Chrome: PASS, Safari: PASS)
  • /css/css-properties-values-api/font-property-unit-cycles.tentative.html [wpt.fyi]
    • font-size calc() with registered custom property and em uses parent em: FAIL
    • font-size calc() with registered custom property and ex uses parent ex: FAIL
    • font-size calc() with registered custom property and cap uses parent cap: FAIL
    • font-size calc() with registered custom property and ch uses parent ch: FAIL
    • font-size calc() with registered custom property and ic uses parent ic: FAIL
    • font-size-adjust calc() with em uses parent em: FAIL
    • font-size-adjust calc() with ex uses parent ex: FAIL
    • font-size-adjust calc() with cap uses parent cap: FAIL
    • font-size-adjust calc() with ch uses parent ch: FAIL
    • font-size-adjust calc() with ic uses parent ic: FAIL
    • font-weight calc() with em uses parent em: FAIL
    • font-weight calc() with ex uses parent ex: FAIL
    • font-weight calc() with cap uses parent cap: FAIL
    • font-weight calc() with ch uses parent ch: FAIL
    • font-weight calc() with ic uses parent ic: FAIL
    • font-stretch calc() with em uses parent em: FAIL
    • font-stretch calc() with ex uses parent ex: FAIL
    • font-stretch calc() with cap uses parent cap: FAIL
    • font-stretch calc() with ch uses parent ch: FAIL
    • font-stretch calc() with ic uses parent ic: FAIL
    • font-style calc() with em uses parent em: FAIL
    • font-style calc() with ex uses parent ex: FAIL
    • font-style calc() with cap uses parent cap: FAIL
    • font-style calc() with ch uses parent ch: FAIL
    • font-style calc() with ic uses parent ic: FAIL
    • font-feature-settings calc() with em uses parent em: FAIL
    • font-feature-settings calc() with ex uses parent ex: FAIL
    • font-feature-settings calc() with cap uses parent cap: FAIL
    • font-feature-settings calc() with ch uses parent ch: FAIL
    • font-feature-settings calc() with ic uses parent ic: FAIL
    • font-variation-settings calc() with em uses parent em: FAIL
    • font-variation-settings calc() with ex uses parent ex: FAIL
    • font-variation-settings calc() with cap uses parent cap: FAIL
    • font-variation-settings calc() with ch uses parent ch: FAIL
    • font-variation-settings calc() with ic uses parent ic: FAIL
    • <number> registered custom property with em and no cycle uses element em: FAIL
    • <number> registered custom property with ex and no cycle uses element ex: FAIL
    • <number> registered custom property with cap and no cycle uses element cap: FAIL
    • <number> registered custom property with ch and no cycle uses element ch: FAIL
    • <number> registered custom property with ic and no cycle uses element ic: FAIL
    • <integer> registered custom property with em and no cycle uses element em: FAIL
    • <integer> registered custom property with ex and no cycle uses element ex: FAIL
    • <integer> registered custom property with cap and no cycle uses element cap: FAIL
    • <integer> registered custom property with ch and no cycle uses element ch: FAIL
    • <integer> registered custom property with ic and no cycle uses element ic: FAIL
    • <angle> registered custom property with em and no cycle uses element em: FAIL
    • <angle> registered custom property with ex and no cycle uses element ex: FAIL
    • <angle> registered custom property with cap and no cycle uses element cap: FAIL
    • <angle> registered custom property with ch and no cycle uses element ch: FAIL
    • <angle> registered custom property with ic and no cycle uses element ic: FAIL
    • <percentage> registered custom property with em and no cycle uses element em: FAIL
    • <percentage> registered custom property with ex and no cycle uses element ex: FAIL
    • <percentage> registered custom property with cap and no cycle uses element cap: FAIL
    • <percentage> registered custom property with ch and no cycle uses element ch: FAIL
    • <percentage> registered custom property with ic and no cycle uses element ic: FAIL
  • /css/css-properties-values-api/registered-property-ident-function.html [wpt.fyi]
    • The ident() function is resolved in a registered custom property: FAIL
  • /css/css-properties-values-api/typedom.html [wpt.fyi]
    • Computed <angle> is reified as CSSUnitValue: FAIL
    • Computed <custom-ident> is reified as CSSKeywordValue: FAIL
    • Computed <image> [url] is reified as CSSImageValue: FAIL
    • Computed <integer> is reified as CSSUnitValue: FAIL
    • Computed <length-percentage> [%] is reified as CSSUnitValue: FAIL
    • Computed <length-percentage> [px] is reified as CSSUnitValue: FAIL
    • Computed <length-percentage> [px + %] is reified as CSSMathSum: FAIL
    • Computed <length> is reified as CSSUnitValue: FAIL
    • Computed <number> is reified as CSSUnitValue: FAIL
    • Computed <percentage> is reified as CSSUnitValue: FAIL
    • Computed <resolution> is reified as CSSUnitValue: FAIL
    • Computed <time> is reified as CSSUnitValue: FAIL
    • Computed ident is reified as CSSKeywordValue: FAIL
    • First computed value correctly reified in space-separated list: FAIL
    • First computed value correctly reified in comma-separated list: FAIL
    • All computed values correctly reified in space-separated list: FAIL
    • All computed values correctly reified in comma-separated list: FAIL
    • CSSKeywordValue rejected by set() for syntax * [attributeStyleMap]: FAIL
    • CSSKeywordValue rejected by set() for syntax * [styleMap]: FAIL
    • CSSKeywordValue rejected by set() for syntax foo [attributeStyleMap]: FAIL
    • CSSKeywordValue rejected by set() for syntax foo [styleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <angle> [attributeStyleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <angle> [styleMap]: FAIL
    • CSSKeywordValue rejected by set() for syntax <custom-ident> [attributeStyleMap]: FAIL
    • CSSKeywordValue rejected by set() for syntax <custom-ident> [styleMap]: FAIL
    • CSSImageValue rejected by set() for syntax <image> [attributeStyleMap]: FAIL
    • CSSImageValue rejected by set() for syntax <image> [styleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <integer> [attributeStyleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <integer> [styleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <length-percentage> [attributeStyleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <length-percentage> [styleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <length> [attributeStyleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <length> [styleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <number> [attributeStyleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <number> [styleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <percentage> [attributeStyleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <percentage> [styleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <resolution> [attributeStyleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <resolution> [styleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <time> [attributeStyleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <time> [styleMap]: FAIL
    • CSSTransformValue rejected by set() for syntax <transform-list> [attributeStyleMap]: FAIL
    • CSSTransformValue rejected by set() for syntax <transform-list> [styleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <length>+ [attributeStyleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <length>+ [styleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <length># [attributeStyleMap]: FAIL
    • CSSUnitValue rejected by set() for syntax <length># [styleMap]: FAIL
    • Computed <angle> is reified as CSSUnitValue by iterator: FAIL
    • Computed <custom-ident> is reified as CSSKeywordValue by iterator: FAIL
    • Computed <image> is reified as CSSImageValue by iterator: FAIL
    • Computed <integer> is reified as CSSUnitValue by iterator: FAIL
    • Computed <length> is reified as CSSUnitValue by iterator: FAIL
    • Computed <number> is reified as CSSUnitValue by iterator: FAIL
    • Computed <percentage> is reified as CSSUnitValue by iterator: FAIL
    • Computed <resolution> is reified as CSSUnitValue by iterator: FAIL
    • Computed <time> is reified as CSSUnitValue by iterator: FAIL
    • Computed none | thing | THING is reified as CSSKeywordValue by iterator: FAIL
    • Computed <angle> | <length> is reified as CSSUnitValue by iterator: FAIL
  • /css/css-properties-values-api/var-reference-registered-properties.html [wpt.fyi]
    • Invalid values for registered properties are serialized as the empty string: FAIL
  • /css/css-properties-values-api/animation/custom-property-animation-length-percentage-comma-list.html [wpt.fyi]
    • Animating a custom property of type <length-percentage># with iterationComposite: FAIL
  • /css/css-properties-values-api/animation/custom-property-animation-length-percentage-space-list.html [wpt.fyi]
    • Animating a custom property of type <length-percentage>+ with iterationComposite: FAIL
  • /css/css-properties-values-api/animation/custom-property-animation-list-type-mismatch.html [wpt.fyi]
    • Additive animation of <transform-function> when underlying value is a multi-item <transform-list>: FAIL
    • Additive <transform-function># animation with dynamic underlying list length and value update: FAIL
  • /css/css-properties-values-api/animation/custom-property-animation-transform-function.html [wpt.fyi]
    • Animating a custom property of type <transform-function> with additivity: FAIL
    • Animating a custom property of type <transform-function> with a single keyframe and additivity: FAIL
  • /css/css-properties-values-api/animation/custom-property-animation-transform-list-multiple-values.html [wpt.fyi]
    • Animating a custom property of type <transform-list> containing multiple values and with mismatching list lengths: FAIL
  • /css/css-properties-values-api/animation/custom-property-animation-transform-none.tentative.html [wpt.fyi]
    • Animating a custom property of type "<transform-list>|none" from "none" to <transform-list> value: FAIL
    • Animating a custom property of type "<transform-function>|none" from "none" to <transform-function> value: FAIL
  • /css/css-properties-values-api/animation/custom-property-transition-property-all.html [wpt.fyi]
    • A custom property can yield a CSS Transition with transition-property: all: FAIL
  • /css/css-properties-values-api/animation/custom-property-transition-transform-function-box-size.tentative.html [wpt.fyi]
    • A custom property of type <transform-function> yields a CSS Transition using the mix function for a box size dependent matrix interpolation: FAIL
  • /css/css-properties-values-api/animation/custom-property-transition-transform-function-none.tentative.html [wpt.fyi]
    • A custom property keyword none is not a <transform-function> value and is not interpolable with <transform-function> values: FAIL
  • /css/css-properties-values-api/animation/custom-property-transition-transform-function-to-list.html [wpt.fyi]
    • A custom property cannot yield a CSS Transition from <transform-function> to <transform-list>: FAIL
  • /css/css-properties-values-api/animation/custom-property-transition-transform-list-box-size.tentative.html [wpt.fyi]
    • A custom property of type <transform-list> yields a CSS Transition using the mix function for a box size dependent matrix interpolation: FAIL
  • /css/css-properties-values-api/animation/custom-property-transition-transform-list-none.tentative.html [wpt.fyi]
    • A custom property keyword none is not a <transform-list> value and is not interpolable with <transform-list> values: FAIL
  • /css/css-properties-values-api/animation/registered-var-to-registered-animating.html [wpt.fyi]
    • Animated registered custom properties can var() reference other animated registered custom properties across separate Animations.: FAIL
Status: NEW → RESOLVED
Closed: 14 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.