2010-07-30 Sheriff Bot <webkit.review.bot@gmail.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 Jul 2010 06:58:51 +0000 (06:58 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 Jul 2010 06:58:51 +0000 (06:58 +0000)
        Unreviewed, rolling out r64408.
        http://trac.webkit.org/changeset/64408
        https://bugs.webkit.org/show_bug.cgi?id=43292

        Causing failed tests on Chromium canaries due to wrong history
        item counts (Requested by atwilson on #webkit).

        * fast/css/target-fragment-match.html:
        * fast/dom/Window/timer-resume-on-navigation-back.html:
        * fast/dom/location-hash.html:
        * fast/events/pageshow-pagehide-on-back-cached-with-frames-expected.txt:
        * fast/events/pageshow-pagehide-on-back-cached-with-frames.html:
        * fast/frames/resources/cached-page-1.html:
        * fast/frames/resources/cached-page-2.html:
        * fast/harness/resources/cached-page-1.html:
        * fast/harness/resources/cached-page-with-data-urls.html:
        * fast/history/gesture-before-onload-expected.txt: Removed.
        * fast/history/gesture-before-onload.html: Removed.
        * fast/history/history-length.html:
        * fast/history/resources/gesture-before-onload-target.html: Removed.
        * fast/history/saves-state-after-fragment-nav.html:
        * fast/loader/input-element-page-cache-crash.html:
        * fast/loader/stateobjects/document-destroyed-navigate-back.html:
        * fast/loader/stateobjects/pushstate-clears-forward-history.html:
        * fast/loader/subframe-navigate-during-main-frame-load.html:
        * http/tests/history/redirect-js-document-location-before-load-expected.txt:
        * http/tests/history/redirect-js-location-assign-before-load-expected.txt:
        * http/tests/history/redirect-js-location-before-load-expected.txt:
        * http/tests/history/redirect-js-location-href-before-load-expected.txt:
        * http/tests/navigation/resources/document-location.js:
        (start):
        * security/autocomplete-cleared-on-back.html:
        * storage/hash-change-with-xhr.js:
        (runTest):
2010-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r64408.
        http://trac.webkit.org/changeset/64408
        https://bugs.webkit.org/show_bug.cgi?id=43292

        Causing failed tests on Chromium canaries due to wrong history
        item counts (Requested by atwilson on #webkit).

        * loader/RedirectScheduler.cpp:
        (WebCore::RedirectScheduler::scheduleRedirect):
        (WebCore::RedirectScheduler::mustLockBackForwardList):
        (WebCore::RedirectScheduler::scheduleLocationChange):
        (WebCore::RedirectScheduler::scheduleFormSubmission):
        * loader/RedirectScheduler.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@64411 268f45cc-cd09-0410-ab3c-d52691b4dbfc

29 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/target-fragment-match.html
LayoutTests/fast/dom/Window/timer-resume-on-navigation-back.html
LayoutTests/fast/dom/location-hash.html
LayoutTests/fast/events/pageshow-pagehide-on-back-cached-with-frames-expected.txt
LayoutTests/fast/events/pageshow-pagehide-on-back-cached-with-frames.html
LayoutTests/fast/frames/resources/cached-page-1.html
LayoutTests/fast/frames/resources/cached-page-2.html
LayoutTests/fast/harness/resources/cached-page-1.html
LayoutTests/fast/harness/resources/cached-page-with-data-urls.html
LayoutTests/fast/history/gesture-before-onload-expected.txt [deleted file]
LayoutTests/fast/history/gesture-before-onload.html [deleted file]
LayoutTests/fast/history/history-length.html
LayoutTests/fast/history/resources/gesture-before-onload-target.html [deleted file]
LayoutTests/fast/history/saves-state-after-fragment-nav.html
LayoutTests/fast/loader/input-element-page-cache-crash.html
LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back.html
LayoutTests/fast/loader/stateobjects/pushstate-clears-forward-history.html
LayoutTests/fast/loader/subframe-navigate-during-main-frame-load.html
LayoutTests/http/tests/history/redirect-js-document-location-before-load-expected.txt
LayoutTests/http/tests/history/redirect-js-location-assign-before-load-expected.txt
LayoutTests/http/tests/history/redirect-js-location-before-load-expected.txt
LayoutTests/http/tests/history/redirect-js-location-href-before-load-expected.txt
LayoutTests/http/tests/navigation/resources/document-location.js
LayoutTests/security/autocomplete-cleared-on-back.html
LayoutTests/storage/hash-change-with-xhr.js
WebCore/ChangeLog
WebCore/loader/RedirectScheduler.cpp
WebCore/loader/RedirectScheduler.h

index cef55c8..81f32b6 100644 (file)
@@ -1,3 +1,40 @@
+2010-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r64408.
+        http://trac.webkit.org/changeset/64408
+        https://bugs.webkit.org/show_bug.cgi?id=43292
+
+        Causing failed tests on Chromium canaries due to wrong history
+        item counts (Requested by atwilson on #webkit).
+
+        * fast/css/target-fragment-match.html:
+        * fast/dom/Window/timer-resume-on-navigation-back.html:
+        * fast/dom/location-hash.html:
+        * fast/events/pageshow-pagehide-on-back-cached-with-frames-expected.txt:
+        * fast/events/pageshow-pagehide-on-back-cached-with-frames.html:
+        * fast/frames/resources/cached-page-1.html:
+        * fast/frames/resources/cached-page-2.html:
+        * fast/harness/resources/cached-page-1.html:
+        * fast/harness/resources/cached-page-with-data-urls.html:
+        * fast/history/gesture-before-onload-expected.txt: Removed.
+        * fast/history/gesture-before-onload.html: Removed.
+        * fast/history/history-length.html:
+        * fast/history/resources/gesture-before-onload-target.html: Removed.
+        * fast/history/saves-state-after-fragment-nav.html:
+        * fast/loader/input-element-page-cache-crash.html:
+        * fast/loader/stateobjects/document-destroyed-navigate-back.html:
+        * fast/loader/stateobjects/pushstate-clears-forward-history.html:
+        * fast/loader/subframe-navigate-during-main-frame-load.html:
+        * http/tests/history/redirect-js-document-location-before-load-expected.txt:
+        * http/tests/history/redirect-js-location-assign-before-load-expected.txt:
+        * http/tests/history/redirect-js-location-before-load-expected.txt:
+        * http/tests/history/redirect-js-location-href-before-load-expected.txt:
+        * http/tests/navigation/resources/document-location.js:
+        (start):
+        * security/autocomplete-cleared-on-back.html:
+        * storage/hash-change-with-xhr.js:
+        (runTest):
+
 2010-07-30  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Darin Adler.
index a2b697f..9e99d47 100644 (file)
@@ -11,12 +11,6 @@ function test()
 {
     if (window.layoutTestController)
         layoutTestController.waitUntilDone();
-
-    // Location changes need to happen outside the onload handler to generate history entries.
-    setTimeout(runTest, 0);
-}
-
-function runTest() {
     window.location.hash ='#target-01';
     document.body.offsetTop;
     window.history.back(); // This queues up a navigation, so we need to delay the call to notifyDone.
index b46fb25..f7ea76b 100644 (file)
@@ -18,12 +18,9 @@ function runTest() {
       layoutTestController.waitUntilDone();
       layoutTestController.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
     }
-    // Location changes need to happen outside the onload handler to generate history entries.
-    setTimeout(function() {
-      window.setTimeout(verify, timeoutValue);
-      timestamp = new Date().getTime();
-      window.location.href = "data:text/html,<body onload='history.back()'></body>";
-    }, 0);
+    window.setTimeout("verify()", timeoutValue);
+    timestamp = new Date().getTime();
+    window.location.href = "data:text/html,<body onload='history.back()'></body>";
 }
 
 </script>
index f580f52..b26e906 100644 (file)
@@ -87,9 +87,8 @@
         numErrors = 0;
         originalLocation = window.location.href;
         originalHistoryLength = window.history.length;
-
-        // Location changes need to happen outside the onload handler to generate history entries.
-        setTimeout(step, 0);
+     
+        step();
     }
     </script>
 </head>
index 94f24e6..1ee69a1 100644 (file)
@@ -1,16 +1,16 @@
-CONSOLE MESSAGE: line 20: ***Top level frame being parsed for the initial page load***
-CONSOLE MESSAGE: line 20: Subsubframe window.onload
-CONSOLE MESSAGE: line 20: Subsubframe window.onpageshow, target = [object HTMLDocument], persisted = false
-CONSOLE MESSAGE: line 20: Subframe window.onload
-CONSOLE MESSAGE: line 20: Subframe window.onpageshow, target = [object HTMLDocument], persisted = false
-CONSOLE MESSAGE: line 20: Main frame window.onload
-CONSOLE MESSAGE: line 20: Main frame window.onpageshow, target = [object HTMLDocument], persisted = false
-CONSOLE MESSAGE: line 20: ***Navigating top-level frame to a page that will immediately navigate back to this one***
-CONSOLE MESSAGE: line 20: Main frame window.onpagehide, target = [object HTMLDocument], persisted = true
-CONSOLE MESSAGE: line 20: Subframe window.onpagehide, target = [object HTMLDocument], persisted = true
-CONSOLE MESSAGE: line 20: Subsubframe window.onpagehide, target = [object HTMLDocument], persisted = true
-CONSOLE MESSAGE: line 20: Subsubframe window.onpageshow, target = [object HTMLDocument], persisted = true
-CONSOLE MESSAGE: line 20: Subframe window.onpageshow, target = [object HTMLDocument], persisted = true
-CONSOLE MESSAGE: line 20: Main frame window.onpageshow, target = [object HTMLDocument], persisted = true
 Test pageshow/pagehide event behavior when navigating away from a page with frames, putting the page in the page cache, then back to it.
+***Top level frame being parsed for the initial page load***
+Subsubframe window.onload
+Subsubframe window.onpageshow, target = [object HTMLDocument], persisted = false
+Subframe window.onload
+Subframe window.onpageshow, target = [object HTMLDocument], persisted = false
+Main frame window.onload
+Main frame window.onpageshow, target = [object HTMLDocument], persisted = false
+***Navigating top-level frame to a page that will immediately navigate back to this one***
+Main frame window.onpagehide, target = [object HTMLDocument], persisted = true
+Subframe window.onpagehide, target = [object HTMLDocument], persisted = true
+Subsubframe window.onpagehide, target = [object HTMLDocument], persisted = true
+Subsubframe window.onpageshow, target = [object HTMLDocument], persisted = true
+Subframe window.onpageshow, target = [object HTMLDocument], persisted = true
+Main frame window.onpageshow, target = [object HTMLDocument], persisted = true
 
index 489c090..72e1658 100644 (file)
@@ -14,10 +14,8 @@ if (window.layoutTestController) {
 
 function log(message)
 {
-    // Logging to the console instead of the "log" DIV in the DOM because
-    // otherwise we trigger the assert mentioned at http://webkit.org/b/43152
-    // (since we log during pagehide)
-    console.log(message);
+    var log = document.getElementById("log");
+    log.innerHTML += message + "\n";
 }
 
 log("***Top level frame being parsed for the initial page load***");
@@ -33,8 +31,7 @@ window.onpageshow = function(evt) {
             layoutTestController.notifyDone();
     } else {
         log("***Navigating top-level frame to a page that will immediately navigate back to this one***");
-        // Location changes need to happen outside the onload handler to generate history entries.
-        setTimeout(function() {window.location.href = "data:text/html,<script>history.back();</scr" + "ipt>";}, 0);
+        window.location.href = "data:text/html,<script>history.back();</scr" + "ipt>";
     }
 }
 
index 2715102..610c8d4 100644 (file)
@@ -17,8 +17,7 @@ function loadNext() {
     intervalId = setInterval(endTest, 100);
 
     window.opener.log("page-1, about to navigate to page-2.")
-    // Location changes need to happen outside the onload handler to generate history entries.
-    setTimeout(function() {location.href = "cached-page-2.html";}, 0);
+    location.href = "cached-page-2.html";
 }
 
 // This unload handler exists just to make sure this page is not added
index b159242..fd4f272 100644 (file)
@@ -19,8 +19,7 @@ function loadNext() {
     intervalId = setInterval(goBack, 20);
 
     window.opener.log("page-2, about to navigate to page-3.")
-    // Location changes need to happen outside the onload handler to generate history entries.
-    setTimeout(function() {location.href = "cached-page-3.html";}, 0);
+    location.href = "cached-page-3.html";
 }
 </script>
 <body onload="loadNext()">
index 0dbfd4d..9b66a65 100755 (executable)
@@ -22,8 +22,7 @@ function loadNext()
     intervalId = setInterval(check, 10);
 
     window.opener.log("page-1, about to navigate to page-2.")
-    // Location changes need to happen outside the onload handler to generate history entries.
-    setTimeout(function() {location.href = "cached-page-2.html";}, 0);
+    location.href = "cached-page-2.html";
 }
 </script>
 <body onload="loadNext()"></body>
index f20ec0b..f85166d 100644 (file)
@@ -18,8 +18,7 @@ function loadNext()
     intervalId = setInterval(check, 10);
 
     window.opener.log("page with data urls, about to navigate to page-2.")
-    // Location changes need to happen outside the onload handler to generate history entries.
-    setTimeout(function() {location.href = "cached-page-2.html";}, 0);
+    location.href = "cached-page-2.html";
 }
 </script>
 <body onload="loadNext()">
diff --git a/LayoutTests/fast/history/gesture-before-onload-expected.txt b/LayoutTests/fast/history/gesture-before-onload-expected.txt
deleted file mode 100644 (file)
index f2a0faf..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-This page is the target of a redirect.
-
-PASS: History item count should be 2 and is.
-
-
-============== Back Forward List ==============
-        (file test):fast/history/gesture-before-onload.html  **nav target**
-curr->  (file test):fast/history/resources/gesture-before-onload-target.html#2  **nav target**
-===============================================
diff --git a/LayoutTests/fast/history/gesture-before-onload.html b/LayoutTests/fast/history/gesture-before-onload.html
deleted file mode 100644 (file)
index 560adcb..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<head>
-</head>
-<body onload="onload()">
-  <button id="nav-button" onclick="nav();">Navigate</button>
-  <div id="manual-explanation" style="display: none; color: blue">When running this test outside of DRT, please click on the "Navigate" button.</div>
-</body>
-<script>
-  if (window.layoutTestController) {
-      layoutTestController.clearBackForwardList();
-      layoutTestController.waitUntilDone();
-  }
-
-  if (window.eventSender) {
-      var navButtonNode = document.getElementById('nav-button');
-      eventSender.mouseMoveTo(
-          navButtonNode.offsetLeft + navButtonNode.offsetWidth / 2,
-          navButtonNode.offsetTop + navButtonNode.offsetHeight / 2);
-      eventSender.mouseDown();
-      eventSender.mouseUp();
-  } else {
-      document.getElementById('manual-explanation').style.display = '';
-  }
-
-  function nav() {
-      window.location.href = 'resources/gesture-before-onload-target.html#2';
-  }
-
-  function onload() {
-      window.console.log('FAIL: Should not have reached onload before navigating away');
-  }
-</script>
-
index 94f507d..4baa7e7 100644 (file)
@@ -8,34 +8,30 @@ onload = function() {
       layoutTestController.waitUntilDone();
     }
   }
