Non-composited child RenderLayers cause allocation of unncessary backing store
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Sep 2014 18:30:06 +0000 (18:30 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Sep 2014 18:30:06 +0000 (18:30 +0000)
commit11255ba9347a1a85a72b3eaccb105ab0e5b887cf
treeead471f5d5b3de9c85c1529e11922a05b6637fcb
parentb763731fb75786388de55faf70c1e5f70b547317
Non-composited child RenderLayers cause allocation of unncessary backing store
https://bugs.webkit.org/show_bug.cgi?id=136375

Reviewed by David Hyatt.

Source/WebCore:

A composited element that has non-composited descendant elements that fall into
RenderLayers was getting backing store when none was required. descendentLayerPaintsIntoAncestor()
was simply checking the "visibility:visible" bit on descendant non-composited layers,
instead of actually asking them if they have any visual content.

Added a couple of FIXME comments.

Test: compositing/backing/child-layer-no-backing.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerBacking.cpp:
(WebCore::descendentLayerPaintsIntoAncestor):

LayoutTests:

Test with a composited div with various configurations of non-composited child layers.

* compositing/backing/child-layer-no-backing-expected.txt: Added.
* compositing/backing/child-layer-no-backing.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/backing/child-layer-no-backing-expected.txt [new file with mode: 0644]
LayoutTests/compositing/backing/child-layer-no-backing.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp