forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Clear grapheme segmenter when invalidating TextNode text
We only set the grapheme segmenter's text once after creating a new segmenter, so we also need to clear it whenever we invalidate the text. (cherry picked from commit 25516e351e46104ff445216e7835aaab9f9b9535)
- Loading branch information
Showing
3 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
Tests/LibWeb/Ref/reference/textnode-segmenter-invalidation.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,2 @@ | ||
<!DOCTYPE html><textarea>a | ||
b</textarea> |
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,9 @@ | ||
<!DOCTYPE html> | ||
<head><link rel="match" href="reference/textnode-segmenter-invalidation.html" /></head> | ||
<textarea id="output"></textarea> | ||
<script> | ||
document.addEventListener('DOMContentLoaded', () => { | ||
document.body.offsetWidth // Force layout | ||
document.getElementById('output').value = 'a\nb'; | ||
}); | ||
</script> |
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