Changeset 158956 in webkit
- Timestamp:
- Nov 8, 2013 2:09:55 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r158954 r158956 1 2013-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 1 15 2013-11-08 Bem Jones-Bey <bjonesbe@adobe.com> 2 16 -
trunk/Source/WebCore/fileapi/FileReaderLoader.cpp
r157971 r158956 273 273 } 274 274 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 298 275 String FileReaderLoader::stringResult() 299 276 { … … 383 360 } 384 361 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 395 362 } // namespace WebCore 396 363 -
trunk/Source/WebCore/fileapi/FileReaderLoader.h
r156550 r158956 78 78 String stringResult(); 79 79 PassRefPtr<JSC::ArrayBuffer> arrayBufferResult() const; 80 #if ENABLE(STREAM)81 PassRefPtr<Blob> blobResult();82 #endif // ENABLE(STREAM)83 80 unsigned bytesLoaded() const { return m_bytesLoaded; } 84 81 unsigned totalBytes() const { return m_totalBytes; } … … 87 84 void setEncoding(const String&); 88 85 void setDataType(const String& dataType) { m_dataType = dataType; } 89 #if ENABLE(STREAM)90 void setRange(unsigned, unsigned);91 #endif // ENABLE(STREAM)92 86 93 87 private:
Note: See TracChangeset
for help on using the changeset viewer.