зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1543571 Part 1 - Replace "reflow state" with "reflow input". r=dholbert
This patch is generated by the following script on Linux: function rename() { find .\ -type f\ ! -path "./obj*"\ ! -path "./.git"\ ! -path "./.hg"\ \( -name "*.cpp" -or\ -name "*.h" \)\ -exec sed -i -e "s/$1/$2/g" "{}" \; } rename "reflow state" "reflow input" Differential Revision: https://phabricator.services.mozilla.com/D27022 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
16b761dfeb
Коммит
f49d08722a
|
@ -9096,7 +9096,7 @@ bool nsIPresShell::DoReflow(nsIFrame* target, bool aInterruptible,
|
|||
NS_ASSERTION(!target->GetNextInFlow() && !target->GetPrevInFlow(),
|
||||
"reflow roots should never split");
|
||||
|
||||
// Don't pass size directly to the reflow state, since a
|
||||
// Don't pass size directly to the reflow input, since a
|
||||
// constrained height implies page/column breaking.
|
||||
LogicalSize reflowSize(wm, size.ISize(wm), NS_UNCONSTRAINEDSIZE);
|
||||
ReflowInput reflowInput(mPresContext, target, rcx, reflowSize,
|
||||
|
@ -9121,7 +9121,7 @@ bool nsIPresShell::DoReflow(nsIFrame* target, bool aInterruptible,
|
|||
|
||||
mLastRootReflowHadUnconstrainedBSize = hasUnconstrainedBSize;
|
||||
} else {
|
||||
// Initialize reflow state with current used border and padding,
|
||||
// Initialize reflow input with current used border and padding,
|
||||
// in case this was set specially by the parent frame when the reflow root
|
||||
// was reflowed by its parent.
|
||||
nsMargin currentBorder = target->GetUsedBorder();
|
||||
|
@ -9131,7 +9131,7 @@ bool nsIPresShell::DoReflow(nsIFrame* target, bool aInterruptible,
|
|||
|
||||
// fix the computed height
|
||||
NS_ASSERTION(reflowInput.ComputedPhysicalMargin() == nsMargin(0, 0, 0, 0),
|
||||
"reflow state should not set margin for reflow roots");
|
||||
"reflow input should not set margin for reflow roots");
|
||||
if (size.BSize(wm) != NS_UNCONSTRAINEDSIZE) {
|
||||
nscoord computedBSize =
|
||||
size.BSize(wm) -
|
||||
|
@ -9142,7 +9142,7 @@ bool nsIPresShell::DoReflow(nsIFrame* target, bool aInterruptible,
|
|||
NS_ASSERTION(reflowInput.ComputedISize() ==
|
||||
size.ISize(wm) -
|
||||
reflowInput.ComputedLogicalBorderPadding().IStartEnd(wm),
|
||||
"reflow state computed incorrect inline size");
|
||||
"reflow input computed incorrect inline size");
|
||||
|
||||
mPresContext->ReflowStarted(aInterruptible);
|
||||
mIsReflowing = true;
|
||||
|
|
|
@ -772,15 +772,15 @@ static bool RecomputePosition(nsIFrame* aFrame) {
|
|||
return true;
|
||||
}
|
||||
|
||||
// For the absolute positioning case, set up a fake HTML reflow state for
|
||||
// For the absolute positioning case, set up a fake HTML reflow input for
|
||||
// the frame, and then get the offsets and size from it. If the frame's size
|
||||
// doesn't need to change, we can simply update the frame position. Otherwise
|
||||
// we fall back to a reflow.
|
||||
RefPtr<gfxContext> rc =
|
||||
aFrame->PresShell()->CreateReferenceRenderingContext();
|
||||
|
||||
// Construct a bogus parent reflow state so that there's a usable
|
||||
// containing block reflow state.
|
||||
// Construct a bogus parent reflow input so that there's a usable
|
||||
// containing block reflow input.
|
||||
nsIFrame* parentFrame = aFrame->GetParent();
|
||||
WritingMode parentWM = parentFrame->GetWritingMode();
|
||||
WritingMode frameWM = aFrame->GetWritingMode();
|
||||
|
|
|
@ -4753,7 +4753,7 @@ static bool GetPercentBSize(const LengthPercentage& aStyle, nsIFrame* aFrame,
|
|||
"GetAbsoluteCoord should have handled this");
|
||||
|
||||
// During reflow, nsHTMLScrollFrame::ReflowScrolledFrame uses
|
||||
// SetComputedHeight on the reflow state for its child to propagate its
|
||||
// SetComputedHeight on the reflow input for its child to propagate its
|
||||
// computed height to the scrolled content. So here we skip to the scroll
|
||||
// frame that contains this scrolled content in order to get the same
|
||||
// behavior as layout when computing percentage heights.
|
||||
|
|
|
@ -383,7 +383,7 @@ nsFlowAreaRect BlockReflowInput::GetFloatAvailableSpaceForBSize(
|
|||
*
|
||||
* The reconstruction involves walking backward through the line list to
|
||||
* find any collapsed margins preceding the line that would have been in
|
||||
* the reflow state's |mPrevBEndMargin| when we reflowed that line in
|
||||
* the reflow input's |mPrevBEndMargin| when we reflowed that line in
|
||||
* a full reflow (under the rule in CSS2 that all adjacent vertical
|
||||
* margins of blocks collapse).
|
||||
*/
|
||||
|
|
|
@ -53,7 +53,7 @@ enum eNormalLineHeightControl {
|
|||
|
||||
static eNormalLineHeightControl sNormalLineHeightControl = eUninitialized;
|
||||
|
||||
// Initialize a <b>root</b> reflow state with a rendering context to
|
||||
// Initialize a <b>root</b> reflow input with a rendering context to
|
||||
// use for measuring things.
|
||||
ReflowInput::ReflowInput(nsPresContext* aPresContext, nsIFrame* aFrame,
|
||||
gfxContext* aRenderingContext,
|
||||
|
@ -177,8 +177,8 @@ SizeComputationInput::SizeComputationInput(
|
|||
mFrame->Type(), flags);
|
||||
}
|
||||
|
||||
// Initialize a reflow state for a child frame's reflow. Some state
|
||||
// is copied from the parent reflow state; the remaining state is
|
||||
// Initialize a reflow input for a child frame's reflow. Some state
|
||||
// is copied from the parent reflow input; the remaining state is
|
||||
// computed.
|
||||
ReflowInput::ReflowInput(nsPresContext* aPresContext,
|
||||
const ReflowInput& aParentReflowInput,
|
||||
|
@ -207,7 +207,7 @@ ReflowInput::ReflowInput(nsPresContext* aPresContext,
|
|||
AvailableBSize() = aAvailableSpace.BSize(mWritingMode);
|
||||
|
||||
if (mWritingMode.IsOrthogonalTo(aParentReflowInput.GetWritingMode())) {
|
||||
// If we're setting up for an orthogonal flow, and the parent reflow state
|
||||
// If we're setting up for an orthogonal flow, and the parent reflow input
|
||||
// had a constrained ComputedBSize, we can use that as our AvailableISize
|
||||
// in preference to leaving it unconstrained.
|
||||
if (AvailableISize() == NS_UNCONSTRAINEDSIZE &&
|
||||
|
@ -302,9 +302,9 @@ void ReflowInput::SetComputedWidth(nscoord aComputedWidth) {
|
|||
// state when reflowing fixed-pos kids. In that case we actually don't
|
||||
// want to mess with the resize flags, because comparing the frame's rect
|
||||
// to the munged computed width is pointless.
|
||||
// 2) nsFrame::BoxReflow creates a reflow state for its parent. This reflow
|
||||
// 2) nsFrame::BoxReflow creates a reflow input for its parent. This reflow
|
||||
// state is not used to reflow the parent, but just as a parent for the
|
||||
// frame's own reflow state. So given a nsBoxFrame inside some non-XUL
|
||||
// frame's own reflow input. So given a nsBoxFrame inside some non-XUL
|
||||
// (like a text control, for example), we'll end up creating a reflow
|
||||
// state for the parent while the parent is reflowing.
|
||||
|
||||
|
@ -324,9 +324,9 @@ void ReflowInput::SetComputedHeight(nscoord aComputedHeight) {
|
|||
// It'd be nice to assert that |frame| is not in reflow, but this fails
|
||||
// because:
|
||||
//
|
||||
// nsFrame::BoxReflow creates a reflow state for its parent. This reflow
|
||||
// nsFrame::BoxReflow creates a reflow input for its parent. This reflow
|
||||
// state is not used to reflow the parent, but just as a parent for the
|
||||
// frame's own reflow state. So given a nsBoxFrame inside some non-XUL
|
||||
// frame's own reflow input. So given a nsBoxFrame inside some non-XUL
|
||||
// (like a text control, for example), we'll end up creating a reflow
|
||||
// state for the parent while the parent is reflowing.
|
||||
|
||||
|
@ -522,7 +522,7 @@ void ReflowInput::InitCBReflowInput() {
|
|||
}
|
||||
|
||||
/* Check whether CalcQuirkContainingBlockHeight would stop on the
|
||||
* given reflow state, using its block as a height. (essentially
|
||||
* given reflow input, using its block as a height. (essentially
|
||||
* returns false for any case in which CalcQuirkContainingBlockHeight
|
||||
* has a "continue" in its main loop.)
|
||||
*
|
||||
|
@ -589,8 +589,8 @@ void ReflowInput::InitResizeFlags(nsPresContext* aPresContext,
|
|||
bool dirty = nsFontInflationData::UpdateFontInflationDataISizeFor(*this) &&
|
||||
// Avoid running this at the box-to-block interface
|
||||
// (where we shouldn't be inflating anyway, and where
|
||||
// reflow state construction is probably to construct a
|
||||
// dummy parent reflow state anyway).
|
||||
// reflow input construction is probably to construct a
|
||||
// dummy parent reflow input anyway).
|
||||
!mFlags.mDummyParentReflowInput;
|
||||
|
||||
if (dirty || (!mFrame->GetParent() && isIResize)) {
|
||||
|
@ -2270,7 +2270,7 @@ void ReflowInput::InitConstraints(nsPresContext* aPresContext,
|
|||
ComputedMinWidth() = ComputedMinHeight() = 0;
|
||||
ComputedMaxWidth() = ComputedMaxHeight() = NS_UNCONSTRAINEDSIZE;
|
||||
} else {
|
||||
// Get the containing block reflow state
|
||||
// Get the containing block reflow input
|
||||
const ReflowInput* cbri = mCBReflowInput;
|
||||
MOZ_ASSERT(cbri, "no containing block");
|
||||
MOZ_ASSERT(mFrame->GetParent());
|
||||
|
@ -2320,7 +2320,7 @@ void ReflowInput::InitConstraints(nsPresContext* aPresContext,
|
|||
if (NS_FRAME_REPLACED(NS_CSS_FRAME_TYPE_INLINE) == mFrameType ||
|
||||
NS_FRAME_REPLACED_CONTAINS_BLOCK(NS_CSS_FRAME_TYPE_INLINE) ==
|
||||
mFrameType) {
|
||||
// Get the containing block reflow state
|
||||
// Get the containing block reflow input
|
||||
NS_ASSERTION(nullptr != cbri, "no containing block");
|
||||
// in quirks mode, get the cb height using the special quirk method
|
||||
if (!wm.IsVertical() &&
|
||||
|
@ -2696,7 +2696,7 @@ void ReflowInput::CalculateBlockSideMargins(LayoutFrameType aFrameType) {
|
|||
// which is where margins will eventually be applied: we're calculating
|
||||
// margins that will be used by the container in its inline direction,
|
||||
// which in the case of an orthogonal contained block will correspond to
|
||||
// the block direction of this reflow state. So in the orthogonal-flow
|
||||
// the block direction of this reflow input. So in the orthogonal-flow
|
||||
// case, "CalculateBlock*Side*Margins" will actually end up adjusting
|
||||
// the BStart/BEnd margins; those are the "sides" of the block from its
|
||||
// container's point of view.
|
||||
|
|
|
@ -41,7 +41,7 @@ NumericType NS_CSS_MINMAX(NumericType aValue, NumericType aMinValue,
|
|||
}
|
||||
|
||||
/**
|
||||
* CSS Frame type. Included as part of the reflow state.
|
||||
* CSS Frame type. Included as part of the reflow input.
|
||||
*/
|
||||
typedef uint32_t nsCSSFrameType;
|
||||
|
||||
|
@ -228,7 +228,7 @@ struct SizeComputationInput {
|
|||
// BSize.
|
||||
bool mIsFlexContainerMeasuringBSize : 1;
|
||||
|
||||
// a "fake" reflow state made in order to be the parent of a real one
|
||||
// a "fake" reflow input made in order to be the parent of a real one
|
||||
bool mDummyParentReflowInput : 1;
|
||||
|
||||
// Should this frame reflow its place-holder children? If the available
|
||||
|
@ -350,8 +350,8 @@ struct SizeComputationInput {
|
|||
* @see nsIFrame#Reflow()
|
||||
*/
|
||||
struct ReflowInput : public SizeComputationInput {
|
||||
// the reflow states are linked together. this is the pointer to the
|
||||
// parent's reflow state
|
||||
// the reflow inputs are linked together. this is the pointer to the
|
||||
// parent's reflow input
|
||||
const ReflowInput* mParentReflowInput;
|
||||
|
||||
// A non-owning pointer to the float manager associated with this area,
|
||||
|
@ -361,8 +361,8 @@ struct ReflowInput : public SizeComputationInput {
|
|||
// LineLayout object (only for inline reflow; set to nullptr otherwise)
|
||||
nsLineLayout* mLineLayout;
|
||||
|
||||
// The appropriate reflow state for the containing block (for
|
||||
// percentage widths, etc.) of this reflow state's frame.
|
||||
// The appropriate reflow input for the containing block (for
|
||||
// percentage widths, etc.) of this reflow input's frame.
|
||||
const ReflowInput* mCBReflowInput;
|
||||
|
||||
// The type of frame, from css's perspective. This value is
|
||||
|
@ -658,7 +658,7 @@ struct ReflowInput : public SizeComputationInput {
|
|||
|
||||
ReflowInputFlags mFlags;
|
||||
|
||||
// This value keeps track of how deeply nested a given reflow state
|
||||
// This value keeps track of how deeply nested a given reflow input
|
||||
// is from the top of the frame tree.
|
||||
int16_t mReflowDepth;
|
||||
|
||||
|
@ -699,10 +699,10 @@ struct ReflowInput : public SizeComputationInput {
|
|||
// call Init as desired...
|
||||
|
||||
/**
|
||||
* Initialize a ROOT reflow state.
|
||||
* Initialize a ROOT reflow input.
|
||||
*
|
||||
* @param aPresContext Must be equal to aFrame->PresContext().
|
||||
* @param aFrame The frame for whose reflow state is being constructed.
|
||||
* @param aFrame The frame for whose reflow input is being constructed.
|
||||
* @param aRenderingContext The rendering context to be used for measurements.
|
||||
* @param aAvailableSpace See comments for availableHeight and availableWidth
|
||||
* members.
|
||||
|
@ -714,13 +714,13 @@ struct ReflowInput : public SizeComputationInput {
|
|||
const mozilla::LogicalSize& aAvailableSpace, uint32_t aFlags = 0);
|
||||
|
||||
/**
|
||||
* Initialize a reflow state for a child frame's reflow. Some parts of the
|
||||
* state are copied from the parent's reflow state. The remainder is computed.
|
||||
* Initialize a reflow input for a child frame's reflow. Some parts of the
|
||||
* state are copied from the parent's reflow input. The remainder is computed.
|
||||
*
|
||||
* @param aPresContext Must be equal to aFrame->PresContext().
|
||||
* @param aParentReflowInput A reference to an ReflowInput object that
|
||||
* is to be the parent of this object.
|
||||
* @param aFrame The frame for whose reflow state is being constructed.
|
||||
* @param aFrame The frame for whose reflow input is being constructed.
|
||||
* @param aAvailableSpace See comments for availableHeight and availableWidth
|
||||
* members.
|
||||
* @param aContainingBlockSize An optional size, in app units, specifying
|
||||
|
@ -737,11 +737,11 @@ struct ReflowInput : public SizeComputationInput {
|
|||
|
||||
// Values for |aFlags| passed to constructor
|
||||
enum {
|
||||
// Indicates that the parent of this reflow state is "fake" (see
|
||||
// Indicates that the parent of this reflow input is "fake" (see
|
||||
// mDummyParentReflowInput in mFlags).
|
||||
DUMMY_PARENT_REFLOW_STATE = (1 << 0),
|
||||
|
||||
// Indicates that the calling function will initialize the reflow state, and
|
||||
// Indicates that the calling function will initialize the reflow input, and
|
||||
// that the constructor should not call Init().
|
||||
CALLER_WILL_INIT = (1 << 1),
|
||||
|
||||
|
@ -778,7 +778,7 @@ struct ReflowInput : public SizeComputationInput {
|
|||
|
||||
/**
|
||||
* Find the content isize of our containing block for the given writing mode,
|
||||
* which need not be the same as the reflow state's mode.
|
||||
* which need not be the same as the reflow input's mode.
|
||||
*/
|
||||
nscoord GetContainingBlockContentISize(
|
||||
mozilla::WritingMode aWritingMode) const;
|
||||
|
@ -789,7 +789,7 @@ struct ReflowInput : public SizeComputationInput {
|
|||
nscoord CalcLineHeight() const;
|
||||
|
||||
/**
|
||||
* Same as CalcLineHeight() above, but doesn't need a reflow state.
|
||||
* Same as CalcLineHeight() above, but doesn't need a reflow input.
|
||||
*
|
||||
* @param aBlockBSize The computed block size of the content rect of the block
|
||||
* that the line should fill.
|
||||
|
|
|
@ -329,7 +329,7 @@ void ViewportFrame::Reflow(nsPresContext* aPresContext,
|
|||
aDesiredSize.SetOverflowAreasToDesiredBounds();
|
||||
|
||||
if (HasAbsolutelyPositionedChildren()) {
|
||||
// Make a copy of the reflow state and change the computed width and height
|
||||
// Make a copy of the reflow input and change the computed width and height
|
||||
// to reflect the available space for the fixed items
|
||||
ReflowInput reflowInput(aReflowInput);
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ class nsAbsoluteContainingBlock {
|
|||
/**
|
||||
* After an abspos child's size is known, this method can be used to
|
||||
* resolve size-dependent values in the ComputedLogicalOffsets on its
|
||||
* reflow state. (This may involve resolving the inline dimension of
|
||||
* reflow input. (This may involve resolving the inline dimension of
|
||||
* aLogicalCBSize, too; hence, that variable is an in/outparam.)
|
||||
*
|
||||
* aKidSize, aMargin, aOffsets, and aLogicalCBSize are all expected to be
|
||||
|
|
|
@ -978,7 +978,7 @@ static bool AvailableSpaceShrunk(WritingMode aWM,
|
|||
|
||||
static LogicalSize CalculateContainingBlockSizeForAbsolutes(
|
||||
WritingMode aWM, const ReflowInput& aReflowInput, LogicalSize aFrameSize) {
|
||||
// The issue here is that for a 'height' of 'auto' the reflow state
|
||||
// The issue here is that for a 'height' of 'auto' the reflow input
|
||||
// code won't know how to calculate the containing block height
|
||||
// because it's calculated bottom up. So we use our own computed
|
||||
// size as the dimensions.
|
||||
|
@ -1003,7 +1003,7 @@ static LogicalSize CalculateContainingBlockSizeForAbsolutes(
|
|||
// In fact we should be attaching absolute children to the outermost
|
||||
// frame and not always sticking them in block frames.
|
||||
|
||||
// First, find the reflow state for the outermost frame for this
|
||||
// First, find the reflow input for the outermost frame for this
|
||||
// content, except for fieldsets where the inner anonymous frame has
|
||||
// the correct padding area with the legend taken into account.
|
||||
const ReflowInput* aLastRI = &aReflowInput;
|
||||
|
@ -1031,7 +1031,7 @@ static LogicalSize CalculateContainingBlockSizeForAbsolutes(
|
|||
scrollbars.left = scrollbars.right = 0;
|
||||
}
|
||||
}
|
||||
// We found a reflow state for the outermost wrapping frame, so use
|
||||
// We found a reflow input for the outermost wrapping frame, so use
|
||||
// its computed metrics if available, converted to our writing mode
|
||||
WritingMode lastWM = aLastRI->GetWritingMode();
|
||||
LogicalSize lastRISize = aLastRI->ComputedSize().ConvertTo(aWM, lastWM);
|
||||
|
@ -1149,7 +1149,7 @@ void nsBlockFrame::Reflow(nsPresContext* aPresContext, ReflowOutput& aMetrics,
|
|||
bool blockStartMarginRoot, blockEndMarginRoot;
|
||||
IsMarginRoot(&blockStartMarginRoot, &blockEndMarginRoot);
|
||||
|
||||
// Cache the consumed height in the block reflow state so that we don't have
|
||||
// Cache the consumed height in the block reflow input so that we don't have
|
||||
// to continually recompute it.
|
||||
BlockReflowInput state(*reflowInput, aPresContext, this, blockStartMarginRoot,
|
||||
blockEndMarginRoot, needFloatManager, consumedBSize);
|
||||
|
@ -3193,7 +3193,7 @@ void nsBlockFrame::ReflowBlockFrame(BlockReflowInput& aState,
|
|||
|
||||
// Setup a reflowInput to get the style computed block-start margin
|
||||
// value. We'll use a reason of `resize' so that we don't fudge
|
||||
// any incremental reflow state.
|
||||
// any incremental reflow input.
|
||||
|
||||
// The availSpace here is irrelevant to our needs - all we want
|
||||
// out if this setup is the block-start margin value which doesn't depend
|
||||
|
@ -3337,7 +3337,7 @@ void nsBlockFrame::ReflowBlockFrame(BlockReflowInput& aState,
|
|||
availSpace.BSize(wm) += bStartMargin;
|
||||
}
|
||||
|
||||
// construct the html reflow state for the block. ReflowBlock
|
||||
// construct the html reflow input for the block. ReflowBlock
|
||||
// will initialize it.
|
||||
Maybe<ReflowInput> blockHtmlRI;
|
||||
blockHtmlRI.emplace(
|
||||
|
|
|
@ -673,7 +673,7 @@ class nsBlockFrame : public nsContainerFrame {
|
|||
* Reflow a line.
|
||||
*
|
||||
* @param aState
|
||||
* the current reflow state
|
||||
* the current reflow input
|
||||
* @param aLine
|
||||
* the line to reflow. can contain a single block frame or contain 1 or
|
||||
* more inline frames.
|
||||
|
@ -764,7 +764,7 @@ class nsBlockFrame : public nsContainerFrame {
|
|||
/**
|
||||
* Create a next-in-flow, if necessary, for aFrame. If a new frame is
|
||||
* created, place it in aLine if aLine is not null.
|
||||
* @param aState the block reflow state
|
||||
* @param aState the block reflow input
|
||||
* @param aLine where to put a new frame
|
||||
* @param aFrame the frame
|
||||
* @return true if a new frame was created, false if not
|
||||
|
|
|
@ -146,10 +146,10 @@ bool nsBlockReflowContext::ComputeCollapsedBStartMargin(
|
|||
// it. For its margins to be computed we need to have a reflow
|
||||
// state for it.
|
||||
|
||||
// We may have to construct an extra reflow state here if
|
||||
// We may have to construct an extra reflow input here if
|
||||
// we drilled down through a block wrapper. At the moment
|
||||
// we can only drill down one level so we only have to support
|
||||
// one extra reflow state.
|
||||
// one extra reflow input.
|
||||
const ReflowInput* outerReflowInput = &aRI;
|
||||
if (frame != aRI.mFrame) {
|
||||
NS_ASSERTION(frame->GetParent() == aRI.mFrame,
|
||||
|
|
|
@ -51,7 +51,7 @@ class nsBlockReflowContext {
|
|||
|
||||
/**
|
||||
* Computes the collapsed block-start margin (in the context's parent's
|
||||
* writing mode) for a block whose reflow state is in aRI.
|
||||
* writing mode) for a block whose reflow input is in aRI.
|
||||
* The computed margin is added into aMargin, whose writing mode is the
|
||||
* parent's mode as found in mMetrics.GetWritingMode(); note this may not be
|
||||
* the block's own writing mode as found in aRI.
|
||||
|
|
|
@ -870,7 +870,7 @@ void nsContainerFrame::ReflowChild(
|
|||
const WritingMode& aWM, const LogicalPoint& aPos,
|
||||
const nsSize& aContainerSize, uint32_t aFlags, nsReflowStatus& aStatus,
|
||||
nsOverflowContinuationTracker* aTracker) {
|
||||
MOZ_ASSERT(aReflowInput.mFrame == aKidFrame, "bad reflow state");
|
||||
MOZ_ASSERT(aReflowInput.mFrame == aKidFrame, "bad reflow input");
|
||||
if (aWM.IsVerticalRL() || (!aWM.IsVertical() && !aWM.IsBidiLTR())) {
|
||||
NS_ASSERTION(aContainerSize.width != NS_UNCONSTRAINEDSIZE,
|
||||
"ReflowChild with unconstrained container width!");
|
||||
|
@ -916,7 +916,7 @@ void nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
|
|||
nscoord aY, uint32_t aFlags,
|
||||
nsReflowStatus& aStatus,
|
||||
nsOverflowContinuationTracker* aTracker) {
|
||||
MOZ_ASSERT(aReflowInput.mFrame == aKidFrame, "bad reflow state");
|
||||
MOZ_ASSERT(aReflowInput.mFrame == aKidFrame, "bad reflow input");
|
||||
|
||||
// Position the child frame and its view if requested.
|
||||
if (NS_FRAME_NO_MOVE_FRAME != (aFlags & NS_FRAME_NO_MOVE_FRAME)) {
|
||||
|
|
|
@ -153,7 +153,7 @@ void nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
|
|||
|
||||
nsIFrame* kid = mFrames.FirstChild();
|
||||
|
||||
// Setup reflow state for our child
|
||||
// Setup reflow input for our child
|
||||
WritingMode wm = aReflowInput.GetWritingMode();
|
||||
LogicalSize availSize = aReflowInput.AvailableSize();
|
||||
const LogicalMargin& bp = aReflowInput.ComputedLogicalBorderPadding();
|
||||
|
|
|
@ -1267,9 +1267,9 @@ UniquePtr<FlexItem> nsFlexContainerFrame::GenerateFlexItemForChild(
|
|||
nsPresContext* aPresContext, nsIFrame* aChildFrame,
|
||||
const ReflowInput& aParentReflowInput,
|
||||
const FlexboxAxisTracker& aAxisTracker) {
|
||||
// Create temporary reflow state just for sizing -- to get hypothetical
|
||||
// Create temporary reflow input just for sizing -- to get hypothetical
|
||||
// main-size and the computed values of min / max main-size property.
|
||||
// (This reflow state will _not_ be used for reflow.)
|
||||
// (This reflow input will _not_ be used for reflow.)
|
||||
ReflowInput childRI(
|
||||
aPresContext, aParentReflowInput, aChildFrame,
|
||||
aParentReflowInput.ComputedSize(aChildFrame->GetWritingMode()));
|
||||
|
@ -1302,7 +1302,7 @@ UniquePtr<FlexItem> nsFlexContainerFrame::GenerateFlexItemForChild(
|
|||
|
||||
// CROSS SIZES (tentative cross size, min/max cross size)
|
||||
// ------------------------------------------------------
|
||||
// Grab the cross size from the reflow state. This might be the right value,
|
||||
// Grab the cross size from the reflow input. This might be the right value,
|
||||
// or we might resolve it to something else in SizeItemInCrossAxis(); hence,
|
||||
// it's tentative. See comment under "Cross Size Determination" for more.
|
||||
nscoord tentativeCrossSize = GET_CROSS_COMPONENT_LOGICAL(
|
||||
|
@ -1584,7 +1584,7 @@ void nsFlexContainerFrame::ResolveAutoFlexBasisAndMinSize(
|
|||
// cases) we don't know how much the item should stretch yet.
|
||||
const ReflowInput* flexContainerRI = aItemReflowInput.mParentReflowInput;
|
||||
MOZ_ASSERT(flexContainerRI,
|
||||
"flex item's reflow state should have ptr to container's state");
|
||||
"flex item's reflow input should have ptr to container's state");
|
||||
if (NS_STYLE_FLEX_WRAP_NOWRAP == flexContainerRI->mStylePosition->mFlexWrap) {
|
||||
// XXXdholbert Maybe this should share logic with ComputeCrossSize()...
|
||||
// Alternately, maybe tentative container cross size should be passed down.
|
||||
|
@ -1640,7 +1640,7 @@ void nsFlexContainerFrame::ResolveAutoFlexBasisAndMinSize(
|
|||
}
|
||||
NS_ASSERTION(!flexBasisNeedsToMeasureContent,
|
||||
"flex-basis:auto should have been resolved in the "
|
||||
"reflow state, for horizontal flexbox. It shouldn't need "
|
||||
"reflow input, for horizontal flexbox. It shouldn't need "
|
||||
"special handling here");
|
||||
} else {
|
||||
// If this item is flexible (in its block axis)...
|
||||
|
@ -1829,7 +1829,7 @@ nscoord nsFlexContainerFrame::MeasureFlexItemContentBSize(
|
|||
nsPresContext* aPresContext, FlexItem& aFlexItem,
|
||||
bool aForceBResizeForMeasuringReflow,
|
||||
const ReflowInput& aParentReflowInput) {
|
||||
// Set up a reflow state for measuring the flex item's auto-height:
|
||||
// Set up a reflow input for measuring the flex item's auto-height:
|
||||
WritingMode wm = aFlexItem.Frame()->GetWritingMode();
|
||||
LogicalSize availSize = aParentReflowInput.ComputedSize(wm);
|
||||
availSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
|
||||
|
@ -3357,7 +3357,7 @@ void FlexItem::ResolveStretchedCrossSize(
|
|||
stretchedSize = NS_CSS_MINMAX(stretchedSize, mCrossMinSize, mCrossMaxSize);
|
||||
|
||||
// Update the cross-size & make a note that it's stretched, so we know to
|
||||
// override the reflow state's computed cross-size in our final reflow.
|
||||
// override the reflow input's computed cross-size in our final reflow.
|
||||
SetCrossSize(stretchedSize);
|
||||
mIsStretched = true;
|
||||
}
|
||||
|
@ -3881,7 +3881,7 @@ void nsFlexContainerFrame::GenerateFlexLines(
|
|||
}
|
||||
|
||||
// Retrieves the content-box main-size of our flex container from the
|
||||
// reflow state (specifically, the main-size of *this continuation* of the
|
||||
// reflow input (specifically, the main-size of *this continuation* of the
|
||||
// flex container).
|
||||
nscoord nsFlexContainerFrame::GetMainSizeFromReflowInput(
|
||||
const ReflowInput& aReflowInput, const FlexboxAxisTracker& aAxisTracker) {
|
||||
|
@ -3933,7 +3933,7 @@ static bool FrameHasRelativeBSizeDependency(nsIFrame* aFrame) {
|
|||
|
||||
/* Resolves the content-box main-size of a flex container frame,
|
||||
* primarily based on:
|
||||
* - the "tentative" main size, taken from the reflow state ("tentative"
|
||||
* - the "tentative" main size, taken from the reflow input ("tentative"
|
||||
* because it may be unconstrained or may run off the page).
|
||||
* - the available BSize (needed if the main axis is the block axis).
|
||||
* - the sizes of our lines of flex items.
|
||||
|
@ -3943,7 +3943,7 @@ static bool FrameHasRelativeBSizeDependency(nsIFrame* aFrame) {
|
|||
*
|
||||
* (Note: This function should be structurally similar to 'ComputeCrossSize()',
|
||||
* except that here, the caller has already grabbed the tentative size from the
|
||||
* reflow state.)
|
||||
* reflow input.)
|
||||
*/
|
||||
static nscoord ResolveFlexContainerMainSize(
|
||||
const ReflowInput& aReflowInput, const FlexboxAxisTracker& aAxisTracker,
|
||||
|
@ -3963,7 +3963,7 @@ static nscoord ResolveFlexContainerMainSize(
|
|||
aTentativeMainSize < aAvailableBSizeForContent) {
|
||||
// Not in a fragmenting context, OR no need to fragment because we have
|
||||
// more available BSize than we need. Either way, we don't need to clamp.
|
||||
// (Note that the reflow state has already done the appropriate
|
||||
// (Note that the reflow input has already done the appropriate
|
||||
// min/max-BSize clamping.)
|
||||
return aTentativeMainSize;
|
||||
}
|
||||
|
@ -4024,7 +4024,7 @@ nscoord nsFlexContainerFrame::ComputeCrossSize(
|
|||
effectiveComputedBSize < aAvailableBSizeForContent) {
|
||||
// Not in a fragmenting context, OR no need to fragment because we have
|
||||
// more available BSize than we need. Either way, just use our fixed
|
||||
// BSize. (Note that the reflow state has already done the appropriate
|
||||
// BSize. (Note that the reflow input has already done the appropriate
|
||||
// min/max-BSize clamping.)
|
||||
return effectiveComputedBSize;
|
||||
}
|
||||
|
@ -4106,7 +4106,7 @@ static nscoord ComputePhysicalAscentFromFlexRelativeAscent(
|
|||
void nsFlexContainerFrame::SizeItemInCrossAxis(
|
||||
nsPresContext* aPresContext, const FlexboxAxisTracker& aAxisTracker,
|
||||
ReflowInput& aChildReflowInput, FlexItem& aItem) {
|
||||
// If cross axis is the item's inline axis, just use ISize from reflow state,
|
||||
// If cross axis is the item's inline axis, just use ISize from reflow input,
|
||||
// and don't bother with a full reflow.
|
||||
if (aItem.IsInlineAxisCrossAxis()) {
|
||||
aItem.SetCrossSize(aChildReflowInput.ComputedISize());
|
||||
|
@ -4303,7 +4303,7 @@ void nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
|
|||
// nsFrame::ComputeSizeWithIntrinsicDimensions.
|
||||
// (We could use this overridden size more broadly, too, but it's probably
|
||||
// better to avoid property-table accesses. So, where possible, we communicate
|
||||
// the resolved main-size to the child via modifying its reflow state directly,
|
||||
// the resolved main-size to the child via modifying its reflow input directly,
|
||||
// instead of using this class.)
|
||||
class MOZ_RAII AutoFlexItemMainSizeOverride final {
|
||||
public:
|
||||
|
@ -4651,8 +4651,8 @@ void nsFlexContainerFrame::DoFlexLayout(
|
|||
// For flex items with an aspect ratio, we have to impose an override
|
||||
// for the main-size property *before* we even instantiate the reflow
|
||||
// state, in order for aspect ratio calculations to produce the right
|
||||
// cross size in the reflow state. (For other flex items, it's OK
|
||||
// (and cheaper) to impose our main size *after* the reflow state has
|
||||
// cross size in the reflow input. (For other flex items, it's OK
|
||||
// (and cheaper) to impose our main size *after* the reflow input has
|
||||
// been constructed, since the main size shouldn't influence anything
|
||||
// about cross-size measurement until we actually reflow the child.)
|
||||
sizeOverride.emplace(*item, aAxisTracker);
|
||||
|
@ -4664,7 +4664,7 @@ void nsFlexContainerFrame::DoFlexLayout(
|
|||
ReflowInput childReflowInput(aPresContext, aReflowInput, item->Frame(),
|
||||
availSize);
|
||||
if (!sizeOverride) {
|
||||
// Directly override the computed main-size, by tweaking reflow state:
|
||||
// Directly override the computed main-size, by tweaking reflow input:
|
||||
if (item->IsInlineAxisMainAxis()) {
|
||||
childReflowInput.SetComputedISize(item->GetMainSize());
|
||||
} else {
|
||||
|
@ -5058,11 +5058,11 @@ void nsFlexContainerFrame::ReflowFlexItem(
|
|||
didOverrideComputedBSize = true;
|
||||
}
|
||||
|
||||
// Override reflow state's computed cross-size if either:
|
||||
// Override reflow input's computed cross-size if either:
|
||||
// - the item was stretched (in which case we're imposing a cross size)
|
||||
// ...or...
|
||||
// - the item it has an aspect ratio (in which case the cross-size that's
|
||||
// currently in the reflow state is based on arithmetic involving a stale
|
||||
// currently in the reflow input is based on arithmetic involving a stale
|
||||
// main-size value that we just stomped on above). (Note that we could handle
|
||||
// this case using an AutoFlexItemMainSizeOverride, as we do elsewhere; but
|
||||
// given that we *already know* the correct cross size to use here, it's
|
||||
|
|
|
@ -381,7 +381,7 @@ class nsFlexContainerFrame final : public nsContainerFrame {
|
|||
* for the flex item at the correct size, and hence can skip its final reflow
|
||||
* (but still need to move it to the right final position).
|
||||
*
|
||||
* @param aReflowInput The flex container's reflow state.
|
||||
* @param aReflowInput The flex container's reflow input.
|
||||
* @param aItem The flex item whose frame should be moved.
|
||||
* @param aFramePos The position where the flex item's frame should
|
||||
* be placed. (pre-relative positioning)
|
||||
|
@ -398,7 +398,7 @@ class nsFlexContainerFrame final : public nsContainerFrame {
|
|||
*
|
||||
* @param aPresContext The presentation context being used in reflow.
|
||||
* @param aAxisTracker A FlexboxAxisTracker with the flex container's axes.
|
||||
* @param aReflowInput The flex container's reflow state.
|
||||
* @param aReflowInput The flex container's reflow input.
|
||||
* @param aItem The flex item to be reflowed.
|
||||
* @param aFramePos The position where the flex item's frame should
|
||||
* be placed. (pre-relative positioning)
|
||||
|
|
|
@ -10178,10 +10178,10 @@ void nsFrame::BoxReflow(nsBoxLayoutState& aState, nsPresContext* aPresContext,
|
|||
if (needsReflow) {
|
||||
aDesiredSize.ClearSize();
|
||||
|
||||
// create a reflow state to tell our child to flow at the given size.
|
||||
// create a reflow input to tell our child to flow at the given size.
|
||||
|
||||
// Construct a bogus parent reflow state so that there's a usable
|
||||
// containing block reflow state.
|
||||
// Construct a bogus parent reflow input so that there's a usable
|
||||
// containing block reflow input.
|
||||
nsMargin margin(0, 0, 0, 0);
|
||||
GetXULMargin(margin);
|
||||
|
||||
|
@ -10219,7 +10219,7 @@ void nsFrame::BoxReflow(nsBoxLayoutState& aState, nsPresContext* aPresContext,
|
|||
if (outerReflowInput && outerReflowInput->mFrame == parentFrame) {
|
||||
// We're a frame (such as a text control frame) that jumps into
|
||||
// box reflow and then straight out of it on the child frame.
|
||||
// This means we actually have a real parent reflow state.
|
||||
// This means we actually have a real parent reflow input.
|
||||
// nsLayoutUtils::InflationMinFontSizeFor used to need this to be
|
||||
// linked up correctly for text control frames, so do so here).
|
||||
parentRI = outerReflowInput;
|
||||
|
@ -10227,7 +10227,7 @@ void nsFrame::BoxReflow(nsBoxLayoutState& aState, nsPresContext* aPresContext,
|
|||
parentRI = &parentReflowInput;
|
||||
}
|
||||
|
||||
// XXX Is it OK that this reflow state has only one ancestor?
|
||||
// XXX Is it OK that this reflow input has only one ancestor?
|
||||
// (It used to have a bogus parent, skipping all the boxes).
|
||||
WritingMode wm = GetWritingMode();
|
||||
LogicalSize logicalSize(wm, nsSize(aWidth, aHeight));
|
||||
|
@ -11715,7 +11715,7 @@ void DR_State::FindMatchingRule(DR_FrameTreeNode& aNode) {
|
|||
|
||||
DR_FrameTreeNode* DR_State::CreateTreeNode(nsIFrame* aFrame,
|
||||
const ReflowInput* aReflowInput) {
|
||||
// find the frame of the parent reflow state (usually just the parent of
|
||||
// find the frame of the parent reflow input (usually just the parent of
|
||||
// aFrame)
|
||||
nsIFrame* parentFrame;
|
||||
if (aReflowInput) {
|
||||
|
|
|
@ -1700,7 +1700,7 @@ struct nsGridContainerFrame::Tracks {
|
|||
* to grow a row. mOriginalRowData is setup by the first-in-flow and
|
||||
* not modified after that. It's used for undoing the changes to mRows.
|
||||
* mCols, mGridItems, mAbsPosItems are used for initializing the grid
|
||||
* reflow state for continuations, see GridReflowInput::Initialize below.
|
||||
* reflow input for continuations, see GridReflowInput::Initialize below.
|
||||
*/
|
||||
struct nsGridContainerFrame::SharedGridData {
|
||||
SharedGridData()
|
||||
|
@ -1889,7 +1889,7 @@ struct MOZ_STACK_CLASS nsGridContainerFrame::GridReflowInput {
|
|||
|
||||
/**
|
||||
* @note mReflowInput may be null when using the 2nd ctor above. In this case
|
||||
* we'll construct a dummy parent reflow state if we need it to calculate
|
||||
* we'll construct a dummy parent reflow input if we need it to calculate
|
||||
* min/max-content contributions when sizing tracks.
|
||||
*/
|
||||
const ReflowInput* const mReflowInput;
|
||||
|
@ -4662,7 +4662,7 @@ LogicalRect nsGridContainerFrame::GridReflowInput::ContainingBlockForAbsPos(
|
|||
|
||||
/**
|
||||
* Return a Fragmentainer object if we have a fragmentainer frame in our
|
||||
* ancestor chain of containing block (CB) reflow states. We'll only
|
||||
* ancestor chain of containing block (CB) reflow inputs. We'll only
|
||||
* continue traversing the ancestor chain as long as the CBs have
|
||||
* the same writing-mode and have overflow:visible.
|
||||
*/
|
||||
|
@ -5205,7 +5205,7 @@ nscoord nsGridContainerFrame::ReflowRowsInFragmentainer(
|
|||
}
|
||||
}
|
||||
|
||||
// aFragmentainer.mIsTopOfPage is propagated to the child reflow state.
|
||||
// aFragmentainer.mIsTopOfPage is propagated to the child reflow input.
|
||||
// When it's false the child may request InlineBreak::Before. We set it
|
||||
// to false when the row is growable (as determined in the CSS Grid
|
||||
// Fragmentation spec) and there is a non-zero space between it and the
|
||||
|
|
|
@ -114,7 +114,7 @@ nsIIOService* nsImageFrame::sIOService;
|
|||
// This is used by nsImageFrame::ShouldCreateImageFrameFor and should
|
||||
// not be used for layout decisions.
|
||||
static bool HaveSpecifiedSize(const nsStylePosition* aStylePosition) {
|
||||
// check the width and height values in the reflow state's style struct
|
||||
// check the width and height values in the reflow input's style struct
|
||||
// - if width and height are specified as either coord or percentage, then
|
||||
// the size of the image frame is constrained
|
||||
return aStylePosition->mWidth.IsLengthPercentage() &&
|
||||
|
|
|
@ -346,7 +346,7 @@ void nsInlineFrame::Reflow(nsPresContext* aPresContext, ReflowOutput& aMetrics,
|
|||
DrainSelfOverflowListInternal(aReflowInput.mLineLayout->GetInFirstLine());
|
||||
}
|
||||
|
||||
// Set our own reflow state (additional state above and beyond aReflowInput).
|
||||
// Set our own reflow input (additional state above and beyond aReflowInput).
|
||||
InlineReflowInput irs;
|
||||
irs.mPrevFrame = nullptr;
|
||||
irs.mLineContainer = aReflowInput.mLineLayout->LineContainerFrame();
|
||||
|
@ -1014,7 +1014,7 @@ void nsFirstLineFrame::Reflow(nsPresContext* aPresContext,
|
|||
// It's also possible that we have an overflow list for ourselves.
|
||||
DrainSelfOverflowList();
|
||||
|
||||
// Set our own reflow state (additional state above and beyond aReflowInput).
|
||||
// Set our own reflow input (additional state above and beyond aReflowInput).
|
||||
InlineReflowInput irs;
|
||||
irs.mPrevFrame = nullptr;
|
||||
irs.mLineContainer = aReflowInput.mLineLayout->LineContainerFrame();
|
||||
|
|
|
@ -120,7 +120,7 @@ class nsInlineFrame : public nsContainerFrame {
|
|||
mozilla::ServoRestyleState& aRestyleState);
|
||||
|
||||
protected:
|
||||
// Additional reflow state used during our reflow methods
|
||||
// Additional reflow input used during our reflow methods
|
||||
struct InlineReflowInput {
|
||||
nsIFrame* mPrevFrame;
|
||||
nsInlineFrame* mNextInFlow;
|
||||
|
|
|
@ -808,7 +808,7 @@ void nsLineLayout::ReflowFrame(nsIFrame* aFrame, nsReflowStatus& aReflowStatus,
|
|||
"calculation");
|
||||
nscoord availableSpaceOnLine = psd->mIEnd - psd->mICoord;
|
||||
|
||||
// Setup reflow state for reflowing the frame
|
||||
// Setup reflow input for reflowing the frame
|
||||
Maybe<ReflowInput> reflowInputHolder;
|
||||
if (!isText) {
|
||||
// Compute the available size for the frame. This available width
|
||||
|
@ -1127,7 +1127,7 @@ void nsLineLayout::AllowForStartMargin(PerFrameData* pfd,
|
|||
"have unconstrained inline-size; this should only result from very "
|
||||
"large sizes, not attempts at intrinsic inline-size calculation");
|
||||
// For inline-ish and text-ish things (which don't compute widths
|
||||
// in the reflow state), adjust available inline-size to account
|
||||
// in the reflow input), adjust available inline-size to account
|
||||
// for the start margin. The end margin will be accounted for when
|
||||
// we finish flowing the frame.
|
||||
WritingMode wm = aReflowInput.GetWritingMode();
|
||||
|
|
|
@ -146,12 +146,12 @@ class nsLineLayout {
|
|||
// Inform the line-layout about the presence of a floating frame
|
||||
// XXX get rid of this: use get-frame-type?
|
||||
bool AddFloat(nsIFrame* aFloat, nscoord aAvailableISize) {
|
||||
// When reflowing ruby text frames, no block reflow state is
|
||||
// When reflowing ruby text frames, no block reflow input is
|
||||
// provided to the line layout. However, floats should never be
|
||||
// associated with ruby text containers, hence this method should
|
||||
// not be called in that case.
|
||||
MOZ_ASSERT(mBlockRI,
|
||||
"Should not call this method if there is no block reflow state "
|
||||
"Should not call this method if there is no block reflow input "
|
||||
"available");
|
||||
return mBlockRI->AddFloat(this, aFloat, aAvailableISize);
|
||||
}
|
||||
|
|
|
@ -303,11 +303,11 @@ void nsRubyBaseContainerFrame::Reflow(nsPresContext* aPresContext,
|
|||
LogicalSize availSize(lineWM, aReflowInput.AvailableISize(),
|
||||
aReflowInput.AvailableBSize());
|
||||
|
||||
// We have a reflow state and a line layout for each RTC.
|
||||
// We have a reflow input and a line layout for each RTC.
|
||||
// They are conceptually the state of the RTCs, but we don't actually
|
||||
// reflow those RTCs in this code. These two arrays are holders of
|
||||
// the reflow states and line layouts.
|
||||
// Since there are pointers refer to reflow states and line layouts,
|
||||
// the reflow inputs and line layouts.
|
||||
// Since there are pointers refer to reflow inputs and line layouts,
|
||||
// it is necessary to guarantee that they won't be moved. For this
|
||||
// reason, they are wrapped in UniquePtr here.
|
||||
AutoTArray<UniquePtr<ReflowInput>, RTC_ARRAY_SIZE> reflowInputs;
|
||||
|
|
|
@ -311,7 +311,7 @@ void nsRubyFrame::ReflowSegment(nsPresContext* aPresContext,
|
|||
// handled when reflowing the base containers.
|
||||
NS_ASSERTION(textReflowStatus.IsEmpty(),
|
||||
"Ruby text container must not break itself inside");
|
||||
// The metrics is initialized with reflow state of this ruby frame,
|
||||
// The metrics is initialized with reflow input of this ruby frame,
|
||||
// hence the writing-mode is tied to rubyWM instead of rtcWM.
|
||||
LogicalSize size = textMetrics.Size(rubyWM).ConvertTo(lineWM, rubyWM);
|
||||
textContainer->SetSize(lineWM, size);
|
||||
|
|
|
@ -8696,7 +8696,7 @@ void nsTextFrame::ReflowText(nsLineLayout& aLineLayout, nscoord aAvailableWidth,
|
|||
// Set up flags and clear out state
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Clear out the reflow state flags in mState. We also clear the whitespace
|
||||
// Clear out the reflow input flags in mState. We also clear the whitespace
|
||||
// flags because this can change whether the frame maps whitespace-only text
|
||||
// or not. We also clear the flag that tracks whether we had a pending
|
||||
// reflow request from CharacterDataChanged (since we're reflowing now).
|
||||
|
|
|
@ -523,7 +523,7 @@ void nsSVGForeignObjectFrame::DoReflow() {
|
|||
"style system should ensure that :-moz-svg-foreign-content "
|
||||
"does not get styled");
|
||||
NS_ASSERTION(reflowInput.ComputedISize() == ISize(wm),
|
||||
"reflow state made child wrong size");
|
||||
"reflow input made child wrong size");
|
||||
reflowInput.SetComputedBSize(BSize(wm));
|
||||
|
||||
ReflowChild(kid, presContext, desiredSize, reflowInput, 0, 0,
|
||||
|
|
|
@ -130,7 +130,7 @@ void nsTableCellFrame::NotifyPercentBSize(const ReflowInput& aReflowInput) {
|
|||
// XXXldb Given the now-stricter |NeedsToObserve|, many if not all of
|
||||
// these tests are probably unnecessary.
|
||||
|
||||
// Maybe the cell reflow state; we sure if we're inside the |if|.
|
||||
// Maybe the cell reflow input; we sure if we're inside the |if|.
|
||||
const ReflowInput* cellRI = aReflowInput.mCBReflowInput;
|
||||
|
||||
if (cellRI && cellRI->mFrame == this &&
|
||||
|
@ -836,7 +836,7 @@ void nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
|||
// will determine how far this is propagated to descendants.
|
||||
kidReflowInput.mPercentBSizeObserver = this;
|
||||
}
|
||||
// Don't propagate special bsize reflow state to our kids
|
||||
// Don't propagate special bsize reflow input to our kids
|
||||
kidReflowInput.mFlags.mSpecialBSizeReflow = false;
|
||||
|
||||
if (aReflowInput.mFlags.mSpecialBSizeReflow ||
|
||||
|
|
|
@ -70,7 +70,7 @@ using mozilla::gfx::ToDeviceColor;
|
|||
namespace mozilla {
|
||||
|
||||
struct TableReflowInput {
|
||||
// the real reflow state
|
||||
// the real reflow input
|
||||
const ReflowInput& reflowInput;
|
||||
|
||||
// The table's available size (in reflowInput's writing mode)
|
||||
|
@ -1862,7 +1862,7 @@ void nsTableFrame::RequestSpecialBSizeReflow(const ReflowInput& aReflowInput) {
|
|||
* ancestors until it reaches the containing table and calls
|
||||
* SetNeedToInitiateSpecialReflow() on it. For percent bsize frames inside
|
||||
* cells, during DidReflow(), the cell's NotifyPercentBSize() is called
|
||||
* (the cell is the reflow state's mPercentBSizeObserver in this case).
|
||||
* (the cell is the reflow input's mPercentBSizeObserver in this case).
|
||||
* NotifyPercentBSize() calls RequestSpecialBSizeReflow().
|
||||
*
|
||||
* XXX (jfkthame) This comment appears to be out of date; it refers to
|
||||
|
@ -2036,7 +2036,7 @@ void nsTableFrame::Reflow(nsPresContext* aPresContext,
|
|||
|
||||
// XXXldb Are all these conditions correct?
|
||||
if (needToInitiateSpecialReflow && aStatus.IsComplete()) {
|
||||
// XXXldb Do we need to set the IsBResize flag on any reflow states?
|
||||
// XXXldb Do we need to set the IsBResize flag on any reflow inputs?
|
||||
|
||||
ReflowInput& mutable_rs = const_cast<ReflowInput&>(aReflowInput);
|
||||
|
||||
|
@ -2143,9 +2143,9 @@ void nsTableFrame::FixupPositionedTableParts(nsPresContext* aPresContext,
|
|||
desiredSize.mOverflowAreas =
|
||||
positionedPart->GetOverflowAreasRelativeToSelf();
|
||||
|
||||
// Construct a dummy reflow state and reflow status.
|
||||
// XXX(seth): Note that the dummy reflow state doesn't have a correct
|
||||
// chain of parent reflow states. It also doesn't necessarily have a
|
||||
// Construct a dummy reflow input and reflow status.
|
||||
// XXX(seth): Note that the dummy reflow input doesn't have a correct
|
||||
// chain of parent reflow inputs. It also doesn't necessarily have a
|
||||
// correct containing block.
|
||||
WritingMode wm = positionedPart->GetWritingMode();
|
||||
LogicalSize availSize(wm, size);
|
||||
|
@ -2811,7 +2811,7 @@ LogicalMargin nsTableFrame::GetExcludedOuterBCBorder(
|
|||
static LogicalMargin GetSeparateModelBorderPadding(
|
||||
const WritingMode aWM, const ReflowInput* aReflowInput,
|
||||
ComputedStyle* aComputedStyle) {
|
||||
// XXXbz Either we _do_ have a reflow state and then we can use its
|
||||
// XXXbz Either we _do_ have a reflow input and then we can use its
|
||||
// mComputedBorderPadding or we don't and then we get the padding
|
||||
// wrong!
|
||||
const nsStyleBorder* border = aComputedStyle->StyleBorder();
|
||||
|
@ -2852,7 +2852,7 @@ void nsTableFrame::InitChildReflowInput(ReflowInput& aReflowInput) {
|
|||
}
|
||||
}
|
||||
|
||||
// Position and size aKidFrame and update our reflow state. The origin of
|
||||
// Position and size aKidFrame and update our reflow input. The origin of
|
||||
// aKidRect is relative to the upper-left origin of our frame
|
||||
void nsTableFrame::PlaceChild(TableReflowInput& aReflowInput,
|
||||
nsIFrame* aKidFrame, nsPoint aKidPosition,
|
||||
|
@ -3367,7 +3367,7 @@ void nsTableFrame::ReflowColGroups(gfxContext* aRenderingContext) {
|
|||
nsPresContext* presContext = PresContext();
|
||||
for (nsIFrame* kidFrame : mColGroups) {
|
||||
if (NS_SUBTREE_DIRTY(kidFrame)) {
|
||||
// The column groups don't care about dimensions or reflow states.
|
||||
// The column groups don't care about dimensions or reflow inputs.
|
||||
ReflowInput kidReflowInput(presContext, kidFrame, aRenderingContext,
|
||||
LogicalSize(kidFrame->GetWritingMode()));
|
||||
nsReflowStatus cgStatus;
|
||||
|
|
|
@ -646,12 +646,12 @@ class nsTableFrame : public nsContainerFrame {
|
|||
|
||||
public:
|
||||
// calculate the computed block-size of aFrame including its border and
|
||||
// padding given its reflow state.
|
||||
// padding given its reflow input.
|
||||
nscoord CalcBorderBoxBSize(const ReflowInput& aReflowInput);
|
||||
|
||||
protected:
|
||||
// update the desired block-size of this table taking into account the
|
||||
// current reflow state, the table attributes and the content driven rowgroup
|
||||
// current reflow input, the table attributes and the content driven rowgroup
|
||||
// bsizes this function can change the overflow area
|
||||
void CalcDesiredBSize(const ReflowInput& aReflowInput,
|
||||
ReflowOutput& aDesiredSize);
|
||||
|
|
|
@ -29,7 +29,7 @@ using namespace mozilla::layout;
|
|||
namespace mozilla {
|
||||
|
||||
struct TableRowGroupReflowInput {
|
||||
const ReflowInput& reflowInput; // Our reflow state
|
||||
const ReflowInput& reflowInput; // Our reflow input
|
||||
|
||||
nsTableFrame* tableFrame;
|
||||
|
||||
|
@ -258,7 +258,7 @@ nsIFrame::LogicalSides nsTableRowGroupFrame::GetLogicalSkipSides(
|
|||
return skip;
|
||||
}
|
||||
|
||||
// Position and size aKidFrame and update our reflow state.
|
||||
// Position and size aKidFrame and update our reflow input.
|
||||
void nsTableRowGroupFrame::PlaceChild(
|
||||
nsPresContext* aPresContext, TableRowGroupReflowInput& aReflowInput,
|
||||
nsIFrame* aKidFrame, WritingMode aWM, const LogicalPoint& aKidPosition,
|
||||
|
|
|
@ -262,11 +262,11 @@ void nsTableWrapperFrame::GetChildMargin(nsPresContext* aPresContext,
|
|||
NS_ASSERTION(!aChildFrame->IsTableCaption(),
|
||||
"didn't expect caption frame; writing-mode may be wrong!");
|
||||
|
||||
// construct a reflow state to compute margin and padding. Auto margins
|
||||
// construct a reflow input to compute margin and padding. Auto margins
|
||||
// will not be computed at this time.
|
||||
|
||||
// create and init the child reflow state
|
||||
// XXX We really shouldn't construct a reflow state to do this.
|
||||
// create and init the child reflow input
|
||||
// XXX We really shouldn't construct a reflow input to do this.
|
||||
WritingMode wm = aOuterRI.GetWritingMode();
|
||||
LogicalSize availSize(wm, aAvailISize, aOuterRI.AvailableSize(wm).BSize(wm));
|
||||
ReflowInput childRI(aPresContext, aOuterRI, aChildFrame, availSize, nullptr,
|
||||
|
@ -733,7 +733,7 @@ void nsTableWrapperFrame::OuterBeginReflowChild(nsPresContext* aPresContext,
|
|||
}
|
||||
}
|
||||
LogicalSize availSize(wm, aAvailISize, availBSize);
|
||||
// create and init the child reflow state, using passed-in Maybe<>,
|
||||
// create and init the child reflow input, using passed-in Maybe<>,
|
||||
// so that caller can use it after we return.
|
||||
aChildRI.emplace(aPresContext, aOuterRI, aChildFrame, availSize, nullptr,
|
||||
ReflowInput::CALLER_WILL_INIT);
|
||||
|
|
|
@ -522,7 +522,7 @@ nscoord nsBoxFrame::GetMinISize(gfxContext* aRenderingContext) {
|
|||
nsSize minSize = GetXULMinSize(state);
|
||||
|
||||
// GetXULMinSize returns border-box width, and we want to return content
|
||||
// width. Since Reflow uses the reflow state's border and padding, we
|
||||
// width. Since Reflow uses the reflow input's border and padding, we
|
||||
// actually just want to subtract what GetXULMinSize added, which is the
|
||||
// result of GetXULBorderAndPadding.
|
||||
nsMargin bp;
|
||||
|
@ -543,7 +543,7 @@ nscoord nsBoxFrame::GetPrefISize(gfxContext* aRenderingContext) {
|
|||
nsSize prefSize = GetXULPrefSize(state);
|
||||
|
||||
// GetXULPrefSize returns border-box width, and we want to return content
|
||||
// width. Since Reflow uses the reflow state's border and padding, we
|
||||
// width. Since Reflow uses the reflow input's border and padding, we
|
||||
// actually just want to subtract what GetXULPrefSize added, which is the
|
||||
// result of GetXULBorderAndPadding.
|
||||
nsMargin bp;
|
||||
|
|
|
@ -58,7 +58,7 @@ class MOZ_STACK_CLASS nsBoxLayoutState {
|
|||
nsBoxLayoutState& mState;
|
||||
};
|
||||
|
||||
// The HTML reflow state that lives outside the box-block boundary.
|
||||
// The HTML reflow input that lives outside the box-block boundary.
|
||||
// May not be set reliably yet.
|
||||
const ReflowInput* OuterReflowInput() { return mOuterReflowInput; }
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ nscoord nsLeafBoxFrame::GetMinISize(gfxContext* aRenderingContext) {
|
|||
LogicalSize minSize(wm, GetXULMinSize(state));
|
||||
|
||||
// GetXULMinSize returns border-box size, and we want to return content
|
||||
// inline-size. Since Reflow uses the reflow state's border and padding, we
|
||||
// inline-size. Since Reflow uses the reflow input's border and padding, we
|
||||
// actually just want to subtract what GetXULMinSize added, which is the
|
||||
// result of GetXULBorderAndPadding.
|
||||
nsMargin bp;
|
||||
|
@ -128,7 +128,7 @@ nscoord nsLeafBoxFrame::GetPrefISize(gfxContext* aRenderingContext) {
|
|||
LogicalSize prefSize(wm, GetXULPrefSize(state));
|
||||
|
||||
// GetXULPrefSize returns border-box size, and we want to return content
|
||||
// inline-size. Since Reflow uses the reflow state's border and padding, we
|
||||
// inline-size. Since Reflow uses the reflow input's border and padding, we
|
||||
// actually just want to subtract what GetXULPrefSize added, which is the
|
||||
// result of GetXULBorderAndPadding.
|
||||
nsMargin bp;
|
||||
|
@ -249,7 +249,7 @@ void nsLeafBoxFrame::Reflow(nsPresContext* aPresContext,
|
|||
computedSize.height += m.top + m.bottom;
|
||||
}
|
||||
|
||||
// handle reflow state min and max sizes
|
||||
// handle reflow input min and max sizes
|
||||
// XXXbz the width handling here seems to be wrong, since
|
||||
// mComputedMin/MaxWidth is a content-box size, whole
|
||||
// computedSize.width is a border-box size...
|
||||
|
|
Загрузка…
Ссылка в новой задаче