Title: [150119] trunk/Source/WebCore
Revision
150119
Author
[email protected]
Date
2013-05-15 09:27:43 -0700 (Wed, 15 May 2013)

Log Message

[Mac] Make Clipboard::declareAndWriteDragImage non-virtual
https://bugs.webkit.org/show_bug.cgi?id=116156

Reviewed by Anders Carlsson.

* dom/Clipboard.h: Make declareAndWriteDragImage non-virtual for non-legacy.

* platform/Pasteboard.h:
(WebCore::Pasteboard::name): Added. Can be used in Mac platform code to do
pasteboard operations directly instead of through the Pasteboard class
functions. Not sure if we'll need it long term or not.

* platform/mac/ClipboardMac.h: Removed declareAndWriteDragImage function.

* platform/mac/ClipboardMac.mm:
(WebCore::Clipboard::declareAndWriteDragImage): Made this function a Clipboard
member instead of ClipboardMac.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (150118 => 150119)


--- trunk/Source/WebCore/ChangeLog	2013-05-15 16:22:14 UTC (rev 150118)
+++ trunk/Source/WebCore/ChangeLog	2013-05-15 16:27:43 UTC (rev 150119)
@@ -1,3 +1,23 @@
+2013-05-15  Darin Adler  <[email protected]>
+
+        [Mac] Make Clipboard::declareAndWriteDragImage non-virtual
+        https://bugs.webkit.org/show_bug.cgi?id=116156
+
+        Reviewed by Anders Carlsson.
+
+        * dom/Clipboard.h: Make declareAndWriteDragImage non-virtual for non-legacy.
+
+        * platform/Pasteboard.h:
+        (WebCore::Pasteboard::name): Added. Can be used in Mac platform code to do
+        pasteboard operations directly instead of through the Pasteboard class
+        functions. Not sure if we'll need it long term or not.
+
+        * platform/mac/ClipboardMac.h: Removed declareAndWriteDragImage function.
+
+        * platform/mac/ClipboardMac.mm:
+        (WebCore::Clipboard::declareAndWriteDragImage): Made this function a Clipboard
+        member instead of ClipboardMac.
+
 2013-05-15  Peter Gal  <[email protected]>
 
         [curl] Remove version #if guards

Modified: trunk/Source/WebCore/dom/Clipboard.h (150118 => 150119)


--- trunk/Source/WebCore/dom/Clipboard.h	2013-05-15 16:22:14 UTC (rev 150118)
+++ trunk/Source/WebCore/dom/Clipboard.h	2013-05-15 16:27:43 UTC (rev 150119)
@@ -96,7 +96,7 @@
         
         LEGACY_VIRTUAL DragImageRef createDragImage(IntPoint& dragLocation) const LEGACY_PURE;
 #if ENABLE(DRAG_SUPPORT)
-        virtual void declareAndWriteDragImage(Element*, const KURL&, const String& title, Frame*) = 0;
+        LEGACY_VIRTUAL void declareAndWriteDragImage(Element*, const KURL&, const String& title, Frame*) LEGACY_PURE;
 #endif
         LEGACY_VIRTUAL void writeURL(const KURL&, const String&, Frame*) LEGACY_PURE;
         LEGACY_VIRTUAL void writeRange(Range*, Frame*) LEGACY_PURE;

Modified: trunk/Source/WebCore/platform/Pasteboard.h (150118 => 150119)


--- trunk/Source/WebCore/platform/Pasteboard.h	2013-05-15 16:22:14 UTC (rev 150118)
+++ trunk/Source/WebCore/platform/Pasteboard.h	2013-05-15 16:27:43 UTC (rev 150119)
@@ -82,6 +82,7 @@
 
 #if PLATFORM(MAC)
     static PassOwnPtr<Pasteboard> create(const String& pasteboardName);
+    String name() { return m_pasteboardName; }
 
     // This is required to support OS X services.
     void writeSelectionForTypes(const Vector<String>& pasteboardTypes, bool canSmartCopyOrDelete, Frame*, ShouldSerializeSelectedTextForClipboard);

Modified: trunk/Source/WebCore/platform/mac/ClipboardMac.h (150118 => 150119)


--- trunk/Source/WebCore/platform/mac/ClipboardMac.h	2013-05-15 16:22:14 UTC (rev 150118)
+++ trunk/Source/WebCore/platform/mac/ClipboardMac.h	2013-05-15 16:27:43 UTC (rev 150119)
@@ -53,10 +53,6 @@
 
     virtual ~ClipboardMac();
 
-#if ENABLE(DRAG_SUPPORT)
-    virtual void declareAndWriteDragImage(Element*, const KURL&, const String& title, Frame*);
-#endif
-    
     // Methods for getting info in Cocoa's type system
     const String& pasteboardName() { return m_pasteboardName; }
 

Modified: trunk/Source/WebCore/platform/mac/ClipboardMac.mm (150118 => 150119)


--- trunk/Source/WebCore/platform/mac/ClipboardMac.mm	2013-05-15 16:22:14 UTC (rev 150118)
+++ trunk/Source/WebCore/platform/mac/ClipboardMac.mm	2013-05-15 16:27:43 UTC (rev 150119)
@@ -67,11 +67,11 @@
 }
 
 #if ENABLE(DRAG_SUPPORT)
-void ClipboardMac::declareAndWriteDragImage(Element* element, const KURL& url, const String& title, Frame* frame)
+void Clipboard::declareAndWriteDragImage(Element* element, const KURL& url, const String& title, Frame* frame)
 {
     ASSERT(frame);
     if (Page* page = frame->page())
-        page->dragController()->client()->declareAndWriteDragImage(m_pasteboardName, kit(element), url, title, frame);
+        page->dragController()->client()->declareAndWriteDragImage(m_pasteboard->name(), kit(element), url, title, frame);
 }
 #endif // ENABLE(DRAG_SUPPORT)
     
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to