LibWeb: Always parse <counter-style> as such

Previously we parsed it as `<custom-ident>` in `<counter>` and as a
keyword in `list-style-type`.

The practical effect of this is:
 - Spec defined counter style names in `<counter>` are ASCII lowercased
   on parse.
 - Non spec defined counter style names are allowed in `list-style-type.

We are still to parse the `symbols()` function but this gives us a
better base for that.
This commit is contained in:
Callum Law
2026-02-04 12:24:04 +13:00
committed by Sam Atkins
parent 05cafdb5d0
commit 8a82d116d6
Notes: github-actions[bot] 2026-02-12 10:34:28 +00:00
22 changed files with 197 additions and 103 deletions

View File

@@ -2,8 +2,8 @@ Harness status: OK
Found 41 tests
30 Pass
11 Fail
38 Pass
3 Fail
Pass Property content value 'open-quote'
Pass Property content value 'open-quote / "alt text"'
Pass Property content value 'close-quote'
@@ -16,18 +16,18 @@ Pass Property content value 'counter(counter-name)'
Pass Property content value 'counter(counter-name) / "alt text"'
Pass Property content value 'counter(counter-name, counter-style)'
Pass Property content value 'counter(counter-name, counter-style) / "alt text"'
Fail Property content value 'counter(counter-name, dECiMaL)'
Fail Property content value 'counter(counter-name, dECiMaL) / "alt text"'
Fail Property content value 'counter(counter-name, DECIMAL)'
Fail Property content value 'counter(counter-name, DECIMAL) / "alt text"'
Pass Property content value 'counter(counter-name, dECiMaL)'
Pass Property content value 'counter(counter-name, dECiMaL) / "alt text"'
Pass Property content value 'counter(counter-name, DECIMAL)'
Pass Property content value 'counter(counter-name, DECIMAL) / "alt text"'
Pass Property content value 'counters(counter-name, ".")'
Pass Property content value 'counters(counter-name, ".") / "alt text"'
Pass Property content value 'counters(counter-name, ".", counter-style)'
Pass Property content value 'counters(counter-name, ".", counter-style) / "alt text"'
Fail Property content value 'counters(counter-name, ".", dECiMaL)'
Fail Property content value 'counters(counter-name, ".", dECiMaL) / "alt text"'
Fail Property content value 'counters(counter-name, ".", DECIMAL)'
Fail Property content value 'counters(counter-name, ".", DECIMAL) / "alt text"'
Pass Property content value 'counters(counter-name, ".", dECiMaL)'
Pass Property content value 'counters(counter-name, ".", dECiMaL) / "alt text"'
Pass Property content value 'counters(counter-name, ".", DECIMAL)'
Pass Property content value 'counters(counter-name, ".", DECIMAL) / "alt text"'
Pass Property content value 'url("https://www.example.com/picture.svg")'
Pass Property content value 'url("https://www.example.com/picture.svg") / "alt text"'
Pass Property content value '"hello"'

View File

@@ -2,8 +2,7 @@ Harness status: OK
Found 42 tests
34 Pass
8 Fail
42 Pass
Pass e.style['content'] = "none" should set the property value
Pass e.style['content'] = "normal" should set the property value
Pass e.style['content'] = "open-quote" should set the property value
@@ -18,18 +17,18 @@ Pass e.style['content'] = "counter(counter-name)" should set the property value
Pass e.style['content'] = "counter(counter-name) / \"alt text\"" should set the property value
Pass e.style['content'] = "counter(counter-name, counter-style)" should set the property value
Pass e.style['content'] = "counter(counter-name, counter-style) / \"alt text\"" should set the property value
Fail e.style['content'] = "counter(counter-name, dECiMaL)" should set the property value
Fail e.style['content'] = "counter(counter-name, dECiMaL) / \"alt text\"" should set the property value
Fail e.style['content'] = "counter(counter-name, DECIMAL)" should set the property value
Fail e.style['content'] = "counter(counter-name, DECIMAL) / \"alt text\"" should set the property value
Pass e.style['content'] = "counter(counter-name, dECiMaL)" should set the property value
Pass e.style['content'] = "counter(counter-name, dECiMaL) / \"alt text\"" should set the property value
Pass e.style['content'] = "counter(counter-name, DECIMAL)" should set the property value
Pass e.style['content'] = "counter(counter-name, DECIMAL) / \"alt text\"" should set the property value
Pass e.style['content'] = "counters(counter-name, \".\")" should set the property value
Pass e.style['content'] = "counters(counter-name, \".\") / \"alt text\"" should set the property value
Pass e.style['content'] = "counters(counter-name, \".\", counter-style)" should set the property value
Pass e.style['content'] = "counters(counter-name, \".\", counter-style) / \"alt text\"" should set the property value
Fail e.style['content'] = "counters(counter-name, \".\", dECiMaL)" should set the property value
Fail e.style['content'] = "counters(counter-name, \".\", dECiMaL) / \"alt text\"" should set the property value
Fail e.style['content'] = "counters(counter-name, \".\", DECIMAL)" should set the property value
Fail e.style['content'] = "counters(counter-name, \".\", DECIMAL) / \"alt text\"" should set the property value
Pass e.style['content'] = "counters(counter-name, \".\", dECiMaL)" should set the property value
Pass e.style['content'] = "counters(counter-name, \".\", dECiMaL) / \"alt text\"" should set the property value
Pass e.style['content'] = "counters(counter-name, \".\", DECIMAL)" should set the property value
Pass e.style['content'] = "counters(counter-name, \".\", DECIMAL) / \"alt text\"" should set the property value
Pass e.style['content'] = "url(\"picture.svg\")" should set the property value
Pass e.style['content'] = "url(\"picture.svg\") / \"alt text\"" should set the property value
Pass e.style['content'] = "\"hello\"" should set the property value