Remove unused support for long presses from WebKit
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Oct 2015 00:17:17 +0000 (00:17 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Oct 2015 00:17:17 +0000 (00:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150345

Reviewed by Beth Dakin.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/APIUIClient.h:
(API::UIClient::didBeginTrackingPotentialLongMousePress): Deleted.
(API::UIClient::didRecognizeLongMousePress): Deleted.
(API::UIClient::didCancelTrackingPotentialLongMousePress): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient): Deleted.
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesGetLongMousePressEnabled):
(WKPreferencesSetLongMousePressEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress): Deleted.
(WebKit::WebPageProxy::didRecognizeLongMousePress): Deleted.
(WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
(API::InjectedBundle::PageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
(API::InjectedBundle::PageUIClient::didRecognizeLongMousePress): Deleted.
(API::InjectedBundle::PageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
(WebKit::InjectedBundlePageUIClient::didRecognizeLongMousePress): Deleted.
(WebKit::InjectedBundlePageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress): Deleted.
(WebKit::WebChromeClient::didRecognizeLongMousePress): Deleted.
(WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Deleted.

* page/Chrome.cpp:
(WebCore::Chrome::didBeginTrackingPotentialLongMousePress): Deleted.
(WebCore::Chrome::didRecognizeLongMousePress): Deleted.
(WebCore::Chrome::didCancelTrackingPotentialLongMousePress): Deleted.
* page/Chrome.h:
* page/ChromeClient.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler): Deleted.
(WebCore::EventHandler::clear): Deleted.
(WebCore::EventHandler::handleMousePressEvent): Deleted.
(WebCore::EventHandler::eventMayStartDrag): Deleted.
(WebCore::EventHandler::handleMouseReleaseEvent): Deleted.
(WebCore::EventHandler::beginTrackingPotentialLongMousePress): Deleted.
(WebCore::EventHandler::recognizeLongMousePress): Deleted.
(WebCore::EventHandler::cancelTrackingPotentialLongMousePress): Deleted.
(WebCore::EventHandler::clearLongMousePressState): Deleted.
(WebCore::EventHandler::handleLongMousePressMouseMovedEvent): Deleted.
(WebCore::EventHandler::handleMouseMoveEvent): Deleted.
(WebCore::EventHandler::handleDrag): Deleted.
* page/EventHandler.h:
* page/Settings.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191323 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/Chrome.cpp
Source/WebCore/page/Chrome.h
Source/WebCore/page/ChromeClient.h
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/EventHandler.h
Source/WebCore/page/Settings.in
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPreferencesDefinitions.h
Source/WebKit2/UIProcess/API/APIUIClient.h
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/C/WKPageUIClient.h
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp

index cb921c5..c6d839f 100644 (file)
@@ -1,5 +1,34 @@
 2015-10-19  Tim Horton  <timothy_horton@apple.com>
 
+        Remove unused support for long presses from WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=150345
+
+        Reviewed by Beth Dakin.
+
+        * page/Chrome.cpp:
+        (WebCore::Chrome::didBeginTrackingPotentialLongMousePress): Deleted.
+        (WebCore::Chrome::didRecognizeLongMousePress): Deleted.
+        (WebCore::Chrome::didCancelTrackingPotentialLongMousePress): Deleted.
+        * page/Chrome.h:
+        * page/ChromeClient.h:
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::EventHandler): Deleted.
+        (WebCore::EventHandler::clear): Deleted.
+        (WebCore::EventHandler::handleMousePressEvent): Deleted.
+        (WebCore::EventHandler::eventMayStartDrag): Deleted.
+        (WebCore::EventHandler::handleMouseReleaseEvent): Deleted.
+        (WebCore::EventHandler::beginTrackingPotentialLongMousePress): Deleted.
+        (WebCore::EventHandler::recognizeLongMousePress): Deleted.
+        (WebCore::EventHandler::cancelTrackingPotentialLongMousePress): Deleted.
+        (WebCore::EventHandler::clearLongMousePressState): Deleted.
+        (WebCore::EventHandler::handleLongMousePressMouseMovedEvent): Deleted.
+        (WebCore::EventHandler::handleMouseMoveEvent): Deleted.
+        (WebCore::EventHandler::handleDrag): Deleted.
+        * page/EventHandler.h:
+        * page/Settings.in:
+
+2015-10-19  Tim Horton  <timothy_horton@apple.com>
+
         WKView being inside WKWebView leads to weird API issues
         https://bugs.webkit.org/show_bug.cgi?id=150174
 
index d2bfc65..8013bea 100644 (file)
@@ -599,19 +599,4 @@ void Chrome::notifyPopupOpeningObservers() const
         observer->willOpenPopup();
 }
 
-void Chrome::didBeginTrackingPotentialLongMousePress(const IntPoint& mouseDownPosition, const HitTestResult& hitTestResult)
-{
-    m_client.didBeginTrackingPotentialLongMousePress(mouseDownPosition, hitTestResult);
-}
-
-void Chrome::didRecognizeLongMousePress()
-{
-    m_client.didRecognizeLongMousePress();
-}
-
-void Chrome::didCancelTrackingPotentialLongMousePress()
-{
-    m_client.didCancelTrackingPotentialLongMousePress();
-}
-
 } // namespace WebCore
