<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:cdumez@apple.com" title="Chris Dumez <cdumez@apple.com>"> <span class="fn">Chris Dumez</span></a>
</span> changed
<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>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #272315 Flags</td>
<td>review?
</td>
<td>review+, commit-queue-
</td>
</tr></table>
<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#c46">Comment # 46</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:cdumez@apple.com" title="Chris Dumez <cdumez@apple.com>"> <span class="fn">Chris Dumez</span></a>
</span></b>
<pre>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 class="quote">> Source/WebCore/history/HistoryItem.h:262
> + // Item was created from a session restore.</span >
I don't think this comment is useful.
<span class="quote">> Source/WebCore/history/HistoryItem.h:263
> + bool m_restoredFromSession { false };</span >
we need a prefix for boolean members, I suggest m_wasRestoredFromSession.
Also, could you please move this new member next to the other boolean members above?
<span class="quote">> Source/WebCore/loader/FrameLoader.cpp:3340
> + if (!item.wasRestoredFromSession())</span >
I would do the #ifdef iOS logic here.
<span class="quote">> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2234
> +void WebPage::restoreSessionInternal(const Vector<BackForwardListItemState>& itemStates, bool restoredByAPIRequest)</span >
Do we really need a new method? Maybe we could just add the extra parameter to restoreSession() ?
<span class="quote">> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2238
> +#if !PLATFORM(IOS)</span >
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 class="quote">> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2239
> + // iOS always wants stale data after session restore.</span >
s/wants/allows
<span class="quote">> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2248
> + restoreSessionInternal(itemStates, true);</span >
Could you please make the boolean argument an enum for readability? e.g.
enum class WasRestoredByAPIRequest { No, Yes };</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>