LibHTML: Implement LayoutText

This commit is contained in:
Sergey Bugaev 2019-09-25 12:36:44 +03:00 committed by Andreas Kling
parent 9f8d776c70
commit 93003bfda1
Notes: sideshowbarker 2024-07-19 11:55:53 +09:00
4 changed files with 190 additions and 4 deletions

View file

@ -78,8 +78,10 @@ void dump_tree(const LayoutNode& layout_node)
layout_node.style().border().bottom.to_px(),
layout_node.style().margin().bottom.to_px());
if (layout_node.is_text())
printf(" \"%s\"", static_cast<const LayoutText&>(layout_node).text().characters());
if (layout_node.is_text()) {
const LayoutText& layout_text = static_cast<const LayoutText&>(layout_node);
printf(" \"%s\", %d runs", layout_text.text().characters(), layout_text.runs().size());
}
printf("\n");