<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Safari background tabs should be fully suspended where possible."
href="https://bugs.webkit.org/show_bug.cgi?id=150515#c20">Comment # 20</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Safari background tabs should be fully suspended where possible."
href="https://bugs.webkit.org/show_bug.cgi?id=150515">bug 150515</a>
from <span class="vcard"><a class="email" href="mailto:rniwa@webkit.org" title="Ryosuke Niwa <rniwa@webkit.org>"> <span class="fn">Ryosuke Niwa</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=267153&action=diff" name="attach_267153" title="Patch">attachment 267153</a> <a href="attachment.cgi?id=267153&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=267153&action=review">https://bugs.webkit.org/attachment.cgi?id=267153&action=review</a>
<span class="quote">> Source/WebCore/dom/Document.cpp:4507
> + if (m_isSuspended)
> + return;
> +</span >
You should explain why you're adding this check in the change log as a per-function comment.
<span class="quote">> Source/WebCore/dom/Document.cpp:4520
> + page()->lockAllOverlayScrollbarsToHidden(true);</span >
It's a bit weird that we lock overlay scrollbars whenever a page is in the background but I suppose we can fix it later if someone complains.
<span class="quote">> Source/WebCore/loader/FrameLoader.cpp:1823
> +</span >
You should remove this superfluous change.
<span class="quote">> Source/WebCore/page/Page.cpp:1835
> + return s_tabSuspensionIsEnabled && !m_isPrerender && !m_pageActivityState && PageCache::singleton().canCache(this);</span >
You should compare m_pageActivityState against NoFlags.
<span class="quote">> Source/WebCore/page/Page.cpp:1868
> +void Page::timerFired()</span >
This function name is too generic for Page. How about tabSuspensionTimerFired?
<span class="quote">> Source/WebCore/page/Page.cpp:1870
> + setIsTabSuspended(m_isTabSuspended);</span >
We should check canTabSuspend() again here because it may have changed since the last time we checked.
Also, we should probably not call setIsTabSuspended if m_isTabSuspended was false.
<span class="quote">> Source/WebCore/page/Page.h:662
> + Timer m_suspensionTimer;</span >
For consistency, this timer should probably be called m_tabSuspensionTimer.</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>