From 8f8a5e292554ba41df94dea984b5fab7369f4349 Mon Sep 17 00:00:00 2001 From: Rune Lillesveen Date: Thu, 21 May 2026 14:39:27 +0000 Subject: [PATCH] Bug 2040796 [wpt PR 59983] - Escaped idents when serializing CSS counter names, a=testonly Automatic update from web-platform-tests Escaped idents when serializing CSS counter names There was missing escaping for idents when serializing counter names in: - The counter-set/reset/increment property values - The content property value Bug: 514429130 Change-Id: Ia21161017622af951fb6895bb995af396489f04e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7859556 Reviewed-by: Daniil Sakhapov Commit-Queue: Rune Lillesveen Cr-Commit-Position: refs/heads/main@{#1632982} -- wpt-commits: cc6b06b2b383081ed75d6100d3bf379eac66aae7 wpt-pr: 59983 --- .../tests/css/css-content/parsing/content-valid.html | 3 +++ .../tests/css/css-lists/parsing/counter-increment-valid.html | 1 + .../tests/css/css-lists/parsing/counter-reset-valid.html | 1 + .../tests/css/css-lists/parsing/counter-set-valid.html | 1 + 4 files changed, 6 insertions(+) diff --git a/testing/web-platform/tests/css/css-content/parsing/content-valid.html b/testing/web-platform/tests/css/css-content/parsing/content-valid.html index 097bf66f62b2..80bb54f8dcb3 100644 --- a/testing/web-platform/tests/css/css-content/parsing/content-valid.html +++ b/testing/web-platform/tests/css/css-content/parsing/content-valid.html @@ -47,6 +47,9 @@ test_valid_value_combinations("content", `counters(counter-name, ".") "potato"`) test_valid_value_combinations("content", `"(" counters(counter-name, ".", counter-style) ")"`); test_valid_value_combinations("content", `open-quote "hello" "world" close-quote`); test_valid_value_combinations("content", `url("picture.svg") "hello"`); + +test_valid_value_combinations("content", "counter(\\})"); +test_valid_value_combinations("content", `counters(\\}, ".")`); diff --git a/testing/web-platform/tests/css/css-lists/parsing/counter-increment-valid.html b/testing/web-platform/tests/css/css-lists/parsing/counter-increment-valid.html index 0187622339d8..557290f87005 100644 --- a/testing/web-platform/tests/css/css-lists/parsing/counter-increment-valid.html +++ b/testing/web-platform/tests/css/css-lists/parsing/counter-increment-valid.html @@ -20,6 +20,7 @@ test_valid_value('counter-increment', 'section calc(-2.5)'); test_valid_value('counter-increment', 'section calc(10 + (5 * sign(2cqw - 10px)))'); test_valid_value('counter-increment', 'a 1 b 2 c 3 d 4 e 5'); test_valid_value('counter-increment', 'a 1 b 2 c 3 a 4 b 5'); +test_valid_value('counter-increment', 'a\\ 8 9'); diff --git a/testing/web-platform/tests/css/css-lists/parsing/counter-reset-valid.html b/testing/web-platform/tests/css/css-lists/parsing/counter-reset-valid.html index 4e462919edbe..55c9f5e4e394 100644 --- a/testing/web-platform/tests/css/css-lists/parsing/counter-reset-valid.html +++ b/testing/web-platform/tests/css/css-lists/parsing/counter-reset-valid.html @@ -26,6 +26,7 @@ test_valid_value('counter-reset', 'section calc(-2.5)'); test_valid_value('counter-reset', 'section calc(10 + (5 * sign(2cqw - 10px)))'); test_valid_value('counter-reset', 'a 1 b 2 c 3 d 4 e 5'); test_valid_value('counter-reset', 'a 1 b 2 c 3 a 4 b 5'); +test_valid_value('counter-reset', 'a\\ 8 9'); diff --git a/testing/web-platform/tests/css/css-lists/parsing/counter-set-valid.html b/testing/web-platform/tests/css/css-lists/parsing/counter-set-valid.html index f7f1c661296a..e985fcae149f 100644 --- a/testing/web-platform/tests/css/css-lists/parsing/counter-set-valid.html +++ b/testing/web-platform/tests/css/css-lists/parsing/counter-set-valid.html @@ -20,6 +20,7 @@ test_valid_value('counter-set', 'section calc(-2.5)'); test_valid_value('counter-set', 'section calc(10 + (5 * sign(2cqw - 10px)))'); test_valid_value('counter-set', 'a 1 b 2 c 3 d 4 e 5'); test_valid_value('counter-set', 'a 1 b 2 c 3 a 4 b 5'); +test_valid_value('counter-set', 'a\\ 8 9');