Closed Bug 2063180 Opened 3 months ago Closed 3 months ago

[wpt-sync] Sync PR 61905 - [css-values-5] Add coverage for the random() caching key in custom properties

Categories

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

task

Tracking

()

RESOLVED FIXED
156 Branch
Tracking Status
firefox156 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

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

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

Joanne Pan <joanne_pan2@apple.com> wrote:

[css-values-5] Add coverage for the random() caching key in custom properties

Adds cases pinning which random() usages share a base value inside custom properties: two registered <length> custom properties on one element, the same custom property on two elements, a custom property against a non-custom one at the same index, property-scoped equality across elements, two random() functions within one custom property, and an author <dashed-ident> that happens to name the property an implicit key is scoped to.

Per https://drafts.csswg.org/css-values-5/#random-caching, property-index-scoped "adds the property name and the index of the random function among all the random functions used in the same property value to the random key". Custom properties can share a single internal property identifier in an implementation, so these pin that the name participates in the key.

The @property initial-value case read the computed value with bracket access on the CSSStyleDeclaration, which never resolves a custom property, so it compared undefined to undefined and could not fail. It now reads with getPropertyValue() and asserts the property is left unregistered.

Corresponding WebKit change: https://github.com/WebKit/WebKit/pull/71477

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Attached file Notable wpt changes —

CI Results

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

Total 500 tests

Status Summary

Firefox

