diff options
author | Ben Murdoch <benm@google.com> | 2010-05-28 11:08:34 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-06-02 11:22:40 +0100 |
commit | 10bcdb2eab81b5b9c893faf90f5bd9f396edeb4a (patch) | |
tree | 6a2fd233d940d82cbb96bc1be23b09860af5811d /WebCore/platform/posix | |
parent | c05b3a990126a5a1de357c025e25e6acd4e4e185 (diff) | |
download | external_webkit-10bcdb2eab81b5b9c893faf90f5bd9f396edeb4a.zip external_webkit-10bcdb2eab81b5b9c893faf90f5bd9f396edeb4a.tar.gz external_webkit-10bcdb2eab81b5b9c893faf90f5bd9f396edeb4a.tar.bz2 |
Enable File Reader and blob.slice APIs.
Notes:
- the change to WebCore/html/FileStream.cpp is a cherry pick of http://trac.webkit.org/changeset/60325
- the change to WebCore/platform/posix/FileSystemPOSIX.cpp is a cherry pick of http://trac.webkit.org/changeset/60374
- this needs a corresponding frameworks/base change
Change-Id: I05d1496e1e95adf1c6a61c6f07bbf62e9bc92820
Diffstat (limited to 'WebCore/platform/posix')
-rw-r--r-- | WebCore/platform/posix/FileSystemPOSIX.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/WebCore/platform/posix/FileSystemPOSIX.cpp b/WebCore/platform/posix/FileSystemPOSIX.cpp index b7fcd71..c035310 100644 --- a/WebCore/platform/posix/FileSystemPOSIX.cpp +++ b/WebCore/platform/posix/FileSystemPOSIX.cpp @@ -75,12 +75,17 @@ bool deleteFile(const String& path) PlatformFileHandle openFile(const String& path, FileOpenMode mode) { + CString fsRep = fileSystemRepresentation(path); + + if (fsRep.isNull()) + return invalidPlatformFileHandle; + int platformFlag = 0; if (mode == OpenForRead) platformFlag |= O_RDONLY; else if (mode == OpenForWrite) platformFlag |= (O_WRONLY | O_CREAT | O_TRUNC); - return open(path.utf8().data(), platformFlag, 0666); + return open(fsRep.data(), platformFlag, 0666); } void closeFile(PlatformFileHandle& handle) |