Closed Bug 2033903 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 59382 - Add <random-ua-ident> to random()

Categories

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

task

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox152 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

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

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

moonira <moonira@google.com> wrote:

Add <random-ua-ident> to random()

As resolved in [0], this CL adds support for \<random-ua-ident> to the
\<random-cache-key> grammar, alongside the existing "property-scoped" and
"property-index-scoped" keywords. The CL changes the current
implementation by following:

  • Refactored RandomCacheKey::RandomName to store a single ua_ident
    string (representing \<random-ua-ident>) instead of separate property and
    index fields.
  • If \<random-cache-key> is either omitted, auto or includes
    "property-scoped" or "property-index-scoped", replace them with the
    corresponding \<random-ua-ident> during parsing.
  • Added support for parsing explicit, user-specified \<random-ua-ident>
    values (custom identifiers starting with "ua-").
  • Changed RandomCacheKey "auto" values to use a null string identifier
    internally instead of the literal "auto".

Note: The latest random spec [1] makes \<dashed-ident> optional in
\<random-cache-key>. This CL does not address that change; it will be
handled in a follow-up.

[0]
https://github.com/w3c/csswg-drafts/issues/13337#issuecomment-4171516871
[1] https://drafts.csswg.org/css-values-5/#random

Fixed: 498616801
Bug: 413385732
Change-Id: Ia87fe6d23d42bf7d66ac251e0dac1303404051ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7771596
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Commit-Queue: Munira Tursunova \<moonira@google.com>
Cr-Commit-Position: refs/heads/main@{#1618142}

PR 59382 applied with additional changes from upstream: d683cff678ff7ac7f1a24856bd892c7f0af630e0, 30794ddd1660f5dfe791bbc660754fc8e7d224f1

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

CI Results

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

Total 437 tests

Status Summary

Firefox

OK : 2[GitHub] 235[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-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 10[GitHub] 20[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 5282[Gecko-windows11-32-25h2-debug] 5415[Gecko-linux2404-64-opt] 5416[Gecko-linux2404-64-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 5426[Gecko-android-em-14-x86_64-debug-geckoview] 5427[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]
FAIL : 191[GitHub] 4341[Gecko-windows11-32-25h2-debug] 4376[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] 4389[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
TIMEOUT: 1

Chrome

OK : 2
PASS : 173
FAIL : 28

Safari

OK : 2
PASS : 132
FAIL : 69

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, 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, 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(--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
    • 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
  • /css/css-values/random-serialize.tentative.html [wpt.fyi]
    • e.style['width'] = "random(fixed 0.5, 0px, 100px)" should set the property value: FAIL linked bug:Bug 2000129
    • e.style['width'] = "random(--foo, 0px, 100px)" should set the property value: FAIL linked bug:Bug 1960701
    • e.style['width'] = "random(fixed 0.5, 0px, 100px, 3px)" should set the property value: FAIL linked bug:Bug 2031924
    • e.style['width'] = "random(--foo, 0px, 100px, 3px)" should set the property value: FAIL linked bug:Bug 2031924
    • e.style['width'] = "random(--foo, 100px, 0px)" should set the property value: FAIL
    • e.style['width'] = "random(--foo, -100px, -10px)" should set the property value: FAIL
    • e.style['width'] = "random(--foo, -100px, -10px, -5px)" should set the property value: FAIL
    • e.style['width'] = "random(--foo, 1em, 200rem)" should set the property value: FAIL
    • e.style['width'] = "random(--foo, 10 * 100px, 200em / 2)" should set the property value: FAIL
    • e.style['width'] = "random(fixed calc(2 / 4), 0px, 100px)" should set the property value: FAIL linked bug:Bug 2000129
    • e.style['width'] = "calc(2 * random(--foo, 0px, 100px))" should set the property value: FAIL
    • e.style['math-depth'] = "add(random(--foo, 0, 3))" should set the property value: FAIL
    • e.style['color'] = "rgb(random(--foo, 0, 255) random(--foo, 0, 255) random(--foo, 0, 255))" should set the property value: FAIL
    • e.style['color'] = "color-mix(in srgb, rgb(random(--foo, 0, 255) 0 random(--foo, 0, 255)), rgb(0 random(--foo, 0, 255) 0))" should set the property value: FAIL
    • e.style['max-lines'] = "random(--foo, 25, 50)" should set the property value: FAIL
    • e.style['max-lines'] = "random(--foo, 25, 50, 5)" should set the property value: FAIL
    • e.style['scale'] = "random(--foo, 0.5, 2.5)" should set the property value: FAIL
    • e.style['scale'] = "random(--foo, 0.5, 2.5, 0.1)" should set the property value: FAIL
    • e.style['rotate'] = "random(--foo, 25deg, 1turn, 5deg)" should set the property value: FAIL
    • e.style['transition-delay'] = "random(--foo, 25ms, 50s, 5s)" should set the property value: FAIL

(See attachment for full changes)

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

Attachment

General

Created:
Updated:
Size: