Bug 1124636: use min/maxBSize instead of Height in nsFieldSetFrame, r=jfkthame
authorSimon Montagu <smontagu@smontagu.org>
Sun, 25 Jan 2015 01:56:36 -0800
changeset 225601 88f31158c8254e941a66fd12a17bf6a8e02420d2
parent 225600 ac8525492f271d3987cff9bb12508f5e8dedcd80
child 225602 1f0d37966eac18d30e78026f0a0ef2e6417713cf
push id54608
push usersmontagu@mozilla.com
push dateSun, 25 Jan 2015 09:56:57 +0000
treeherdermozilla-inbound@88f31158c825 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame
bugs1124636
milestone38.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 1124636: use min/maxBSize instead of Height in nsFieldSetFrame, r=jfkthame
layout/forms/nsFieldSetFrame.cpp
--- a/layout/forms/nsFieldSetFrame.cpp
+++ b/layout/forms/nsFieldSetFrame.cpp
@@ -475,29 +475,29 @@ nsFieldSetFrame::Reflow(nsPresContext*  
                                      innerAvailSize, -1, -1,
                                      nsHTMLReflowState::CALLER_WILL_INIT);
     // Override computed padding, in case it's percentage padding
     kidReflowState.Init(aPresContext, -1, -1, nullptr,
                         &aReflowState.ComputedPhysicalPadding());
     // Our child is "height:100%" but we actually want its height to be reduced
     // by the amount of content-height the legend is eating up, unless our
     // height is unconstrained (in which case the child's will be too).
-    if (aReflowState.ComputedHeight() != NS_UNCONSTRAINEDSIZE) {
-      kidReflowState.SetComputedHeight(
-         std::max(0, aReflowState.ComputedHeight() - mLegendSpace));
+    if (aReflowState.ComputedBSize() != NS_UNCONSTRAINEDSIZE) {
+      kidReflowState.SetComputedBSize(
+         std::max(0, aReflowState.ComputedBSize() - mLegendSpace));
     }
 
-    if (aReflowState.ComputedMinHeight() > 0) {
-      kidReflowState.ComputedMinHeight() =
-        std::max(0, aReflowState.ComputedMinHeight() - mLegendSpace);
+    if (aReflowState.ComputedMinBSize() > 0) {
+      kidReflowState.ComputedMinBSize() =
+        std::max(0, aReflowState.ComputedMinBSize() - mLegendSpace);
     }
 
-    if (aReflowState.ComputedMaxHeight() != NS_UNCONSTRAINEDSIZE) {
-      kidReflowState.ComputedMaxHeight() =
-        std::max(0, aReflowState.ComputedMaxHeight() - mLegendSpace);
+    if (aReflowState.ComputedMaxBSize() != NS_UNCONSTRAINEDSIZE) {
+      kidReflowState.ComputedMaxBSize() =
+        std::max(0, aReflowState.ComputedMaxBSize() - mLegendSpace);
     }
 
     nsHTMLReflowMetrics kidDesiredSize(kidReflowState,
                                        aDesiredSize.mFlags);
     // Reflow the frame
     NS_ASSERTION(kidReflowState.ComputedPhysicalMargin() == nsMargin(0,0,0,0),
                  "Margins on anonymous fieldset child not supported!");
     nsPoint pt(border.left, border.top);