Backout 8f09d30d3571 for crashtest orange. [r=me]

This commit is contained in:
Scott Johnson
2013-09-07 20:05:23 -05:00
parent 4f620488e0
commit 4506c60201
4 changed files with 21 additions and 27 deletions

View File

@@ -1,9 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<body style="display: -moz-box;">
<font style="display: table; float: left;">
<span style="display: table;">
text text
</span>
</font>
</body>
</html>

View File

@@ -466,7 +466,6 @@ load 769303-2.html
load 769120.html
load 786740-1.html
asserts(0-4) test-pref(font.size.inflation.emPerLine,15) load 791601.xhtml # 3 counts of bug 871327, 1 bug 367185
pref(font.size.inflation.minTwips,120) load 794693.html
asserts(8) test-pref(layout.css.flexbox.enabled,true) load 798020-1.html
test-pref(layout.css.flexbox.enabled,true) load 798235-1.html
test-pref(layout.css.flexbox.enabled,true) load 799207-1.html

View File

@@ -7770,6 +7770,15 @@ nsFrame::BoxReflow(nsBoxLayoutState& aState,
gIndent2++;
#endif
//printf("width=%d, height=%d\n", aWidth, aHeight);
/*
nsIFrame* parent;
GetParentBox(&parent);
// if (parent->GetStateBits() & NS_STATE_CURRENTLY_IN_DEBUG)
// printf("In debug\n");
*/
nsBoxLayoutMetrics *metrics = BoxMetrics();
nsReflowStatus status = NS_FRAME_COMPLETE;
@@ -7846,35 +7855,30 @@ nsFrame::BoxReflow(nsBoxLayoutState& aState,
parentReflowState.mComputedBorderPadding +=
parentReflowState.mComputedPadding;
// XXX Is it OK that this reflow state has no parent reflow state?
// (It used to have a bogus parent, skipping all the boxes).
nsSize availSize(aWidth, NS_INTRINSICSIZE);
nsHTMLReflowState reflowState(aPresContext, this, aRenderingContext,
availSize,
nsHTMLReflowState::DUMMY_PARENT_REFLOW_STATE);
// Construct the parent chain manually since constructing it normally
// messes up dimensions.
const nsHTMLReflowState *outerReflowState = aState.OuterReflowState();
NS_ASSERTION(!outerReflowState || outerReflowState->frame != this,
"in and out of XUL on a single frame?");
const nsHTMLReflowState* parentRS;
if (outerReflowState && outerReflowState->frame == parentFrame) {
// We're a frame (such as a text control frame) that jumps into
// box reflow and then straight out of it on the child frame.
// This means we actually have a real parent reflow state.
// nsLayoutUtils::InflationMinFontSizeFor used to need this to be
// linked up correctly for text control frames, so do so here).
parentRS = outerReflowState;
reflowState.parentReflowState = outerReflowState;
reflowState.mCBReflowState = outerReflowState;
} else {
parentRS = &parentReflowState;
reflowState.parentReflowState = &parentReflowState;
reflowState.mCBReflowState = &parentReflowState;
}
// XXX Is it OK that this reflow state has only one ancestor?
// (It used to have a bogus parent, skipping all the boxes).
nsSize availSize(aWidth, NS_INTRINSICSIZE);
nsHTMLReflowState reflowState(aPresContext, *parentRS, this,
availSize, -1, -1,
nsHTMLReflowState::DUMMY_PARENT_REFLOW_STATE);
// XXX_jwir3: This is somewhat fishy. If this is actually changing the value
// here (which it might be), then we should make sure that it's
// correct the first time around, rather than changing it later.
reflowState.mCBReflowState = parentRS;
reflowState.mReflowDepth = aState.GetReflowDepth();
// mComputedWidth and mComputedHeight are content-box, not

View File

@@ -1838,7 +1838,7 @@ nsHTMLReflowState::InitConstraints(nsPresContext* aPresContext,
// If this is a reflow root, then set the computed width and
// height equal to the available space
if (nullptr == parentReflowState || mFlags.mDummyParentReflowState) {
if (nullptr == parentReflowState) {
// XXXldb This doesn't mean what it used to!
InitOffsets(aContainingBlockWidth,
VerticalOffsetPercentBasis(frame, aContainingBlockWidth,