Bug 883514: During block reflow, check floats after reflowing bullet frames, instead of before. r=dbaron a=dveditz
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 05 Sep 2013 11:59:09 -0700
changeset 233662 4265c72971672bfc7218a78ed1b23c83403fb02e
parent 233661 8cbb2d018c670de48db24f25737dc9ee07821d8c
child 233663 72398fa24effb44c3daa10918982616fe64f73e5
push id208
push userryanvm@gmail.com
push dateMon, 23 Feb 2015 15:44:39 +0000
treeherdermozilla-b2g37_v2_2@09dafeb43234 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron, dveditz
bugs883514
milestone25.0a2
Bug 883514: During block reflow, check floats after reflowing bullet frames, instead of before. r=dbaron a=dveditz
layout/generic/nsBlockFrame.cpp
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -1055,18 +1055,16 @@ nsBlockFrame::Reflow(nsPresContext*     
       state.mReflowStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
     }
 
 #ifdef DEBUG_kipp
     ListTag(stdout); printf(": block is not fully complete\n");
 #endif
   }
 
-  CheckFloats(state);
-
   // Place the "marker" (bullet) frame if it is placed next to a block
   // child.
   //
   // According to the CSS2 spec, section 12.6.1, the "marker" box
   // participates in the height calculation of the list-item box's
   // first line box.
   //
   // There are exactly two places a bullet can be placed: near the
@@ -1100,16 +1098,18 @@ nsBlockFrame::Reflow(nsPresContext*     
       // Tall bullets won't look particularly nice here...
       nsRect bbox = bullet->GetRect();
       bbox.y = position.mBaseline - metrics.ascent;
       bullet->SetRect(bbox);
     }
     // Otherwise just leave the bullet where it is, up against our top padding.
   }
 
+  CheckFloats(state);
+
   // Compute our final size
   nscoord bottomEdgeOfChildren;
   ComputeFinalSize(*reflowState, state, aMetrics, &bottomEdgeOfChildren);
   nsRect areaBounds = nsRect(0, 0, aMetrics.width, aMetrics.height);
   ComputeOverflowAreas(areaBounds, reflowState->mStyleDisplay,
                        bottomEdgeOfChildren, aMetrics.mOverflowAreas);
   // Factor overflow container child bounds into the overflow area
   aMetrics.mOverflowAreas.UnionWith(ocBounds);