1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:57:44 +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:
Shannon Booth 2023-09-07 21:36:05 +12:00 committed by Andreas Kling
parent 3b12a13f17
commit b603e860af
18 changed files with 87 additions and 81 deletions

View file

@ -1654,7 +1654,7 @@ bool FormattingContext::can_skip_is_anonymous_text_run(Box& box)
if (box.is_anonymous() && !box.is_generated() && !box.first_child_of_type<BlockContainer>()) {
bool contains_only_white_space = true;
box.for_each_in_subtree([&](auto const& node) {
if (!is<TextNode>(node) || !static_cast<TextNode const&>(node).dom_node().data().is_whitespace()) {
if (!is<TextNode>(node) || !static_cast<TextNode const&>(node).dom_node().data().bytes_as_string_view().is_whitespace()) {
contains_only_white_space = false;
return IterationDecision::Break;
}