setCustomSwipeViews inside didChangeBackForwardList client callback is ignored
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Aug 2014 23:29:31 +0000 (23:29 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Aug 2014 23:29:31 +0000 (23:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135633
<rdar://problem/17926507>

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
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/ios/PageClientImplIOS.h
Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm
Source/WebKit2/UIProcess/mac/PageClientImpl.h
Source/WebKit2/UIProcess/mac/PageClientImpl.mm

index e580022..b2db8d7 100644 (file)
@@ -1,3 +1,27 @@
+2014-08-07  Timothy Horton  <timothy_horton@apple.com>
+
+        setCustomSwipeViews inside didChangeBackForwardList client callback is ignored
+        https://bugs.webkit.org/show_bug.cgi?id=135633
+        <rdar://problem/17926507>
+
+        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  <enrica@apple.com>
 
         [Services with UI] Action menu does not appear if selection includes both text and an image.
index a67addc..f8a8d08 100644 (file)
@@ -182,7 +182,6 @@ public:
     virtual LayerOrView *acceleratedCompositingRootLayer() const = 0;
     virtual PassRefPtr<ViewSnapshot> takeViewSnapshot() = 0;
     virtual void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) = 0;
-    virtual void clearCustomSwipeViews() = 0;
 #endif
 
 #if USE(APPKIT)
index 0e560ab..3a6f0bd 100644 (file)
@@ -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)
index d047c9a..38cf0a9 100644 (file)
@@ -107,7 +107,6 @@ private:
 
     virtual PassRefPtr<ViewSnapshot> 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<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius) override;
index c6e92f2..b89d042 100644 (file)
@@ -476,11 +476,6 @@ void PageClientImpl::wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&
     notImplemented();
 }
 
-void PageClientImpl::clearCustomSwipeViews()
-{
-    notImplemented();
-}
-
 void PageClientImpl::commitPotentialTapFailed()
 {
     [m_contentView _commitPotentialTapFailed];
index cd7648a..34f8d33 100644 (file)
@@ -126,7 +126,6 @@ private:
 
     virtual PassRefPtr<ViewSnapshot> takeViewSnapshot() override;
     virtual void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) override;
-    virtual void clearCustomSwipeViews() override;
 
     virtual void accessibilityWebProcessTokenReceived(const IPC::DataReference&);
 
index fdf26d1..efbeb05 100644 (file)
@@ -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<NSTextAlternatives>& alternatives)
 {