Fix for 3980778, repro crash in RootInlineBox::paint. Make sure that when merging...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Feb 2005 10:21:00 +0000 (10:21 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Feb 2005 10:21:00 +0000 (10:21 +0000)
up front. That way as we do the merge, we dont attempt to examine the lines in dirtyLinesForChangedChild.

        Reviewed by mjs

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::removeChild):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8560 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/rendering/render_block.cpp

index 10b81b4..dce7797 100644 (file)
@@ -1,5 +1,15 @@
 2005-02-10  David Hyatt  <hyatt@apple.com>
 
+       Fix for 3980778, repro crash in RootInlineBox::paint.  Make sure that when merging blocks we dirty them for layout
+       up front. That way as we do the merge, we dont attempt to examine the lines in dirtyLinesForChangedChild.
+       
+        Reviewed by mjs
+
+        * khtml/rendering/render_block.cpp:
+        (khtml::RenderBlock::removeChild):
+
+2005-02-10  David Hyatt  <hyatt@apple.com>
+
        Fix for 3987010, fix a bug that caused the self-collapsing-block-cleared-float bit to never get set correctly.
        
         Reviewed by mjs
index b6b25e2..055ecdf 100644 (file)
@@ -309,6 +309,7 @@ void RenderBlock::removeChild(RenderObject *oldChild)
     if (canDeleteAnonymousBlocks && prev && next) {
         // Take all the children out of the |next| block and put them in
         // the |prev| block.
+        prev->setNeedsLayoutAndMinMaxRecalc();
         RenderObject* o = next->firstChild();
         while (o) {
             RenderObject* no = o;
@@ -316,8 +317,6 @@ void RenderBlock::removeChild(RenderObject *oldChild)
             prev->appendChildNode(next->removeChildNode(no));
             no->setNeedsLayoutAndMinMaxRecalc();
         }
-        prev->setNeedsLayoutAndMinMaxRecalc();
-
         // Nuke the now-empty block.
         next->detach();
     }
@@ -329,6 +328,7 @@ void RenderBlock::removeChild(RenderObject *oldChild)
         // The removal has knocked us down to containing only a single anonymous
         // box.  We can go ahead and pull the content right back up into our
         // box.
+        setNeedsLayoutAndMinMaxRecalc();
         RenderObject* anonBlock = removeChildNode(child);
         m_childrenInline = true;
         RenderObject* o = anonBlock->firstChild();
@@ -338,7 +338,6 @@ void RenderBlock::removeChild(RenderObject *oldChild)
             appendChildNode(anonBlock->removeChildNode(no));
             no->setNeedsLayoutAndMinMaxRecalc();
         }
-        setNeedsLayoutAndMinMaxRecalc();
 
         // Nuke the now-empty block.
         anonBlock->detach();