Fix for the <colgroup> crasher. Make sure adding to an anonymous box just returns...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Sep 2004 20:38:22 +0000 (20:38 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Sep 2004 20:38:22 +0000 (20:38 +0000)
all the redundant setPos -500000 calls, since we don't need those at all.

        Reviewed by john

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::addChildToFlow):
        (khtml::RenderBlock::makeChildrenNonInline):
        * khtml/rendering/render_inline.cpp:
        (RenderInline::splitFlow):

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

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

index 794b48fe001b0254ba7ababe82aaf73718c11c05..647c3e13a57455b189d2ee19b1c8695ce6fcd826 100644 (file)
@@ -1,3 +1,16 @@
+2004-09-01  David Hyatt  <hyatt@apple.com>
+
+       Fix for the <colgroup> crasher.  Make sure adding to an anonymous box just returns immediately. Also eliminate
+       all the redundant setPos -500000 calls, since we don't need those at all.
+       
+        Reviewed by john
+
+        * khtml/rendering/render_block.cpp:
+        (khtml::RenderBlock::addChildToFlow):
+        (khtml::RenderBlock::makeChildrenNonInline):
+        * khtml/rendering/render_inline.cpp:
+        (RenderInline::splitFlow):
+
 2004-09-02  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by John
index 382e09fcc7799e15ea057579d28e0df138ab17d6..5a2326b7441f103101991e1feb4170360fc01ff0 100644 (file)
@@ -127,11 +127,6 @@ void RenderBlock::addChildToFlow(RenderObject* newChild, RenderObject* beforeChi
             return addChildToFlow(newChild, beforeChild->parent());
     }
 
-    // prevent elements that haven't received a layout yet from getting painted by pushing
-    // them far above the top of the page
-    if (!newChild->isInline())
-        newChild->setPos(newChild->xPos(), -500000);
-
     // A block has to either have all of its children inline, or all of its children as blocks.
     // So, if our children are currently inline and a block child has to be inserted, we move all our
     // inline children into anonymous block boxes
@@ -170,7 +165,6 @@ void RenderBlock::addChildToFlow(RenderObject* newChild, RenderObject* beforeChi
             RenderBlock* newBox = createAnonymousBlock();
             RenderBox::addChild(newBox,beforeChild);
             newBox->addChild(newChild);
-            newBox->setPos(newBox->xPos(), -500000);
             return;
         }
     }
@@ -259,7 +253,6 @@ void RenderBlock::makeChildrenNonInline(RenderObject *insertionPoint)
             box->appendChildNode(removeChildNode(no));
         }
         box->appendChildNode(removeChildNode(inlineRunEnd));
-        box->setPos(box->xPos(), -500000);
     }
 }
 
index 62ff1592d8e0d4a0e0ee2eb51bfd0b939861af3e..5db68d890bbc07d30cc0912e3ee374724d36cdd0 100644 (file)
@@ -241,15 +241,7 @@ void RenderInline::splitFlow(RenderObject* beforeChild, RenderBlock* newBlockBox
     // connected, thus allowing newChild access to a renderArena should it need
     // to wrap itself in additional boxes (e.g., table construction).
     newBlockBox->addChildToFlow(newChild, 0);
-
-    // XXXdwh is any of this even necessary? I don't think it is.
-    pre->setPos(0, -500000);
-    pre->setNeedsLayout(true);
-    newBlockBox->setPos(0, -500000);
-    newBlockBox->setNeedsLayout(true);
-    post->setPos(0, -500000);
-    post->setNeedsLayout(true);
-
+    
     block->setNeedsLayoutAndMinMaxRecalc();
 }