mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-30 05:09:01 +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
Notes:
sideshowbarker
2024-07-16 22:14:49 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 46c98dbf43
Pull-request: https://github.com/SerenityOS/serenity/pull/18435
Reviewed-by: https://github.com/awesomekling
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