Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Setting textContent can leave dir=auto content in wrong directionality
https://bugs.webkit.org/show_bug.cgi?id=244446 Reviewed by Antti Koivisto. Add forgotten tests. * LayoutTests/fast/dom/HTMLElement/attr-dir-auto-replace-children-expected.html: Added. * LayoutTests/fast/dom/HTMLElement/attr-dir-auto-replace-children-with-invalid-dir-expected.html: Added. * LayoutTests/fast/dom/HTMLElement/attr-dir-auto-replace-children-with-invalid-dir.html: Added. * LayoutTests/fast/dom/HTMLElement/attr-dir-auto-replace-children.html: Added. Canonical link: https://commits.webkit.org/253896@main
- Loading branch information
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<div id="container"> | ||
<span>b</span> | ||
<span>a</span> | ||
</div> | ||
<style> | ||
#container { width: 100px; } | ||
</style> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<div id="container"> | ||
<span>b</span> | ||
<span>a</span> | ||
</div> | ||
<style> | ||
#container { width: 100px; } | ||
</style> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html class="reftest-wait"> | ||
<body> | ||
<div id="container" dir="auto"> | ||
<span id="rtl">ת</span> | ||
<span>a</span> | ||
</div> | ||
<style> | ||
#container { width: 100px; } | ||
</style> | ||
<script> | ||
|
||
requestAnimationFrame(() => { | ||
setTimeout(() => { | ||
rtl.dir = 'x'; | ||
rtl.textContent = 'b'; | ||
document.documentElement.className = ''; | ||
}, 0); | ||
}); | ||
|
||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html class="reftest-wait"> | ||
<body> | ||
<div id="container" dir="auto"> | ||
<span id="rtl">ת</span> | ||
<span>a</span> | ||
</div> | ||
<style> | ||
#container { width: 100px; } | ||
</style> | ||
<script> | ||
|
||
requestAnimationFrame(() => { | ||
setTimeout(() => { | ||
rtl.textContent = 'b'; | ||
document.documentElement.className = ''; | ||
}, 0); | ||
}); | ||
|
||
</script> | ||
</body> | ||
</html> |