Changeset 158956 in webkit


Ignore:
Timestamp:
Nov 8, 2013 2:09:55 PM (10 years ago)
Author:
zandobersek@gmail.com
Message:

Remove code guarded with ENABLE(STREAM)
https://bugs.webkit.org/show_bug.cgi?id=123667

Reviewed by Anders Carlsson.

Remove ENABLE(STREAM)-guarded code. This was added in the effort to provide Stream API support, but
no port enables the feature and the work on this feature has wound down after the Chromium port forked,
leaving this code unmaintained.

  • fileapi/FileReaderLoader.cpp:
  • fileapi/FileReaderLoader.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r158954 r158956  
     12013-11-08  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        Remove code guarded with ENABLE(STREAM)
     4        https://bugs.webkit.org/show_bug.cgi?id=123667
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Remove ENABLE(STREAM)-guarded code. This was added in the effort to provide Stream API support, but
     9        no port enables the feature and the work on this feature has wound down after the Chromium port forked,
     10        leaving this code unmaintained.
     11
     12        * fileapi/FileReaderLoader.cpp:
     13        * fileapi/FileReaderLoader.h:
     14
    1152013-11-08  Bem Jones-Bey  <bjonesbe@adobe.com>
    216
  • trunk/Source/WebCore/fileapi/FileReaderLoader.cpp

    r157971 r158956  
    273273}
    274274
    275 #if ENABLE(STREAM)
    276 PassRefPtr<Blob> FileReaderLoader::blobResult()
    277 {
    278     ASSERT(m_readType == ReadAsBlob);
    279 
    280     // If the loading is not finished or an error occurs, return an empty result.
    281     if (!m_rawData || m_errorCode || !isCompleted())
    282         return 0;
    283 
    284     if (!m_blobResult) {
    285         OwnPtr<BlobData> blobData = BlobData::create();
    286         size_t size = 0;
    287         RefPtr<RawData> rawData = RawData::create();
    288         size = m_rawData->byteLength();
    289         rawData->mutableData()->append(static_cast<char*>(m_rawData->data()), size);
    290         blobData->appendData(rawData, 0, size);
    291         blobData->setContentType(m_dataType);
    292         m_blobResult = Blob::create(blobData.release(), size);
    293     }
    294     return m_blobResult;
    295 }
    296 #endif // ENABLE(STREAM)
    297 
    298275String FileReaderLoader::stringResult()
    299276{
     
    383360}
    384361
    385 #if ENABLE(STREAM)
    386 void FileReaderLoader::setRange(unsigned start, unsigned length)
    387 {
    388     ASSERT(length > 0);
    389     m_hasRange = true;
    390     m_rangeStart = start;
    391     m_rangeEnd = start + length - 1;
    392 }
    393 #endif // ENABLE(STREAM)
    394 
    395362} // namespace WebCore
    396363 
  • trunk/Source/WebCore/fileapi/FileReaderLoader.h

    r156550 r158956  
    7878    String stringResult();
    7979    PassRefPtr<JSC::ArrayBuffer> arrayBufferResult() const;
    80 #if ENABLE(STREAM)
    81     PassRefPtr<Blob> blobResult();
    82 #endif // ENABLE(STREAM)
    8380    unsigned bytesLoaded() const { return m_bytesLoaded; }
    8481    unsigned totalBytes() const { return m_totalBytes; }
     
    8784    void setEncoding(const String&);
    8885    void setDataType(const String& dataType) { m_dataType = dataType; }
    89 #if ENABLE(STREAM)
    90     void setRange(unsigned, unsigned);
    91 #endif // ENABLE(STREAM)
    9286
    9387private:
Note: See TracChangeset for help on using the changeset viewer.