summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Layout/LayoutState.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-10-31 19:46:55 +0000
committerLinus Groh <mail@linusgroh.de>2022-12-14 16:47:57 +0000
commitab49dbf1374e436f19f2f8b4c3f193bbb67809d4 (patch)
tree16994b73b0b6e17926be2169a21b81819bc0a696 /Userland/Libraries/LibWeb/Layout/LayoutState.cpp
parent57a69f15ffa43bf2bbc76a98da2890090323a7c6 (diff)
downloadserenity-ab49dbf1374e436f19f2f8b4c3f193bbb67809d4.zip
LibWeb: Convert Paintable coordinates to new pixel units
This fixes a few sizing issues too. The page size is now correct in most cases! \o/ We get to remove some of the `to_type<>()` shenanigans, though it reappears in some other places.
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/LayoutState.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Layout/LayoutState.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/LayoutState.cpp b/Userland/Libraries/LibWeb/Layout/LayoutState.cpp
index 994957ae82..a5245b8275 100644
--- a/Userland/Libraries/LibWeb/Layout/LayoutState.cpp
+++ b/Userland/Libraries/LibWeb/Layout/LayoutState.cpp
@@ -76,7 +76,7 @@ void LayoutState::commit()
if (is<Layout::Box>(node)) {
auto& box = static_cast<Layout::Box const&>(node);
auto& paint_box = const_cast<Painting::PaintableBox&>(*box.paint_box());
- paint_box.set_offset(used_values.offset);
+ paint_box.set_offset(used_values.offset.to_type<CSSPixels>());
paint_box.set_content_size(used_values.content_width(), used_values.content_height());
paint_box.set_overflow_data(move(used_values.overflow_data));
paint_box.set_containing_line_box_fragment(used_values.containing_line_box_fragment);