Make the review fixes from kocienda's review.
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Oct 2004 08:14:46 +0000 (08:14 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Oct 2004 08:14:46 +0000 (08:14 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7825 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/khtml/rendering/render_block.cpp
WebCore/khtml/rendering/render_block.h

index a5f906149092927bf63a42cd1487966922cbc458..0f8614718e921ebcbf5f9a201a29607b019422dc 100644 (file)
@@ -576,10 +576,14 @@ void RenderBlock::adjustFloatingBlock(const MarginInfo& marginInfo)
 
 RenderObject* RenderBlock::handleSpecialChild(RenderObject* child, const MarginInfo& marginInfo, CompactInfo& compactInfo, bool& handled)
 {
-    // Handle floating/positioned children first.
-    RenderObject* next = handleFloatingOrPositionedChild(child, marginInfo, handled);
+    // Handle positioned children first.
+    RenderObject* next = handlePositionedChild(child, marginInfo, handled);
     if (handled) return next;
     
+    // Handle floating children next.
+    next = handleFloatingChild(child, marginInfo, handled);
+    if (handled) return next;
+
     // See if we have a compact element.  If we do, then try to tuck the compact element into the margin space of the next block.
     next = handleCompactChild(child, compactInfo, handled);
     if (handled) return next;
@@ -589,7 +593,7 @@ RenderObject* RenderBlock::handleSpecialChild(RenderObject* child, const MarginI
 }
 
 
-RenderObject* RenderBlock::handleFloatingOrPositionedChild(RenderObject* child, const MarginInfo& marginInfo, bool& handled)
+RenderObject* RenderBlock::handlePositionedChild(RenderObject* child, const MarginInfo& marginInfo, bool& handled)
 {
     if (child->isPositioned()) {
         handled = true;
@@ -598,6 +602,11 @@ RenderObject* RenderBlock::handleFloatingOrPositionedChild(RenderObject* child,
         return child->nextSibling();
     }
 
+    return 0;
+}
+
+RenderObject* RenderBlock::handleFloatingChild(RenderObject* child, const MarginInfo& marginInfo, bool& handled)
+{
     if (child->isFloating()) {
         handled = true;
         insertFloatingObject(child);
@@ -631,7 +640,6 @@ RenderObject* RenderBlock::handleCompactChild(RenderObject* child, CompactInfo&
                 // The compact will fit in the margin.
                 handled = true;
                 compactInfo.set(child, curr);
-                child->setInline(true);
                 child->setPos(0,0); // This position will be updated to reflect the compact's
                                     // desired position and the line box for the compact will
                                     // pick that position up.
index a01cc7c25f8e8349c57aacf0a3b97bb09240816a..efb380e228c728096ebd4d192b6169606a27e34c 100644 (file)
@@ -375,7 +375,8 @@ protected:
     void adjustPositionedBlock(RenderObject* child, const MarginInfo& marginInfo);
     void adjustFloatingBlock(const MarginInfo& marginInfo);
     RenderObject* handleSpecialChild(RenderObject* child, const MarginInfo& marginInfo, CompactInfo& compactInfo, bool& handled);
-    RenderObject* handleFloatingOrPositionedChild(RenderObject* child, const MarginInfo& marginInfo, bool& handled);
+    RenderObject* handleFloatingChild(RenderObject* child, const MarginInfo& marginInfo, bool& handled);
+    RenderObject* handlePositionedChild(RenderObject* child, const MarginInfo& marginInfo, bool& handled);
     RenderObject* handleCompactChild(RenderObject* child, CompactInfo& compactInfo, bool& handled);
     RenderObject* handleRunInChild(RenderObject* child, bool& handled);
     void collapseMargins(RenderObject* child, MarginInfo& marginInfo, int yPosEstimate);