index c0bd858..6272dbc 100644 (file)
@@ -186,10 +186,6 @@ public:
     void registerPopupOpeningObserver(PopupOpeningObserver*);
     void unregisterPopupOpeningObserver(PopupOpeningObserver*);
 
-    void didBeginTrackingPotentialLongMousePress(const IntPoint&, const HitTestResult&);
-    void didRecognizeLongMousePress();
-    void didCancelTrackingPotentialLongMousePress();
-
 private:
     void notifyPopupOpeningObservers() const;
 
index bb41def..52b3fad 100644 (file)
@@ -400,10 +400,6 @@ public:
     virtual bool isPointerLocked() { return false; }
 #endif
 
-    virtual void didBeginTrackingPotentialLongMousePress(const IntPoint& mouseDownPosition, const HitTestResult&) { UNUSED_PARAM(mouseDownPosition); }
-    virtual void didRecognizeLongMousePress() { }
-    virtual void didCancelTrackingPotentialLongMousePress() { }
-
     virtual FloatSize minimumWindowSize() const { return FloatSize(100, 100); };
 
     virtual bool isEmptyChromeClient() const { return false; }
index 50ceccf..670e135 100644 (file)
@@ -135,9 +135,6 @@ const int TextDragHysteresis = 3;
 const int GeneralDragHysteresis = 3;
 #endif // ENABLE(DRAG_SUPPORT)
 
-const std::chrono::milliseconds longMousePressRecognitionDelay = std::chrono::milliseconds(500);
-const int maximumLongMousePressDragDistance = 5; // in points.
-
 #if ENABLE(IOS_GESTURE_EVENTS) || ENABLE(MAC_GESTURE_EVENTS)
 const float GestureUnknown = 0;
 #endif
@@ -381,7 +378,6 @@ EventHandler::EventHandler(Frame& frame)
 #if ENABLE(CURSOR_SUPPORT)
     , m_cursorUpdateTimer(*this, &EventHandler::cursorUpdateTimerFired)
 #endif
-    , m_longMousePressTimer(*this, &EventHandler::recognizeLongMousePress)
     , m_autoscrollController(std::make_unique<AutoscrollController>())
 #if !ENABLE(IOS_TOUCH_EVENTS)
     , m_fakeMouseMoveEventTimer(*this, &EventHandler::fakeMouseMoveEventTimerFired)
@@ -422,7 +418,6 @@ void EventHandler::clear()
 #if ENABLE(CURSOR_VISIBILITY)
     cancelAutoHideCursorTimer();
 #endif
-    clearLongMousePressState();
     m_resizeLayer = nullptr;
     m_elementUnderMouse = nullptr;
     m_lastElementUnderMouse = nullptr;
@@ -467,7 +462,6 @@ void EventHandler::clear()
     m_maxMouseMovedDuration = 0;
     m_baseEventType = PlatformEvent::NoType;
     m_didStartDrag = false;
-    m_didLongPressInvokeContextMenu = false;
 }
 
 void EventHandler::nodeWillBeRemoved(Node& nodeToBeRemoved)
@@ -786,11 +780,6 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve
         }
     }
 
-    if (event.event().button() == LeftButton && event.isOverLink()) {
-        // FIXME 135703: Handle long press for more than just links.
-        beginTrackingPotentialLongMousePress(event.hitTestResult());
-    }
-
     // We don't do this at the start of mouse down handling,
     // because we don't want to do it until we know we didn't hit a widget.
     if (singleClick)
@@ -875,9 +864,6 @@ bool EventHandler::eventMayStartDrag(const PlatformMouseEvent& event) const
     if (event.button() != LeftButton || event.clickCount() != 1)
         return false;
 
-    if (m_didRecognizeLongMousePress)
-        return false;
-    
     FrameView* view = m_frame.view();
     if (!view)
         return false;
@@ -1033,11 +1019,6 @@ bool EventHandler::handleMouseReleaseEvent(const MouseEventWithHitTestResults& e
     m_mouseDownWasInSubframe = false;
   
     bool handled = false;
-    
-    if (event.event().button() == LeftButton) {
-        // FIXME 135767: Implement long mouse press for arbitrary mouse buttons.
-        clearLongMousePressState();
-    }
 
     // Clear the selection if the mouse didn't move after the last mouse
     // press and it's not a context menu click.  We do this so when clicking
@@ -1578,68 +1559,6 @@ void EventHandler::autoHideCursorTimerFired()
         view->setCursor(m_currentMouseCursor);
 }
 #endif
-    
-void EventHandler::beginTrackingPotentialLongMousePress(const HitTestResult& hitTestResult)
-{
-    clearLongMousePressState();
-
-    Page* page = m_frame.page();
-    if (!(page && page->settings().longMousePressEnabled()))
-        return;
-
-    m_longMousePressTimer.startOneShot(longMousePressRecognitionDelay);
-
-    page->chrome().didBeginTrackingPotentialLongMousePress(m_mouseDownPos, hitTestResult);
-}
-    
-void EventHandler::recognizeLongMousePress()
-{
-    Page* page = m_frame.page();
-    if (!page)
-        return;
-
-    m_didRecognizeLongMousePress = true;
-
-    // Clear mouse state to avoid initiating a drag.
-    m_mousePressed = false;
-    invalidateClick();
-
-    page->chrome().didRecognizeLongMousePress();
-}
-    
-void EventHandler::cancelTrackingPotentialLongMousePress()
-{
-    if (!m_longMousePressTimer.isActive())
-        return;
-
-    clearLongMousePressState();
-
-    Page* page = m_frame.page();
-    if (!page)
-        return;
-
-    page->chrome().didCancelTrackingPotentialLongMousePress();
-}
-
-void EventHandler::clearLongMousePressState()
-{
-    m_longMousePressTimer.stop();
-    m_didRecognizeLongMousePress = false;
-}
-    
-bool EventHandler::handleLongMousePressMouseMovedEvent(const PlatformMouseEvent& mouseEvent)
-{
-    if (mouseEvent.button() != LeftButton || mouseEvent.type() != PlatformEvent::MouseMoved)
-        return false;
-
-    if (m_didRecognizeLongMousePress)
-        return true;
-
-    if (!mouseMovementExceedsThreshold(mouseEvent.position(), maximumLongMousePressDragDistance))
-        cancelTrackingPotentialLongMousePress();
-
-    return false;
-}
 
 static LayoutPoint documentPointForWindowPoint(Frame& frame, const IntPoint& windowPoint)
 {
@@ -1894,9 +1813,6 @@ bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& platformMouseE
         return true;
 #endif
 
-    if (handleLongMousePressMouseMovedEvent(platformMouseEvent))
-        return true;
-
     RefPtr<FrameView> protector(m_frame.view());
     
     setLastKnownMousePosition(platformMouseEvent);
@@ -3529,8 +3445,6 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
         // On OS X this causes problems with the ownership of the pasteboard and the promised types.
         if (m_didStartDrag) {
             m_mouseDownMayStartDrag = false;
-
-            cancelTrackingPotentialLongMousePress();
             return true;
         }
         if (dragState().source && dragState().shouldDispatchEvents) {
index a2b5caf..3d57588 100644 (file)
@@ -459,13 +459,6 @@ private:
     void autoHideCursorTimerFired();
 #endif
 
-    void beginTrackingPotentialLongMousePress(const HitTestResult&);
-    void recognizeLongMousePress();
-    void cancelTrackingPotentialLongMousePress();
-    bool longMousePressHysteresisExceeded();
-    void clearLongMousePressState();
-    bool handleLongMousePressMouseMovedEvent(const PlatformMouseEvent&);
-
     void clearLatchedState();
 
     Frame& m_frame;
@@ -494,9 +487,6 @@ private:
     Timer m_cursorUpdateTimer;
 #endif
 
-    Timer m_longMousePressTimer;
-    bool m_didRecognizeLongMousePress { false };
-
     std::unique_ptr<AutoscrollController> m_autoscrollController;
     bool m_mouseDownMayStartAutoscroll { false };
     bool m_mouseDownWasInSubframe { false };
@@ -575,7 +565,6 @@ private:
     double m_maxMouseMovedDuration { 0 };
     PlatformEvent::Type m_baseEventType { PlatformEvent::NoType };
     bool m_didStartDrag { false };
-    bool m_didLongPressInvokeContextMenu { false };
     bool m_isHandlingWheelEvent { false };
 
 #if ENABLE(CURSOR_VISIBILITY)
index 6421d60..0ec9f73 100644 (file)
@@ -232,8 +232,6 @@ useImageDocumentForSubframePDF initial=false
 # of 1080p video and stereo audio.
 maximumSourceBufferSize type=int, initial=318767104, conditional=MEDIA_SOURCE
 
-longMousePressEnabled initial=false
-
 serviceControlsEnabled initial=false, conditional=SERVICE_CONTROLS
 
 ignoreViewportScalingConstraints initial=false
index 5d5ac02..762f5b6 100644 (file)
@@ -1,3 +1,46 @@
+2015-10-19  Tim Horton  <timothy_horton@apple.com>
+
+        Remove unused support for long presses from WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=150345
+
+        Reviewed by Beth Dakin.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/APIUIClient.h:
+        (API::UIClient::didBeginTrackingPotentialLongMousePress): Deleted.
+        (API::UIClient::didRecognizeLongMousePress): Deleted.
+        (API::UIClient::didCancelTrackingPotentialLongMousePress): Deleted.
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetPageUIClient): Deleted.
+        * UIProcess/API/C/WKPageUIClient.h:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesGetLongMousePressEnabled):
+        (WKPreferencesSetLongMousePressEnabled): Deleted.
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress): Deleted.
+        (WebKit::WebPageProxy::didRecognizeLongMousePress): Deleted.
+        (WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress): Deleted.
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
+        (API::InjectedBundle::PageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
+        (API::InjectedBundle::PageUIClient::didRecognizeLongMousePress): Deleted.
+        (API::InjectedBundle::PageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
+        * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
+        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
+        (WebKit::InjectedBundlePageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
+        (WebKit::InjectedBundlePageUIClient::didRecognizeLongMousePress): Deleted.
+        (WebKit::InjectedBundlePageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
+        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress): Deleted.
+        (WebKit::WebChromeClient::didRecognizeLongMousePress): Deleted.
+        (WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress): Deleted.
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences): Deleted.
+
 2015-10-19  Chris Dumez  <cdumez@apple.com>
 
         Make sure development Safari does not delete the stable Safari cache storage.
index 6961e20..fed00e1 100644 (file)
     macro(EnableInheritURIQueryComponent, enableInheritURIQueryComponent, Bool, bool, false) \
     macro(ServiceControlsEnabled, serviceControlsEnabled, Bool, bool, false) \
     macro(GamepadsEnabled, gamepadsEnabled, Bool, bool, false) \
-    macro(LongMousePressEnabled, longMousePressEnabled, Bool, bool, false) \
     macro(NewBlockInsideInlineModelEnabled, newBlockInsideInlineModelEnabled, Bool, bool, false) \
     macro(AntialiasedFontDilationEnabled, antialiasedFontDilationEnabled, Bool, bool, false) \
     macro(HTTPEquivEnabled, httpEquivEnabled, Bool, bool, true) \
index 8b88a2d..ad9e97a 100644 (file)
@@ -147,10 +147,6 @@ public:
 
     virtual void pinnedStateDidChange(WebKit::WebPageProxy&) { }
 
-    virtual void didBeginTrackingPotentialLongMousePress(WebKit::WebPageProxy*, const WebCore::IntPoint&, const WebKit::WebHitTestResultData&, API::Object*) { }
-    virtual void didRecognizeLongMousePress(WebKit::WebPageProxy*, API::Object*) { }
-    virtual void didCancelTrackingPotentialLongMousePress(WebKit::WebPageProxy*, API::Object*) { }
-
     virtual void isPlayingAudioDidChange(WebKit::WebPageProxy&) { }
 
 #if ENABLE(MEDIA_SESSION)
index d14c50a..2698f19 100644 (file)
@@ -1922,31 +1922,6 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
             m_client.pinnedStateDidChange(toAPI(&page), m_client.base.clientInfo);
         }
 
-        virtual void didBeginTrackingPotentialLongMousePress(WebPageProxy* page, const IntPoint& mouseDownPosition, const WebHitTestResultData& data, API::Object* userInfo) override
-        {
-            if (!m_client.didBeginTrackingPotentialLongMousePress)
-                return;
-
-            RefPtr<API::HitTestResult> webHitTestResult = API::HitTestResult::create(data);
-            m_client.didBeginTrackingPotentialLongMousePress(toAPI(page), toAPI(mouseDownPosition), toAPI(webHitTestResult.get()), toAPI(userInfo), m_client.base.clientInfo);
-        }
-
-        virtual void didRecognizeLongMousePress(WebPageProxy* page, API::Object* userInfo) override
-        {
-            if (!m_client.didRecognizeLongMousePress)
-                return;
-
-            m_client.didRecognizeLongMousePress(toAPI(page), toAPI(userInfo), m_client.base.clientInfo);
-        }
-
-        virtual void didCancelTrackingPotentialLongMousePress(WebPageProxy* page, API::Object* userInfo) override
-        {
-            if (!m_client.didCancelTrackingPotentialLongMousePress)
-                return;
-
-            m_client.didCancelTrackingPotentialLongMousePress(toAPI(page), toAPI(userInfo), m_client.base.clientInfo);
-        }
-
         virtual void isPlayingAudioDidChange(WebPageProxy& page) override
         {
             if (!m_client.isPlayingAudioDidChange)
index eed7bb1..b697c98 100644 (file)
@@ -85,9 +85,6 @@ typedef void (*WKPageShowColorPickerCallback)(WKPageRef page, WKStringRef initia
 typedef void (*WKPageHideColorPickerCallback)(WKPageRef page, const void* clientInfo);
 typedef void (*WKPageUnavailablePluginButtonClickedCallback)(WKPageRef page, WKPluginUnavailabilityReason pluginUnavailabilityReason, WKDictionaryRef pluginInfoDictionary, const void* clientInfo);
 typedef void (*WKPagePinnedStateDidChangeCallback)(WKPageRef page, const void* clientInfo);
-typedef void (*WKPageDidBeginTrackingPotentialLongMousePressCallback)(WKPageRef page, WKPoint mouseDownPosition, WKHitTestResultRef hitTestResult, WKTypeRef userData, const void *clientInfo);
-typedef void (*WKPageDidRecognizeLongMousePressCallback)(WKPageRef page, WKTypeRef userData, const void *clientInfo);
-typedef void (*WKPageDidCancelTrackingPotentialLongMousePressCallback)(WKPageRef page, WKTypeRef userData, const void *clientInfo);
 typedef void (*WKPageIsPlayingAudioDidChangeCallback)(WKPageRef page, const void* clientInfo);
 typedef void (*WKPageDecidePolicyForUserMediaPermissionRequestCallback)(WKPageRef page, WKFrameRef frame, WKSecurityOriginRef origin, WKUserMediaPermissionRequestRef permissionRequest, const void* clientInfo);
 typedef void (*WKPageDidClickAutoFillButtonCallback)(WKPageRef page, WKTypeRef userData, const void *clientInfo);
@@ -359,7 +356,7 @@ typedef struct WKPageUIClientV4 {
     WKPageDrawFooterCallback                                            drawFooter;
     WKPagePrintFrameCallback                                            printFrame;
     WKPageUIClientCallback                                              runModal;
-    void*                                                               unused1; // Used to be didCompleteRubberBandForMainFrame
+    void*                                                               unused1; // Used to be didCompleteRubberBandForMainFrame.
     WKPageSaveDataToFileInDownloadsFolderCallback                       saveDataToFileInDownloadsFolder;
     void*                                                               shouldInterruptJavaScript_unavailable;
 
@@ -378,9 +375,9 @@ typedef struct WKPageUIClientV4 {
     WKPagePinnedStateDidChangeCallback                                  pinnedStateDidChange;
 
     // Version 4.
-    WKPageDidBeginTrackingPotentialLongMousePressCallback               didBeginTrackingPotentialLongMousePress;
-    WKPageDidRecognizeLongMousePressCallback                            didRecognizeLongMousePress;
-    WKPageDidCancelTrackingPotentialLongMousePressCallback              didCancelTrackingPotentialLongMousePress;
+    void*                                                               unused2; // Used to be didBeginTrackingPotentialLongMousePress.
+    void*                                                               unused3; // Used to be didRecognizeLongMousePress.
+    void*                                                               unused4; // Used to be didCancelTrackingPotentialLongMousePress.
     WKPageIsPlayingAudioDidChangeCallback                               isPlayingAudioDidChange;
 } WKPageUIClientV4;
 
@@ -443,9 +440,9 @@ typedef struct WKPageUIClientV5 {
     WKPagePinnedStateDidChangeCallback                                  pinnedStateDidChange;
 
     // Version 4.
-    WKPageDidBeginTrackingPotentialLongMousePressCallback               didBeginTrackingPotentialLongMousePress;
-    WKPageDidRecognizeLongMousePressCallback                            didRecognizeLongMousePress;
-    WKPageDidCancelTrackingPotentialLongMousePressCallback              didCancelTrackingPotentialLongMousePress;
+    void*                                                               unused2; // Used to be didBeginTrackingPotentialLongMousePress.
+    void*                                                               unused3; // Used to be didRecognizeLongMousePress.
+    void*                                                               unused4; // Used to be didCancelTrackingPotentialLongMousePress.
     WKPageIsPlayingAudioDidChangeCallback                               isPlayingAudioDidChange;
 
     // Version 5.
@@ -516,9 +513,9 @@ typedef struct WKPageUIClientV6 {
     WKPagePinnedStateDidChangeCallback                                  pinnedStateDidChange;
 
     // Version 4.
-    WKPageDidBeginTrackingPotentialLongMousePressCallback               didBeginTrackingPotentialLongMousePress;
-    WKPageDidRecognizeLongMousePressCallback                            didRecognizeLongMousePress;
-    WKPageDidCancelTrackingPotentialLongMousePressCallback              didCancelTrackingPotentialLongMousePress;
+    void*                                                               unused2; // Used to be didBeginTrackingPotentialLongMousePress.
+    void*                                                               unused3; // Used to be didRecognizeLongMousePress.
+    void*                                                               unused4; // Used to be didCancelTrackingPotentialLongMousePress.
     WKPageIsPlayingAudioDidChangeCallback                               isPlayingAudioDidChange;
 
     // Version 5.
index 9a53dc5..7996b1d 100644 (file)
@@ -1327,14 +1327,14 @@ bool WKPreferencesGetGamepadsEnabled(WKPreferencesRef preferencesRef)
     return toImpl(preferencesRef)->gamepadsEnabled();
 }
 
+// FIXME: Remove these when possible.
 void WKPreferencesSetLongMousePressEnabled(WKPreferencesRef preferencesRef, bool enabled)
 {
-    toImpl(preferencesRef)->setLongMousePressEnabled(enabled);
 }
 
 bool WKPreferencesGetLongMousePressEnabled(WKPreferencesRef preferencesRef)
 {
-    return toImpl(preferencesRef)->longMousePressEnabled();
+    return false;
 }
 
 void WKPreferencesSetMinimumZoomFontSize(WKPreferencesRef preferencesRef, double size)
index a93fbb9..bb027e5 100644 (file)
@@ -355,7 +355,7 @@ WK_EXPORT bool WKPreferencesGetImageControlsEnabled(WKPreferencesRef preferences
 WK_EXPORT void WKPreferencesSetGamepadsEnabled(WKPreferencesRef preferencesRef, bool enabled);
 WK_EXPORT bool WKPreferencesGetGamepadsEnabled(WKPreferencesRef preferencesRef);
 
-// Defaults to false.
+// Not implemented, should be deleted once there are no callers.
 WK_EXPORT void WKPreferencesSetLongMousePressEnabled(WKPreferencesRef preferencesRef, bool enabled);
 WK_EXPORT bool WKPreferencesGetLongMousePressEnabled(WKPreferencesRef preferencesRef);
 
index 14f6589..41fe2dd 100644 (file)
@@ -3579,21 +3579,6 @@ void WebPageProxy::mouseDidMoveOverElement(const WebHitTestResultData& hitTestRe
     m_uiClient->mouseDidMoveOverElement(this, hitTestResultData, modifiers, m_process->transformHandlesToObjects(userData.object()).get());
 }
 
-void WebPageProxy::didBeginTrackingPotentialLongMousePress(const IntPoint& mouseDownPosition, const WebHitTestResultData& hitTestResultData, const UserData& userData)
-{
-    m_uiClient->didBeginTrackingPotentialLongMousePress(this, mouseDownPosition, hitTestResultData, m_process->transformHandlesToObjects(userData.object()).get());
-}
-
-void WebPageProxy::didRecognizeLongMousePress(const UserData& userData)
-{
-    m_uiClient->didRecognizeLongMousePress(this, m_process->transformHandlesToObjects(userData.object()).get());
-}
-
-void WebPageProxy::didCancelTrackingPotentialLongMousePress(const UserData& userData)
-{
-    m_uiClient->didCancelTrackingPotentialLongMousePress(this, m_process->transformHandlesToObjects(userData.object()).get());
-}
-
 void WebPageProxy::connectionWillOpen(IPC::Connection& connection)
 {
     ASSERT(&connection == m_process->connection());
index 441209f..cd1a8dd 100644 (file)
@@ -1158,10 +1158,6 @@ private:
     void setStatusText(const String&);
     void mouseDidMoveOverElement(const WebHitTestResultData&, uint32_t modifiers, const UserData&);
 
-    void didBeginTrackingPotentialLongMousePress(const WebCore::IntPoint& mouseDownPosition, const WebHitTestResultData&, const UserData&);
-    void didRecognizeLongMousePress(const UserData&);
-    void didCancelTrackingPotentialLongMousePress(const UserData&);
-
 #if ENABLE(NETSCAPE_PLUGIN_API)
     void unavailablePluginButtonClicked(uint32_t opaquePluginUnavailabilityReason, const String& mimeType, const String& pluginURLString, const String& pluginsPageURLString, const String& frameURLString, const String& pageURLString);
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
index f548e99..5f6b5e3 100644 (file)
@@ -30,10 +30,6 @@ messages -> WebPageProxy {
     RunJavaScriptPrompt(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, String message, String defaultValue) -> (String result) Delayed
     MouseDidMoveOverElement(struct WebKit::WebHitTestResultData hitTestResultData, uint32_t modifiers, WebKit::UserData userData)
 
-    DidBeginTrackingPotentialLongMousePress(WebCore::IntPoint mouseDownPosition, struct WebKit::WebHitTestResultData hitTestResultData, WebKit::UserData userData)
-    DidRecognizeLongMousePress(WebKit::UserData userData)
-    DidCancelTrackingPotentialLongMousePress(WebKit::UserData userData)
-
 #if ENABLE(NETSCAPE_PLUGIN_API)
     UnavailablePluginButtonClicked(uint32_t pluginUnavailabilityReason, String mimeType, String pluginURLString, String pluginspageAttributeURLString, String frameURLString, String pageURLString)
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
index d824082..010c337 100644 (file)
@@ -87,10 +87,6 @@ public:
     virtual WTF::String plugInExtraStyleSheet() const { return emptyString(); }
     virtual WTF::String plugInExtraScript() const { return emptyString(); }
 
-    virtual void didBeginTrackingPotentialLongMousePress(WebKit::WebPage*, const WebCore::IntPoint&, const WebCore::HitTestResult&, RefPtr<API::Object>& userData) { UNUSED_PARAM(userData); }
-    virtual void didRecognizeLongMousePress(WebKit::WebPage*, RefPtr<API::Object>& userData) { UNUSED_PARAM(userData); }
-    virtual void didCancelTrackingPotentialLongMousePress(WebKit::WebPage*, RefPtr<API::Object>& userData) { UNUSED_PARAM(userData); }
-
     virtual void didClickAutoFillButton(WebKit::WebPage&, WebKit::InjectedBundleNodeHandle&, RefPtr<API::Object>&) { }
 };
 
index b777945..e07a6b2 100644 (file)
@@ -54,9 +54,6 @@ typedef WKStringRef (*WKBundlePagePlugInCreateStartLabelTitleCallback)(WKStringR
 typedef WKStringRef (*WKBundlePagePlugInCreateStartLabelSubtitleCallback)(WKStringRef mimeType, const void *clientInfo);
 typedef WKStringRef (*WKBundlePagePlugInCreateExtraStyleSheetCallback)(const void *clientInfo);
 typedef WKStringRef (*WKBundlePagePlugInCreateExtraScriptCallback)(const void *clientInfo);
-typedef void (*WKBundlePageDidBeginTrackingPotentialLongMousePressCallback)(WKBundlePageRef page, WKPoint mouseDownPosition, WKBundleHitTestResultRef hitTestResult, WKTypeRef* userData, const void *clientInfo);
-typedef void (*WKBundlePageDidRecognizeLongMousePressCallback)(WKBundlePageRef page, WKTypeRef* userData, const void *clientInfo);
-typedef void (*WKBundlePageDidCancelTrackingPotentialLongMousePressCallback)(WKBundlePageRef page, WKTypeRef* userData, const void *clientInfo);
 typedef void (*WKBundlePageDidClickAutoFillButtonCallback)(WKBundlePageRef page, WKBundleNodeHandleRef inputElement, WKTypeRef* userData, const void *clientInfo);
 
 typedef struct WKBundlePageUIClientBase {
@@ -167,9 +164,9 @@ typedef struct WKBundlePageUIClientV3 {
     WKBundlePagePlugInCreateExtraScriptCallback                         createPlugInExtraScript;
 
     // Version 3.
-    WKBundlePageDidBeginTrackingPotentialLongMousePressCallback         didBeginTrackingPotentialLongMousePress;
-    WKBundlePageDidRecognizeLongMousePressCallback                      didRecognizeLongMousePress;
-    WKBundlePageDidCancelTrackingPotentialLongMousePressCallback        didCancelTrackingPotentialLongMousePress;
+    void*                                                               unused3;
+    void*                                                               unused4;
+    void*                                                               unused5;
 
     WKBundlePageDidClickAutoFillButtonCallback                          didClickAutoFillButton;
 } WKBundlePageUIClientV3;
index f53b694..016a732 100644 (file)
@@ -202,38 +202,6 @@ String InjectedBundlePageUIClient::plugInExtraScript() const
     return script ? script->string() : String();
 }
 
-void InjectedBundlePageUIClient::didBeginTrackingPotentialLongMousePress(WebPage* page, const IntPoint& mouseDownPosition, const HitTestResult& coreHitTestResult, RefPtr<API::Object>& userData)
-{
-    if (!m_client.didBeginTrackingPotentialLongMousePress)
-        return;
-
-    RefPtr<InjectedBundleHitTestResult> hitTestResult = InjectedBundleHitTestResult::create(coreHitTestResult);
-
-    WKTypeRef userDataToPass = nullptr;
-    m_client.didBeginTrackingPotentialLongMousePress(toAPI(page), toAPI(mouseDownPosition), toAPI(hitTestResult.get()), &userDataToPass, m_client.base.clientInfo);
-    userData = adoptRef(toImpl(userDataToPass));
-}
-
-void InjectedBundlePageUIClient::didRecognizeLongMousePress(WebPage* page, RefPtr<API::Object>& userData)
-{
-    if (!m_client.didRecognizeLongMousePress)
-        return;
-
-    WKTypeRef userDataToPass = nullptr;
-    m_client.didRecognizeLongMousePress(toAPI(page), &userDataToPass, m_client.base.clientInfo);
-    userData = adoptRef(toImpl(userDataToPass));
-}
-
-void InjectedBundlePageUIClient::didCancelTrackingPotentialLongMousePress(WebPage* page, RefPtr<API::Object>& userData)
-{
-    if (!m_client.didCancelTrackingPotentialLongMousePress)
-        return;
-
-    WKTypeRef userDataToPass = nullptr;
-    m_client.didCancelTrackingPotentialLongMousePress(toAPI(page), &userDataToPass, m_client.base.clientInfo);
-    userData = adoptRef(toImpl(userDataToPass));
-}
-
 void InjectedBundlePageUIClient::didClickAutoFillButton(WebPage& page, InjectedBundleNodeHandle& nodeHandle, RefPtr<API::Object>& userData)
 {
     if (!m_client.didClickAutoFillButton)
index 79d61e3..6c6119e 100644 (file)
@@ -70,10 +70,6 @@ public:
     String plugInExtraStyleSheet() const override;
     String plugInExtraScript() const override;
 
-    void didBeginTrackingPotentialLongMousePress(WebPage*, const WebCore::IntPoint&, const WebCore::HitTestResult&, RefPtr<API::Object>& userData) override;
-    void didRecognizeLongMousePress(WebPage*, RefPtr<API::Object>& userData) override;
-    void didCancelTrackingPotentialLongMousePress(WebPage*, RefPtr<API::Object>& userData) override;
-
     void didClickAutoFillButton(WebPage&, InjectedBundleNodeHandle&, RefPtr<API::Object>& userData) override;
 };
 
index 938d13b..636dccd 100644 (file)
@@ -607,40 +607,6 @@ void WebChromeClient::mouseDidMoveOverElement(const HitTestResult& hitTestResult
     m_page->send(Messages::WebPageProxy::MouseDidMoveOverElement(webHitTestResultData, modifierFlags, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
 }
 
-void WebChromeClient::didBeginTrackingPotentialLongMousePress(const IntPoint& mouseDownPosition, const HitTestResult& hitTestResult)
-{
-    RefPtr<API::Object> userData;
-
-    // Notify the bundle client.
-    m_page->injectedBundleUIClient().didBeginTrackingPotentialLongMousePress(m_page, mouseDownPosition, hitTestResult, userData);
-    
-    // Notify the UIProcess.
-    WebHitTestResultData webHitTestResultData(hitTestResult);
-    m_page->send(Messages::WebPageProxy::DidBeginTrackingPotentialLongMousePress(mouseDownPosition, webHitTestResultData, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
-}
-
-void WebChromeClient::didRecognizeLongMousePress()
-{
-    RefPtr<API::Object> userData;
-
-    // Notify the bundle client.
-    m_page->injectedBundleUIClient().didRecognizeLongMousePress(m_page, userData);
-
-    // Notify the UIProcess.
-    m_page->send(Messages::WebPageProxy::DidRecognizeLongMousePress(UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
-}
-
-void WebChromeClient::didCancelTrackingPotentialLongMousePress()
-{
-    RefPtr<API::Object> userData;
-
-    // Notify the bundle client.
-    m_page->injectedBundleUIClient().didCancelTrackingPotentialLongMousePress(m_page, userData);
-
-    // Notify the UIProcess.
-    m_page->send(Messages::WebPageProxy::DidCancelTrackingPotentialLongMousePress(UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
-}
-
 void WebChromeClient::setToolTip(const String& toolTip, TextDirection)
 {
     // Only send a tool tip to the WebProcess if it has changed since the last time this function was called.
index 3b3a5e1..1821b46 100644 (file)
@@ -128,10 +128,6 @@ private:
     virtual void scrollbarsModeDidChange() const override;
     virtual void mouseDidMoveOverElement(const WebCore::HitTestResult&, unsigned modifierFlags) override;
 
-    virtual void didBeginTrackingPotentialLongMousePress(const WebCore::IntPoint& mouseDownPosition, const WebCore::HitTestResult&) override;
-    virtual void didRecognizeLongMousePress() override;
-    virtual void didCancelTrackingPotentialLongMousePress() override;
-
     virtual void setToolTip(const String&, WebCore::TextDirection) override;
     
     virtual void print(WebCore::Frame*) override;
index 7b5ab44..909ce52 100644 (file)
@@ -2907,8 +2907,6 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
     settings.setUseImageDocumentForSubframePDF(true);
 #endif
 
-    settings.setLongMousePressEnabled(store.getBoolValueForKey(WebPreferencesKey::longMousePressEnabledKey()));
-
 #if ENABLE(GAMEPAD)
     RuntimeEnabledFeatures::sharedFeatures().setGamepadsEnabled(store.getBoolValueForKey(WebPreferencesKey::gamepadsEnabledKey()));
 #endif