mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:57:46 +00:00
LibWeb: Port CharacterData from DeprecatedString to String
The existing implementation has some pre-existing issues where it is incorrectly assumes that byte offsets are given through the IDL instead of UTF-16 code units. While making these changes, leave some FIXMEs for that.
This commit is contained in:
parent
3b12a13f17
commit
b603e860af
18 changed files with 87 additions and 81 deletions
|
@ -67,7 +67,7 @@ bool Position::offset_is_at_end_of_node() const
|
|||
|
||||
auto& node = verify_cast<DOM::Text>(*m_node);
|
||||
auto text = node.data();
|
||||
return m_offset == text.length();
|
||||
return m_offset == text.bytes_as_string_view().length();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue