Absolute positioned element is not placed properly when parent becomes the containing block.
https://bugs.webkit.org/show_bug.cgi?id=157455
<rdar://problem/26212568>
Reviewed by Simon Fraser.
When a container becomes a containing block, we need to check if there are any positioned boxes in its subtree
in order to "re-parent" them. It basically means that we remove them from RenderBlock::positionedDescendants map
and they'll get re-inserted during the next layout correctly.
This patch fixes the case when a container becomes the containing block by setting the transform property and its positioned
child gets misplaced.
Source/WebCore:
Test: fast/block/containing-block-changes.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removePositionedObjectsIfNeeded):
(WebCore::RenderBlock::styleWillChange):
* rendering/RenderBlock.h:
LayoutTests:
* fast/block/containing-block-changes-expected.html: Added.
* fast/block/containing-block-changes.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6 files changed