[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 13:43:46 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 4905d71e48936cfc3954f46ba61fd6e35c07405f
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 24 08:15:20 2010 +0000

    2010-09-24  Eric Uhrhane  <ericu at chromium.org>
    
            Reviewed by David Levin.
    
            Remove unnecessary parameter from AsyncFileWriterClient::didTruncate
            https://bugs.webkit.org/show_bug.cgi?id=46390
    
            * fileapi/AsyncFileWriterClient.h:
    
            Added state to FileWriter to replace the parameter.
            * fileapi/FileWriter.h:
            * fileapi/FileWriter.cpp:
            (WebCore::FileWriter::truncate):
            (WebCore::FileWriter::didTruncate):
    2010-09-24  Eric Uhrhane  <ericu at chromium.org>
    
            Reviewed by David Levin.
    
            Remove unnecessary parameter from AsyncFileWriterClient::didTruncate
            https://bugs.webkit.org/show_bug.cgi?id=46390
    
            * public/WebFileWriterClient.h:
            * src/AsyncFileWriterChromium.cpp:
            * src/AsyncFileWriterChromium.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68242 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index cea1a14..a3c244a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-09-24  Eric Uhrhane  <ericu at chromium.org>
+
+        Reviewed by David Levin.
+
+        Remove unnecessary parameter from AsyncFileWriterClient::didTruncate
+        https://bugs.webkit.org/show_bug.cgi?id=46390
+
+        * fileapi/AsyncFileWriterClient.h:
+
+        Added state to FileWriter to replace the parameter.
+        * fileapi/FileWriter.h:
+        * fileapi/FileWriter.cpp:
+        (WebCore::FileWriter::truncate):
+        (WebCore::FileWriter::didTruncate):
+
 2010-09-24  Sheriff Bot  <webkit.review.bot at gmail.com>
 
         Unreviewed, rolling out r68236.
diff --git a/WebCore/fileapi/AsyncFileWriterClient.h b/WebCore/fileapi/AsyncFileWriterClient.h
index 1c0a4b1..327b19c 100644
--- a/WebCore/fileapi/AsyncFileWriterClient.h
+++ b/WebCore/fileapi/AsyncFileWriterClient.h
@@ -42,7 +42,7 @@ public:
     virtual ~AsyncFileWriterClient() {}
 
     virtual void didWrite(long long bytes, bool complete) = 0;
-    virtual void didTruncate(long long position) = 0;
+    virtual void didTruncate() = 0;
     virtual void didFail(ExceptionCode) = 0;
 };
 
diff --git a/WebCore/fileapi/FileWriter.cpp b/WebCore/fileapi/FileWriter.cpp
index a9f9afd..7008cb1 100644
--- a/WebCore/fileapi/FileWriter.cpp
+++ b/WebCore/fileapi/FileWriter.cpp
@@ -48,6 +48,7 @@ FileWriter::FileWriter(ScriptExecutionContext* context)
     , m_position(0)
     , m_bytesWritten(0)
     , m_bytesToWrite(0)
+    , m_truncateLength(-1)
 {
 }
 
