github web-platform-tests/wpt merge_pr_49006

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
3 months ago

ListItemOrdinal should use explicit_value_ when the element's counter-set CSS property is set to empty

The patch1 ensures that ListItemOrdinal does not use explicit_value_
when the counter-set is set. However, if the counter-set is assigned
an invalid value, ListItemOrdinal value will remain unchanged.
Consider this test case:

<!doctype html>
<ol>
  <li value="5" style="counter-set: list-item 1"></li>
</ol>
<script>
document.body.offsetLeft;
document.querySelector("li").style.counterSet = "";
</script>

The li element should show "5" as the counter-set is not set.
This patch ensures that ListItemOrdinal should use explicit_value_
when counter-set is not set.

Bug: 40205385
Change-Id: I0c9eeda21ef6890e727a6f42c464af412b08eb50
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5992536
Reviewed-by: Joey Arhar jarhar@chromium.org
Commit-Queue: Peng Zhou zhoupeng.1996@bytedance.com
Cr-Commit-Position: refs/heads/main@{#1379108}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.