mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:57:44 +00:00
LibWeb+WebContent: Don't relayout page on every scroll event
The WebContent process was redoing page layout every time you scrolled the page. This was a huge CPU hog for no reason. Fix this by only doing a relayout when the viewport is resized, not when it moves around.
This commit is contained in:
parent
964894dee6
commit
f24b674d7a
3 changed files with 24 additions and 4 deletions
|
@ -73,6 +73,7 @@ public:
|
|||
|
||||
void set_viewport_scroll_offset(const Gfx::IntPoint&);
|
||||
Gfx::IntRect viewport_rect() const { return { m_viewport_scroll_offset, m_size }; }
|
||||
void set_viewport_rect(const Gfx::IntRect&);
|
||||
|
||||
void did_scroll(Badge<InProcessWebView>);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue