Title: [154576] trunk/Source/WebCore
- Revision
- 154576
- Author
- [email protected]
- Date
- 2013-08-25 03:28:51 -0700 (Sun, 25 Aug 2013)
Log Message
No need for hasData in Clipboard
https://bugs.webkit.org/show_bug.cgi?id=120269
Reviewed by Andreas Kling.
This simple forwarder does not belong in the Clipboard class.
The drag code that uses it already works directly with Pasteboard.
* dom/Clipboard.cpp: Removed hasData.
* dom/Clipboard.h: Ditto.
* page/DragController.cpp:
(WebCore::DragController::startDrag): Call through the pasteboard.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (154575 => 154576)
--- trunk/Source/WebCore/ChangeLog 2013-08-25 10:15:43 UTC (rev 154575)
+++ trunk/Source/WebCore/ChangeLog 2013-08-25 10:28:51 UTC (rev 154576)
@@ -1,5 +1,21 @@
2013-08-25 Darin Adler <[email protected]>
+ No need for hasData in Clipboard
+ https://bugs.webkit.org/show_bug.cgi?id=120269
+
+ Reviewed by Andreas Kling.
+
+ This simple forwarder does not belong in the Clipboard class.
+ The drag code that uses it already works directly with Pasteboard.
+
+ * dom/Clipboard.cpp: Removed hasData.
+ * dom/Clipboard.h: Ditto.
+
+ * page/DragController.cpp:
+ (WebCore::DragController::startDrag): Call through the pasteboard.
+
+2013-08-25 Darin Adler <[email protected]>
+
No need for documentTypeString function in Frame
https://bugs.webkit.org/show_bug.cgi?id=120262
Modified: trunk/Source/WebCore/dom/Clipboard.cpp (154575 => 154576)
--- trunk/Source/WebCore/dom/Clipboard.cpp 2013-08-25 10:15:43 UTC (rev 154575)
+++ trunk/Source/WebCore/dom/Clipboard.cpp 2013-08-25 10:28:51 UTC (rev 154576)
@@ -215,11 +215,6 @@
return adoptRef(new Clipboard(policy, Pasteboard::createForDragAndDrop(dragData), DragAndDrop, dragData.containsFiles()));
}
-bool Clipboard::hasData()
-{
- return m_pasteboard->hasData();
-}
-
bool Clipboard::canSetDragImage() const
{
// Note that the spec doesn't actually allow drag image modification outside the dragstart
Modified: trunk/Source/WebCore/dom/Clipboard.h (154575 => 154576)
--- trunk/Source/WebCore/dom/Clipboard.h 2013-08-25 10:15:43 UTC (rev 154575)
+++ trunk/Source/WebCore/dom/Clipboard.h 2013-08-25 10:28:51 UTC (rev 154576)
@@ -83,8 +83,6 @@
static PassRefPtr<Clipboard> createForDragAndDrop();
static PassRefPtr<Clipboard> createForDragAndDrop(ClipboardAccessPolicy, const DragData&);
- bool hasData();
-
bool dropEffectIsUninitialized() const { return m_dropEffect == "uninitialized"; }
DragOperation sourceOperation() const;
Modified: trunk/Source/WebCore/page/DragController.cpp (154575 => 154576)
--- trunk/Source/WebCore/page/DragController.cpp 2013-08-25 10:15:43 UTC (rev 154575)
+++ trunk/Source/WebCore/page/DragController.cpp 2013-08-25 10:28:51 UTC (rev 154576)
@@ -786,7 +786,7 @@
Image* image = getImage(element);
if (state.type == DragSourceActionSelection) {
- if (!clipboard->hasData()) {
+ if (!clipboard->pasteboard().hasData()) {
RefPtr<Range> selectionRange = src->selection().toNormalizedRange();
ASSERT(selectionRange);
@@ -812,7 +812,7 @@
// We shouldn't be starting a drag for an image that can't provide an extension.
// This is an early detection for problems encountered later upon drop.
ASSERT(!image->filenameExtension().isEmpty());
- if (!clipboard->hasData()) {
+ if (!clipboard->pasteboard().hasData()) {
m_draggingImageURL = imageURL;
if (element->isContentRichlyEditable())
selectElement(element);
@@ -830,7 +830,7 @@
doSystemDrag(dragImage, dragLoc, dragOrigin, clipboard, src, false);
} else if (!linkURL.isEmpty() && (m_dragSourceAction & DragSourceActionLink)) {
- if (!clipboard->hasData())
+ if (!clipboard->pasteboard().hasData())
// Simplify whitespace so the title put on the clipboard resembles what the user sees
// on the web page. This includes replacing newlines with spaces.
clipboard->pasteboard().writeURL(linkURL, hitTestResult.textContent().simplifyWhiteSpace(), src);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes