Bug 510748 - still get assertions "reflow state computed incorrect width" and "non-root frame's desired size changed during an incremental reflow"; Don't report any padding or border on both axes if scrollbars are hidden; r=dbaron
authorTimothy Nikkel <tnikkel@gmail.com>
Tue, 18 Aug 2009 00:38:12 +0200
changeset 31617 8ea02ebd43f01ef7e53ae1ba0841d941052733b1
parent 31616 3e5f7d1414ee56e07375bbcc9f89550e2fd79486
child 31618 bb1b6c42d78a898b452c35805c55572d265f0bac
push id8620
push usersgautherie.bz@free.fr
push dateMon, 17 Aug 2009 22:39:35 +0000
treeherdermozilla-central@8ea02ebd43f0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs510748
milestone1.9.3a1pre
Bug 510748 - still get assertions "reflow state computed incorrect width" and "non-root frame's desired size changed during an incremental reflow"; Don't report any padding or border on both axes if scrollbars are hidden; r=dbaron
layout/generic/nsHTMLReflowState.cpp
--- a/layout/generic/nsHTMLReflowState.cpp
+++ b/layout/generic/nsHTMLReflowState.cpp
@@ -1935,25 +1935,23 @@ nsCSSOffsetState::InitOffsets(nscoord aC
       // try to do anything like handling 'auto' widths,
       // '-moz-box-sizing', or 'auto' margins.
       mComputedPadding.SizeTo(0,0,0,0);
       mComputedBorderPadding = tableFrame->GetIncludedOuterBCBorder();
     }
   } else if (frameType == nsGkAtoms::scrollbarFrame) {
     // scrollbars may have had their width or height smashed to zero
     // by the associated scrollframe, in which case we must not report
-    // any padding or border on that axis.
+    // any padding or border.
     nsSize size(frame->GetSize());
-    if (size.width == 0) {
+    if (size.width == 0 || size.height == 0) {
       mComputedPadding.left = 0;
       mComputedPadding.right = 0;
       mComputedBorderPadding.left = 0;
       mComputedBorderPadding.right = 0;
-    }
-    if (size.height == 0) {
       mComputedPadding.top = 0;
       mComputedPadding.bottom = 0;
       mComputedBorderPadding.top = 0;
       mComputedBorderPadding.bottom = 0;
     }
   }
 }