summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/fileapi
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-06-02 12:07:03 +0100
committerBen Murdoch <benm@google.com>2011-06-10 10:47:21 +0100
commit2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch)
treee4964fbd1cb70599f7718ff03e50ea1dab33890b /Source/WebCore/fileapi
parent87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff)
downloadexternal_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'Source/WebCore/fileapi')
-rw-r--r--Source/WebCore/fileapi/Blob.cpp22
-rw-r--r--Source/WebCore/fileapi/Blob.h2
-rw-r--r--Source/WebCore/fileapi/Blob.idl2
-rw-r--r--Source/WebCore/fileapi/DOMFileSystemBase.cpp9
-rw-r--r--Source/WebCore/fileapi/DOMFileSystemBase.h8
-rw-r--r--Source/WebCore/fileapi/DirectoryEntry.cpp4
-rw-r--r--Source/WebCore/fileapi/DirectoryEntry.h6
-rw-r--r--Source/WebCore/fileapi/DirectoryEntry.idl4
-rw-r--r--Source/WebCore/fileapi/DirectoryEntrySync.cpp4
-rw-r--r--Source/WebCore/fileapi/DirectoryEntrySync.h6
-rw-r--r--Source/WebCore/fileapi/DirectoryEntrySync.idl4
-rw-r--r--Source/WebCore/fileapi/EntryBase.cpp12
-rw-r--r--Source/WebCore/fileapi/FileReaderLoader.cpp6
-rw-r--r--Source/WebCore/fileapi/WebKitBlobBuilder.cpp (renamed from Source/WebCore/fileapi/BlobBuilder.cpp)16
-rw-r--r--Source/WebCore/fileapi/WebKitBlobBuilder.h (renamed from Source/WebCore/fileapi/BlobBuilder.h)12
-rw-r--r--Source/WebCore/fileapi/WebKitBlobBuilder.idl (renamed from Source/WebCore/fileapi/BlobBuilder.idl)2
-rw-r--r--Source/WebCore/fileapi/WebKitFlags.h (renamed from Source/WebCore/fileapi/Flags.h)14
-rw-r--r--Source/WebCore/fileapi/WebKitFlags.idl (renamed from Source/WebCore/fileapi/Flags.idl)2
18 files changed, 80 insertions, 55 deletions
diff --git a/Source/WebCore/fileapi/Blob.cpp b/Source/WebCore/fileapi/Blob.cpp
index 90df3c4..3b33cd6 100644
--- a/Source/WebCore/fileapi/Blob.cpp
+++ b/Source/WebCore/fileapi/Blob.cpp
@@ -63,7 +63,7 @@ Blob::~Blob()
}
#if ENABLE(BLOB)
-PassRefPtr<Blob> Blob::slice(long long start, long long length, const String& contentType) const
+PassRefPtr<Blob> Blob::webkitSlice(long long start, long long end, const String& contentType) const
{
// When we slice a file for the first time, we obtain a snapshot of the file by capturing its current size and modification time.
// The modification time will be used to verify if the file has been changed or not, when the underlying data are accessed.
@@ -77,18 +77,26 @@ PassRefPtr<Blob> Blob::slice(long long start, long long length, const String& co
size = m_size;
}
+ // Convert the negative value that is used to select from the end.
+ if (start < 0)
+ start = start + size;
+ if (end < 0)
+ end = end + size;
+
// Clamp the range if it exceeds the size limit.
if (start < 0)
start = 0;
- if (length < 0)
- length = 0;
-
+ if (end < 0)
+ end = 0;
if (start >= size) {
start = 0;
- length = 0;
- } else if (start + length > size || length > std::numeric_limits<long long>::max() - start)
- length = size - start;
+ end = 0;
+ } else if (end < start)
+ end = start;
+ else if (end > size)
+ end = size;
+ long long length = end - start;
OwnPtr<BlobData> blobData = BlobData::create();
blobData->setContentType(contentType);
if (isFile())
diff --git a/Source/WebCore/fileapi/Blob.h b/Source/WebCore/fileapi/Blob.h
index 2690ff5..5cefc65 100644
--- a/Source/WebCore/fileapi/Blob.h
+++ b/Source/WebCore/fileapi/Blob.h
@@ -63,7 +63,7 @@ public:
virtual bool isFile() const { return false; }
#if ENABLE(BLOB)
- PassRefPtr<Blob> slice(long long start, long long length, const String& contentType = String()) const;
+ PassRefPtr<Blob> webkitSlice(long long start, long long end = std::numeric_limits<long long>::max(), const String& contentType = String()) const;
#endif
protected:
diff --git a/Source/WebCore/fileapi/Blob.idl b/Source/WebCore/fileapi/Blob.idl
index 297d039..8511c8e 100644
--- a/Source/WebCore/fileapi/Blob.idl
+++ b/Source/WebCore/fileapi/Blob.idl
@@ -38,7 +38,7 @@ module html {
#if !defined(LANGUAGE_OBJECTIVE_C)
#if defined(ENABLE_BLOB) && ENABLE_BLOB
- Blob slice(in long long start, in long long length, in [Optional, ConvertUndefinedOrNullToNullString] DOMString contentType);
+ Blob webkitSlice(in long long start, in [Optional] long long end, in [Optional, ConvertUndefinedOrNullToNullString] DOMString contentType);
#endif
#endif
};
diff --git a/Source/WebCore/fileapi/DOMFileSystemBase.cpp b/Source/WebCore/fileapi/DOMFileSystemBase.cpp
index 788d967..eafb815 100644
--- a/Source/WebCore/fileapi/DOMFileSystemBase.cpp
+++ b/Source/WebCore/fileapi/DOMFileSystemBase.cpp
@@ -54,6 +54,8 @@ const char DOMFileSystemBase::kPersistentPathPrefix[] = "persistent";
const size_t DOMFileSystemBase::kPersistentPathPrefixLength = sizeof(DOMFileSystemBase::kPersistentPathPrefix) - 1;
const char DOMFileSystemBase::kTemporaryPathPrefix[] = "temporary";
const size_t DOMFileSystemBase::kTemporaryPathPrefixLength = sizeof(DOMFileSystemBase::kTemporaryPathPrefix) - 1;
+const char DOMFileSystemBase::kExternalPathPrefix[] = "external";
+const size_t DOMFileSystemBase::kExternalPathPrefixLength = sizeof(DOMFileSystemBase::kExternalPathPrefix) - 1;
bool DOMFileSystemBase::crackFileSystemURL(const KURL& url, AsyncFileSystem::Type& type, String& filePath)
{
@@ -72,6 +74,9 @@ bool DOMFileSystemBase::crackFileSystemURL(const KURL& url, AsyncFileSystem::Typ
} else if (path.startsWith(kPersistentPathPrefix)) {
type = AsyncFileSystem::Persistent;
path = path.substring(kPersistentPathPrefixLength);
+ } else if (path.startsWith(kExternalPathPrefix)) {
+ type = AsyncFileSystem::External;
+ path = path.substring(kExternalPathPrefixLength);
} else
return false;
@@ -200,7 +205,7 @@ bool DOMFileSystemBase::getParent(const EntryBase* entry, PassRefPtr<EntryCallba
return true;
}
-bool DOMFileSystemBase::getFile(const EntryBase* base, const String& path, PassRefPtr<Flags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+bool DOMFileSystemBase::getFile(const EntryBase* base, const String& path, PassRefPtr<WebKitFlags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
{
String absolutePath;
if (!pathToAbsolutePath(base, path, absolutePath))
@@ -215,7 +220,7 @@ bool DOMFileSystemBase::getFile(const EntryBase* base, const String& path, PassR
return true;
}
-bool DOMFileSystemBase::getDirectory(const EntryBase* base, const String& path, PassRefPtr<Flags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+bool DOMFileSystemBase::getDirectory(const EntryBase* base, const String& path, PassRefPtr<WebKitFlags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
{
String absolutePath;
if (!pathToAbsolutePath(base, path, absolutePath))
diff --git a/Source/WebCore/fileapi/DOMFileSystemBase.h b/Source/WebCore/fileapi/DOMFileSystemBase.h
index 6332b63..8bc0b65 100644
--- a/Source/WebCore/fileapi/DOMFileSystemBase.h
+++ b/Source/WebCore/fileapi/DOMFileSystemBase.h
@@ -34,7 +34,7 @@
#if ENABLE(FILE_SYSTEM)
#include "AsyncFileSystem.h"
-#include "Flags.h"
+#include "WebKitFlags.h"
#include "PlatformString.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
@@ -66,6 +66,8 @@ public:
static const size_t kPersistentPathPrefixLength;
static const char kTemporaryPathPrefix[];
static const size_t kTemporaryPathPrefixLength;
+ static const char kExternalPathPrefix[];
+ static const size_t kExternalPathPrefixLength;
static bool crackFileSystemURL(const KURL&, AsyncFileSystem::Type&, String& filePath);
const String& name() const { return m_name; }
@@ -80,8 +82,8 @@ public:
bool remove(const EntryBase*, PassRefPtr<VoidCallback>, PassRefPtr<ErrorCallback>);
bool removeRecursively(const EntryBase*, PassRefPtr<VoidCallback>, PassRefPtr<ErrorCallback>);
bool getParent(const EntryBase*, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>);
- bool getFile(const EntryBase*, const String& path, PassRefPtr<Flags>, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>);
- bool getDirectory(const EntryBase*, const String& path, PassRefPtr<Flags>, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>);
+ bool getFile(const EntryBase*, const String& path, PassRefPtr<WebKitFlags>, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>);
+ bool getDirectory(const EntryBase*, const String& path, PassRefPtr<WebKitFlags>, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>);
bool readDirectory(PassRefPtr<DirectoryReaderBase>, const String& path, PassRefPtr<EntriesCallback>, PassRefPtr<ErrorCallback>);
protected:
diff --git a/Source/WebCore/fileapi/DirectoryEntry.cpp b/Source/WebCore/fileapi/DirectoryEntry.cpp
index 7bc0af8..0f6e49f 100644
--- a/Source/WebCore/fileapi/DirectoryEntry.cpp
+++ b/Source/WebCore/fileapi/DirectoryEntry.cpp
@@ -51,14 +51,14 @@ PassRefPtr<DirectoryReader> DirectoryEntry::createReader()
return DirectoryReader::create(m_fileSystem, m_fullPath);
}
-void DirectoryEntry::getFile(const String& path, PassRefPtr<Flags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallbackRef)
+void DirectoryEntry::getFile(const String& path, PassRefPtr<WebKitFlags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallbackRef)
{
RefPtr<ErrorCallback> errorCallback(errorCallbackRef);
if (!m_fileSystem->getFile(this, path, flags, successCallback, errorCallback))
filesystem()->scheduleCallback(errorCallback.release(), FileError::create(FileError::INVALID_MODIFICATION_ERR));
}
-void DirectoryEntry::getDirectory(const String& path, PassRefPtr<Flags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallbackRef)
+void DirectoryEntry::getDirectory(const String& path, PassRefPtr<WebKitFlags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallbackRef)
{
RefPtr<ErrorCallback> errorCallback(errorCallbackRef);
if (!m_fileSystem->getDirectory(this, path, flags, successCallback, errorCallback))
diff --git a/Source/WebCore/fileapi/DirectoryEntry.h b/Source/WebCore/fileapi/DirectoryEntry.h
index da903da..8227047 100644
--- a/Source/WebCore/fileapi/DirectoryEntry.h
+++ b/Source/WebCore/fileapi/DirectoryEntry.h
@@ -34,7 +34,7 @@
#if ENABLE(FILE_SYSTEM)
#include "Entry.h"
-#include "Flags.h"
+#include "WebKitFlags.h"
#include "PlatformString.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
@@ -56,8 +56,8 @@ public:
virtual bool isDirectory() const { return true; }
PassRefPtr<DirectoryReader> createReader();
- void getFile(const String& path, PassRefPtr<Flags> = 0, PassRefPtr<EntryCallback> = 0, PassRefPtr<ErrorCallback> = 0);
- void getDirectory(const String& path, PassRefPtr<Flags> = 0, PassRefPtr<EntryCallback> = 0, PassRefPtr<ErrorCallback> = 0);
+ void getFile(const String& path, PassRefPtr<WebKitFlags> = 0, PassRefPtr<EntryCallback> = 0, PassRefPtr<ErrorCallback> = 0);
+ void getDirectory(const String& path, PassRefPtr<WebKitFlags> = 0, PassRefPtr<EntryCallback> = 0, PassRefPtr<ErrorCallback> = 0);
void removeRecursively(PassRefPtr<VoidCallback> successCallback = 0, PassRefPtr<ErrorCallback> = 0) const;
private:
diff --git a/Source/WebCore/fileapi/DirectoryEntry.idl b/Source/WebCore/fileapi/DirectoryEntry.idl
index 0e38153..8ba9549 100644
--- a/Source/WebCore/fileapi/DirectoryEntry.idl
+++ b/Source/WebCore/fileapi/DirectoryEntry.idl
@@ -36,8 +36,8 @@ module storage {
NoStaticTables
] DirectoryEntry : Entry {
DirectoryReader createReader();
- [Custom] void getFile(in [ConvertUndefinedOrNullToNullString] DOMString path, in [Optional] Flags flags, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
- [Custom] void getDirectory(in [ConvertUndefinedOrNullToNullString] DOMString path, in [Optional] Flags flags, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
+ [Custom] void getFile(in [ConvertUndefinedOrNullToNullString] DOMString path, in [Optional] WebKitFlags flags, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
+ [Custom] void getDirectory(in [ConvertUndefinedOrNullToNullString] DOMString path, in [Optional] WebKitFlags flags, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
void removeRecursively(in [Optional, Callback] VoidCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
};
}
diff --git a/Source/WebCore/fileapi/DirectoryEntrySync.cpp b/Source/WebCore/fileapi/DirectoryEntrySync.cpp
index e68f7be..10deace 100644
--- a/Source/WebCore/fileapi/DirectoryEntrySync.cpp
+++ b/Source/WebCore/fileapi/DirectoryEntrySync.cpp
@@ -51,7 +51,7 @@ PassRefPtr<DirectoryReaderSync> DirectoryEntrySync::createReader(ExceptionCode&)
return DirectoryReaderSync::create(m_fileSystem, m_fullPath);
}
-PassRefPtr<FileEntrySync> DirectoryEntrySync::getFile(const String& path, PassRefPtr<Flags> flags, ExceptionCode& ec)
+PassRefPtr<FileEntrySync> DirectoryEntrySync::getFile(const String& path, PassRefPtr<WebKitFlags> flags, ExceptionCode& ec)
{
ec = 0;
EntrySyncCallbackHelper helper(m_fileSystem->asyncFileSystem());
@@ -62,7 +62,7 @@ PassRefPtr<FileEntrySync> DirectoryEntrySync::getFile(const String& path, PassRe
return static_pointer_cast<FileEntrySync>(helper.getResult(ec));
}
-PassRefPtr<DirectoryEntrySync> DirectoryEntrySync::getDirectory(const String& path, PassRefPtr<Flags> flags, ExceptionCode& ec)
+PassRefPtr<DirectoryEntrySync> DirectoryEntrySync::getDirectory(const String& path, PassRefPtr<WebKitFlags> flags, ExceptionCode& ec)
{
ec = 0;
EntrySyncCallbackHelper helper(m_fileSystem->asyncFileSystem());
diff --git a/Source/WebCore/fileapi/DirectoryEntrySync.h b/Source/WebCore/fileapi/DirectoryEntrySync.h
index eb412bb..62b481a 100644
--- a/Source/WebCore/fileapi/DirectoryEntrySync.h
+++ b/Source/WebCore/fileapi/DirectoryEntrySync.h
@@ -34,7 +34,7 @@
#if ENABLE(FILE_SYSTEM)
#include "EntrySync.h"
-#include "Flags.h"
+#include "WebKitFlags.h"
#include "PlatformString.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
@@ -53,8 +53,8 @@ public:
virtual bool isDirectory() const { return true; }
PassRefPtr<DirectoryReaderSync> createReader(ExceptionCode&);
- PassRefPtr<FileEntrySync> getFile(const String& path, PassRefPtr<Flags>, ExceptionCode&);
- PassRefPtr<DirectoryEntrySync> getDirectory(const String& path, PassRefPtr<Flags>, ExceptionCode&);
+ PassRefPtr<FileEntrySync> getFile(const String& path, PassRefPtr<WebKitFlags>, ExceptionCode&);
+ PassRefPtr<DirectoryEntrySync> getDirectory(const String& path, PassRefPtr<WebKitFlags>, ExceptionCode&);
void removeRecursively(ExceptionCode&);
private:
diff --git a/Source/WebCore/fileapi/DirectoryEntrySync.idl b/Source/WebCore/fileapi/DirectoryEntrySync.idl
index 268b2a9..b0ab178 100644
--- a/Source/WebCore/fileapi/DirectoryEntrySync.idl
+++ b/Source/WebCore/fileapi/DirectoryEntrySync.idl
@@ -36,8 +36,8 @@ module storage {
NoStaticTables
] DirectoryEntrySync : EntrySync {
DirectoryReaderSync createReader() raises (FileException);
- [Custom] FileEntrySync getFile(in [ConvertUndefinedOrNullToNullString] DOMString path, in Flags flags) raises (FileException);
- [Custom] DirectoryEntrySync getDirectory(in [ConvertUndefinedOrNullToNullString] DOMString path, in Flags flags) raises (FileException);
+ [Custom] FileEntrySync getFile(in [ConvertUndefinedOrNullToNullString] DOMString path, in WebKitFlags flags) raises (FileException);
+ [Custom] DirectoryEntrySync getDirectory(in [ConvertUndefinedOrNullToNullString] DOMString path, in WebKitFlags flags) raises (FileException);
void removeRecursively() raises (FileException);
};
}
diff --git a/Source/WebCore/fileapi/EntryBase.cpp b/Source/WebCore/fileapi/EntryBase.cpp
index e10964a..39453f6 100644
--- a/Source/WebCore/fileapi/EntryBase.cpp
+++ b/Source/WebCore/fileapi/EntryBase.cpp
@@ -64,7 +64,17 @@ String EntryBase::toURL()
result.append("filesystem:");
result.append(originString);
result.append("/");
- result.append(m_fileSystem->asyncFileSystem()->type() == AsyncFileSystem::Temporary ? DOMFileSystemBase::kTemporaryPathPrefix : DOMFileSystemBase::kPersistentPathPrefix);
+ switch (m_fileSystem->asyncFileSystem()->type()) {
+ case AsyncFileSystem::Temporary:
+ result.append(DOMFileSystemBase::kTemporaryPathPrefix);
+ break;
+ case AsyncFileSystem::Persistent:
+ result.append(DOMFileSystemBase::kPersistentPathPrefix);
+ break;
+ case AsyncFileSystem::External:
+ result.append(DOMFileSystemBase::kExternalPathPrefix);
+ break;
+ }
result.append(m_fullPath);
return result.toString();
}
diff --git a/Source/WebCore/fileapi/FileReaderLoader.cpp b/Source/WebCore/fileapi/FileReaderLoader.cpp
index 918ffba..c9ef688 100644
--- a/Source/WebCore/fileapi/FileReaderLoader.cpp
+++ b/Source/WebCore/fileapi/FileReaderLoader.cpp
@@ -154,16 +154,16 @@ void FileReaderLoader::didReceiveResponse(const ResourceResponse& response)
m_client->didStartLoading();
}
-void FileReaderLoader::didReceiveData(const char* data, int lengthReceived)
+void FileReaderLoader::didReceiveData(const char* data, int dataLength)
{
ASSERT(data);
- ASSERT(lengthReceived > 0);
+ ASSERT(dataLength > 0);
// Bail out if we already encountered an error.
if (m_errorCode)
return;
- int length = lengthReceived;
+ int length = dataLength;
unsigned remainingBufferSpace = m_totalBytes - m_bytesLoaded;
if (length > static_cast<long long>(remainingBufferSpace))
length = static_cast<int>(remainingBufferSpace);
diff --git a/Source/WebCore/fileapi/BlobBuilder.cpp b/Source/WebCore/fileapi/WebKitBlobBuilder.cpp
index 9406899..2f40db7 100644
--- a/Source/WebCore/fileapi/BlobBuilder.cpp
+++ b/Source/WebCore/fileapi/WebKitBlobBuilder.cpp
@@ -30,7 +30,7 @@
#include "config.h"
-#include "BlobBuilder.h"
+#include "WebKitBlobBuilder.h"
#include "ArrayBuffer.h"
#include "Blob.h"
@@ -45,12 +45,12 @@
namespace WebCore {
-BlobBuilder::BlobBuilder()
+WebKitBlobBuilder::WebKitBlobBuilder()
: m_size(0)
{
}
-Vector<char>& BlobBuilder::getBuffer()
+Vector<char>& WebKitBlobBuilder::getBuffer()
{
// If the last item is not a data item, create one. Otherwise, we simply append the new string to the last data item.
if (m_items.isEmpty() || m_items[m_items.size() - 1].type != BlobDataItem::Data)
@@ -59,7 +59,7 @@ Vector<char>& BlobBuilder::getBuffer()
return *m_items[m_items.size() - 1].data->mutableData();
}
-void BlobBuilder::append(const String& text, const String& endingType, ExceptionCode& ec)
+void WebKitBlobBuilder::append(const String& text, const String& endingType, ExceptionCode& ec)
{
bool isEndingTypeTransparent = endingType == "transparent";
bool isEndingTypeNative = endingType == "native";
@@ -80,13 +80,13 @@ void BlobBuilder::append(const String& text, const String& endingType, Exception
m_size += buffer.size() - oldSize;
}
-void BlobBuilder::append(const String& text, ExceptionCode& ec)
+void WebKitBlobBuilder::append(const String& text, ExceptionCode& ec)
{
append(text, String(), ec);
}
#if ENABLE(BLOB)
-void BlobBuilder::append(ArrayBuffer* arrayBuffer)
+void WebKitBlobBuilder::append(ArrayBuffer* arrayBuffer)
{
Vector<char>& buffer = getBuffer();
size_t oldSize = buffer.size();
@@ -95,7 +95,7 @@ void BlobBuilder::append(ArrayBuffer* arrayBuffer)
}
#endif
-void BlobBuilder::append(Blob* blob)
+void WebKitBlobBuilder::append(Blob* blob)
{
if (blob->isFile()) {
// If the blob is file that is not snapshoted, capture the snapshot now.
@@ -114,7 +114,7 @@ void BlobBuilder::append(Blob* blob)
}
}
-PassRefPtr<Blob> BlobBuilder::getBlob(const String& contentType)
+PassRefPtr<Blob> WebKitBlobBuilder::getBlob(const String& contentType)
{
OwnPtr<BlobData> blobData = BlobData::create();
blobData->setContentType(contentType);
diff --git a/Source/WebCore/fileapi/BlobBuilder.h b/Source/WebCore/fileapi/WebKitBlobBuilder.h
index db46591..34396fe 100644
--- a/Source/WebCore/fileapi/BlobBuilder.h
+++ b/Source/WebCore/fileapi/WebKitBlobBuilder.h
@@ -28,8 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef BlobBuilder_h
-#define BlobBuilder_h
+#ifndef WebKitBlobBuilder_h
+#define WebKitBlobBuilder_h
#include "BlobData.h"
#include <wtf/Forward.h>
@@ -43,9 +43,9 @@ class TextEncoding;
typedef int ExceptionCode;
-class BlobBuilder : public RefCounted<BlobBuilder> {
+class WebKitBlobBuilder : public RefCounted<WebKitBlobBuilder> {
public:
- static PassRefPtr<BlobBuilder> create() { return adoptRef(new BlobBuilder()); }
+ static PassRefPtr<WebKitBlobBuilder> create() { return adoptRef(new WebKitBlobBuilder()); }
void append(Blob*);
void append(const String& text, ExceptionCode&);
@@ -57,7 +57,7 @@ public:
PassRefPtr<Blob> getBlob(const String& contentType = String());
private:
- BlobBuilder();
+ WebKitBlobBuilder();
Vector<char>& getBuffer();
@@ -67,4 +67,4 @@ private:
} // namespace WebCore
-#endif // BlobBuilder_h
+#endif // WebKitBlobBuilder_h
diff --git a/Source/WebCore/fileapi/BlobBuilder.idl b/Source/WebCore/fileapi/WebKitBlobBuilder.idl
index 8f5049f..60d0c0a 100644
--- a/Source/WebCore/fileapi/BlobBuilder.idl
+++ b/Source/WebCore/fileapi/WebKitBlobBuilder.idl
@@ -33,7 +33,7 @@ module html {
CanBeConstructed,
GenerateNativeConverter,
NoStaticTables
- ] BlobBuilder {
+ ] WebKitBlobBuilder {
#if !defined(LANGUAGE_OBJECTIVE_C)
Blob getBlob(in [Optional, ConvertUndefinedOrNullToNullString] DOMString contentType);
#endif
diff --git a/Source/WebCore/fileapi/Flags.h b/Source/WebCore/fileapi/WebKitFlags.h
index 30884fc..a75b472 100644
--- a/Source/WebCore/fileapi/Flags.h
+++ b/Source/WebCore/fileapi/WebKitFlags.h
@@ -28,8 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef Flags_h
-#define Flags_h
+#ifndef WebKitFlags_h
+#define WebKitFlags_h
#if ENABLE(FILE_SYSTEM)
@@ -38,11 +38,11 @@
namespace WebCore {
-class Flags : public RefCounted<Flags> {
+class WebKitFlags : public RefCounted<WebKitFlags> {
public:
- static PassRefPtr<Flags> create(bool create = false, bool exclusive = false)
+ static PassRefPtr<WebKitFlags> create(bool create = false, bool exclusive = false)
{
- return adoptRef(new Flags(create, exclusive));
+ return adoptRef(new WebKitFlags(create, exclusive));
}
bool isCreate() const { return m_create; }
@@ -51,7 +51,7 @@ public:
void setExclusive(bool exclusive) { m_exclusive = exclusive; }
private:
- Flags(bool create, bool exclusive)
+ WebKitFlags(bool create, bool exclusive)
: m_create(create)
, m_exclusive(exclusive)
{
@@ -64,4 +64,4 @@ private:
#endif // ENABLE(FILE_SYSTEM)
-#endif // Flags_h
+#endif // WebKitFlags_h
diff --git a/Source/WebCore/fileapi/Flags.idl b/Source/WebCore/fileapi/WebKitFlags.idl
index 88cede3..533796a 100644
--- a/Source/WebCore/fileapi/Flags.idl
+++ b/Source/WebCore/fileapi/WebKitFlags.idl
@@ -33,7 +33,7 @@ module storage {
Conditional=FILE_SYSTEM,
CanBeConstructed,
NoStaticTables
- ] Flags {
+ ] WebKitFlags {
attribute boolean create;
attribute boolean exclusive;
};