mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 23:28:11 +00:00
LibWeb: Make Document::paintable() return a ViewportPaintable
This commit is contained in:
parent
8bb275f2ea
commit
25375bf1d5
10 changed files with 34 additions and 11 deletions
|
@ -44,7 +44,7 @@ void NestedBrowsingContextPaintable::paint(PaintContext& context, PaintPhase pha
|
|||
auto* hosted_document = layout_box().dom_node().content_document_without_origin_check();
|
||||
if (!hosted_document)
|
||||
return;
|
||||
auto* hosted_paint_tree = hosted_document->paintable_box();
|
||||
auto* hosted_paint_tree = hosted_document->paintable();
|
||||
if (!hosted_paint_tree)
|
||||
return;
|
||||
|
||||
|
@ -57,7 +57,7 @@ void NestedBrowsingContextPaintable::paint(PaintContext& context, PaintPhase pha
|
|||
context.painter().translate(absolute_device_rect.x().value(), absolute_device_rect.y().value());
|
||||
|
||||
context.set_device_viewport_rect({ {}, context.enclosing_device_size(layout_box().dom_node().nested_browsing_context()->size()) });
|
||||
const_cast<ViewportPaintable&>(verify_cast<ViewportPaintable>(*hosted_paint_tree)).paint_all_phases(context);
|
||||
const_cast<ViewportPaintable*>(hosted_paint_tree)->paint_all_phases(context);
|
||||
|
||||
context.set_device_viewport_rect(old_viewport_rect);
|
||||
context.painter().restore();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue