Changeset 64411 in webkit
- Timestamp:
- Jul 30, 2010 11:58:51 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 deleted
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64409 r64411 1 2010-07-30 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r64408. 4 http://trac.webkit.org/changeset/64408 5 https://bugs.webkit.org/show_bug.cgi?id=43292 6 7 Causing failed tests on Chromium canaries due to wrong history 8 item counts (Requested by atwilson on #webkit). 9 10 * fast/css/target-fragment-match.html: 11 * fast/dom/Window/timer-resume-on-navigation-back.html: 12 * fast/dom/location-hash.html: 13 * fast/events/pageshow-pagehide-on-back-cached-with-frames-expected.txt: 14 * fast/events/pageshow-pagehide-on-back-cached-with-frames.html: 15 * fast/frames/resources/cached-page-1.html: 16 * fast/frames/resources/cached-page-2.html: 17 * fast/harness/resources/cached-page-1.html: 18 * fast/harness/resources/cached-page-with-data-urls.html: 19 * fast/history/gesture-before-onload-expected.txt: Removed. 20 * fast/history/gesture-before-onload.html: Removed. 21 * fast/history/history-length.html: 22 * fast/history/resources/gesture-before-onload-target.html: Removed. 23 * fast/history/saves-state-after-fragment-nav.html: 24 * fast/loader/input-element-page-cache-crash.html: 25 * fast/loader/stateobjects/document-destroyed-navigate-back.html: 26 * fast/loader/stateobjects/pushstate-clears-forward-history.html: 27 * fast/loader/subframe-navigate-during-main-frame-load.html: 28 * http/tests/history/redirect-js-document-location-before-load-expected.txt: 29 * http/tests/history/redirect-js-location-assign-before-load-expected.txt: 30 * http/tests/history/redirect-js-location-before-load-expected.txt: 31 * http/tests/history/redirect-js-location-href-before-load-expected.txt: 32 * http/tests/navigation/resources/document-location.js: 33 (start): 34 * security/autocomplete-cleared-on-back.html: 35 * storage/hash-change-with-xhr.js: 36 (runTest): 37 1 38 2010-07-30 Dan Bernstein <mitz@apple.com> 2 39 -
trunk/LayoutTests/fast/css/target-fragment-match.html
r64408 r64411 12 12 if (window.layoutTestController) 13 13 layoutTestController.waitUntilDone(); 14 15 // Location changes need to happen outside the onload handler to generate history entries.16 setTimeout(runTest, 0);17 }18 19 function runTest() {20 14 window.location.hash ='#target-01'; 21 15 document.body.offsetTop; -
trunk/LayoutTests/fast/dom/Window/timer-resume-on-navigation-back.html
r64408 r64411 19 19 layoutTestController.overridePreference("WebKitUsesPageCachePreferenceKey", 1); 20 20 } 21 // Location changes need to happen outside the onload handler to generate history entries. 22 setTimeout(function() { 23 window.setTimeout(verify, timeoutValue); 24 timestamp = new Date().getTime(); 25 window.location.href = "data:text/html,<body onload='history.back()'></body>"; 26 }, 0); 21 window.setTimeout("verify()", timeoutValue); 22 timestamp = new Date().getTime(); 23 window.location.href = "data:text/html,<body onload='history.back()'></body>"; 27 24 } 28 25 -
trunk/LayoutTests/fast/dom/location-hash.html
r64408 r64411 88 88 originalLocation = window.location.href; 89 89 originalHistoryLength = window.history.length; 90 91 // Location changes need to happen outside the onload handler to generate history entries. 92 setTimeout(step, 0); 90 91 step(); 93 92 } 94 93 </script> -
trunk/LayoutTests/fast/events/pageshow-pagehide-on-back-cached-with-frames-expected.txt
r64408 r64411 1 CONSOLE MESSAGE: line 20: ***Top level frame being parsed for the initial page load***2 CONSOLE MESSAGE: line 20: Subsubframe window.onload3 CONSOLE MESSAGE: line 20: Subsubframe window.onpageshow, target = [object HTMLDocument], persisted = false4 CONSOLE MESSAGE: line 20: Subframe window.onload5 CONSOLE MESSAGE: line 20: Subframe window.onpageshow, target = [object HTMLDocument], persisted = false6 CONSOLE MESSAGE: line 20: Main frame window.onload7 CONSOLE MESSAGE: line 20: Main frame window.onpageshow, target = [object HTMLDocument], persisted = false8 CONSOLE MESSAGE: line 20: ***Navigating top-level frame to a page that will immediately navigate back to this one***9 CONSOLE MESSAGE: line 20: Main frame window.onpagehide, target = [object HTMLDocument], persisted = true10 CONSOLE MESSAGE: line 20: Subframe window.onpagehide, target = [object HTMLDocument], persisted = true11 CONSOLE MESSAGE: line 20: Subsubframe window.onpagehide, target = [object HTMLDocument], persisted = true12 CONSOLE MESSAGE: line 20: Subsubframe window.onpageshow, target = [object HTMLDocument], persisted = true13 CONSOLE MESSAGE: line 20: Subframe window.onpageshow, target = [object HTMLDocument], persisted = true14 CONSOLE MESSAGE: line 20: Main frame window.onpageshow, target = [object HTMLDocument], persisted = true15 1 Test pageshow/pagehide event behavior when navigating away from a page with frames, putting the page in the page cache, then back to it. 2 ***Top level frame being parsed for the initial page load*** 3 Subsubframe window.onload 4 Subsubframe window.onpageshow, target = [object HTMLDocument], persisted = false 5 Subframe window.onload 6 Subframe window.onpageshow, target = [object HTMLDocument], persisted = false 7 Main frame window.onload 8 Main frame window.onpageshow, target = [object HTMLDocument], persisted = false 9 ***Navigating top-level frame to a page that will immediately navigate back to this one*** 10 Main frame window.onpagehide, target = [object HTMLDocument], persisted = true 11 Subframe window.onpagehide, target = [object HTMLDocument], persisted = true 12 Subsubframe window.onpagehide, target = [object HTMLDocument], persisted = true 13 Subsubframe window.onpageshow, target = [object HTMLDocument], persisted = true 14 Subframe window.onpageshow, target = [object HTMLDocument], persisted = true 15 Main frame window.onpageshow, target = [object HTMLDocument], persisted = true 16 16 -
trunk/LayoutTests/fast/events/pageshow-pagehide-on-back-cached-with-frames.html
r64408 r64411 15 15 function log(message) 16 16 { 17 // Logging to the console instead of the "log" DIV in the DOM because 18 // otherwise we trigger the assert mentioned at http://webkit.org/b/43152 19 // (since we log during pagehide) 20 console.log(message); 17 var log = document.getElementById("log"); 18 log.innerHTML += message + "\n"; 21 19 } 22 20 … … 34 32 } else { 35 33 log("***Navigating top-level frame to a page that will immediately navigate back to this one***"); 36 // Location changes need to happen outside the onload handler to generate history entries. 37 setTimeout(function() {window.location.href = "data:text/html,<script>history.back();</scr" + "ipt>";}, 0); 34 window.location.href = "data:text/html,<script>history.back();</scr" + "ipt>"; 38 35 } 39 36 } -
trunk/LayoutTests/fast/frames/resources/cached-page-1.html
r64408 r64411 18 18 19 19 window.opener.log("page-1, about to navigate to page-2.") 20 // Location changes need to happen outside the onload handler to generate history entries. 21 setTimeout(function() {location.href = "cached-page-2.html";}, 0); 20 location.href = "cached-page-2.html"; 22 21 } 23 22 -
trunk/LayoutTests/fast/frames/resources/cached-page-2.html
r64408 r64411 20 20 21 21 window.opener.log("page-2, about to navigate to page-3.") 22 // Location changes need to happen outside the onload handler to generate history entries. 23 setTimeout(function() {location.href = "cached-page-3.html";}, 0); 22 location.href = "cached-page-3.html"; 24 23 } 25 24 </script> -
trunk/LayoutTests/fast/harness/resources/cached-page-1.html
r64408 r64411 23 23 24 24 window.opener.log("page-1, about to navigate to page-2.") 25 // Location changes need to happen outside the onload handler to generate history entries. 26 setTimeout(function() {location.href = "cached-page-2.html";}, 0); 25 location.href = "cached-page-2.html"; 27 26 } 28 27 </script> -
trunk/LayoutTests/fast/harness/resources/cached-page-with-data-urls.html
r64408 r64411 19 19 20 20 window.opener.log("page with data urls, about to navigate to page-2.") 21 // Location changes need to happen outside the onload handler to generate history entries. 22 setTimeout(function() {location.href = "cached-page-2.html";}, 0); 21 location.href = "cached-page-2.html"; 23 22 } 24 23 </script> -
trunk/LayoutTests/fast/history/history-length.html
r64408 r64411 9 9 } 10 10 } 11 12 // Location changes need to happen outside the onload handler to generate history entries. 13 setTimeout(function() { 14 // This test advances history by 2 pages, then navigates back one, and 15 // records history.length. We expect history.length to indicate the total 16 // length of session history. At the end of the test, it should be 2 greater 17 // than it was at the start of the test. 18 switch (sessionStorage.testStage++) { 19 case 0: 20 sessionStorage.initialLength = history.length; 21 location = "?a"; 22 break; 23 case 1: 24 location = "?b"; 25 break; 26 case 2: 27 history.back(); 28 break; 29 case 3: 30 if (history.length == (sessionStorage.initialLength - 0) + 2) 31 document.body.innerHTML = "PASS"; 32 else 33 document.body.innerHTML = "FAIL: initialLength=" + sessionStorage.initialLength + ", history.length=" + history.length; 34 if (window.layoutTestController) 35 layoutTestController.notifyDone(); 36 break; 37 } 38 }, 0); 11 // This test advances history by 2 pages, then navigates back one, and 12 // records history.length. We expect history.length to indicate the total 13 // length of session history. At the end of the test, it should be 2 greater 14 // than it was at the start of the test. 15 switch (sessionStorage.testStage++) { 16 case 0: 17 sessionStorage.initialLength = history.length; 18 location = "?a"; 19 break; 20 case 1: 21 location = "?b"; 22 break; 23 case 2: 24 history.back(); 25 break; 26 case 3: 27 if (history.length == (sessionStorage.initialLength - 0) + 2) 28 document.body.innerHTML = "PASS"; 29 else 30 document.body.innerHTML = "FAIL: initialLength=" + sessionStorage.initialLength + ", history.length=" + history.length; 31 if (window.layoutTestController) 32 layoutTestController.notifyDone(); 33 break; 34 } 39 35 } 40 36 onunload = function() { -
trunk/LayoutTests/fast/history/saves-state-after-fragment-nav.html
r64408 r64411 31 31 layoutTestController.waitUntilDone(); 32 32 } 33 // Location changes need to happen outside the onload handler to generate history entries. 34 setTimeout(function() { 35 navigateToHash(field); 36 navigateAwayAndBack(); 37 }, 0); 33 navigateToHash(field); 34 navigateAwayAndBack(); 38 35 } else { 39 36 document.body.innerHTML = (field.value == '') ? 'FAIL' : 'PASS'; -
trunk/LayoutTests/fast/loader/input-element-page-cache-crash.html
r64408 r64411 14 14 input.setAttribute("autocomplete", "on"); 15 15 input.parentNode.removeChild(input); 16 17 // Location changes need to happen outside the onload handler to generate history entries. 18 setTimeout(function() {window.location = "data:text/html,<script>history.back();</scrip" + "t>";}, 0); 16 17 window.location = "data:text/html,<script>history.back();</scrip" + "t>"; 19 18 } 20 19 -
trunk/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back.html
r64408 r64411 34 34 function loaded() 35 35 { 36 if (!sessionStorage.stage) { 37 // Location changes need to happen outside the onload handler to generate history entries. 38 setTimeout(runFirstStageOfTest, 0); 39 } else if (sessionStorage.stage == 2) 36 if (!sessionStorage.stage) 37 runFirstStageOfTest(); 38 else if (sessionStorage.stage == 2) 40 39 runSecondStageOfTest(); 41 40 else if (sessionStorage.stage == 3) -
trunk/LayoutTests/fast/loader/stateobjects/pushstate-clears-forward-history.html
r64408 r64411 9 9 } 10 10 } 11 12 // Location changes need to happen outside the onload handler to generate history entries. 13 setTimeout(function() { 14 switch (sessionStorage.testStage++) { 15 case 0: 16 location = "?a"; 17 break; 18 case 1: 19 location = "?b"; 20 break; 21 case 2: 22 history.back(); 23 break; 24 case 3: 25 history.pushState(null, null); 26 if (window.layoutTestController) 27 layoutTestController.notifyDone(); 28 break; 29 } 30 }, 0); 11 switch (sessionStorage.testStage++) { 12 case 0: 13 location = "?a"; 14 break; 15 case 1: 16 location = "?b"; 17 break; 18 case 2: 19 history.back(); 20 break; 21 case 3: 22 history.pushState(null, null); 23 if (window.layoutTestController) 24 layoutTestController.notifyDone(); 25 break; 26 } 31 27 } 32 28 onunload = function() { -
trunk/LayoutTests/fast/loader/subframe-navigate-during-main-frame-load.html
r64408 r64411 10 10 layoutTestController.waitUntilDone(); 11 11 } 12 13 // Location changes need to happen outside the onload handler to generate history entries. 14 setTimeout(function() {location='resources/subframe-navigate-during-main-frame-load2.html';}, 0); 12 13 location='resources/subframe-navigate-during-main-frame-load2.html'; 15 14 } 16 15 -
trunk/LayoutTests/http/tests/history/redirect-js-document-location-before-load-expected.txt
r64408 r64411 1 1 This page is the target of a redirect. 2 2 3 PASS: History item count should be 1 and is.3 FAIL: History item count should be 1 but instead is 2. 4 4 5 5 6 6 ============== Back Forward List ============== 7 http://127.0.0.1:8000/history/redirect-js-document-location-before-load.html **nav target** 7 8 curr-> http://127.0.0.1:8000/history/resources/redirect-target.html#1 **nav target** 8 9 =============================================== -
trunk/LayoutTests/http/tests/history/redirect-js-location-assign-before-load-expected.txt
r64408 r64411 1 1 This page is the target of a redirect. 2 2 3 PASS: History item count should be 1 and is.3 FAIL: History item count should be 1 but instead is 2. 4 4 5 5 6 6 ============== Back Forward List ============== 7 http://127.0.0.1:8000/history/redirect-js-location-assign-before-load.html **nav target** 7 8 curr-> http://127.0.0.1:8000/history/resources/redirect-target.html#1 **nav target** 8 9 =============================================== -
trunk/LayoutTests/http/tests/history/redirect-js-location-before-load-expected.txt
r64408 r64411 1 1 This page is the target of a redirect. 2 2 3 PASS: History item count should be 1 and is.3 FAIL: History item count should be 1 but instead is 2. 4 4 5 5 6 6 ============== Back Forward List ============== 7 http://127.0.0.1:8000/history/redirect-js-location-before-load.html **nav target** 7 8 curr-> http://127.0.0.1:8000/history/resources/redirect-target.html#1 **nav target** 8 9 =============================================== -
trunk/LayoutTests/http/tests/history/redirect-js-location-href-before-load-expected.txt
r64408 r64411 1 1 This page is the target of a redirect. 2 2 3 PASS: History item count should be 1 and is.3 FAIL: History item count should be 1 but instead is 2. 4 4 5 5 6 6 ============== Back Forward List ============== 7 http://127.0.0.1:8000/history/redirect-js-location-href-before-load.html **nav target** 7 8 curr-> http://127.0.0.1:8000/history/resources/redirect-target.html#1 **nav target** 8 9 =============================================== -
trunk/LayoutTests/http/tests/navigation/resources/document-location.js
r64408 r64411 8 8 layoutTestController.waitUntilDone(); 9 9 10 // Location changes need to happen outside the onload handler to generate history entries. 11 setTimeout(runTest, 0); 10 runTest(); 12 11 } else { 13 12 // loaded the ?1 navigation -
trunk/LayoutTests/security/autocomplete-cleared-on-back.html
r64408 r64411 20 20 document.getElementById("firstInput").value = "SuperSeekritValue"; 21 21 document.getElementById("secondInput").value = "SuperSeekritValue"; 22 // Location changes need to happen outside the onload handler to generate history entries. 23 setTimeout(function() {window.location = "resources/autocomplete-cleared-on-back2.html";}, 0); 22 window.location = "resources/autocomplete-cleared-on-back2.html"; 24 23 return; 25 24 } -
trunk/LayoutTests/storage/hash-change-with-xhr.js
r64408 r64411 82 82 function runTest() 83 83 { 84 // Location changes need to happen outside the onload handler to generate history entries.85 setTimeout(runTestsInner, 0);86 }87 88 function runTestsInner()89 {90 84 backIterations = 10; 91 85 consecutiveFailures = 0; -
trunk/WebCore/ChangeLog
r64409 r64411 1 2010-07-30 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r64408. 4 http://trac.webkit.org/changeset/64408 5 https://bugs.webkit.org/show_bug.cgi?id=43292 6 7 Causing failed tests on Chromium canaries due to wrong history 8 item counts (Requested by atwilson on #webkit). 9 10 * loader/RedirectScheduler.cpp: 11 (WebCore::RedirectScheduler::scheduleRedirect): 12 (WebCore::RedirectScheduler::mustLockBackForwardList): 13 (WebCore::RedirectScheduler::scheduleLocationChange): 14 (WebCore::RedirectScheduler::scheduleFormSubmission): 15 * loader/RedirectScheduler.h: 16 1 17 2010-07-30 Dan Bernstein <mitz@apple.com> 2 18 -
trunk/WebCore/loader/RedirectScheduler.cpp
r64408 r64411 241 241 return; 242 242 243 // We want a new back forward listitem if the refresh timeout is > 1 second.243 // We want a new history item if the refresh timeout is > 1 second. 244 244 if (!m_redirect || delay <= m_redirect->delay()) 245 245 schedule(new ScheduledRedirect(delay, url, true, delay <= 1, false)); 246 246 } 247 247 248 bool RedirectScheduler::mustLockBackForwardList(Frame* targetFrame, bool mustLockIfDuringLoad) 249 { 250 // Non-user navigation before the page has loaded should not create a new back/forward item. 251 // See https://webkit.org/b/42861 for the original motivation for this. 252 if (mustLockIfDuringLoad && targetFrame->loader()->documentLoader() && targetFrame->loader()->documentLoader()->isLoadingInAPISense()) 253 return true; 254 248 bool RedirectScheduler::mustLockBackForwardList(Frame* targetFrame) 249 { 255 250 // Navigation of a subframe during loading of an ancestor frame does not create a new back/forward item. 256 251 // The definition of "during load" is any time before all handlers for the load event have been run. 257 252 // See https://bugs.webkit.org/show_bug.cgi?id=14957 for the original motivation for this. 253 258 254 for (Frame* ancestor = targetFrame->tree()->parent(); ancestor; ancestor = ancestor->tree()->parent()) { 259 255 Document* document = ancestor->document(); … … 271 267 return; 272 268 273 lockBackForwardList = lockBackForwardList || mustLockBackForwardList(m_frame , !wasUserGesture);269 lockBackForwardList = lockBackForwardList || mustLockBackForwardList(m_frame); 274 270 275 271 FrameLoader* loader = m_frame->loader(); … … 305 301 // See https://bugs.webkit.org/show_bug.cgi?id=32383 for the original motivation for this. 306 302 307 bool lockBackForwardList = mustLockBackForwardList(m_frame , false) || (submission->state()->formSubmissionTrigger() == SubmittedByJavaScript && m_frame->tree()->parent());303 bool lockBackForwardList = mustLockBackForwardList(m_frame) || (submission->state()->formSubmissionTrigger() == SubmittedByJavaScript && m_frame->tree()->parent()); 308 304 309 305 schedule(new ScheduledFormSubmission(submission, lockBackForwardList, duringLoad)); -
trunk/WebCore/loader/RedirectScheduler.h
r64408 r64411 71 71 void schedule(PassOwnPtr<ScheduledNavigation>); 72 72 73 static bool mustLockBackForwardList(Frame* targetFrame , bool mustLockIfDuringLoad);73 static bool mustLockBackForwardList(Frame* targetFrame); 74 74 75 75 Frame* m_frame; … … 80 80 } // namespace WebCore 81 81 82 #endif // RedirectScheduler_h82 #endif // FrameLoader_h
Note: See TracChangeset
for help on using the changeset viewer.