LibWeb: Use the correct locale when applying titlecase

Previously with lang="nl" and text-transform: capitalize, inner text
"ijsland" would turn to "Ijsland" instead of "IJsland", now it's as it
should be.

This fixes:
https://wpt.fyi/results/css/css-text/text-transform/text-transform-tailoring-001.html
This commit is contained in:
Grubre 2024-10-26 11:23:34 +02:00 committed by Tim Flynn
commit 95c511a3f6
Notes: github-actions[bot] 2024-10-28 21:56:10 +00:00
3 changed files with 36 additions and 3 deletions

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<style type='text/css'>
.test { text-transform: capitalize; }
</style>
</head>
<script src="../include.js"></script>
<body>
<div class="test" lang="nl">ijsland</div>
<div class="test" lang="en">ijsland</div>
<div>IJsland</div>
<script>
test(() => {
var elements = document.getElementsByClassName('test');
for (var i = 0; i < elements.length; i++) {
println(elements[i].innerText);
}
});
</script>
</body>
</html>