mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
LibWeb: Use device pixels to translate NestedBrowsingContextPaintable
Fix translation of iframes when pixel size is not 1.0.
This commit is contained in:
parent
37c9dbe248
commit
46c98dbf43
1 changed files with 3 additions and 1 deletions
|
@ -51,7 +51,9 @@ void NestedBrowsingContextPaintable::paint(PaintContext& context, PaintPhase pha
|
|||
auto old_viewport_rect = context.device_viewport_rect();
|
||||
|
||||
context.painter().add_clip_rect(clip_rect.to_type<int>());
|
||||
context.painter().translate(absolute_rect.x().value(), absolute_rect.y().value());
|
||||
|
||||
auto absolute_device_rect = context.enclosing_device_rect(absolute_rect);
|
||||
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<Layout::Viewport*>(hosted_layout_tree)->paint_all_phases(context);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue