Fix for 3810389, crash because of continuation() craziness. Revert back to the...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Oct 2004 23:45:58 +0000 (23:45 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Oct 2004 23:45:58 +0000 (23:45 +0000)
making sure that all line boxes get deleted and recreated when inlines are split because of a block.

        Reviewed darin

        * khtml/rendering/render_inline.cpp:
        (RenderInline::splitFlow):

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

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

index a8ce58e..340b7e9 100644 (file)
@@ -1,3 +1,13 @@
+2004-10-21  David Hyatt  <hyatt@apple.com>
+
+       Fix for 3810389, crash because of continuation() craziness.  Revert back to the old behavior of
+       making sure that all line boxes get deleted and recreated when inlines are split because of a block.
+       
+        Reviewed darin
+
+        * khtml/rendering/render_inline.cpp:
+        (RenderInline::splitFlow):
+
 2004-10-21  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by Darin
index deb3bae..8eeef9c 100644 (file)
@@ -242,7 +242,12 @@ void RenderInline::splitFlow(RenderObject* beforeChild, RenderBlock* newBlockBox
     // to wrap itself in additional boxes (e.g., table construction).
     newBlockBox->addChildToFlow(newChild, 0);
     
+    // Always just do a full layout in order to ensure that line boxes (especially wrappers for images)
+    // get deleted properly.  Because objects moves from the pre block into the post block, we want to
+    // make new line boxes instead of leaving the old line boxes around.
+    pre->setNeedsLayoutAndMinMaxRecalc();
     block->setNeedsLayoutAndMinMaxRecalc();
+    post->setNeedsLayoutAndMinMaxRecalc();
 }
 
 void RenderInline::paint(PaintInfo& i, int _tx, int _ty)