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:
Aliaksandr Kalenik 2024-02-03 10:43:01 +01:00 committed by Andreas Kling
commit bf14de4118
Notes: sideshowbarker 2024-07-16 23:34:49 +09:00
7 changed files with 49 additions and 25 deletions

View file

@ -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