mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
LibWeb: Make BrowsingContext ask PageClient when it wants to be scrolled
BrowsingContext shouldn't be scrolling itself, instead it has to update the layout (to ensure that we have current document metrics, and then ask the PageClient nicely to scroll it. This fixes an issue where BrowsingContext sometimes believed itself to be scrolled, but OOPWV had a different idea.
This commit is contained in:
parent
06d97c892b
commit
0f6e1f7a32
3 changed files with 11 additions and 12 deletions
|
@ -344,7 +344,7 @@ void FrameLoader::resource_did_load()
|
|||
if (!url.fragment().is_empty())
|
||||
browsing_context().scroll_to_anchor(url.fragment());
|
||||
else
|
||||
browsing_context().set_viewport_scroll_offset({ 0, 0 });
|
||||
browsing_context().scroll_to({ 0, 0 });
|
||||
|
||||
if (auto* page = browsing_context().page())
|
||||
page->client().page_did_finish_loading(url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue