mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 19:05:08 +00:00
LibHTML: Use LayoutText::text_for_rendering() in layout tree dumps
This way the fragment offsets make a lot more sense, since they assume whitespace has already been collapsed.
This commit is contained in:
parent
dce7646882
commit
1fe2cca439
2 changed files with 3 additions and 2 deletions
|
@ -119,8 +119,8 @@ void dump_tree(const LayoutNode& layout_node)
|
|||
for (int i = 0; i < indent; ++i)
|
||||
dbgprintf(" ");
|
||||
auto& layout_text = static_cast<const LayoutText&>(fragment.layout_node());
|
||||
dbgprintf(" text: \"%s\"\n",
|
||||
String(Utf8View(layout_text.node().data()).substring_view(fragment.start(), fragment.length()).as_string()).characters());
|
||||
auto fragment_text = layout_text.text_for_rendering().substring(fragment.start(), fragment.length());
|
||||
dbgprintf(" text: \"%s\"\n", fragment_text.characters());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue