1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 12:15:09 +00:00

LibHTML: Rename ComputedStyle to BoxModelMetrics

There was nothing left in ComputedStyle except the box model metrics,
so this patch gives it a more representative name.

Note that style information is fetched directly from StyleProperties,
which is basically the CSS property name/value pairs that apply to
an element.
This commit is contained in:
Andreas Kling 2019-10-04 15:50:50 +02:00
parent 7bc9310170
commit 9c0e9a1a20
7 changed files with 44 additions and 44 deletions

View file

@ -44,10 +44,10 @@ void LayoutNode::render(RenderingContext& context)
#endif
Rect padded_rect;
padded_rect.set_x(rect().x() - style().padding().left.to_px());
padded_rect.set_width(rect().width() + style().padding().left.to_px() + style().padding().right.to_px());
padded_rect.set_y(rect().y() - style().padding().top.to_px());
padded_rect.set_height(rect().height() + style().padding().top.to_px() + style().padding().bottom.to_px());
padded_rect.set_x(rect().x() - box_model().padding().left.to_px());
padded_rect.set_width(rect().width() + box_model().padding().left.to_px() + box_model().padding().right.to_px());
padded_rect.set_y(rect().y() - box_model().padding().top.to_px());
padded_rect.set_height(rect().height() + box_model().padding().top.to_px() + box_model().padding().bottom.to_px());
auto bgcolor = style_properties().property("background-color");
if (bgcolor.has_value() && bgcolor.value()->is_color()) {