summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-06-06 19:33:18 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-06 19:36:40 +0200
commitba6a77f281c243552ced98352dc25f3089e39ea0 (patch)
treea946180743744572a446a55536189c1862f8897b
parent37b21cfd7dff8e0d9fa2f65bcf6efab78b6f9c51 (diff)
downloadserenity-ba6a77f281c243552ced98352dc25f3089e39ea0.zip
LibGfx: Make Painter::add_clip_rect() use logical coordinates
It was really confusing that add_clip_rect() didn't apply transforms to the new clip rect, but instead interpreted it as an absolute rect. This makes web pages with <iframe> render correctly when scrolled. Something might break from this, but we'll find it soon enough. :^)
-rw-r--r--Libraries/LibGfx/Painter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibGfx/Painter.cpp b/Libraries/LibGfx/Painter.cpp
index 543458046a..5c2a67a79c 100644
--- a/Libraries/LibGfx/Painter.cpp
+++ b/Libraries/LibGfx/Painter.cpp
@@ -1283,7 +1283,7 @@ void Painter::draw_quadratic_bezier_curve(const Point& control_point, const Poin
void Painter::add_clip_rect(const Rect& rect)
{
- state().clip_rect.intersect(rect.translated(m_clip_origin.location()));
+ state().clip_rect.intersect(rect.translated(translation()));
state().clip_rect.intersect(m_target->rect());
}