<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@igalia.com" title="Carlos Garcia Campos <cgarcia@igalia.com>"> <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">> Comment on <span class=""><a href="attachment.cgi?id=272315&action=diff" name="attach_272315" title="Go back to initial approach">attachment 272315</a> <a href="attachment.cgi?id=272315&action=edit" title="Go back to initial approach">[details]</a></span>
> Go back to initial approach
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=272315&action=review">https://bugs.webkit.org/attachment.cgi?id=272315&action=review</a>
>
> r=me with changes.</span >
Thank you very much!
<span class="quote">> > Source/WebCore/history/HistoryItem.h:262
> > + // Item was created from a session restore.
>
> I don't think this comment is useful.</span >
Ok.
<span class="quote">> > Source/WebCore/history/HistoryItem.h:263
> > + bool m_restoredFromSession { false };
>
> we need a prefix for boolean members, I suggest m_wasRestoredFromSession.</span >
Ok.
<span class="quote">> Also, could you please move this new member next to the other boolean
> members above?</span >
Sure.
<span class="quote">> > Source/WebCore/loader/FrameLoader.cpp:3340
> > + if (!item.wasRestoredFromSession())
>
> I would do the #ifdef iOS logic here.</span >
Ok.
<span class="quote">> > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2234
> > +void WebPage::restoreSessionInternal(const Vector<BackForwardListItemState>& itemStates, bool restoredByAPIRequest)
>
> Do we really need a new method? Maybe we could just add the extra parameter
> to restoreSession() ?</span >
Yes, because it's a message handler called from generated code.
<span class="quote">> > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2238
> > +#if !PLATFORM(IOS)
>
> I would prefer if we moved the IOS ifdefing to
> FrameLoader::loadDifferentDocumentItem() and set the wasRestoredFromSession
> flag here no matter the platform. Otherwise, we end up with a boolean that
> has an inaccurate value on iOS.</span >
Makes sense.
<span class="quote">> > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2239
> > + // iOS always wants stale data after session restore.
>
> s/wants/allows</span >
Ok.
<span class="quote">> > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2248
> > + restoreSessionInternal(itemStates, true);
>
> Could you please make the boolean argument an enum for readability? e.g.
> 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>