Changeset 64411 in webkit


Ignore:
Timestamp:
Jul 30, 2010 11:58:51 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

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 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:
Location:
trunk
Files:
3 deleted
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r64409 r64411  
     12010-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
    1382010-07-30  Dan Bernstein  <mitz@apple.com>
    239
  • trunk/LayoutTests/fast/css/target-fragment-match.html

    r64408 r64411  
    1212    if (window.layoutTestController)
    1313        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() {
    2014    window.location.hash ='#target-01';
    2115    document.body.offsetTop;
  • trunk/LayoutTests/fast/dom/Window/timer-resume-on-navigation-back.html

    r64408 r64411  
    1919      layoutTestController.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
    2020    }
    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>";
    2724}
    2825
  • trunk/LayoutTests/fast/dom/location-hash.html

    r64408 r64411  
    8888        originalLocation = window.location.href;
    8989        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();
    9392    }
    9493    </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.onload
    3 CONSOLE MESSAGE: line 20: Subsubframe window.onpageshow, target = [object HTMLDocument], persisted = false
    4 CONSOLE MESSAGE: line 20: Subframe window.onload
    5 CONSOLE MESSAGE: line 20: Subframe window.onpageshow, target = [object HTMLDocument], persisted = false
    6 CONSOLE MESSAGE: line 20: Main frame window.onload
    7 CONSOLE MESSAGE: line 20: Main frame window.onpageshow, target = [object HTMLDocument], persisted = false
    8 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 = true
    10 CONSOLE MESSAGE: line 20: Subframe window.onpagehide, target = [object HTMLDocument], persisted = true
    11 CONSOLE MESSAGE: line 20: Subsubframe window.onpagehide, target = [object HTMLDocument], persisted = true
    12 CONSOLE MESSAGE: line 20: Subsubframe window.onpageshow, target = [object HTMLDocument], persisted = true
    13 CONSOLE MESSAGE: line 20: Subframe window.onpageshow, target = [object HTMLDocument], persisted = true
    14 CONSOLE MESSAGE: line 20: Main frame window.onpageshow, target = [object HTMLDocument], persisted = true
    151Test 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***
     3Subsubframe window.onload
     4Subsubframe window.onpageshow, target = [object HTMLDocument], persisted = false
     5Subframe window.onload
     6Subframe window.onpageshow, target = [object HTMLDocument], persisted = false
     7Main frame window.onload
     8Main frame window.onpageshow, target = [object HTMLDocument], persisted = false
     9***Navigating top-level frame to a page that will immediately navigate back to this one***
     10Main frame window.onpagehide, target = [object HTMLDocument], persisted = true
     11Subframe window.onpagehide, target = [object HTMLDocument], persisted = true
     12Subsubframe window.onpagehide, target = [object HTMLDocument], persisted = true
     13Subsubframe window.onpageshow, target = [object HTMLDocument], persisted = true
     14Subframe window.onpageshow, target = [object HTMLDocument], persisted = true
     15Main frame window.onpageshow, target = [object HTMLDocument], persisted = true
    1616
  • trunk/LayoutTests/fast/events/pageshow-pagehide-on-back-cached-with-frames.html

    r64408 r64411  
    1515function log(message)
    1616{
    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";
    2119}
    2220
     
    3432    } else {
    3533        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>";
    3835    }
    3936}
  • trunk/LayoutTests/fast/frames/resources/cached-page-1.html

    r64408 r64411  
    1818
    1919    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";
    2221}
    2322
  • trunk/LayoutTests/fast/frames/resources/cached-page-2.html

    r64408 r64411  
    2020
    2121    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";
    2423}
    2524</script>
  • trunk/LayoutTests/fast/harness/resources/cached-page-1.html

    r64408 r64411  
    2323
    2424    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";
    2726}
    2827</script>
  • trunk/LayoutTests/fast/harness/resources/cached-page-with-data-urls.html

    r64408 r64411  
    1919
    2020    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";
    2322}
    2423</script>
  • trunk/LayoutTests/fast/history/history-length.html

    r64408 r64411  
    99    }
    1010  }
    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  }
    3935}
    4036onunload = function() {
  • trunk/LayoutTests/fast/history/saves-state-after-fragment-nav.html

    r64408 r64411  
    3131      layoutTestController.waitUntilDone();
    3232    }
    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();
    3835  } else {
    3936    document.body.innerHTML = (field.value == '') ? 'FAIL' : 'PASS';
  • trunk/LayoutTests/fast/loader/input-element-page-cache-crash.html

    r64408 r64411  
    1414    input.setAttribute("autocomplete", "on");
    1515    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>";
    1918}
    2019
  • trunk/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back.html

    r64408 r64411  
    3434function loaded()
    3535{
    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)
    4039        runSecondStageOfTest();
    4140    else if (sessionStorage.stage == 3)
  • trunk/LayoutTests/fast/loader/stateobjects/pushstate-clears-forward-history.html

    r64408 r64411  
    99    }
    1010  }
    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  }
    3127}
    3228onunload = function() {
  • trunk/LayoutTests/fast/loader/subframe-navigate-during-main-frame-load.html

    r64408 r64411  
    1010        layoutTestController.waitUntilDone();
    1111    }
    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';
    1514}
    1615
  • trunk/LayoutTests/http/tests/history/redirect-js-document-location-before-load-expected.txt

    r64408 r64411  
    11This page is the target of a redirect.
    22
    3 PASS: History item count should be 1 and is.
     3FAIL: History item count should be 1 but instead is 2.
    44
    55
    66============== Back Forward List ==============
     7        http://127.0.0.1:8000/history/redirect-js-document-location-before-load.html  **nav target**
    78curr->  http://127.0.0.1:8000/history/resources/redirect-target.html#1  **nav target**
    89===============================================
  • trunk/LayoutTests/http/tests/history/redirect-js-location-assign-before-load-expected.txt

    r64408 r64411  
    11This page is the target of a redirect.
    22
    3 PASS: History item count should be 1 and is.
     3FAIL: History item count should be 1 but instead is 2.
    44
    55
    66============== Back Forward List ==============
     7        http://127.0.0.1:8000/history/redirect-js-location-assign-before-load.html  **nav target**
    78curr->  http://127.0.0.1:8000/history/resources/redirect-target.html#1  **nav target**
    89===============================================
  • trunk/LayoutTests/http/tests/history/redirect-js-location-before-load-expected.txt

    r64408 r64411  
    11This page is the target of a redirect.
    22
    3 PASS: History item count should be 1 and is.
     3FAIL: History item count should be 1 but instead is 2.
    44
    55
    66============== Back Forward List ==============
     7        http://127.0.0.1:8000/history/redirect-js-location-before-load.html  **nav target**
    78curr->  http://127.0.0.1:8000/history/resources/redirect-target.html#1  **nav target**
    89===============================================
  • trunk/LayoutTests/http/tests/history/redirect-js-location-href-before-load-expected.txt

    r64408 r64411  
    11This page is the target of a redirect.
    22
    3 PASS: History item count should be 1 and is.
     3FAIL: History item count should be 1 but instead is 2.
    44
    55
    66============== Back Forward List ==============
     7        http://127.0.0.1:8000/history/redirect-js-location-href-before-load.html  **nav target**
    78curr->  http://127.0.0.1:8000/history/resources/redirect-target.html#1  **nav target**
    89===============================================
  • trunk/LayoutTests/http/tests/navigation/resources/document-location.js

    r64408 r64411  
    88      layoutTestController.waitUntilDone();
    99
    10       // Location changes need to happen outside the onload handler to generate history entries.
    11       setTimeout(runTest, 0);
     10      runTest();
    1211    } else {
    1312      // loaded the ?1 navigation
  • trunk/LayoutTests/security/autocomplete-cleared-on-back.html

    r64408 r64411  
    2020        document.getElementById("firstInput").value = "SuperSeekritValue";
    2121        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";
    2423        return;
    2524    }
  • trunk/LayoutTests/storage/hash-change-with-xhr.js

    r64408 r64411  
    8282function runTest()
    8383{
    84     // Location changes need to happen outside the onload handler to generate history entries.
    85     setTimeout(runTestsInner, 0);
    86 }
    87 
    88 function runTestsInner()
    89 {
    9084    backIterations = 10;
    9185    consecutiveFailures = 0;
  • trunk/WebCore/ChangeLog

    r64409 r64411  
     12010-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
    1172010-07-30  Dan Bernstein  <mitz@apple.com>
    218
  • trunk/WebCore/loader/RedirectScheduler.cpp

    r64408 r64411  
    241241        return;
    242242
    243     // We want a new back forward list item if the refresh timeout is > 1 second.
     243    // We want a new history item if the refresh timeout is > 1 second.
    244244    if (!m_redirect || delay <= m_redirect->delay())
    245245        schedule(new ScheduledRedirect(delay, url, true, delay <= 1, false));
    246246}
    247247
    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    
     248bool RedirectScheduler::mustLockBackForwardList(Frame* targetFrame)
     249{
    255250    // Navigation of a subframe during loading of an ancestor frame does not create a new back/forward item.
    256251    // The definition of "during load" is any time before all handlers for the load event have been run.
    257252    // See https://bugs.webkit.org/show_bug.cgi?id=14957 for the original motivation for this.
     253
    258254    for (Frame* ancestor = targetFrame->tree()->parent(); ancestor; ancestor = ancestor->tree()->parent()) {
    259255        Document* document = ancestor->document();
     
    271267        return;
    272268
    273     lockBackForwardList = lockBackForwardList || mustLockBackForwardList(m_frame, !wasUserGesture);
     269    lockBackForwardList = lockBackForwardList || mustLockBackForwardList(m_frame);
    274270
    275271    FrameLoader* loader = m_frame->loader();
     
    305301    // See https://bugs.webkit.org/show_bug.cgi?id=32383 for the original motivation for this.
    306302
    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());
    308304
    309305    schedule(new ScheduledFormSubmission(submission, lockBackForwardList, duringLoad));
  • trunk/WebCore/loader/RedirectScheduler.h

    r64408 r64411  
    7171    void schedule(PassOwnPtr<ScheduledNavigation>);
    7272
    73     static bool mustLockBackForwardList(Frame* targetFrame, bool mustLockIfDuringLoad);
     73    static bool mustLockBackForwardList(Frame* targetFrame);
    7474
    7575    Frame* m_frame;
     
    8080} // namespace WebCore
    8181
    82 #endif // RedirectScheduler_h
     82#endif // FrameLoader_h
Note: See TracChangeset for help on using the changeset viewer.