diff options
author | Shimeng (Simon) Wang <swang@google.com> | 2010-12-07 17:22:45 -0800 |
---|---|---|
committer | Shimeng (Simon) Wang <swang@google.com> | 2010-12-22 14:15:40 -0800 |
commit | 4576aa36e9a9671459299c7963ac95aa94beaea9 (patch) | |
tree | 3863574e050f168c0126ecb47c83319fab0972d8 /WebCore/fileapi/FileReader.cpp | |
parent | 55323ac613cc31553107b68603cb627264d22bb0 (diff) | |
download | external_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.zip external_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.tar.gz external_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.tar.bz2 |
Merge WebKit at r73109: Initial merge by git.
Change-Id: I61f1a66d9642e3d8405d3ac6ccab2a53421c75d8
Diffstat (limited to 'WebCore/fileapi/FileReader.cpp')
-rw-r--r-- | WebCore/fileapi/FileReader.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/WebCore/fileapi/FileReader.cpp b/WebCore/fileapi/FileReader.cpp index a54a337..9ee3b01 100644 --- a/WebCore/fileapi/FileReader.cpp +++ b/WebCore/fileapi/FileReader.cpp @@ -35,20 +35,16 @@ #include "FileReader.h" #include "ArrayBuffer.h" -#include "Blob.h" #include "CrossThreadTask.h" #include "File.h" #include "Logging.h" #include "ProgressEvent.h" #include "ScriptExecutionContext.h" #include <wtf/CurrentTime.h> -#include <wtf/OwnPtr.h> -#include <wtf/PassRefPtr.h> -#include <wtf/RefPtr.h> namespace WebCore { -const double progressNotificationIntervalMS = 50; +static const double progressNotificationIntervalMS = 50; FileReader::FileReader(ScriptExecutionContext* context) : ActiveDOMObject(context, this) @@ -195,7 +191,7 @@ void FileReader::didStartLoading() void FileReader::didReceiveData() { // Fire the progress event at least every 50ms. - double now = WTF::currentTimeMS(); + double now = currentTimeMS(); if (!m_lastProgressNotificationTimeMS) m_lastProgressNotificationTimeMS = now; else if (now - m_lastProgressNotificationTimeMS > progressNotificationIntervalMS) { @@ -227,10 +223,7 @@ void FileReader::didFail(int errorCode) void FileReader::fireEvent(const AtomicString& type) { - // FIXME: the current ProgressEvent uses "unsigned long" for total and loaded attributes. Need to talk with the spec writer to resolve the issue. - unsigned bytesLoaded = m_loader ? m_loader->bytesLoaded() : 0; - unsigned totalBytes = m_loader ? m_loader->totalBytes() : 0; - dispatchEvent(ProgressEvent::create(type, true, bytesLoaded, totalBytes)); + dispatchEvent(ProgressEvent::create(type, true, m_loader ? m_loader->bytesLoaded() : 0, m_loader ? m_loader->totalBytes() : 0)); } FileReader::ReadyState FileReader::readyState() const |