WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
213763
Swipe snapshot is removed too early when swiping away from a page that is still loading
https://bugs.webkit.org/show_bug.cgi?id=213763
Summary
Swipe snapshot is removed too early when swiping away from a page that is sti...
Tim Horton
Reported
2020-06-29 16:44:42 PDT
Swipe snapshot is removed too early when swiping away from a page that is still loading
Attachments
Patch
(26.01 KB, patch)
2020-06-29 16:45 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Patch
(26.15 KB, patch)
2020-06-29 17:06 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Patch
(40.71 KB, patch)
2020-06-29 18:31 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Patch
(40.91 KB, patch)
2020-06-29 19:33 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Patch
(34.96 KB, patch)
2020-07-01 16:23 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Patch
(36.48 KB, patch)
2020-07-01 16:53 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2020-06-29 16:45:39 PDT
Created
attachment 403138
[details]
Patch
Tim Horton
Comment 2
2020-06-29 16:45:42 PDT
<
rdar://problem/64576811
>
Tim Horton
Comment 3
2020-06-29 16:47:19 PDT
swipe-test.js has some extra unused stuff in it, but it's a copy of the one from the non-HTTP tests directory, so I think it's preferable this way.
Tim Horton
Comment 4
2020-06-29 17:06:58 PDT
Created
attachment 403142
[details]
Patch
Devin Rousso
Comment 5
2020-06-29 18:16:57 PDT
Comment on
attachment 403142
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=403142&action=review
it looks like GTK and WPE some love :(
> Source/WebKit/UIProcess/PageClient.h:467 > + virtual void didFinishNavigation(API::Navigation*) = 0; > + virtual void didFailNavigation(API::Navigation*) = 0; > + virtual void didSameDocumentNavigationForMainFrame(API::Navigation*, SameDocumentNavigationType) = 0;
Can we use `API::Navigation&` for all of this plumbing instead so we know that it's providing something that exists? It seems less-than-ideal to me to have the possibility of a function called `_didFinishNavigation` that passes a `nullptr` instead of an `API::Navigation` 😅
> Source/WebKit/UIProcess/WebPageProxy.cpp:4875 > + pageClient().didFinishNavigation(navigation.get());
Should we still include some mention to "main frame" in these renamed function names since they're only called if `isMainFrame`? i.e. `didFinishMainFrameNavigation`
> Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm:647 > + m_pendingNavigation = nullptr;
I think we should also do this inside `ViewGestureController::removeSwipeSnapshot` for GTK (`ViewGestureControllerGtk.cpp`)
> LayoutTests/http/tests/swipe/resources/swipe-test.js:42 > + var duration = Date.now() - window.localStorage[key + "swipeStartTime"];
NIT: `let`
Tim Horton
Comment 6
2020-06-29 18:26:04 PDT
(In reply to Devin Rousso from
comment #5
)
> Comment on
attachment 403142
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=403142&action=review
> > it looks like GTK and WPE some love :(
Yep, uploading a new patch.
> > Source/WebKit/UIProcess/PageClient.h:467 > > + virtual void didFinishNavigation(API::Navigation*) = 0; > > + virtual void didFailNavigation(API::Navigation*) = 0; > > + virtual void didSameDocumentNavigationForMainFrame(API::Navigation*, SameDocumentNavigationType) = 0; > > Can we use `API::Navigation&` for all of this plumbing instead so we know > that it's providing something that exists? It seems less-than-ideal to me > to have the possibility of a function called `_didFinishNavigation` that > passes a `nullptr` instead of an `API::Navigation` 😅
Sadly, it is currently possible to get a null here.
> > Source/WebKit/UIProcess/WebPageProxy.cpp:4875 > > + pageClient().didFinishNavigation(navigation.get()); > > Should we still include some mention to "main frame" in these renamed > function names since they're only called if `isMainFrame`? i.e. > `didFinishMainFrameNavigation`
Nope, Navigation is a main-frame thing in the WebKit2 API (see e.g. WKNavigationDelegate); these names are a holdover from the olden days. (Possible we should *remove* it from the SameDocument one, really, but I am much too lazy).
> > Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm:647 > > + m_pendingNavigation = nullptr; > > I think we should also do this inside > `ViewGestureController::removeSwipeSnapshot` for GTK > (`ViewGestureControllerGtk.cpp`)
Quite!
> > LayoutTests/http/tests/swipe/resources/swipe-test.js:42 > > + var duration = Date.now() - window.localStorage[key + "swipeStartTime"]; > > NIT: `let`
You JavaScript people :) Thank you for your eyes!
Tim Horton
Comment 7
2020-06-29 18:31:11 PDT
Created
attachment 403153
[details]
Patch
EWS Watchlist
Comment 8
2020-06-29 18:32:07 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See
http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Tim Horton
Comment 9
2020-06-29 19:33:39 PDT
Created
attachment 403162
[details]
Patch
Tim Horton
Comment 10
2020-06-30 00:03:36 PDT
Test failures look legit.
Tim Horton
Comment 11
2020-07-01 16:23:34 PDT
Created
attachment 403331
[details]
Patch
Darin Adler
Comment 12
2020-07-01 16:28:48 PDT
Comment on
attachment 403331
[details]
Patch Looks great. I’m going to say review+ even before EWS tells us what we should really think.
Tim Horton
Comment 13
2020-07-01 16:50:15 PDT
Just gotta skip the test on WK1!
Tim Horton
Comment 14
2020-07-01 16:53:04 PDT
Created
attachment 403334
[details]
Patch
EWS
Comment 15
2020-07-01 17:32:12 PDT
Committed
r263825
: <
https://trac.webkit.org/changeset/263825
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 403334
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug