mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
LibWeb: Remove direct calls of page_did_request_scroll_to()
By replacing the `page_did_request_scroll_to()` calls with a request to perform scrolling in the corresponding navigable, we ensure that the scrolling of iframes will scroll within them instead of triggering scroll of top level document.
This commit is contained in:
parent
607e4cab0a
commit
bf14de4118
7 changed files with 49 additions and 25 deletions
|
@ -352,8 +352,8 @@ void BrowsingContext::scroll_to(CSSPixelPoint position)
|
|||
active_document()->update_layout();
|
||||
}
|
||||
|
||||
if (this == &m_page->top_level_browsing_context())
|
||||
m_page->client().page_did_request_scroll_to(position);
|
||||
if (auto navigable = active_document()->navigable())
|
||||
navigable->perform_scroll_of_viewport(position);
|
||||
}
|
||||
|
||||
JS::GCPtr<BrowsingContext> BrowsingContext::top_level_browsing_context() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue