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

LibHTML: Push the visible viewport rect from HtmlView to Frame

This will allow various mechanisms and optimizations based on the
currently visible viewport rect.
This commit is contained in:
Andreas Kling 2019-12-18 20:54:23 +01:00
parent 85ac9705ba
commit 7e068565bc
4 changed files with 20 additions and 0 deletions

View file

@ -30,10 +30,14 @@ public:
void set_needs_display(const Rect&);
Function<void(const Rect&)> on_set_needs_display;
void set_viewport_rect(const Rect&);
Rect viewport_rect() const { return m_viewport_rect; }
private:
explicit Frame(HtmlView&);
WeakPtr<HtmlView> m_html_view;
RefPtr<Document> m_document;
Size m_size;
Rect m_viewport_rect;
};