From eadceed22b307f96168b5dead8401a40847b1664 Mon Sep 17 00:00:00 2001 From: "timothy_horton@apple.com" Date: Thu, 7 Aug 2014 23:29:31 +0000 Subject: [PATCH] setCustomSwipeViews inside didChangeBackForwardList client callback is ignored https://bugs.webkit.org/show_bug.cgi?id=135633 Reviewed by Sam Weinig. * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didChangeBackForwardList): * UIProcess/ios/PageClientImplIOS.h: * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted. * UIProcess/mac/PageClientImpl.h: * UIProcess/mac/PageClientImpl.mm: (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted. WebKit clears the set of custom swipe views at the end of WebPageProxy::didChangeBackForwardList, *after* calling into the client. This means that if the client wants to setCustomSwipeViews in didChangeBackForwardList, it won't be respected. Since there's only one client of this SPI, let's just stop clearing the list of custom swipe views in WebKit and leave that totally up to the client. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172307 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebKit2/ChangeLog | 24 +++++++++++++++++++++++ Source/WebKit2/UIProcess/PageClient.h | 1 - Source/WebKit2/UIProcess/WebPageProxy.cpp | 4 ---- Source/WebKit2/UIProcess/ios/PageClientImplIOS.h | 1 - Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm | 5 ----- Source/WebKit2/UIProcess/mac/PageClientImpl.h | 1 - Source/WebKit2/UIProcess/mac/PageClientImpl.mm | 5 ----- 7 files changed, 24 insertions(+), 17 deletions(-) diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index e580022..b2db8d7 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,27 @@ +2014-08-07 Timothy Horton + + setCustomSwipeViews inside didChangeBackForwardList client callback is ignored + https://bugs.webkit.org/show_bug.cgi?id=135633 + + + Reviewed by Sam Weinig. + + * UIProcess/PageClient.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::didChangeBackForwardList): + * UIProcess/ios/PageClientImplIOS.h: + * UIProcess/ios/PageClientImplIOS.mm: + (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted. + * UIProcess/mac/PageClientImpl.h: + * UIProcess/mac/PageClientImpl.mm: + (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted. + WebKit clears the set of custom swipe views at the end of WebPageProxy::didChangeBackForwardList, + *after* calling into the client. This means that if the client wants to setCustomSwipeViews in + didChangeBackForwardList, it won't be respected. + + Since there's only one client of this SPI, let's just stop clearing the list of custom swipe + views in WebKit and leave that totally up to the client. + 2014-08-07 Enrica Casucci [Services with UI] Action menu does not appear if selection includes both text and an image. diff --git a/Source/WebKit2/UIProcess/PageClient.h b/Source/WebKit2/UIProcess/PageClient.h index a67addc..f8a8d08 100644 --- a/Source/WebKit2/UIProcess/PageClient.h +++ b/Source/WebKit2/UIProcess/PageClient.h @@ -182,7 +182,6 @@ public: virtual LayerOrView *acceleratedCompositingRootLayer() const = 0; virtual PassRefPtr takeViewSnapshot() = 0; virtual void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) = 0; - virtual void clearCustomSwipeViews() = 0; #endif #if USE(APPKIT) diff --git a/Source/WebKit2/UIProcess/WebPageProxy.cpp b/Source/WebKit2/UIProcess/WebPageProxy.cpp index 0e560ab..3a6f0bd 100644 --- a/Source/WebKit2/UIProcess/WebPageProxy.cpp +++ b/Source/WebKit2/UIProcess/WebPageProxy.cpp @@ -962,10 +962,6 @@ void WebPageProxy::didChangeBackForwardList(WebBackForwardListItem* added, Vecto m_pageLoadState.setCanGoBack(transaction, m_backForwardList->backItem()); m_pageLoadState.setCanGoForward(transaction, m_backForwardList->forwardItem()); - -#if PLATFORM(MAC) - m_pageClient.clearCustomSwipeViews(); -#endif } void WebPageProxy::willGoToBackForwardListItem(uint64_t itemID, IPC::MessageDecoder& decoder) diff --git a/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h b/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h index d047c9a..38cf0a9 100644 --- a/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h +++ b/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h @@ -107,7 +107,6 @@ private: virtual PassRefPtr takeViewSnapshot() override; virtual void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) override; - virtual void clearCustomSwipeViews() override; virtual void commitPotentialTapFailed() override; virtual void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color&, const Vector& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius) override; diff --git a/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm b/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm index c6e92f2..b89d042 100644 --- a/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm +++ b/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm @@ -476,11 +476,6 @@ void PageClientImpl::wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent& notImplemented(); } -void PageClientImpl::clearCustomSwipeViews() -{ - notImplemented(); -} - void PageClientImpl::commitPotentialTapFailed() { [m_contentView _commitPotentialTapFailed]; diff --git a/Source/WebKit2/UIProcess/mac/PageClientImpl.h b/Source/WebKit2/UIProcess/mac/PageClientImpl.h index cd7648a..34f8d33 100644 --- a/Source/WebKit2/UIProcess/mac/PageClientImpl.h +++ b/Source/WebKit2/UIProcess/mac/PageClientImpl.h @@ -126,7 +126,6 @@ private: virtual PassRefPtr takeViewSnapshot() override; virtual void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) override; - virtual void clearCustomSwipeViews() override; virtual void accessibilityWebProcessTokenReceived(const IPC::DataReference&); diff --git a/Source/WebKit2/UIProcess/mac/PageClientImpl.mm b/Source/WebKit2/UIProcess/mac/PageClientImpl.mm index fdf26d1..efbeb05 100644 --- a/Source/WebKit2/UIProcess/mac/PageClientImpl.mm +++ b/Source/WebKit2/UIProcess/mac/PageClientImpl.mm @@ -612,11 +612,6 @@ bool PageClientImpl::executeSavedCommandBySelector(const String& selectorString) return [m_wkView _executeSavedCommandBySelector:NSSelectorFromString(selectorString)]; } -void PageClientImpl::clearCustomSwipeViews() -{ - return [m_wkView _setCustomSwipeViews:@[]]; -} - #if USE(DICTATION_ALTERNATIVES) uint64_t PageClientImpl::addDictationAlternatives(const RetainPtr& alternatives) { -- 1.8.3.1