Bug 1008917 - part 2,3,4, make Reflow() return type 'void', and make a few reflow related helper methods 'void' too. r=roc
This commit is contained in:
@@ -398,7 +398,7 @@ public:
|
||||
nsWeakFrame mFrame;
|
||||
};
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsComboboxControlFrame::ReflowDropdown(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState)
|
||||
{
|
||||
@@ -407,7 +407,7 @@ nsComboboxControlFrame::ReflowDropdown(nsPresContext* aPresContext,
|
||||
// need to reflow it, just bail out here.
|
||||
if (!aReflowState.ShouldReflowAllKids() &&
|
||||
!NS_SUBTREE_DIRTY(mDropdownFrame)) {
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
// XXXbz this will, for small-height dropdowns, have extra space on the right
|
||||
@@ -444,14 +444,12 @@ nsComboboxControlFrame::ReflowDropdown(nsPresContext* aPresContext,
|
||||
nsRect rect = mDropdownFrame->GetRect();
|
||||
nsHTMLReflowMetrics desiredSize(aReflowState);
|
||||
nsReflowStatus ignoredStatus;
|
||||
nsresult rv = ReflowChild(mDropdownFrame, aPresContext, desiredSize,
|
||||
kidReflowState, rect.x, rect.y, flags,
|
||||
ignoredStatus);
|
||||
ReflowChild(mDropdownFrame, aPresContext, desiredSize,
|
||||
kidReflowState, rect.x, rect.y, flags, ignoredStatus);
|
||||
|
||||
// Set the child's width and height to its desired size
|
||||
FinishReflowChild(mDropdownFrame, aPresContext, desiredSize,
|
||||
&kidReflowState, rect.x, rect.y, flags);
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsPoint
|
||||
@@ -759,7 +757,7 @@ nsComboboxControlFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
|
||||
return prefWidth;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsComboboxControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -778,7 +776,7 @@ nsComboboxControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
if (!mDisplayFrame || !mButtonFrame || !mDropdownFrame) {
|
||||
NS_ERROR("Why did the frame constructor allow this to happen? Fix it!!");
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
return;
|
||||
}
|
||||
|
||||
// Make sure the displayed text is the same as the selected option, bug 297389.
|
||||
@@ -828,9 +826,7 @@ nsComboboxControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
mDisplayWidth = aReflowState.ComputedWidth() - buttonWidth;
|
||||
|
||||
nsresult rv = nsBlockFrame::Reflow(aPresContext, aDesiredSize, aReflowState,
|
||||
aStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsBlockFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
|
||||
// The button should occupy the same space as a scrollbar
|
||||
nsRect buttonRect = mButtonFrame->GetRect();
|
||||
@@ -859,7 +855,6 @@ nsComboboxControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
// a nsComboboxControlFrame makes no sense, so we override the status here.
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
@@ -1213,7 +1208,7 @@ public:
|
||||
~(nsIFrame::eReplacedContainsBlock));
|
||||
}
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
@@ -1234,7 +1229,7 @@ nsComboboxDisplayFrame::GetType() const
|
||||
return nsGkAtoms::comboboxDisplayFrame;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsComboboxDisplayFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aCX,
|
||||
virtual void Reflow(nsPresContext* aCX,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
@@ -201,7 +201,7 @@ protected:
|
||||
friend class nsResizeDropdownAtFinalPosition;
|
||||
|
||||
// Utilities
|
||||
nsresult ReflowDropdown(nsPresContext* aPresContext,
|
||||
void ReflowDropdown(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState);
|
||||
|
||||
enum DropDownPositionState {
|
||||
|
||||
@@ -339,7 +339,7 @@ nsFieldSetFrame::ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
return result;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -554,7 +554,6 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
|
||||
InvalidateFrame();
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
*/
|
||||
virtual nsRect VisualBorderRectRelativeToSelf() const MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -73,7 +73,7 @@ nsFormControlFrame::GetBaseline() const
|
||||
return mRect.height - GetUsedBorderAndPadding().bottom;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsFormControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -86,11 +86,7 @@ nsFormControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
RegUnRegAccessKey(static_cast<nsIFrame*>(this), true);
|
||||
}
|
||||
|
||||
nsresult rv = nsLeafFrame::Reflow(aPresContext, aDesiredSize, aReflowState,
|
||||
aStatus);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
nsLeafFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
|
||||
if (nsLayoutUtils::FontSizeInflationEnabled(aPresContext)) {
|
||||
float inflation = nsLayoutUtils::FontSizeInflationFor(this);
|
||||
@@ -99,7 +95,6 @@ nsFormControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
aDesiredSize.UnionOverflowAreasWithDesiredBounds();
|
||||
FinishAndStoreOverflow(&aDesiredSize);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
* Respond to the request to resize and/or reflow
|
||||
* @see nsIFrame::Reflow
|
||||
*/
|
||||
virtual nsresult Reflow(nsPresContext* aCX,
|
||||
virtual void Reflow(nsPresContext* aCX,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -162,7 +162,7 @@ nsHTMLButtonControlFrame::GetPrefWidth(nsRenderingContext* aRenderingContext)
|
||||
return result;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsHTMLButtonControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -205,7 +205,6 @@ nsHTMLButtonControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
aReflowState, aStatus);
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Helper-function that lets us clone the button's reflow state, but with its
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
NS_DECL_QUERYFRAME
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
@@ -124,7 +124,7 @@ nsImageControlFrame::GetType() const
|
||||
return nsGkAtoms::imageControlFrame;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsImageControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
|
||||
@@ -47,7 +47,7 @@ NS_QUERYFRAME_HEAD(nsLegendFrame)
|
||||
NS_QUERYFRAME_ENTRY(nsLegendFrame)
|
||||
NS_QUERYFRAME_TAIL_INHERITING(nsBlockFrame)
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsLegendFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
|
||||
nsLegendFrame(nsStyleContext* aContext) : nsBlockFrame(aContext) {}
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -329,7 +329,7 @@ nsListControlFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
|
||||
return result;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsListControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -358,7 +358,8 @@ nsListControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
}
|
||||
|
||||
if (IsInDropDownMode()) {
|
||||
return ReflowAsDropdown(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
ReflowAsDropdown(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -398,9 +399,7 @@ nsListControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
state.SetComputedHeight(computedHeight);
|
||||
}
|
||||
|
||||
nsresult rv = nsHTMLScrollFrame::Reflow(aPresContext, aDesiredSize,
|
||||
state, aStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsHTMLScrollFrame::Reflow(aPresContext, aDesiredSize, state, aStatus);
|
||||
|
||||
if (!mMightNeedSecondPass) {
|
||||
NS_ASSERTION(!autoHeight || HeightOfARow() == oldHeightOfARow,
|
||||
@@ -426,7 +425,7 @@ nsListControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
return;
|
||||
}
|
||||
|
||||
mMightNeedSecondPass = false;
|
||||
@@ -438,7 +437,7 @@ nsListControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
NS_ASSERTION(!IsScrollbarUpdateSuppressed(),
|
||||
"Shouldn't be suppressing if the height of a row has not "
|
||||
"changed!");
|
||||
return rv;
|
||||
return;
|
||||
}
|
||||
|
||||
SetSuppressScrollbarUpdate(false);
|
||||
@@ -461,10 +460,10 @@ nsListControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
// XXXbz to make the ascent really correct, we should add our
|
||||
// mComputedPadding.top to it (and subtract it from descent). Need that
|
||||
// because nsGfxScrollFrame just adds in the border....
|
||||
return nsHTMLScrollFrame::Reflow(aPresContext, aDesiredSize, state, aStatus);
|
||||
nsHTMLScrollFrame::Reflow(aPresContext, aDesiredSize, state, aStatus);
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsListControlFrame::ReflowAsDropdown(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -493,9 +492,7 @@ nsListControlFrame::ReflowAsDropdown(nsPresContext* aPresContext,
|
||||
state.SetComputedHeight(mLastDropdownComputedHeight);
|
||||
}
|
||||
|
||||
nsresult rv = nsHTMLScrollFrame::Reflow(aPresContext, aDesiredSize,
|
||||
state, aStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsHTMLScrollFrame::Reflow(aPresContext, aDesiredSize, state, aStatus);
|
||||
|
||||
if (!mMightNeedSecondPass) {
|
||||
NS_ASSERTION(oldVisibleHeight == GetScrolledFrame()->GetSize().height,
|
||||
@@ -506,7 +503,7 @@ nsListControlFrame::ReflowAsDropdown(nsPresContext* aPresContext,
|
||||
"Shouldn't be suppressing if we don't need a second pass!");
|
||||
NS_ASSERTION(!(GetStateBits() & NS_FRAME_FIRST_REFLOW),
|
||||
"How can we avoid a second pass during first reflow?");
|
||||
return rv;
|
||||
return;
|
||||
}
|
||||
|
||||
mMightNeedSecondPass = false;
|
||||
@@ -517,7 +514,7 @@ nsListControlFrame::ReflowAsDropdown(nsPresContext* aPresContext,
|
||||
// All done. No need to do more reflow.
|
||||
NS_ASSERTION(!(GetStateBits() & NS_FRAME_FIRST_REFLOW),
|
||||
"How can we avoid a second pass during first reflow?");
|
||||
return rv;
|
||||
return;
|
||||
}
|
||||
|
||||
SetSuppressScrollbarUpdate(false);
|
||||
@@ -579,7 +576,7 @@ nsListControlFrame::ReflowAsDropdown(nsPresContext* aPresContext,
|
||||
mLastDropdownComputedHeight = state.ComputedHeight();
|
||||
|
||||
nsHTMLScrollFrame::WillReflow(aPresContext);
|
||||
return nsHTMLScrollFrame::Reflow(aPresContext, aDesiredSize, state, aStatus);
|
||||
nsHTMLScrollFrame::Reflow(aPresContext, aDesiredSize, state, aStatus);
|
||||
}
|
||||
|
||||
ScrollbarStyles
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aCX,
|
||||
virtual void Reflow(nsPresContext* aCX,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
@@ -343,7 +343,7 @@ protected:
|
||||
* reflow as a listbox because the criteria for needing a second
|
||||
* pass are different. This will be called from Reflow() as needed.
|
||||
*/
|
||||
nsresult ReflowAsDropdown(nsPresContext* aPresContext,
|
||||
void ReflowAsDropdown(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
|
||||
@@ -91,7 +91,8 @@ NS_QUERYFRAME_HEAD(nsMeterFrame)
|
||||
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
|
||||
|
||||
|
||||
nsresult nsMeterFrame::Reflow(nsPresContext* aPresContext,
|
||||
void
|
||||
nsMeterFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
@@ -125,8 +126,6 @@ nsresult nsMeterFrame::Reflow(nsPresContext* aPresContext,
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aCX,
|
||||
virtual void Reflow(nsPresContext* aCX,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -99,7 +99,7 @@ nsNumberControlFrame::GetPrefWidth(nsRenderingContext* aRenderingContext)
|
||||
return result;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -150,10 +150,8 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
wrapperReflowState.ComputedPhysicalMargin().top;
|
||||
|
||||
nsReflowStatus childStatus;
|
||||
nsresult rv = ReflowChild(outerWrapperFrame, aPresContext,
|
||||
wrappersDesiredSize, wrapperReflowState,
|
||||
xoffset, yoffset, 0, childStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
ReflowChild(outerWrapperFrame, aPresContext, wrappersDesiredSize,
|
||||
wrapperReflowState, xoffset, yoffset, 0, childStatus);
|
||||
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(childStatus),
|
||||
"We gave our child unconstrained height, so it should be complete");
|
||||
|
||||
@@ -181,10 +179,8 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
yoffset += std::max(0, extraSpace / 2);
|
||||
|
||||
// Place the child
|
||||
rv = FinishReflowChild(outerWrapperFrame, aPresContext,
|
||||
wrappersDesiredSize, &wrapperReflowState,
|
||||
xoffset, yoffset, 0);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
FinishReflowChild(outerWrapperFrame, aPresContext, wrappersDesiredSize,
|
||||
&wrapperReflowState, xoffset, yoffset, 0);
|
||||
|
||||
aDesiredSize.SetTopAscent(wrappersDesiredSize.TopAscent() +
|
||||
outerWrapperFrame->GetPosition().y);
|
||||
@@ -206,8 +202,6 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -96,7 +96,8 @@ nsProgressFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
||||
}
|
||||
|
||||
nsresult nsProgressFrame::Reflow(nsPresContext* aPresContext,
|
||||
void
|
||||
nsProgressFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
@@ -130,8 +131,6 @@ nsresult nsProgressFrame::Reflow(nsPresContext* aPresContext,
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aCX,
|
||||
virtual void Reflow(nsPresContext* aCX,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -265,7 +265,7 @@ nsRangeFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
new (aBuilder) nsDisplayRangeFocusRing(aBuilder, this));
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsRangeFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -294,9 +294,7 @@ nsRangeFrame::Reflow(nsPresContext* aPresContext,
|
||||
aDesiredSize.Height() = computedHeight +
|
||||
aReflowState.ComputedPhysicalBorderPadding().TopBottom();
|
||||
|
||||
nsresult rv =
|
||||
ReflowAnonymousContent(aPresContext, aDesiredSize, aReflowState);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
aDesiredSize.SetOverflowAreasToDesiredBounds();
|
||||
|
||||
@@ -320,11 +318,9 @@ nsRangeFrame::Reflow(nsPresContext* aPresContext,
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState)
|
||||
@@ -370,14 +366,12 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
|
||||
|
||||
nsReflowStatus frameStatus;
|
||||
nsHTMLReflowMetrics trackDesiredSize(aReflowState);
|
||||
nsresult rv = ReflowChild(trackFrame, aPresContext, trackDesiredSize,
|
||||
ReflowChild(trackFrame, aPresContext, trackDesiredSize,
|
||||
trackReflowState, trackX, trackY, 0, frameStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus),
|
||||
"We gave our child unconstrained height, so it should be complete");
|
||||
rv = FinishReflowChild(trackFrame, aPresContext, trackDesiredSize,
|
||||
FinishReflowChild(trackFrame, aPresContext, trackDesiredSize,
|
||||
&trackReflowState, trackX, trackY, 0);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
nsIFrame* thumbFrame = mThumbDiv->GetPrimaryFrame();
|
||||
@@ -392,15 +386,12 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
|
||||
|
||||
nsReflowStatus frameStatus;
|
||||
nsHTMLReflowMetrics thumbDesiredSize(aReflowState);
|
||||
nsresult rv = ReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
|
||||
ReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
|
||||
thumbReflowState, 0, 0, 0, frameStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus),
|
||||
"We gave our child unconstrained height, so it should be complete");
|
||||
rv = FinishReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
|
||||
FinishReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
|
||||
&thumbReflowState, 0, 0, 0);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
DoUpdateThumbPosition(thumbFrame, nsSize(aDesiredSize.Width(),
|
||||
aDesiredSize.Height()));
|
||||
}
|
||||
@@ -419,21 +410,16 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
|
||||
|
||||
nsReflowStatus frameStatus;
|
||||
nsHTMLReflowMetrics progressDesiredSize(aReflowState);
|
||||
nsresult rv = ReflowChild(rangeProgressFrame, aPresContext,
|
||||
ReflowChild(rangeProgressFrame, aPresContext,
|
||||
progressDesiredSize, progressReflowState, 0, 0,
|
||||
0, frameStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus),
|
||||
"We gave our child unconstrained height, so it should be complete");
|
||||
rv = FinishReflowChild(rangeProgressFrame, aPresContext,
|
||||
FinishReflowChild(rangeProgressFrame, aPresContext,
|
||||
progressDesiredSize, &progressReflowState, 0, 0, 0);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
DoUpdateRangeProgressFrame(rangeProgressFrame, nsSize(aDesiredSize.Width(),
|
||||
aDesiredSize.Height()));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
@@ -140,7 +140,7 @@ private:
|
||||
nsTArray<ContentInfo>& aElements);
|
||||
|
||||
// Helper function which reflows the anonymous div frames.
|
||||
nsresult ReflowAnonymousContent(nsPresContext* aPresContext,
|
||||
void ReflowAnonymousContent(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState);
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ nsSelectsAreaFrame::BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsSelectsAreaFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -177,9 +177,7 @@ nsSelectsAreaFrame::Reflow(nsPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
|
||||
nsresult rv = nsBlockFrame::Reflow(aPresContext, aDesiredSize,
|
||||
aReflowState, aStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsBlockFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
|
||||
// Check whether we need to suppress scrollbar updates. We want to do that if
|
||||
// we're in a possible first pass and our height of a row has changed.
|
||||
@@ -195,6 +193,4 @@ nsSelectsAreaFrame::Reflow(nsPresContext* aPresContext,
|
||||
list->SetSuppressScrollbarUpdate(true);
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists);
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aCX,
|
||||
virtual void Reflow(nsPresContext* aCX,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -462,7 +462,7 @@ nsTextControlFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
|
||||
return autoSize;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsTextControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -490,10 +490,8 @@ nsTextControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
NS_AUTOHEIGHT, inflation);
|
||||
}
|
||||
nsRefPtr<nsFontMetrics> fontMet;
|
||||
nsresult rv = nsLayoutUtils::GetFontMetricsForFrame(this,
|
||||
getter_AddRefs(fontMet),
|
||||
nsLayoutUtils::GetFontMetricsForFrame(this, getter_AddRefs(fontMet),
|
||||
inflation);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
// now adjust for our borders and padding
|
||||
aDesiredSize.SetTopAscent(
|
||||
nsLayoutUtils::GetCenteredFontBaseline(fontMet, lineHeight)
|
||||
@@ -513,7 +511,6 @@ nsTextControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
nsSize aMargin, nsSize aBorder,
|
||||
nsSize aPadding, bool aShrinkWrap) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -343,7 +343,7 @@ nsAbsoluteContainingBlock::DoMarkFramesDirty(bool aMarkAllDirty)
|
||||
// mChildListID == kFixedList, the height is unconstrained.
|
||||
// since we don't allow replicated frames to split.
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegatingFrame,
|
||||
nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -412,7 +412,7 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
|
||||
}
|
||||
|
||||
// Do the reflow
|
||||
nsresult rv = aKidFrame->Reflow(aPresContext, kidDesiredSize, kidReflowState, aStatus);
|
||||
aKidFrame->Reflow(aPresContext, kidDesiredSize, kidReflowState, aStatus);
|
||||
|
||||
// If we're solving for 'left' or 'top', then compute it now that we know the
|
||||
// width/height
|
||||
@@ -497,6 +497,4 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
|
||||
if (aOverflowAreas) {
|
||||
aOverflowAreas->UnionWith(kidDesiredSize.mOverflowAreas + rect.TopLeft());
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ protected:
|
||||
bool FrameDependsOnContainer(nsIFrame* aFrame, bool aCBWidthChanged,
|
||||
bool aCBHeightChanged);
|
||||
|
||||
nsresult ReflowAbsoluteFrame(nsIFrame* aDelegatingFrame,
|
||||
void ReflowAbsoluteFrame(nsIFrame* aDelegatingFrame,
|
||||
nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
const nsRect& aContainingBlockRect,
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
bool aIsKeyboardSelect, int32_t* aOffset,
|
||||
PeekWordState* aState) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
@@ -77,7 +77,7 @@ BRFrame::~BRFrame()
|
||||
{
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
BRFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -154,7 +154,6 @@ BRFrame::Reflow(nsPresContext* aPresContext,
|
||||
mAscent = aMetrics.TopAscent();
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
|
||||
@@ -933,7 +933,7 @@ CalculateContainingBlockSizeForAbsolutes(const nsHTMLReflowState& aReflowState,
|
||||
return cbSize;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -1009,7 +1009,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
||||
ClearLineCursor();
|
||||
|
||||
if (IsFrameTreeTooDeep(*reflowState, aMetrics, aStatus)) {
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
bool topMarginRoot, bottomMarginRoot;
|
||||
@@ -1028,8 +1028,6 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
||||
AddStateBits(NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
// ALWAYS drain overflow. We never want to leave the previnflow's
|
||||
// overflow lines hanging around; block reflow depends on the
|
||||
// overflow line lists being cleared out between reflow passes.
|
||||
@@ -1066,7 +1064,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
||||
mState &= ~NS_FRAME_FIRST_REFLOW;
|
||||
|
||||
// Now reflow...
|
||||
rv = ReflowDirtyLines(state);
|
||||
ReflowDirtyLines(state);
|
||||
|
||||
// If we have a next-in-flow, and that next-in-flow has pushed floats from
|
||||
// this frame from a previous iteration of reflow, then we should not return
|
||||
@@ -1088,9 +1086,6 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "reflow dirty lines failed");
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
NS_MergeReflowStatusInto(&state.mReflowStatus, ocStatus);
|
||||
NS_MergeReflowStatusInto(&state.mReflowStatus, fcStatus);
|
||||
|
||||
@@ -1295,7 +1290,6 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
||||
#endif
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, (*reflowState), aMetrics);
|
||||
return rv;
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -2073,8 +2067,7 @@ nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState)
|
||||
|
||||
// Reflow the dirty line. If it's an incremental reflow, then force
|
||||
// it to invalidate the dirty area if necessary
|
||||
rv = ReflowLine(aState, line, &keepGoing);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
ReflowLine(aState, line, &keepGoing);
|
||||
|
||||
if (aState.mReflowState.WillReflowAgainForClearance()) {
|
||||
line->MarkDirty();
|
||||
@@ -2359,8 +2352,7 @@ nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState)
|
||||
// line to be created; see SplitLine's callers for examples of
|
||||
// when this happens).
|
||||
while (line != end_lines()) {
|
||||
rv = ReflowLine(aState, line, &keepGoing);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
ReflowLine(aState, line, &keepGoing);
|
||||
|
||||
if (aState.mReflowState.WillReflowAgainForClearance()) {
|
||||
line->MarkDirty();
|
||||
@@ -2538,13 +2530,11 @@ nsBlockFrame::DeleteLine(nsBlockReflowState& aState,
|
||||
* or contain 1 or more inline frames. aKeepReflowGoing indicates
|
||||
* whether or not the caller should continue to reflow more lines.
|
||||
*/
|
||||
nsresult
|
||||
void
|
||||
nsBlockFrame::ReflowLine(nsBlockReflowState& aState,
|
||||
line_iterator aLine,
|
||||
bool* aKeepReflowGoing)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
NS_ABORT_IF_FALSE(aLine->GetChildCount(), "reflowing empty line");
|
||||
|
||||
// Setup the line-layout for the new line
|
||||
@@ -2555,13 +2545,11 @@ nsBlockFrame::ReflowLine(nsBlockReflowState& aState,
|
||||
|
||||
// Now that we know what kind of line we have, reflow it
|
||||
if (aLine->IsBlock()) {
|
||||
rv = ReflowBlockFrame(aState, aLine, aKeepReflowGoing);
|
||||
ReflowBlockFrame(aState, aLine, aKeepReflowGoing);
|
||||
} else {
|
||||
aLine->SetLineWrapped(false);
|
||||
rv = ReflowInlineFrames(aState, aLine, aKeepReflowGoing);
|
||||
ReflowInlineFrames(aState, aLine, aKeepReflowGoing);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsIFrame*
|
||||
@@ -2875,19 +2863,17 @@ nsBlockFrame::ShouldApplyTopMargin(nsBlockReflowState& aState,
|
||||
return false;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
||||
line_iterator aLine,
|
||||
bool* aKeepReflowGoing)
|
||||
{
|
||||
NS_PRECONDITION(*aKeepReflowGoing, "bad caller");
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsIFrame* frame = aLine->mFirstChild;
|
||||
if (!frame) {
|
||||
NS_ASSERTION(false, "program error - unexpected empty line");
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
return;
|
||||
}
|
||||
|
||||
// Prepare the block reflow engine
|
||||
@@ -2948,7 +2934,7 @@ nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
||||
aState.mPrevChild = frame;
|
||||
// Exactly what we do now is flexible since we'll definitely be
|
||||
// reflowed.
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (treatWithClearance) {
|
||||
@@ -3102,7 +3088,7 @@ nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
||||
PushLines(aState, aLine.prev());
|
||||
NS_FRAME_SET_INCOMPLETE(aState.mReflowStatus);
|
||||
}
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
// Now put the Y coordinate back to the top of the top-margin +
|
||||
@@ -3129,12 +3115,10 @@ nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
||||
}
|
||||
|
||||
nsReflowStatus frameReflowStatus = NS_FRAME_COMPLETE;
|
||||
rv = brc.ReflowBlock(availSpace, applyTopMargin, aState.mPrevBottomMargin,
|
||||
brc.ReflowBlock(availSpace, applyTopMargin, aState.mPrevBottomMargin,
|
||||
clearance, aState.IsAdjacentWithTop(),
|
||||
aLine.get(), blockHtmlRS, frameReflowStatus, aState);
|
||||
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (mayNeedRetry && clearanceFrame) {
|
||||
aState.mFloatManager->PopState(&floatManagerState);
|
||||
aState.mY = startingY;
|
||||
@@ -3152,7 +3136,7 @@ nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
||||
// all of the child block, including the lines it didn't reflow.
|
||||
NS_ASSERTION(originalPosition == frame->GetPosition(),
|
||||
"we need to call PositionChildViews");
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(REFLOW_STATUS_COVERAGE)
|
||||
@@ -3224,8 +3208,10 @@ nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
||||
nsOverflowContinuationTracker::AutoFinish fini(aState.mOverflowTracker, frame);
|
||||
nsContainerFrame* parent =
|
||||
static_cast<nsContainerFrame*>(nextFrame->GetParent());
|
||||
rv = parent->StealFrame(nextFrame);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsresult rv = parent->StealFrame(nextFrame);
|
||||
if (NS_FAILED(rv)) {
|
||||
return;
|
||||
}
|
||||
if (parent != this)
|
||||
ReparentFrame(nextFrame, parent, this);
|
||||
mFrames.InsertFrame(nullptr, frame, nextFrame);
|
||||
@@ -3291,8 +3277,10 @@ nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
||||
// to dig it out of the child lists.
|
||||
nsContainerFrame* parent = static_cast<nsContainerFrame*>
|
||||
(nextFrame->GetParent());
|
||||
rv = parent->StealFrame(nextFrame);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsresult rv = parent->StealFrame(nextFrame);
|
||||
if (NS_FAILED(rv)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (madeContinuation) {
|
||||
mFrames.RemoveFrame(nextFrame);
|
||||
@@ -3359,15 +3347,13 @@ nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
||||
#ifdef DEBUG
|
||||
VerifyLines(true);
|
||||
#endif
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsBlockFrame::ReflowInlineFrames(nsBlockReflowState& aState,
|
||||
line_iterator aLine,
|
||||
bool* aKeepReflowGoing)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
*aKeepReflowGoing = true;
|
||||
|
||||
aLine->SetLineIsImpactedByFloat(false);
|
||||
@@ -3405,16 +3391,12 @@ nsBlockFrame::ReflowInlineFrames(nsBlockReflowState& aState,
|
||||
if (forceBreakInContent) {
|
||||
lineLayout.ForceBreakAtPosition(forceBreakInContent, forceBreakOffset);
|
||||
}
|
||||
rv = DoReflowInlineFrames(aState, lineLayout, aLine,
|
||||
DoReflowInlineFrames(aState, lineLayout, aLine,
|
||||
floatAvailableSpace, availableSpaceHeight,
|
||||
&floatManagerState, aKeepReflowGoing,
|
||||
&lineReflowStatus, allowPullUp);
|
||||
lineLayout.EndLineReflow();
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (LINE_REFLOW_REDO_NO_PULL == lineReflowStatus ||
|
||||
LINE_REFLOW_REDO_MORE_FLOATS == lineReflowStatus ||
|
||||
LINE_REFLOW_REDO_NEXT_BAND == lineReflowStatus) {
|
||||
@@ -3439,8 +3421,6 @@ nsBlockFrame::ReflowInlineFrames(nsBlockReflowState& aState,
|
||||
} while (LINE_REFLOW_REDO_NO_PULL == lineReflowStatus);
|
||||
} while (LINE_REFLOW_REDO_MORE_FLOATS == lineReflowStatus);
|
||||
} while (LINE_REFLOW_REDO_NEXT_BAND == lineReflowStatus);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -3461,7 +3441,7 @@ static const char* LineReflowStatusNames[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsBlockFrame::DoReflowInlineFrames(nsBlockReflowState& aState,
|
||||
nsLineLayout& aLineLayout,
|
||||
line_iterator aLine,
|
||||
@@ -3525,7 +3505,6 @@ nsBlockFrame::DoReflowInlineFrames(nsBlockReflowState& aState,
|
||||
"first letter child bit should only be on first continuation");
|
||||
|
||||
// Reflow the frames that are already on the line first
|
||||
nsresult rv = NS_OK;
|
||||
LineReflowStatus lineReflowStatus = LINE_REFLOW_OK;
|
||||
int32_t i;
|
||||
nsIFrame* frame = aLine->mFirstChild;
|
||||
@@ -3542,9 +3521,7 @@ nsBlockFrame::DoReflowInlineFrames(nsBlockReflowState& aState,
|
||||
// count can change during the loop!
|
||||
for (i = 0; LINE_REFLOW_OK == lineReflowStatus && i < aLine->GetChildCount();
|
||||
i++, frame = frame->GetNextSibling()) {
|
||||
rv = ReflowInlineFrame(aState, aLineLayout, aLine, frame,
|
||||
&lineReflowStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
ReflowInlineFrame(aState, aLineLayout, aLine, frame, &lineReflowStatus);
|
||||
if (LINE_REFLOW_OK != lineReflowStatus) {
|
||||
// It is possible that one or more of next lines are empty
|
||||
// (because of DeleteNextInFlowChild). If so, delete them now
|
||||
@@ -3577,9 +3554,7 @@ nsBlockFrame::DoReflowInlineFrames(nsBlockReflowState& aState,
|
||||
|
||||
while (LINE_REFLOW_OK == lineReflowStatus) {
|
||||
int32_t oldCount = aLine->GetChildCount();
|
||||
rv = ReflowInlineFrame(aState, aLineLayout, aLine, frame,
|
||||
&lineReflowStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
ReflowInlineFrame(aState, aLineLayout, aLine, frame, &lineReflowStatus);
|
||||
if (aLine->GetChildCount() != oldCount) {
|
||||
// We just created a continuation for aFrame AND its going
|
||||
// to end up on this line (e.g. :first-letter
|
||||
@@ -3711,8 +3686,6 @@ nsBlockFrame::DoReflowInlineFrames(nsBlockReflowState& aState,
|
||||
}
|
||||
|
||||
*aLineReflowStatus = lineReflowStatus;
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3723,14 +3696,17 @@ nsBlockFrame::DoReflowInlineFrames(nsBlockReflowState& aState,
|
||||
* has some sort of breaking affect then aLine's break-type will be set
|
||||
* to something other than NS_STYLE_CLEAR_NONE.
|
||||
*/
|
||||
nsresult
|
||||
void
|
||||
nsBlockFrame::ReflowInlineFrame(nsBlockReflowState& aState,
|
||||
nsLineLayout& aLineLayout,
|
||||
line_iterator aLine,
|
||||
nsIFrame* aFrame,
|
||||
LineReflowStatus* aLineReflowStatus)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aFrame);
|
||||
if (!aFrame) { // XXX change to MOZ_ASSERT(aFrame)
|
||||
NS_ERROR("why call me?");
|
||||
return;
|
||||
}
|
||||
|
||||
*aLineReflowStatus = LINE_REFLOW_OK;
|
||||
|
||||
@@ -3745,15 +3721,12 @@ nsBlockFrame::ReflowInlineFrame(nsBlockReflowState& aState,
|
||||
// Reflow the inline frame
|
||||
nsReflowStatus frameReflowStatus;
|
||||
bool pushedFrame;
|
||||
nsresult rv = aLineLayout.ReflowFrame(aFrame, frameReflowStatus,
|
||||
nullptr, pushedFrame);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aLineLayout.ReflowFrame(aFrame, frameReflowStatus, nullptr, pushedFrame);
|
||||
|
||||
if (frameReflowStatus & NS_FRAME_REFLOW_NEXTINFLOW) {
|
||||
aLineLayout.SetDirtyNextLine();
|
||||
}
|
||||
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
#ifdef REALLY_NOISY_REFLOW_CHILD
|
||||
nsFrame::ListTag(stdout, aFrame);
|
||||
printf(": status=%x\n", frameReflowStatus);
|
||||
@@ -3862,8 +3835,6 @@ nsBlockFrame::ReflowInlineFrame(nsBlockReflowState& aState,
|
||||
SplitLine(aState, aLineLayout, aLine, aFrame->GetNextSibling(), aLineReflowStatus);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -5789,7 +5760,7 @@ nsBlockFrame::ComputeFloatWidth(nsBlockReflowState& aState,
|
||||
floatRS.ComputedPhysicalMargin().LeftRight();
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsBlockFrame::ReflowFloat(nsBlockReflowState& aState,
|
||||
const nsRect& aAdjustedAvailableSpace,
|
||||
nsIFrame* aFloat,
|
||||
@@ -5836,7 +5807,6 @@ nsBlockFrame::ReflowFloat(nsBlockReflowState& aState,
|
||||
bool isAdjacentWithTop = aState.IsAdjacentWithTop();
|
||||
|
||||
nsIFrame* clearanceFrame = nullptr;
|
||||
nsresult rv;
|
||||
do {
|
||||
nsCollapsingMargin margin;
|
||||
bool mayNeedRetry = false;
|
||||
@@ -5853,11 +5823,11 @@ nsBlockFrame::ReflowFloat(nsBlockReflowState& aState,
|
||||
}
|
||||
}
|
||||
|
||||
rv = brc.ReflowBlock(aAdjustedAvailableSpace, true, margin,
|
||||
brc.ReflowBlock(aAdjustedAvailableSpace, true, margin,
|
||||
0, isAdjacentWithTop,
|
||||
nullptr, floatRS,
|
||||
aReflowStatus, aState);
|
||||
} while (NS_SUCCEEDED(rv) && clearanceFrame);
|
||||
} while (clearanceFrame);
|
||||
|
||||
if (!NS_FRAME_IS_FULLY_COMPLETE(aReflowStatus) &&
|
||||
ShouldAvoidBreakInside(floatRS)) {
|
||||
@@ -5881,10 +5851,6 @@ nsBlockFrame::ReflowFloat(nsBlockReflowState& aState,
|
||||
aReflowStatus = NS_FRAME_COMPLETE;
|
||||
}
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
// Capture the margin and offsets information for the caller
|
||||
aFloatMargin = floatRS.ComputedPhysicalMargin(); // float margins don't collapse
|
||||
aFloatOffsets = floatRS.ComputedPhysicalOffsets();
|
||||
@@ -5912,8 +5878,6 @@ nsBlockFrame::ReflowFloat(nsBlockReflowState& aState,
|
||||
printf("end ReflowFloat %p, sized to %d,%d\n",
|
||||
aFloat, metrics.Width(), metrics.Height());
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
nscoord aConsumed);
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
@@ -594,7 +594,7 @@ protected:
|
||||
* or contain 1 or more inline frames.
|
||||
* @param aKeepReflowGoing [OUT] indicates whether the caller should continue to reflow more lines
|
||||
*/
|
||||
nsresult ReflowLine(nsBlockReflowState& aState,
|
||||
void ReflowLine(nsBlockReflowState& aState,
|
||||
line_iterator aLine,
|
||||
bool* aKeepReflowGoing);
|
||||
|
||||
@@ -639,15 +639,15 @@ protected:
|
||||
bool ShouldApplyTopMargin(nsBlockReflowState& aState,
|
||||
nsLineBox* aLine);
|
||||
|
||||
nsresult ReflowBlockFrame(nsBlockReflowState& aState,
|
||||
void ReflowBlockFrame(nsBlockReflowState& aState,
|
||||
line_iterator aLine,
|
||||
bool* aKeepGoing);
|
||||
|
||||
nsresult ReflowInlineFrames(nsBlockReflowState& aState,
|
||||
void ReflowInlineFrames(nsBlockReflowState& aState,
|
||||
line_iterator aLine,
|
||||
bool* aKeepLineGoing);
|
||||
|
||||
nsresult DoReflowInlineFrames(nsBlockReflowState& aState,
|
||||
void DoReflowInlineFrames(nsBlockReflowState& aState,
|
||||
nsLineLayout& aLineLayout,
|
||||
line_iterator aLine,
|
||||
nsFlowAreaRect& aFloatAvailableSpace,
|
||||
@@ -658,7 +658,7 @@ protected:
|
||||
LineReflowStatus* aLineReflowStatus,
|
||||
bool aAllowPullUp);
|
||||
|
||||
nsresult ReflowInlineFrame(nsBlockReflowState& aState,
|
||||
void ReflowInlineFrame(nsBlockReflowState& aState,
|
||||
nsLineLayout& aLineLayout,
|
||||
line_iterator aLine,
|
||||
nsIFrame* aFrame,
|
||||
@@ -676,7 +676,7 @@ protected:
|
||||
// but only if the available height is constrained.
|
||||
// aAdjustedAvailableSpace is the result of calling
|
||||
// nsBlockFrame::AdjustFloatAvailableSpace.
|
||||
nsresult ReflowFloat(nsBlockReflowState& aState,
|
||||
void ReflowFloat(nsBlockReflowState& aState,
|
||||
const nsRect& aAdjustedAvailableSpace,
|
||||
nsIFrame* aFloat,
|
||||
nsMargin& aFloatMargin,
|
||||
|
||||
@@ -195,7 +195,7 @@ nsBlockReflowContext::ComputeCollapsedTopMargin(const nsHTMLReflowState& aRS,
|
||||
return dirtiedLine;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsBlockReflowContext::ReflowBlock(const nsRect& aSpace,
|
||||
bool aApplyTopMargin,
|
||||
nsCollapsingMargin& aPrevMargin,
|
||||
@@ -206,7 +206,6 @@ nsBlockReflowContext::ReflowBlock(const nsRect& aSpace,
|
||||
nsReflowStatus& aFrameReflowStatus,
|
||||
nsBlockReflowState& aState)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
mFrame = aFrameRS.frame;
|
||||
mSpace = aSpace;
|
||||
|
||||
@@ -258,7 +257,7 @@ nsBlockReflowContext::ReflowBlock(const nsRect& aSpace,
|
||||
#endif
|
||||
|
||||
mOuterReflowState.mFloatManager->Translate(tx, ty);
|
||||
rv = mFrame->Reflow(mPresContext, mMetrics, aFrameRS, aFrameReflowStatus);
|
||||
mFrame->Reflow(mPresContext, mMetrics, aFrameRS, aFrameReflowStatus);
|
||||
mOuterReflowState.mFloatManager->Translate(-tx, -ty);
|
||||
|
||||
#ifdef DEBUG
|
||||
@@ -301,8 +300,6 @@ nsBlockReflowContext::ReflowBlock(const nsRect& aSpace,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
const nsHTMLReflowState& aParentRS);
|
||||
~nsBlockReflowContext() { }
|
||||
|
||||
nsresult ReflowBlock(const nsRect& aSpace,
|
||||
void ReflowBlock(const nsRect& aSpace,
|
||||
bool aApplyTopMargin,
|
||||
nsCollapsingMargin& aPrevMargin,
|
||||
nscoord aClearance,
|
||||
|
||||
@@ -1653,7 +1653,7 @@ nsBulletFrame::GetDesiredSize(nsPresContext* aCX,
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsBulletFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -1694,7 +1694,6 @@ nsBulletFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* virtual */ nscoord
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
#endif
|
||||
|
||||
// nsIHTMLReflow
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -453,7 +453,7 @@ nsCanvasFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
|
||||
return result;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsCanvasFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -585,7 +585,6 @@ nsCanvasFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
NS_FRAME_TRACE_REFLOW_OUT("nsCanvasFrame::Reflow", aStatus);
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -949,7 +949,7 @@ nsColumnSetFrame::FindBestBalanceHeight(const nsHTMLReflowState& aReflowState,
|
||||
aRunWasFeasible = feasible;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsColumnSetFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -1019,8 +1019,6 @@ nsColumnSetFrame::Reflow(nsPresContext* aPresContext,
|
||||
NS_ASSERTION(NS_FRAME_IS_FULLY_COMPLETE(aStatus) ||
|
||||
aReflowState.AvailableHeight() != NS_UNCONSTRAINEDSIZE,
|
||||
"Column set should be complete if the available height is unconstrained");
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
virtual nsresult SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -945,8 +945,6 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
|
||||
{
|
||||
NS_PRECONDITION(aReflowState.frame == aKidFrame, "bad reflow state");
|
||||
|
||||
nsresult result;
|
||||
|
||||
// Send the WillReflow() notification, and position the child frame
|
||||
// and its view if requested
|
||||
aKidFrame->WillReflow(aPresContext);
|
||||
@@ -960,12 +958,11 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
|
||||
}
|
||||
|
||||
// Reflow the child frame
|
||||
result = aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState,
|
||||
aStatus);
|
||||
aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
|
||||
// If the reflow was successful and the child frame is complete, delete any
|
||||
// next-in-flows, but only if the NO_DELETE_NEXT_IN_FLOW flag isn't set.
|
||||
if (NS_SUCCEEDED(result) && NS_FRAME_IS_FULLY_COMPLETE(aStatus) &&
|
||||
// If the child frame is complete, delete any next-in-flows,
|
||||
// but only if the NO_DELETE_NEXT_IN_FLOW flag isn't set.
|
||||
if (NS_FRAME_IS_FULLY_COMPLETE(aStatus) &&
|
||||
!(aFlags & NS_FRAME_NO_DELETE_NEXT_IN_FLOW_CHILD)) {
|
||||
nsIFrame* kidNextInFlow = aKidFrame->GetNextInFlow();
|
||||
if (kidNextInFlow) {
|
||||
@@ -977,7 +974,7 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
|
||||
->DeleteNextInFlowChild(kidNextInFlow, true);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ nsFirstLetterFrame::ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
aCBSize, aAvailableWidth, aMargin, aBorder, aPadding, aFlags);
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -256,7 +256,7 @@ nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsIFrame* nextInFlow;
|
||||
rv = CreateNextInFlow(kid, nextInFlow);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
return;
|
||||
}
|
||||
|
||||
// And then push it to our overflow list
|
||||
@@ -269,7 +269,7 @@ nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
|
||||
// created for us) we need to put the continuation with the rest of the
|
||||
// text that the first letter frame was made out of.
|
||||
nsIFrame* continuation;
|
||||
rv = CreateContinuationForFloatingParent(aPresContext, kid,
|
||||
CreateContinuationForFloatingParent(aPresContext, kid,
|
||||
&continuation, true);
|
||||
}
|
||||
}
|
||||
@@ -278,7 +278,6 @@ nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
|
||||
FinishAndStoreOverflow(&aMetrics);
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aReflowStatus, aReflowState, aMetrics);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* virtual */ bool
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
nsSize aCBSize, nscoord aAvailableWidth,
|
||||
nsSize aMargin, nsSize aBorder, nsSize aPadding,
|
||||
uint32_t aFlags) MOZ_OVERRIDE;
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -2988,7 +2988,7 @@ FlexLine::PositionItemsInCrossAxis(nscoord aLineStartPosition,
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -3000,7 +3000,7 @@ nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||
("Reflow() for nsFlexContainerFrame %p\n", this));
|
||||
|
||||
if (IsFrameTreeTooDeep(aReflowState, aDesiredSize, aStatus)) {
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
// We (and our children) can only depend on our ancestor's height if we have
|
||||
@@ -3063,12 +3063,10 @@ nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
if (NS_SUCCEEDED(rv) && !struts.IsEmpty()) {
|
||||
// We're restarting flex layout, with new knowledge of collapsed items.
|
||||
rv = DoFlexLayout(aPresContext, aDesiredSize, aReflowState, aStatus,
|
||||
DoFlexLayout(aPresContext, aDesiredSize, aReflowState, aStatus,
|
||||
contentBoxMainSize, availableHeightForContent,
|
||||
struts, axisTracker);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
// RAII class to clean up a list of FlexLines.
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -4364,7 +4364,7 @@ nsFrame::CanContinueTextRun() const
|
||||
return false;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -4375,7 +4375,6 @@ nsFrame::Reflow(nsPresContext* aPresContext,
|
||||
aDesiredSize.Height() = 0;
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
||||
@@ -318,7 +318,7 @@ public:
|
||||
* Note: if it's only the overflow rect(s) of a frame that need to be
|
||||
* updated, then UpdateOverflow should be called instead of Reflow.
|
||||
*/
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
@@ -839,7 +839,7 @@ nscolor nsHTMLFramesetFrame::GetBorderColor(nsIContent* aContent)
|
||||
return GetBorderColor();
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsHTMLFramesetFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -893,7 +893,7 @@ nsHTMLFramesetFrame::Reflow(nsPresContext* aPresContext,
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
mDrag.UnSet();
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
CalculateRowCol(aPresContext, width, mNumCols, colSpecs, mColSizes);
|
||||
@@ -913,18 +913,14 @@ nsHTMLFramesetFrame::Reflow(nsPresContext* aPresContext,
|
||||
PR_STATIC_ASSERT(NS_MAX_FRAMESET_SPEC_COUNT < UINT_MAX / sizeof(nscolor));
|
||||
|
||||
verBordersVis = new bool[mNumCols];
|
||||
NS_ENSURE_TRUE(verBordersVis, NS_ERROR_OUT_OF_MEMORY);
|
||||
verBorderColors = new nscolor[mNumCols];
|
||||
NS_ENSURE_TRUE(verBorderColors, NS_ERROR_OUT_OF_MEMORY);
|
||||
for (int verX = 0; verX < mNumCols; verX++) {
|
||||
verBordersVis[verX] = false;
|
||||
verBorderColors[verX] = NO_COLOR;
|
||||
}
|
||||
|
||||
horBordersVis = new bool[mNumRows];
|
||||
NS_ENSURE_TRUE(horBordersVis, NS_ERROR_OUT_OF_MEMORY);
|
||||
horBorderColors = new nscolor[mNumRows];
|
||||
NS_ENSURE_TRUE(horBorderColors, NS_ERROR_OUT_OF_MEMORY);
|
||||
for (int horX = 0; horX < mNumRows; horX++) {
|
||||
horBordersVis[horX] = false;
|
||||
horBorderColors[horX] = NO_COLOR;
|
||||
@@ -1140,7 +1136,6 @@ nsHTMLFramesetFrame::Reflow(nsPresContext* aPresContext,
|
||||
FinishAndStoreOverflow(&aDesiredSize);
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
@@ -1437,7 +1432,7 @@ void nsHTMLFramesetBorderFrame::SetColor(nscolor aColor)
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsHTMLFramesetBorderFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -1452,7 +1447,6 @@ nsHTMLFramesetBorderFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
aDesiredSize.SetOverflowAreasToDesiredBounds();
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
class nsDisplayFramesetBorder : public nsDisplayItem {
|
||||
@@ -1645,7 +1639,7 @@ nscoord nsHTMLFramesetBlankFrame::GetIntrinsicHeight()
|
||||
return 0;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsHTMLFramesetBlankFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -1659,7 +1653,6 @@ nsHTMLFramesetBlankFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
aDesiredSize.SetOverflowAreasToDesiredBounds();
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
class nsDisplayFramesetBlank : public nsDisplayItem {
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -286,10 +286,8 @@ bool
|
||||
nsHTMLScrollFrame::TryLayout(ScrollReflowState* aState,
|
||||
nsHTMLReflowMetrics* aKidMetrics,
|
||||
bool aAssumeHScroll, bool aAssumeVScroll,
|
||||
bool aForce, nsresult* aResult)
|
||||
bool aForce)
|
||||
{
|
||||
*aResult = NS_OK;
|
||||
|
||||
if ((aState->mStyles.mVertical == NS_STYLE_OVERFLOW_HIDDEN && aAssumeVScroll) ||
|
||||
(aState->mStyles.mHorizontal == NS_STYLE_OVERFLOW_HIDDEN && aAssumeHScroll)) {
|
||||
NS_ASSERTION(!aForce, "Shouldn't be forcing a hidden scrollbar to show!");
|
||||
@@ -299,12 +297,8 @@ nsHTMLScrollFrame::TryLayout(ScrollReflowState* aState,
|
||||
if (aAssumeVScroll != aState->mReflowedContentsWithVScrollbar ||
|
||||
(aAssumeHScroll != aState->mReflowedContentsWithHScrollbar &&
|
||||
ScrolledContentDependsOnHeight(aState))) {
|
||||
nsresult rv = ReflowScrolledFrame(aState, aAssumeHScroll, aAssumeVScroll,
|
||||
aKidMetrics, false);
|
||||
if (NS_FAILED(rv)) {
|
||||
*aResult = rv;
|
||||
return false;
|
||||
}
|
||||
ReflowScrolledFrame(aState, aAssumeHScroll, aAssumeVScroll, aKidMetrics,
|
||||
false);
|
||||
}
|
||||
|
||||
nsSize vScrollbarMinSize(0, 0);
|
||||
@@ -394,7 +388,7 @@ nsHTMLScrollFrame::ScrolledContentDependsOnHeight(ScrollReflowState* aState)
|
||||
aState->mReflowState.ComputedMaxHeight() != NS_UNCONSTRAINEDSIZE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState,
|
||||
bool aAssumeHScroll,
|
||||
bool aAssumeVScroll,
|
||||
@@ -457,7 +451,7 @@ nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState,
|
||||
mHelper.mHasVerticalScrollbar = aAssumeVScroll;
|
||||
|
||||
nsReflowStatus status;
|
||||
nsresult rv = ReflowChild(mHelper.mScrolledFrame, presContext, *aMetrics,
|
||||
ReflowChild(mHelper.mScrolledFrame, presContext, *aMetrics,
|
||||
kidReflowState, 0, 0,
|
||||
NS_FRAME_NO_MOVE_FRAME, status);
|
||||
|
||||
@@ -497,8 +491,6 @@ nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState,
|
||||
aState->mContentsOverflowAreas = aMetrics->mOverflowAreas;
|
||||
aState->mReflowedContentsWithHScrollbar = aAssumeHScroll;
|
||||
aState->mReflowedContentsWithVScrollbar = aAssumeVScroll;
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -563,14 +555,13 @@ nsHTMLScrollFrame::InInitialReflow() const
|
||||
return !mHelper.mIsRoot && (GetStateBits() & NS_FRAME_FIRST_REFLOW);
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsHTMLScrollFrame::ReflowContents(ScrollReflowState* aState,
|
||||
const nsHTMLReflowMetrics& aDesiredSize)
|
||||
{
|
||||
nsHTMLReflowMetrics kidDesiredSize(aDesiredSize.GetWritingMode(), aDesiredSize.mFlags);
|
||||
nsresult rv = ReflowScrolledFrame(aState, GuessHScrollbarNeeded(*aState),
|
||||
ReflowScrolledFrame(aState, GuessHScrollbarNeeded(*aState),
|
||||
GuessVScrollbarNeeded(*aState), &kidDesiredSize, true);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// There's an important special case ... if the child appears to fit
|
||||
// in the inside-border rect (but overflows the scrollport), we
|
||||
@@ -602,9 +593,7 @@ nsHTMLScrollFrame::ReflowContents(ScrollReflowState* aState,
|
||||
insideBorderSize);
|
||||
if (nsRect(nsPoint(0, 0), insideBorderSize).Contains(scrolledRect)) {
|
||||
// Let's pretend we had no scrollbars coming in here
|
||||
rv = ReflowScrolledFrame(aState, false, false,
|
||||
&kidDesiredSize, false);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
ReflowScrolledFrame(aState, false, false, &kidDesiredSize, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -615,21 +604,21 @@ nsHTMLScrollFrame::ReflowContents(ScrollReflowState* aState,
|
||||
// Try leaving the horizontal scrollbar unchanged first. This will be more
|
||||
// efficient.
|
||||
if (TryLayout(aState, &kidDesiredSize, aState->mReflowedContentsWithHScrollbar,
|
||||
aState->mReflowedContentsWithVScrollbar, false, &rv))
|
||||
return NS_OK;
|
||||
aState->mReflowedContentsWithVScrollbar, false))
|
||||
return;
|
||||
if (TryLayout(aState, &kidDesiredSize, !aState->mReflowedContentsWithHScrollbar,
|
||||
aState->mReflowedContentsWithVScrollbar, false, &rv))
|
||||
return NS_OK;
|
||||
aState->mReflowedContentsWithVScrollbar, false))
|
||||
return;
|
||||
|
||||
// OK, now try toggling the vertical scrollbar. The performance advantage
|
||||
// of trying the status-quo horizontal scrollbar state
|
||||
// does not exist here (we'll have to reflow due to the vertical scrollbar
|
||||
// change), so always try no horizontal scrollbar first.
|
||||
bool newVScrollbarState = !aState->mReflowedContentsWithVScrollbar;
|
||||
if (TryLayout(aState, &kidDesiredSize, false, newVScrollbarState, false, &rv))
|
||||
return NS_OK;
|
||||
if (TryLayout(aState, &kidDesiredSize, true, newVScrollbarState, false, &rv))
|
||||
return NS_OK;
|
||||
if (TryLayout(aState, &kidDesiredSize, false, newVScrollbarState, false))
|
||||
return;
|
||||
if (TryLayout(aState, &kidDesiredSize, true, newVScrollbarState, false))
|
||||
return;
|
||||
|
||||
// OK, we're out of ideas. Try again enabling whatever scrollbars we can
|
||||
// enable and force the layout to stick even if it's inconsistent.
|
||||
@@ -637,8 +626,7 @@ nsHTMLScrollFrame::ReflowContents(ScrollReflowState* aState,
|
||||
TryLayout(aState, &kidDesiredSize,
|
||||
aState->mStyles.mHorizontal != NS_STYLE_OVERFLOW_HIDDEN,
|
||||
aState->mStyles.mVertical != NS_STYLE_OVERFLOW_HIDDEN,
|
||||
true, &rv);
|
||||
return rv;
|
||||
true);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -753,7 +741,7 @@ GetBrowserRoot(nsIContent* aContent)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -807,9 +795,7 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
|
||||
state.mComputedBorder = aReflowState.ComputedPhysicalBorderPadding() -
|
||||
aReflowState.ComputedPhysicalPadding();
|
||||
|
||||
nsresult rv = ReflowContents(&state, aDesiredSize);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
ReflowContents(&state, aDesiredSize);
|
||||
|
||||
// Restore the old scroll position, for now, even if that's not valid anymore
|
||||
// because we changed size. We'll fix it up in a post-reflow callback, because
|
||||
@@ -875,7 +861,6 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
mHelper.PostOverflowEvent();
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -465,14 +465,14 @@ public:
|
||||
bool TryLayout(ScrollReflowState* aState,
|
||||
nsHTMLReflowMetrics* aKidMetrics,
|
||||
bool aAssumeVScroll, bool aAssumeHScroll,
|
||||
bool aForce, nsresult* aResult);
|
||||
bool aForce);
|
||||
bool ScrolledContentDependsOnHeight(ScrollReflowState* aState);
|
||||
nsresult ReflowScrolledFrame(ScrollReflowState* aState,
|
||||
void ReflowScrolledFrame(ScrollReflowState* aState,
|
||||
bool aAssumeHScroll,
|
||||
bool aAssumeVScroll,
|
||||
nsHTMLReflowMetrics* aMetrics,
|
||||
bool aFirstPass);
|
||||
nsresult ReflowContents(ScrollReflowState* aState,
|
||||
void ReflowContents(ScrollReflowState* aState,
|
||||
const nsHTMLReflowMetrics& aDesiredSize);
|
||||
void PlaceScrollArea(const ScrollReflowState& aState,
|
||||
const nsPoint& aScrollPosition);
|
||||
@@ -488,7 +488,7 @@ public:
|
||||
virtual nsresult GetPadding(nsMargin& aPadding) MOZ_OVERRIDE;
|
||||
virtual bool IsCollapsed() MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -171,7 +171,7 @@ nsHTMLCanvasFrame::ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
aMargin, aBorder, aPadding);
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsHTMLCanvasFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -222,8 +222,6 @@ nsHTMLCanvasFrame::Reflow(nsPresContext* aPresContext,
|
||||
("exit nsHTMLCanvasFrame::Reflow: size=%d,%d",
|
||||
aMetrics.Width(), aMetrics.Height()));
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// FIXME taken from nsImageFrame, but then had splittable frame stuff
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
nsSize aMargin, nsSize aBorder, nsSize aPadding,
|
||||
uint32_t aFlags) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -1865,7 +1865,7 @@ public:
|
||||
* @param aStatus a return value indicating whether the frame is complete
|
||||
* and whether the next-in-flow is dirty and needs to be reflowed
|
||||
*/
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aReflowMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) = 0;
|
||||
|
||||
@@ -797,7 +797,7 @@ nsImageFrame::GetIntrinsicRatio()
|
||||
return mIntrinsicRatio;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsImageFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -900,7 +900,6 @@ nsImageFrame::Reflow(nsPresContext* aPresContext,
|
||||
("exit nsImageFrame::Reflow: size=%d,%d",
|
||||
aMetrics.Width(), aMetrics.Height()));
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
virtual mozilla::IntrinsicSize GetIntrinsicSize() MOZ_OVERRIDE;
|
||||
virtual nsSize GetIntrinsicRatio() MOZ_OVERRIDE;
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -294,7 +294,7 @@ ReparentChildListStyle(nsPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsInlineFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -303,10 +303,11 @@ nsInlineFrame::Reflow(nsPresContext* aPresContext,
|
||||
DO_GLOBAL_REFLOW_COUNT("nsInlineFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
|
||||
if (nullptr == aReflowState.mLineLayout) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
NS_ERROR("must have non-null aReflowState.mLineLayout");
|
||||
return;
|
||||
}
|
||||
if (IsFrameTreeTooDeep(aReflowState, aMetrics, aStatus)) {
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
bool lazilySetParentPointer = false;
|
||||
@@ -389,7 +390,6 @@ nsInlineFrame::Reflow(nsPresContext* aPresContext,
|
||||
irs.mNextInFlow = (nsInlineFrame*) GetNextInFlow();
|
||||
irs.mSetParentPointer = lazilySetParentPointer;
|
||||
|
||||
nsresult rv;
|
||||
if (mFrames.IsEmpty()) {
|
||||
// Try to pull over one frame before starting so that we know
|
||||
// whether we have an anonymous block or not.
|
||||
@@ -397,7 +397,7 @@ nsInlineFrame::Reflow(nsPresContext* aPresContext,
|
||||
(void) PullOneFrame(aPresContext, irs, &complete);
|
||||
}
|
||||
|
||||
rv = ReflowFrames(aPresContext, aReflowState, irs, aMetrics, aStatus);
|
||||
ReflowFrames(aPresContext, aReflowState, irs, aMetrics, aStatus);
|
||||
|
||||
ReflowAbsoluteFrames(aPresContext, aMetrics, aReflowState, aStatus);
|
||||
|
||||
@@ -405,7 +405,6 @@ nsInlineFrame::Reflow(nsPresContext* aPresContext,
|
||||
// overflow-rect state for us.
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);
|
||||
return rv;
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -480,14 +479,13 @@ nsInlineFrame::PullOverflowsFromPrevInFlow()
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
InlineReflowState& irs,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
nsLineLayout* lineLayout = aReflowState.mLineLayout;
|
||||
@@ -598,9 +596,8 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
|
||||
|
||||
if (!done) {
|
||||
bool reflowingFirstLetter = lineLayout->GetFirstLetterStyleOK();
|
||||
rv = ReflowInlineFrame(aPresContext, aReflowState, irs, frame, aStatus);
|
||||
done = NS_FAILED(rv) ||
|
||||
NS_INLINE_IS_BREAK(aStatus) ||
|
||||
ReflowInlineFrame(aPresContext, aReflowState, irs, frame, aStatus);
|
||||
done = NS_INLINE_IS_BREAK(aStatus) ||
|
||||
(!reflowingFirstLetter && NS_FRAME_IS_NOT_COMPLETE(aStatus));
|
||||
if (done) {
|
||||
if (!irs.mSetParentPointer) {
|
||||
@@ -637,9 +634,8 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
|
||||
}
|
||||
break;
|
||||
}
|
||||
rv = ReflowInlineFrame(aPresContext, aReflowState, irs, frame, aStatus);
|
||||
if (NS_FAILED(rv) ||
|
||||
NS_INLINE_IS_BREAK(aStatus) ||
|
||||
ReflowInlineFrame(aPresContext, aReflowState, irs, frame, aStatus);
|
||||
if (NS_INLINE_IS_BREAK(aStatus) ||
|
||||
(!reflowingFirstLetter && NS_FRAME_IS_NOT_COMPLETE(aStatus))) {
|
||||
break;
|
||||
}
|
||||
@@ -721,11 +717,9 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
|
||||
printf(": metrics=%d,%d ascent=%d\n",
|
||||
aMetrics.Width(), aMetrics.Height(), aMetrics.TopAscent());
|
||||
#endif
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsInlineFrame::ReflowInlineFrame(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
InlineReflowState& irs,
|
||||
@@ -735,13 +729,8 @@ nsInlineFrame::ReflowInlineFrame(nsPresContext* aPresContext,
|
||||
nsLineLayout* lineLayout = aReflowState.mLineLayout;
|
||||
bool reflowingFirstLetter = lineLayout->GetFirstLetterStyleOK();
|
||||
bool pushedFrame;
|
||||
nsresult rv =
|
||||
lineLayout->ReflowFrame(aFrame, aStatus, nullptr, pushedFrame);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (NS_INLINE_IS_BREAK_BEFORE(aStatus)) {
|
||||
if (aFrame != mFrames.FirstChild()) {
|
||||
// Change break-before status into break-after since we have
|
||||
@@ -756,15 +745,15 @@ nsInlineFrame::ReflowInlineFrame(nsPresContext* aPresContext,
|
||||
// Preserve reflow status when breaking-before our first child
|
||||
// and propagate it upward without modification.
|
||||
}
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
// Create a next-in-flow if needed.
|
||||
if (!NS_FRAME_IS_FULLY_COMPLETE(aStatus)) {
|
||||
nsIFrame* newFrame;
|
||||
rv = CreateNextInFlow(aFrame, newFrame);
|
||||
nsresult rv = CreateNextInFlow(aFrame, newFrame);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -786,7 +775,7 @@ nsInlineFrame::ReflowInlineFrame(nsPresContext* aPresContext,
|
||||
nextInFlow = static_cast<nsInlineFrame*>(nextInFlow->GetNextInFlow());
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!NS_FRAME_IS_FULLY_COMPLETE(aStatus) && !reflowingFirstLetter) {
|
||||
@@ -795,7 +784,6 @@ nsInlineFrame::ReflowInlineFrame(nsPresContext* aPresContext,
|
||||
PushFrames(aPresContext, nextFrame, aFrame, irs);
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIFrame*
|
||||
@@ -1033,14 +1021,14 @@ nsFirstLineFrame::PullOneFrame(nsPresContext* aPresContext, InlineReflowState& i
|
||||
return frame;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsFirstLineFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
if (nullptr == aReflowState.mLineLayout) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
return; // XXX does this happen? why?
|
||||
}
|
||||
|
||||
nsIFrame* lineContainer = aReflowState.mLineLayout->LineContainerFrame();
|
||||
@@ -1074,7 +1062,6 @@ nsFirstLineFrame::Reflow(nsPresContext* aPresContext,
|
||||
irs.mLineLayout = aReflowState.mLineLayout;
|
||||
irs.mNextInFlow = (nsInlineFrame*) GetNextInFlow();
|
||||
|
||||
nsresult rv;
|
||||
bool wasEmpty = mFrames.IsEmpty();
|
||||
if (wasEmpty) {
|
||||
// Try to pull over one frame before starting so that we know
|
||||
@@ -1105,14 +1092,12 @@ nsFirstLineFrame::Reflow(nsPresContext* aPresContext,
|
||||
NS_ASSERTION(!aReflowState.mLineLayout->GetInFirstLine(),
|
||||
"Nested first-line frames? BOGUS");
|
||||
aReflowState.mLineLayout->SetInFirstLine(true);
|
||||
rv = ReflowFrames(aPresContext, aReflowState, irs, aMetrics, aStatus);
|
||||
ReflowFrames(aPresContext, aReflowState, irs, aMetrics, aStatus);
|
||||
aReflowState.mLineLayout->SetInFirstLine(false);
|
||||
|
||||
ReflowAbsoluteFrames(aPresContext, aMetrics, aReflowState, aStatus);
|
||||
|
||||
// Note: the line layout code will properly compute our overflow state for us
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
nsSize aMargin, nsSize aBorder, nsSize aPadding,
|
||||
uint32_t aFlags) MOZ_OVERRIDE;
|
||||
virtual nsRect ComputeTightBounds(gfxContext* aContext) const MOZ_OVERRIDE;
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
@@ -128,13 +128,13 @@ protected:
|
||||
|
||||
virtual int GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
|
||||
|
||||
nsresult ReflowFrames(nsPresContext* aPresContext,
|
||||
void ReflowFrames(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
InlineReflowState& rs,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
nsReflowStatus& aStatus);
|
||||
|
||||
nsresult ReflowInlineFrame(nsPresContext* aPresContext,
|
||||
void ReflowInlineFrame(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
InlineReflowState& rs,
|
||||
nsIFrame* aFrame,
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -42,7 +42,7 @@ nsLeafFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
|
||||
return nsSize(GetIntrinsicWidth(), GetIntrinsicHeight());
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsLeafFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -58,7 +58,6 @@ nsLeafFrame::Reflow(nsPresContext* aPresContext,
|
||||
DoReflow(aPresContext, aMetrics, aReflowState, aStatus);
|
||||
|
||||
FinishAndStoreOverflow(&aMetrics);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
* borderpadding for the desired height. Ascent will be set to the height,
|
||||
* and descent will be set to 0.
|
||||
*/
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -839,12 +839,8 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
||||
&savedOptionalBreakPriority);
|
||||
|
||||
if (!isText) {
|
||||
nsresult rv = aFrame->Reflow(mPresContext, metrics, reflowStateHolder.ref(),
|
||||
aFrame->Reflow(mPresContext, metrics, reflowStateHolder.ref(),
|
||||
aReflowStatus);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING( "Reflow of frame failed in nsLineLayout" );
|
||||
return rv;
|
||||
}
|
||||
} else {
|
||||
static_cast<nsTextFrame*>(aFrame)->
|
||||
ReflowText(*this, availableSpaceOnLine, psd->mReflowState->rendContext,
|
||||
|
||||
@@ -497,7 +497,7 @@ nsObjectFrame::GetDesiredSize(nsPresContext* aPresContext,
|
||||
// call the superclass in all cases.
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsObjectFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -516,13 +516,13 @@ nsObjectFrame::Reflow(nsPresContext* aPresContext,
|
||||
// plugin needs to see that haven't arrived yet.
|
||||
if (!GetContent()->IsDoneAddingChildren()) {
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
// if we are printing or print previewing, bail for now
|
||||
if (aPresContext->Medium() == nsGkAtoms::print) {
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
nsRect r(0, 0, aMetrics.Width(), aMetrics.Height());
|
||||
@@ -543,7 +543,6 @@ nsObjectFrame::Reflow(nsPresContext* aPresContext,
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
///////////// nsIReflowCallback ///////////////
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -17,7 +17,7 @@ NS_NewPageContentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsPageContentFrame)
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsPageContentFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -26,12 +26,13 @@ nsPageContentFrame::Reflow(nsPresContext* aPresContext,
|
||||
DO_GLOBAL_REFLOW_COUNT("nsPageContentFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
aStatus = NS_FRAME_COMPLETE; // initialize out parameter
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
if (GetPrevInFlow() && (GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
|
||||
nsresult rv = aPresContext->PresShell()->FrameConstructor()
|
||||
->ReplicateFixedFrames(this);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (NS_FAILED(rv)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Set our size up front, since some parts of reflow depend on it
|
||||
@@ -50,8 +51,7 @@ nsPageContentFrame::Reflow(nsPresContext* aPresContext,
|
||||
kidReflowState.SetComputedHeight(maxSize.height);
|
||||
|
||||
// Reflow the page content area
|
||||
rv = ReflowChild(frame, aPresContext, aDesiredSize, kidReflowState, 0, 0, 0, aStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
ReflowChild(frame, aPresContext, aDesiredSize, kidReflowState, 0, 0, 0, aStatus);
|
||||
|
||||
// The document element's background should cover the entire canvas, so
|
||||
// take into account the combined area and any space taken up by
|
||||
@@ -100,7 +100,6 @@ nsPageContentFrame::Reflow(nsPresContext* aPresContext,
|
||||
FinishAndStoreOverflow(&aDesiredSize);
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
|
||||
@@ -20,7 +20,7 @@ public:
|
||||
friend class nsPageFrame;
|
||||
|
||||
// nsIFrame
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aMaxSize,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -43,7 +43,8 @@ nsPageFrame::~nsPageFrame()
|
||||
{
|
||||
}
|
||||
|
||||
nsresult nsPageFrame::Reflow(nsPresContext* aPresContext,
|
||||
void
|
||||
nsPageFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
@@ -84,7 +85,7 @@ nsresult nsPageFrame::Reflow(nsPresContext* aPresContext,
|
||||
aDesiredSize.Width() = 0;
|
||||
aDesiredSize.Height() = 0;
|
||||
NS_WARNING("Reflow aborted; no space for content");
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, frame, maxSize);
|
||||
@@ -157,7 +158,6 @@ nsresult nsPageFrame::Reflow(nsPresContext* aPresContext,
|
||||
PR_PL(("[%d,%d]\n", aReflowState.AvailableWidth(), aReflowState.AvailableHeight()));
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
@@ -648,7 +648,7 @@ nsPageBreakFrame::GetIntrinsicHeight()
|
||||
return 0;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsPageBreakFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -670,7 +670,6 @@ nsPageBreakFrame::Reflow(nsPresContext* aPresContext,
|
||||
// DidReflow will always get called before the next Reflow() call.
|
||||
mHaveReflowed = true;
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
|
||||
friend nsIFrame* NS_NewPageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aMaxSize,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
@@ -103,7 +103,7 @@ class nsPageBreakFrame : public nsLeafFrame
|
||||
nsPageBreakFrame(nsStyleContext* aContext);
|
||||
~nsPageBreakFrame();
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -98,7 +98,7 @@ nsPlaceholderFrame::AddInlinePrefWidth(nsRenderingContext* aRenderingContext,
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsPlaceholderFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -143,7 +143,6 @@ nsPlaceholderFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
virtual nsSize GetPrefSize(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
|
||||
virtual nsSize GetMaxSize(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -117,7 +117,7 @@ nsSimplePageSequenceFrame::SetDesiredSize(nsHTMLReflowMetrics& aDesiredSize,
|
||||
nscoord(aHeight * PresContext()->GetPrintPreviewScale()));
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -138,7 +138,7 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
|
||||
SetDesiredSize(aDesiredSize, aReflowState, mSize.width, mSize.height);
|
||||
aDesiredSize.SetOverflowAreasToDesiredBounds();
|
||||
FinishAndStoreOverflow(&aDesiredSize);
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
// See if we can get a Print Settings from the Context
|
||||
@@ -266,11 +266,12 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
|
||||
}
|
||||
|
||||
// Create current Date/Time String
|
||||
if (!mDateFormatter)
|
||||
if (!mDateFormatter) {
|
||||
mDateFormatter = do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID);
|
||||
|
||||
NS_ENSURE_TRUE(mDateFormatter, NS_ERROR_FAILURE);
|
||||
|
||||
}
|
||||
if (!mDateFormatter) {
|
||||
return;
|
||||
}
|
||||
nsAutoString formattedDateString;
|
||||
time_t ltime;
|
||||
time( <ime );
|
||||
@@ -297,7 +298,6 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
NS_FRAME_TRACE_REFLOW_OUT("nsSimplePageSequeceFrame::Reflow", aStatus);
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
// nsIFrame
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aMaxSize,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -688,7 +688,7 @@ nsSubDocumentFrame::ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
aMargin, aBorder, aPadding, aFlags);
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsSubDocumentFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -709,7 +709,9 @@ nsSubDocumentFrame::Reflow(nsPresContext* aPresContext,
|
||||
// XUL <iframe> or <browser>, or HTML <iframe>, <object> or <embed>
|
||||
nsresult rv = nsLeafFrame::DoReflow(aPresContext, aDesiredSize, aReflowState,
|
||||
aStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (NS_FAILED(rv)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// "offset" is the offset of our content area from our frame's
|
||||
// top-left corner.
|
||||
@@ -749,7 +751,6 @@ nsSubDocumentFrame::Reflow(nsPresContext* aPresContext,
|
||||
aDesiredSize.Width(), aDesiredSize.Height(), aStatus));
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
nsSize aMargin, nsSize aBorder, nsSize aPadding,
|
||||
uint32_t aFlags) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -7561,7 +7561,7 @@ struct NewlineProperty {
|
||||
int32_t mNewlineOffset;
|
||||
};
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsTextFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -7576,14 +7576,13 @@ nsTextFrame::Reflow(nsPresContext* aPresContext,
|
||||
if (!aReflowState.mLineLayout) {
|
||||
ClearMetrics(aMetrics);
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
ReflowText(*aReflowState.mLineLayout, aReflowState.AvailableWidth(),
|
||||
aReflowState.rendContext, aMetrics, aStatus);
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
virtual nsresult GetPrefWidthTightBounds(nsRenderingContext* aContext,
|
||||
nscoord* aX,
|
||||
nscoord* aXMost) MOZ_OVERRIDE;
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -239,7 +239,7 @@ public:
|
||||
nsCOMPtr<nsIContent> mContent;
|
||||
};
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsVideoFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -288,7 +288,9 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsPoint posterTopLeft(0, 0);
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLImageElement> posterImage = do_QueryInterface(mPosterImage);
|
||||
NS_ENSURE_TRUE(posterImage, NS_ERROR_FAILURE);
|
||||
if (!posterImage) {
|
||||
return;
|
||||
}
|
||||
posterImage->GetNaturalHeight(&posterHeight);
|
||||
posterImage->GetNaturalWidth(&posterWidth);
|
||||
|
||||
@@ -356,8 +358,6 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
|
||||
("exit nsVideoFrame::Reflow: size=%d,%d",
|
||||
aMetrics.Width(), aMetrics.Height()));
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
class nsDisplayVideo : public nsDisplayItem {
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||
virtual bool IsLeaf() const MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -173,7 +173,7 @@ ViewportFrame::AdjustReflowStateAsContainingBlock(nsHTMLReflowState* aReflowStat
|
||||
return rect;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
ViewportFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -200,8 +200,6 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
|
||||
// reflow.
|
||||
nscoord kidHeight = 0;
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
if (mFrames.NotEmpty()) {
|
||||
// Deal with a non-incremental reflow or an incremental reflow
|
||||
// targeted at our one-and-only principal child frame.
|
||||
@@ -218,7 +216,7 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
// Reflow the frame
|
||||
kidReflowState.SetComputedHeight(aReflowState.ComputedHeight());
|
||||
rv = ReflowChild(kidFrame, aPresContext, kidDesiredSize, kidReflowState,
|
||||
ReflowChild(kidFrame, aPresContext, kidDesiredSize, kidReflowState,
|
||||
0, 0, 0, aStatus);
|
||||
kidHeight = kidDesiredSize.Height();
|
||||
|
||||
@@ -262,7 +260,7 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsRect rect = AdjustReflowStateAsContainingBlock(&reflowState);
|
||||
|
||||
// Just reflow all the fixed-pos frames.
|
||||
rv = GetAbsoluteContainingBlock()->Reflow(this, aPresContext, reflowState, aStatus,
|
||||
GetAbsoluteContainingBlock()->Reflow(this, aPresContext, reflowState, aStatus,
|
||||
rect,
|
||||
false, true, true, // XXX could be optimized
|
||||
&aDesiredSize.mOverflowAreas);
|
||||
@@ -289,7 +287,6 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
NS_FRAME_TRACE_REFLOW_OUT("ViewportFrame::Reflow", aStatus);
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -878,7 +878,7 @@ nsMathMLContainerFrame::ReflowChild(nsIFrame* aChildFrame,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsMathMLContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -959,7 +959,6 @@ nsMathMLContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static nscoord AddInterFrameSpacingToSize(nsHTMLReflowMetrics& aDesiredSize,
|
||||
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
GetIntrinsicWidthMetrics(nsRenderingContext* aRenderingContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize);
|
||||
|
||||
virtual nsresult
|
||||
virtual void
|
||||
Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
|
||||
@@ -99,7 +99,7 @@ nsMathMLSelectedFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
}
|
||||
|
||||
// Only reflow the selected child ...
|
||||
nsresult
|
||||
void
|
||||
nsMathMLSelectedFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -122,7 +122,6 @@ nsMathMLSelectedFrame::Reflow(nsPresContext* aPresContext,
|
||||
}
|
||||
FinalizeReflow(*aReflowState.rendContext, aDesiredSize);
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Only place the selected child ...
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
bool aPlaceOrigin,
|
||||
nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult
|
||||
virtual void
|
||||
Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
|
||||
@@ -134,7 +134,7 @@ nsMathMLTokenFrame::InsertFrames(ChildListID aListID,
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsMathMLTokenFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -168,7 +168,6 @@ nsMathMLTokenFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// For token elements, mBoundingMetrics is computed at the ReflowToken
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
nsIFrame* aPrevFrame,
|
||||
nsFrameList& aChildList) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult
|
||||
virtual void
|
||||
Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
|
||||
@@ -184,7 +184,7 @@ nsMathMLmfencedFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -400,7 +400,6 @@ nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult
|
||||
virtual void
|
||||
Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
|
||||
@@ -935,7 +935,7 @@ nsMathMLmoFrame::SetInitialChildList(ChildListID aListID,
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsMathMLmoFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -947,7 +947,6 @@ nsMathMLmoFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
nsMathMLTokenFrame::Reflow(aPresContext, aDesiredSize,
|
||||
aReflowState, aStatus);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult
|
||||
virtual void
|
||||
Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
|
||||
@@ -300,7 +300,7 @@ nsMathMLmpaddedFrame::UpdateValue(int32_t aSign,
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsMathMLmpaddedFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -313,7 +313,6 @@ nsMathMLmpaddedFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsMathMLContainerFrame::Reflow(aPresContext, aDesiredSize,
|
||||
aReflowState, aStatus);
|
||||
//NS_ASSERTION(NS_FRAME_IS_COMPLETE(aStatus), "bad status");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* virtual */ nsresult
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
return TransmitAutomaticDataForMrowLikeElement();
|
||||
}
|
||||
|
||||
virtual nsresult
|
||||
virtual void
|
||||
Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
|
||||
@@ -145,7 +145,7 @@ GetRadicalXOffsets(nscoord aIndexWidth, nscoord aSqrWidth,
|
||||
*aSqrOffset = dxSqr;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -202,7 +202,7 @@ nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext,
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
// Call DidReflow() for the child frames we successfully did reflow.
|
||||
DidReflowChildren(mFrames.FirstChild(), childFrame);
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
////////////
|
||||
@@ -345,7 +345,6 @@ nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
NS_IMETHOD
|
||||
TransmitAutomaticData() MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult
|
||||
virtual void
|
||||
Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
|
||||
@@ -91,7 +91,7 @@ nsMathMLmspaceFrame::ProcessAttributes(nsPresContext* aPresContext)
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsMathMLmspaceFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -114,7 +114,6 @@ nsMathMLmspaceFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* virtual */ nsresult
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
|
||||
virtual bool IsLeaf() const MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult
|
||||
virtual void
|
||||
Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
|
||||
@@ -545,7 +545,7 @@ nsMathMLmtableOuterFrame::GetRowFrameAt(nsPresContext* aPresContext,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsMathMLmtableOuterFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -645,8 +645,6 @@ nsMathMLmtableOuterFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
aDesiredSize.mBoundingMetrics = mBoundingMetrics;
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIFrame*
|
||||
@@ -886,7 +884,7 @@ nsMathMLmtdInnerFrame::~nsMathMLmtdInnerFrame()
|
||||
mUniqueStyleText->Destroy(PresContext());
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsMathMLmtdInnerFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -897,7 +895,6 @@ nsMathMLmtdInnerFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
// more about <maligngroup/> and <malignmark/> later
|
||||
// ...
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
const
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
|
||||
// overloaded nsTableOuterFrame methods
|
||||
|
||||
virtual nsresult
|
||||
virtual void
|
||||
Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -236,7 +236,7 @@ public:
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
virtual nsresult
|
||||
virtual void
|
||||
Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
|
||||
@@ -116,7 +116,7 @@ nsSVGForeignObjectFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsSVGForeignObjectFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -148,8 +148,6 @@ nsSVGForeignObjectFrame::Reflow(nsPresContext* aPresContext,
|
||||
aDesiredSize.Height() = aReflowState.ComputedHeight();
|
||||
aDesiredSize.SetOverflowAreasToDesiredBounds();
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
return GetFirstPrincipalChild()->GetContentInsertionFrame();
|
||||
}
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -305,7 +305,7 @@ nsSVGOuterSVGFrame::ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
aMargin, aBorder, aPadding);
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsSVGOuterSVGFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
@@ -449,7 +449,6 @@ nsSVGOuterSVGFrame::Reflow(nsPresContext* aPresContext,
|
||||
("exit nsSVGOuterSVGFrame::Reflow: size=%d,%d",
|
||||
aDesiredSize.Width(), aDesiredSize.Height()));
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
nsSize aMargin, nsSize aBorder, nsSize aPadding,
|
||||
uint32_t aFlags) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Reflow(nsPresContext* aPresContext,
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
@@ -845,7 +845,8 @@ CalcUnpaginagedHeight(nsPresContext* aPresContext,
|
||||
return computedHeight;
|
||||
}
|
||||
|
||||
nsresult nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
||||
void
|
||||
nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
@@ -1014,7 +1015,6 @@ nsresult nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
||||
SetDesiredSize(aDesiredSize);
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* ----- global methods ----- */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user