REGRESSION (r132516): Javascript menu text incorrectly disappearing and reappearing
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Sep 2013 14:03:21 +0000 (14:03 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Sep 2013 14:03:21 +0000 (14:03 +0000)
commite7b2a7335cefaba7fe82c91190380c51724d5170
tree0685f823541476f7d3ef07eacb58b5d9e6b6484c
parent71b2924be6d731db981b679ff0871aac0161f2e4
REGRESSION (r132516): Javascript menu text incorrectly disappearing and reappearing
https://bugs.webkit.org/show_bug.cgi?id=101047

Reviewed by Simon Fraser.

Compositing layers keep track of ancestors' clipping by constructing the RenderLayerBacking::m_ancestorClippingLayer.
It helps setting up the proper clipping context for the corresponding graphics layer.
When a RenderObject's clipping style changes, it needs to propagate this change not only
to the associated RenderLayer, but also to the descendants', if applicable.
Before r132516, it was mainly covered by initiating full style recalcs, which ensured that
style recalc on the descendant rendering tree took care of creating/destroying
RenderLayerBacking::m_ancestorClippingLayer at every compositing layer node. Without the full
recalc, the clipping of the compositing render layers and the corresponding render subtrees can get out of sync.
This patch updates the clipping context on the descendant subtree, when the clipping behaviour
changes on a render node.

Source/WebCore:

Tests: compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants.html
       compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateDescendantClippingContext):
(WebCore::RenderLayer::styleChanged):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::~RenderLayerBacking):
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
(WebCore::RenderLayerBacking::updateAncestorClippingLayer):
(WebCore::RenderLayerBacking::updateDescendantClippingLayer):
* rendering/RenderLayerBacking.h:

LayoutTests:

* compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt: Added.
* compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants.html: Added.
* compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt: Added.
* compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt [new file with mode: 0644]
LayoutTests/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants.html [new file with mode: 0644]
LayoutTests/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt [new file with mode: 0644]
LayoutTests/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayer.h
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerBacking.h