[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

jianli at chromium.org jianli at chromium.org
Wed Dec 22 13:25:11 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 73bee5064214a74f1bfe643137c2274c4d19e02d
Author: jianli at chromium.org <jianli at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 14 22:26:27 2010 +0000

    fast/files/apply-blob-url-to-img.html timeout on Leopard
    https://bugs.webkit.org/show_bug.cgi?id=45576
    
    Reviewed by David Levin.
    
    WebCore:
    
    The failure on Leopard is caused by the static method
    ResourceHandle::supportsBufferedData that returns true to indicate that
    the buffered data support is enabled for blob resource. However,
    BlobResourceHandle does not support this and we need to override this.
    
    The fix is to change supportsBufferedData method from static to virtual
    so that we can override the default behavior in BlobResourceHandle.
    
    * fileapi/ThreadableBlobRegistry.cpp: Copy BlobData to make it cross-thread.
    (WebCore::BlobRegistryContext::BlobRegistryContext):
    * loader/ResourceLoader.cpp:
    (WebCore::ResourceLoader::resourceData):
    (WebCore::ResourceLoader::addData):
    * platform/network/BlobResourceHandle.cpp:
    (WebCore::BlobResourceHandle::supportsBufferedData): Override the default
    behavior.
    * platform/network/BlobResourceHandle.h:
    * platform/network/ResourceHandle.h: Made supportsBufferedData virtual.
    * platform/network/mac/ResourceHandleMac.mm:
    (WebCore::ResourceHandle::bufferedData):
    
    WebKit/chromium:
    
    * src/ResourceHandle.cpp: Remove the no longer applicable static comment.
    
    LayoutTests:
    
    Update the test to compute the right coordinates to drag the file to.
    This fixes the problem that onInputFileChange() is not called on
    Leopard.
    
    * fast/files/apply-blob-url-to-img.html:
    * platform/mac/Skipped: Remove the passing test from Skipped list.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67503 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 04dbce7..053d52f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-14  Jian Li  <jianli at chromium.org>
+
+        Reviewed by David Levin.
+
+        fast/files/apply-blob-url-to-img.html timeout on Leopard
+        https://bugs.webkit.org/show_bug.cgi?id=45576
+
+        Update the test to compute the right coordinates to drag the file to.
+        This fixes the problem that onInputFileChange() is not called on
+        Leopard.
+
+        * fast/files/apply-blob-url-to-img.html:
+        * platform/mac/Skipped: Remove the passing test from Skipped list.
+
 2010-09-14  Victor Wang  <victorw at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/LayoutTests/fast/files/apply-blob-url-to-img.html b/LayoutTests/fast/files/apply-blob-url-to-img.html
index e81a95f..8654d3d 100644
--- a/LayoutTests/fast/files/apply-blob-url-to-img.html
+++ b/LayoutTests/fast/files/apply-blob-url-to-img.html
@@ -29,10 +29,18 @@ function onImgLoad()
         layoutTestController.notifyDone();
 }
 
+function moveMouseToCenterOfElement(element)
+{
+    var centerX = element.offsetLeft + element.offsetWidth / 2;
+    var centerY = element.offsetTop + element.offsetHeight / 2;
+    eventSender.mouseMoveTo(centerX, centerY);
+}
+
 function runTests()
 {
     eventSender.beginDragWithFiles(['resources/abe.png']);
-    eventSender.mouseMoveTo(10, 10);
+    var fileInput = document.getElementById('file');
+    moveMouseToCenterOfElement(fileInput);
     eventSender.mouseUp();
 }
 
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index b8ca528..eb69a52 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -300,10 +300,6 @@ inspector/dom-breakpoints.html
 # https://bugs.webkit.org/show_bug.cgi?id=43960
 scrollbars/custom-scrollbar-with-incomplete-style.html
 
-# Timeout on Leopard only.
-# https://bugs.webkit.org/show_bug.cgi?id=45576
-fast/files/apply-blob-url-to-img.html
-
 # Crash due to r66850.
 # https://bugs.webkit.org/show_bug.cgi?id=45575
 fast/files/workers
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6519106..2f333fe 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,31 @@
+2010-09-14  Jian Li  <jianli at chromium.org>
+
+        Reviewed by David Levin.
+
+        fast/files/apply-blob-url-to-img.html timeout on Leopard
+        https://bugs.webkit.org/show_bug.cgi?id=45576
+
+        The failure on Leopard is caused by the static method
+        ResourceHandle::supportsBufferedData that returns true to indicate that
+        the buffered data support is enabled for blob resource. However,
+        BlobResourceHandle does not support this and we need to override this.
+
+        The fix is to change supportsBufferedData method from static to virtual
+        so that we can override the default behavior in BlobResourceHandle.
+
+        * fileapi/ThreadableBlobRegistry.cpp: Copy BlobData to make it cross-thread. 
+        (WebCore::BlobRegistryContext::BlobRegistryContext):
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::resourceData):
+        (WebCore::ResourceLoader::addData):
+        * platform/network/BlobResourceHandle.cpp:
+        (WebCore::BlobResourceHandle::supportsBufferedData): Override the default
+        behavior.
+        * platform/network/BlobResourceHandle.h:
+        * platform/network/ResourceHandle.h: Made supportsBufferedData virtual.
+        * platform/network/mac/ResourceHandleMac.mm:
+        (WebCore::ResourceHandle::bufferedData):
+
 2010-09-14  Brent Fulgham  <bfulgham at webkit.org>
 
         Build correction, no review.
