<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&#64;webkit.org" title="Ryosuke Niwa &lt;rniwa&#64;webkit.org&gt;"> <span class="fn">Ryosuke Niwa</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=267153&amp;action=diff" name="attach_267153" title="Patch">attachment 267153</a> <a href="attachment.cgi?id=267153&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=267153&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=267153&amp;action=review</a>

<span class="quote">&gt; Source/WebCore/dom/Document.cpp:4507
&gt; +    if (m_isSuspended)
&gt; +        return;
&gt; +</span >

You should explain why you're adding this check in the change log as a per-function comment.

<span class="quote">&gt; Source/WebCore/dom/Document.cpp:4520
&gt; +    page()-&gt;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">&gt; Source/WebCore/loader/FrameLoader.cpp:1823
&gt; +</span >

You should remove this superfluous change.

<span class="quote">&gt; Source/WebCore/page/Page.cpp:1835
&gt; +    return s_tabSuspensionIsEnabled &amp;&amp; !m_isPrerender &amp;&amp; !m_pageActivityState &amp;&amp; PageCache::singleton().canCache(this);</span >

You should compare m_pageActivityState against NoFlags.

<span class="quote">&gt; Source/WebCore/page/Page.cpp:1868
&gt; +void Page::timerFired()</span >

This function name is too generic for Page.  How about tabSuspensionTimerFired?

<span class="quote">&gt; Source/WebCore/page/Page.cpp:1870
&gt; +    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">&gt; Source/WebCore/page/Page.h:662
&gt; +    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>