Bug 205087 - [macOS] Issue load sooner on swipe back/forward navigation
Summary: [macOS] Issue load sooner on swipe back/forward navigation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 205127
  Show dependency treegraph
 
Reported: 2019-12-10 14:59 PST by Chris Dumez
Modified: 2019-12-11 10:51 PST (History)
6 users (show)

See Also:


Attachments
Patch (14.00 KB, patch)
2019-12-10 15:12 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2019-12-10 14:59:58 PST
Issue load sooner on swipe back/forward navigation on macOS. We currently wait until the end of the swipe animation to issue the load but we should be able to start loading as soon as the user lifts the finger and thus commits to navigating. This will improve perceived performance on swipe back/forward navigation.
Comment 1 Chris Dumez 2019-12-10 15:12:45 PST
Created attachment 385310 [details]
Patch
Comment 2 Chris Dumez 2019-12-10 15:14:43 PST
<rdar://problem/57809587>
Comment 3 Tim Horton 2019-12-10 15:16:46 PST
Comment on attachment 385310 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=385310&action=review

> Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:148
> +    if (m_page.isLayerTreeFrozenDueToSwipeAnimation())
> +        send(Messages::WebPage::FreezeLayerTreeDueToSwipeAnimation());

Should we just stuff this in the creation parameters? Then there's no race.
Comment 4 Chris Dumez 2019-12-10 15:44:47 PST
Comment on attachment 385310 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=385310&action=review

>> Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:148
>> +        send(Messages::WebPage::FreezeLayerTreeDueToSwipeAnimation());
> 
> Should we just stuff this in the creation parameters? Then there's no race.

We need a separate IPC for the non-PSON case anyway. I do not think this is racy here because we're process-swapping here and the tree will already be be frozen with ProcessSwap reason until WebPage::didCompletePageTransition() is called. As long as I sent the FreezeLayerTreeDueToSwipeAnimation IPC before the IPC triggering the load, I do not think there is a race.
Comment 5 WebKit Commit Bot 2019-12-10 18:16:26 PST
Comment on attachment 385310 [details]
Patch

Clearing flags on attachment: 385310

Committed r253360: <https://trac.webkit.org/changeset/253360>
Comment 6 WebKit Commit Bot 2019-12-10 18:16:28 PST
All reviewed patches have been landed.  Closing bug.