Fix remove() so that it is equivalent to calling removeChild on the
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Aug 2006 23:19:34 +0000 (23:19 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Aug 2006 23:19:34 +0000 (23:19 +0000)
commitb00c82ac8917c58dcd9f7ed79a6b82e9da3ab1fe
treeb71efa26b47f42423ef1d979c8d04d27f63bea59
parente08fe186b2a08cc622920eb159aae874ce752750
    Fix remove() so that it is equivalent to calling removeChild on the
        parent.  This involved moving three operations that remove did.

        (1) Move the accessibility object cache removal into the destroy methods,
        since this really should just happen when a render object is going away.

        (2) removeFromObjectLists shifted into removeChild, which means it will
        now be called more often (this is a correct change).  Note that there is
        also now a new guard on removeFromObjectLists so that it won't do any
        work unless the document is not being destroyed.

        (3) The big one.  deleteLineBoxWrapper was not getting called to clean up
        the line box tree.  This moved right into RenderContainer's removeChildNode so
        that it is now done even in the lowest level RenderContainer removal primitive.

        Reviewed by beth

        * rendering/RenderContainer.cpp:
        (WebCore::RenderContainer::removeChildNode):
        (WebCore::RenderContainer::removeChild):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::removeFromObjectLists):
        (WebCore::RenderObject::destroy):
        * rendering/RenderObject.h:
        (WebCore::RenderObject::remove):
        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::destroy):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/rendering/RenderContainer.cpp
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderWidget.cpp