diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-11-03 12:49:54 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-05 17:42:31 +0100 |
commit | affc8a22ca32b177815c826ec4a3fc25843eaef4 (patch) | |
tree | 30e6ceed8fce2cbeab63bb4367cf82b4bd4d9f3f /Userland/Libraries/LibWeb/DOM/Element.cpp | |
parent | 8fb7c32ec32339b2c1890c9094ff9e6687a6b9e5 (diff) | |
download | serenity-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.cpp | 4 |
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. |