The root layer's renderSurface should be clipped to the viewport's bounds (like it is now), but the root layer should not propagate that clipRect further down the subtree. Advantages of making this change: - root layer becomes less special, and in a separate patch it should be possible to simplify calcDrawTransforms nicely because of this - renderSurfaces can remain more cacheable because they will not change size because of getting clipped. - makes visibleContentRect and drawableContentRect behavior more consistent across all layers, regardless of whether they contribute to root surface or other surface. This patch will slightly change expected results of visibleContentRect and drawableContentRect in 94542 (in a clean positive way).
Created attachment 161081 [details] Patch It seemed to me that fixing the unit tests by adding parent->setMasksToBounds(true) was reasonable, since it still retains the real underlying purpose and intent behind the tests. Tested on OSX, manual, layout, and unit tests, no obvious regressions
Comment on attachment 161081 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=161081&action=review > Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp:956 > + parent->setMasksToBounds(true); I think this could just go in createRoot() and then you don't have to edit every test.
(In reply to comment #2) > (From update of attachment 161081 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=161081&action=review > > > Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp:956 > > + parent->setMasksToBounds(true); > > I think this could just go in createRoot() and then you don't have to edit every test. I can do that, sure. I felt like it would have been better to only affect the tests that really needed it, though.
Comment on attachment 161081 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=161081&action=review >>> Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp:956 >>> + parent->setMasksToBounds(true); >> >> I think this could just go in createRoot() and then you don't have to edit every test. > > I can do that, sure. I felt like it would have been better to only affect the tests that really needed it, though. oh I see. that's fine too then :)
Comment on attachment 161081 [details] Patch R=me.
Committed r127017: <http://trac.webkit.org/changeset/127017>