[webkit-dev] Accessing back/forward history
Brady Eidson
beidson at apple.com
Thu Feb 22 10:09:34 PST 2007
Hey Oscar,
It sounds like you're wanting to access the back/forward list
directly. getHistoryLength() and historyURL() are *primarily* in
FrameLoader for use internal to FrameLoader.
Since the back/forward list is more a property of the Page you should
be manipulating it from there if you need more advanced information
from it.
Like you already pointed out, this is cake - anywhere you have a
frame, you just call frame->page()->backForwardList()
Thanks,
~ Brady
On Feb 22, 2007, at 2:06 AM, Oscar Cwajbaum wrote:
> Hi,
>
> In my client code I need to get the length of the back and forward
> histories, and the page title for any given entry in the back/
> forward history.
>
> When I started implementing this, I found that FrameLoader has the
> getHistoryLength method for getting the length of the back history,
> but no equivalent method for getting the length of the forward
> history. Also, I found the FrameLoader method historyURL, which
> gets the URL for an entry in the back/forward history, but no
> equivalent method for page title.
>
> I can see three ways of implementing this:
>
> 1. Add getForwardHistoryLength and historyTitle FrameLoader
> methods, and submit them as a patch.
>
> 2. Add a historyTitle FrameLoader method, overload (or modify) the
> getHistoryLength method to take a direction parameter, and submit
> this as a patch.
>
> 3. Bypass the FrameLoader methods, and use page()->backForwardList
> () to access the back/forward list directly.
>
> What's the recommended way of implementing this?
>
> Thanks,
> Oscar Cwajbaum
>
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-dev
More information about the webkit-dev
mailing list