Bug 95235 - [chromium] Do not clip root layer's subtree to viewport
Summary: [chromium] Do not clip root layer's subtree to viewport
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Shawn Singh
URL:
Keywords:
Depends on:
Blocks: 92290 94542
  Show dependency treegraph
 
Reported: 2012-08-28 12:49 PDT by Shawn Singh
Modified: 2012-08-29 10:40 PDT (History)
5 users (show)

See Also:


Attachments
Patch (11.27 KB, patch)
2012-08-28 16:10 PDT, Shawn Singh
enne: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Singh 2012-08-28 12:49:26 PDT
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).
Comment 1 Shawn Singh 2012-08-28 16:10:00 PDT
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 2 Dana Jansens 2012-08-29 07:59:55 PDT
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.
Comment 3 Shawn Singh 2012-08-29 08:40:00 PDT
(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 4 Dana Jansens 2012-08-29 08:40:29 PDT
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 5 Adrienne Walker 2012-08-29 09:52:09 PDT
Comment on attachment 161081 [details]
Patch

R=me.
Comment 6 Shawn Singh 2012-08-29 10:40:26 PDT
Committed r127017: <http://trac.webkit.org/changeset/127017>