[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

jianli at chromium.org jianli at chromium.org
Thu Apr 8 00:37:07 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit daad90e54d4c486661370408ef50082bf1a83090
Author: jianli at chromium.org <jianli at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 15 18:13:36 2009 +0000

    Bug 31090 - [Chromium] Add DownloadURL format to Chromium clipboard.
    https://bugs.webkit.org/show_bug.cgi?id=31090
    
    Reviewed by Dmitry Titov.
    
    The proposal to whatwg can be found here:
    http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-August/022118.html
    
    WebCore:
    
    * platform/chromium/ChromiumDataObject.cpp:
    (WebCore::ChromiumDataObject::clear):
    (WebCore::ChromiumDataObject::hasData):
    (WebCore::ChromiumDataObject::ChromiumDataObject):
    * platform/chromium/ChromiumDataObject.h:
    * platform/chromium/ClipboardChromium.cpp:
    (WebCore::):
    (WebCore::clipboardTypeFromMIMEType):
    (WebCore::ClipboardChromium::setData):
    
    WebKit/chromium:
    
    * public/WebDragData.h:
    * src/WebDragData.cpp:
    (WebKit::WebDragData::downloadURL):
    (WebKit::WebDragData::setDownloadURL):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52160 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 04b1fb8..879d034 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2009-12-15  Jian Li  <jianli at chromium.org>
+
+        Reviewed by Dmitry Titov.
+
+        Bug 31090 - [Chromium] Add DownloadURL format to Chromium clipboard.
+        https://bugs.webkit.org/show_bug.cgi?id=31090
+
+        The proposal to whatwg can be found here:
+        http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-August/022118.html
+
+        * platform/chromium/ChromiumDataObject.cpp:
+        (WebCore::ChromiumDataObject::clear):
+        (WebCore::ChromiumDataObject::hasData):
+        (WebCore::ChromiumDataObject::ChromiumDataObject):
+        * platform/chromium/ChromiumDataObject.h:
+        * platform/chromium/ClipboardChromium.cpp:
+        (WebCore::):
+        (WebCore::clipboardTypeFromMIMEType):
+        (WebCore::ClipboardChromium::setData):
+
 2009-12-15  Chris Fleizach  <cfleizach at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/platform/chromium/ChromiumDataObject.cpp b/WebCore/platform/chromium/ChromiumDataObject.cpp
index 683c2e6..df0849c 100644
--- a/WebCore/platform/chromium/ChromiumDataObject.cpp
+++ b/WebCore/platform/chromium/ChromiumDataObject.cpp
@@ -37,6 +37,7 @@ void ChromiumDataObject::clear()
 {
     url = KURL();
     urlTitle = "";
+    downloadURL = KURL();
     fileExtension = "";
     filenames.clear();
     plainText = "";
@@ -50,6 +51,7 @@ void ChromiumDataObject::clear()
 bool ChromiumDataObject::hasData() const
 {
     return !url.isEmpty()
+        || !downloadURL.isEmpty()
         || !fileExtension.isEmpty()
         || !filenames.isEmpty()
         || !plainText.isEmpty()
@@ -60,6 +62,7 @@ bool ChromiumDataObject::hasData() const
 ChromiumDataObject::ChromiumDataObject(const ChromiumDataObject& other)
     : url(other.url)
     , urlTitle(other.urlTitle)
+    , downloadURL(other.downloadURL)
     , fileExtension(other.fileExtension)
     , filenames(other.filenames)
     , plainText(other.plainText)
diff --git a/WebCore/platform/chromium/ChromiumDataObject.h b/WebCore/platform/chromium/ChromiumDataObject.h
index 3e8675e..15eb911 100644
--- a/WebCore/platform/chromium/ChromiumDataObject.h
+++ b/WebCore/platform/chromium/ChromiumDataObject.h
@@ -59,6 +59,8 @@ namespace WebCore {
         KURL url;
         String urlTitle;
 
+        KURL downloadURL;
+
         String fileExtension;
         Vector<String> filenames;
 
diff --git a/WebCore/platform/chromium/ClipboardChromium.cpp b/WebCore/platform/chromium/ClipboardChromium.cpp
index 1a2caa4..6c1e050 100644
--- a/WebCore/platform/chromium/ClipboardChromium.cpp
+++ b/WebCore/platform/chromium/ClipboardChromium.cpp
@@ -53,7 +53,7 @@ using namespace HTMLNames;
 // We provide the IE clipboard types (URL and Text), and the clipboard types specified in the WHATWG Web Applications 1.0 draft
 // see http://www.whatwg.org/specs/web-apps/current-work/ Section 6.3.5.3
 
-enum ClipboardDataType { ClipboardDataTypeNone, ClipboardDataTypeURL, ClipboardDataTypeText };
+enum ClipboardDataType { ClipboardDataTypeNone, ClipboardDataTypeURL, ClipboardDataTypeText, ClipboardDataTypeDownloadURL };
 
 static ClipboardDataType clipboardTypeFromMIMEType(const String& type)
 {
@@ -64,6 +64,8 @@ static ClipboardDataType clipboardTypeFromMIMEType(const String& type)
         return ClipboardDataTypeText;
     if (cleanType == "url" || cleanType == "text/uri-list")
         return ClipboardDataTypeURL;
+    if (cleanType == "downloadurl")
+        return ClipboardDataTypeDownloadURL;
 
     return ClipboardDataTypeNone;
 }
@@ -157,6 +159,14 @@ bool ClipboardChromium::setData(const String& type, const String& data)
         return true;
     }
     
+    if (winType == ClipboardDataTypeDownloadURL) {
+        KURL url = KURL(ParsedURLString, data);
+        if (url.isValid()) {
+            m_dataObject->downloadURL = url;
+            return true;
+        }
+    }
+
     return false;
 }
 
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 483d7a8..d5a6581 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-15  Jian Li  <jianli at chromium.org>
+
+        Reviewed by Dmitry Titov.
+
+        Bug 31090 - [Chromium] Add DownloadURL format to Chromium clipboard.
+        https://bugs.webkit.org/show_bug.cgi?id=31090
+
+        The proposal to whatwg can be found here:
+        http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-August/022118.html
+
+        * public/WebDragData.h:
+        * src/WebDragData.cpp:
+        (WebKit::WebDragData::downloadURL):
+        (WebKit::WebDragData::setDownloadURL):
+
 2009-12-14  Evan Stade  <estade at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebKit/chromium/public/WebDragData.h b/WebKit/chromium/public/WebDragData.h
index f7a165d..01582a9 100644
--- a/WebKit/chromium/public/WebDragData.h
+++ b/WebKit/chromium/public/WebDragData.h
@@ -72,6 +72,9 @@ public:
     WEBKIT_API WebString urlTitle() const;
     WEBKIT_API void setURLTitle(const WebString&);
 
+    WEBKIT_API WebURL downloadURL() const;
+    WEBKIT_API void setDownloadURL(const WebURL&);
+
     WEBKIT_API WebString fileExtension() const;
     WEBKIT_API void setFileExtension(const WebString&);
 
diff --git a/WebKit/chromium/src/WebDragData.cpp b/WebKit/chromium/src/WebDragData.cpp
index 4af1119..3bd4a02 100644
--- a/WebKit/chromium/src/WebDragData.cpp
+++ b/WebKit/chromium/src/WebDragData.cpp
@@ -88,6 +88,18 @@ void WebDragData::setURLTitle(const WebString& urlTitle)
     m_private->urlTitle = urlTitle;
 }
 
+WebURL WebDragData::downloadURL() const
+{
+    ASSERT(!isNull());
+    return m_private->downloadURL;
+}
+
+void WebDragData::setDownloadURL(const WebURL& downloadURL)
+{
+    ensureMutable();
+    m_private->downloadURL = downloadURL;
+}
+
 WebString WebDragData::fileExtension() const
 {
     ASSERT(!isNull());

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list