1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:57:42 +00:00
serenity/Tests/LibWeb/Text/expected/DOM
Shannon Booth e9dfa61588 LibWeb: Use UTF-16 code unit offsets in Range::to_string
Similar to another problem we had in CharacterData, we were assuming
that the offsets were raw utf8 byte offsets into the data, instead of
utf16 code units. Fix this by using the substring helpers in
CharacterData to get the text data from the Range.

There are more instances of this issue around the place that we will
need to track down and add tests for, but this fixes one of them :^)

For the test included in this commit, we were previously returning:

llo💨😮

Instead of the expected:

llo💨😮 Wo
2024-01-04 10:10:44 +01:00
..
createElement-with-emoji-in-tag-name.txt LibWeb: Don't crash on Document.createElement() with emoji in tag name 2023-12-04 00:04:04 +01:00
Range-to-string.txt LibWeb: Use UTF-16 code unit offsets in Range::to_string 2024-01-04 10:10:44 +01:00
setAttribute-with-emoji-in-attribute-name.txt LibWeb: Don't crash on Element.setAttribute() with emoji in name 2023-12-04 00:04:04 +01:00
Text-methods.txt LibWeb: Use UTF-16 code unit offsets and lengths in CharacterData 2023-12-23 20:41:41 +01:00
Text-set-get-data.txt LibWeb: Add a test for setting and getting Text data 2023-12-22 08:19:51 +00:00
TreeWalker-nextNode-with-detached-currentNode.txt LibWeb: Don't get stuck in TreeWalker.nextNode() when current detached 2023-12-03 23:16:26 +01:00