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

darin at chromium.org darin at chromium.org
Thu Apr 8 01:10:09 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 02d29e37aad729ca68d195f1fda10245028b2247
Author: darin at chromium.org <darin at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 15 22:08:10 2010 +0000

    2010-01-15  Darin Fisher  <darin at chromium.org>
    
            Reviewed by Brady Eidson.
    
            history.length does not return number of elements in history list
            https://bugs.webkit.org/show_bug.cgi?id=24472
    
            Test: fast/history/history-length.html
    
            * page/Page.cpp:
            (WebCore::Page::getHistoryLength):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53346 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 0f069b8..701475d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-15  Darin Fisher  <darin at chromium.org>
+
+        Reviewed by Brady Eidson.
+
+        history.length does not return number of elements in history list
+        https://bugs.webkit.org/show_bug.cgi?id=24472
+
+        * fast/history/history-length-expected.txt: Added.
+        * fast/history/history-length.html: Added.
+        * fast/loader/stateobjects/document-destroyed-navigate-back-expected.txt: fix up test expectations
+        * fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll-expected.txt: fix up test expectations
+
 2010-01-15  Geoffrey Garen  <ggaren at apple.com>
 
         Reviewed by Oliver Hunt.
diff --git a/LayoutTests/editing/selection/doubleclick-whitespace-img-crash-expected.txt b/LayoutTests/fast/history/history-length-expected.txt
similarity index 100%
copy from LayoutTests/editing/selection/doubleclick-whitespace-img-crash-expected.txt
copy to LayoutTests/fast/history/history-length-expected.txt
diff --git a/LayoutTests/fast/history/history-length.html b/LayoutTests/fast/history/history-length.html
new file mode 100644
index 0000000..4bf9932
--- /dev/null
+++ b/LayoutTests/fast/history/history-length.html
@@ -0,0 +1,36 @@
+<script>
+onload = function() {
+  if (location.search.substring(1).length == 0) {
+    sessionStorage.testStage = 0;
+    if (window.layoutTestController) {
+      layoutTestController.dumpAsText();
+      layoutTestController.waitUntilDone();
+    }
+  }
+  // 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";
+    if (window.layoutTestController)
+      layoutTestController.notifyDone();
+    break;
+  }
+}
+</script>
+<body></body>
diff --git a/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-expected.txt b/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-expected.txt
index 57a2ccd..12dc44e 100644
--- a/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-expected.txt
+++ b/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-expected.txt
@@ -4,10 +4,10 @@ ALERT: State popped - FirstEntry (type string)
 ALERT: State popped - SecondEntry (type string)
 ALERT: Navigating back...
 main frame - has 1 onunload handler(s)
-ALERT: History length is 2
+ALERT: History length is 3
 ALERT: Last path component of location is document-destroyed-navigate-back.html?SecondEntryShouldNeverBeReactivated
 main frame - has 1 onunload handler(s)
-ALERT: History length is 1
+ALERT: History length is 3
 ALERT: Last path component of location is document-destroyed-navigate-back.html?FirstEntryShouldNeverBeReactivated
 ALERT: Test completed
 This test:
@@ -16,7 +16,7 @@ This test:
 -Navigates away to a new document, with the old document being destroyed.
 -Navigates back to the state object entries and verifies the popstate event is not fired.
 
-History length is 1
+History length is 3
 Last path component of location is document-destroyed-navigate-back.html?FirstEntryShouldNeverBeReactivated
 Test completed
 
diff --git a/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll-expected.txt b/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll-expected.txt
index 74708e8..6e67259 100644
--- a/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll-expected.txt
+++ b/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll-expected.txt
@@ -6,7 +6,7 @@ ALERT: State popped - SecondEntry (type string)
 ALERT: hashChanged - Last path component of location is document-destroyed-navigate-back-with-fragment-scroll.html#SecondEntry
 ALERT: Navigating back...
 main frame - has 1 onunload handler(s)
-ALERT: History length is 2
+ALERT: History length is 3
 ALERT: Last path component of location is document-destroyed-navigate-back-with-fragment-scroll.html#SecondEntryShouldNeverBeReactivated
 ALERT: hashChanged - Last path component of location is document-destroyed-navigate-back-with-fragment-scroll.html#FirstEntryShouldNeverBeReactivated
 ALERT: Test completed
@@ -16,7 +16,7 @@ This test:
 -Navigates away to a new document, with the old document being destroyed.
 -Navigates back to the state object entries and verifies the popstate event is not fired.
 
-History length is 2
+History length is 3
 Last path component of location is document-destroyed-navigate-back-with-fragment-scroll.html#SecondEntryShouldNeverBeReactivated
 hashChanged - Last path component of location is document-destroyed-navigate-back-with-fragment-scroll.html#FirstEntryShouldNeverBeReactivated
 Test completed
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e3e6f56..3757098 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-15  Darin Fisher  <darin at chromium.org>
+
+        Reviewed by Brady Eidson.
+
+        history.length does not return number of elements in history list
+        https://bugs.webkit.org/show_bug.cgi?id=24472
+
+        Test: fast/history/history-length.html
+
+        * page/Page.cpp:
+        (WebCore::Page::getHistoryLength):
+
 2010-01-15  Dmitry Titov  <dimich at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/page/Page.cpp b/WebCore/page/Page.cpp
index 1edc164..ac13104 100644
--- a/WebCore/page/Page.cpp
+++ b/WebCore/page/Page.cpp
@@ -318,7 +318,7 @@ void Page::goToItem(HistoryItem* item, FrameLoadType type)
 
 int Page::getHistoryLength()
 {
-    return m_backForwardList->backListCount() + 1;
+    return m_backForwardList->backListCount() + 1 + m_backForwardList->forwardListCount();
 }
 
 void Page::setGlobalHistoryItem(HistoryItem* item)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list