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. :^)
This commit is contained in:
Andreas Kling 2020-06-06 19:33:18 +02:00
parent 37b21cfd7d
commit ba6a77f281

View file

@ -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());
}