CSS text-transform: capitalize is broken for Dutch

#41248541 Filed 2016-04-11 Status: Assigned P4 / S5

The bug

In Dutch, the digraph ij is capitalized as a unit: IJsland, not Ijsland. CSS text-transform: capitalize with lang="nl" should produce the former. Chrome still produces the latter.

Open this page in Chrome, Firefox and Safari to see the difference live.

Rendered (your browser)

ijsland

text-transform: capitalize, lang="nl", source ijsland.

Expected (per CSS spec)

IJsland

Both I and J should be title-cased. See CSS Text 3 / text-transform and the WPT test text-transform-tailoring-001.html.

More Dutch digraph samples

ijsselmeer (lake)

ijsselmeer

Expected: IJsselmeer

ijmuiden hoogovens

ijmuiden hoogovens

Expected: IJmuiden Hoogovens

de ijzeren eeuw

de ijzeren eeuw

Expected: De IJzeren Eeuw

mid-word (not at start of word)

aijsland

Expected: Aijsland (IJ only capitalized at the start of a word)

Why it is still unfixed

The Dutch rule landed in CL 6534261 on 2025-05-18, but it only takes effect when the ICUCapitalization runtime flag is on, and that flag is still experimental.

The flag was flipped default-on with CL 6600309 and reverted five days later with CL 6605971 after Speedometer3 regressed 4.34% on win-11-perf (crbug/420998400). So Dutch is correct in theory but not for users.

What causes the regression

Blink's title-casing asks ICU to find word boundaries without handing it a reusable iterator, so ICU builds a fresh one on every call. Speedometer3's Perf-Dashboard subtest title-cases a lot of very short strings, which makes that per-call setup the dominant cost. Caching the iterator per thread, the way the rest of Blink already does, removes it.

Measurements

Speedometer3 on Pinpoint, 20 attempts per arm, Perf-Dashboard subtest in milliseconds (smaller is better), compared against today's shipping behavior with the flag off:

Arm linux-perf mac-m3-pro-perf
Flag on, without the fix +3.21% +7.80%
Flag on, with the fix +0.65% +0.02%

The first row shows the 2025 regression still reproduces on current main, so it did not resolve on its own. The second row shows it goes away. On mac every other subtest stays within ±0.8% in both runs, so Perf-Dashboard is the isolated signal. The overall Speedometer3 score is flat either way (within ±0.7%), so this is perf-neutral for users rather than a speedup — the reason to ship it is correctness.

Links

Issue 41248541 Perf bug 420998400 CL 8622687 (proposed fix) CL 6534261 (Dutch rule) WPT test