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/HTML/HTMLElement.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/HTML/HTMLElement.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/HTMLElement.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp index cd281a7ea3..30df1d0256 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp @@ -199,7 +199,7 @@ int HTMLElement::offset_width() const // 2. Return the width of the axis-aligned bounding box of the border boxes of all fragments generated by the element’s principal box, // ignoring any transforms that apply to the element and its ancestors. // FIXME: Account for inline boxes. - return paint_box()->border_box_width(); + return paint_box()->border_box_width().value(); } // https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetheight @@ -215,7 +215,7 @@ int HTMLElement::offset_height() const // 2. Return the height of the axis-aligned bounding box of the border boxes of all fragments generated by the element’s principal box, // ignoring any transforms that apply to the element and its ancestors. // FIXME: Account for inline boxes. - return paint_box()->border_box_height(); + return paint_box()->border_box_height().value(); } // https://html.spec.whatwg.org/multipage/links.html#cannot-navigate |