1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:08:10 +00:00

LibWeb/DOM: Rename Node::{paint => paintable}_box()

It returns a PaintableBox, not a 'PaintBox'.
This commit is contained in:
Linus Groh 2023-04-20 16:01:16 +01:00 committed by Andreas Kling
parent 754e458d0a
commit d58b671ff6
8 changed files with 25 additions and 25 deletions

View file

@ -200,13 +200,13 @@ int HTMLElement::offset_width() const
const_cast<DOM::Document&>(document()).update_layout();
// 1. If the element does not have any associated CSS layout box return zero and terminate this algorithm.
if (!paint_box())
if (!paintable_box())
return 0;
// 2. Return the width of the axis-aligned bounding box of the border boxes of all fragments generated by the elements principal box,
// ignoring any transforms that apply to the element and its ancestors.
// FIXME: Account for inline boxes.
return paint_box()->border_box_width().value();
return paintable_box()->border_box_width().value();
}
// https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetheight
@ -216,13 +216,13 @@ int HTMLElement::offset_height() const
const_cast<DOM::Document&>(document()).update_layout();
// 1. If the element does not have any associated CSS layout box return zero and terminate this algorithm.
if (!paint_box())
if (!paintable_box())
return 0;
// 2. Return the height of the axis-aligned bounding box of the border boxes of all fragments generated by the elements principal box,
// ignoring any transforms that apply to the element and its ancestors.
// FIXME: Account for inline boxes.
return paint_box()->border_box_height().value();
return paintable_box()->border_box_height().value();
}
// https://html.spec.whatwg.org/multipage/links.html#cannot-navigate