mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1148833 part 3 - Remove nsIFrame::WillReflow and add a non-virtual MarkInReflow method instead that sets NS_FRAME_IN_REFLOW. Call it at the start of Reflow(). r=roc
This commit is contained in:
parent
2841011c3a
commit
5bd17a127b
@ -9088,8 +9088,6 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
|
||||
mCurrentReflowRoot = target;
|
||||
#endif
|
||||
|
||||
target->WillReflow(mPresContext);
|
||||
|
||||
// If the target frame is the root of the frame hierarchy, then
|
||||
// use all the available space. If it's simply a `reflow root',
|
||||
// then use the target frame's size as the available space.
|
||||
|
@ -46,9 +46,9 @@ associated with the frame, painting the frame, and handling events that
|
||||
are passed in from the widget hierarchy. The nsIHTMLReflow interface
|
||||
inherits from the nsIReflow interface and adds methods related to word
|
||||
breaking and whitespace querying. The nsIReflow interface defines
|
||||
the Reflow() method that initiates the reflow process along with the WillReflow()
|
||||
and DidReflow() methods that get called before and after the reflow process
|
||||
respectively. nsReflowState and nsReflowMetrics are parameters to
|
||||
the Reflow() method that initiates the reflow process along with the
|
||||
DidReflow() method that get calledafter the reflow process.
|
||||
nsReflowState and nsReflowMetrics are parameters to
|
||||
the templatized nsIReflow interface: the former is used to hold state during
|
||||
reflow of a frame and the latter is used to return the frame's desired
|
||||
size and alignment to the parent frame during the reflow process.
|
||||
|
@ -775,6 +775,7 @@ nsComboboxControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
// Constraints we try to satisfy:
|
||||
|
||||
// 1) Default width of button is the vertical scrollbar size
|
||||
|
@ -379,6 +379,7 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsFieldSetFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
|
@ -184,6 +184,7 @@ nsHTMLButtonControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLButtonControlFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
|
@ -364,6 +364,7 @@ nsListControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
return;
|
||||
}
|
||||
|
||||
MarkInReflow();
|
||||
/*
|
||||
* Due to the fact that our intrinsic height depends on the heights of our
|
||||
* kids, we end up having to do two-pass reflow, in general -- the first pass
|
||||
@ -457,8 +458,6 @@ nsListControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
computedHeight = state.ApplyMinMaxHeight(computedHeight);
|
||||
state.SetComputedHeight(computedHeight);
|
||||
|
||||
nsHTMLScrollFrame::WillReflow(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....
|
||||
@ -577,7 +576,6 @@ nsListControlFrame::ReflowAsDropdown(nsPresContext* aPresContext,
|
||||
|
||||
mLastDropdownComputedHeight = state.ComputedHeight();
|
||||
|
||||
nsHTMLScrollFrame::WillReflow(aPresContext);
|
||||
nsHTMLScrollFrame::Reflow(aPresContext, aDesiredSize, state, aStatus);
|
||||
}
|
||||
|
||||
|
@ -99,6 +99,7 @@ nsMeterFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsMeterFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
|
@ -106,6 +106,7 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsNumberControlFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
|
@ -104,6 +104,7 @@ nsProgressFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsProgressFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
|
@ -279,6 +279,7 @@ nsRangeFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsRangeFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
|
@ -489,6 +489,7 @@ nsTextControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsTextControlFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
|
@ -397,9 +397,6 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
|
||||
aContainingBlock.width,
|
||||
aContainingBlock.height);
|
||||
|
||||
// Send the WillReflow() notification and position the frame
|
||||
aKidFrame->WillReflow(aPresContext);
|
||||
|
||||
// Get the border values
|
||||
const nsMargin& border = aReflowState.mStyleBorder->GetComputedBorder();
|
||||
|
||||
|
@ -84,6 +84,7 @@ BRFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("BRFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
|
||||
WritingMode wm = aReflowState.GetWritingMode();
|
||||
|
@ -1012,6 +1012,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsBlockFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
|
||||
#ifdef DEBUG
|
||||
@ -7003,7 +7004,6 @@ nsBlockFrame::ReflowBullet(nsIFrame* aBulletFrame,
|
||||
nsHTMLReflowState reflowState(aState.mPresContext, rs,
|
||||
aBulletFrame, availSize);
|
||||
nsReflowStatus status;
|
||||
aBulletFrame->WillReflow(aState.mPresContext);
|
||||
aBulletFrame->Reflow(aState.mPresContext, aMetrics, reflowState, status);
|
||||
|
||||
// Get the float available space using our saved state from before we
|
||||
|
@ -282,9 +282,6 @@ nsBlockReflowContext::ReflowBlock(const LogicalRect& aSpace,
|
||||
mOuterReflowState.mBlockDelta + mBCoord - aLine->BStart();
|
||||
}
|
||||
|
||||
// Let frame know that we are reflowing it
|
||||
mFrame->WillReflow(mPresContext);
|
||||
|
||||
#ifdef DEBUG
|
||||
mMetrics.ISize(mWritingMode) = nscoord(0xdeadbeef);
|
||||
mMetrics.BSize(mWritingMode) = nscoord(0xdeadbeef);
|
||||
|
@ -623,6 +623,7 @@ nsBulletFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsBulletFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
|
||||
|
||||
|
@ -604,6 +604,7 @@ nsCanvasFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsCanvasFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
NS_FRAME_TRACE_REFLOW_IN("nsCanvasFrame::Reflow");
|
||||
|
@ -1014,6 +1014,7 @@ nsColumnSetFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
// Don't support interruption in columns
|
||||
nsPresContext::InterruptPreventer noInterrupts(aPresContext);
|
||||
|
||||
|
@ -934,11 +934,6 @@ nsContainerFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes the WillReflow() function, positions the frame and its view (if
|
||||
* requested), and then calls Reflow(). If the reflow succeeds and the child
|
||||
* frame is complete, deletes any next-in-flows using DeleteNextInFlowChild()
|
||||
*/
|
||||
void
|
||||
nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
|
||||
nsPresContext* aPresContext,
|
||||
@ -957,10 +952,7 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
|
||||
"FinishReflowChild with unconstrained container width!");
|
||||
}
|
||||
|
||||
// Send the WillReflow() notification, and position the child frame
|
||||
// and its view if requested
|
||||
aKidFrame->WillReflow(aPresContext);
|
||||
|
||||
// Position the child frame and its view if requested.
|
||||
if (NS_FRAME_NO_MOVE_FRAME != (aFlags & NS_FRAME_NO_MOVE_FRAME)) {
|
||||
aKidFrame->SetPosition(aWM, aPos, aContainerWidth);
|
||||
}
|
||||
@ -1002,10 +994,7 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
|
||||
{
|
||||
NS_PRECONDITION(aReflowState.frame == aKidFrame, "bad reflow state");
|
||||
|
||||
// Send the WillReflow() notification, and position the child frame
|
||||
// and its view if requested
|
||||
aKidFrame->WillReflow(aPresContext);
|
||||
|
||||
// Position the child frame and its view if requested.
|
||||
if (NS_FRAME_NO_MOVE_FRAME != (aFlags & NS_FRAME_NO_MOVE_FRAME)) {
|
||||
aKidFrame->SetPosition(nsPoint(aX, aY));
|
||||
}
|
||||
|
@ -231,9 +231,9 @@ public:
|
||||
bool aShrinkWrap) override;
|
||||
|
||||
/**
|
||||
* Invokes the WillReflow() function, positions the frame and its view (if
|
||||
* requested), and then calls Reflow(). If the reflow succeeds and the child
|
||||
* frame is complete, deletes any next-in-flows using DeleteNextInFlowChild()
|
||||
* Positions aChildFrame and its view (if requested), and then calls Reflow().
|
||||
* If the reflow status after reflowing the child is FULLY_COMPLETE then any
|
||||
* next-in-flows are deleted using DeleteNextInFlowChild().
|
||||
*
|
||||
* Flags:
|
||||
* NS_FRAME_NO_MOVE_VIEW - don't position the frame's view. Set this if you
|
||||
@ -241,7 +241,7 @@ public:
|
||||
* NS_FRAME_NO_MOVE_FRAME - don't move the frame. aX and aY are ignored in this
|
||||
* case. Also implies NS_FRAME_NO_MOVE_VIEW
|
||||
*/
|
||||
void ReflowChild(nsIFrame* aKidFrame,
|
||||
void ReflowChild(nsIFrame* aChildFrame,
|
||||
nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
|
@ -164,6 +164,7 @@ nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aReflowStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsFirstLetterFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aReflowStatus);
|
||||
|
||||
@ -205,7 +206,6 @@ nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
|
||||
ll.SetInFirstLetter(true);
|
||||
ll.SetFirstLetterStyleOK(true);
|
||||
|
||||
kid->WillReflow(aPresContext);
|
||||
kid->Reflow(aPresContext, kidMetrics, rs, aReflowStatus);
|
||||
|
||||
ll.EndLineReflow();
|
||||
|
@ -3429,6 +3429,7 @@ nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsFlexContainerFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
PR_LOG(GetFlexContainerLog(), PR_LOG_DEBUG,
|
||||
|
@ -4410,20 +4410,6 @@ nsFrame::ShrinkWidthToFit(nsRenderingContext *aRenderingContext,
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
nsFrame::WillReflow(nsPresContext* aPresContext)
|
||||
{
|
||||
#ifdef DEBUG_dbaron_off
|
||||
// bug 81268
|
||||
NS_ASSERTION(!(mState & NS_FRAME_IN_REFLOW),
|
||||
"nsFrame::WillReflow: frame is already in reflow");
|
||||
#endif
|
||||
|
||||
NS_FRAME_TRACE_MSG(NS_FRAME_TRACE_CALLS,
|
||||
("WillReflow: oldState=%x", mState));
|
||||
mState |= NS_FRAME_IN_REFLOW;
|
||||
}
|
||||
|
||||
void
|
||||
nsFrame::DidReflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState* aReflowState,
|
||||
@ -4524,6 +4510,7 @@ nsFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsFrame");
|
||||
aDesiredSize.ClearSize();
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
@ -8644,7 +8631,6 @@ nsFrame::BoxReflow(nsBoxLayoutState& aState,
|
||||
#endif
|
||||
|
||||
// place the child and reflow
|
||||
WillReflow(aPresContext);
|
||||
|
||||
Reflow(aPresContext, aDesiredSize, reflowState, status);
|
||||
|
||||
|
@ -302,7 +302,6 @@ public:
|
||||
nscoord ShrinkWidthToFit(nsRenderingContext *aRenderingContext,
|
||||
nscoord aWidthInCB);
|
||||
|
||||
virtual void WillReflow(nsPresContext* aPresContext) override;
|
||||
/**
|
||||
* Calculates the size of this frame after reflowing (calling Reflow on, and
|
||||
* updating the size and position of) its children, as necessary. The
|
||||
|
@ -855,6 +855,7 @@ nsHTMLFramesetFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLFramesetFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
nsIPresShell *shell = aPresContext->PresShell();
|
||||
|
@ -802,6 +802,7 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLScrollFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
|
@ -1180,6 +1180,7 @@ nsGridContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsGridContainerFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
|
@ -251,6 +251,7 @@ nsHTMLCanvasFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLCanvasFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
|
||||
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
|
||||
|
@ -1766,17 +1766,6 @@ public:
|
||||
nscoord* aX,
|
||||
nscoord* aXMost);
|
||||
|
||||
/**
|
||||
* Pre-reflow hook. Before a frame is reflowed this method will be called.
|
||||
* This call will always be invoked at least once before a subsequent Reflow
|
||||
* and DidReflow call. It may be called more than once, In general you will
|
||||
* receive on WillReflow notification before each Reflow request.
|
||||
*
|
||||
* XXX Is this really the semantics we want? Because we have the NS_FRAME_IN_REFLOW
|
||||
* bit we can ensure we don't call it more than once...
|
||||
*/
|
||||
virtual void WillReflow(nsPresContext* aPresContext) = 0;
|
||||
|
||||
/**
|
||||
* The frame is given an available size and asked for its desired
|
||||
* size. This is the frame's opportunity to reflow its children.
|
||||
@ -3021,6 +3010,14 @@ private:
|
||||
}
|
||||
|
||||
protected:
|
||||
void MarkInReflow() {
|
||||
#ifdef DEBUG_dbaron_off
|
||||
// bug 81268
|
||||
NS_ASSERTION(!(mState & NS_FRAME_IN_REFLOW), "frame is already in reflow");
|
||||
#endif
|
||||
mState |= NS_FRAME_IN_REFLOW;
|
||||
}
|
||||
|
||||
nsFrameState mState;
|
||||
|
||||
// When there is an overflow area only slightly larger than mRect,
|
||||
|
@ -858,6 +858,7 @@ nsImageFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsImageFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
|
||||
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
|
||||
|
@ -333,6 +333,7 @@ nsInlineFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsInlineFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
|
||||
if (nullptr == aReflowState.mLineLayout) {
|
||||
@ -1064,6 +1065,7 @@ nsFirstLineFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
if (nullptr == aReflowState.mLineLayout) {
|
||||
return; // XXX does this happen? why?
|
||||
}
|
||||
|
@ -57,6 +57,7 @@ nsLeafFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsLeafFrame");
|
||||
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
|
||||
("enter nsLeafFrame::Reflow: aMaxSize=%d,%d",
|
||||
|
@ -931,10 +931,8 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
||||
mLineBox->DisableResizeReflowOptimization();
|
||||
}
|
||||
|
||||
// Let frame know that are reflowing it. Note that we don't bother
|
||||
// positioning the frame yet, because we're probably going to end up
|
||||
// moving it when we do the block-direction alignment
|
||||
aFrame->WillReflow(mPresContext);
|
||||
// Note that we don't bother positioning the frame yet, because we're probably
|
||||
// going to end up moving it when we do the block-direction alignment.
|
||||
|
||||
// Adjust spacemanager coordinate system for the frame.
|
||||
nsHTMLReflowMetrics metrics(lineWM);
|
||||
|
@ -26,6 +26,7 @@ nsPageContentFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsPageContentFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
aStatus = NS_FRAME_COMPLETE; // initialize out parameter
|
||||
|
@ -55,6 +55,7 @@ nsPageFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsPageFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
aStatus = NS_FRAME_COMPLETE; // initialize out parameter
|
||||
|
@ -141,6 +141,7 @@ nsPlaceholderFrame::Reflow(nsPresContext* aPresContext,
|
||||
}
|
||||
#endif
|
||||
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsPlaceholderFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
aDesiredSize.ClearSize();
|
||||
|
@ -495,6 +495,7 @@ nsPluginFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsPluginFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
|
||||
|
||||
|
@ -426,6 +426,7 @@ nsRubyBaseContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsRubyBaseContainerFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
@ -134,6 +134,7 @@ nsRubyFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsRubyFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
|
@ -122,6 +122,7 @@ nsRubyTextContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsRubyTextContainerFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
|
@ -161,6 +161,7 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
NS_PRECONDITION(aPresContext->IsRootPaginatedDocument(),
|
||||
"A Page Sequence is only for real pages");
|
||||
DO_GLOBAL_REFLOW_COUNT("nsSimplePageSequenceFrame");
|
||||
|
@ -758,6 +758,7 @@ nsSubDocumentFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsSubDocumentFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
|
||||
|
@ -8003,6 +8003,7 @@ nsTextFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsTextFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
|
||||
|
||||
|
@ -242,6 +242,7 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsVideoFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
|
||||
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
|
||||
|
@ -175,6 +175,7 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("ViewportFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
NS_FRAME_TRACE_REFLOW_IN("ViewportFrame::Reflow");
|
||||
|
@ -891,6 +891,7 @@ nsMathMLContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
mPresentationData.flags &= ~NS_MATHML_ERROR;
|
||||
aDesiredSize.Width() = aDesiredSize.Height() = 0;
|
||||
aDesiredSize.SetBlockStartAscent(0);
|
||||
|
@ -137,6 +137,7 @@ nsMathMLSelectedFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
mPresentationData.flags &= ~NS_MATHML_ERROR;
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
aDesiredSize.ClearSize();
|
||||
|
@ -126,6 +126,7 @@ nsMathMLTokenFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
mPresentationData.flags &= ~NS_MATHML_ERROR;
|
||||
|
||||
// initializations needed for empty markup like <mtag></mtag>
|
||||
|
@ -215,6 +215,7 @@ nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
mPresentationData.flags &= ~NS_MATHML_ERROR;
|
||||
aDesiredSize.ClearSize();
|
||||
aDesiredSize.SetBlockStartAscent(0);
|
||||
|
@ -164,6 +164,7 @@ nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
nsReflowStatus childStatus;
|
||||
|
||||
mPresentationData.flags &= ~NS_MATHML_ERROR;
|
||||
|
@ -98,6 +98,7 @@ nsMathMLmspaceFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
mPresentationData.flags &= ~NS_MATHML_ERROR;
|
||||
ProcessAttributes(aPresContext);
|
||||
|
||||
|
@ -5263,7 +5263,6 @@ SVGTextFrame::DoReflow()
|
||||
"style system should ensure that :-moz-svg-text "
|
||||
"does not get styled");
|
||||
|
||||
kid->WillReflow(presContext);
|
||||
kid->Reflow(presContext, desiredSize, reflowState, status);
|
||||
kid->DidReflow(presContext, &reflowState, nsDidReflowStatus::FINISHED);
|
||||
kid->SetSize(wm, desiredSize.Size(wm));
|
||||
|
@ -519,6 +519,7 @@ void nsSVGForeignObjectFrame::RequestReflow(nsIPresShell::IntrinsicDirty aType)
|
||||
void
|
||||
nsSVGForeignObjectFrame::DoReflow()
|
||||
{
|
||||
MarkInReflow();
|
||||
// Skip reflow if we're zero-sized, unless this is our first reflow.
|
||||
if (IsDisabled() &&
|
||||
!(GetStateBits() & NS_FRAME_FIRST_REFLOW))
|
||||
|
@ -345,6 +345,7 @@ nsSVGOuterSVGFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsSVGOuterSVGFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
|
||||
|
@ -861,6 +861,7 @@ nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsTableCellFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
|
@ -91,6 +91,7 @@ nsTableColFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsTableColFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
aDesiredSize.ClearSize();
|
||||
|
@ -354,6 +354,7 @@ nsTableColGroupFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsTableColGroupFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
NS_ASSERTION(nullptr!=mContent, "bad state -- null content for frame");
|
||||
|
@ -1782,6 +1782,7 @@ nsTableFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsTableFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
bool isPaginated = aPresContext->IsPaginated();
|
||||
|
@ -786,6 +786,7 @@ nsTableOuterFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aOuterRS,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsTableOuterFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aOuterRS, aDesiredSize, aStatus);
|
||||
|
||||
|
@ -1037,6 +1037,7 @@ nsTableRowFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsTableRowFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
|
@ -1282,6 +1282,7 @@ nsTableRowGroupFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsTableRowGroupFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
|
@ -629,6 +629,7 @@ nsBoxFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
MarkInReflow();
|
||||
// If you make changes to this method, please keep nsLeafBoxFrame::Reflow
|
||||
// in sync, if the changes are applicable there.
|
||||
|
||||
|
@ -201,6 +201,7 @@ nsLeafBoxFrame::Reflow(nsPresContext* aPresContext,
|
||||
// class hierarchy. If you make changes here, please keep
|
||||
// nsBoxFrame::Reflow in sync.
|
||||
|
||||
MarkInReflow();
|
||||
DO_GLOBAL_REFLOW_COUNT("nsLeafBoxFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user