OK : 1[GitHub] 268[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 : 13[GitHub] 21[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 5780[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 5930[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 5938[Gecko-android-em-14-x86_64-debug-geckoview] 5939[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]
FAIL : 147[GitHub] 4466[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 4516[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] 4527[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
TIMEOUT: 1

Chrome

OK : 1
PASS : 158
FAIL : 2

Safari

OK : 1
PASS : 123
FAIL : 37

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

  • /css/css-values/random-computed.tentative.html [wpt.fyi]
    • Property scale value 'random(1, 11)': FAIL linked bug:Bug 1960701
    • Property scale value 'random(--foo element-scoped, 2, 12)': FAIL linked bug:Bug 2034341
    • Property scale value 'random(--foo, 3, 13)': FAIL linked bug:Bug 2031924
    • Property scale value 'random(--foo, 4, 14)': FAIL linked bug:Bug 2031924
    • Property scale value 'random(0, 10, 5)': FAIL linked bug:Bug 2000129
    • Property scale value 'random(--foo element-scoped, 10, 20, 5)': FAIL linked bug:Bug 2034341
    • Property scale value 'random(--foo, 20, 30, 5)': FAIL linked bug:Bug 2031924
    • Property scale value 'random(--foo, 30, 40, 5)': FAIL linked bug:Bug 2031924
    • Property scale value 'random(100, 10)': FAIL linked bug:Bug 1960701
    • Property scale value 'random(-10, -100)': FAIL linked bug:Bug 1960701
    • Property scale value 'random(-100, -10)': FAIL linked bug:Bug 1960701
    • Property scale value 'random(40, 50, -5)': FAIL linked bug:Bug 2000129
    • Property scale value 'random(5 * 1, 30 / 2)': FAIL linked bug:Bug 1960701
    • Property scale value 'calc(2 * random(6, 16))': FAIL linked bug:Bug 1960701
    • Property scale value 'random(NaN, 100)': FAIL linked bug:Bug 1960701
    • Property scale value 'random(10, NaN)': FAIL linked bug:Bug 1960701
    • Property scale value 'random(NaN, NaN)': FAIL linked bug:Bug 1960701
    • Property scale value 'random(NaN, 100, 10)': FAIL linked bug:Bug 2000129
    • Property scale value 'random(10, NaN, 10)': FAIL linked bug:Bug 2000129
    • Property scale value 'random(NaN, NaN, 10)': FAIL linked bug:Bug 2000129
    • Property scale value 'random(NaN, 100, NaN)': FAIL linked bug:Bug 2000129
    • Property scale value 'random(10, NaN, NaN)': FAIL linked bug:Bug 2000129
    • Property scale value 'random(NaN, NaN, NaN)': FAIL linked bug:Bug 2000129
    • Property scale value 'random(10, 100, NaN)': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(NaN, 100))': FAIL linked bug:Bug 1960701
    • Property scale value 'calc(10 + random(10, NaN))': FAIL linked bug:Bug 1960701
    • Property scale value 'calc(10 + random(NaN, NaN))': FAIL linked bug:Bug 1960701
    • Property scale value 'calc(10 + random(NaN, 100, 10))': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(10, NaN, 10))': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(NaN, NaN, 10))': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(NaN, 100, NaN))': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(10, NaN, NaN))': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(NaN, NaN, NaN))': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(10, 100, NaN))': FAIL linked bug:Bug 2000129
    • Property scale value 'random(infinity, 100)': FAIL linked bug:Bug 2000129
    • Property scale value 'random(infinity, infinity)': FAIL linked bug:Bug 2000129
    • Property scale value 'random(infinity, 100, 10)': FAIL linked bug:Bug 2000129
    • Property scale value 'random(infinity, infinity, 10)': FAIL linked bug:Bug 2000129
    • Property scale value 'random(infinity, 100, infinity)': FAIL linked bug:Bug 2000129
    • Property scale value 'random(infinity, infinity, infinity)': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(infinity, 100))': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(infinity, infinity))': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(infinity, infinity, 10))': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(infinity, 100, infinity))': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(infinity, infinity, infinity))': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(infinity, 100, 10))': FAIL linked bug:Bug 2000129
    • Property scale value 'random(10, infinity)': FAIL linked bug:Bug 1960701
    • Property scale value 'random(10, infinity, 10)': FAIL linked bug:Bug 2000129
    • Property scale value 'random(10, infinity, infinity)': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(10, infinity))': FAIL linked bug:Bug 1960701
    • Property scale value 'calc(10 + random(10, infinity, 10))': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(10, infinity, infinity))': FAIL linked bug:Bug 2000129
    • Property scale value 'random(10, 100, -infinity)': FAIL linked bug:Bug 2000129
    • Property scale value 'calc(10 + random(10, 100, -infinity))': FAIL linked bug:Bug 2000129
    • Property scale value on pseudo element '::before' 'random(1, 300000)': FAIL linked bug:Bug 2031432
    • Property scale value on pseudo element '::before' 'random(--bar element-scoped, 1, 300000)': FAIL linked bug:Bug 2034341
    • Property scale value on pseudo element '::before' 'random(--foo, 1, 300000)': FAIL linked bug:Bug 2031924
    • Property translate value 'random(10%, 100%)': FAIL linked bug:Bug 2000129
    • Property translate value 'random(3 * 10% , 10 * 10%)': FAIL linked bug:Bug 2003312
    • Property translate value 'random(10%, 1%)': FAIL linked bug:Bug 2003312
    • Property translate value 'random(--identifier, 10%, 100%)': FAIL linked bug:Bug 2031924
    • Property text-indent value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property flex-basis value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property offset-distance value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property shape-margin value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property stroke-dasharray value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property stroke-dashoffset value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property stroke-width value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property background-position-x value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property background-position-y value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property border-top-left-radius value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property border-top-right-radius value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property border-bottom-left-radius value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property border-bottom-right-radius value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property scroll-padding-top value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property scroll-padding-bottom value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property scroll-padding-left value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property scroll-padding-right value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property cx value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property cy value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property rx value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property ry value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property x value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property y value 'random(10%, 30%)': FAIL linked bug:Bug 2016731
    • Property background-color value 'rgb(225, 215, 0, random(30%, 10%))': FAIL linked bug:Bug 2016731
    • Property font-size value 'random(30%, 10%)': FAIL linked bug:Bug 2003312
    • Property color value 'rgb(random(30, 10) random(60, 10) random(90, 10))': FAIL linked bug:Bug 2010692
    • Property color value 'rgb(from blue random(51, 10) random(g + 51, g) random(b, b))': FAIL linked bug:Bug 2010692
    • Property color value 'color-mix(in srgb, rgb(random(30, 10) 0 0), rgb(random(21, 10) 0 0))': FAIL linked bug:Bug 2010692
    • Property math-depth value 'add(random(30, 10))': FAIL linked bug:Bug 2010692
    • Property background-image value 'image-set(url("http://example.com/image.png") calc(random(fixed 0.3, 0, 10) * 1x))': FAIL linked bug:Bug 2010692
    • Property aspect-ratio value 'random(3, 1) / random(9, 6)': FAIL linked bug:Bug 2010692
    • Property filter value 'drop-shadow(random(3px, 1px) random(6px, 1px) random(9px, 1px) black)': FAIL linked bug:Bug 2010692
    • Property font-variation-settings value '"wght" random(300, 100)': FAIL linked bug:Bug 2010692
    • Property font-feature-settings value '"liga" random(3, 1)': FAIL linked bug:Bug 2010692
    • Property font-style value 'oblique random(90deg, 10deg)': FAIL linked bug:Bug 2010692
    • Property animation-timeline value 'view(random(10px, 10px) random(30px, 10px))': FAIL linked bug:Bug 2010692
    • Property color value 'light-dark(rgb(random(30, 10) random(60, 10) random(90, 10)), rgb(random(30, 10) random(60, 10) random(90, 10)))': FAIL linked bug:Bug 2010692
    • Property rotate value 'random(1, 0) random(1, 0) 1 90deg': FAIL linked bug:Bug 2010692
    • Property rotate value 'x random(90deg, 30deg)': FAIL linked bug:Bug 2010692
    • Property offset-path value 'ray(random(30deg, 10deg))': FAIL linked bug:Bug 2010692
    • Maximum random: 'random(a, b)': FAIL linked bug:Bug 2000129
    • Maximum random - shorthand: random(a, b): FAIL linked bug:Bug 2003312
    • Shared by name within an element: 'random(--identifier element-scoped, a, b)': FAIL linked bug:Bug 2034341
    • Shared globally: random(--identifier, a, b): FAIL linked bug:Bug 2034341
    • Different between properties with percentage value: random(0%, 100%): FAIL linked bug:Bug 2059746
    • Different between elements with percentage value: random(0%, 100%): FAIL linked bug:Bug 2059746
    • random(--identifier element-scoped, ...) should be different between elements: FAIL linked bug:Bug 2034341
    • random() shared by shorthand property in var(), test random() value index: FAIL linked bug:Bug 2017269
    • Test collision with property name and identifier: FAIL linked bug:Bug 2031924

(See attachment for full changes)

Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 156 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: