[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

tonikitoo at webkit.org tonikitoo at webkit.org
Wed Apr 7 23:43:36 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit e94ac9b029204ee1957e31ed910a5f57810f2f9e
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 16 15:38:19 2009 +0000

    [Qt] Broken back/forward after using ErrorPageExtension to set error page
    https://bugs.webkit.org/show_bug.cgi?id=30573
    
    Reviewed by Antti Koivisto.
    
    WebCore:
    
    Make FrameLoader::checkLoadCompleteForThisFrame method
    to check for any working DocumentLoader instance (through
    activeDocumentLoader()) instead of only checking for
    'm_provisionalDocumentLoader' in order to decide to if
    it is going to reset of not the back and forward history.
    after an error page has been loaded.
    
    Test: LayoutTests/fast/history/back-forward-reset-after-error-handling.html
    
    * loader/FrameLoader.cpp:
    (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
    
    WebKit/qt:
    
    Implemented autotests for covering the back/forward
    reset problem involving error pages.
    
    * tests/qwebpage/tst_qwebpage.cpp:
    (tst_QWebPage::errorPageExtension):
    
    LayoutTests:
    
    Skipped fast/history/back-forward-reset-after-error-handling.html
    in mac, gtk and win DRT, because their DRT do not support yet
    error pages handling.
    
    * fast/history/back-forward-reset-after-error-handling.html:
    * platform/gtk/Skipped:
    * platform/mac/Skipped:
    * platform/win/Skipped:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51038 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c7b1220..0d36b91 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2009-11-14  Antonio Gomes  <tonikitoo at webkit.org>
+
+        Reviewed by Antti Koivisto.
+
+        [Qt] Broken back/forward after using ErrorPageExtension to set error page
+        https://bugs.webkit.org/show_bug.cgi?id=30573
+
+        Skipped fast/history/back-forward-reset-after-error-handling.html
+        in mac, gtk and win DRT, because their DRT do not support yet
+        error pages handling.
+
+        * fast/history/back-forward-reset-after-error-handling.html:
+        * platform/gtk/Skipped:
+        * platform/mac/Skipped:
+        * platform/win/Skipped:
+
 2009-11-16  Kenneth Rohde Christiansen  <kenneth at webkit.org>
 
         Rubberstamped by Simon Hausmann.
diff --git a/LayoutTests/fast/history/back-forward-reset-after-error-handling-expected.txt b/LayoutTests/fast/history/back-forward-reset-after-error-handling-expected.txt
new file mode 100644
index 0000000..df91c8e
--- /dev/null
+++ b/LayoutTests/fast/history/back-forward-reset-after-error-handling-expected.txt
@@ -0,0 +1,6 @@
+SUCCESS
+
+============== Back Forward List ==============
+curr->  (file test):fast/history/back-forward-reset-after-error-handling.html  **nav target**
+        (file test):fast/history/non-existent.html  **nav target**
+===============================================
diff --git a/LayoutTests/fast/history/back-forward-reset-after-error-handling.html b/LayoutTests/fast/history/back-forward-reset-after-error-handling.html
new file mode 100644
index 0000000..7f26c2c
--- /dev/null
+++ b/LayoutTests/fast/history/back-forward-reset-after-error-handling.html
@@ -0,0 +1,48 @@
+<html>
+    <script>
+    // Pre-conditions
+    // - Error page handling is supported on DRT.
+
+    // Navigation steps:
+    // 1- loads this page.
+    // 2- loads a non-existent page (an error page is loaded).
+    // 4- executes a back, forward and back navigations.
+
+    // Expected results:
+    // - forward-list should comprise the non-existent loaded page(2).
+
+    var isOkToContinue = "                                  "+
+    "{                                                      "+
+    "    var console = document.getElementById('console');  "+
+    "    if (console != null)                               "+
+    "        console.innerHTML = 'SUCCESS';                 "+
+    "    else                                               "+
+    "        console.innerHTML = 'FAIL';                    "+
+    "}";
+
+    if (window.layoutTestController) {
+        layoutTestController.dumpAsText();
+        layoutTestController.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
+        layoutTestController.handleErrorPages();
+        layoutTestController.dumpBackForwardList();
+    }
+
+    function onPageShow(evt)
+    {
+        if (!evt.persisted) {
+            // this is the first time the page has been loaded, then setup the
+            // to-be-tested scenario.
+            layoutTestController.queueLoad("./non-existent.html");
+            layoutTestController.queueBackNavigation(1);
+            layoutTestController.queueForwardNavigation(1);
+            layoutTestController.queueBackNavigation(1);
+            layoutTestController.queueNonLoadingScript("eval(\"" + isOkToContinue + "\")");
+        }
+    }
+
+    window.onpageshow = onPageShow;
+    </script>
+    <body>
+        <h1 id='console'/>
+    </body>
+</html>
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index c77be77..337d721 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5673,3 +5673,6 @@ http/tests/xmlhttprequest/interactive-state.html
 # New test infrastructure required
 # See https://bugs.webkit.org/show_bug.cgi?id=31508
 http/tests/security/isolatedWorld/didClearWindowObject.html
+
+# Need to add functionality to DumpRenderTree to handle error pages
+fast/history/back-forward-reset-after-error-handling.html
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index 18b6421..73a4436 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -98,3 +98,6 @@ fast/ruby
 
 # Accessibility tests without results
 accessibility/document-attributes.html
+
+# Need to add functionality to DumpRenderTree to handle error pages
+fast/history/back-forward-reset-after-error-handling.html
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index 011ab5e..aa1fde1 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -699,3 +699,6 @@ inspector/timeline-paint.html
 # WebSocket server doesn't start on Windows.
 # https://bugs.webkit.org/show_bug.cgi?id=31479
 websocket
+
+# Need to add functionality to DumpRenderTree to handle error pages
+fast/history/back-forward-reset-after-error-handling.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a64c143..076a5d6 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2009-11-14  Antonio Gomes  <tonikitoo at webkit.org>
+
+        Reviewed by Antti Koivisto.
+
+        [Qt] Broken back/forward after using ErrorPageExtension to set error page
+        https://bugs.webkit.org/show_bug.cgi?id=30573
+
+        Make FrameLoader::checkLoadCompleteForThisFrame method
+        to check for any working DocumentLoader instance (through
+        activeDocumentLoader()) instead of only checking for
+        'm_provisionalDocumentLoader' in order to decide to if
+        it is going to reset of not the back and forward history.
+        after an error page has been loaded.
+
+        Test: LayoutTests/fast/history/back-forward-reset-after-error-handling.html
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
+
 2009-11-14  Chris Fleizach  <cfleizach at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index dc1e1aa..eaca42c 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -2892,8 +2892,8 @@ void FrameLoader::checkLoadCompleteForThisFrame()
                 // delegate callback.
                 if (pdl == m_provisionalDocumentLoader)
                     clearProvisionalLoad();
-                else if (m_provisionalDocumentLoader) {
-                    KURL unreachableURL = m_provisionalDocumentLoader->unreachableURL();
+                else if (activeDocumentLoader()) {
+                    KURL unreachableURL = activeDocumentLoader()->unreachableURL();
                     if (!unreachableURL.isEmpty() && unreachableURL == pdl->request().url())
                         shouldReset = false;
                 }
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index d64ceda..8152c3d 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,16 @@
+2009-11-14  Antonio Gomes  <tonikitoo at webkit.org>
+
+        Reviewed by Antti Koivisto.
+
+        [Qt] Broken back/forward after using ErrorPageExtension to set error page
+        https://bugs.webkit.org/show_bug.cgi?id=30573
+
+        Implemented autotests for covering the back/forward
+        reset problem involving error pages.
+
+        * tests/qwebpage/tst_qwebpage.cpp:
+        (tst_QWebPage::errorPageExtension):
+
 2009-11-13  Adam Roben  <aroben at apple.com>
 
         Update for changes to FrameLoaderClient
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 777c454..090379c 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -1657,6 +1657,22 @@ void tst_QWebPage::errorPageExtension()
     QCOMPARE(page->history()->canGoBack(), true);
     QCOMPARE(page->history()->canGoForward(), false);
 
+    page->triggerAction(QWebPage::Back);
+    QTest::qWait(2000);
+    QCOMPARE(page->history()->canGoBack(), false);
+    QCOMPARE(page->history()->canGoForward(), true);
+
+    page->triggerAction(QWebPage::Forward);
+    QTest::qWait(2000);
+    QCOMPARE(page->history()->canGoBack(), true);
+    QCOMPARE(page->history()->canGoForward(), false);
+
+    page->triggerAction(QWebPage::Back);
+    QTest::qWait(2000);
+    QCOMPARE(page->history()->canGoBack(), false);
+    QCOMPARE(page->history()->canGoForward(), true);
+    QCOMPARE(page->history()->currentItem().url(), QUrl("qrc:///frametest/index.html"));
+
     m_view->setPage(0);
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list