Title: [212266] trunk/Source/WebKit2
Revision
212266
Author
megan_gard...@apple.com
Date
2017-02-13 17:32:37 -0800 (Mon, 13 Feb 2017)

Log Message

Implement Drag cancels
https://bugs.webkit.org/show_bug.cgi?id=168266

Reviewed by Wenson Hsieh.

Adds support for the UI Process to cancel already started drag events.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::cancelledDrag):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::cancelledDrag):
* WebProcess/WebPage/WebPage.messages.in:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (212265 => 212266)


--- trunk/Source/WebKit2/ChangeLog	2017-02-14 01:29:24 UTC (rev 212265)
+++ trunk/Source/WebKit2/ChangeLog	2017-02-14 01:32:37 UTC (rev 212266)
@@ -1,3 +1,19 @@
+2017-02-13  Megan Gardner  <megan_gard...@apple.com>
+
+        Implement Drag cancels
+        https://bugs.webkit.org/show_bug.cgi?id=168266
+
+        Reviewed by Wenson Hsieh.
+
+        Adds support for the UI Process to cancel already started drag events.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::cancelledDrag):
+        * UIProcess/WebPageProxy.h:
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::cancelledDrag):
+        * WebProcess/WebPage/WebPage.messages.in:
+
 2017-02-13  Simon Fraser  <simon.fra...@apple.com>
 
         Call WKDestroyRenderingResources() on iOS when tabs are backgrounded

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (212265 => 212266)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2017-02-14 01:29:24 UTC (rev 212265)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2017-02-14 01:32:37 UTC (rev 212266)
@@ -1821,6 +1821,12 @@
         return;
     m_process->send(Messages::WebPage::DragEnded(clientPosition, globalPosition, operation), m_pageID);
 }
+    
+void WebPageProxy::dragCancelled()
+{
+    if (isValid())
+        m_process->send(Messages::WebPage::DragCancelled(), m_pageID);
+}
 #endif // ENABLE(DRAG_SUPPORT)
 
 void WebPageProxy::handleMouseEvent(const NativeWebMouseEvent& event)

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (212265 => 212266)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2017-02-14 01:29:24 UTC (rev 212265)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2017-02-14 01:32:37 UTC (rev 212266)
@@ -835,6 +835,7 @@
 
     void didPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted);
     void dragEnded(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t operation);
+    void dragCancelled();
 #if PLATFORM(COCOA)
     void setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, const WebCore::FloatPoint& dragImageAnchor, bool isLinkDrag);
     void setPromisedDataForImage(const String& pasteboardName, const SharedMemory::Handle& imageHandle, uint64_t imageSize, const String& filename, const String& extension,

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (212265 => 212266)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2017-02-14 01:29:24 UTC (rev 212265)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2017-02-14 01:32:37 UTC (rev 212266)
@@ -751,6 +751,7 @@
 
     void willStartDrag() { ASSERT(!m_isStartingDrag); m_isStartingDrag = true; }
     void didStartDrag() { ASSERT(m_isStartingDrag); m_isStartingDrag = false; }
+    void dragCancelled() { m_isStartingDrag = false; }
 #endif // ENABLE(DRAG_SUPPORT)
 
     void beginPrinting(uint64_t frameID, const PrintInfo&);

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (212265 => 212266)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in	2017-02-14 01:29:24 UTC (rev 212265)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in	2017-02-14 01:32:37 UTC (rev 212266)
@@ -247,6 +247,7 @@
 #if ENABLE(DRAG_SUPPORT)
     DidStartDrag()
     DragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation)
+    DragCancelled()
 #endif
 
 #if ENABLE(DATA_INTERACTION)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to