WebKit Bugzilla
Attachment 356396 Details for
Bug 192319
: Swipe snapshot stays up too long swiping around on apple.com (waiting for first paint)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192319-20181203130655.patch (text/plain), 4.83 KB, created by
Tim Horton
on 2018-12-03 13:06:56 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Tim Horton
Created:
2018-12-03 13:06:56 PST
Size:
4.83 KB
patch
obsolete
>Subversion Revision: 238811 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 927f64251f9817b5a7179159160e6e2abbf1c9f3..c76efa98aec59bf224675d856ab8b91b681819ce 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,22 @@ >+2018-12-03 Tim Horton <timothy_horton@apple.com> >+ >+ Swipe snapshot stays up too long swiping around on apple.com (waiting for first paint) >+ https://bugs.webkit.org/show_bug.cgi?id=192319 >+ <rdar://problem/45928708> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/Cocoa/ViewGestureController.cpp: >+ (WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame): >+ * UIProcess/Cocoa/ViewGestureController.h: >+ * UIProcess/ios/ViewGestureControllerIOS.mm: >+ (WebKit::ViewGestureController::endSwipeGesture): >+ In r236966, I reverted slightly too much of r232416. >+ We still need to defer requesting a presentation update callback until >+ after the provisional load starts. Otherwise, we could get the callback >+ while we're in the 'paused' state, and drop it on the floor. That would >+ then mean that we time out instead of promptly removing the snapshot. >+ > 2018-12-03 Zalan Bujtas <zalan@apple.com> > > [iOS] Add logging channel for hover related content observation >diff --git a/Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp b/Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp >index 2d795e7d9af2de94b23837f81580e668bb13f5ca..d4faa93e3d913caefc40ca17fe8ab4b933be66b5 100644 >--- a/Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp >+++ b/Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp >@@ -148,6 +148,9 @@ bool ViewGestureController::canSwipeInDirection(SwipeDirection direction) const > void ViewGestureController::didStartProvisionalLoadForMainFrame() > { > m_snapshotRemovalTracker.resume(); >+ >+ if (auto provisionalLoadCallback = WTFMove(m_provisionalLoadCallback)) >+ provisionalLoadCallback(); > } > > void ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame() >diff --git a/Source/WebKit/UIProcess/Cocoa/ViewGestureController.h b/Source/WebKit/UIProcess/Cocoa/ViewGestureController.h >index a77d34566737bfdcdea30d66d23b356086a02db3..3fd29946e69478f81ed6a4f75d0612299bb61909 100644 >--- a/Source/WebKit/UIProcess/Cocoa/ViewGestureController.h >+++ b/Source/WebKit/UIProcess/Cocoa/ViewGestureController.h >@@ -312,6 +312,7 @@ private: > bool m_isConnectedToProcess { false }; > > SnapshotRemovalTracker m_snapshotRemovalTracker; >+ WTF::Function<void()> m_provisionalLoadCallback; > }; > > } // namespace WebKit >diff --git a/Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm b/Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm >index 320648b76438c3a68b5ce84ab323720adab5f9b0..0d3711fb8d1f26d3c7609fc832c18eb5db5bfcc4 100644 >--- a/Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm >+++ b/Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm >@@ -300,19 +300,6 @@ void ViewGestureController::endSwipeGesture(WebBackForwardListItem* targetItem, > return; > } > >- if (auto drawingArea = m_webPageProxy.drawingArea()) { >- uint64_t pageID = m_webPageProxy.pageID(); >- GestureID gestureID = m_currentGestureID; >- drawingArea->dispatchAfterEnsuringDrawing([pageID, gestureID] (CallbackBase::Error error) { >- if (auto gestureController = controllerForGesture(pageID, gestureID)) >- gestureController->willCommitPostSwipeTransitionLayerTree(error == CallbackBase::Error::None); >- }); >- drawingArea->hideContentUntilPendingUpdate(); >- } else { >- removeSwipeSnapshot(); >- return; >- } >- > // FIXME: Should we wait for VisuallyNonEmptyLayout like we do on Mac? > m_snapshotRemovalTracker.start(SnapshotRemovalTracker::RenderTreeSizeThreshold > | SnapshotRemovalTracker::RepaintAfterNavigation >@@ -326,6 +313,22 @@ void ViewGestureController::endSwipeGesture(WebBackForwardListItem* targetItem, > m_backgroundColorForCurrentSnapshot = snapshot->backgroundColor(); > m_webPageProxy.didChangeBackgroundColor(); > } >+ >+ uint64_t pageID = m_webPageProxy.pageID(); >+ GestureID gestureID = m_currentGestureID; >+ m_provisionalLoadCallback = [this, pageID, gestureID] { >+ auto drawingArea = m_webPageProxy.drawingArea(); >+ if (!drawingArea) { >+ removeSwipeSnapshot(); >+ return; >+ } >+ >+ drawingArea->dispatchAfterEnsuringDrawing([pageID, gestureID] (CallbackBase::Error error) { >+ if (auto gestureController = controllerForGesture(pageID, gestureID)) >+ gestureController->willCommitPostSwipeTransitionLayerTree(error == CallbackBase::Error::None); >+ }); >+ drawingArea->hideContentUntilPendingUpdate(); >+ }; > } > > void ViewGestureController::setRenderTreeSize(uint64_t renderTreeSize)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192319
: 356396