Remove positioned descendants when RenderBlock is no longer a containing block.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 12 Jun 2016 20:45:44 +0000 (20:45 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 12 Jun 2016 20:45:44 +0000 (20:45 +0000)
commit9ccfd9204929815a560e05b830c3c4a318a99a69
treeadce6c3976c5c73f03c564137804ba396b4a35b2
parentc74e431cd25973fbdb64ed94e4714963060abedd
Remove positioned descendants when RenderBlock is no longer a containing block.
https://bugs.webkit.org/show_bug.cgi?id=158655
<rdar://problem/26510032>

Reviewed by Simon Fraser.

Normally the RenderView is the containing block for fixed positioned renderers.
However when a renderer acquires some transform related properties, it becomes the containing
block for all the fixed positioned renderers in its descendant tree.
When the last transform related property is removed, the renderer is no longer a containing block
and we need to remove all these positioned renderers from the descendant tracker map (gPositionedDescendantsMap).
They will be inserted back into the tracker map during the next layout (either under the RenderView or
under the next transformed renderer in the ancestor chain).

Source/WebCore:

Test: fast/block/fixed-position-reparent-when-transition-is-removed.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removePositionedObjectsIfNeeded):

LayoutTests:

* fast/block/fixed-position-reparent-when-transition-is-removed-expected.txt: Added.
* fast/block/fixed-position-reparent-when-transition-is-removed.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/block/fixed-position-reparent-when-transition-is-removed-expected.txt [new file with mode: 0644]
LayoutTests/fast/block/fixed-position-reparent-when-transition-is-removed.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp