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

tony at chromium.org tony at chromium.org
Wed Dec 22 13:29:27 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ccb24c6b271c51e71029225286fa277274bac2b9
Author: tony at chromium.org <tony at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 16 22:45:52 2010 +0000

    2010-09-15  Tony Chang  <tony at chromium.org>
    
            Reviewed by Kent Tamura.
    
            [Chromium] Needs DRT queueLoadHTMLString and setDeferMainResourceLoad-implementations
            https://bugs.webkit.org/show_bug.cgi?id=42151
    
            * platform/chromium/test_expectations.txt:
    2010-09-15  Tony Chang  <tony at chromium.org>
    
            Reviewed by Kent Tamura.
    
            [Chromium] Needs DRT queueLoadHTMLString and setDeferMainResourceLoad-implementations
            https://bugs.webkit.org/show_bug.cgi?id=42151
    
            * public/WebDataSource.h:
            * src/WebDataSourceImpl.cpp:
            (WebKit::WebDataSourceImpl::applicationCacheHost):
            (WebKit::WebDataSourceImpl::setDeferMainResourceDataLoad): Added so DRT can set this flag before a load.
            * src/WebDataSourceImpl.h:
    2010-09-15  Tony Chang  <tony at chromium.org>
    
            Reviewed by Kent Tamura.
    
            [Chromium] Needs DRT queueLoadHTMLString and setDeferMainResourceLoad-implementations
            https://bugs.webkit.org/show_bug.cgi?id=42151
    
            * DumpRenderTree/chromium/LayoutTestController.cpp:
            (LayoutTestController::LayoutTestController):
            (WorkItemLoadHTMLString::WorkItemLoadHTMLString):
            (WorkItemLoadHTMLString::run):
            (LayoutTestController::queueLoadHTMLString):
            (LayoutTestController::reset):
            (LayoutTestController::setDeferMainResourceDataLoad):
            * DumpRenderTree/chromium/LayoutTestController.h:
            (LayoutTestController::deferMainResourceDataLoad):
            * DumpRenderTree/chromium/WebViewHost.cpp:
            (WebViewHost::didCreateDataSource):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67676 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 87191ca..37d7451 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-09-15  Tony Chang  <tony at chromium.org>
+
+        Reviewed by Kent Tamura.
+
+        [Chromium] Needs DRT queueLoadHTMLString and setDeferMainResourceLoad-implementations
+        https://bugs.webkit.org/show_bug.cgi?id=42151
+
+        * platform/chromium/test_expectations.txt:
+
 2010-09-16  Zhenyao Mo  <zmo at google.com>
 
         Unreviewed.
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index 64c81c1..3044787 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -213,9 +213,8 @@ WONTFIX SKIP : java/lc3 = TEXT
 // TODO: move to platform/chromium-linux/.
 WONTFIX SKIP MAC WIN : platform/chromium/fast/text/chromium-linux-fontconfig-renderstyle.html = FAIL
 
-// Needs DRT queueLoadHTMLString and setDeferMainResourceLoad-implementations
-// See: https://bugs.webkit.org/show_bug.cgi?id=42151
-BUGWK42151 SKIP : fast/loader/non-deferred-substitute-load.html = FAIL
+// Passes with DRT, fails in test_shell.
+BUGWK42151 : fast/loader/non-deferred-substitute-load.html = TEXT PASS
 
 // -----------------------------------------------------------------
 // WONTFIX TESTS
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index a39083f..9ef6fe3 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,16 @@
+2010-09-15  Tony Chang  <tony at chromium.org>
+
+        Reviewed by Kent Tamura.
+
+        [Chromium] Needs DRT queueLoadHTMLString and setDeferMainResourceLoad-implementations
+        https://bugs.webkit.org/show_bug.cgi?id=42151
+
+        * public/WebDataSource.h:
+        * src/WebDataSourceImpl.cpp:
+        (WebKit::WebDataSourceImpl::applicationCacheHost):
+        (WebKit::WebDataSourceImpl::setDeferMainResourceDataLoad): Added so DRT can set this flag before a load.
+        * src/WebDataSourceImpl.h:
+
 2010-09-16  Kenneth Russell  <kbr at google.com>
 
         Reviewed by James Robinson.
diff --git a/WebKit/chromium/public/WebDataSource.h b/WebKit/chromium/public/WebDataSource.h
index 1aa7a98..1a8c270 100644
--- a/WebKit/chromium/public/WebDataSource.h
+++ b/WebKit/chromium/public/WebDataSource.h
@@ -95,6 +95,10 @@ public:
     // The application cache host associated with this datasource.
     virtual WebApplicationCacheHost* applicationCacheHost() = 0;
 