-
-  // Location changes need to happen outside the onload handler to generate history entries.
-  setTimeout(function() {
-    // This test advances history by 2 pages, then navigates back one, and
-    // records history.length.  We expect history.length to indicate the total
-    // length of session history.  At the end of the test, it should be 2 greater
-    // than it was at the start of the test.
-    switch (sessionStorage.testStage++) {
-    case 0:
-      sessionStorage.initialLength = history.length;
-      location = "?a";
-      break;
-    case 1:
-      location = "?b";
-      break;
-    case 2:
-      history.back();
-      break;
-    case 3:
-      if (history.length == (sessionStorage.initialLength - 0) + 2)
-        document.body.innerHTML = "PASS";
-      else
-        document.body.innerHTML = "FAIL: initialLength=" + sessionStorage.initialLength + ", history.length=" + history.length;
-      if (window.layoutTestController)
-        layoutTestController.notifyDone();
-      break;
-    }
-  }, 0);
+  // This test advances history by 2 pages, then navigates back one, and
+  // records history.length.  We expect history.length to indicate the total
+  // length of session history.  At the end of the test, it should be 2 greater
+  // than it was at the start of the test.
+  switch (sessionStorage.testStage++) {
+  case 0:
+    sessionStorage.initialLength = history.length;
+    location = "?a";
+    break;
+  case 1:
+    location = "?b";
+    break;
+  case 2:
+    history.back();
+    break;
+  case 3:
+    if (history.length == (sessionStorage.initialLength - 0) + 2)
+      document.body.innerHTML = "PASS";
+    else
+      document.body.innerHTML = "FAIL: initialLength=" + sessionStorage.initialLength + ", history.length=" + history.length;
+    if (window.layoutTestController)
+      layoutTestController.notifyDone();
+    break;
+  }
 }
 onunload = function() {
   // disable page cache
diff --git a/LayoutTests/fast/history/resources/gesture-before-onload-target.html b/LayoutTests/fast/history/resources/gesture-before-onload-target.html
deleted file mode 100644 (file)
index 2f43ec9..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<!-- This page accepts a query string specifying how many history items should
-be present once it finishes loading. -->
-
-<html>
-<head>
-<title>Redirect Target</title>
-
-<script>
-function log(s)
-{
-    document.getElementById("console").appendChild(document.createTextNode(s + "\n"));
-}
-
-function testHistoryItemCount()
-{
-    var expected = parseInt(location.hash.slice(1));
-    var actual = history.length;
-    if (actual === expected)
-        log("PASS: History item count should be " + expected + " and is.");
-    else
-        log("FAIL: History item count should be " + expected + " but instead is " + actual + ".");
-}
-
-window.addEventListener("load", function () {
-    if (window.layoutTestController) {
-        layoutTestController.dumpAsText();
-        testHistoryItemCount();
-        layoutTestController.dumpBackForwardList();
-        layoutTestController.notifyDone();
-    } else {
-        testHistoryItemCount();
-    }
-}, false);
-</script>
-</head>
-
-<body>
-<p>This page is the target of a redirect.</p>
-<pre id="console"></pre>
-</body>
-</html>
index 60dec93..0644df8 100644 (file)
@@ -30,11 +30,8 @@ function runTestStep() {
       layoutTestController.dumpAsText();
       layoutTestController.waitUntilDone();
     }
-    // Location changes need to happen outside the onload handler to generate history entries.
-    setTimeout(function() {
-      navigateToHash(field);
-      navigateAwayAndBack();
-    }, 0);
+    navigateToHash(field);
+    navigateAwayAndBack();
   } else {
     document.body.innerHTML = (field.value == '') ? 'FAIL' : 'PASS';
     if (window.layoutTestController)
index 2493272..ee69355 100644 (file)
@@ -13,9 +13,8 @@ function runTest()
     var input = document.getElementById("testinput");
     input.setAttribute("autocomplete", "on");
     input.parentNode.removeChild(input);
-
-    // Location changes need to happen outside the onload handler to generate history entries.
-    setTimeout(function() {window.location = "data:text/html,<script>history.back();</scrip" + "t>";}, 0);
+    
+    window.location = "data:text/html,<script>history.back();</scrip" + "t>";
 }
 
 function pageHidden()
index edbb1c2..7dca361 100644 (file)
@@ -33,10 +33,9 @@ function runThirdStageOfTest()
 
 function loaded()
 {
-    if (!sessionStorage.stage) {
-        // Location changes need to happen outside the onload handler to generate history entries.
-        setTimeout(runFirstStageOfTest, 0);
-    } else if (sessionStorage.stage == 2)
+    if (!sessionStorage.stage)
+        runFirstStageOfTest();
+    else if (sessionStorage.stage == 2)
         runSecondStageOfTest();
     else if (sessionStorage.stage == 3)
         runThirdStageOfTest();
index bbb4479..b08c5a5 100644 (file)
@@ -8,26 +8,22 @@ onload = function() {
       layoutTestController.waitUntilDone();
     }
   }
-
-  // Location changes need to happen outside the onload handler to generate history entries.
-  setTimeout(function() {
-      switch (sessionStorage.testStage++) {
-      case 0:
-        location = "?a";
-        break;
-      case 1:
-        location = "?b";
-        break;
-      case 2:
-        history.back();
-        break;
-      case 3:
-        history.pushState(null, null);
-        if (window.layoutTestController)
-          layoutTestController.notifyDone();
-        break;
-      }
-    }, 0);
+  switch (sessionStorage.testStage++) {
+  case 0:
+    location = "?a";
+    break;
+  case 1:
+    location = "?b";
+    break;
+  case 2:
+    history.back();
+    break;
+  case 3:
+    history.pushState(null, null);
+    if (window.layoutTestController)
+      layoutTestController.notifyDone();
+    break;
+  }
 }
 onunload = function() {
   // disable page cache
index 2ab12cc..2852381 100644 (file)
@@ -9,9 +9,8 @@ function runTest()
         layoutTestController.dumpBackForwardList();
         layoutTestController.waitUntilDone();
     }
-
-    // Location changes need to happen outside the onload handler to generate history entries.
-    setTimeout(function() {location='resources/subframe-navigate-during-main-frame-load2.html';}, 0);
+    
+    location='resources/subframe-navigate-during-main-frame-load2.html';
 }
 
 </script>
index 062b69b..efbe835 100644 (file)
@@ -1,8 +1,9 @@
 This page is the target of a redirect.
 
-PASS: History item count should be 1 and is.
+FAIL: History item count should be 1 but instead is 2.
 
 
 ============== Back Forward List ==============
+        http://127.0.0.1:8000/history/redirect-js-document-location-before-load.html  **nav target**
 curr->  http://127.0.0.1:8000/history/resources/redirect-target.html#1  **nav target**
 ===============================================
index 062b69b..42a1259 100644 (file)
@@ -1,8 +1,9 @@
 This page is the target of a redirect.
 
-PASS: History item count should be 1 and is.
+FAIL: History item count should be 1 but instead is 2.
 
 
 ============== Back Forward List ==============
+        http://127.0.0.1:8000/history/redirect-js-location-assign-before-load.html  **nav target**
 curr->  http://127.0.0.1:8000/history/resources/redirect-target.html#1  **nav target**
 ===============================================
index 062b69b..b6daf9e 100644 (file)
@@ -1,8 +1,9 @@
 This page is the target of a redirect.
 
