Changeset 168201 in webkit


Ignore:
Timestamp:
May 2, 2014 3:41:24 PM (10 years ago)
Author:
ap@apple.com
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):

Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r168199 r168201  
     12014-05-02  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Remove Blob contentDisposition handling
     4        https://bugs.webkit.org/show_bug.cgi?id=132490
     5
     6        Reviewed by Sam Weinig.
     7
     8        Dead code.
     9
     10        * platform/network/BlobData.h:
     11        (WebCore::BlobData::contentDisposition): Deleted.
     12        (WebCore::BlobData::setContentDisposition): Deleted.
     13        * platform/network/BlobRegistryImpl.cpp:
     14        (WebCore::BlobRegistryImpl::registerBlobURL):
     15        (WebCore::BlobRegistryImpl::registerBlobURLForSlice):
     16        * platform/network/BlobResourceHandle.cpp:
     17        (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
     18        * platform/network/BlobStorageData.h:
     19        (WebCore::BlobStorageData::create):
     20        (WebCore::BlobStorageData::contentType):
     21        (WebCore::BlobStorageData::BlobStorageData):
     22        (WebCore::BlobStorageData::contentDisposition): Deleted.
     23
    1242014-05-02  Anders Carlsson  <andersca@apple.com>
    225
  • trunk/Source/WebCore/platform/network/BlobData.h

    r168032 r168201  
    168168    void setContentType(const String&);
    169169
    170     const String& contentDisposition() const { return m_contentDisposition; }
    171     void setContentDisposition(const String& contentDisposition) { m_contentDisposition = contentDisposition; }
    172 
    173170    const BlobDataItemList& items() const { return m_items; }
    174171    void swapItems(BlobDataItemList&);
  • trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp

    r168126 r168201  
    122122    registerBlobResourceHandleConstructor();
    123123
    124     RefPtr<BlobStorageData> blobStorageData = BlobStorageData::create(blobData->contentType(), blobData->contentDisposition());
     124    RefPtr<BlobStorageData> blobStorageData = BlobStorageData::create(blobData->contentType());
    125125
    126126    // The blob data is stored in the "canonical" way. That is, it only contains a list of Data and File items.
     
    209209
    210210    unsigned long long newLength = end - start;
    211     RefPtr<BlobStorageData> newStorageData = BlobStorageData::create(originalStorageData->contentType(), originalStorageData->contentDisposition());
     211    RefPtr<BlobStorageData> newStorageData = BlobStorageData::create(originalStorageData->contentType());
    212212
    213213    appendStorageItems(newStorageData.get(), originalStorageData->items(), start, newLength);
  • trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp

    r162139 r168201  
    583583    response.setHTTPStatusCode(isRangeRequest ? httpPartialContent : httpOK);
    584584    response.setHTTPStatusText(isRangeRequest ? httpPartialContentText : httpOKText);
    585     if (!m_blobData->contentDisposition().isEmpty())
    586         response.setHTTPHeaderField("Content-Disposition", m_blobData->contentDisposition());
     585    // FIXME: If a resource identified with a blob: URL is a File object, user agents must use that file's name attribute,
     586    // as if the response had a Content-Disposition header with the filename parameter set to the File's name attribute.
     587    // Notably, this will affect a name suggested in "File Save As".
    587588
    588589    // BlobResourceHandle cannot be used with downloading, and doesn't even wait for continueDidReceiveResponse.
  • trunk/Source/WebCore/platform/network/BlobStorageData.h

    r144372 r168201  
    4040class BlobStorageData : public RefCounted<BlobStorageData> {
    4141public:
    42     static PassRefPtr<BlobStorageData> create(const String& contentType, const String& contentDisposition)
     42    static PassRefPtr<BlobStorageData> create(const String& contentType)
    4343    {
    44         return adoptRef(new BlobStorageData(contentType, contentDisposition));
     44        return adoptRef(new BlobStorageData(contentType));
    4545    }
    4646
    4747    const String& contentType() const { return m_data.contentType(); }
    48     const String& contentDisposition() const { return m_data.contentDisposition(); }   
    4948    const BlobDataItemList& items() const { return m_data.items(); }
    5049
     
    5251    friend class BlobRegistryImpl;
    5352
    54     BlobStorageData(const String& contentType, const String& contentDisposition)
     53    BlobStorageData(const String& contentType)
    5554    {
    5655        m_data.setContentType(contentType);
    57         m_data.setContentDisposition(contentDisposition);
    5856    }
    5957
  • trunk/Source/WebKit2/ChangeLog

    r168196 r168201  
     12014-05-02  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Remove Blob contentDisposition handling
     4        https://bugs.webkit.org/show_bug.cgi?id=132490
     5
     6        Reviewed by Sam Weinig.
     7
     8        * Shared/FileAPI/BlobRegistrationData.cpp:
     9        (WebKit::BlobRegistrationData::encode):
     10        (WebKit::BlobRegistrationData::decode):
     11
    1122014-05-02  Benjamin Poulain  <benjamin@webkit.org>
    213
  • trunk/Source/WebKit2/Shared/FileAPI/BlobRegistrationData.cpp

    r168032 r168201  
    7474{
    7575    encoder << m_data->contentType();
    76     encoder << m_data->contentDisposition();
    7776
    7877    const BlobDataItemList& items = m_data->items();
     
    114113        return false;
    115114    result.m_data->setContentType(contentType);
    116 
    117     String contentDisposition;
    118     if (!decoder.decode(contentDisposition))
    119         return false;
    120     result.m_data->setContentDisposition(contentDisposition);
    121115
    122116    uint64_t itemCount;
Note: See TracChangeset for help on using the changeset viewer.