summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM/Element.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-11-03 12:49:54 +0000
committerLinus Groh <mail@linusgroh.de>2023-01-05 17:42:31 +0100
commitaffc8a22ca32b177815c826ec4a3fc25843eaef4 (patch)
tree30e6ceed8fce2cbeab63bb4367cf82b4bd4d9f3f /Userland/Libraries/LibWeb/DOM/Element.cpp
parent8fb7c32ec32339b2c1890c9094ff9e6687a6b9e5 (diff)
downloadserenity-affc8a22ca32b177815c826ec4a3fc25843eaef4.zip
LibWeb+WebContent: Convert BrowsingContext to new pixel units
This fixes a few glitches. We no longer give the page double the width it should have, and we mark the correct area of the page as needing repainting.
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/Element.cpp')
-rw-r--r--Userland/Libraries/LibWeb/DOM/Element.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp
index 6962fea8d3..052b0ecdb5 100644
--- a/Userland/Libraries/LibWeb/DOM/Element.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Element.cpp
@@ -664,7 +664,7 @@ int Element::client_width() const
// return the viewport width excluding the size of a rendered scroll bar (if any).
if ((is<HTML::HTMLHtmlElement>(*this) && !document().in_quirks_mode())
|| (is<HTML::HTMLBodyElement>(*this) && document().in_quirks_mode())) {
- return document().browsing_context()->viewport_rect().width();
+ return document().browsing_context()->viewport_rect().width().value();
}
// NOTE: Ensure that layout is up-to-date before looking at metrics.
@@ -689,7 +689,7 @@ int Element::client_height() const
// return the viewport height excluding the size of a rendered scroll bar (if any).
if ((is<HTML::HTMLHtmlElement>(*this) && !document().in_quirks_mode())
|| (is<HTML::HTMLBodyElement>(*this) && document().in_quirks_mode())) {
- return document().browsing_context()->viewport_rect().height();
+ return document().browsing_context()->viewport_rect().height().value();
}
// NOTE: Ensure that layout is up-to-date before looking at metrics.