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

LibWeb: Broadcast the viewport rect to clients immediately after layout

This lets elements figure out if they're visible within the viewport or
not, so they take appropriate action.

Fixes the issues with animations not starting until the viewport was
resized or scrolled.
This commit is contained in:
Andreas Kling 2023-05-09 07:25:20 +02:00
parent dbe961ca02
commit 6ae208dbf6
3 changed files with 11 additions and 0 deletions

View file

@ -277,6 +277,8 @@ public:
virtual String const& window_handle() const override { return m_window_handle; }
virtual void set_window_handle(String handle) override { m_window_handle = move(handle); }
void inform_all_viewport_clients_about_the_current_viewport_rect();
private:
explicit BrowsingContext(Page&, HTML::NavigableContainer*);