Backout dfe69eabbe47 for crashtest orange. [r=me]

--HG--
extra : rebase_source : 36898d587c098835af796d7588ba24b3b40b0558
This commit is contained in:
Scott Johnson 2013-09-07 20:04:36 -05:00
Родитель 5d11d06d4f
Коммит 0f5d29c2c9
9 изменённых файлов: 32 добавлений и 76 удалений

Просмотреть файл

@ -684,7 +684,7 @@ nsFlexContainerFrame::AppendFlexItemForChild(
aChildFrame,
nsSize(aParentReflowState.ComputedWidth(),
NS_UNCONSTRAINEDSIZE),
-1, -1, nsHTMLReflowState::CALLER_WILL_INIT);
-1, -1, false);
childRSForMeasuringHeight.mFlags.mIsFlexContainerMeasuringHeight = true;
childRSForMeasuringHeight.Init(aPresContext);

Просмотреть файл

@ -419,7 +419,7 @@ nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState,
nsHTMLReflowState kidReflowState(presContext, aState->mReflowState,
mInner.mScrolledFrame,
nsSize(availWidth, NS_UNCONSTRAINEDSIZE),
-1, -1, nsHTMLReflowState::CALLER_WILL_INIT);
-1, -1, false);
kidReflowState.Init(presContext, -1, -1, nullptr,
&aState->mReflowState.mComputedPadding);
kidReflowState.mFlags.mAssumingHScrollbar = aAssumeHScroll;

Просмотреть файл

@ -49,7 +49,7 @@ static eNormalLineHeightControl sNormalLineHeightControl = eUninitialized;
// use for measuring things.
nsHTMLReflowState::nsHTMLReflowState(nsPresContext* aPresContext,
nsIFrame* aFrame,
nsRenderingContext* aRenderingContext,
nsRenderingContext* aRenderingContext,
const nsSize& aAvailableSpace,
uint32_t aFlags)
: nsCSSOffsetState(aFrame, aRenderingContext)
@ -72,9 +72,7 @@ nsHTMLReflowState::nsHTMLReflowState(nsPresContext* aPresContext,
mFlags.mDummyParentReflowState = true;
}
if (!(aFlags & CALLER_WILL_INIT)) {
Init(aPresContext);
}
Init(aPresContext);
}
static bool CheckNextInFlowParenthood(nsIFrame* aFrame, nsIFrame* aParent)
@ -123,7 +121,6 @@ FontSizeInflationListMarginAdjustment(const nsIFrame* aFrame)
return 0;
}
// Initialize a reflow state for a child frames reflow. Some state
// is copied from the parent reflow state; the remaining state is
// computed.
@ -133,7 +130,7 @@ nsHTMLReflowState::nsHTMLReflowState(nsPresContext* aPresContext,
const nsSize& aAvailableSpace,
nscoord aContainingBlockWidth,
nscoord aContainingBlockHeight,
uint32_t aFlags)
bool aInit)
: nsCSSOffsetState(aFrame, aParentReflowState.rendContext)
, mBlockDelta(0)
, mReflowDepth(aParentReflowState.mReflowDepth + 1)
@ -178,15 +175,11 @@ nsHTMLReflowState::nsHTMLReflowState(nsPresContext* aPresContext,
mFlags.mDummyParentReflowState = false;
mDiscoveredClearance = nullptr;
mPercentHeightObserver = (aParentReflowState.mPercentHeightObserver &&
aParentReflowState.mPercentHeightObserver->NeedsToObserve(*this))
mPercentHeightObserver = (aParentReflowState.mPercentHeightObserver &&
aParentReflowState.mPercentHeightObserver->NeedsToObserve(*this))
? aParentReflowState.mPercentHeightObserver : nullptr;
if (aFlags & DUMMY_PARENT_REFLOW_STATE) {
mFlags.mDummyParentReflowState = true;
}
if (!(aFlags & CALLER_WILL_INIT)) {
if (aInit) {
Init(aPresContext, aContainingBlockWidth, aContainingBlockHeight);
}
}

Просмотреть файл

@ -380,59 +380,30 @@ public:
// can use that and then override specific values if you want, or you can
// call Init as desired...
/**
* Initialize a ROOT reflow state.
*
* @param aPresContext Must be equal to aFrame->PresContext().
* @param aFrame The frame for whose reflow state is being constructed.
* @param aRenderingContext The rendering context to be used for measurements.
* @param aAvailableSpace See comments for availableHeight and availableWidth
* members.
* @param aFlags A set of flags used for additional boolean parameters (see
* below).
*/
// Initialize a <b>root</b> reflow state with a rendering context to
// use for measuring things.
nsHTMLReflowState(nsPresContext* aPresContext,
nsIFrame* aFrame,
nsRenderingContext* aRenderingContext,
nsRenderingContext* aRenderingContext,
const nsSize& aAvailableSpace,
uint32_t aFlags = 0);
/**
* Initialize a reflow state for a child frame's reflow. Some parts of the
* state are copied from the parent's reflow state. The remainder is computed.
*
* @param aPresContext Must be equal to aFrame->PresContext().
* @param aParentReflowState A reference to an nsHTMLReflowState object that
* is to be the parent of this object.
* @param aFrame The frame for whose reflow state is being constructed.
* @param aAvailableSpace See comments for availableHeight and availableWidth
* members.
* @param aContainingBlockWidth An optional width, in app units, that is used
* by absolute positioning code to override default containing block
* width.
* @param aContainingBlockHeight An optional height, in app units, that is
* used by absolute positioning code to override default containing
* block height.
* @param aFlags A set of flags used for additional boolean parameters (see
* below).
*/
// Initialize a reflow state for a child frame's reflow. Some state
// is copied from the parent reflow state; the remaining state is
// computed.
nsHTMLReflowState(nsPresContext* aPresContext,
const nsHTMLReflowState& aParentReflowState,
nsIFrame* aFrame,
const nsSize& aAvailableSpace,
// These two are used by absolute positioning code
// to override default containing block w & h:
nscoord aContainingBlockWidth = -1,
nscoord aContainingBlockHeight = -1,
uint32_t aFlags = 0);
bool aInit = true);
// Values for |aFlags| passed to constructor
enum {
// Indicates that the parent of this reflow state is "fake" (see
// mDummyParentReflowState in mFlags).
DUMMY_PARENT_REFLOW_STATE = (1<<0),
// Indicates that the calling function will initialize the reflow state, and
// that the constructor should not call Init().
CALLER_WILL_INIT = (1<<1)
DUMMY_PARENT_REFLOW_STATE = (1<<0)
};
// This method initializes various data members. It is automatically

Просмотреть файл

@ -911,7 +911,7 @@ nsMathMLContainerFrame::Reflow(nsPresContext* aPresContext,
while (childFrame) {
nsHTMLReflowMetrics childDesiredSize(aDesiredSize.mFlags);
nsHTMLReflowState childReflowState(aPresContext, aReflowState,
childFrame, availSize, (uint32_t)0);
childFrame, availSize);
nsresult rv = ReflowChild(childFrame, aPresContext, childDesiredSize,
childReflowState, childStatus);
//NS_ASSERTION(NS_FRAME_IS_COMPLETE(childStatus), "bad status");

Просмотреть файл

@ -2681,7 +2681,7 @@ nsTableFrame::SetupHeaderFooterChild(const nsTableReflowState& aReflowState,
nsHTMLReflowState kidReflowState(presContext, aReflowState.reflowState,
aFrame,
nsSize(aReflowState.availSize.width, NS_UNCONSTRAINEDSIZE),
-1, -1, nsHTMLReflowState::CALLER_WILL_INIT);
-1, -1, false);
InitChildReflowState(kidReflowState);
kidReflowState.mFlags.mIsTopOfPage = true;
nsHTMLReflowMetrics desiredSize;
@ -2708,8 +2708,7 @@ nsTableFrame::PlaceRepeatedFooter(nsTableReflowState& aReflowState,
nsHTMLReflowState footerReflowState(presContext,
aReflowState.reflowState,
aTfoot, kidAvailSize,
-1, -1,
nsHTMLReflowState::CALLER_WILL_INIT);
-1, -1, false);
InitChildReflowState(footerReflowState);
aReflowState.y += GetCellSpacingY();
@ -2829,8 +2828,7 @@ nsTableFrame::ReflowChildren(nsTableReflowState& aReflowState,
// Reflow the child into the available space
nsHTMLReflowState kidReflowState(presContext, aReflowState.reflowState,
kidFrame, kidAvailSize,
-1, -1,
nsHTMLReflowState::CALLER_WILL_INIT);
-1, -1, false);
InitChildReflowState(kidReflowState);
// If this isn't the first row group, and the previous row group has a

Просмотреть файл

@ -382,7 +382,7 @@ nsTableOuterFrame::GetChildMargin(nsPresContext* aPresContext,
// XXX We really shouldn't construct a reflow state to do this.
nsHTMLReflowState childRS(aPresContext, aOuterRS, aChildFrame,
nsSize(aAvailWidth, aOuterRS.availableHeight),
-1, -1, nsHTMLReflowState::CALLER_WILL_INIT);
-1, -1, false);
InitChildReflowState(*aPresContext, childRS);
aMargin = childRS.mComputedMargin;
@ -824,7 +824,7 @@ nsTableOuterFrame::OuterBeginReflowChild(nsPresContext* aPresContext,
// it
nsHTMLReflowState &childRS = * new (aChildRSSpace)
nsHTMLReflowState(aPresContext, aOuterRS, aChildFrame, availSize,
-1, -1, nsHTMLReflowState::CALLER_WILL_INIT);
-1, -1, false);
InitChildReflowState(*aPresContext, childRS);
// see if we need to reset top-of-page due to a caption

Просмотреть файл

@ -28,9 +28,9 @@ struct nsTableCellReflowState : public nsHTMLReflowState
const nsHTMLReflowState& aParentReflowState,
nsIFrame* aFrame,
const nsSize& aAvailableSpace,
uint32_t aFlags = 0)
bool aInit = true)
: nsHTMLReflowState(aPresContext, aParentReflowState, aFrame,
aAvailableSpace, -1, -1, aFlags)
aAvailableSpace, -1, -1, aInit)
{
}
@ -810,8 +810,7 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
// it's an unknown frame type, give it a generic reflow and ignore the results
nsTableCellReflowState kidReflowState(aPresContext, aReflowState,
kidFrame, nsSize(0,0),
nsHTMLReflowState::CALLER_WILL_INIT);
kidFrame, nsSize(0,0), false);
InitChildReflowState(*aPresContext, nsSize(0,0), false, kidReflowState);
nsHTMLReflowMetrics desiredSize;
nsReflowStatus status;
@ -890,8 +889,7 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
// Reflow the child
nsTableCellReflowState kidReflowState(aPresContext, aReflowState,
kidFrame, kidAvailSize,
nsHTMLReflowState::CALLER_WILL_INIT);
kidFrame, kidAvailSize, false);
InitChildReflowState(*aPresContext, kidAvailSize, borderCollapse,
kidReflowState);
@ -1085,8 +1083,7 @@ nsTableRowFrame::ReflowCellFrame(nsPresContext* aPresContext,
nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(this);
bool borderCollapse = tableFrame->IsBorderCollapse();
nsTableCellReflowState cellReflowState(aPresContext, aReflowState,
aCellFrame, availSize,
nsHTMLReflowState::CALLER_WILL_INIT);
aCellFrame, availSize, false);
InitChildReflowState(*aPresContext, availSize, borderCollapse, cellReflowState);
cellReflowState.mFlags.mIsTopOfPage = aIsTopOfPage;

