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 e58002283e916033dde19066f3786aebf67f89e6..b2db8d7207b6e3e8bf6be0ae92121e8c65120ae9 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 a67addc4d5004d74de85c8d91a694891cd4bdfb5..f8a8d0869954f7f0735ed3f582ce18e79051a087 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 0e560ab97ac5794752a925cad80cf973d64ab544..3a6f0bd89821437ffd7b351930e16c9c9c5179ab 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 d047c9ab8bfef2b93c3f718d1a4a4a3d686156f9..38cf0a9823a61ba5c26458ae39c201840f5272cf 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 c6e92f275de15125c7b55ac1f3a7ad7b204dfd7b..b89d04242f077f05ade36c50df902a8e8086ce88 100644 (file)
@@ -476,11 +476,6 @@ void PageClientImpl::wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&
     notImplemented();
 }
 
-void PageClientImpl::clearCustomSwipeViews()
-{
-    notImplemented();
-}
-
 void PageClientImpl::commitPotentialTapFailed()
 {
     [m_contentView _commitPotentialTapFailed];
index cd7648a0b82bad4c9173a9ac08a2e0a7666ae0e1..34f8d33b38ca8e2362507c356aac8609e109a1a5 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 fdf26d1d83e6af9fe73796137cbf753c202b7a79..efbeb05bc76d7fc2d681c3a8d6c3a6d4d49ea7d0 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)
 {