RESOLVED DUPLICATE of bug 115600 69358
Allow creating new pages with a existing back forward list
https://bugs.webkit.org/show_bug.cgi?id=69358
Summary Allow creating new pages with a existing back forward list
Carlos Garcia Campos
Reported 2011-10-04 11:28:15 PDT
Tabbed browsers typically copy the bf list of the current tab for the new view when creating a new tab. Epiphany and midori do that by using WebCore::BackForwardList::addItem() to add items of current tab bf list to the bf list of the newly created tab. In WebKit2 the C API doesn't expose addItem() method to keep the API simple, so it would be better to be able to create a page with a existing bf list.
Attachments
Alexey Proskuryakov
Comment 1 2011-10-04 22:05:25 PDT
Safari restores b/f list after a Web process crash, so there is apparently some way to do that. Not sure if it's using bundle API or not.
Carlos Garcia Campos
Comment 2 2011-10-04 23:33:55 PDT
WebPageProxy::initializeWebPage() uses its own bf list, so that when web process crashes, initializeWebPage is called again for the existing page that register current bf list items in the new web process.
Brady Eidson
Comment 3 2011-10-06 09:44:20 PDT
Safari on Lion also restores back/forward list from disk when you relaunch it, so there's definitely a way to do it outside of WebProcess crash recovery.
Carlos Garcia Campos
Comment 4 2011-10-19 03:19:10 PDT
(In reply to comment #3) > Safari on Lion also restores back/forward list from disk when you relaunch it, so there's definitely a way to do it outside of WebProcess crash recovery. Yes, there's WebPageProxy::restoreFromSessionStateData(), but it's still different from creating a page with a given bf list object, so that when WebPageProxy::initializeWebPage() is called, the page already has the bf list we want.
Brady Eidson
Comment 5 2011-10-19 07:44:00 PDT
(In reply to comment #4) > (In reply to comment #3) > > Safari on Lion also restores back/forward list from disk when you relaunch it, so there's definitely a way to do it outside of WebProcess crash recovery. > > Yes, there's WebPageProxy::restoreFromSessionStateData(), but it's still different from creating a page with a given bf list object, so that when WebPageProxy::initializeWebPage() is called, the page already has the bf list we want. SessionStateData contains the back/forward list, amongst other things. The number of things it contains in the future might grow. Most of these things will likely be desirable for people who think they actually just want the list of URLs in the back/forward list. And if there's anything you don't want in there (I'd love to hear why you don't if there is anything), we could add filtering functions. Having a freely mutable back/forward list in the WebKit 1 API turned out to be a mistake, and we're not interested in replicating that mistake in WebKit 2. Treating a "session" as an opaque object that you can extract from a page and restore in to another page should be the only way to do this. Note that the use case you gave in your initial report is entirely and cleaning fulfilled by this!
Michael Catanzaro
Comment 6 2015-10-24 19:31:05 PDT
(In reply to comment #5) > SessionStateData contains the back/forward list, amongst other things. The > number of things it contains in the future might grow. Most of these things > will likely be desirable for people who think they actually just want the > list of URLs in the back/forward list. Sounds like we should investigating exposing this API in the GTK+ port.
Michael Catanzaro
Comment 7 2016-01-03 11:12:13 PST
*** This bug has been marked as a duplicate of bug 115600 ***
Note You need to log in before you can comment on or make changes to this bug.