Просмотреть файл

@ -371,8 +371,7 @@ nsTableRowGroupFrame::ReflowChildren(nsPresContext* aPresContext,
nsSize kidAvailSize(aReflowState.availSize.width, NS_UNCONSTRAINEDSIZE);
nsHTMLReflowState kidReflowState(aPresContext, aReflowState.reflowState,
kidFrame, kidAvailSize,
-1, -1,
nsHTMLReflowState::CALLER_WILL_INIT);
-1, -1, false);
InitChildReflowState(*aPresContext, borderCollapse, kidReflowState);
// This can indicate that columns were resized.
@ -934,8 +933,7 @@ nsTableRowGroupFrame::SplitSpanningCells(nsPresContext& aPresContext,
rowAvailSize.height = std::min(rowAvailSize.height, rowRect.height);
nsHTMLReflowState rowReflowState(&aPresContext, aReflowState,
row, rowAvailSize,
-1, -1,
nsHTMLReflowState::CALLER_WILL_INIT);
-1, -1, false);
InitChildReflowState(aPresContext, borderCollapse, rowReflowState);
rowReflowState.mFlags.mIsTopOfPage = isTopOfPage; // set top of page
@ -1070,8 +1068,7 @@ nsTableRowGroupFrame::SplitRowGroup(nsPresContext* aPresContext,
nsHTMLReflowState rowReflowState(aPresContext, aReflowState,
rowFrame, availSize,
-1, -1,
nsHTMLReflowState::CALLER_WILL_INIT);
-1, -1, false);
InitChildReflowState(*aPresContext, borderCollapse, rowReflowState);
rowReflowState.mFlags.mIsTopOfPage = isTopOfPage; // set top of page