WebKit Bugzilla
Attachment 360107 Details for
Bug 193818
: REGRESSION (PSON): After swipe back, first few attempts to swipe forward not recognized as swipe gestures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
render-tree-size-pson-4.patch (text/plain), 9.82 KB, created by
Antti Koivisto
on 2019-01-25 04:59:54 PST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2019-01-25 04:59:54 PST
Size:
9.82 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 240471) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,42 @@ >+2019-01-25 Antti Koivisto <antti@apple.com> >+ >+ REGRESSION (PSON): After swipe back, first few attempts to swipe forward not recognized as swipe gestures >+ https://bugs.webkit.org/show_bug.cgi?id=193818 >+ <rdar://problem/47456584> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ We don't hit the RenderTreeSizeThreshold milestone to remove the snapshot and allow interaction because we request it >+ from a wrong process (the one we are leaving behind). >+ >+ * UIProcess/Cocoa/ViewGestureController.cpp: >+ (WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame): >+ >+ Request the RenderTreeSizeThreshold notification when the load has started and we know the process to use. >+ >+ (WebKit::ViewGestureController::SnapshotRemovalTracker::hasOutstandingEvent): >+ * UIProcess/Cocoa/ViewGestureController.h: >+ (WebKit::ViewGestureController::SnapshotRemovalTracker::renderTreeSizeThreshold const): >+ (WebKit::ViewGestureController::SnapshotRemovalTracker::setRenderTreeSizeThreshold): >+ * UIProcess/mac/ViewGestureControllerMac.mm: >+ (WebKit::ViewGestureController::endSwipeGesture): >+ >+ Don't request immediately, save the threshold to SnapshotRemovalTracker. >+ >+ (WebKit::ViewGestureController::requestRenderTreeSizeNotificationIfNeeded): >+ >+ Do the request to the right process. >+ >+ * WebProcess/WebPage/ViewGestureGeometryCollector.cpp: >+ (WebKit::ViewGestureGeometryCollector::setRenderTreeSizeNotificationThreshold): >+ >+ Ensure we send the notification even if we reached the threshold before it was requested. >+ >+ (WebKit::ViewGestureGeometryCollector::sendDidHitRenderTreeSizeThresholdIfNeeded): >+ (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout): >+ * WebProcess/WebPage/ViewGestureGeometryCollector.h: >+ (WebKit::ViewGestureGeometryCollector::setRenderTreeSizeNotificationThreshold): Deleted. >+ > 2019-01-24 Ryosuke Niwa <rniwa@webkit.org> > > iOS: Split keyboard should not shrink visualViewport.height >Index: Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp (revision 240407) >+++ Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp (working copy) >@@ -148,7 +148,9 @@ bool ViewGestureController::canSwipeInDi > void ViewGestureController::didStartProvisionalLoadForMainFrame() > { > m_snapshotRemovalTracker.resume(); >- >+#if PLATFORM(MAC) >+ requestRenderTreeSizeNotificationIfNeeded(); >+#endif > if (auto provisionalLoadCallback = WTFMove(m_provisionalLoadCallback)) > provisionalLoadCallback(); > } >@@ -325,6 +327,11 @@ bool ViewGestureController::SnapshotRemo > return stopWaitingForEvent(event, "wait for event cancelled: "); > } > >+bool ViewGestureController::SnapshotRemovalTracker::hasOutstandingEvent(Event event) >+{ >+ return m_outstandingEvents & event; >+} >+ > void ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackIfPossible() > { > if (m_outstandingEvents) { >Index: Source/WebKit/UIProcess/Cocoa/ViewGestureController.h >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/ViewGestureController.h (revision 240407) >+++ Source/WebKit/UIProcess/Cocoa/ViewGestureController.h (working copy) >@@ -61,6 +61,7 @@ namespace WebKit { > class ViewSnapshot; > class WebBackForwardListItem; > class WebPageProxy; >+class WebProcessProxy; > > class ViewGestureController : private IPC::MessageReceiver { > WTF_MAKE_NONCOPYABLE(ViewGestureController); >@@ -179,9 +180,13 @@ private: > > bool eventOccurred(Events); > bool cancelOutstandingEvent(Events); >+ bool hasOutstandingEvent(Event); > > void startWatchdog(Seconds); > >+ uint64_t renderTreeSizeThreshold() const { return m_renderTreeSizeThreshold; } >+ void setRenderTreeSizeThreshold(uint64_t threshold) { m_renderTreeSizeThreshold = threshold; } >+ > private: > static String eventsDescription(Events); > void log(const String&) const; >@@ -196,6 +201,8 @@ private: > WTF::Function<void()> m_removalCallback; > MonotonicTime m_startTime; > >+ uint64_t m_renderTreeSizeThreshold { 0 }; >+ > RunLoop::Timer<SnapshotRemovalTracker> m_watchdogTimer; > > bool m_paused { true }; >@@ -224,6 +231,8 @@ private: > > void forceRepaintIfNeeded(); > >+ void requestRenderTreeSizeNotificationIfNeeded(); >+ > class PendingSwipeTracker { > public: > PendingSwipeTracker(WebPageProxy&, ViewGestureController&); >Index: Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm >=================================================================== >--- Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm (revision 240407) >+++ Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm (working copy) >@@ -33,6 +33,7 @@ > #import "FrameLoadState.h" > #import "Logging.h" > #import "NativeWebWheelEvent.h" >+#import "ProvisionalPageProxy.h" > #import "ViewGestureControllerMessages.h" > #import "ViewGestureGeometryCollectorMessages.h" > #import "ViewSnapshotStore.h" >@@ -737,8 +738,7 @@ void ViewGestureController::endSwipeGest > uint64_t renderTreeSize = 0; > if (ViewSnapshot* snapshot = targetItem->snapshot()) > renderTreeSize = snapshot->renderTreeSize(); >- >- m_webPageProxy.process().send(Messages::ViewGestureGeometryCollector::SetRenderTreeSizeNotificationThreshold(renderTreeSize * swipeSnapshotRemovalRenderTreeSizeTargetFraction), m_webPageProxy.pageID()); >+ auto renderTreeSizeThreshold = renderTreeSize * swipeSnapshotRemovalRenderTreeSizeTargetFraction; > > m_webPageProxy.navigationGestureDidEnd(true, *targetItem); > m_webPageProxy.goToBackForwardItem(*targetItem); >@@ -754,8 +754,12 @@ void ViewGestureController::endSwipeGest > | SnapshotRemovalTracker::MainFrameLoad > | SnapshotRemovalTracker::SubresourceLoads > | SnapshotRemovalTracker::ScrollPositionRestoration; >- if (renderTreeSize) >+ >+ if (renderTreeSizeThreshold) { > desiredEvents |= SnapshotRemovalTracker::RenderTreeSizeThreshold; >+ m_snapshotRemovalTracker.setRenderTreeSizeThreshold(renderTreeSizeThreshold); >+ } >+ > m_snapshotRemovalTracker.start(desiredEvents, [this] { this->forceRepaintIfNeeded(); }); > > // FIXME: Like on iOS, we should ensure that even if one of the timeouts fires, >@@ -840,6 +844,17 @@ bool ViewGestureController::completeSimu > return false; > } > >+void ViewGestureController::requestRenderTreeSizeNotificationIfNeeded() >+{ >+ if (!m_snapshotRemovalTracker.hasOutstandingEvent(SnapshotRemovalTracker::RenderTreeSizeThreshold)) >+ return; >+ >+ auto& process = m_webPageProxy.provisionalPageProxy() ? m_webPageProxy.provisionalPageProxy()->process() : m_webPageProxy.process(); >+ auto threshold = m_snapshotRemovalTracker.renderTreeSizeThreshold(); >+ >+ process.send(Messages::ViewGestureGeometryCollector::SetRenderTreeSizeNotificationThreshold(threshold), m_webPageProxy.pageID()); >+} >+ > } // namespace WebKit > > #endif // PLATFORM(MAC) >Index: Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.cpp (revision 240407) >+++ Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.cpp (working copy) >@@ -253,6 +253,20 @@ void ViewGestureGeometryCollector::colle > bool frameHandlesMagnificationGesture = m_webPage.mainWebFrame()->handlesPageScaleGesture(); > m_webPage.send(Messages::ViewGestureController::DidCollectGeometryForMagnificationGesture(visibleContentRect, frameHandlesMagnificationGesture)); > } >+ >+void ViewGestureGeometryCollector::setRenderTreeSizeNotificationThreshold(uint64_t size) >+{ >+ m_renderTreeSizeNotificationThreshold = size; >+ sendDidHitRenderTreeSizeThresholdIfNeeded(); >+} >+ >+void ViewGestureGeometryCollector::sendDidHitRenderTreeSizeThresholdIfNeeded() >+{ >+ if (m_renderTreeSizeNotificationThreshold && m_webPage.renderTreeSize() >= m_renderTreeSizeNotificationThreshold) { >+ m_webPage.send(Messages::ViewGestureController::DidHitRenderTreeSizeThreshold()); >+ m_renderTreeSizeNotificationThreshold = 0; >+ } >+} > #endif > > void ViewGestureGeometryCollector::mainFrameDidLayout() >@@ -261,10 +275,7 @@ void ViewGestureGeometryCollector::mainF > m_cachedTextLegibilityScales.reset(); > #endif > #if PLATFORM(MAC) >- if (m_renderTreeSizeNotificationThreshold && m_webPage.renderTreeSize() >= m_renderTreeSizeNotificationThreshold) { >- m_webPage.send(Messages::ViewGestureController::DidHitRenderTreeSizeThreshold()); >- m_renderTreeSizeNotificationThreshold = 0; >- } >+ sendDidHitRenderTreeSizeThresholdIfNeeded(); > #endif > } > >Index: Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.h >=================================================================== >--- Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.h (revision 240407) >+++ Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.h (working copy) >@@ -55,9 +55,8 @@ private: > > #if PLATFORM(MAC) > void collectGeometryForMagnificationGesture(); >- void setRenderTreeSizeNotificationThreshold(uint64_t size) { m_renderTreeSizeNotificationThreshold = size; } >- >- void renderTreeSizeNotificationTimerFired(); >+ void setRenderTreeSizeNotificationThreshold(uint64_t); >+ void sendDidHitRenderTreeSizeThresholdIfNeeded(); > #endif > > void dispatchDidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect targetRect, WebCore::FloatRect visibleContentRect, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale);
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
Flags:
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193818
:
360092
|
360094
|
360099
|
360107
|
360108
|
360109
|
360110