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?).
Created attachment 189180 [details]
Still needs a test.
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.
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] 
Source/WebCore/page/Page.h:289: The parameter name "isInWindow" adds no information, so it should be removed. [readability/parameter_name] 
Total errors found: 2 in 15 files
If any of these errors are false positives, please file a bug against check-webkit-style.
This required one followup change: http://trac.webkit.org/changeset/143490