LibHTML: Implement basic block height computation

..and add vertical box properties to the layout tree dumps.
This commit is contained in:
Andreas Kling 2019-08-18 08:37:53 +02:00
parent 70eca3b500
commit fc43cf929d
Notes: sideshowbarker 2024-07-19 12:37:24 +09:00
4 changed files with 72 additions and 18 deletions

View file

@ -65,9 +65,19 @@ void dump_tree(const LayoutNode& layout_node)
layout_node.style().border().left.to_px(),
layout_node.style().padding().left.to_px(),
layout_node.rect().width(),
layout_node.style().margin().right.to_px(),
layout_node.style().padding().right.to_px(),
layout_node.style().border().right.to_px(),
layout_node.style().padding().right.to_px());
layout_node.style().margin().right.to_px());
// And the vertical box properties
printf(" [%d+%d+%d %d %d+%d+%d]",
layout_node.style().margin().top.to_px(),
layout_node.style().border().top.to_px(),
layout_node.style().padding().top.to_px(),
layout_node.rect().height(),
layout_node.style().padding().bottom.to_px(),
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());