LibWeb: Get rid of PaintableBox::is_viewport()

This function used layout node pointer to check if it's corresponding to
viewport. There is no need for that, since `is_viewport_paintable()`
does exactly the same check without going through layout node.
This commit is contained in:
Aliaksandr Kalenik 2025-10-13 16:58:57 +02:00 committed by Alexander Kalenik
parent 1ffb0ca311
commit 81aeee3fb4
Notes: github-actions[bot] 2025-10-14 09:25:05 +00:00
5 changed files with 9 additions and 11 deletions

View file

@ -167,7 +167,7 @@ void paint_background(DisplayListRecordingContext& context, PaintableBox const&
background_positioning_area.set_location(paintable_box.layout_node().root().navigable()->viewport_scroll_offset());
break;
case CSS::BackgroundAttachment::Local:
if (!paintable_box.is_viewport()) {
if (!paintable_box.is_viewport_paintable()) {
auto scroll_offset = paintable_box.scroll_offset();
background_positioning_area.translate_by(-scroll_offset.x(), -scroll_offset.y());
}