+    // Set deferMainResourceDataLoad flag on the loader.  This is used for
+    // testing.
+    virtual void setDeferMainResourceDataLoad(bool) = 0;
+
 protected:
     ~WebDataSource() { }
 };
diff --git a/WebKit/chromium/src/WebDataSourceImpl.cpp b/WebKit/chromium/src/WebDataSourceImpl.cpp
index ac2a02d..d5b1d79 100644
--- a/WebKit/chromium/src/WebDataSourceImpl.cpp
+++ b/WebKit/chromium/src/WebDataSourceImpl.cpp
@@ -109,7 +109,8 @@ void WebDataSourceImpl::setExtraData(ExtraData* extraData)
     m_extraData.set(extraData);
 }
 
-WebApplicationCacheHost* WebDataSourceImpl::applicationCacheHost() {
+WebApplicationCacheHost* WebDataSourceImpl::applicationCacheHost()
+{
 #if ENABLE(OFFLINE_WEB_APPLICATIONS)
     return ApplicationCacheHostInternal::toWebApplicationCacheHost(DocumentLoader::applicationCacheHost());
 #else
@@ -117,6 +118,11 @@ WebApplicationCacheHost* WebDataSourceImpl::applicationCacheHost() {
 #endif
 }
 
+void WebDataSourceImpl::setDeferMainResourceDataLoad(bool defer)
+{
+    DocumentLoader::setDeferMainResourceDataLoad(defer);
+}
+
 WebNavigationType WebDataSourceImpl::toWebNavigationType(NavigationType type)
 {
     switch (type) {
diff --git a/WebKit/chromium/src/WebDataSourceImpl.h b/WebKit/chromium/src/WebDataSourceImpl.h
index be32217..05329ff 100644
--- a/WebKit/chromium/src/WebDataSourceImpl.h
+++ b/WebKit/chromium/src/WebDataSourceImpl.h
@@ -68,6 +68,7 @@ public:
     virtual ExtraData* extraData() const;
     virtual void setExtraData(ExtraData*);
     virtual WebApplicationCacheHost* applicationCacheHost();
+    virtual void setDeferMainResourceDataLoad(bool);
 
     static WebNavigationType toWebNavigationType(WebCore::NavigationType type);
 
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 0e43572..039dc01 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,22 @@
+2010-09-15  Tony Chang  <tony at chromium.org>
+
+        Reviewed by Kent Tamura.
+
+        [Chromium] Needs DRT queueLoadHTMLString and setDeferMainResourceLoad-implementations
+        https://bugs.webkit.org/show_bug.cgi?id=42151
+
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::LayoutTestController):
+        (WorkItemLoadHTMLString::WorkItemLoadHTMLString):
+        (WorkItemLoadHTMLString::run):
+        (LayoutTestController::queueLoadHTMLString):
+        (LayoutTestController::reset):
+        (LayoutTestController::setDeferMainResourceDataLoad):
+        * DumpRenderTree/chromium/LayoutTestController.h:
+        (LayoutTestController::deferMainResourceDataLoad):
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+        (WebViewHost::didCreateDataSource):
+
 2010-09-16  Adrienne Walker  <enne at google.com>
 
         Reviewed by Kenneth Russell.
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
index dd8134b..5d38167 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -38,6 +38,7 @@
 #include "public/WebAnimationController.h"
 #include "public/WebBindings.h"
 #include "public/WebConsoleMessage.h"
+#include "public/WebData.h"
 #include "public/WebDeviceOrientation.h"
 #include "public/WebDeviceOrientationClientMock.h"
 #include "public/WebDocument.h"
@@ -119,6 +120,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
     bindMethod("queueForwardNavigation", &LayoutTestController::queueForwardNavigation);
     bindMethod("queueLoadingScript", &LayoutTestController::queueLoadingScript);
     bindMethod("queueLoad", &LayoutTestController::queueLoad);
+    bindMethod("queueLoadHTMLString", &LayoutTestController::queueLoadHTMLString);
     bindMethod("queueNonLoadingScript", &LayoutTestController::queueNonLoadingScript);
     bindMethod("queueReload", &LayoutTestController::queueReload);
     bindMethod("removeOriginAccessWhitelistEntry", &LayoutTestController::removeOriginAccessWhitelistEntry);
@@ -133,6 +135,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
     bindMethod("setCloseRemainingWindowsWhenComplete", &LayoutTestController::setCloseRemainingWindowsWhenComplete);
     bindMethod("setCustomPolicyDelegate", &LayoutTestController::setCustomPolicyDelegate);
     bindMethod("setDatabaseQuota", &LayoutTestController::setDatabaseQuota);
+    bindMethod("setDeferMainResourceDataLoad", &LayoutTestController::setDeferMainResourceDataLoad);
     bindMethod("setDomainRelaxationForbiddenForURLScheme", &LayoutTestController::setDomainRelaxationForbiddenForURLScheme);
     bindMethod("setEditingBehavior", &LayoutTestController::setEditingBehavior);
     bindMethod("setGeolocationPermission", &LayoutTestController::setGeolocationPermission);
@@ -463,6 +466,34 @@ void LayoutTestController::queueLoad(const CppArgumentList& arguments, CppVarian
     result->setNull();
 }
 
+class WorkItemLoadHTMLString : public LayoutTestController::WorkItem  {
+public:
+    WorkItemLoadHTMLString(const std::string& html, const WebURL& baseURL)
+        : m_html(html)
+        , m_baseURL(baseURL) {}
+    bool run(TestShell* shell)
+    {
+        shell->webView()->mainFrame()->loadHTMLString(
+            WebKit::WebData(m_html.data(), m_html.length()), m_baseURL);
+        return true;
+    }
+private:
+    std::string m_html;
+    WebURL m_baseURL;
+};
+
+void LayoutTestController::queueLoadHTMLString(const CppArgumentList& arguments, CppVariant* result)
+{
+    if (arguments.size() > 0 && arguments[0].isString()) {
+        string html = arguments[0].toString();
+        WebURL baseURL;
+        if (arguments.size() > 1 && arguments[1].isString())
+            baseURL = WebURL(GURL(arguments[1].toString()));
+        m_workQueue.addWork(new WorkItemLoadHTMLString(html, baseURL));
+    }
+    result->setNull();
+}
+
 void LayoutTestController::objCIdentityIsEqual(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() < 2) {
@@ -504,6 +535,7 @@ void LayoutTestController::reset()
     m_sweepHorizontally = false;
     m_shouldAddFileToPasteboard = false;
     m_stopProvisionalFrameLoads = false;
+    m_deferMainResourceDataLoad = true;
     m_globalFlag.set(false);
     m_webHistoryItemCount.set(0);
     m_userStyleSheetLocation = WebURL();
@@ -967,6 +999,11 @@ void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(const CppArg
     m_shell->webView()->setDomainRelaxationForbidden(cppVariantToBool(arguments[0]), cppVariantToWebString(arguments[1]));
 }
 
+void LayoutTestController::setDeferMainResourceDataLoad(const CppArgumentList& arguments, CppVariant* result)
+{
+    if (arguments.size() == 1)
+        m_deferMainResourceDataLoad = cppVariantToBool(arguments[0]);
+}
 
 //
 // Unimplemented stubs
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
index 8cfa260..ec2503f 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
@@ -139,6 +139,7 @@ public:
     void queueLoadingScript(const CppArgumentList&, CppVariant*);
     void queueNonLoadingScript(const CppArgumentList&, CppVariant*);
     void queueLoad(const CppArgumentList&, CppVariant*);
+    void queueLoadHTMLString(const CppArgumentList&, CppVariant*);
 
     // Although this is named "objC" to match the Mac version, it actually tests
     // the identity of its two arguments in C++.
@@ -232,6 +233,7 @@ public:
     void simulateDesktopNotificationClick(const CppArgumentList&, CppVariant*);
 
     void setDomainRelaxationForbiddenForURLScheme(const CppArgumentList&, CppVariant*);
+    void setDeferMainResourceDataLoad(const CppArgumentList&, CppVariant*);
     void setEditingBehavior(const CppArgumentList&, CppVariant*);
 
     // The following are only stubs.  TODO(pamg): Implement any of these that
@@ -348,6 +350,7 @@ public:
     bool canOpenWindows() { return m_canOpenWindows; }
     bool shouldAddFileToPasteboard() { return m_shouldAddFileToPasteboard; }
     bool stopProvisionalFrameLoads() { return m_stopProvisionalFrameLoads; }
+    bool deferMainResourceDataLoad() { return m_deferMainResourceDataLoad; }
 
     bool testRepaint() const { return m_testRepaint; }
     bool sweepHorizontally() const { return m_sweepHorizontally; }
@@ -514,6 +517,9 @@ private:
     // If true, don't dump output until notifyDone is called.
     bool m_waitUntilDone;
 
+    // If false, all new requests will not defer the main resource data load.
+    bool m_deferMainResourceDataLoad;
+
     WorkQueue m_workQueue;
 
     CppVariant m_globalFlag;
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
index 8ec43d8..9a086e4 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -790,6 +790,8 @@ void WebViewHost::didCancelClientRedirect(WebFrame* frame)
 void WebViewHost::didCreateDataSource(WebFrame*, WebDataSource* ds)
 {
     ds->setExtraData(m_pendingExtraData.leakPtr());
+    if (!layoutTestController()->deferMainResourceDataLoad())
+        ds->setDeferMainResourceDataLoad(false);
 }
 
 void WebViewHost::didStartProvisionalLoad(WebFrame* frame)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list