<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>69358</bug_id>
          
          <creation_ts>2011-10-04 11:28:15 -0700</creation_ts>
          <short_desc>Allow creating new pages with a existing back forward list</short_desc>
          <delta_ts>2016-01-03 11:12:13 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>115600</dup_id>
          <see_also>https://bugzilla.gnome.org/show_bug.cgi?id=756820</see_also>
    
    <see_also>https://bugzilla.gnome.org/show_bug.cgi?id=706731</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andersca</cc>
    
    <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>lantw44</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>nekohayo</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>477785</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2011-10-04 11:28:15 -0700</bug_when>
    <thetext>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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>478163</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-10-04 22:05:25 -0700</bug_when>
    <thetext>Safari restores b/f list after a Web process crash, so there is apparently some way to do that. Not sure if it&apos;s using bundle API or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>478178</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2011-10-04 23:33:55 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>479221</commentid>
    <comment_count>3</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2011-10-06 09:44:20 -0700</bug_when>
    <thetext>Safari on Lion also restores back/forward list from disk when you relaunch it, so there&apos;s definitely a way to do it outside of WebProcess crash recovery.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>486653</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2011-10-19 03:19:10 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Safari on Lion also restores back/forward list from disk when you relaunch it, so there&apos;s definitely a way to do it outside of WebProcess crash recovery.

Yes, there&apos;s WebPageProxy::restoreFromSessionStateData(), but it&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>486786</commentid>
    <comment_count>5</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2011-10-19 07:44:00 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; Safari on Lion also restores back/forward list from disk when you relaunch it, so there&apos;s definitely a way to do it outside of WebProcess crash recovery.
&gt; 
&gt; Yes, there&apos;s WebPageProxy::restoreFromSessionStateData(), but it&apos;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&apos;s anything you don&apos;t want in there (I&apos;d love to hear why you don&apos;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&apos;re not interested in replicating that mistake in WebKit 2.  Treating a &quot;session&quot; 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!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1136340</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2015-10-24 19:31:05 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; SessionStateData contains the back/forward list, amongst other things.  The
&gt; number of things it contains in the future might grow.  Most of these things
&gt; will likely be desirable for people who think they actually just want the
&gt; list of URLs in the back/forward list.

Sounds like we should investigating exposing this API in the GTK+ port.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1152132</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-01-03 11:12:13 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 115600 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>