@@ -122,7 +123,7 @@ void FileWriter::seek(long long position, ExceptionCode& ec)
 void FileWriter::truncate(long long position, ExceptionCode& ec)
 {
     ASSERT(m_writer);
-    if (m_readyState == WRITING || position >= m_length) {
+    if (m_readyState == WRITING || position < 0) {
         ec = INVALID_STATE_ERR;
         m_error = FileError::create(ec);
         return;
@@ -130,6 +131,7 @@ void FileWriter::truncate(long long position, ExceptionCode& ec)
     m_readyState = WRITING;
     m_bytesWritten = 0;
     m_bytesToWrite = 0;
+    m_truncateLength = position;
     fireEvent(eventNames().writestartEvent);
     m_writer->truncate(position);
 }
@@ -167,15 +169,14 @@ void FileWriter::didWrite(long long bytes, bool complete)
         fireEvent(eventNames().writeendEvent);
 }
 
-void FileWriter::didTruncate(long long length)
+void FileWriter::didTruncate()
 {
-    ASSERT(length > 0);
-    ASSERT(length >= 0);
-    ASSERT(length < m_length);
-    m_length = length;
+    ASSERT(m_truncateLength >= 0);
+    m_length = m_truncateLength;
     if (m_position > m_length)
         m_position = m_length;
     m_readyState = DONE;
+    m_truncateLength = -1;
     fireEvent(eventNames().writeEvent);
     fireEvent(eventNames().writeendEvent);
 }
diff --git a/WebCore/fileapi/FileWriter.h b/WebCore/fileapi/FileWriter.h
index c5314cb..4bb91ef 100644
--- a/WebCore/fileapi/FileWriter.h
+++ b/WebCore/fileapi/FileWriter.h
@@ -76,7 +76,7 @@ public:
 
     // AsyncFileWriterClient
     void didWrite(long long bytes, bool complete);
-    void didTruncate(long long length);
+    void didTruncate();
     void didFail(ExceptionCode ec);
 
     // ActiveDOMObject
@@ -121,6 +121,7 @@ private:
     long long m_length;
     long long m_bytesWritten;
     long long m_bytesToWrite;
+    long long m_truncateLength;
 };
 
 } // namespace WebCore
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 4a8823f..c8bed2e 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,14 @@
+2010-09-24  Eric Uhrhane  <ericu at chromium.org>
+
+        Reviewed by David Levin.
+
+        Remove unnecessary parameter from AsyncFileWriterClient::didTruncate
+        https://bugs.webkit.org/show_bug.cgi?id=46390
+
+        * public/WebFileWriterClient.h:
+        * src/AsyncFileWriterChromium.cpp:
+        * src/AsyncFileWriterChromium.h:
+
 2010-09-24  Chris Guillory   <chris.guillory at google.com>
 
         Reviewed by Chris Fleizach.
diff --git a/WebKit/chromium/public/WebFileWriterClient.h b/WebKit/chromium/public/WebFileWriterClient.h
index d371582..46ff153 100644
--- a/WebKit/chromium/public/WebFileWriterClient.h
+++ b/WebKit/chromium/public/WebFileWriterClient.h
@@ -43,7 +43,7 @@ public:
     virtual void didWrite(long long bytes, bool complete) = 0;
 
     // Called once when the truncate completes successfully.
-    virtual void didTruncate(long long length) = 0;
+    virtual void didTruncate() = 0;
 
     // Called if the write or truncate fails, or if it is cancelled before the write or truncate completes.  Completion of an operation will be signalled exactly once, either by didFail, didTruncate, or didWrite(..., true).
     virtual void didFail(WebFileError) = 0;
diff --git a/WebKit/chromium/src/AsyncFileWriterChromium.cpp b/WebKit/chromium/src/AsyncFileWriterChromium.cpp
index 29897a3..8969094 100644
--- a/WebKit/chromium/src/AsyncFileWriterChromium.cpp
+++ b/WebKit/chromium/src/AsyncFileWriterChromium.cpp
@@ -78,9 +78,9 @@ void AsyncFileWriterChromium::didWrite(long long bytes, bool complete)
     m_client->didWrite(bytes, complete);
 }
 
-void AsyncFileWriterChromium::didTruncate(long long length)
+void AsyncFileWriterChromium::didTruncate()
 {
-    m_client->didTruncate(length);
+    m_client->didTruncate();
 }
 
 void AsyncFileWriterChromium::didFail(WebKit::WebFileError error)
diff --git a/WebKit/chromium/src/AsyncFileWriterChromium.h b/WebKit/chromium/src/AsyncFileWriterChromium.h
index 3117f7f..71a2f18 100644
--- a/WebKit/chromium/src/AsyncFileWriterChromium.h
+++ b/WebKit/chromium/src/AsyncFileWriterChromium.h
@@ -61,7 +61,7 @@ public:
 
     // WebFileWriterClient
     virtual void didWrite(long long bytes, bool complete);
-    virtual void didTruncate(long long length);
+    virtual void didTruncate();
     virtual void didFail(WebKit::WebFileError);
 
 private:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list