Reviewed by Hyatt.
authorbdakin <bdakin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Mar 2007 00:04:39 +0000 (00:04 +0000)
committerbdakin <bdakin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Mar 2007 00:04:39 +0000 (00:04 +0000)
commit8af97f62f21160ac14403e18fd651223a1e22ef8
tree3c9ff467bd9ef39cba556a1301a791785fc80e4e
parent69fa83cbe4304930b4873261221bb9524cb7ce57
    Reviewed by Hyatt.

        Fix for <rdar://problem/5065396> REGRESSION: leaks in
        RenderBlock::layoutInlineChildren seen on buildbot

        This leak appeared after http://trac.webkit.org/projects/webkit/
        changeset/20188. This change shifted line boxes around in
        removeChild(). But since removeChild() calls
        setNeedsLayoutAndMinMaxRecalc(), all of the line boxes will be
        removed once we actually lay out anyway. So this patch fixes the
        leak by deleting the line boxes instead of shifting them around.

        * editing/IndentOutdentCommand.cpp:
        (WebCore::IndentOutdentCommand::outdentParagraph): Call into
        updateLayout(). This fixes an assertion I got in editing/
        execCommand/4976800.html This is very similar to the line box fix I
        made recently (http://trac.webkit.org/projects/webkit/changeset/
        20177). We need to update layout before relying on VisiblePositions
        after removing a node.
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::deleteLinesForBlock): New helper function
        since this functionality is needed in three places now.
        (WebCore::RenderBlock::makeChildrenNonInline): Call into new
        deleteLinesForBlock().
        (WebCore::RenderBlock::removeChild): Same.
        * rendering/RenderBlock.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/editing/IndentOutdentCommand.cpp
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderBlock.h