1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:17:45 +00:00

LibWeb: Change viewport ownership from BrowsingContext to Navigable

This commit is contained in:
Aliaksandr Kalenik 2023-08-22 16:00:42 +02:00 committed by Andreas Kling
parent 4356d37b2c
commit dd7bba66ed
23 changed files with 196 additions and 129 deletions

View file

@ -13,6 +13,7 @@
#include <LibWeb/CSS/SystemColor.h>
#include <LibWeb/Cookie/ParsedCookie.h>
#include <LibWeb/HTML/BrowsingContext.h>
#include <LibWeb/HTML/TraversableNavigable.h>
#include <LibWeb/Layout/Viewport.h>
#include <LibWeb/Painting/PaintableBox.h>
#include <LibWeb/Painting/ViewportPaintable.h>
@ -146,7 +147,7 @@ void PageHost::paint(Web::DevicePixelRect const& content_rect, Gfx::Bitmap& targ
void PageHost::set_viewport_rect(Web::DevicePixelRect const& rect)
{
page().top_level_browsing_context().set_viewport_rect(page().device_to_css_rect(rect));
page().top_level_traversable()->set_viewport_rect(page().device_to_css_rect(rect));
}
void PageHost::page_did_invalidate(Web::CSSPixelRect const& content_rect)