Absolute positioned objects should not be added to anonymous block lists
authorkenrb@chromium.org <kenrb@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jun 2012 22:34:55 +0000 (22:34 +0000)
committerkenrb@chromium.org <kenrb@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jun 2012 22:34:55 +0000 (22:34 +0000)
commita5e61ad525c803cb34b784fc14901b6cd250fefd
treef700e7c9af39aa50946042b22772b7d8c2091ba5
parent4549cdac86365340d469c05cd1d4f876d3a32657
Absolute positioned objects should not be added to anonymous block lists
https://bugs.webkit.org/show_bug.cgi?id=87768

Reviewed by Abhishek Arya.

Source/WebCore:

containingBlock() was returning an anonymous block for absolute
positioned objects under a relative positioned inline in the case
that the inline is split and the object is underneath the block
continuation. Anonymous blocks should never have anything in their
positioned object lists because they can be destroyed at any time
for a different reasons such as anonymous block merging, which is
a problem for layout if they have m_posChildNeedsLayout set.

This patch adds a generic check for anonymous blocks in
containingBlock() to correct this problem.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock):

LayoutTests:

Test crashing condition in bug 87768.

* fast/block/positioning/abspositioned-object-under-split-relpositioned-inline-crash-expected.txt: Added
* fast/block/positioning/abspositioned-object-under-split-relpositioned-inline-crash.html: Added
* fast/block/positioning/insert-positioned-in-anonymous-crash-expected.txt: Added
* fast/block/positioning/insert-positioned-in-anonymous-crash.html: Added

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/block/positioning/abspositioned-object-under-split-relpositioned-inline-crash-expected.txt [new file with mode: 0644]
LayoutTests/fast/block/positioning/abspositioned-object-under-split-relpositioned-inline-crash.html [new file with mode: 0644]
LayoutTests/fast/block/positioning/insert-positioned-in-anonymous-crash-expected.txt [new file with mode: 0644]
LayoutTests/fast/block/positioning/insert-positioned-in-anonymous-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderObject.cpp