1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:08:10 +00:00

LibWeb+WebContent: Convert BrowsingContext to new pixel units

This fixes a few glitches. We no longer give the page double the width
it should have, and we mark the correct area of the page as needing
repainting.
This commit is contained in:
Sam Atkins 2022-11-03 12:49:54 +00:00 committed by Linus Groh
parent 8fb7c32ec3
commit affc8a22ca
23 changed files with 68 additions and 70 deletions

View file

@ -92,9 +92,9 @@ bool ImageBox::renders_as_alt_text() const
return false;
}
void ImageBox::browsing_context_did_set_viewport_rect(Gfx::IntRect const& viewport_rect)
void ImageBox::browsing_context_did_set_viewport_rect(CSSPixelRect const& viewport_rect)
{
m_image_loader.set_visible_in_viewport(paint_box() && viewport_rect.to_type<CSSPixels>().intersects(paint_box()->absolute_rect()));
m_image_loader.set_visible_in_viewport(paint_box() && viewport_rect.intersects(paint_box()->absolute_rect()));
}
RefPtr<Painting::Paintable> ImageBox::create_paintable() const