mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibWeb: Use the correct painter for painting stacking contexts
When cloning the PaintContext we should be using the painter backed by
the bitmap created for this stacking context layer.
Fixes: 54c3053bc3
("LibWeb: Preserve paint state when painting...")
This commit is contained in:
parent
a57bfc2f8c
commit
a2d89f11d1
Notes:
sideshowbarker
2024-07-17 21:11:12 +09:00
Author: https://github.com/skyrising Commit: https://github.com/SerenityOS/serenity/commit/a2d89f11d1 Pull-request: https://github.com/SerenityOS/serenity/pull/13576
2 changed files with 3 additions and 3 deletions
|
@ -37,9 +37,9 @@ public:
|
|||
bool has_focus() const { return m_focus; }
|
||||
void set_has_focus(bool focus) { m_focus = focus; }
|
||||
|
||||
PaintContext clone() const
|
||||
PaintContext clone(Gfx::Painter& painter) const
|
||||
{
|
||||
auto clone = PaintContext(m_painter, m_palette, m_scroll_offset);
|
||||
auto clone = PaintContext(painter, m_palette, m_scroll_offset);
|
||||
clone.m_viewport_rect = m_viewport_rect;
|
||||
clone.m_should_show_line_box_borders = m_should_show_line_box_borders;
|
||||
clone.m_focus = m_focus;
|
||||
|
|
|
@ -262,7 +262,7 @@ void StackingContext::paint(PaintContext& context) const
|
|||
return;
|
||||
auto bitmap = bitmap_or_error.release_value_but_fixme_should_propagate_errors();
|
||||
Gfx::Painter painter(bitmap);
|
||||
auto paint_context = context.clone();
|
||||
auto paint_context = context.clone(painter);
|
||||
paint_internal(paint_context);
|
||||
|
||||
auto transform_origin = this->transform_origin();
|
||||
|
|
Loading…
Add table
Reference in a new issue