diff --git a/WebCore/fileapi/ThreadableBlobRegistry.cpp b/WebCore/fileapi/ThreadableBlobRegistry.cpp
index 7e0745f..f74c680 100644
--- a/WebCore/fileapi/ThreadableBlobRegistry.cpp
+++ b/WebCore/fileapi/ThreadableBlobRegistry.cpp
@@ -41,7 +41,7 @@ namespace WebCore {
 struct BlobRegistryContext {
     BlobRegistryContext(const KURL& url, PassOwnPtr<BlobData> blobData)
         : url(url.copy())
-        , blobData(blobData)
+        , blobData(blobData->copy())
     {
     }
 
diff --git a/WebCore/loader/ResourceLoader.cpp b/WebCore/loader/ResourceLoader.cpp
index e1d331e..5e770cb 100644
--- a/WebCore/loader/ResourceLoader.cpp
+++ b/WebCore/loader/ResourceLoader.cpp
@@ -51,7 +51,7 @@ PassRefPtr<SharedBuffer> ResourceLoader::resourceData()
     if (m_resourceData)
         return m_resourceData;
 
-    if (ResourceHandle::supportsBufferedData() && m_handle)
+    if (m_handle && m_handle->supportsBufferedData())
         return m_handle->bufferedData();
     
     return 0;
@@ -188,7 +188,7 @@ void ResourceLoader::addData(const char* data, int length, bool allAtOnce)
         return;
     }
         
-    if (ResourceHandle::supportsBufferedData()) {
+    if (m_handle && m_handle->supportsBufferedData()) {
         // Buffer data only if the connection has handed us the data because is has stopped buffering it.
         if (m_resourceData)
             m_resourceData->append(data, length);
diff --git a/WebCore/platform/network/BlobResourceHandle.cpp b/WebCore/platform/network/BlobResourceHandle.cpp
index 8767b55..e6d3294 100644
--- a/WebCore/platform/network/BlobResourceHandle.cpp
+++ b/WebCore/platform/network/BlobResourceHandle.cpp
@@ -189,6 +189,11 @@ void BlobResourceHandle::cancel()
     m_aborted = true;
 }
 
+bool BlobResourceHandle::supportsBufferedData()
+{
+    return false;
+}
+
 void BlobResourceHandle::start()
 {
     // Do not continue if the request is aborted or an error occurs.
diff --git a/WebCore/platform/network/BlobResourceHandle.h b/WebCore/platform/network/BlobResourceHandle.h
index 63e8578..df99cc5 100644
--- a/WebCore/platform/network/BlobResourceHandle.h
+++ b/WebCore/platform/network/BlobResourceHandle.h
@@ -64,6 +64,7 @@ public:
 
     // ResourceHandle methods.
     virtual void cancel();
+    virtual bool supportsBufferedData();
 
     void start();
     int readSync(char*, int);
diff --git a/WebCore/platform/network/ResourceHandle.h b/WebCore/platform/network/ResourceHandle.h
index 17d1472..c8102fb 100644
--- a/WebCore/platform/network/ResourceHandle.h
+++ b/WebCore/platform/network/ResourceHandle.h
@@ -160,7 +160,7 @@ public:
 #endif
 
     PassRefPtr<SharedBuffer> bufferedData();
-    static bool supportsBufferedData();
+    virtual bool supportsBufferedData();
 
     bool shouldContentSniff() const;
     static bool shouldContentSniffURL(const KURL&);
diff --git a/WebCore/platform/network/mac/ResourceHandleMac.mm b/WebCore/platform/network/mac/ResourceHandleMac.mm
index 6db9350..c0c18ad 100644
--- a/WebCore/platform/network/mac/ResourceHandleMac.mm
+++ b/WebCore/platform/network/mac/ResourceHandleMac.mm
@@ -410,7 +410,7 @@ bool ResourceHandle::supportsBufferedData()
 
 PassRefPtr<SharedBuffer> ResourceHandle::bufferedData()
 {
-    if (ResourceHandle::supportsBufferedData())
+    if (supportsBufferedData())
         return SharedBuffer::wrapNSData([d->m_connection.get() _bufferedData]);
 
     return 0;
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 486c6e3..37b2f9e 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,12 @@
+2010-09-14  Jian Li  <jianli at chromium.org>
+
+        Reviewed by David Levin.
+
+        fast/files/apply-blob-url-to-img.html timeout on Leopard
+        https://bugs.webkit.org/show_bug.cgi?id=45576
+
+        * src/ResourceHandle.cpp: Remove the no longer applicable static comment.
+
 2010-09-14  Chris Guillory   <chris.guillory at google.com>
 
         Reviewed by Chris Fleizach.
diff --git a/WebKit/chromium/src/ResourceHandle.cpp b/WebKit/chromium/src/ResourceHandle.cpp
index 27bfe7f..77bd2e9 100644
--- a/WebKit/chromium/src/ResourceHandle.cpp
+++ b/WebKit/chromium/src/ResourceHandle.cpp
@@ -281,7 +281,6 @@ bool ResourceHandle::loadsBlocked()
     return false;  // This seems to be related to sync XMLHttpRequest...
 }
 
-// static
 bool ResourceHandle::supportsBufferedData()
 {
     return false;  // The loader will buffer manually if it needs to.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list