1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +00:00

LibWeb: Port Layout::TextNode from DeprecatedString

This commit is contained in:
Shannon Booth 2023-11-21 10:56:29 +13:00 committed by Tim Flynn
parent 6b32a1f18f
commit 56d10bf198
9 changed files with 37 additions and 35 deletions

View file

@ -372,7 +372,7 @@ void dump_tree(StringBuilder& builder, Layout::Node const& layout_node, bool sho
for (size_t i = 0; i < indent; ++i)
builder.append(" "sv);
auto& layout_text = static_cast<Layout::TextNode const&>(fragment.layout_node());
auto fragment_text = layout_text.text_for_rendering().substring(fragment.start(), fragment.length());
auto fragment_text = MUST(layout_text.text_for_rendering().substring_from_byte_offset(fragment.start(), fragment.length()));
builder.appendff(" \"{}\"\n", fragment_text);
}
}