diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-10-31 19:46:55 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-14 16:47:57 +0000 |
commit | ab49dbf1374e436f19f2f8b4c3f193bbb67809d4 (patch) | |
tree | 16994b73b0b6e17926be2169a21b81819bc0a696 /Userland/Libraries/LibWeb/Layout/LayoutState.cpp | |
parent | 57a69f15ffa43bf2bbc76a98da2890090323a7c6 (diff) | |
download | serenity-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.cpp | 2 |
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); |