[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 15:07:20 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit b1eeef57591ebdb21f1d5edeb14e90f19e44baff
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 28 03:57:58 2010 +0000
2010-10-27 Eric Uhrhane <ericu at chromium.org>
Reviewed by David Levin.
[Chromium] Metadata queries should return full file info, not just modification time
https://bugs.webkit.org/show_bug.cgi?id=48098
LayoutTests that use this functionality via WorkerAsyncFileWriter are in review.
Build file changes to add FileMetadata.
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
The rest of the changes here just pass the new FileMetadata object through calls that used to take a modification time.
* platform/FileMetadata.h: Added.
(WebCore::FileMetadata::FileMetadata):
* fileapi/FileSystemCallbacks.cpp:
(WebCore::FileSystemCallbacksBase::didReadMetadata):
(WebCore::MetadataCallbacks::didReadMetadata):
* fileapi/FileSystemCallbacks.h:
* platform/AsyncFileSystemCallbacks.h:
2010-10-27 Eric Uhrhane <ericu at chromium.org>
Reviewed by David Levin.
[Chromium] Metadata queries should return full file info, not just modification time
https://bugs.webkit.org/show_bug.cgi?id=48098
* src/AssertMatchingEnums.cpp: Ensure WebFileInfo and FileMetadata use the same values for file/directory indicators.
* src/WebFileSystemCallbacksImpl.cpp:
(WebKit::WebFileSystemCallbacksImpl::didReadMetadata): Pass through the new information.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2b75852..b45b65b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,28 @@
+2010-10-27 Eric Uhrhane <ericu at chromium.org>
+
+ Reviewed by David Levin.
+
+ [Chromium] Metadata queries should return full file info, not just modification time
+ https://bugs.webkit.org/show_bug.cgi?id=48098
+
+ LayoutTests that use this functionality via WorkerAsyncFileWriter are in review.
+
+ Build file changes to add FileMetadata.
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+
+ The rest of the changes here just pass the new FileMetadata object through calls that used to take a modification time.
+ * platform/FileMetadata.h: Added.
+ (WebCore::FileMetadata::FileMetadata):
+ * fileapi/FileSystemCallbacks.cpp:
+ (WebCore::FileSystemCallbacksBase::didReadMetadata):
+ (WebCore::MetadataCallbacks::didReadMetadata):
+ * fileapi/FileSystemCallbacks.h:
+ * platform/AsyncFileSystemCallbacks.h:
+
2010-10-27 Chris Rogers <crogers at google.com>
Reviewed by Kenneth Russell.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index e3fdf94..9deacf4 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -2180,6 +2180,7 @@ webcore_sources += \
WebCore/platform/EventLoop.h \
WebCore/platform/FileChooser.cpp \
WebCore/platform/FileChooser.h \
+ WebCore/platform/FileMetadata.h \
WebCore/platform/FileStreamClient.h \
WebCore/platform/FileStream.cpp \
WebCore/platform/FileStream.h \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 3bf8524..c7dcf18 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -3292,6 +3292,7 @@
'platform/EventLoop.h',
'platform/FileChooser.cpp',
'platform/FileChooser.h',
+ 'platform/FileMetadata.h',
'platform/FileStream.cpp',
'platform/FileStream.h',
'platform/FileStreamClient.h',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index ee3b9d4..d61811b 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -3031,7 +3031,8 @@ contains(DEFINES, ENABLE_FILE_SYSTEM=1) {
fileapi/Metadata.h \
fileapi/MetadataCallback.h \
platform/AsyncFileSystem.h \
- platform/AsyncFileSystemCallbacks.h
+ platform/AsyncFileSystemCallbacks.h \
+ platform/FileMetadata.h
SOURCES += \
bindings/js/JSDirectoryEntryCustom.cpp \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 6ea3e57..4e295ae 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -24244,6 +24244,10 @@
>
</File>
<File
+ RelativePath="..\platform\FileMetadata.h"
+ >
+ </File>
+ <File
RelativePath="..\platform\FileStream.cpp"
>
</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index e9bedb2..6cf0263 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -948,6 +948,7 @@
4614A1FE0B23A8D600446E1C /* copyCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 4614A1FD0B23A8D600446E1C /* copyCursor.png */; };
464EA2730B8A350B00A8E6E3 /* crossHairCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 464EA2710B8A350B00A8E6E3 /* crossHairCursor.png */; };
464EA2740B8A350B00A8E6E3 /* notAllowedCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 464EA2720B8A350B00A8E6E3 /* notAllowedCursor.png */; };
+ 4689F1AF1267BAE100E8D380 /* FileMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 4689F1AE1267BAE100E8D380 /* FileMetadata.h */; };
46BD16E30B279473001F0839 /* noneCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46BD16E20B279473001F0839 /* noneCursor.png */; };
46D4F2490AF97E810035385A /* cellCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46D4F2460AF97E810035385A /* cellCursor.png */; };
46D4F24A0AF97E810035385A /* contextMenuCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46D4F2470AF97E810035385A /* contextMenuCursor.png */; };
@@ -7003,6 +7004,7 @@
4614A1FD0B23A8D600446E1C /* copyCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = copyCursor.png; sourceTree = "<group>"; };
464EA2710B8A350B00A8E6E3 /* crossHairCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = crossHairCursor.png; sourceTree = "<group>"; };
464EA2720B8A350B00A8E6E3 /* notAllowedCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = notAllowedCursor.png; sourceTree = "<group>"; };
+ 4689F1AE1267BAE100E8D380 /* FileMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileMetadata.h; path = platform/FileMetadata.h; sourceTree = "<group>"; };
46BD16E20B279473001F0839 /* noneCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = noneCursor.png; sourceTree = "<group>"; };
46D4F2460AF97E810035385A /* cellCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cellCursor.png; sourceTree = "<group>"; };
46D4F2470AF97E810035385A /* contextMenuCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = contextMenuCursor.png; sourceTree = "<group>"; };
@@ -14994,6 +14996,7 @@
2EDF369E122C94C8002F7D4E /* FileException.h */,
976D6C66122B8A3D001FD1F7 /* FileList.cpp */,
976D6C67122B8A3D001FD1F7 /* FileList.h */,
+ 4689F1AE1267BAE100E8D380 /* FileMetadata.h */,
976D6C69122B8A3D001FD1F7 /* FileReader.cpp */,
976D6C6A122B8A3D001FD1F7 /* FileReader.h */,
2EDF369A122C94B4002F7D4E /* FileReaderSync.cpp */,
@@ -21158,6 +21161,7 @@
93F199ED08245E59001E9ABC /* XSLTProcessor.h in Headers */,
E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */,
+ 4689F1AF1267BAE100E8D380 /* FileMetadata.h in Headers */,
4FA3B90B125CD12200300BAD /* InspectorState.h in Headers */,
9728C3141268E4390041E89B /* MarkupAccumulator.h in Headers */,
F7A034C4126BF6BE007DC19E /* FontOrientation.h in Headers */,
diff --git a/WebCore/fileapi/FileSystemCallbacks.cpp b/WebCore/fileapi/FileSystemCallbacks.cpp
index df5d18c..6644589 100644
--- a/WebCore/fileapi/FileSystemCallbacks.cpp
+++ b/WebCore/fileapi/FileSystemCallbacks.cpp
@@ -45,6 +45,7 @@
#include "ErrorCallback.h"
#include "FileEntry.h"
#include "FileError.h"
+#include "FileMetadata.h"
#include "FileSystemCallback.h"
#include "FileWriter.h"
#include "FileWriterCallback.h"
@@ -76,7 +77,7 @@ void FileSystemCallbacksBase::didOpenFileSystem(const String&, PassOwnPtr<AsyncF
ASSERT_NOT_REACHED();
}
-void FileSystemCallbacksBase::didReadMetadata(double)
+void FileSystemCallbacksBase::didReadMetadata(const FileMetadata&)
{
// Each subclass must implement an appropriate one.
ASSERT_NOT_REACHED();
@@ -204,10 +205,10 @@ MetadataCallbacks::MetadataCallbacks(PassRefPtr<MetadataCallback> successCallbac
{
}
-void MetadataCallbacks::didReadMetadata(double modificationTime)
+void MetadataCallbacks::didReadMetadata(const FileMetadata& metadata)
{
if (m_successCallback)
- m_successCallback->handleEvent(Metadata::create(modificationTime).get());
+ m_successCallback->handleEvent(Metadata::create(metadata.modificationTime).get());
m_successCallback.clear();
}
diff --git a/WebCore/fileapi/FileSystemCallbacks.h b/WebCore/fileapi/FileSystemCallbacks.h
index 85723c6..08bdd4d 100644
--- a/WebCore/fileapi/FileSystemCallbacks.h
+++ b/WebCore/fileapi/FileSystemCallbacks.h
@@ -47,6 +47,7 @@ class ErrorCallback;
class EntriesCallback;
class EntryArray;
class EntryCallback;
+class FileMetadata;
class FileSystemCallback;
class FileWriter;
class FileWriterCallback;
@@ -65,7 +66,7 @@ public:
virtual void didOpenFileSystem(const String& name, PassOwnPtr<AsyncFileSystem>);
// For MetadataCallbacks.
- virtual void didReadMetadata(double modificationTime);
+ virtual void didReadMetadata(const FileMetadata&);
// For EntriesCallbacks. didReadDirectoryEntry is called each time the API reads an entry, and didReadDirectoryDone is called when a chunk of entries have been read (i.e. good time to call back to the application). If hasMore is true there can be more chunks.
virtual void didReadDirectoryEntry(const String& name, bool isDirectory);
@@ -125,7 +126,7 @@ private:
class MetadataCallbacks : public FileSystemCallbacksBase {
public:
static PassOwnPtr<MetadataCallbacks> create(PassRefPtr<MetadataCallback>, PassRefPtr<ErrorCallback>);
- virtual void didReadMetadata(double modificationTime);
+ virtual void didReadMetadata(const FileMetadata&);
private:
MetadataCallbacks(PassRefPtr<MetadataCallback>, PassRefPtr<ErrorCallback>);
diff --git a/WebCore/platform/AsyncFileSystemCallbacks.h b/WebCore/platform/AsyncFileSystemCallbacks.h
index 451aead..58b2d4b 100644
--- a/WebCore/platform/AsyncFileSystemCallbacks.h
+++ b/WebCore/platform/AsyncFileSystemCallbacks.h
@@ -39,6 +39,7 @@ namespace WebCore {
class AsyncFileSystem;
class AsyncFileWriter;
+class FileMetadata;
class AsyncFileSystemCallbacks : public Noncopyable {
public:
@@ -49,7 +50,7 @@ public:
virtual void didOpenFileSystem(const String& name, PassOwnPtr<AsyncFileSystem>) = 0;
// Called when a file metadata is read successfully.
- virtual void didReadMetadata(double modificationTime) = 0;
+ virtual void didReadMetadata(const FileMetadata&) = 0;
// Called when a directory entry is read.
virtual void didReadDirectoryEntry(const String& name, bool isDirectory) = 0;
diff --git a/WebCore/platform/FileMetadata.h b/WebCore/platform/FileMetadata.h
new file mode 100644
index 0000000..9b7d09b
--- /dev/null
+++ b/WebCore/platform/FileMetadata.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef FileMetadata_h
+#define FileMetadata_h
+
+#if ENABLE(FILE_SYSTEM)
+
+namespace WebCore {
+
+struct FileMetadata {
+ // The last modification time of the file, in seconds.
+ // The value 0.0 means that the time is not set.
+ double modificationTime;
+
+ // The length of the file in bytes.
+ // The value -1 means that the length is not set.
+ long long length;
+
+ enum Type {
+ TypeUnknown = 0,
+ TypeFile,
+ TypeDirectory
+ };
+
+ Type type;
+
+ FileMetadata() : modificationTime(0.0), length(-1), type(TypeUnknown) { }
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
+
+#endif // FileMetadata_h
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index b647fdd..a2d7529 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-27 Eric Uhrhane <ericu at chromium.org>
+
+ Reviewed by David Levin.
+
+ [Chromium] Metadata queries should return full file info, not just modification time
+ https://bugs.webkit.org/show_bug.cgi?id=48098
+
+ * src/AssertMatchingEnums.cpp: Ensure WebFileInfo and FileMetadata use the same values for file/directory indicators.
+ * src/WebFileSystemCallbacksImpl.cpp:
+ (WebKit::WebFileSystemCallbacksImpl::didReadMetadata): Pass through the new information.
+
2010-10-27 Kenneth Russell <kbr at google.com>
Reviewed by Dimitri Glazkov.
diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp
index ae2791d..c6ab85a 100644
--- a/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -38,6 +38,7 @@
#include "AsyncFileSystem.h"
#include "EditorInsertAction.h"
#include "FileError.h"
+#include "FileMetadata.h"
#include "FontDescription.h"
#include "FontSmoothingMode.h"
#include "HTMLInputElement.h"
@@ -58,6 +59,7 @@
#include "WebCursorInfo.h"
#include "WebEditingAction.h"
#include "WebFileError.h"
+#include "WebFileInfo.h"
#include "WebFileSystem.h"
#include "WebFontDescription.h"
#include "WebIDBKey.h"
@@ -363,6 +365,9 @@ COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NumberType, IDBKey::NumberType);
#if ENABLE(FILE_SYSTEM)
COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypeTemporary, AsyncFileSystem::Temporary);
COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypePersistent, AsyncFileSystem::Persistent);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileInfo::TypeUnknown, FileMetadata::TypeUnknown);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileInfo::TypeFile, FileMetadata::TypeFile);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileInfo::TypeDirectory, FileMetadata::TypeDirectory);
#endif
COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorNotFound, FileError::NOT_FOUND_ERR);
diff --git a/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp b/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
index f44e8f1..52a4032 100644
--- a/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
+++ b/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
@@ -34,6 +34,7 @@
#include "AsyncFileSystemCallbacks.h"
#include "AsyncFileSystemChromium.h"
+#include "FileMetadata.h"
#include "ScriptExecutionContext.h"
#include "WebFileSystemEntry.h"
#include "WebFileInfo.h"
@@ -63,9 +64,13 @@ void WebFileSystemCallbacksImpl::didSucceed()
delete this;
}
-void WebFileSystemCallbacksImpl::didReadMetadata(const WebFileInfo& info)
+void WebFileSystemCallbacksImpl::didReadMetadata(const WebFileInfo& webFileInfo)
{
- m_callbacks->didReadMetadata(info.modificationTime);
+ FileMetadata fileMetadata;
+ fileMetadata.modificationTime = webFileInfo.modificationTime;
+ fileMetadata.length = webFileInfo.length;
+ fileMetadata.type = static_cast<FileMetadata::Type>(webFileInfo.type);
+ m_callbacks->didReadMetadata(fileMetadata);
delete this;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list