2011-01-27 Carol Szabo <carol.szabo@nokia.com>
authorcarol.szabo@nokia.com <carol.szabo@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jan 2011 00:14:16 +0000 (00:14 +0000)
committercarol.szabo@nokia.com <carol.szabo@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jan 2011 00:14:16 +0000 (00:14 +0000)
commit123ec6a6d6912163305ea7a3f5f1a2dddf5b7a03
treee9fca1e954a576277c9600b02b3827d4929dce9d
parentf0b517c8ddc4cd667fa15b57a195c64aa278f156
2011-01-27  Carol Szabo <carol.szabo@nokia.com>

        Reviewed by David Hyatt.

        A corrupted counter tree is created when renderers are added to the
        tree bypassing RenderObject::addChild
        https://bugs.webkit.org/show_bug.cgi?id=51270

        No new tests. This patch reimplements the fix for bugs 43812 and
        51637 and hence all tests are already there as part of the original
        fixes for those bugs.

        * rendering/RenderCounter.cpp:
        (WebCore::findPlaceForCounter):
        Removed old workaround as this patch hopefully fixes the real
        problem.
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::addChild):
        Removed call to counter updater as it was moved to a lower level.
        (WebCore::RenderObject::destroy):
        Moved attached counter nodes destruction to after the node is
        removed from the tree.
        * rendering/RenderObjectChildList.cpp:
        (WebCore::RenderObjectChildList::removeChildNode):
        (WebCore::RenderObjectChildList::appendChildNode):
        (WebCore::RenderObjectChildList::insertChildNode):
        Added notifications to the Counter system such that the
        CounterForest reflects the changes to the RendererTree.
        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::destroy):
        Applied the same changes as for RenderObject::destroy()
        since RenderObject::destroy() is not called from here.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@76859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderCounter.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObjectChildList.cpp
Source/WebCore/rendering/RenderWidget.cpp