-PASS: History item count should be 1 and is.
+FAIL: History item count should be 1 but instead is 2.
 
 
 ============== Back Forward List ==============
+        http://127.0.0.1:8000/history/redirect-js-location-before-load.html  **nav target**
 curr->  http://127.0.0.1:8000/history/resources/redirect-target.html#1  **nav target**
 ===============================================
index 062b69b..3cc9c6b 100644 (file)
@@ -1,8 +1,9 @@
 This page is the target of a redirect.
 
-PASS: History item count should be 1 and is.
+FAIL: History item count should be 1 but instead is 2.
 
 
 ============== Back Forward List ==============
+        http://127.0.0.1:8000/history/redirect-js-location-href-before-load.html  **nav target**
 curr->  http://127.0.0.1:8000/history/resources/redirect-target.html#1  **nav target**
 ===============================================
index a0ab4d8..1db48cd 100644 (file)
@@ -7,8 +7,7 @@ function start() {
       layoutTestController.dumpAsText();
       layoutTestController.waitUntilDone();
 
-      // Location changes need to happen outside the onload handler to generate history entries.
-      setTimeout(runTest, 0);
+      runTest();
     } else {
       // loaded the ?1 navigation
       layoutTestController.notifyDone();
index 96c9d81..0801881 100644 (file)
@@ -19,8 +19,7 @@ function runTest()
     if (!sessionStorage.secondPageReached) {
         document.getElementById("firstInput").value = "SuperSeekritValue";
         document.getElementById("secondInput").value = "SuperSeekritValue";
-        // Location changes need to happen outside the onload handler to generate history entries.
-        setTimeout(function() {window.location = "resources/autocomplete-cleared-on-back2.html";}, 0);
+        window.location = "resources/autocomplete-cleared-on-back2.html";
         return;
     }
     
index 7f56f79..4290681 100644 (file)
@@ -81,12 +81,6 @@ function invokeBack()
 
 function runTest()
 {
-    // Location changes need to happen outside the onload handler to generate history entries.
-    setTimeout(runTestsInner, 0);
-}
-
-function runTestsInner()
-{
     backIterations = 10;
     consecutiveFailures = 0;
     successes = 0;
index 47eb971..f916be3 100644 (file)
@@ -1,3 +1,19 @@
+2010-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r64408.
+        http://trac.webkit.org/changeset/64408
+        https://bugs.webkit.org/show_bug.cgi?id=43292
+
+        Causing failed tests on Chromium canaries due to wrong history
+        item counts (Requested by atwilson on #webkit).
+
+        * loader/RedirectScheduler.cpp:
+        (WebCore::RedirectScheduler::scheduleRedirect):
+        (WebCore::RedirectScheduler::mustLockBackForwardList):
+        (WebCore::RedirectScheduler::scheduleLocationChange):
+        (WebCore::RedirectScheduler::scheduleFormSubmission):
+        * loader/RedirectScheduler.h:
+
 2010-07-30  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Darin Adler.
index d86e226..3cfe61a 100644 (file)
@@ -240,21 +240,17 @@ void RedirectScheduler::scheduleRedirect(double delay, const String& url)
     if (url.isEmpty())
         return;
 
-    // We want a new back forward list item if the refresh timeout is > 1 second.
+    // We want a new history item if the refresh timeout is > 1 second.
     if (!m_redirect || delay <= m_redirect->delay())
         schedule(new ScheduledRedirect(delay, url, true, delay <= 1, false));
 }
 
-bool RedirectScheduler::mustLockBackForwardList(Frame* targetFrame, bool mustLockIfDuringLoad)
+bool RedirectScheduler::mustLockBackForwardList(Frame* targetFrame)
 {
-    // Non-user navigation before the page has loaded should not create a new back/forward item.
-    // See https://webkit.org/b/42861 for the original motivation for this.    
-    if (mustLockIfDuringLoad && targetFrame->loader()->documentLoader() && targetFrame->loader()->documentLoader()->isLoadingInAPISense())
-        return true;
-    
     // Navigation of a subframe during loading of an ancestor frame does not create a new back/forward item.
     // The definition of "during load" is any time before all handlers for the load event have been run.
     // See https://bugs.webkit.org/show_bug.cgi?id=14957 for the original motivation for this.
+
     for (Frame* ancestor = targetFrame->tree()->parent(); ancestor; ancestor = ancestor->tree()->parent()) {
         Document* document = ancestor->document();
         if (!ancestor->loader()->isComplete() || (document && document->processingLoadEvent()))
@@ -270,7 +266,7 @@ void RedirectScheduler::scheduleLocationChange(const String& url, const String&
     if (url.isEmpty())
         return;
 
-    lockBackForwardList = lockBackForwardList || mustLockBackForwardList(m_frame, !wasUserGesture);
+    lockBackForwardList = lockBackForwardList || mustLockBackForwardList(m_frame);
 
     FrameLoader* loader = m_frame->loader();
     
@@ -304,7 +300,7 @@ void RedirectScheduler::scheduleFormSubmission(PassRefPtr<FormSubmission> submis
     // to match IE and Opera.
     // See https://bugs.webkit.org/show_bug.cgi?id=32383 for the original motivation for this.
 
-    bool lockBackForwardList = mustLockBackForwardList(m_frame, false) || (submission->state()->formSubmissionTrigger() == SubmittedByJavaScript && m_frame->tree()->parent());
+    bool lockBackForwardList = mustLockBackForwardList(m_frame) || (submission->state()->formSubmissionTrigger() == SubmittedByJavaScript && m_frame->tree()->parent());
 
     schedule(new ScheduledFormSubmission(submission, lockBackForwardList, duringLoad));
 }
index ddb96e1..e9d04dc 100644 (file)
@@ -70,7 +70,7 @@ private:
     void timerFired(Timer<RedirectScheduler>*);
     void schedule(PassOwnPtr<ScheduledNavigation>);
 
-    static bool mustLockBackForwardList(Frame* targetFrame, bool mustLockIfDuringLoad);
+    static bool mustLockBackForwardList(Frame* targetFrame);
 
     Frame* m_frame;
     Timer<RedirectScheduler> m_timer;
@@ -79,4 +79,4 @@ private:
 
 } // namespace WebCore
 
-#endif // RedirectScheduler_h
+#endif // FrameLoader_h