Title: [91222] trunk/Source/WebCore
Revision
91222
Author
[email protected]
Date
2011-07-18 17:14:48 -0700 (Mon, 18 Jul 2011)

Log Message

Prep work for: Crash under WebPage::platformDragEnded when dragging on Mac
https://bugs.webkit.org/show_bug.cgi?id=64766
<rdar://problem/9548174>
        
Reviewed by Darin Adler.

Add a DragClient function that is called when a drag is ended, and call it from DragController::dragEnded.
This isn't used yet, but will be used by WebKit2 on Mac.
        
This patch also cleans up style in DragClient.h.

No change in behavior, no tests needed.

* page/DragClient.h:
(WebCore::DragClient::dragEnded): Stub virtual implementation for now, this will be used by
    WebKit2 on Mac.
* page/DragController.cpp:
(WebCore::DragController::dragEnded): Call DragClient::dragEnded.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (91221 => 91222)


--- trunk/Source/WebCore/ChangeLog	2011-07-18 23:59:48 UTC (rev 91221)
+++ trunk/Source/WebCore/ChangeLog	2011-07-19 00:14:48 UTC (rev 91222)
@@ -1,3 +1,24 @@
+2011-07-18  Brian Weinstein  <[email protected]>
+
+        Prep work for: Crash under WebPage::platformDragEnded when dragging on Mac
+        https://bugs.webkit.org/show_bug.cgi?id=64766
+        <rdar://problem/9548174>
+        
+        Reviewed by Darin Adler.
+
+        Add a DragClient function that is called when a drag is ended, and call it from DragController::dragEnded.
+        This isn't used yet, but will be used by WebKit2 on Mac.
+        
+        This patch also cleans up style in DragClient.h.
+
+        No change in behavior, no tests needed.
+
+        * page/DragClient.h:
+        (WebCore::DragClient::dragEnded): Stub virtual implementation for now, this will be used by
+            WebKit2 on Mac.
+        * page/DragController.cpp:
+        (WebCore::DragController::dragEnded): Call DragClient::dragEnded.
+
 2011-07-18  Jon Honeycutt  <[email protected]>
 
         Focus and selection events are not fired when a <select>'s selection

Modified: trunk/Source/WebCore/page/DragClient.h (91221 => 91222)


--- trunk/Source/WebCore/page/DragClient.h	2011-07-18 23:59:48 UTC (rev 91221)
+++ trunk/Source/WebCore/page/DragClient.h	2011-07-19 00:14:48 UTC (rev 91222)
@@ -58,20 +58,23 @@
         virtual void willPerformDragDestinationAction(DragDestinationAction, DragData*) = 0;
         virtual void willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*) = 0;
         virtual DragDestinationAction actionMaskForDrag(DragData*) = 0;
-        //We work in window rather than view coordinates here
+
+        // We work in window rather than view coordinates here.
         virtual DragSourceAction dragSourceActionMaskForPoint(const IntPoint& windowPoint) = 0;
         
         virtual void startDrag(DragImageRef dragImage, const IntPoint& dragImageOrigin, const IntPoint& eventPos, Clipboard*, Frame*, bool linkDrag = false) = 0;
         
         virtual void dragControllerDestroyed() = 0;
+
 #if PLATFORM(MAC)
-        //Mac specific helper functions to allow access to functionality in webkit -- such as 
-        //web archives and NSPasteboard extras 
-        //not abstract as that would require another #if PLATFORM(MAC) for the SVGImage client empty impl
-        virtual void declareAndWriteDragImage(NSPasteboard*, DOMElement*, NSURL*, NSString*, Frame*) {};
+        // Mac-specific helper function to allow access to web archives and NSPasteboard extras in WebKit.
+        // This is not abstract as that would require another #if PLATFORM(MAC) for the SVGImage client empty implentation.
+        virtual void declareAndWriteDragImage(NSPasteboard *, DOMElement*, NSURL *, NSString *, Frame*) { }
 #endif
         
-        virtual ~DragClient() {};
+        virtual void dragEnded() { }
+
+        virtual ~DragClient() { }
     };
     
 }

Modified: trunk/Source/WebCore/page/DragController.cpp (91221 => 91222)


--- trunk/Source/WebCore/page/DragController.cpp	2011-07-18 23:59:48 UTC (rev 91221)
+++ trunk/Source/WebCore/page/DragController.cpp	2011-07-19 00:14:48 UTC (rev 91222)
@@ -158,6 +158,8 @@
     m_dragInitiator = 0;
     m_didInitiateDrag = false;
     m_page->dragCaretController()->clear();
+    
+    m_client->dragEnded();
 }
 
 DragOperation DragController::dragEntered(DragData* dragData)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to