summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Layout/Box.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/Box.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/Box.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Layout/Box.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/Box.cpp b/Userland/Libraries/LibWeb/Layout/Box.cpp
index 73d770968d..1583ff0fd1 100644
--- a/Userland/Libraries/LibWeb/Layout/Box.cpp
+++ b/Userland/Libraries/LibWeb/Layout/Box.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
- * Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
+ * Copyright (c) 2021-2022, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -31,8 +31,9 @@ Box::~Box()
void Box::set_needs_display()
{
+ // FIXME: Make `set_needs_display` take CSSPixels
if (paint_box())
- browsing_context().set_needs_display(enclosing_int_rect(paint_box()->absolute_rect()));
+ browsing_context().set_needs_display(enclosing_int_rect(paint_box()->absolute_rect().to_type<float>()));
}
bool Box::is_body() const