[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 12:50:24 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit ed16762ecbaf041824582846cbcfaa30355603b4
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Aug 31 14:38:51 2010 +0000
2010-08-31 Daniel Cheng <dcheng at chromium.org>
Reviewed by Tony Chang.
[chromium] Add an interface for platform copy/paste drag/drop data objects
https://bugs.webkit.org/show_bug.cgi?id=44914
Currently, Chromium only supports a few hardcoded data types in
event.dataTransfer. This is the first of several patches to add support
for arbitrary data types.
No new tests.
* WebCore.gypi:
* platform/chromium/ChromiumDataObjectNew.h: Added.
* platform/chromium/ClipboardChromium.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 11ab99f..f1322eb 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-08-31 Daniel Cheng <dcheng at chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] Add an interface for platform copy/paste drag/drop data objects
+ https://bugs.webkit.org/show_bug.cgi?id=44914
+
+ Currently, Chromium only supports a few hardcoded data types in
+ event.dataTransfer. This is the first of several patches to add support
+ for arbitrary data types.
+
+ No new tests.
+
+ * WebCore.gypi:
+ * platform/chromium/ChromiumDataObjectNew.h: Added.
+ * platform/chromium/ClipboardChromium.cpp:
+
2010-08-30 Andrey Kosyakov <caseq at chromium.org>
Reviewed by Yury Semikhatsky.
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 89b6d0c..1317357 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -2146,6 +2146,7 @@
'platform/chromium/ChromiumBridge.h',
'platform/chromium/ChromiumDataObject.cpp',
'platform/chromium/ChromiumDataObject.h',
+ 'platform/chromium/ChromiumDataObjectNew.h',
'platform/chromium/ClipboardChromium.cpp',
'platform/chromium/ClipboardChromium.h',
'platform/chromium/ClipboardChromiumLinux.cpp',
diff --git a/WebCore/platform/chromium/ChromiumDataObjectNew.h b/WebCore/platform/chromium/ChromiumDataObjectNew.h
new file mode 100644
index 0000000..93ac9cb
--- /dev/null
+++ b/WebCore/platform/chromium/ChromiumDataObjectNew.h
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2008, 2009, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ChromiumDataObjectNew_h
+#define ChromiumDataObjectNew_h
+
+#include "KURL.h"
+#include "PlatformString.h"
+#include "SharedBuffer.h"
+#include <wtf/HashMap.h>
+#include <wtf/HashSet.h>
+#include <wtf/RefPtr.h>
+#include <wtf/Vector.h>
+#include <wtf/text/StringHash.h>
+
+namespace WebCore {
+
+// A data object for holding data that would be in a clipboard or moved
+// during a drag-n-drop operation. This is the data that WebCore is aware
+// of and is not specific to a platform.
+class ChromiumDataObjectNew : public RefCounted<ChromiumDataObjectNew> {
+public:
+ virtual void clearData(const String& type) = 0;
+ virtual void clearAllExceptFiles() = 0;
+ virtual void clear() = 0;
+ virtual bool hasData() const = 0;
+ virtual HashSet<String> types() const = 0;
+ virtual String getData(const String& type, bool& succeeded) const = 0;
+ virtual bool setData(const String& type, const String& data) = 0;
+
+ // Special accessors for URL and HTML since they carry additional
+ // metadata.
+ virtual String getURL(String* title) const = 0;
+ virtual void setURL(const String& url, const String& title) = 0;
+ virtual String getHTML(String* baseURL) const = 0;
+ virtual void setHTML(const String& html, const KURL& baseURL) = 0;
+
+ virtual bool hasFilenames() const = 0;
+ virtual Vector<String> filenames() const = 0;
+
+ // Accessors used when transferring drag data from the renderer to the
+ // browser.
+ virtual HashMap<String, String> dataMap() const = 0;
+ virtual String urlTitle() const = 0;
+ virtual KURL htmlBaseURL() const = 0;
+
+ // Used for transferring file data from the renderer to the browser.
+ virtual String fileExtension() const = 0;
+ virtual String fileContentFilename() const = 0;
+ virtual PassRefPtr<SharedBuffer> fileContent() const = 0;
+ virtual void setFileExtension(const String&) = 0;
+ virtual void setFileContentFilename(const String&) = 0;
+ virtual void setFileContent(PassRefPtr<SharedBuffer>) = 0;
+};
+
+} // namespace WebCore
+
+#endif
diff --git a/WebCore/platform/chromium/ClipboardChromium.cpp b/WebCore/platform/chromium/ClipboardChromium.cpp
index 23508a6..25924e2 100644
--- a/WebCore/platform/chromium/ClipboardChromium.cpp
+++ b/WebCore/platform/chromium/ClipboardChromium.cpp
@@ -30,6 +30,7 @@
#include "CachedImage.h"
#include "ChromiumBridge.h"
#include "ChromiumDataObject.h"
+#include "ChromiumDataObjectNew.h"
#include "ClipboardUtilitiesChromium.h"
#include "Document.h"
#include "DragData.h"
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list