Diff
Modified: trunk/Source/WebCore/ChangeLog (119681 => 119682)
--- trunk/Source/WebCore/ChangeLog 2012-06-07 04:34:56 UTC (rev 119681)
+++ trunk/Source/WebCore/ChangeLog 2012-06-07 04:52:05 UTC (rev 119682)
@@ -1,3 +1,28 @@
+2012-06-06 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r119680.
+ http://trac.webkit.org/changeset/119680
+ https://bugs.webkit.org/show_bug.cgi?id=88498
+
+ It broke mac build (Requested by kinuko on #webkit).
+
+ * fileapi/File.cpp:
+ (WebCore::File::File):
+ (WebCore::File::lastModifiedDate):
+ (WebCore::File::lastModifiedDateForBinding):
+ (WebCore):
+ (WebCore::File::captureSnapshot):
+ * fileapi/File.h:
+ (File):
+ * fileapi/File.idl:
+ * platform/FileMetadata.h:
+ (WebCore::FileMetadata::FileMetadata):
+ * platform/FileSystem.h:
+ * platform/chromium/support/WebHTTPBody.cpp:
+ (WebKit::WebHTTPBody::elementAt):
+ * platform/network/BlobData.cpp:
+ (WebCore):
+
2012-06-06 Kinuko Yasuda <[email protected]>
File::lastModifiedDate should use NaN or separate boolean flag for null Date value
Modified: trunk/Source/WebCore/fileapi/File.cpp (119681 => 119682)
--- trunk/Source/WebCore/fileapi/File.cpp 2012-06-07 04:34:56 UTC (rev 119681)
+++ trunk/Source/WebCore/fileapi/File.cpp 2012-06-07 04:52:05 UTC (rev 119682)
@@ -30,7 +30,6 @@
#include "FileSystem.h"
#include "MIMETypeRegistry.h"
#include <wtf/CurrentTime.h>
-#include <wtf/MathExtras.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
@@ -87,7 +86,7 @@
, m_name(pathGetFileName(path))
#if ENABLE(FILE_SYSTEM)
, m_snapshotSize(-1)
- , m_snapshotModificationTime(invalidTime)
+ , m_snapshotModificationTime(0)
#endif
{
}
@@ -97,7 +96,7 @@
, m_path(path)
#if ENABLE(FILE_SYSTEM)
, m_snapshotSize(-1)
- , m_snapshotModificationTime(invalidTime)
+ , m_snapshotModificationTime(0)
#endif
{
m_name = pathGetFileName(path);
@@ -112,7 +111,7 @@
, m_name(name)
#if ENABLE(FILE_SYSTEM)
, m_snapshotSize(-1)
- , m_snapshotModificationTime(invalidTime)
+ , m_snapshotModificationTime(0)
#endif
{
}
@@ -137,12 +136,18 @@
time_t modificationTime;
if (!getFileModificationTime(m_path, modificationTime))
- return invalidTime;
+ return 0;
// Needs to return epoch time in milliseconds for Date.
return modificationTime * 1000.0;
}
+double File::lastModifiedDateForBinding() const
+{
+ double value = lastModifiedDate();
+ return (!value) ? std::numeric_limits<double>::quiet_NaN() : value;
+}
+
unsigned long long File::size() const
{
#if ENABLE(FILE_SYSTEM)
@@ -173,7 +178,7 @@
FileMetadata metadata;
if (!getFileMetadata(m_path, metadata)) {
snapshotSize = 0;
- snapshotModificationTime = invalidTime;
+ snapshotModificationTime = 0;
return;
}
Modified: trunk/Source/WebCore/fileapi/File.h (119681 => 119682)
--- trunk/Source/WebCore/fileapi/File.h 2012-06-07 04:34:56 UTC (rev 119681)
+++ trunk/Source/WebCore/fileapi/File.h 2012-06-07 04:52:05 UTC (rev 119682)
@@ -77,9 +77,12 @@
const String& path() const { return m_path; }
const String& name() const { return m_name; }
- // This may return NaN (which is converted to null Date in _javascript_ layer) if getFileModificationTime() platform call has failed or the information is not available.
+ // This may return zero if getFileModificationTime() platform call has failed or zero snapshot lastModifiedTime is given at construction time.
double lastModifiedDate() const;
+ // For binding. We want to return null Date if we get the value 0 Date (which is used to indicate the information is unavailable).
+ double lastModifiedDateForBinding() const;
+
#if ENABLE(DIRECTORY_UPLOAD)
// Returns the relative path of this file in the context of a directory selection.
const String& webkitRelativePath() const { return m_relativePath; }
Modified: trunk/Source/WebCore/fileapi/File.idl (119681 => 119682)
--- trunk/Source/WebCore/fileapi/File.idl 2012-06-07 04:34:56 UTC (rev 119681)
+++ trunk/Source/WebCore/fileapi/File.idl 2012-06-07 04:52:05 UTC (rev 119682)
@@ -32,7 +32,7 @@
] File : Blob {
readonly attribute DOMString name;
#if !defined(LANGUAGE_GOBJECT) || !LANGUAGE_GOBJECT
- readonly attribute Date lastModifiedDate;
+ readonly attribute [ImplementedAs=lastModifiedDateForBinding] Date lastModifiedDate;
#endif
#if defined(ENABLE_DIRECTORY_UPLOAD) && ENABLE_DIRECTORY_UPLOAD
readonly attribute DOMString webkitRelativePath;
Modified: trunk/Source/WebCore/platform/FileMetadata.h (119681 => 119682)
--- trunk/Source/WebCore/platform/FileMetadata.h 2012-06-07 04:34:56 UTC (rev 119681)
+++ trunk/Source/WebCore/platform/FileMetadata.h 2012-06-07 04:52:05 UTC (rev 119682)
@@ -31,7 +31,6 @@
#ifndef FileMetadata_h
#define FileMetadata_h
-#include "FileSystem.h"
#include <wtf/text/WTFString.h>
namespace WebCore {
@@ -57,7 +56,7 @@
String platformPath;
#endif
- FileMetadata() : modificationTime(invalidTime), length(-1), type(TypeUnknown) { }
+ FileMetadata() : modificationTime(0.0), length(-1), type(TypeUnknown) { }
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/FileSystem.h (119681 => 119682)
--- trunk/Source/WebCore/platform/FileSystem.h 2012-06-07 04:34:56 UTC (rev 119681)
+++ trunk/Source/WebCore/platform/FileSystem.h 2012-06-07 04:52:05 UTC (rev 119682)
@@ -145,8 +145,6 @@
SeekFromEnd
};
-const double invalidTime = std::numeric_limits<double>::quiet_NaN();
-
#if OS(WINDOWS)
static const char PlatformFilePathSeparator = '\\';
#else
Modified: trunk/Source/WebCore/platform/chromium/support/WebHTTPBody.cpp (119681 => 119682)
--- trunk/Source/WebCore/platform/chromium/support/WebHTTPBody.cpp 2012-06-07 04:34:56 UTC (rev 119681)
+++ trunk/Source/WebCore/platform/chromium/support/WebHTTPBody.cpp 2012-06-07 04:52:05 UTC (rev 119682)
@@ -31,7 +31,6 @@
#include "config.h"
#include <public/WebHTTPBody.h>
-#include "FileSystem.h"
#include "FormData.h"
using namespace WebCore;
@@ -78,7 +77,7 @@
result.filePath.reset();
result.fileStart = 0;
result.fileLength = 0;
- result.modificationTime = invalidTime;
+ result.modificationTime = 0.0;
result.blobURL = KURL();
switch (element.m_type) {
Modified: trunk/Source/WebCore/platform/network/BlobData.cpp (119681 => 119682)
--- trunk/Source/WebCore/platform/network/BlobData.cpp 2012-06-07 04:34:56 UTC (rev 119681)
+++ trunk/Source/WebCore/platform/network/BlobData.cpp 2012-06-07 04:52:05 UTC (rev 119682)
@@ -30,7 +30,6 @@
#include "config.h"
#include "BlobData.h"
-#include "FileSystem.h"
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
@@ -41,7 +40,7 @@
namespace WebCore {
const long long BlobDataItem::toEndOfFile = -1;
-const double BlobDataItem::doNotCheckFileChange = invalidTime;
+const double BlobDataItem::doNotCheckFileChange = 0;
RawData::RawData()
{