new URLs entered into the address bar should be part of DOM history object Repro: 1) Load attached file into Safari on Windows 2) Then enter CNN.com in the address bar 3) Navigate CNN.com and browse couple of links deep 4) navigate back to the original test page 4) Click on link "Test History length" 5) History length would still show as "1" Other browsers like IE and Firefox update properly
Created attachment 15355 [details] Launch the test to see why history object is not updated properly
Confirmed that the history length differs in the attached test case using a local debug build of WebKit r24013 with Safari 3.0 (522.12) on Mac OS X 10.4.10. Note that there is a bug in the "Go to a specific index in history" feature since the text field has name="history_index_input" instead of id="history_index_input": window.history.go(document.getElementById('history_index_input').value); // bug
The behavior is the same in Safari 2.0.4 (419.3) with original WebKit on Mac OS X 10.4.10 (8R218), so this is not a regression.
I think the problem is in FrameLoader::getHistoryLength() return page->backForwardList()->backListCount() + 1; should be return page->backForwardList()->backListCount() + 1 + page->backForwardList()->forwardListCount(); to match Firefox. Without the +1, it would match IE (which also counts pages in the forward history).
*** This bug has been marked as a duplicate of bug 24472 ***