Files
sousa-gecko/testing/web-platform/tests/css/css-lists/li-value-reversed-024.html
T
Minseong Kim 62bedbcc44 Bug 2010008 [wpt PR 57149] - [css-lists] Implement presentational hint for the counter-reset, a=testonly
Automatic update from web-platform-tests
[css-lists] Implement presentational hint for the `counter-reset`

This CL updates <ol> to implicitly set `counter-reset` for the list-item
counter when the `reversed` or `start` attributes are present in <ol>.

Previously, `start` and `reversed` relied on internal state within
HTMLOListElement. This change moves the source of truth to
ComputedStyle, ensuring that the counter logic in the style engine fully
drives list numbering. This is achieved by:
- Implementing presentational hint for the `counter-reset`.
- Updating `HTMLOListElement` to read start/reversed values directly
  from the ComputedStyle's counter directives.

This change aligns with Firefox's behavior and the specification.

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

--

wpt-commits: 23c9b2a142785fe2ad2283b9ec49de3420c9b2d6
wpt-pr: 57149
2026-01-16 07:55:17 +00:00

14 lines
621 B
HTML

<!doctype html>
<title>Overriding reversed attribute of ol by counter-reset: reversed(counter)</title>
<link rel="help" href="https://html.spec.whatwg.org/#attr-ol-reversed">
<link rel="help" href="https://html.spec.whatwg.org/#ordinal-value">
<link rel="help" href="https://drafts.csswg.org/css-lists-3/#auto-numbering">
<link rel="help" href="https://drafts.csswg.org/css-lists-3/#instantiating-counters">
<link rel="author" title="Minseong Kim" href="mailto:jja08111@gmail.com">
<link rel="match" href="li-value-reversed-024-ref.html">
<ol reversed style="counter-reset: list-item">
<li>One
<li>Two
<li>Three
</ol>