mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1277129 Part 6b - Rename rendContext to mRenderingContext in SizeComputationInput. r=dbaron
MozReview-Commit-ID: LczLJDtDncy --HG-- extra : rebase_source : c32e928ae25f94305fb907db89278dce7304a903
This commit is contained in:
parent
cd13f0ea71
commit
55cde36029
@ -870,7 +870,7 @@ nsComboboxControlFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
nsIScrollableFrame* scrollable = do_QueryFrame(mListControlFrame);
|
nsIScrollableFrame* scrollable = do_QueryFrame(mListControlFrame);
|
||||||
NS_ASSERTION(scrollable, "List must be a scrollable frame");
|
NS_ASSERTION(scrollable, "List must be a scrollable frame");
|
||||||
buttonISize = scrollable->GetNondisappearingScrollbarWidth(
|
buttonISize = scrollable->GetNondisappearingScrollbarWidth(
|
||||||
PresContext(), aReflowState.rendContext, wm);
|
PresContext(), aReflowState.mRenderingContext, wm);
|
||||||
if (buttonISize > aReflowState.ComputedISize()) {
|
if (buttonISize > aReflowState.ComputedISize()) {
|
||||||
buttonISize = 0;
|
buttonISize = 0;
|
||||||
}
|
}
|
||||||
|
@ -429,13 +429,13 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
innerAvailSize.BSize(innerWM) = legendAvailSize.BSize(legendWM) =
|
innerAvailSize.BSize(innerWM) = legendAvailSize.BSize(legendWM) =
|
||||||
NS_UNCONSTRAINEDSIZE;
|
NS_UNCONSTRAINEDSIZE;
|
||||||
NS_ASSERTION(!inner ||
|
NS_ASSERTION(!inner ||
|
||||||
nsLayoutUtils::IntrinsicForContainer(aReflowState.rendContext,
|
nsLayoutUtils::IntrinsicForContainer(aReflowState.mRenderingContext,
|
||||||
inner,
|
inner,
|
||||||
nsLayoutUtils::MIN_ISIZE) <=
|
nsLayoutUtils::MIN_ISIZE) <=
|
||||||
innerAvailSize.ISize(innerWM),
|
innerAvailSize.ISize(innerWM),
|
||||||
"Bogus availSize.ISize; should be bigger");
|
"Bogus availSize.ISize; should be bigger");
|
||||||
NS_ASSERTION(!legend ||
|
NS_ASSERTION(!legend ||
|
||||||
nsLayoutUtils::IntrinsicForContainer(aReflowState.rendContext,
|
nsLayoutUtils::IntrinsicForContainer(aReflowState.mRenderingContext,
|
||||||
legend,
|
legend,
|
||||||
nsLayoutUtils::MIN_ISIZE) <=
|
nsLayoutUtils::MIN_ISIZE) <=
|
||||||
legendAvailSize.ISize(legendWM),
|
legendAvailSize.ISize(legendWM),
|
||||||
|
@ -286,7 +286,7 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
|
|||||||
// focuspadding (which other browsers don't have) so that there's a
|
// focuspadding (which other browsers don't have) so that there's a
|
||||||
// little more space for it.
|
// little more space for it.
|
||||||
// Note that GetMinISize includes the focusPadding.
|
// Note that GetMinISize includes the focusPadding.
|
||||||
nscoord IOverflow = GetMinISize(aButtonReflowState.rendContext) -
|
nscoord IOverflow = GetMinISize(aButtonReflowState.mRenderingContext) -
|
||||||
aButtonReflowState.ComputedISize();
|
aButtonReflowState.ComputedISize();
|
||||||
nscoord IFocusPadding = focusPadding.IStartEnd(wm);
|
nscoord IFocusPadding = focusPadding.IStartEnd(wm);
|
||||||
nscoord focusPaddingReduction = std::min(IFocusPadding,
|
nscoord focusPaddingReduction = std::min(IFocusPadding,
|
||||||
|
@ -181,7 +181,7 @@ BlockReflowInput::ComputeReplacedBlockOffsetsForFloats(
|
|||||||
iEndOffset = 0;
|
iEndOffset = 0;
|
||||||
} else {
|
} else {
|
||||||
LogicalMargin frameMargin(wm);
|
LogicalMargin frameMargin(wm);
|
||||||
SizeComputationInput os(aFrame, mReflowState.rendContext,
|
SizeComputationInput os(aFrame, mReflowState.mRenderingContext,
|
||||||
wm, mContentArea.ISize(wm));
|
wm, mContentArea.ISize(wm));
|
||||||
frameMargin =
|
frameMargin =
|
||||||
os.ComputedLogicalMargin().ConvertTo(wm, aFrame->GetWritingMode());
|
os.ComputedLogicalMargin().ConvertTo(wm, aFrame->GetWritingMode());
|
||||||
@ -237,7 +237,7 @@ BlockReflowInput::ComputeBlockAvailSpace(nsIFrame* aFrame,
|
|||||||
aResult.BSize(wm) = GetFlag(BRS_UNCONSTRAINEDBSIZE)
|
aResult.BSize(wm) = GetFlag(BRS_UNCONSTRAINEDBSIZE)
|
||||||
? NS_UNCONSTRAINEDSIZE
|
? NS_UNCONSTRAINEDSIZE
|
||||||
: mReflowState.AvailableBSize() - mBCoord
|
: mReflowState.AvailableBSize() - mBCoord
|
||||||
- GetBEndMarginClone(aFrame, mReflowState.rendContext, mContentArea, wm);
|
- GetBEndMarginClone(aFrame, mReflowState.mRenderingContext, mContentArea, wm);
|
||||||
// mBCoord might be greater than mBEndEdge if the block's top margin pushes
|
// mBCoord might be greater than mBEndEdge if the block's top margin pushes
|
||||||
// it off the page/column. Negative available height can confuse other code
|
// it off the page/column. Negative available height can confuse other code
|
||||||
// and is nonsense in principle.
|
// and is nonsense in principle.
|
||||||
@ -686,7 +686,7 @@ FloatMarginISize(const ReflowInput& aCBReflowState,
|
|||||||
|
|
||||||
LogicalSize floatSize =
|
LogicalSize floatSize =
|
||||||
aFloat->ComputeSize(
|
aFloat->ComputeSize(
|
||||||
aCBReflowState.rendContext,
|
aCBReflowState.mRenderingContext,
|
||||||
wm,
|
wm,
|
||||||
aCBReflowState.ComputedSize(wm),
|
aCBReflowState.ComputedSize(wm),
|
||||||
aFloatAvailableISize,
|
aFloatAvailableISize,
|
||||||
@ -746,7 +746,7 @@ BlockReflowInput::FlowAndPlaceFloat(nsIFrame* aFloat)
|
|||||||
NS_ASSERTION(aFloat->GetParent() == mBlock,
|
NS_ASSERTION(aFloat->GetParent() == mBlock,
|
||||||
"Float frame has wrong parent");
|
"Float frame has wrong parent");
|
||||||
|
|
||||||
SizeComputationInput offsets(aFloat, mReflowState.rendContext,
|
SizeComputationInput offsets(aFloat, mReflowState.mRenderingContext,
|
||||||
wm, mReflowState.ComputedISize());
|
wm, mReflowState.ComputedISize());
|
||||||
|
|
||||||
nscoord floatMarginISize = FloatMarginISize(mReflowState,
|
nscoord floatMarginISize = FloatMarginISize(mReflowState,
|
||||||
|
@ -155,7 +155,7 @@ SizeComputationInput::SizeComputationInput(nsIFrame *aFrame,
|
|||||||
WritingMode aContainingBlockWritingMode,
|
WritingMode aContainingBlockWritingMode,
|
||||||
nscoord aContainingBlockISize)
|
nscoord aContainingBlockISize)
|
||||||
: mFrame(aFrame)
|
: mFrame(aFrame)
|
||||||
, rendContext(aRenderingContext)
|
, mRenderingContext(aRenderingContext)
|
||||||
, mWritingMode(aFrame->GetWritingMode())
|
, mWritingMode(aFrame->GetWritingMode())
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(!aFrame->IsFlexOrGridItem(),
|
MOZ_ASSERT(!aFrame->IsFlexOrGridItem(),
|
||||||
@ -180,7 +180,7 @@ ReflowInput::ReflowInput(
|
|||||||
const LogicalSize& aAvailableSpace,
|
const LogicalSize& aAvailableSpace,
|
||||||
const LogicalSize* aContainingBlockSize,
|
const LogicalSize* aContainingBlockSize,
|
||||||
uint32_t aFlags)
|
uint32_t aFlags)
|
||||||
: SizeComputationInput(aFrame, aParentReflowState.rendContext)
|
: SizeComputationInput(aFrame, aParentReflowState.mRenderingContext)
|
||||||
, mBlockDelta(0)
|
, mBlockDelta(0)
|
||||||
, mOrthogonalLimit(NS_UNCONSTRAINEDSIZE)
|
, mOrthogonalLimit(NS_UNCONSTRAINEDSIZE)
|
||||||
, mReflowDepth(aParentReflowState.mReflowDepth + 1)
|
, mReflowDepth(aParentReflowState.mReflowDepth + 1)
|
||||||
@ -256,7 +256,7 @@ SizeComputationInput::ComputeISizeValue(nscoord aContainingBlockISize,
|
|||||||
nscoord aBoxSizingToMarginEdge,
|
nscoord aBoxSizingToMarginEdge,
|
||||||
const nsStyleCoord& aCoord) const
|
const nsStyleCoord& aCoord) const
|
||||||
{
|
{
|
||||||
return nsLayoutUtils::ComputeISizeValue(rendContext, mFrame,
|
return nsLayoutUtils::ComputeISizeValue(mRenderingContext, mFrame,
|
||||||
aContainingBlockISize,
|
aContainingBlockISize,
|
||||||
aContentEdgeToBoxSizing,
|
aContentEdgeToBoxSizing,
|
||||||
aBoxSizingToMarginEdge,
|
aBoxSizingToMarginEdge,
|
||||||
@ -1623,7 +1623,7 @@ ReflowInput::InitAbsoluteConstraints(nsPresContext* aPresContext,
|
|||||||
AutoMaybeDisableFontInflation an(mFrame);
|
AutoMaybeDisableFontInflation an(mFrame);
|
||||||
|
|
||||||
computedSize =
|
computedSize =
|
||||||
mFrame->ComputeSize(rendContext, wm, cbSize.ConvertTo(wm, cbwm),
|
mFrame->ComputeSize(mRenderingContext, wm, cbSize.ConvertTo(wm, cbwm),
|
||||||
cbSize.ConvertTo(wm, cbwm).ISize(wm), // XXX or AvailableISize()?
|
cbSize.ConvertTo(wm, cbwm).ISize(wm), // XXX or AvailableISize()?
|
||||||
ComputedLogicalMargin().Size(wm) +
|
ComputedLogicalMargin().Size(wm) +
|
||||||
ComputedLogicalOffsets().Size(wm),
|
ComputedLogicalOffsets().Size(wm),
|
||||||
@ -2366,7 +2366,7 @@ ReflowInput::InitConstraints(nsPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
LogicalSize size =
|
LogicalSize size =
|
||||||
mFrame->ComputeSize(rendContext, wm, cbSize, AvailableISize(),
|
mFrame->ComputeSize(mRenderingContext, wm, cbSize, AvailableISize(),
|
||||||
ComputedLogicalMargin().Size(wm),
|
ComputedLogicalMargin().Size(wm),
|
||||||
ComputedLogicalBorderPadding().Size(wm) -
|
ComputedLogicalBorderPadding().Size(wm) -
|
||||||
ComputedLogicalPadding().Size(wm),
|
ComputedLogicalPadding().Size(wm),
|
||||||
|
@ -106,8 +106,8 @@ public:
|
|||||||
// The frame being reflowed.
|
// The frame being reflowed.
|
||||||
nsIFrame* mFrame;
|
nsIFrame* mFrame;
|
||||||
|
|
||||||
// rendering context to use for measurement
|
// Rendering context to use for measurement.
|
||||||
nsRenderingContext* rendContext;
|
nsRenderingContext* mRenderingContext;
|
||||||
|
|
||||||
const nsMargin& ComputedPhysicalMargin() const { return mComputedMargin; }
|
const nsMargin& ComputedPhysicalMargin() const { return mComputedMargin; }
|
||||||
const nsMargin& ComputedPhysicalBorderPadding() const { return mComputedBorderPadding; }
|
const nsMargin& ComputedPhysicalBorderPadding() const { return mComputedBorderPadding; }
|
||||||
@ -166,7 +166,7 @@ public:
|
|||||||
// Callers using this constructor must call InitOffsets on their own.
|
// Callers using this constructor must call InitOffsets on their own.
|
||||||
SizeComputationInput(nsIFrame *aFrame, nsRenderingContext *aRenderingContext)
|
SizeComputationInput(nsIFrame *aFrame, nsRenderingContext *aRenderingContext)
|
||||||
: mFrame(aFrame)
|
: mFrame(aFrame)
|
||||||
, rendContext(aRenderingContext)
|
, mRenderingContext(aRenderingContext)
|
||||||
, mWritingMode(aFrame->GetWritingMode())
|
, mWritingMode(aFrame->GetWritingMode())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -984,7 +984,7 @@ CalculateContainingBlockSizeForAbsolutes(WritingMode aWM,
|
|||||||
if (scrollFrame) {
|
if (scrollFrame) {
|
||||||
scrollbars =
|
scrollbars =
|
||||||
scrollFrame->GetDesiredScrollbarSizes(aLastRS->mFrame->PresContext(),
|
scrollFrame->GetDesiredScrollbarSizes(aLastRS->mFrame->PresContext(),
|
||||||
aLastRS->rendContext);
|
aLastRS->mRenderingContext);
|
||||||
if (!lastButOneRS->mFlags.mAssumingHScrollbar) {
|
if (!lastButOneRS->mFlags.mAssumingHScrollbar) {
|
||||||
scrollbars.top = scrollbars.bottom = 0;
|
scrollbars.top = scrollbars.bottom = 0;
|
||||||
}
|
}
|
||||||
@ -7399,7 +7399,7 @@ nsBlockFrame::ISizeToClearPastFloats(const BlockReflowInput& aState,
|
|||||||
{
|
{
|
||||||
nscoord inlineStartOffset, inlineEndOffset;
|
nscoord inlineStartOffset, inlineEndOffset;
|
||||||
WritingMode wm = aState.mReflowState.GetWritingMode();
|
WritingMode wm = aState.mReflowState.GetWritingMode();
|
||||||
SizeComputationInput offsetState(aFrame, aState.mReflowState.rendContext,
|
SizeComputationInput offsetState(aFrame, aState.mReflowState.mRenderingContext,
|
||||||
wm, aState.mContentArea.ISize(wm));
|
wm, aState.mContentArea.ISize(wm));
|
||||||
|
|
||||||
ReplacedElementISizeToClear result;
|
ReplacedElementISizeToClear result;
|
||||||
|
@ -642,7 +642,7 @@ nsBulletFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
SetFontSizeInflation(inflation);
|
SetFontSizeInflation(inflation);
|
||||||
|
|
||||||
// Get the base size
|
// Get the base size
|
||||||
GetDesiredSize(aPresContext, aReflowState.rendContext, aMetrics, inflation,
|
GetDesiredSize(aPresContext, aReflowState.mRenderingContext, aMetrics, inflation,
|
||||||
&mPadding);
|
&mPadding);
|
||||||
|
|
||||||
// Add in the border and padding; split the top/bottom between the
|
// Add in the border and padding; split the top/bottom between the
|
||||||
|
@ -1568,7 +1568,7 @@ nsFlexContainerFrame::
|
|||||||
if (aAxisTracker.IsMainAxisHorizontal()) {
|
if (aAxisTracker.IsMainAxisHorizontal()) {
|
||||||
if (minSizeNeedsToMeasureContent) {
|
if (minSizeNeedsToMeasureContent) {
|
||||||
nscoord frameMinISize =
|
nscoord frameMinISize =
|
||||||
aFlexItem.Frame()->GetMinISize(aItemReflowState.rendContext);
|
aFlexItem.Frame()->GetMinISize(aItemReflowState.mRenderingContext);
|
||||||
resolvedMinSize = std::min(resolvedMinSize, frameMinISize);
|
resolvedMinSize = std::min(resolvedMinSize, frameMinISize);
|
||||||
}
|
}
|
||||||
NS_ASSERTION(!flexBasisNeedsToMeasureContent,
|
NS_ASSERTION(!flexBasisNeedsToMeasureContent,
|
||||||
|
@ -231,7 +231,7 @@ struct MOZ_STACK_CLASS ScrollReflowInput {
|
|||||||
mReflowState(aState),
|
mReflowState(aState),
|
||||||
// mBoxState is just used for scrollbars so we don't need to
|
// mBoxState is just used for scrollbars so we don't need to
|
||||||
// worry about the reflow depth here
|
// worry about the reflow depth here
|
||||||
mBoxState(aState.mFrame->PresContext(), aState.rendContext, 0),
|
mBoxState(aState.mFrame->PresContext(), aState.mRenderingContext, 0),
|
||||||
mStyles(aFrame->GetScrollbarStyles()) {
|
mStyles(aFrame->GetScrollbarStyles()) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1672,7 +1672,7 @@ struct MOZ_STACK_CLASS nsGridContainerFrame::GridReflowState
|
|||||||
{
|
{
|
||||||
GridReflowState(nsGridContainerFrame* aFrame,
|
GridReflowState(nsGridContainerFrame* aFrame,
|
||||||
const ReflowInput& aRS)
|
const ReflowInput& aRS)
|
||||||
: GridReflowState(aFrame, *aRS.rendContext, &aRS, aRS.mStylePosition,
|
: GridReflowState(aFrame, *aRS.mRenderingContext, &aRS, aRS.mStylePosition,
|
||||||
aRS.GetWritingMode())
|
aRS.GetWritingMode())
|
||||||
{}
|
{}
|
||||||
GridReflowState(nsGridContainerFrame* aFrame,
|
GridReflowState(nsGridContainerFrame* aFrame,
|
||||||
|
@ -944,7 +944,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
|||||||
} else {
|
} else {
|
||||||
static_cast<nsTextFrame*>(aFrame)->
|
static_cast<nsTextFrame*>(aFrame)->
|
||||||
ReflowText(*this, availableSpaceOnLine,
|
ReflowText(*this, availableSpaceOnLine,
|
||||||
psd->mReflowState->rendContext->GetDrawTarget(),
|
psd->mReflowState->mRenderingContext->GetDrawTarget(),
|
||||||
metrics, aReflowStatus);
|
metrics, aReflowStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2588,7 +2588,7 @@ nsLineLayout::TrimTrailingWhiteSpaceIn(PerSpanData* psd,
|
|||||||
// might have a soft hyphen which should now appear, changing the frame's
|
// might have a soft hyphen which should now appear, changing the frame's
|
||||||
// width
|
// width
|
||||||
nsTextFrame::TrimOutput trimOutput = static_cast<nsTextFrame*>(pfd->mFrame)->
|
nsTextFrame::TrimOutput trimOutput = static_cast<nsTextFrame*>(pfd->mFrame)->
|
||||||
TrimTrailingWhiteSpace(mBlockReflowState->rendContext->GetDrawTarget());
|
TrimTrailingWhiteSpace(mBlockReflowState->mRenderingContext->GetDrawTarget());
|
||||||
#ifdef NOISY_TRIM
|
#ifdef NOISY_TRIM
|
||||||
nsFrame::ListTag(stdout, psd->mFrame->mFrame);
|
nsFrame::ListTag(stdout, psd->mFrame->mFrame);
|
||||||
printf(": trim of ");
|
printf(": trim of ");
|
||||||
|
@ -582,7 +582,7 @@ nsRubyBaseContainerFrame::ReflowOneColumn(const ReflowState& aReflowState,
|
|||||||
aReflowState.mAllowLineBreak : aReflowState.mAllowInitialLineBreak;
|
aReflowState.mAllowLineBreak : aReflowState.mAllowInitialLineBreak;
|
||||||
if (allowBreakBefore) {
|
if (allowBreakBefore) {
|
||||||
gfxBreakPriority breakPriority = LineBreakBefore(
|
gfxBreakPriority breakPriority = LineBreakBefore(
|
||||||
aColumn.mBaseFrame, baseReflowState.rendContext->GetDrawTarget(),
|
aColumn.mBaseFrame, baseReflowState.mRenderingContext->GetDrawTarget(),
|
||||||
baseReflowState.mLineLayout->LineContainerFrame(),
|
baseReflowState.mLineLayout->LineContainerFrame(),
|
||||||
baseReflowState.mLineLayout->GetLine());
|
baseReflowState.mLineLayout->GetLine());
|
||||||
if (breakPriority != gfxBreakPriority::eNoBreak) {
|
if (breakPriority != gfxBreakPriority::eNoBreak) {
|
||||||
|
@ -8667,7 +8667,7 @@ nsTextFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReflowText(*aReflowState.mLineLayout, aReflowState.AvailableWidth(),
|
ReflowText(*aReflowState.mLineLayout, aReflowState.AvailableWidth(),
|
||||||
aReflowState.rendContext->GetDrawTarget(), aMetrics, aStatus);
|
aReflowState.mRenderingContext->GetDrawTarget(), aMetrics, aStatus);
|
||||||
|
|
||||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);
|
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);
|
||||||
}
|
}
|
||||||
|
@ -339,7 +339,7 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
posterRenderRect.x, posterRenderRect.y, 0);
|
posterRenderRect.x, posterRenderRect.y, 0);
|
||||||
} else if (child->GetContent() == mVideoControls) {
|
} else if (child->GetContent() == mVideoControls) {
|
||||||
// Reflow the video controls frame.
|
// Reflow the video controls frame.
|
||||||
nsBoxLayoutState boxState(PresContext(), aReflowState.rendContext);
|
nsBoxLayoutState boxState(PresContext(), aReflowState.mRenderingContext);
|
||||||
nsSize size = child->GetSize();
|
nsSize size = child->GetSize();
|
||||||
nsBoxFrame::LayoutChildAt(boxState,
|
nsBoxFrame::LayoutChildAt(boxState,
|
||||||
child,
|
child,
|
||||||
|
@ -857,7 +857,7 @@ nsMathMLContainerFrame::ReflowChild(nsIFrame* aChildFrame,
|
|||||||
}
|
}
|
||||||
if (IsForeignChild(aChildFrame)) {
|
if (IsForeignChild(aChildFrame)) {
|
||||||
// use ComputeTightBounds API as aDesiredSize.mBoundingMetrics is not set.
|
// use ComputeTightBounds API as aDesiredSize.mBoundingMetrics is not set.
|
||||||
nsRect r = aChildFrame->ComputeTightBounds(aReflowState.rendContext->GetDrawTarget());
|
nsRect r = aChildFrame->ComputeTightBounds(aReflowState.mRenderingContext->GetDrawTarget());
|
||||||
aDesiredSize.mBoundingMetrics.leftBearing = r.x;
|
aDesiredSize.mBoundingMetrics.leftBearing = r.x;
|
||||||
aDesiredSize.mBoundingMetrics.rightBearing = r.XMost();
|
aDesiredSize.mBoundingMetrics.rightBearing = r.XMost();
|
||||||
aDesiredSize.mBoundingMetrics.ascent = aDesiredSize.BlockStartAscent() - r.y;
|
aDesiredSize.mBoundingMetrics.ascent = aDesiredSize.BlockStartAscent() - r.y;
|
||||||
@ -907,7 +907,7 @@ nsMathMLContainerFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
// The stretching of siblings of an embellished child is _deferred_ until
|
// The stretching of siblings of an embellished child is _deferred_ until
|
||||||
// after finishing the stretching of the embellished child - bug 117652
|
// after finishing the stretching of the embellished child - bug 117652
|
||||||
|
|
||||||
DrawTarget* drawTarget = aReflowState.rendContext->GetDrawTarget();
|
DrawTarget* drawTarget = aReflowState.mRenderingContext->GetDrawTarget();
|
||||||
|
|
||||||
if (!NS_MATHML_IS_EMBELLISH_OPERATOR(mEmbellishData.flags) &&
|
if (!NS_MATHML_IS_EMBELLISH_OPERATOR(mEmbellishData.flags) &&
|
||||||
(NS_MATHML_WILL_STRETCH_ALL_CHILDREN_VERTICALLY(mPresentationData.flags) ||
|
(NS_MATHML_WILL_STRETCH_ALL_CHILDREN_VERTICALLY(mPresentationData.flags) ||
|
||||||
|
@ -157,7 +157,7 @@ nsMathMLSelectedFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
aDesiredSize.mBoundingMetrics);
|
aDesiredSize.mBoundingMetrics);
|
||||||
mBoundingMetrics = aDesiredSize.mBoundingMetrics;
|
mBoundingMetrics = aDesiredSize.mBoundingMetrics;
|
||||||
}
|
}
|
||||||
FinalizeReflow(aReflowState.rendContext->GetDrawTarget(), aDesiredSize);
|
FinalizeReflow(aReflowState.mRenderingContext->GetDrawTarget(), aDesiredSize);
|
||||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ nsMathMLTokenFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// place and size children
|
// place and size children
|
||||||
FinalizeReflow(aReflowState.rendContext->GetDrawTarget(), aDesiredSize);
|
FinalizeReflow(aReflowState.mRenderingContext->GetDrawTarget(), aDesiredSize);
|
||||||
|
|
||||||
aStatus = NS_FRAME_COMPLETE;
|
aStatus = NS_FRAME_COMPLETE;
|
||||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||||
|
@ -226,7 +226,7 @@ nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
RefPtr<nsFontMetrics> fm =
|
RefPtr<nsFontMetrics> fm =
|
||||||
nsLayoutUtils::GetFontMetricsForFrame(this, fontSizeInflation);
|
nsLayoutUtils::GetFontMetricsForFrame(this, fontSizeInflation);
|
||||||
nscoord axisHeight, em;
|
nscoord axisHeight, em;
|
||||||
GetAxisHeight(aReflowState.rendContext->GetDrawTarget(), fm, axisHeight);
|
GetAxisHeight(aReflowState.mRenderingContext->GetDrawTarget(), fm, axisHeight);
|
||||||
GetEmHeight(fm, em);
|
GetEmHeight(fm, em);
|
||||||
// leading to be left at the top and the bottom of stretched chars
|
// leading to be left at the top and the bottom of stretched chars
|
||||||
nscoord leading = NSToCoordRound(0.2f * em);
|
nscoord leading = NSToCoordRound(0.2f * em);
|
||||||
@ -286,7 +286,7 @@ nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
nsBoundingMetrics containerSize;
|
nsBoundingMetrics containerSize;
|
||||||
nsStretchDirection stretchDir = NS_STRETCH_DIRECTION_VERTICAL;
|
nsStretchDirection stretchDir = NS_STRETCH_DIRECTION_VERTICAL;
|
||||||
|
|
||||||
DrawTarget* drawTarget = aReflowState.rendContext->GetDrawTarget();
|
DrawTarget* drawTarget = aReflowState.mRenderingContext->GetDrawTarget();
|
||||||
|
|
||||||
GetPreferredStretchSize(drawTarget,
|
GetPreferredStretchSize(drawTarget,
|
||||||
0, /* i.e., without embellishments */
|
0, /* i.e., without embellishments */
|
||||||
|
@ -172,7 +172,7 @@ nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
aDesiredSize.SetBlockStartAscent(0);
|
aDesiredSize.SetBlockStartAscent(0);
|
||||||
|
|
||||||
nsBoundingMetrics bmSqr, bmBase, bmIndex;
|
nsBoundingMetrics bmSqr, bmBase, bmIndex;
|
||||||
DrawTarget* drawTarget = aReflowState.rendContext->GetDrawTarget();
|
DrawTarget* drawTarget = aReflowState.mRenderingContext->GetDrawTarget();
|
||||||
|
|
||||||
//////////////////
|
//////////////////
|
||||||
// Reflow Children
|
// Reflow Children
|
||||||
|
@ -890,7 +890,7 @@ nsMathMLmtableWrapperFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
RefPtr<nsFontMetrics> fm =
|
RefPtr<nsFontMetrics> fm =
|
||||||
nsLayoutUtils::GetInflatedFontMetricsForFrame(this);
|
nsLayoutUtils::GetInflatedFontMetricsForFrame(this);
|
||||||
nscoord axisHeight;
|
nscoord axisHeight;
|
||||||
GetAxisHeight(aReflowState.rendContext->GetDrawTarget(), fm, axisHeight);
|
GetAxisHeight(aReflowState.mRenderingContext->GetDrawTarget(), fm, axisHeight);
|
||||||
if (rowFrame) {
|
if (rowFrame) {
|
||||||
// anchor the table on the axis of the row of reference
|
// anchor the table on the axis of the row of reference
|
||||||
// XXX fallback to baseline because it is a hard problem
|
// XXX fallback to baseline because it is a hard problem
|
||||||
|
@ -537,7 +537,7 @@ BasicTableLayoutStrategy::ComputeColumnISizes(const ReflowInput& aReflowState)
|
|||||||
"dirtyness out of sync");
|
"dirtyness out of sync");
|
||||||
// XXX Is this needed?
|
// XXX Is this needed?
|
||||||
if (mMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
|
if (mMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
|
||||||
ComputeIntrinsicISizes(aReflowState.rendContext);
|
ComputeIntrinsicISizes(aReflowState.mRenderingContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsTableCellMap *cellMap = mTableFrame->GetCellMap();
|
nsTableCellMap *cellMap = mTableFrame->GetCellMap();
|
||||||
|
@ -213,7 +213,7 @@ FixedTableLayoutStrategy::ComputeColumnISizes(const ReflowInput& aReflowState)
|
|||||||
const nsStyleCoord *styleISize = &colFrame->StylePosition()->ISize(wm);
|
const nsStyleCoord *styleISize = &colFrame->StylePosition()->ISize(wm);
|
||||||
nscoord colISize;
|
nscoord colISize;
|
||||||
if (styleISize->ConvertsToLength()) {
|
if (styleISize->ConvertsToLength()) {
|
||||||
colISize = nsLayoutUtils::ComputeISizeValue(aReflowState.rendContext,
|
colISize = nsLayoutUtils::ComputeISizeValue(aReflowState.mRenderingContext,
|
||||||
colFrame, 0, 0, 0,
|
colFrame, 0, 0, 0,
|
||||||
*styleISize);
|
*styleISize);
|
||||||
specTotal += colISize;
|
specTotal += colISize;
|
||||||
@ -247,7 +247,7 @@ FixedTableLayoutStrategy::ComputeColumnISizes(const ReflowInput& aReflowState)
|
|||||||
// MIN_ISIZE for symmetry with GetMinISize above, just in case
|
// MIN_ISIZE for symmetry with GetMinISize above, just in case
|
||||||
// there is a difference.
|
// there is a difference.
|
||||||
colISize =
|
colISize =
|
||||||
nsLayoutUtils::IntrinsicForContainer(aReflowState.rendContext,
|
nsLayoutUtils::IntrinsicForContainer(aReflowState.mRenderingContext,
|
||||||
cellFrame,
|
cellFrame,
|
||||||
nsLayoutUtils::MIN_ISIZE);
|
nsLayoutUtils::MIN_ISIZE);
|
||||||
} else if (styleISize->GetUnit() == eStyleUnit_Percent) {
|
} else if (styleISize->GetUnit() == eStyleUnit_Percent) {
|
||||||
|
@ -2019,7 +2019,7 @@ nsTableFrame::FixupPositionedTableParts(nsPresContext* aPresContext,
|
|||||||
LogicalSize availSize(wm, size);
|
LogicalSize availSize(wm, size);
|
||||||
availSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
|
availSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
|
||||||
ReflowInput reflowState(aPresContext, positionedPart,
|
ReflowInput reflowState(aPresContext, positionedPart,
|
||||||
aReflowState.rendContext, availSize,
|
aReflowState.mRenderingContext, availSize,
|
||||||
ReflowInput::DUMMY_PARENT_REFLOW_STATE);
|
ReflowInput::DUMMY_PARENT_REFLOW_STATE);
|
||||||
nsReflowStatus reflowStatus = NS_FRAME_COMPLETE;
|
nsReflowStatus reflowStatus = NS_FRAME_COMPLETE;
|
||||||
|
|
||||||
@ -2092,7 +2092,7 @@ nsTableFrame::ReflowTable(ReflowOutput& aDesiredSize,
|
|||||||
ReflowChildren(reflowState, aStatus, aLastChildReflowed,
|
ReflowChildren(reflowState, aStatus, aLastChildReflowed,
|
||||||
aDesiredSize.mOverflowAreas);
|
aDesiredSize.mOverflowAreas);
|
||||||
|
|
||||||
ReflowColGroups(aReflowState.rendContext);
|
ReflowColGroups(aReflowState.mRenderingContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIFrame*
|
nsIFrame*
|
||||||
|
@ -659,7 +659,7 @@ nsBoxFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
aStatus = NS_FRAME_COMPLETE;
|
aStatus = NS_FRAME_COMPLETE;
|
||||||
|
|
||||||
// create the layout state
|
// create the layout state
|
||||||
nsBoxLayoutState state(aPresContext, aReflowState.rendContext,
|
nsBoxLayoutState state(aPresContext, aReflowState.mRenderingContext,
|
||||||
&aReflowState, aReflowState.mReflowDepth);
|
&aReflowState, aReflowState.mReflowDepth);
|
||||||
|
|
||||||
WritingMode wm = aReflowState.GetWritingMode();
|
WritingMode wm = aReflowState.GetWritingMode();
|
||||||
|
@ -238,7 +238,7 @@ nsLeafBoxFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
aStatus = NS_FRAME_COMPLETE;
|
aStatus = NS_FRAME_COMPLETE;
|
||||||
|
|
||||||
// create the layout state
|
// create the layout state
|
||||||
nsBoxLayoutState state(aPresContext, aReflowState.rendContext);
|
nsBoxLayoutState state(aPresContext, aReflowState.mRenderingContext);
|
||||||
|
|
||||||
nsSize computedSize(aReflowState.ComputedWidth(),aReflowState.ComputedHeight());
|
nsSize computedSize(aReflowState.ComputedWidth(),aReflowState.ComputedHeight());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user