1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +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

@ -306,7 +306,7 @@ void InlineFormattingContext::generate_line_boxes(LayoutMode layout_mode)
next_width = iterator.next_non_whitespace_sequence_width();
} else {
// In whitespace-preserving contexts (white-space: pre*), we have to check manually.
auto view = text_node.text_for_rendering().substring_view(item.offset_in_node, item.length_in_node);
auto view = text_node.text_for_rendering().bytes_as_string_view().substring_view(item.offset_in_node, item.length_in_node);
is_whitespace = view.is_whitespace();
if (is_whitespace)
next_width = iterator.next_non_whitespace_sequence_width();