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

eric at webkit.org eric at webkit.org
Wed Dec 22 11:49:14 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f93961560d726fd70b23b0633145a36385e74edb
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Aug 8 06:19:48 2010 +0000

    2010-08-07  Mihai Parparita  <mihaip at chromium.org>
    
            Reviewed by Adam Barth.
    
            WebTiming does not take page cache into account
            https://bugs.webkit.org/show_bug.cgi?id=42772
    
            Adds tests that simulates flow from a page that's in the page cache to
            one that's not, and then back to the page cached page (where the
            DocumentLoader is reused, but we should have a new DocumentLoadTiming
            struct).
    
            * fast/events/onunload-back-to-page-cache-expected.txt: Added.
            * fast/events/onunload-back-to-page-cache.html: Added.
    2010-08-07  Mihai Parparita  <mihaip at chromium.org>
    
            Reviewed by Adam Barth.
    
            WebTiming does not take page cache into account
            https://bugs.webkit.org/show_bug.cgi?id=42772
    
            When restoring a page from the page cache, reset its DocumentLoadTiming
            struct and record navigationStart.
    
            Test: fast/events/onunload-back-to-page-cache.html
    
            * loader/DocumentLoadTiming.h: removed Noncopyable, since it's just a simple struct.
            * loader/DocumentLoader.h:
            (WebCore::DocumentLoader::resetTiming): Added method.
            * loader/FrameLoader.cpp:
            (WebCore::FrameLoader::stopLoading): Uncommented assert.
            (WebCore::FrameLoader::loadProvisionalItemFromCachedPage): Added resetTiming() call.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64939 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b504404..b34ecb1 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-07  Mihai Parparita  <mihaip at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        WebTiming does not take page cache into account
+        https://bugs.webkit.org/show_bug.cgi?id=42772
+        
+        Adds tests that simulates flow from a page that's in the page cache to
+        one that's not, and then back to the page cached page (where the
+        DocumentLoader is reused, but we should have a new DocumentLoadTiming
+        struct).
+
+        * fast/events/onunload-back-to-page-cache-expected.txt: Added.
+        * fast/events/onunload-back-to-page-cache.html: Added.
+
 2010-08-07  Sam Weinig  <sam at webkit.org>
 
         Reviewed by Maciej Stachowiak.
diff --git a/LayoutTests/fast/events/onunload-back-to-page-cache-expected.txt b/LayoutTests/fast/events/onunload-back-to-page-cache-expected.txt
new file mode 100644
index 0000000..dbd38a3
--- /dev/null
+++ b/LayoutTests/fast/events/onunload-back-to-page-cache-expected.txt
@@ -0,0 +1,10 @@
+main frame "navigated" - has 1 onunload handler(s)
+Simulates flow from a page that's in the page cache to one that's not, and then back to the page cached page.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/events/onunload-back-to-page-cache.html b/LayoutTests/fast/events/onunload-back-to-page-cache.html
new file mode 100644
index 0000000..b5dadc4
--- /dev/null
+++ b/LayoutTests/fast/events/onunload-back-to-page-cache.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/onunload-back-to-page-cache.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/events/script-tests/onunload-back-to-page-cache.js b/LayoutTests/fast/events/script-tests/onunload-back-to-page-cache.js
new file mode 100644
index 0000000..5ff0c89
--- /dev/null
+++ b/LayoutTests/fast/events/script-tests/onunload-back-to-page-cache.js
@@ -0,0 +1,15 @@
+description('Simulates flow from a page that\'s in the page cache to one that\'s not, and then back to the page cached page.');
+
+onpageshow = function(event) {
+    if (window.name == 'navigated') {
+        finishJSTest();
+    } else {
+        if (window.layoutTestController)
+            layoutTestController.overridePreference('WebKitUsesPageCachePreferenceKey', 1);
+        window.name = 'navigated';
+        setTimeout(function() {location.href = 'data:text/html,<script>onunload=function() {},onload=function(){history.back();}<' + '/script>';}, 0);
+    }
+}
+
+var jsTestIsAsync = true;
+var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 883933c..bf6eaf1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-08-07  Mihai Parparita  <mihaip at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        WebTiming does not take page cache into account
+        https://bugs.webkit.org/show_bug.cgi?id=42772
+
+        When restoring a page from the page cache, reset its DocumentLoadTiming
+        struct and record navigationStart.
+    
+        Test: fast/events/onunload-back-to-page-cache.html
+
+        * loader/DocumentLoadTiming.h: removed Noncopyable, since it's just a simple struct.
+        * loader/DocumentLoader.h:
+        (WebCore::DocumentLoader::resetTiming): Added method.
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::stopLoading): Uncommented assert.
+        (WebCore::FrameLoader::loadProvisionalItemFromCachedPage): Added resetTiming() call.
+
 2010-08-07  Zoltan Horvath  <zoltan at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/loader/DocumentLoadTiming.h b/WebCore/loader/DocumentLoadTiming.h
index 71a1dc4..2d4b0fa 100644
--- a/WebCore/loader/DocumentLoadTiming.h
+++ b/WebCore/loader/DocumentLoadTiming.h
@@ -26,11 +26,9 @@
 #ifndef DocumentLoadTiming_h
 #define DocumentLoadTiming_h
 
-#include <wtf/Noncopyable.h>
-
 namespace WebCore {
 
-struct DocumentLoadTiming : public Noncopyable {
+struct DocumentLoadTiming {
     DocumentLoadTiming()
         : navigationStart(0.0)
         , unloadEventEnd(0.0)
diff --git a/WebCore/loader/DocumentLoader.h b/WebCore/loader/DocumentLoader.h
index 432baa5..a83e1a3 100644
--- a/WebCore/loader/DocumentLoader.h
+++ b/WebCore/loader/DocumentLoader.h
@@ -207,6 +207,7 @@ namespace WebCore {
         void takeMemoryCacheLoadsForClientNotification(Vector<String>& loads);
 
         DocumentLoadTiming* timing() { return &m_documentLoadTiming; }
+        void resetTiming() { m_documentLoadTiming = DocumentLoadTiming(); }
 
 #if ENABLE(OFFLINE_WEB_APPLICATIONS)
         ApplicationCacheHost* applicationCacheHost() const { return m_applicationCacheHost.get(); }
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index 6888f6c..2206db3 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -453,8 +453,7 @@ void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy, DatabasePolic
                         if (m_provisionalDocumentLoader) {
                             DocumentLoadTiming* timing = m_provisionalDocumentLoader->timing();
                             ASSERT(timing->navigationStart);
-                            // FIXME: This fails in Safari (https://bugs.webkit.org/show_bug.cgi?id=42772). Understand why.
-                            // ASSERT(!timing->unloadEventEnd);
+                            ASSERT(!timing->unloadEventEnd);
                             timing->unloadEventEnd = currentTime();
                             ASSERT(timing->unloadEventEnd >= timing->navigationStart);
                         }
@@ -3144,6 +3143,11 @@ void FrameLoader::loadProvisionalItemFromCachedPage()
     provisionalLoader->prepareForLoadStart();
 
     m_loadingFromCachedPage = true;
+    
+    // Should have timing data from previous time(s) the page was shown.
+    ASSERT(provisionalLoader->timing()->navigationStart);
+    provisionalLoader->resetTiming();
+    provisionalLoader->timing()->navigationStart = currentTime();    
 
     provisionalLoader->setCommitted(true);
     commitProvisionalLoad();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list