Commit a9be5099 authored by dbates@webkit.org's avatar dbates@webkit.org

<https://webkit.org/b/120088> Define Clipboard::hasData() only when building with drag support

Reviewed by Darin Adler.

Clipboard::hasData() is specific to drag-and-drop support. We should only define it when
such support is enabled.

* dom/Clipboard.cpp: Move hasData() to DRAG_SUPPORT section of the file.
* dom/Clipboard.h: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent dd0e80ee
2013-08-20 Daniel Bates <dabates@apple.com>
<https://webkit.org/b/120088> Define Clipboard::hasData() only when building with drag support
Reviewed by Darin Adler.
Clipboard::hasData() is specific to drag-and-drop support. We should only define it when
such support is enabled.
* dom/Clipboard.cpp: Move hasData() to DRAG_SUPPORT section of the file.
* dom/Clipboard.h: Ditto.
2013-08-20 Antti Koivisto <antti@apple.com> 2013-08-20 Antti Koivisto <antti@apple.com>
<https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument <https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
...@@ -108,11 +108,6 @@ bool Clipboard::canWriteData() const ...@@ -108,11 +108,6 @@ bool Clipboard::canWriteData() const
return m_policy == ClipboardWritable; return m_policy == ClipboardWritable;
} }
bool Clipboard::hasData()
{
return m_pasteboard->hasData();
}
void Clipboard::clearData(const String& type) void Clipboard::clearData(const String& type)
{ {
if (!canWriteData()) if (!canWriteData())
...@@ -220,6 +215,11 @@ PassRefPtr<Clipboard> Clipboard::createForDragAndDrop(ClipboardAccessPolicy poli ...@@ -220,6 +215,11 @@ PassRefPtr<Clipboard> Clipboard::createForDragAndDrop(ClipboardAccessPolicy poli
return adoptRef(new Clipboard(policy, Pasteboard::createForDragAndDrop(dragData), DragAndDrop, dragData.containsFiles())); return adoptRef(new Clipboard(policy, Pasteboard::createForDragAndDrop(dragData), DragAndDrop, dragData.containsFiles()));
} }
bool Clipboard::hasData()
{
return m_pasteboard->hasData();
}
bool Clipboard::canSetDragImage() const bool Clipboard::canSetDragImage() const
{ {
// Note that the spec doesn't actually allow drag image modification outside the dragstart // Note that the spec doesn't actually allow drag image modification outside the dragstart
......
...@@ -59,8 +59,6 @@ namespace WebCore { ...@@ -59,8 +59,6 @@ namespace WebCore {
PassRefPtr<FileList> files() const; PassRefPtr<FileList> files() const;
bool hasData();
void clearData(const String& type); void clearData(const String& type);
void clearData(); void clearData();
...@@ -85,6 +83,8 @@ namespace WebCore { ...@@ -85,6 +83,8 @@ namespace WebCore {
static PassRefPtr<Clipboard> createForDragAndDrop(); static PassRefPtr<Clipboard> createForDragAndDrop();
static PassRefPtr<Clipboard> createForDragAndDrop(ClipboardAccessPolicy, const DragData&); static PassRefPtr<Clipboard> createForDragAndDrop(ClipboardAccessPolicy, const DragData&);
bool hasData();
bool dropEffectIsUninitialized() const { return m_dropEffect == "uninitialized"; } bool dropEffectIsUninitialized() const { return m_dropEffect == "uninitialized"; }
DragOperation sourceOperation() const; DragOperation sourceOperation() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment