mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibWeb: Convert Layout::Node to new pixel units
This commit is contained in:
parent
65cdf89a8b
commit
5d8e3f5122
Notes:
sideshowbarker
2024-07-17 02:08:36 +09:00
Author: https://github.com/AtkinsSJ
Commit: 5d8e3f5122
Pull-request: https://github.com/SerenityOS/serenity/pull/16514
Reviewed-by: https://github.com/MacDue
Reviewed-by: https://github.com/linusg ✅
7 changed files with 18 additions and 18 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue