Bug 1267462 part 8: Rename ReflowInput.mFlags.mIsFlexContainerMeasuringHeight with s/Height/BSize/, to match reality. r?mats
This patch doesn't change behavior; it's simply a rename.
I'm also fixing one mistyped mention of this variable in a comment in
nsFlexContainerFrame.cpp. (The comment had "Reflow" rather than "Height" in
its mention of this variable-name.)
MozReview-Commit-ID: KRW7FCVSlto
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -216,17 +216,17 @@ ReflowInput::ReflowInput(
// Note: mFlags was initialized as a copy of aParentReflowInput.mFlags up in
// this constructor's init list, so the only flags that we need to explicitly
// initialize here are those that may need a value other than our parent's.
mFlags.mNextInFlowUntouched = aParentReflowInput.mFlags.mNextInFlowUntouched &&
CheckNextInFlowParenthood(aFrame, aParentReflowInput.mFrame);
mFlags.mAssumingHScrollbar = mFlags.mAssumingVScrollbar = false;
mFlags.mIsColumnBalancing = false;
- mFlags.mIsFlexContainerMeasuringHeight = false;
+ mFlags.mIsFlexContainerMeasuringBSize = false;
mFlags.mDummyParentReflowInput = false;
mFlags.mShrinkWrap = !!(aFlags & COMPUTE_SIZE_SHRINK_WRAP);
mFlags.mUseAutoBSize = !!(aFlags & COMPUTE_SIZE_USE_AUTO_BSIZE);
mFlags.mStaticPosIsCBOrigin = !!(aFlags & STATIC_POS_IS_CB_ORIGIN);
mFlags.mIOffsetsNeedCSSAlign = mFlags.mBOffsetsNeedCSSAlign = false;
mFlags.mIClampMarginBoxMinSize = !!(aFlags & I_CLAMP_MARGIN_BOX_MIN_SIZE);
mFlags.mBClampMarginBoxMinSize = !!(aFlags & B_CLAMP_MARGIN_BOX_MIN_SIZE);
mFlags.mApplyAutoMinSize = !!(aFlags & I_APPLY_AUTO_MIN_SIZE);
@@ -2477,25 +2477,25 @@ ReflowInput::InitConstraints(nsPresConte
ComputeSizeFlags(computeSizeFlags | ComputeSizeFlags::eShrinkWrap);
}
if (alignCB->IsFlexContainerFrame()) {
computeSizeFlags =
ComputeSizeFlags(computeSizeFlags | ComputeSizeFlags::eShrinkWrap);
// If we're inside of a flex container that needs to measure our
- // auto height, pass that information along to ComputeSize().
- if (mFlags.mIsFlexContainerMeasuringHeight) {
+ // auto BSize, pass that information along to ComputeSize().
+ if (mFlags.mIsFlexContainerMeasuringBSize) {
computeSizeFlags =
ComputeSizeFlags(computeSizeFlags | ComputeSizeFlags::eUseAutoBSize);
}
} else {
- MOZ_ASSERT(!mFlags.mIsFlexContainerMeasuringHeight,
+ MOZ_ASSERT(!mFlags.mIsFlexContainerMeasuringBSize,
"We're not in a flex container, so the flag "
- "'mIsFlexContainerMeasuringHeight' shouldn't be set");
+ "'mIsFlexContainerMeasuringBSize' shouldn't be set");
}
}
if (cbSize.ISize(wm) == NS_UNCONSTRAINEDSIZE) {
// For orthogonal flows, where we found a parent orthogonal-limit
// for AvailableISize() in Init(), we'll use the same here as well.
cbSize.ISize(wm) = AvailableISize();
}
@@ -3052,17 +3052,17 @@ ReflowInput::ComputeMinMaxValues(const L
// NOTE: min-height:auto resolves to 0, except on a flex item. (But
// even there, it's supposed to be ignored (i.e. treated as 0) until
// the flex container explicitly resolves & considers it.)
if (eStyleUnit_Auto == minBSize.GetUnit() ||
(NS_AUTOHEIGHT == aCBSize.BSize(wm) &&
minBSize.HasPercent()) ||
(mFrameType == NS_CSS_FRAME_TYPE_INTERNAL_TABLE &&
minBSize.IsCalcUnit() && minBSize.CalcHasPercent()) ||
- mFlags.mIsFlexContainerMeasuringHeight) {
+ mFlags.mIsFlexContainerMeasuringBSize) {
ComputedMinBSize() = 0;
} else {
ComputedMinBSize() = ComputeBSizeValue(aCBSize.BSize(wm),
mStylePosition->mBoxSizing,
minBSize);
}
nsStyleUnit maxBSizeUnit = maxBSize.GetUnit();
if (eStyleUnit_None == maxBSizeUnit) {
@@ -3074,17 +3074,17 @@ ReflowInput::ComputeMinMaxValues(const L
// Likewise, check for calc() with percentages on internal table elements;
// that's treated as 'auto' too.
// Likewise, if we're a child of a flex container who's measuring our
// intrinsic height, then we want to disregard our max-height.
if ((NS_AUTOHEIGHT == aCBSize.BSize(wm) &&
maxBSize.HasPercent()) ||
(mFrameType == NS_CSS_FRAME_TYPE_INTERNAL_TABLE &&
maxBSize.IsCalcUnit() && maxBSize.CalcHasPercent()) ||
- mFlags.mIsFlexContainerMeasuringHeight) {
+ mFlags.mIsFlexContainerMeasuringBSize) {
ComputedMaxBSize() = NS_UNCONSTRAINEDSIZE;
} else {
ComputedMaxBSize() = ComputeBSizeValue(aCBSize.BSize(wm),
mStylePosition->mBoxSizing,
maxBSize);
}
}
--- a/layout/generic/ReflowInput.h
+++ b/layout/generic/ReflowInput.h
@@ -200,19 +200,19 @@ public:
// (potentially) in a context where
// percent block-sizes have a different
// basis?
bool mTableIsSplittable : 1; // tables are splittable, this should happen only inside a page
// and never insider a column frame
bool mHeightDependsOnAncestorCell : 1; // Does frame height depend on
// an ancestor table-cell?
bool mIsColumnBalancing : 1; // nsColumnSetFrame is balancing columns
- bool mIsFlexContainerMeasuringHeight : 1; // nsFlexContainerFrame is
- // reflowing this child to
- // measure its intrinsic height.
+ bool mIsFlexContainerMeasuringBSize : 1; // nsFlexContainerFrame is
+ // reflowing this child to
+ // measure its intrinsic BSize.
bool mDummyParentReflowInput : 1; // a "fake" reflow state made
// in order to be the parent
// of a real one
bool mMustReflowPlaceholders : 1; // Should this frame reflow its place-
// holder children? If the available
// height of this frame didn't change,
// but its in a paginated environment
// (e.g. columns), it should always
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -1655,17 +1655,17 @@ nsFlexContainerFrame::
* for checking that the reflow input is valid, and the height and the ascent
* to be used. This can be extended later if needed.
*
* The assumption here is that a given flex item measurement won't change until
* either the available size or computed height changes, or the flex container
* intrinsic size is marked as dirty (due to a style or DOM change).
*
* In particular the computed height may change between measuring reflows due to
- * how the mIsFlexContainerMeasuringReflow flag affects size computation (see
+ * how the mIsFlexContainerMeasuringBSize flag affects size computation (see
* bug 1336708).
*
* Caching it prevents us from doing exponential reflows in cases of deeply
* nested flex and scroll frames.
*
* We store them in the frame property table for simplicity.
*/
class nsFlexContainerFrame::CachedMeasuringReflowResult
@@ -1760,18 +1760,17 @@ nsFlexContainerFrame::
// Set up a reflow state for measuring the flex item's auto-height:
WritingMode wm = aFlexItem.Frame()->GetWritingMode();
LogicalSize availSize = aParentReflowInput.ComputedSize(wm);
availSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
ReflowInput
childRIForMeasuringBSize(aPresContext, aParentReflowInput,
aFlexItem.Frame(), availSize,
nullptr, ReflowInput::CALLER_WILL_INIT);
- // XXXdholbert NOTE: Next patch will do s/Height/BSize/ on this flag:
- childRIForMeasuringBSize.mFlags.mIsFlexContainerMeasuringHeight = true;
+ childRIForMeasuringBSize.mFlags.mIsFlexContainerMeasuringBSize = true;
childRIForMeasuringBSize.Init(aPresContext);
if (aFlexItem.IsStretched()) {
childRIForMeasuringBSize.SetComputedISize(aFlexItem.GetCrossSize());
childRIForMeasuringBSize.SetIResize(true);
}
if (aForceBResizeForMeasuringReflow) {