mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
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.
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 20:33:50 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/ab49dbf137 Pull-request: https://github.com/SerenityOS/serenity/pull/16448 Reviewed-by: https://github.com/awesomekling ✅
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user