Title: [168201] trunk/Source
Revision
168201
Author
a...@apple.com
Date
2014-05-02 15:41:24 -0700 (Fri, 02 May 2014)

Log Message

Remove Blob contentDisposition handling
https://bugs.webkit.org/show_bug.cgi?id=132490

Reviewed by Sam Weinig.


Source/WebCore: 
Dead code.

* platform/network/BlobData.h:
(WebCore::BlobData::contentDisposition): Deleted.
(WebCore::BlobData::setContentDisposition): Deleted.
* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::registerBlobURL):
(WebCore::BlobRegistryImpl::registerBlobURLForSlice):
* platform/network/BlobResourceHandle.cpp:
(WebCore::BlobResourceHandle::notifyResponseOnSuccess):
* platform/network/BlobStorageData.h:
(WebCore::BlobStorageData::create):
(WebCore::BlobStorageData::contentType):
(WebCore::BlobStorageData::BlobStorageData):
(WebCore::BlobStorageData::contentDisposition): Deleted.

Source/WebKit2: 
* Shared/FileAPI/BlobRegistrationData.cpp:
(WebKit::BlobRegistrationData::encode):
(WebKit::BlobRegistrationData::decode):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (168200 => 168201)


--- trunk/Source/WebCore/ChangeLog	2014-05-02 22:39:52 UTC (rev 168200)
+++ trunk/Source/WebCore/ChangeLog	2014-05-02 22:41:24 UTC (rev 168201)
@@ -1,3 +1,26 @@
+2014-05-02  Alexey Proskuryakov  <a...@apple.com>
+
+        Remove Blob contentDisposition handling
+        https://bugs.webkit.org/show_bug.cgi?id=132490
+
+        Reviewed by Sam Weinig.
+
+        Dead code.
+
+        * platform/network/BlobData.h:
+        (WebCore::BlobData::contentDisposition): Deleted.
+        (WebCore::BlobData::setContentDisposition): Deleted.
+        * platform/network/BlobRegistryImpl.cpp:
+        (WebCore::BlobRegistryImpl::registerBlobURL):
+        (WebCore::BlobRegistryImpl::registerBlobURLForSlice):
+        * platform/network/BlobResourceHandle.cpp:
+        (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
+        * platform/network/BlobStorageData.h:
+        (WebCore::BlobStorageData::create):
+        (WebCore::BlobStorageData::contentType):
+        (WebCore::BlobStorageData::BlobStorageData):
+        (WebCore::BlobStorageData::contentDisposition): Deleted.
+
 2014-05-02  Anders Carlsson  <ander...@apple.com>
 
         Implement FormData decoding using KeyedDecoder

Modified: trunk/Source/WebCore/platform/network/BlobData.h (168200 => 168201)


--- trunk/Source/WebCore/platform/network/BlobData.h	2014-05-02 22:39:52 UTC (rev 168200)
+++ trunk/Source/WebCore/platform/network/BlobData.h	2014-05-02 22:41:24 UTC (rev 168201)
@@ -167,9 +167,6 @@
     const String& contentType() const { return m_contentType; }
     void setContentType(const String&);
 
-    const String& contentDisposition() const { return m_contentDisposition; }
-    void setContentDisposition(const String& contentDisposition) { m_contentDisposition = contentDisposition; }
-
     const BlobDataItemList& items() const { return m_items; }
     void swapItems(BlobDataItemList&);
 

Modified: trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp (168200 => 168201)


--- trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp	2014-05-02 22:39:52 UTC (rev 168200)
+++ trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp	2014-05-02 22:41:24 UTC (rev 168201)
@@ -121,7 +121,7 @@
     ASSERT(isMainThread());
     registerBlobResourceHandleConstructor();
 
-    RefPtr<BlobStorageData> blobStorageData = BlobStorageData::create(blobData->contentType(), blobData->contentDisposition());
+    RefPtr<BlobStorageData> blobStorageData = BlobStorageData::create(blobData->contentType());
 
     // The blob data is stored in the "canonical" way. That is, it only contains a list of Data and File items.
     // 1) The Data item is denoted by the raw data and the range.
@@ -208,7 +208,7 @@
         end = originalSize;
 
     unsigned long long newLength = end - start;
-    RefPtr<BlobStorageData> newStorageData = BlobStorageData::create(originalStorageData->contentType(), originalStorageData->contentDisposition());
+    RefPtr<BlobStorageData> newStorageData = BlobStorageData::create(originalStorageData->contentType());
 
     appendStorageItems(newStorageData.get(), originalStorageData->items(), start, newLength);
 

Modified: trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp (168200 => 168201)


--- trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp	2014-05-02 22:39:52 UTC (rev 168200)
+++ trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp	2014-05-02 22:41:24 UTC (rev 168201)
@@ -582,8 +582,9 @@
     response.setExpectedContentLength(m_totalRemainingSize);
     response.setHTTPStatusCode(isRangeRequest ? httpPartialContent : httpOK);
     response.setHTTPStatusText(isRangeRequest ? httpPartialContentText : httpOKText);
-    if (!m_blobData->contentDisposition().isEmpty())
-        response.setHTTPHeaderField("Content-Disposition", m_blobData->contentDisposition());
+    // FIXME: If a resource identified with a blob: URL is a File object, user agents must use that file's name attribute,
+    // as if the response had a Content-Disposition header with the filename parameter set to the File's name attribute.
+    // Notably, this will affect a name suggested in "File Save As".
 
     // BlobResourceHandle cannot be used with downloading, and doesn't even wait for continueDidReceiveResponse.
     // It's currently client's responsibility to know that didReceiveResponseAsync cannot be used to convert a

Modified: trunk/Source/WebCore/platform/network/BlobStorageData.h (168200 => 168201)


--- trunk/Source/WebCore/platform/network/BlobStorageData.h	2014-05-02 22:39:52 UTC (rev 168200)
+++ trunk/Source/WebCore/platform/network/BlobStorageData.h	2014-05-02 22:41:24 UTC (rev 168201)
@@ -39,22 +39,20 @@
 
 class BlobStorageData : public RefCounted<BlobStorageData> {
 public:
-    static PassRefPtr<BlobStorageData> create(const String& contentType, const String& contentDisposition)
+    static PassRefPtr<BlobStorageData> create(const String& contentType)
     {
-        return adoptRef(new BlobStorageData(contentType, contentDisposition));
+        return adoptRef(new BlobStorageData(contentType));
     }
 
     const String& contentType() const { return m_data.contentType(); }
-    const String& contentDisposition() const { return m_data.contentDisposition(); }    
     const BlobDataItemList& items() const { return m_data.items(); }
 
 private:
     friend class BlobRegistryImpl;
 
-    BlobStorageData(const String& contentType, const String& contentDisposition)
+    BlobStorageData(const String& contentType)
     {
         m_data.setContentType(contentType);
-        m_data.setContentDisposition(contentDisposition);
     }
 
     BlobData m_data;

Modified: trunk/Source/WebKit2/ChangeLog (168200 => 168201)


--- trunk/Source/WebKit2/ChangeLog	2014-05-02 22:39:52 UTC (rev 168200)
+++ trunk/Source/WebKit2/ChangeLog	2014-05-02 22:41:24 UTC (rev 168201)
@@ -1,3 +1,14 @@
+2014-05-02  Alexey Proskuryakov  <a...@apple.com>
+
+        Remove Blob contentDisposition handling
+        https://bugs.webkit.org/show_bug.cgi?id=132490
+
+        Reviewed by Sam Weinig.
+
+        * Shared/FileAPI/BlobRegistrationData.cpp:
+        (WebKit::BlobRegistrationData::encode):
+        (WebKit::BlobRegistrationData::decode):
+
 2014-05-02  Benjamin Poulain  <benja...@webkit.org>
 
         [iOS][WK2] Adapt the rubberband constraints when the page get smaller than the scrollview - insets

Modified: trunk/Source/WebKit2/Shared/FileAPI/BlobRegistrationData.cpp (168200 => 168201)


--- trunk/Source/WebKit2/Shared/FileAPI/BlobRegistrationData.cpp	2014-05-02 22:39:52 UTC (rev 168200)
+++ trunk/Source/WebKit2/Shared/FileAPI/BlobRegistrationData.cpp	2014-05-02 22:41:24 UTC (rev 168201)
@@ -73,7 +73,6 @@
 void BlobRegistrationData::encode(IPC::ArgumentEncoder& encoder) const
 {
     encoder << m_data->contentType();
-    encoder << m_data->contentDisposition();
 
     const BlobDataItemList& items = m_data->items();
     encoder << static_cast<uint64_t>(items.size());
@@ -114,11 +113,6 @@
         return false;
     result.m_data->setContentType(contentType);
 
-    String contentDisposition;
-    if (!decoder.decode(contentDisposition))
-        return false;
-    result.m_data->setContentDisposition(contentDisposition);
-
     uint64_t itemCount;
     if (!decoder.decode(itemCount))
         return false;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to