summaryrefslogtreecommitdiff
path: root/Source/WebCore/fileapi/Blob.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-08-21 10:57:44 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-08-21 10:57:44 +0200
commit5ef7c8a6a70875d4430752d146bdcb069605d71d (patch)
treef6256640b6c46d7da221435803cae65326817ba2 /Source/WebCore/fileapi/Blob.cpp
parentdecad929f578d8db641febc8740649ca6c574638 (diff)
downloadqtwebkit-5ef7c8a6a70875d4430752d146bdcb069605d71d.tar.gz
Imported WebKit commit 356d83016b090995d08ad568f2d2c243aa55e831 (http://svn.webkit.org/repository/webkit/trunk@126147)
New snapshot including various build fixes for newer Qt 5
Diffstat (limited to 'Source/WebCore/fileapi/Blob.cpp')
-rw-r--r--Source/WebCore/fileapi/Blob.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/WebCore/fileapi/Blob.cpp b/Source/WebCore/fileapi/Blob.cpp
index d1dcb51ab..431f1764b 100644
--- a/Source/WebCore/fileapi/Blob.cpp
+++ b/Source/WebCore/fileapi/Blob.cpp
@@ -34,6 +34,7 @@
#include "BlobURL.h"
#include "File.h"
#include "HistogramSupport.h"
+#include "ScriptCallStack.h"
#include "ScriptExecutionContext.h"
#include "ThreadableBlobRegistry.h"
@@ -137,9 +138,14 @@ PassRefPtr<Blob> Blob::sliceInternal(long long start, long long end, const Strin
long long length = end - start;
OwnPtr<BlobData> blobData = BlobData::create();
blobData->setContentType(contentType);
- if (isFile())
+ if (isFile()) {
+#if ENABLE(FILE_SYSTEM)
+ if (!toFile(this)->fileSystemURL().isEmpty())
+ blobData->appendURL(toFile(this)->fileSystemURL(), start, length, modificationTime);
+ else
+#endif
blobData->appendFile(toFile(this)->path(), start, length, modificationTime);
- else
+ } else
blobData->appendBlob(m_internalURL, start, length);
return Blob::create(blobData.release(), length);