mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 16:58:52 +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:
parent
85ac9705ba
commit
7e068565bc
Notes:
sideshowbarker
2024-07-19 10:49:02 +09:00
Author: https://github.com/awesomekling
Commit: 7e068565bc
4 changed files with 20 additions and 0 deletions
|
@ -32,6 +32,13 @@ void Frame::set_size(const Size& size)
|
|||
m_size = size;
|
||||
}
|
||||
|
||||
void Frame::set_viewport_rect(const Rect& rect)
|
||||
{
|
||||
if (m_viewport_rect == rect)
|
||||
return;
|
||||
m_viewport_rect = rect;
|
||||
}
|
||||
|
||||
void Frame::set_needs_display(const Rect& rect)
|
||||
{
|
||||
if (!on_set_needs_display)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue