Title: [191323] trunk/Source
Revision
191323
Author
timothy_hor...@apple.com
Date
2015-10-19 17:17:17 -0700 (Mon, 19 Oct 2015)

Log Message

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.

* 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:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (191322 => 191323)


--- trunk/Source/WebCore/ChangeLog	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebCore/ChangeLog	2015-10-20 00:17:17 UTC (rev 191323)
@@ -1,5 +1,34 @@
 2015-10-19  Tim Horton  <timothy_hor...@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_hor...@apple.com>
+
         WKView being inside WKWebView leads to weird API issues
         https://bugs.webkit.org/show_bug.cgi?id=150174
 

Modified: trunk/Source/WebCore/page/Chrome.cpp (191322 => 191323)


--- trunk/Source/WebCore/page/Chrome.cpp	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebCore/page/Chrome.cpp	2015-10-20 00:17:17 UTC (rev 191323)
@@ -599,19 +599,4 @@
         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

Modified: trunk/Source/WebCore/page/Chrome.h (191322 => 191323)


--- trunk/Source/WebCore/page/Chrome.h	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebCore/page/Chrome.h	2015-10-20 00:17:17 UTC (rev 191323)
@@ -186,10 +186,6 @@
     void registerPopupOpeningObserver(PopupOpeningObserver*);
     void unregisterPopupOpeningObserver(PopupOpeningObserver*);
 
-    void didBeginTrackingPotentialLongMousePress(const IntPoint&, const HitTestResult&);
-    void didRecognizeLongMousePress();
-    void didCancelTrackingPotentialLongMousePress();
-
 private:
     void notifyPopupOpeningObservers() const;
 

Modified: trunk/Source/WebCore/page/ChromeClient.h (191322 => 191323)


--- trunk/Source/WebCore/page/ChromeClient.h	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebCore/page/ChromeClient.h	2015-10-20 00:17:17 UTC (rev 191323)
@@ -400,10 +400,6 @@
     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; }

Modified: trunk/Source/WebCore/page/EventHandler.cpp (191322 => 191323)


--- trunk/Source/WebCore/page/EventHandler.cpp	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebCore/page/EventHandler.cpp	2015-10-20 00:17:17 UTC (rev 191323)
@@ -135,9 +135,6 @@
 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 @@
 #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 @@
 #if ENABLE(CURSOR_VISIBILITY)
     cancelAutoHideCursorTimer();
 #endif
-    clearLongMousePressState();
     m_resizeLayer = nullptr;
     m_elementUnderMouse = nullptr;
     m_lastElementUnderMouse = nullptr;
@@ -467,7 +462,6 @@
     m_maxMouseMovedDuration = 0;
     m_baseEventType = PlatformEvent::NoType;
     m_didStartDrag = false;
-    m_didLongPressInvokeContextMenu = false;
 }
 
 void EventHandler::nodeWillBeRemoved(Node& nodeToBeRemoved)
@@ -786,11 +780,6 @@
         }
     }
 
-    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 @@
     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 @@
     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,69 +1559,7 @@
         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)
 {
     FrameView* view = frame.view();
@@ -1894,9 +1813,6 @@
         return true;
 #endif
 
-    if (handleLongMousePressMouseMovedEvent(platformMouseEvent))
-        return true;
-
     RefPtr<FrameView> protector(m_frame.view());
     
     setLastKnownMousePosition(platformMouseEvent);
@@ -3529,8 +3445,6 @@
         // 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) {

Modified: trunk/Source/WebCore/page/EventHandler.h (191322 => 191323)


--- trunk/Source/WebCore/page/EventHandler.h	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebCore/page/EventHandler.h	2015-10-20 00:17:17 UTC (rev 191323)
@@ -459,13 +459,6 @@
     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 @@
     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 @@
     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)

Modified: trunk/Source/WebCore/page/Settings.in (191322 => 191323)


--- trunk/Source/WebCore/page/Settings.in	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebCore/page/Settings.in	2015-10-20 00:17:17 UTC (rev 191323)
@@ -232,8 +232,6 @@
 # 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

Modified: trunk/Source/WebKit2/ChangeLog (191322 => 191323)


--- trunk/Source/WebKit2/ChangeLog	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/ChangeLog	2015-10-20 00:17:17 UTC (rev 191323)
@@ -1,3 +1,46 @@
+2015-10-19  Tim Horton  <timothy_hor...@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  <cdu...@apple.com>
 
         Make sure development Safari does not delete the stable Safari cache storage.

Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (191322 => 191323)


--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2015-10-20 00:17:17 UTC (rev 191323)
@@ -204,7 +204,6 @@
     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) \

Modified: trunk/Source/WebKit2/UIProcess/API/APIUIClient.h (191322 => 191323)


--- trunk/Source/WebKit2/UIProcess/API/APIUIClient.h	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/UIProcess/API/APIUIClient.h	2015-10-20 00:17:17 UTC (rev 191323)
@@ -147,10 +147,6 @@
 
     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)

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (191322 => 191323)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp	2015-10-20 00:17:17 UTC (rev 191323)
@@ -1922,31 +1922,6 @@
             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)

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h (191322 => 191323)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h	2015-10-20 00:17:17 UTC (rev 191323)
@@ -85,9 +85,6 @@
 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 @@
     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 @@
     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 @@
     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 @@
     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.

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (191322 => 191323)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2015-10-20 00:17:17 UTC (rev 191323)
@@ -1327,14 +1327,14 @@
     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)

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h (191322 => 191323)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h	2015-10-20 00:17:17 UTC (rev 191323)
@@ -355,7 +355,7 @@
 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);
 

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (191322 => 191323)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2015-10-20 00:17:17 UTC (rev 191323)
@@ -3579,21 +3579,6 @@
     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());

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (191322 => 191323)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2015-10-20 00:17:17 UTC (rev 191323)
@@ -1158,10 +1158,6 @@
     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)

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (191322 => 191323)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2015-10-20 00:17:17 UTC (rev 191323)
@@ -30,10 +30,6 @@
     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)

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h (191322 => 191323)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h	2015-10-20 00:17:17 UTC (rev 191323)
@@ -87,10 +87,6 @@
     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>&) { }
 };
 

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h (191322 => 191323)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h	2015-10-20 00:17:17 UTC (rev 191323)
@@ -54,9 +54,6 @@
 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 @@
     WKBundlePagePlugInCreateExtraScriptCallback                         createPlugInExtraScript;
 
     // Version 3.
-    WKBundlePageDidBeginTrackingPotentialLongMousePressCallback         didBeginTrackingPotentialLongMousePress;
-    WKBundlePageDidRecognizeLongMousePressCallback                      didRecognizeLongMousePress;
-    WKBundlePageDidCancelTrackingPotentialLongMousePressCallback        didCancelTrackingPotentialLongMousePress;
+    void*                                                               unused3;
+    void*                                                               unused4;
+    void*                                                               unused5;
 
     WKBundlePageDidClickAutoFillButtonCallback                          didClickAutoFillButton;
 } WKBundlePageUIClientV3;

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp (191322 => 191323)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp	2015-10-20 00:17:17 UTC (rev 191323)
@@ -202,38 +202,6 @@
     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)

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h (191322 => 191323)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h	2015-10-20 00:17:17 UTC (rev 191323)
@@ -70,10 +70,6 @@
     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;
 };
 

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (191322 => 191323)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp	2015-10-20 00:17:17 UTC (rev 191323)
@@ -607,40 +607,6 @@
     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.

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (191322 => 191323)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h	2015-10-20 00:17:17 UTC (rev 191323)
@@ -128,10 +128,6 @@
     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;

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (191322 => 191323)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2015-10-20 00:05:27 UTC (rev 191322)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2015-10-20 00:17:17 UTC (rev 191323)
@@ -2907,8 +2907,6 @@
     settings.setUseImageDocumentForSubframePDF(true);
 #endif
 
-    settings.setLongMousePressEnabled(store.getBoolValueForKey(WebPreferencesKey::longMousePressEnabledKey()));
-
 #if ENABLE(GAMEPAD)
     RuntimeEnabledFeatures::sharedFeatures().setGamepadsEnabled(store.getBoolValueForKey(WebPreferencesKey::gamepadsEnabledKey()));
 #endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to