Closed Bug 2018933 Opened 9 months ago Closed 8 months ago

[wpt-sync] Sync PR 58010 - [css-lists] Fix initial value for reversed CSS counters

Categories

(Core :: Layout: Generated Content, Lists, and Counters, task, P4)

task

Tracking

()

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Minseong Kim <jja08111@gmail.com> wrote:

[css-lists] Fix initial value for reversed CSS counters

When counter-reset uses the reversed() function, its initial value
must be calculated based on the number of items within its scope. The
previous implementation did not handle this correctly.

This patch implements the correct behavior according to the CSS spec.
The value calculation for reversed counters is now computed by
traversing the list scope when we face the content-based reset style.

This also amends ol-reversed-dynamic.html test that removes the
value attribute dynamically. This was incorrectly fixed in
crrev.com/c/7126701. It will be fixed in the following CL.

And counter-reset-reversed-* and li-value-reversed-* tests are
created to verify these changes.

Bug: 40682542
Change-Id: I8698e59ee2a692d45e5b3da6a9e0c763440ab4f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7482809
Commit-Queue: Minseong Kim \<jja08111@gmail.com>
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Reviewed-by: Daniil Sakhapov \<sakhapov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1589329}

Component: web-platform-tests → Layout: Generated Content, Lists, and Counters
Product: Testing → Core

CI Results

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

Total 213 tests

Status Summary

Firefox

OK : 35
PASS: 14[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt, GitHub] 901[Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt] 1047[Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt] 1049[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]
FAIL: 57[Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt] 73[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] 75[Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]

Chrome

PASS: 1
FAIL: 13

Safari

