mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 18:17:23 +00:00
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:
parent
5ac1a24255
commit
95c511a3f6
Notes:
github-actions[bot]
2024-10-28 21:56:10 +00:00
Author: https://github.com/Grubre
Commit: 95c511a3f6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1974
Reviewed-by: https://github.com/trflynn89
3 changed files with 36 additions and 3 deletions
26
Tests/LibWeb/Text/input/DOM/Element-to_titlecase-lang.html
Normal file
26
Tests/LibWeb/Text/input/DOM/Element-to_titlecase-lang.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue