1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 12:55:08 +00:00

LibWeb: Turn BoxModelMetrics into a simple struct

Using getters for this thing was just cumbersome and didn't achieve
anything of value so just turn it into a plain struct.
This commit is contained in:
Andreas Kling 2020-06-24 11:22:34 +02:00
parent 5744dd43c5
commit f742b245b7
5 changed files with 115 additions and 136 deletions

View file

@ -123,23 +123,23 @@ void dump_tree(const LayoutNode& layout_node)
// Dump the horizontal box properties
dbgprintf(" [%g+%g+%g %g %g+%g+%g]",
layout_box.box_model().margin().left.to_px(layout_box),
layout_box.box_model().border().left.to_px(layout_box),
layout_box.box_model().padding().left.to_px(layout_box),
layout_box.box_model().margin.left.to_px(layout_box),
layout_box.box_model().border.left.to_px(layout_box),
layout_box.box_model().padding.left.to_px(layout_box),
layout_box.width(),
layout_box.box_model().padding().right.to_px(layout_box),
layout_box.box_model().border().right.to_px(layout_box),
layout_box.box_model().margin().right.to_px(layout_box));
layout_box.box_model().padding.right.to_px(layout_box),
layout_box.box_model().border.right.to_px(layout_box),
layout_box.box_model().margin.right.to_px(layout_box));
// And the vertical box properties
dbgprintf(" [%g+%g+%g %g %g+%g+%g]",
layout_box.box_model().margin().top.to_px(layout_box),
layout_box.box_model().border().top.to_px(layout_box),
layout_box.box_model().padding().top.to_px(layout_box),
layout_box.box_model().margin.top.to_px(layout_box),
layout_box.box_model().border.top.to_px(layout_box),
layout_box.box_model().padding.top.to_px(layout_box),
layout_box.height(),
layout_box.box_model().padding().bottom.to_px(layout_box),
layout_box.box_model().border().bottom.to_px(layout_box),
layout_box.box_model().margin().bottom.to_px(layout_box));
layout_box.box_model().padding.bottom.to_px(layout_box),
layout_box.box_model().border.bottom.to_px(layout_box),
layout_box.box_model().margin.bottom.to_px(layout_box));
dbgprintf("\n");
}