Move RenderLayers z-index lists dirtying to post style change
authorjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 May 2012 02:18:38 +0000 (02:18 +0000)
committerjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 May 2012 02:18:38 +0000 (02:18 +0000)
commit9c84ee2093aa4cf9201d597ee0230f914d0734da
tree6b791d5b98f19d4751924c550362444cec1ed706
parent79726ec69dcb6755d3d7efcc4e7db05be68f6150
Move RenderLayers z-index lists dirtying to post style change
https://bugs.webkit.org/show_bug.cgi?id=85437

Reviewed by Darin Adler.

No expected change in behavior.

This change moves the z-order lists to RenderLayer::styleChanged. As part of this
change, also added proper handling of stacking context transition. This enabled
us to tighten more of the dirtyZOrderLists / clearZOrderLists code.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::styleWillChange):
Removed this code, moved to updateStackingContextsAfterStyleChange.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
Only stacking contexts start with dirty z-order lists.

(WebCore::RenderLayer::dirtyZOrderLists):
Added an ASSERT.

(WebCore::RenderLayer::updateStackingContextsAfterStyleChange):
Refactored the code to handle the transition between stacking context status.

(WebCore::RenderLayer::styleChanged):
Added a call to updateStackingContextsAfterStyleChange.

* rendering/RenderLayer.h:
(WebCore::RenderLayer::isStackingContext):
Added a call to the next function.

(WebCore::RenderLayer::layerWithStyleIsStackingContext):
Factored the isStackingContext logic here so that we can reuse it inside
updateStackingContextsAfterStyleChange.

(WebCore::RenderLayer::clearZOrderLists):
Added an ASSERT.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayer.h