<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Network cache: old pages returned by disk cache on history navigation after session is restored"
   href="https://bugs.webkit.org/show_bug.cgi?id=153230#c47">Comment # 47</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Network cache: old pages returned by disk cache on history navigation after session is restored"
   href="https://bugs.webkit.org/show_bug.cgi?id=153230">bug 153230</a>
              from <span class="vcard"><a class="email" href="mailto:cgarcia&#64;igalia.com" title="Carlos Garcia Campos &lt;cgarcia&#64;igalia.com&gt;"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=153230#c46">comment #46</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=272315&amp;action=diff" name="attach_272315" title="Go back to initial approach">attachment 272315</a> <a href="attachment.cgi?id=272315&amp;action=edit" title="Go back to initial approach">[details]</a></span>
&gt; Go back to initial approach
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=272315&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=272315&amp;action=review</a>
&gt; 
&gt; r=me with changes.</span >

Thank you very much!

<span class="quote">&gt; &gt; Source/WebCore/history/HistoryItem.h:262
&gt; &gt; +    // Item was created from a session restore.
&gt; 
&gt; I don't think this comment is useful.</span >

Ok.

<span class="quote">&gt; &gt; Source/WebCore/history/HistoryItem.h:263
&gt; &gt; +    bool m_restoredFromSession { false };
&gt; 
&gt; we need a prefix for boolean members, I suggest m_wasRestoredFromSession.</span >

Ok.

<span class="quote">&gt; Also, could you please move this new member next to the other boolean
&gt; members above?</span >

Sure.

<span class="quote">&gt; &gt; Source/WebCore/loader/FrameLoader.cpp:3340
&gt; &gt; +            if (!item.wasRestoredFromSession())
&gt; 
&gt; I would do the #ifdef iOS logic here.</span >

Ok.

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2234
&gt; &gt; +void WebPage::restoreSessionInternal(const Vector&lt;BackForwardListItemState&gt;&amp; itemStates, bool restoredByAPIRequest)
&gt; 
&gt; Do we really need a new method? Maybe we could just add the extra parameter
&gt; to restoreSession() ?</span >

Yes, because it's a message handler called from generated code.

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2238
&gt; &gt; +#if !PLATFORM(IOS)
&gt; 
&gt; I would prefer if we moved the IOS ifdefing to
&gt; FrameLoader::loadDifferentDocumentItem() and set the wasRestoredFromSession
&gt; flag here no matter the platform. Otherwise, we end up with a boolean that
&gt; has an inaccurate value on iOS.</span >

Makes sense.

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2239
&gt; &gt; +        // iOS always wants stale data after session restore.
&gt; 
&gt; s/wants/allows</span >

Ok.

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2248
&gt; &gt; +    restoreSessionInternal(itemStates, true);
&gt; 
&gt; Could you please make the boolean argument an enum for readability? e.g.
&gt; enum class WasRestoredByAPIRequest { No, Yes };</span >

Sure, my original patch did that indeed, but I was not happy with the names I used.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>