PASS: 1
FAIL: 13

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /css/css-lists/counter-001.html [wpt.fyi]: FAIL
  • /css/css-lists/counter-002.html [wpt.fyi]: FAIL
  • /css/css-lists/counter-003.html [wpt.fyi]: FAIL
  • /css/css-lists/counter-list-item-2.html [wpt.fyi]: FAIL
  • /css/css-lists/counter-list-item.html [wpt.fyi]: FAIL [Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt], PASS [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]
  • /css/css-lists/counters-001.html [wpt.fyi]: FAIL
  • /css/css-lists/counters-002.html [wpt.fyi]: FAIL
  • /css/css-lists/counters-003.html [wpt.fyi]: FAIL
  • /css/css-lists/counters-004.html [wpt.fyi]: FAIL
  • /css/css-lists/counters-scope-001.html [wpt.fyi]: FAIL
  • /css/css-lists/counters-scope-002.html [wpt.fyi]: FAIL
  • /css/css-lists/counters-scope-003.html [wpt.fyi]: FAIL
  • /css/css-lists/counters-scope-004.html [wpt.fyi]: FAIL
  • /css/css-lists/foo-counter-reversed-007a.html [wpt.fyi]: FAIL
  • /css/css-lists/foo-counter-reversed-007b.html [wpt.fyi]: FAIL
  • /css/css-lists/foo-counter-reversed-009a.html [wpt.fyi]: FAIL
  • /css/css-lists/foo-counter-reversed-009b.html [wpt.fyi]: FAIL
  • /css/css-lists/list-marker-with-lineheight-and-overflow-hidden-001.html [wpt.fyi]: FAIL [Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt], PASS [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]
  • /css/css-lists/animations/list-style-image-interpolation.html [wpt.fyi]
    • CSS Transitions: property <list-style-image> from neutral to [url(../resources/stripes-20.png)] at (-0.3) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions: property <list-style-image> from neutral to [url(../resources/stripes-20.png)] at (0) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions: property <list-style-image> from neutral to [url(../resources/stripes-20.png)] at (0.3) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from neutral to [url(../resources/stripes-20.png)] at (-0.3) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from neutral to [url(../resources/stripes-20.png)] at (0) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from neutral to [url(../resources/stripes-20.png)] at (0.3) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions: property <list-style-image> from [initial] to [url(../resources/stripes-20.png)] at (-0.3) should be [none]: FAIL
    • CSS Transitions: property <list-style-image> from [initial] to [url(../resources/stripes-20.png)] at (0) should be [none]: FAIL
    • CSS Transitions: property <list-style-image> from [initial] to [url(../resources/stripes-20.png)] at (0.3) should be [none]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [initial] to [url(../resources/stripes-20.png)] at (-0.3) should be [none]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [initial] to [url(../resources/stripes-20.png)] at (0) should be [none]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [initial] to [url(../resources/stripes-20.png)] at (0.3) should be [none]: FAIL
    • CSS Transitions: property <list-style-image> from [inherit] to [url(../resources/stripes-20.png)] at (-0.3) should be [url(../resources/blue-20.png)]: FAIL
    • CSS Transitions: property <list-style-image> from [inherit] to [url(../resources/stripes-20.png)] at (0) should be [url(../resources/blue-20.png)]: FAIL
    • CSS Transitions: property <list-style-image> from [inherit] to [url(../resources/stripes-20.png)] at (0.3) should be [url(../resources/blue-20.png)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [inherit] to [url(../resources/stripes-20.png)] at (-0.3) should be [url(../resources/blue-20.png)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [inherit] to [url(../resources/stripes-20.png)] at (0) should be [url(../resources/blue-20.png)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [inherit] to [url(../resources/stripes-20.png)] at (0.3) should be [url(../resources/blue-20.png)]: FAIL
    • CSS Transitions: property <list-style-image> from [unset] to [url(../resources/stripes-20.png)] at (-0.3) should be [url(../resources/blue-20.png)]: FAIL
    • CSS Transitions: property <list-style-image> from [unset] to [url(../resources/stripes-20.png)] at (0) should be [url(../resources/blue-20.png)]: FAIL
    • CSS Transitions: property <list-style-image> from [unset] to [url(../resources/stripes-20.png)] at (0.3) should be [url(../resources/blue-20.png)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [unset] to [url(../resources/stripes-20.png)] at (-0.3) should be [url(../resources/blue-20.png)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [unset] to [url(../resources/stripes-20.png)] at (0) should be [url(../resources/blue-20.png)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [unset] to [url(../resources/stripes-20.png)] at (0.3) should be [url(../resources/blue-20.png)]: FAIL
    • CSS Transitions: property <list-style-image> from [none] to [url(../resources/stripes-20.png)] at (-0.3) should be [none]: FAIL
    • CSS Transitions: property <list-style-image> from [none] to [url(../resources/stripes-20.png)] at (0) should be [none]: FAIL
    • CSS Transitions: property <list-style-image> from [none] to [url(../resources/stripes-20.png)] at (0.3) should be [none]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [none] to [url(../resources/stripes-20.png)] at (-0.3) should be [none]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [none] to [url(../resources/stripes-20.png)] at (0) should be [none]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [none] to [url(../resources/stripes-20.png)] at (0.3) should be [none]: FAIL
    • CSS Transitions: property <list-style-image> from [url(../resources/green-20.png)] to [url(../resources/stripes-20.png)] at (-0.3) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions: property <list-style-image> from [url(../resources/green-20.png)] to [url(../resources/stripes-20.png)] at (0) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions: property <list-style-image> from [url(../resources/green-20.png)] to [url(../resources/stripes-20.png)] at (0.3) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [url(../resources/green-20.png)] to [url(../resources/stripes-20.png)] at (-0.3) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [url(../resources/green-20.png)] to [url(../resources/stripes-20.png)] at (0) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [url(../resources/green-20.png)] to [url(../resources/stripes-20.png)] at (0.3) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions: property <list-style-image> from [url(../resources/green-20.png)] to [linear-gradient(45deg, blue, orange)] at (-0.3) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions: property <list-style-image> from [url(../resources/green-20.png)] to [linear-gradient(45deg, blue, orange)] at (0) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions: property <list-style-image> from [url(../resources/green-20.png)] to [linear-gradient(45deg, blue, orange)] at (0.3) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [url(../resources/green-20.png)] to [linear-gradient(45deg, blue, orange)] at (-0.3) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [url(../resources/green-20.png)] to [linear-gradient(45deg, blue, orange)] at (0) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [url(../resources/green-20.png)] to [linear-gradient(45deg, blue, orange)] at (0.3) should be [url(../resources/green-20.png)]: FAIL
    • CSS Transitions: property <list-style-image> from [linear-gradient(-45deg, red, yellow)] to [linear-gradient(45deg, blue, orange)] at (-0.3) should be [linear-gradient(-45deg, red, yellow)]: FAIL
    • CSS Transitions: property <list-style-image> from [linear-gradient(-45deg, red, yellow)] to [linear-gradient(45deg, blue, orange)] at (0) should be [linear-gradient(-45deg, red, yellow)]: FAIL
    • CSS Transitions: property <list-style-image> from [linear-gradient(-45deg, red, yellow)] to [linear-gradient(45deg, blue, orange)] at (0.3) should be [linear-gradient(-45deg, red, yellow)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [linear-gradient(-45deg, red, yellow)] to [linear-gradient(45deg, blue, orange)] at (-0.3) should be [linear-gradient(-45deg, red, yellow)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [linear-gradient(-45deg, red, yellow)] to [linear-gradient(45deg, blue, orange)] at (0) should be [linear-gradient(-45deg, red, yellow)]: FAIL
    • CSS Transitions with transition: all: property <list-style-image> from [linear-gradient(-45deg, red, yellow)] to [linear-gradient(45deg, blue, orange)] at (0.3) should be [linear-gradient(-45deg, red, yellow)]: FAIL
  • /css/css-lists/parsing/counter-increment-computed.html [wpt.fyi]
    • Property counter-increment value 'myCounter calc(10 + (sign(2cqw - 10px) * 5))': FAIL
    • Property counter-increment value 'myCounter calc(10 + (sign(2cqw - 10px) * 10)) otherCounter calc(15 + (sign(2cqw - 10px) * 5))': FAIL
  • /css/css-lists/parsing/counter-increment-valid.html [wpt.fyi]
    • e.style['counter-increment'] = "section calc(10 + (5 * sign(2cqw - 10px)))" should set the property value: FAIL
  • /css/css-lists/parsing/counter-reset-computed.html [wpt.fyi]
    • Property counter-reset value 'myCounter calc(10 + (sign(2cqw - 10px) * 5))': FAIL
    • Property counter-reset value 'myCounter calc(10 + (sign(2cqw - 10px) * 5)) otherCounter calc(15 + (sign(2cqw - 10px) * 5))': FAIL
  • /css/css-lists/parsing/counter-reset-valid.html [wpt.fyi]
    • e.style['counter-reset'] = "section calc(10 + (5 * sign(2cqw - 10px)))" should set the property value: FAIL
  • /css/css-lists/parsing/counter-set-computed.html [wpt.fyi]
    • Property counter-set value 'myCounter calc(10 + (sign(2cqw - 10px) * 5))': FAIL
    • Property counter-set value 'myCounter calc(10 + (sign(2cqw - 10px) * 5)) otherCounter calc(15 + (sign(2cqw - 10px) * 5))': FAIL
  • /css/css-lists/parsing/counter-set-valid.html [wpt.fyi]
    • e.style['counter-set'] = "section calc(10 + (5 * sign(2cqw - 10px)))" should set the property value: FAIL
Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/284d28e1fb1d https://hg.mozilla.org/integration/autoland/rev/52157fd63da4 [wpt PR 58010] - [css-lists] Fix initial value for reversed CSS counters, a=testonly
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
You need to log in before you can comment on or make changes to this bug.