Crash from empty anonymous block preceding :before content
https://bugs.webkit.org/show_bug.cgi?id=78250
Patch by Ken Buchanan <kenrb@chromium.org> on 2012-02-22
Reviewed by David Hyatt.
Source/WebCore:
RenderListMarkers getting removed from the tree in updateMarkerLocation()
can leave parent anonymous blocks behind with no children. This was
confusing updateBeforeAfterContent() because it does not expect
an empty block to precede :before content renderers.
Fix is to remove the anonymous block if it will lose all of its children.
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::updateMarkerLocation):
LayoutTests:
Test exercises a crashing condition from extra :before content being
created after a RenderListMarker in an anonymous block has been moved.
Also rebasing some tests that had extraneous anonymous blocks in their
render tree dumps.
* fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash-expected.txt: Added
* fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash.html: Added
* platform/chromium-win/editing/execCommand/create-list-with-hr-expected.txt:
* platform/gtk/editing/execCommand/create-list-with-hr-expected.txt:
* platform/mac/editing/execCommand/create-list-with-hr-expected.txt:
* platform/qt/editing/execCommand/create-list-with-hr-expected.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108548
268f45cc-cd09-0410-ab3c-
d52691b4dbfc