diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-11-08 11:31:24 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-05 17:42:31 +0100 |
commit | 5d8e3f512203d81ccb793a9e268225189c0dc282 (patch) | |
tree | 26cb96103692492a30e979fb780f394d17ca0db4 /Userland/Libraries/LibWeb/HTML/HTMLElement.cpp | |
parent | 65cdf89a8bd0de699d78f3204291f9c615aee036 (diff) | |
download | serenity-5d8e3f512203d81ccb793a9e268225189c0dc282.zip |
LibWeb: Convert Layout::Node to new pixel units
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 30df1d0256..e250d35744 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp @@ -170,7 +170,7 @@ int HTMLElement::offset_top() const return 0; auto position = layout_node()->box_type_agnostic_position(); auto parent_position = parent_element()->layout_node()->box_type_agnostic_position(); - return position.y() - parent_position.y(); + return position.y().value() - parent_position.y().value(); } // https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetleft @@ -183,7 +183,7 @@ int HTMLElement::offset_left() const return 0; auto position = layout_node()->box_type_agnostic_position(); auto parent_position = parent_element()->layout_node()->box_type_agnostic_position(); - return position.x() - parent_position.x(); + return position.x().value() - parent_position.x().value(); } // https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetwidth |