[Webkit-unassigned] [Bug 150515] Safari background tabs should be fully suspended where possible.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 10 20:39:29 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=150515

--- Comment #20 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 267153
  --> https://bugs.webkit.org/attachment.cgi?id=267153
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=267153&action=review

> Source/WebCore/dom/Document.cpp:4507
> +    if (m_isSuspended)
> +        return;
> +

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

> Source/WebCore/dom/Document.cpp:4520
> +    page()->lockAllOverlayScrollbarsToHidden(true);

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.

> Source/WebCore/loader/FrameLoader.cpp:1823
> +

You should remove this superfluous change.

> Source/WebCore/page/Page.cpp:1835
> +    return s_tabSuspensionIsEnabled && !m_isPrerender && !m_pageActivityState && PageCache::singleton().canCache(this);

You should compare m_pageActivityState against NoFlags.

> Source/WebCore/page/Page.cpp:1868
> +void Page::timerFired()

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

> Source/WebCore/page/Page.cpp:1870
> +    setIsTabSuspended(m_isTabSuspended);

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.

> Source/WebCore/page/Page.h:662
> +    Timer m_suspensionTimer;

For consistency, this timer should probably be called m_tabSuspensionTimer.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151211/cb58d99c/attachment-0001.html>


More information about the webkit-unassigned mailing list