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:
Mats Palmgren 2014-05-12 17:40:28 +00:00
Родитель 3ff2cb8631
Коммит a722b491f1
120 изменённых файлов: 542 добавлений и 721 удалений

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

@ -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,10 +69,10 @@ public:
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nsresult HandleEvent(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent,
@ -201,8 +201,8 @@ protected:
friend class nsResizeDropdownAtFinalPosition;
// Utilities
nsresult ReflowDropdown(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState);
void ReflowDropdown(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState);
enum DropDownPositionState {
// can't show the dropdown at its current position

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

@ -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,10 +33,10 @@ public:
*/
virtual nsRect VisualBorderRectRelativeToSelf() const MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,

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

@ -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,10 +51,10 @@ public:
* Respond to the request to resize and/or reflow
* @see nsIFrame::Reflow
*/
virtual nsresult Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void DestroyFrom(nsIFrame* aDestructRoot) 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,10 +34,10 @@ public:
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nsresult HandleEvent(nsPresContext* aPresContext,
mozilla::WidgetGUIEvent* aEvent,

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

@ -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,10 +17,10 @@ public:
nsLegendFrame(nsStyleContext* aContext) : nsBlockFrame(aContext) {}
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void DestroyFrom(nsIFrame* aDestructRoot) 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,10 +68,10 @@ public:
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Init(nsIContent* aContent,
nsIFrame* aParent,
@ -343,10 +343,10 @@ 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,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
void ReflowAsDropdown(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
// Selection
bool SetOptionsSelectedFromFrame(int32_t aStartIndex,

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

@ -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,10 +27,10 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const 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,10 +57,10 @@ public:
virtual nscoord GetPrefWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,

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

@ -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,10 +32,10 @@ public:
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const 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);
ReflowAnonymousContent(aPresContext, aDesiredSize, aReflowState);
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,
trackReflowState, trackX, trackY, 0, frameStatus);
NS_ENSURE_SUCCESS(rv, rv);
ReflowChild(trackFrame, aPresContext, trackDesiredSize,
trackReflowState, trackX, trackY, 0, frameStatus);
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus),
"We gave our child unconstrained height, so it should be complete");
rv = FinishReflowChild(trackFrame, aPresContext, trackDesiredSize,
&trackReflowState, trackX, trackY, 0);
NS_ENSURE_SUCCESS(rv, rv);
FinishReflowChild(trackFrame, aPresContext, trackDesiredSize,
&trackReflowState, trackX, trackY, 0);
}
nsIFrame* thumbFrame = mThumbDiv->GetPrimaryFrame();
@ -392,15 +386,12 @@ nsRangeFrame::ReflowAnonymousContent(nsPresContext* aPresContext,
nsReflowStatus frameStatus;
nsHTMLReflowMetrics thumbDesiredSize(aReflowState);
nsresult rv = ReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
thumbReflowState, 0, 0, 0, frameStatus);
NS_ENSURE_SUCCESS(rv, rv);
ReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
thumbReflowState, 0, 0, 0, frameStatus);
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus),
"We gave our child unconstrained height, so it should be complete");
rv = FinishReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
&thumbReflowState, 0, 0, 0);
NS_ENSURE_SUCCESS(rv, rv);
FinishReflowChild(thumbFrame, aPresContext, thumbDesiredSize,
&thumbReflowState, 0, 0, 0);
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,
progressDesiredSize, progressReflowState, 0, 0,
0, frameStatus);
NS_ENSURE_SUCCESS(rv, rv);
ReflowChild(rangeProgressFrame, aPresContext,
progressDesiredSize, progressReflowState, 0, 0,
0, frameStatus);
MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(frameStatus),
"We gave our child unconstrained height, so it should be complete");
rv = FinishReflowChild(rangeProgressFrame, aPresContext,
progressDesiredSize, &progressReflowState, 0, 0, 0);
NS_ENSURE_SUCCESS(rv, rv);
FinishReflowChild(rangeProgressFrame, aPresContext,
progressDesiredSize, &progressReflowState, 0, 0, 0);
DoUpdateRangeProgressFrame(rangeProgressFrame, nsSize(aDesiredSize.Width(),
aDesiredSize.Height()));
}
return NS_OK;
}
#ifdef ACCESSIBILITY

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

