Bug 1054810: when block size is unconstrained and we aren't setting aDesiredSize.BSize to the computed block size, preserve the original value. r=jfkthame.
authorSimon Montagu <smontagu@smontagu.org>
Fri, 22 Aug 2014 00:04:41 -0700
changeset 222775 8ae173319e56dccc84849ce407b586cda69a9fe9
parent 222774 2312266dfc01c1b150b1b6eb102c57fe301d7a66
child 222776 7283263a197491db6507f37ece921d4aaef13e14
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame
bugs1054810
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1054810: when block size is unconstrained and we aren't setting aDesiredSize.BSize to the computed block size, preserve the original value. r=jfkthame.
layout/generic/nsPageContentFrame.cpp
layout/generic/nsPageFrame.cpp
layout/tables/nsTableRowFrame.cpp
--- a/layout/generic/nsPageContentFrame.cpp
+++ b/layout/generic/nsPageContentFrame.cpp
@@ -94,22 +94,20 @@ nsPageContentFrame::Reflow(nsPresContext
 
   // Reflow our fixed frames
   nsReflowStatus fixedStatus = NS_FRAME_COMPLETE;
   ReflowAbsoluteFrames(aPresContext, aDesiredSize, aReflowState, fixedStatus);
   NS_ASSERTION(NS_FRAME_IS_COMPLETE(fixedStatus), "fixed frames can be truncated, but not incomplete");
 
   // Return our desired size
   WritingMode wm = aReflowState.GetWritingMode();
-  LogicalSize finalSize(wm);
-  finalSize.ISize(wm) = aReflowState.ComputedISize();
+  aDesiredSize.ISize(wm) = aReflowState.ComputedISize();
   if (aReflowState.ComputedBSize() != NS_UNCONSTRAINEDSIZE) {
-    finalSize.BSize(wm) = aReflowState.ComputedBSize();
+    aDesiredSize.BSize(wm) = aReflowState.ComputedBSize();
   }
-  aDesiredSize.SetSize(wm, finalSize);
   FinishAndStoreOverflow(&aDesiredSize);
 
   NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
 }
 
 nsIAtom*
 nsPageContentFrame::GetType() const
 {
--- a/layout/generic/nsPageFrame.cpp
+++ b/layout/generic/nsPageFrame.cpp
@@ -144,22 +144,20 @@ nsPageFrame::Reflow(nsPresContext*      
                  !frame->GetNextInFlow(), "bad child flow list");
   }
   PR_PL(("PageFrame::Reflow %p ", this));
   PR_PL(("[%d,%d][%d,%d]\n", aDesiredSize.Width(), aDesiredSize.Height(),
          aReflowState.AvailableWidth(), aReflowState.AvailableHeight()));
 
   // Return our desired size
   WritingMode wm = aReflowState.GetWritingMode();
-  LogicalSize finalSize(wm);
-  finalSize.ISize(wm) = aReflowState.AvailableISize();
+  aDesiredSize.ISize(wm) = aReflowState.AvailableISize();
   if (aReflowState.AvailableBSize() != NS_UNCONSTRAINEDSIZE) {
-    finalSize.BSize(wm) = aReflowState.AvailableBSize();
+    aDesiredSize.BSize(wm) = aReflowState.AvailableBSize();
   }
-  aDesiredSize.SetSize(wm, finalSize);
 
   aDesiredSize.SetOverflowAreasToDesiredBounds();
   FinishAndStoreOverflow(&aDesiredSize);
 
   PR_PL(("PageFrame::Reflow %p ", this));
   PR_PL(("[%d,%d]\n", aReflowState.AvailableWidth(), aReflowState.AvailableHeight()));
 
   NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
--- a/layout/tables/nsTableRowFrame.cpp
+++ b/layout/tables/nsTableRowFrame.cpp
@@ -939,17 +939,16 @@ nsTableRowFrame::ReflowChildren(nsPresCo
         nscoord ascent;
         if (!kidFrame->GetFirstPrincipalChild()->GetFirstPrincipalChild()) {
           ascent = desiredSize.BSize(rowWM);
         } else {
           ascent = ((nsTableCellFrame *)kidFrame)->GetCellBaseline();
         }
         nscoord descent = desiredSize.BSize(rowWM) - ascent;
         UpdateHeight(desiredSize.BSize(rowWM), ascent, descent, &aTableFrame, cellFrame);
-        UpdateHeight(desiredSize.Height(), ascent, descent, &aTableFrame, cellFrame);
       }
       else {
         cellMaxHeight = std::max(cellMaxHeight, desiredSize.Height());
         int32_t rowSpan = aTableFrame.GetEffectiveRowSpan((nsTableCellFrame&)*kidFrame);
         if (1 == rowSpan) {
           SetContentHeight(cellMaxHeight);
         }
       }