Title: [108554] trunk/Source/WebKit/chromium
Revision
108554
Author
[email protected]
Date
2012-02-22 14:52:26 -0800 (Wed, 22 Feb 2012)

Log Message

[chromium] Cleanup unused WebDragData methods after r107846
https://bugs.webkit.org/show_bug.cgi?id=78837

Reviewed by Tony Chang.

The deleted methods have been replaced by items() and setItems().

* public/platform/WebDragData.h:
(WebDragData):
* src/WebDragData.cpp:
(WebKit::WebDragData::addItem): Add ensureMutable() call to verify preconditions for
                                mutating the item store.

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (108553 => 108554)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-02-22 22:26:22 UTC (rev 108553)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-02-22 22:52:26 UTC (rev 108554)
@@ -1,3 +1,18 @@
+2012-02-22  Daniel Cheng  <[email protected]>
+
+        [chromium] Cleanup unused WebDragData methods after r107846
+        https://bugs.webkit.org/show_bug.cgi?id=78837
+
+        Reviewed by Tony Chang.
+
+        The deleted methods have been replaced by items() and setItems().
+
+        * public/platform/WebDragData.h:
+        (WebDragData):
+        * src/WebDragData.cpp:
+        (WebKit::WebDragData::addItem): Add ensureMutable() call to verify preconditions for
+                                        mutating the item store.
+
 2012-02-22  Tim Dresser  <[email protected]>
 
         CCLayerTreeHostImpl calls didDraw more frequently than willDraw

Modified: trunk/Source/WebKit/chromium/public/platform/WebDragData.h (108553 => 108554)


--- trunk/Source/WebKit/chromium/public/platform/WebDragData.h	2012-02-22 22:26:22 UTC (rev 108553)
+++ trunk/Source/WebKit/chromium/public/platform/WebDragData.h	2012-02-22 22:52:26 UTC (rev 108554)
@@ -100,45 +100,6 @@
 
     WEBKIT_EXPORT WebVector<Item> items() const;
     WEBKIT_EXPORT void setItems(const WebVector<Item>&);
-
-    WEBKIT_EXPORT WebString url() const;
-    WEBKIT_EXPORT void setURL(const WebURL&);
-
-    WEBKIT_EXPORT WebString urlTitle() const;
-    WEBKIT_EXPORT void setURLTitle(const WebString&);
-
-    WEBKIT_EXPORT WebString downloadMetadata() const;
-    WEBKIT_EXPORT void setDownloadMetadata(const WebString&);
-
-    WEBKIT_EXPORT WebString fileExtension() const;
-    WEBKIT_EXPORT void setFileExtension(const WebString&);
-
-    WEBKIT_EXPORT bool containsFilenames() const;
-    WEBKIT_EXPORT void filenames(WebVector<WebString>&) const;
-    WEBKIT_EXPORT void setFilenames(const WebVector<WebString>&);
-    WEBKIT_EXPORT void appendToFilenames(const WebString&);
-
-    WEBKIT_EXPORT WebString plainText() const;
-    WEBKIT_EXPORT void setPlainText(const WebString&);
-
-    WEBKIT_EXPORT WebString htmlText() const;
-    WEBKIT_EXPORT void setHTMLText(const WebString&);
-
-    WEBKIT_EXPORT WebURL htmlBaseURL() const;
-    WEBKIT_EXPORT void setHTMLBaseURL(const WebURL&);
-
-    WEBKIT_EXPORT WebString fileContentFilename() const;
-    WEBKIT_EXPORT void setFileContentFilename(const WebString&);
-
-    WEBKIT_EXPORT WebData fileContent() const;
-    WEBKIT_EXPORT void setFileContent(const WebData&);
-
-    struct CustomData {
-        WebString type;
-        WebString data;
-    };
-    WEBKIT_EXPORT WebVector<CustomData> customData() const;
-    WEBKIT_EXPORT void setCustomData(const WebVector<CustomData>&);
     WEBKIT_EXPORT void addItem(const Item&);
 
 #if WEBKIT_IMPLEMENTATION

Modified: trunk/Source/WebKit/chromium/src/WebDragData.cpp (108553 => 108554)


--- trunk/Source/WebKit/chromium/src/WebDragData.cpp	2012-02-22 22:26:22 UTC (rev 108553)
+++ trunk/Source/WebKit/chromium/src/WebDragData.cpp	2012-02-22 22:52:26 UTC (rev 108554)
@@ -132,6 +132,7 @@
 
 void WebDragData::addItem(const Item& item)
 {
+    ensureMutable();
     switch (item.storageType) {
     case Item::StorageTypeString:
         m_private->setData(item.stringType, item.stringData);
@@ -149,168 +150,6 @@
     }
 }
 
-WebString WebDragData::url() const
-{
-    ASSERT(!isNull());
-    bool ignoredSuccess;
-    return m_private->getData(mimeTypeURL, ignoredSuccess);
-}
-
-void WebDragData::setURL(const WebURL& url)
-{
-    ensureMutable();
-    m_private->setData(mimeTypeURL, KURL(url).string());
-}
-
-WebString WebDragData::urlTitle() const
-{
-    ASSERT(!isNull());
-    return m_private->urlTitle();
-}
-
-void WebDragData::setURLTitle(const WebString& urlTitle)
-{
-    ensureMutable();
-    m_private->setUrlTitle(urlTitle);
-}
-
-WebString WebDragData::downloadMetadata() const
-{
-    ASSERT(!isNull());
-    bool ignoredSuccess;
-    return m_private->getData(mimeTypeDownloadURL, ignoredSuccess);
-}
-
-void WebDragData::setDownloadMetadata(const WebString& downloadMetadata)
-{
-    ensureMutable();
-    m_private->setData(mimeTypeDownloadURL, downloadMetadata);
-}
-
-WebString WebDragData::fileExtension() const
-{
-    ASSERT(!isNull());
-    return m_private->fileExtension();
-}
-
-void WebDragData::setFileExtension(const WebString& fileExtension)
-{
-    ensureMutable();
-    m_private->setFileExtension(fileExtension);
-}
-
-bool WebDragData::containsFilenames() const
-{
-    ASSERT(!isNull());
-    return m_private->containsFilenames();
-}
-
-void WebDragData::filenames(WebVector<WebString>& filenames) const
-{
-    ASSERT(!isNull());
-    filenames = m_private->filenames();
-}
-
-void WebDragData::setFilenames(const WebVector<WebString>& filenames)
-{
-    ensureMutable();
-    Vector<String> filenamesCopy;
-    filenamesCopy.append(filenames.data(), filenames.size());
-    m_private->setFilenames(filenamesCopy);
-}
-
-void WebDragData::appendToFilenames(const WebString& filename)
-{
-    ensureMutable();
-    Vector<String> filenames = m_private->filenames();
-    filenames.append(filename);
-    m_private->setFilenames(filenames);
-}
-
-WebString WebDragData::plainText() const
-{
-    ASSERT(!isNull());
-    bool ignoredSuccess;
-    return m_private->getData(mimeTypeTextPlain, ignoredSuccess);
-}
-
-void WebDragData::setPlainText(const WebString& plainText)
-{
-    ensureMutable();
-    m_private->setData(mimeTypeTextPlain, plainText);
-}
-
-WebString WebDragData::htmlText() const
-{
-    ASSERT(!isNull());
-    bool ignoredSuccess;
-    return m_private->getData(mimeTypeTextHTML, ignoredSuccess);
-}
-
-void WebDragData::setHTMLText(const WebString& htmlText)
-{
-    ensureMutable();
-    m_private->setData(mimeTypeTextHTML, htmlText);
-}
-
-WebURL WebDragData::htmlBaseURL() const
-{
-    ASSERT(!isNull());
-    return m_private->htmlBaseUrl();
-}
-
-void WebDragData::setHTMLBaseURL(const WebURL& htmlBaseURL)
-{
-    ensureMutable();
-    m_private->setHtmlBaseUrl(htmlBaseURL);
-}
-
-WebString WebDragData::fileContentFilename() const
-{
-    ASSERT(!isNull());
-    return m_private->fileContentFilename();
-}
-
-void WebDragData::setFileContentFilename(const WebString& filename)
-{
-    ensureMutable();
-    m_private->setFileContentFilename(filename);
-}
-
-WebData WebDragData::fileContent() const
-{
-    ASSERT(!isNull());
-    return WebData(m_private->fileContent());
-}
-
-void WebDragData::setFileContent(const WebData& fileContent)
-{
-    ensureMutable();
-    m_private->setFileContent(fileContent);
-}
-
-WebVector<WebDragData::CustomData> WebDragData::customData() const
-{
-    ASSERT(!isNull());
-    WebVector<CustomData> customData(static_cast<size_t>(m_private->customData().size()));
-    HashMap<String, String>::const_iterator begin = m_private->customData().begin();
-    HashMap<String, String>::const_iterator end = m_private->customData().end();
-    size_t i = 0;
-    for (HashMap<String, String>::const_iterator it = begin; it != end; ++it) {
-        CustomData data = "" it->second};
-        customData[i++] = data;
-    }
-    return customData;
-}
-
-void WebDragData::setCustomData(const WebVector<WebDragData::CustomData>& customData)
-{
-    ensureMutable();
-    HashMap<String, String>& customDataMap = m_private->customData();
-    for (size_t i = 0; i < customData.size(); ++i)
-        customDataMap.set(customData[i].type, customData[i].data);
-}
-
 WebDragData::WebDragData(const WTF::PassRefPtr<WebCore::ChromiumDataObject>& data)
     : m_private(static_cast<WebDragDataPrivate*>(data.leakRef()))
 {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to