[Webkit-unassigned] [Bug 48809] Chromium WebKit API needs WebFrame::lastCommittedHistoryItem()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 4 15:43:32 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=48809





--- Comment #4 from Charles Reis <creis at chromium.org>  2010-11-04 15:43:32 PST ---
(From update of attachment 72605)
View in context: https://bugs.webkit.org/attachment.cgi?id=72605&action=review

>> WebKit/chromium/src/WebFrameImpl.cpp:1006
>> +    return WebHistoryItem(viewImpl()->lastCommittedHistoryItem());
> 
> I think you can implement this using m_frame->loader()->history()->currentItem()
> as that provides you with the last-committed history item for this frame.
> 
> This would allow you to eliminate a lot of code in this patch.
> 
> Come to think of it, I suspect that WebFrameImpl::currentHistoryItem is
> incorrectly implemented.  It is incorrectly accessing the currentItem of
> the BackForwardList, which corresponds to the HistoryItem of the top-most
> frame.  If a user of the WebKit API wants the HistoryItem of the top-most
> frame, then they should just use WebFrame::top()->currentHistoryItem().
> 
> In other words, currentHistoryItem is supposed to mean the same thing as
> lastCommittedHistoryItem.

My test in http://codereview.chromium.org/4444001/show is showing that won't work.  m_frame->loader()->history()->currentItem() is returning the item for the navigation that's currently in progress, not the last committed item.  As a result, all the UpdateState messages are sending state from the page that's about to commit, rather than the one that's about to be replaced.

Is there another way to get at the history item for the last committed navigation?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list