Bug 14499 - DOM history object is not updated properly
Summary: DOM history object is not updated properly
Status: RESOLVED DUPLICATE of bug 24472
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-02 14:50 PDT by Sridhar Gurivireddy
Modified: 2010-01-18 23:55 PST (History)
2 users (show)

See Also:


Attachments
Launch the test to see why history object is not updated properly (1.72 KB, text/html)
2007-07-02 14:51 PDT, Sridhar Gurivireddy
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sridhar Gurivireddy 2007-07-02 14:50:47 PDT
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
Comment 1 Sridhar Gurivireddy 2007-07-02 14:51:47 PDT
Created attachment 15355 [details]
Launch the test to see why history object is not updated properly
Comment 2 David Kilzer (:ddkilzer) 2007-07-07 09:19:05 PDT
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
Comment 3 David Kilzer (:ddkilzer) 2007-07-07 09:22:17 PDT
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.

Comment 4 John Seif 2008-04-14 13:50:44 PDT
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).
Comment 5 Alexey Proskuryakov 2010-01-18 23:54:46 PST

*** This bug has been marked as a duplicate of bug 24472 ***