LibWeb+WebContent: Convert BrowsingContext to new pixel units

This fixes a few glitches. We no longer give the page double the width
it should have, and we mark the correct area of the page as needing
repainting.
This commit is contained in:
Sam Atkins 2022-11-03 12:49:54 +00:00 committed by Linus Groh
commit affc8a22ca
Notes: sideshowbarker 2024-07-17 02:09:23 +09:00
23 changed files with 68 additions and 70 deletions

View file

@ -53,7 +53,7 @@ void NestedBrowsingContextPaintable::paint(PaintContext& context, PaintPhase pha
context.painter().add_clip_rect(clip_rect.to_type<int>());
context.painter().translate(absolute_rect.x().value(), absolute_rect.y().value());
context.set_device_viewport_rect({ {}, layout_box().dom_node().nested_browsing_context()->size() });
context.set_device_viewport_rect({ {}, context.enclosing_device_size(layout_box().dom_node().nested_browsing_context()->size()) });
const_cast<Layout::InitialContainingBlock*>(hosted_layout_tree)->paint_all_phases(context);
context.set_device_viewport_rect(old_viewport_rect);