@ -45,10 +45,10 @@ public:
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
@ -140,9 +140,9 @@ private:
nsTArray<ContentInfo>& aElements);
// Helper function which reflows the anonymous div frames.
nsresult ReflowAnonymousContent(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState);
void ReflowAnonymousContent(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState);
void DoUpdateThumbPosition(nsIFrame* aThumbFrame,
const nsSize& aRangeSize);

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

@ -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,10 +23,10 @@ public:
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual nsresult Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aCX,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
nscoord HeightOfARow() const { return mHeightOfARow; }

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

@ -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),
inflation);
NS_ENSURE_SUCCESS(rv, rv);
nsLayoutUtils::GetFontMetricsForFrame(this, getter_AddRefs(fontMet),
inflation);
// 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,10 +50,10 @@ public:
nsSize aMargin, nsSize aBorder,
nsSize aPadding, bool aShrinkWrap) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nsSize GetMinSize(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
virtual bool IsCollapsed() 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,14 +117,14 @@ protected:
bool FrameDependsOnContainer(nsIFrame* aFrame, bool aCBWidthChanged,
bool aCBHeightChanged);
nsresult ReflowAbsoluteFrame(nsIFrame* aDelegatingFrame,
nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
const nsRect& aContainingBlockRect,
bool aConstrainHeight,
nsIFrame* aKidFrame,
nsReflowStatus& aStatus,
nsOverflowAreas* aOverflowAreas);
void ReflowAbsoluteFrame(nsIFrame* aDelegatingFrame,
nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
const nsRect& aContainingBlockRect,
bool aConstrainHeight,
nsIFrame* aKidFrame,
nsReflowStatus& aStatus,
nsOverflowAreas* aOverflowAreas);
/**
* Mark our absolute frames dirty.

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

@ -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,11 +3115,9 @@ 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);
@ -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,
floatAvailableSpace, availableSpaceHeight,
&floatManagerState, aKeepReflowGoing,
&lineReflowStatus, allowPullUp);
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,
0, isAdjacentWithTop,
nullptr, floatRS,
aReflowStatus, aState);
} while (NS_SUCCEEDED(rv) && clearanceFrame);
brc.ReflowBlock(aAdjustedAvailableSpace, true, margin,
0, isAdjacentWithTop,
nullptr, floatRS,
aReflowStatus, aState);
} 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,10 +261,10 @@ public:
nsHTMLReflowMetrics& aMetrics,
nscoord aConsumed);
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,
@ -594,9 +594,9 @@ 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,
line_iterator aLine,
bool* aKeepReflowGoing);
void ReflowLine(nsBlockReflowState& aState,
line_iterator aLine,
bool* aKeepReflowGoing);
// Return false if it needs another reflow because of reduced space
// between floats that are next to it (but not next to its top), and
@ -639,30 +639,30 @@ protected:
bool ShouldApplyTopMargin(nsBlockReflowState& aState,
nsLineBox* aLine);
nsresult ReflowBlockFrame(nsBlockReflowState& aState,
void ReflowBlockFrame(nsBlockReflowState& aState,
line_iterator aLine,
bool* aKeepGoing);
void ReflowInlineFrames(nsBlockReflowState& aState,
line_iterator aLine,
bool* aKeepLineGoing);
void DoReflowInlineFrames(nsBlockReflowState& aState,
nsLineLayout& aLineLayout,
line_iterator aLine,
bool* aKeepGoing);
nsFlowAreaRect& aFloatAvailableSpace,
nscoord& aAvailableSpaceHeight,
nsFloatManager::SavedState*
aFloatStateBeforeLine,
bool* aKeepReflowGoing,
LineReflowStatus* aLineReflowStatus,
bool aAllowPullUp);
nsresult ReflowInlineFrames(nsBlockReflowState& aState,
line_iterator aLine,
bool* aKeepLineGoing);
nsresult DoReflowInlineFrames(nsBlockReflowState& aState,
nsLineLayout& aLineLayout,
line_iterator aLine,
nsFlowAreaRect& aFloatAvailableSpace,
nscoord& aAvailableSpaceHeight,
nsFloatManager::SavedState*
aFloatStateBeforeLine,
bool* aKeepReflowGoing,
LineReflowStatus* aLineReflowStatus,
bool aAllowPullUp);
nsresult ReflowInlineFrame(nsBlockReflowState& aState,
nsLineLayout& aLineLayout,
line_iterator aLine,
nsIFrame* aFrame,
LineReflowStatus* aLineReflowStatus);
void ReflowInlineFrame(nsBlockReflowState& aState,
nsLineLayout& aLineLayout,
line_iterator aLine,
nsIFrame* aFrame,
LineReflowStatus* aLineReflowStatus);
// Compute the available width for a float.
nsRect AdjustFloatAvailableSpace(nsBlockReflowState& aState,
@ -676,16 +676,16 @@ protected:
// but only if the available height is constrained.
// aAdjustedAvailableSpace is the result of calling
// nsBlockFrame::AdjustFloatAvailableSpace.
nsresult ReflowFloat(nsBlockReflowState& aState,
const nsRect& aAdjustedAvailableSpace,
nsIFrame* aFloat,
nsMargin& aFloatMargin,
nsMargin& aFloatOffsets,
// Whether the float's position
// (aAdjustedAvailableSpace) has been pushed down
// due to the presence of other floats.
bool aFloatPushedDown,
nsReflowStatus& aReflowStatus);
void ReflowFloat(nsBlockReflowState& aState,
const nsRect& aAdjustedAvailableSpace,
nsIFrame* aFloat,
nsMargin& aFloatMargin,
nsMargin& aFloatOffsets,
// Whether the float's position
// (aAdjustedAvailableSpace) has been pushed down
// due to the presence of other floats.
bool aFloatPushedDown,
nsReflowStatus& aReflowStatus);
//----------------------------------------
// Methods for pushing/pulling lines/frames

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

@ -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,15 +28,15 @@ public:
const nsHTMLReflowState& aParentRS);
~nsBlockReflowContext() { }
nsresult ReflowBlock(const nsRect& aSpace,
bool aApplyTopMargin,
nsCollapsingMargin& aPrevMargin,
nscoord aClearance,
bool aIsAdjacentWithTop,
nsLineBox* aLine,
nsHTMLReflowState& aReflowState,
nsReflowStatus& aReflowStatus,
nsBlockReflowState& aState);
void ReflowBlock(const nsRect& aSpace,
bool aApplyTopMargin,
nsCollapsingMargin& aPrevMargin,
nscoord aClearance,
bool aIsAdjacentWithTop,
nsLineBox* aLine,
nsHTMLReflowState& aReflowState,
nsReflowStatus& aReflowStatus,
nsBlockReflowState& aState);
bool PlaceBlock(const nsHTMLReflowState& aReflowState,
bool aForceFit,

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

@ -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,10 +65,10 @@ public:
#endif
// nsIHTMLReflow
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aMetrics,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aMetrics,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) 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,10 +52,10 @@ public:
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE
{
return nsContainerFrame::IsFrameOfType(aFlags &

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

@ -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,10 +17,10 @@ public:
virtual nsresult SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nsresult AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) 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,8 +269,8 @@ 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,
&continuation, true);
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,10 +53,10 @@ public:
nsSize aCBSize, nscoord aAvailableWidth,
nsSize aMargin, nsSize aBorder, nsSize aPadding,
uint32_t aFlags) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual bool CanContinueTextRun() const MOZ_OVERRIDE;
virtual nscoord GetBaseline() const 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,
contentBoxMainSize, availableHeightForContent,
struts, axisTracker);
DoFlexLayout(aPresContext, aDesiredSize, aReflowState, aStatus,
contentBoxMainSize, availableHeightForContent,
struts, axisTracker);
}
return rv;
}
// RAII class to clean up a list of FlexLines.

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

@ -42,10 +42,10 @@ public:
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nscoord
GetMinWidth(nsRenderingContext* aRenderingContext) 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,10 +318,10 @@ 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,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nsresult DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus 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,10 +98,10 @@ public:
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
#ifdef DEBUG_FRAME_DUMP

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

@ -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,9 +451,9 @@ nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState,
mHelper.mHasVerticalScrollbar = aAssumeVScroll;
nsReflowStatus status;
nsresult rv = ReflowChild(mHelper.mScrolledFrame, presContext, *aMetrics,
kidReflowState, 0, 0,
NS_FRAME_NO_MOVE_FRAME, status);
ReflowChild(mHelper.mScrolledFrame, presContext, *aMetrics,
kidReflowState, 0, 0,
NS_FRAME_NO_MOVE_FRAME, status);
mHelper.mHasHorizontalScrollbar = didHaveHorizontalScrollbar;
mHelper.mHasVerticalScrollbar = didHaveVerticalScrollbar;
@ -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),
GuessVScrollbarNeeded(*aState), &kidDesiredSize, true);
NS_ENSURE_SUCCESS(rv, rv);
ReflowScrolledFrame(aState, GuessHScrollbarNeeded(*aState),
GuessVScrollbarNeeded(*aState), &kidDesiredSize, true);
// 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,15 +465,15 @@ 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,
bool aAssumeHScroll,
bool aAssumeVScroll,
nsHTMLReflowMetrics* aMetrics,
bool aFirstPass);
nsresult ReflowContents(ScrollReflowState* aState,
const nsHTMLReflowMetrics& aDesiredSize);
void ReflowScrolledFrame(ScrollReflowState* aState,
bool aAssumeHScroll,
bool aAssumeVScroll,
nsHTMLReflowMetrics* aMetrics,
bool aFirstPass);
void ReflowContents(ScrollReflowState* aState,
const nsHTMLReflowMetrics& aDesiredSize);
void PlaceScrollArea(const ScrollReflowState& aState,
const nsPoint& aScrollPosition);
nscoord GetIntrinsicVScrollbarWidth(nsRenderingContext *aRenderingContext);
@ -488,10 +488,10 @@ public:
virtual nsresult GetPadding(nsMargin& aPadding) MOZ_OVERRIDE;
virtual bool IsCollapsed() MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual bool UpdateOverflow() MOZ_OVERRIDE {
return mHelper.UpdateOverflow();

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

@ -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,10 +63,10 @@ public:
nsSize aMargin, nsSize aBorder, nsSize aPadding,
uint32_t aFlags) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
nsRect GetInnerArea() const;

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

@ -1865,10 +1865,10 @@ 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,
nsHTMLReflowMetrics& aReflowMetrics,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) = 0;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aReflowMetrics,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) = 0;
/**
* Post-reflow hook. After a frame is reflowed this method will be called

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

@ -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,10 +81,10 @@ public:
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual mozilla::IntrinsicSize GetIntrinsicSize() MOZ_OVERRIDE;
virtual nsSize GetIntrinsicRatio() MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nsresult GetContentForEvent(mozilla::WidgetEvent* aEvent,
nsIContent** aContent) 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);
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,10 +72,10 @@ 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,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual bool CanContinueTextRun() const MOZ_OVERRIDE;
@ -128,17 +128,17 @@ protected:
virtual int GetLogicalSkipSides(const nsHTMLReflowState* aReflowState = nullptr) const MOZ_OVERRIDE;
nsresult ReflowFrames(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
InlineReflowState& rs,
nsHTMLReflowMetrics& aMetrics,
nsReflowStatus& aStatus);
void ReflowFrames(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
InlineReflowState& rs,
nsHTMLReflowMetrics& aMetrics,
nsReflowStatus& aStatus);
nsresult ReflowInlineFrame(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
InlineReflowState& rs,
nsIFrame* aFrame,
nsReflowStatus& aStatus);
void ReflowInlineFrame(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
InlineReflowState& rs,
nsIFrame* aFrame,
nsReflowStatus& aStatus);
/**
* Reparent floats whose placeholders are inline descendants of aFrame from
@ -193,10 +193,10 @@ public:
virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
#endif
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Init(nsIContent* aContent, nsIFrame* aParent,
nsIFrame* aPrevInFlow) 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,10 +51,10 @@ 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,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
/**
* This method does most of the work that Reflow() above need done.

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

@ -839,12 +839,8 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
&savedOptionalBreakPriority);
if (!isText) {
nsresult rv = aFrame->Reflow(mPresContext, metrics, reflowStateHolder.ref(),
aReflowStatus);
if (NS_FAILED(rv)) {
NS_WARNING( "Reflow of frame failed in nsLineLayout" );
return rv;
}
aFrame->Reflow(mPresContext, metrics, reflowStateHolder.ref(),
aReflowStatus);
} 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,10 +58,10 @@ public:
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nsresult DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus 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,10 +20,10 @@ public:
friend class nsPageFrame;
// nsIFrame
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aMaxSize,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aMaxSize,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual bool IsFrameOfType(uint32_t aFlags) const 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,10 +19,10 @@ public:
friend nsIFrame* NS_NewPageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aMaxSize,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aMaxSize,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
@ -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,10 +96,10 @@ public:
virtual nsSize GetPrefSize(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
virtual nsSize GetMaxSize(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void DestroyFrom(nsIFrame* aDestructRoot) 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( &ltime );
@ -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,10 +64,10 @@ public:
NS_DECL_FRAMEARENA_HELPERS
// nsIFrame
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aMaxSize,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aMaxSize,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,

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

@ -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,10 +61,10 @@ public:
nsSize aMargin, nsSize aBorder, nsSize aPadding,
uint32_t aFlags) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,

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

@ -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,10 +215,10 @@ public:
virtual nsresult GetPrefWidthTightBounds(nsRenderingContext* aContext,
nscoord* aX,
nscoord* aXMost) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aMetrics,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aMetrics,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual bool CanContinueTextRun() const MOZ_OVERRIDE;
// Method that is called for a text frame that is logically
// adjacent to the end of the line (i.e. followed only by empty text frames,

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

@ -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,10 +61,10 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
virtual bool IsLeaf() const MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
#ifdef ACCESSIBILITY
virtual mozilla::a11y::AccType AccessibleType() 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,8 +216,8 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
// Reflow the frame
kidReflowState.SetComputedHeight(aReflowState.ComputedHeight());
rv = ReflowChild(kidFrame, aPresContext, kidDesiredSize, kidReflowState,
0, 0, 0, aStatus);
ReflowChild(kidFrame, aPresContext, kidDesiredSize, kidReflowState,
0, 0, 0, aStatus);
kidHeight = kidDesiredSize.Height();
FinishReflowChild(kidFrame, aPresContext, kidDesiredSize, nullptr, 0, 0, 0);
@ -262,10 +260,10 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
nsRect rect = AdjustReflowStateAsContainingBlock(&reflowState);
// Just reflow all the fixed-pos frames.
rv = GetAbsoluteContainingBlock()->Reflow(this, aPresContext, reflowState, aStatus,
rect,
false, true, true, // XXX could be optimized
&aDesiredSize.mOverflowAreas);
GetAbsoluteContainingBlock()->Reflow(this, aPresContext, reflowState, aStatus,
rect,
false, true, true, // XXX could be optimized
&aDesiredSize.mOverflowAreas);
}
// If we were dirty then do a repaint
@ -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,10 +57,10 @@ public:
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
/**
* Get the "type" of the frame

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

@ -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,10 +43,10 @@ public:
return GetFirstPrincipalChild()->GetContentInsertionFrame();
}
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,

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

@ -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,10 +49,10 @@ public:
nsSize aMargin, nsSize aBorder, nsSize aPadding,
uint32_t aFlags) MOZ_OVERRIDE;
virtual nsresult Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual void Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nsresult DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,

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

@ -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 ----- */

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше