Source/WebCore: Fixes several bugs when adding CounterNodes to a tree which can cause...
authorcdn@chromium.org <cdn@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Sep 2011 22:49:15 +0000 (22:49 +0000)
committercdn@chromium.org <cdn@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Sep 2011 22:49:15 +0000 (22:49 +0000)
commit5dbb07ab97e0933c104a227c096286746a5be9f7
tree3871974ff9228007fbca59615eda43eec0ab2ac5
parentba2619a6f7471bfd9f3a01c361dcd2372e17ff13
Source/WebCore: Fixes several bugs when adding CounterNodes to a tree which can cause asymetrical relationships.
https://bugs.webkit.org/show_bug.cgi?id=65996

Reviewed by Eric Seidel.

Test: fast/css/counters/counter-reparent-table-children-crash.html

* rendering/CounterNode.cpp:
(WebCore::CounterNode::insertAfter):
* rendering/RenderCounter.cpp:
(WebCore::findPlaceForCounter):
(WebCore::makeCounterNode):

LayoutTests: Test for crash when reparenting table elements with associated counters outside the table.
https://bugs.webkit.org/show_bug.cgi?id=65996

Reviewed by Eric Seidel.

* fast/css/counters/counter-reparent-table-children-crash-expected.txt: Added.
* fast/css/counters/counter-reparent-table-children-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@95054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css/counters/counter-reparent-table-children-crash-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/counters/counter-reparent-table-children-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/CounterNode.cpp
Source/WebCore/rendering/RenderCounter.cpp