Bug 110261 - Clarify isInWindow vs. isVisible path through to RenderLayerCompositor
Summary: Clarify isInWindow vs. isVisible path through to RenderLayerCompositor
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
Keywords: InRadar
Depends on:
Reported: 2013-02-19 14:07 PST by Tim Horton
Modified: 2013-02-20 13:19 PST (History)
7 users (show)

See Also:

patch (13.91 KB, patch)
2013-02-19 15:21 PST, Tim Horton
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2013-02-19 14:07:36 PST
RenderLayerCompositor currently uses "didMoveOnscreen/willMoveOffscreen" to tell its TiledBacking that it entered/left a window. However, those methods are called when page visibility changes occur as well. Since TiledBacking really wants "is in window", not "is visible", clear up the path that these two properties take. This also means that we don't need didMoveOnscreen/willMoveOffscreen in RenderView or RenderLayerCompositor anymore.

The end effect of all of this is that we will stop unparenting TileCaches willy-nilly when the page moves offscreen (when the browser is hidden or occluded or minimized or whatever), and only do that work when the view is actually being removed from the window (or going into the page cache?).

Comment 1 Tim Horton 2013-02-19 15:21:39 PST
Created attachment 189180 [details]

Still needs a test.
Comment 2 Tim Horton 2013-02-19 17:42:17 PST
Not gonna get a test, the only way to test this is (as far as I can tell) by looking at the tile cache, so we're immediately limited to testing on mac-wk2. Then, the TileCache discards tiles on a 4 second timer, so the test would have to wait for a long time. Not ideal.
Comment 3 WebKit Review Bot 2013-02-19 17:44:46 PST
Attachment 189180 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/WebCore.exp.in', u'Source/WebCore/dom/Document.cpp', u'Source/WebCore/page/FrameView.cpp', u'Source/WebCore/page/FrameView.h', u'Source/WebCore/page/Page.cpp', u'Source/WebCore/page/Page.h', u'Source/WebCore/rendering/RenderLayerCompositor.cpp', u'Source/WebCore/rendering/RenderLayerCompositor.h', u'Source/WebCore/rendering/RenderView.cpp', u'Source/WebCore/rendering/RenderView.h', u'Source/WebKit/mac/ChangeLog', u'Source/WebKit/mac/WebView/WebView.mm', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/WebProcess/WebPage/WebPage.cpp']" exit_code: 1
Source/WebCore/page/FrameView.h:156:  The parameter name "isInWindow" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/page/Page.h:289:  The parameter name "isInWindow" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 2 in 15 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Tim Horton 2013-02-19 21:57:06 PST
Comment 5 Tim Horton 2013-02-20 13:19:26 PST
This required one followup change: http://trac.webkit.org/changeset/143490