--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -964,21 +964,21 @@ 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
// content, except for fieldsets where the inner anonymous frame has
// the correct padding area with the legend taken into account.
const nsHTMLReflowState* aLastRS = &aReflowState;
const nsHTMLReflowState* lastButOneRS = &aReflowState;
- while (aLastRS->parentReflowState &&
- aLastRS->parentReflowState->frame->GetContent() == frame->GetContent() &&
- aLastRS->parentReflowState->frame->GetType() != nsGkAtoms::fieldSetFrame) {
+ while (aLastRS->mParentReflowState &&
+ aLastRS->mParentReflowState->frame->GetContent() == frame->GetContent() &&
+ aLastRS->mParentReflowState->frame->GetType() != nsGkAtoms::fieldSetFrame) {
lastButOneRS = aLastRS;
- aLastRS = aLastRS->parentReflowState;
+ aLastRS = aLastRS->mParentReflowState;
}
if (aLastRS != &aReflowState) {
// Scrollbars need to be specifically excluded, if present, because they are outside the
// padding-edge. We need better APIs for getting the various boxes from a frame.
nsIScrollableFrame* scrollFrame = do_QueryFrame(aLastRS->frame);
nsMargin scrollbars(0,0,0,0);
if (scrollFrame) {
scrollbars =
@@ -1545,17 +1545,17 @@ nsBlockFrame::ComputeFinalSize(const nsH
nscoord floatHeight =
aState.ClearFloats(blockEndEdgeOfChildren, NS_STYLE_CLEAR_BOTH,
nullptr, nsFloatManager::DONT_CLEAR_PUSHED_FLOATS);
blockEndEdgeOfChildren = std::max(blockEndEdgeOfChildren, floatHeight);
}
if (NS_UNCONSTRAINEDSIZE != aReflowState.ComputedBSize()
&& (GetParent()->GetType() != nsGkAtoms::columnSetFrame ||
- aReflowState.parentReflowState->AvailableBSize() == NS_UNCONSTRAINEDSIZE)) {
+ aReflowState.mParentReflowState->AvailableBSize() == NS_UNCONSTRAINEDSIZE)) {
ComputeFinalBSize(aReflowState, &aState.mReflowStatus,
aState.mBCoord + nonCarriedOutBDirMargin,
borderPadding, finalSize, aState.mConsumedBSize);
if (!NS_FRAME_IS_COMPLETE(aState.mReflowStatus)) {
// Use the current height; continuations will take up the rest.
// Do extend the height to at least consume the available
// height, otherwise our left/right borders (for example) won't
// extend all the way to the break.
@@ -1951,18 +1951,18 @@ nsBlockFrame::PrepareResizeReflow(nsBloc
* doesn't get marked dirty and reflowed entirely).
*/
void
nsBlockFrame::PropagateFloatDamage(nsBlockReflowState& aState,
nsLineBox* aLine,
nscoord aDeltaBCoord)
{
nsFloatManager *floatManager = aState.mReflowState.mFloatManager;
- NS_ASSERTION((aState.mReflowState.parentReflowState &&
- aState.mReflowState.parentReflowState->mFloatManager == floatManager) ||
+ NS_ASSERTION((aState.mReflowState.mParentReflowState &&
+ aState.mReflowState.mParentReflowState->mFloatManager == floatManager) ||
aState.mReflowState.mBlockDelta == 0, "Bad block delta passed in");
// Check to see if there are any floats; if there aren't, there can't
// be any float damage
if (!floatManager->HasAnyFloats())
return;
// Check the damage region recorded in the float damage.
--- a/layout/generic/nsColumnSetFrame.cpp
+++ b/layout/generic/nsColumnSetFrame.cpp
@@ -231,18 +231,18 @@ nsColumnSetFrame::ChooseColumnStrategy(c
int32_t numColumns = colStyle->mColumnCount;
// If column-fill is set to 'balance', then we want to balance the columns.
const bool isBalancing = colStyle->mColumnFill == NS_STYLE_COLUMN_FILL_BALANCE
&& !aForceAuto;
if (isBalancing) {
const uint32_t MAX_NESTED_COLUMN_BALANCING = 2;
uint32_t cnt = 0;
- for (const nsHTMLReflowState* rs = aReflowState.parentReflowState;
- rs && cnt < MAX_NESTED_COLUMN_BALANCING; rs = rs->parentReflowState) {
+ for (const nsHTMLReflowState* rs = aReflowState.mParentReflowState;
+ rs && cnt < MAX_NESTED_COLUMN_BALANCING; rs = rs->mParentReflowState) {
if (rs->mFlags.mIsColumnBalancing) {
++cnt;
}
}
if (cnt == MAX_NESTED_COLUMN_BALANCING) {
numColumns = 1;
}
}
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -1512,17 +1512,17 @@ nsFlexContainerFrame::
// (e.g. using it as a contstraint when measuring our content in the
// main axis, or using it with the intrinsic ratio to obtain a main size).
// BEFORE WE DO THAT, we need let the item "pre-stretch" its cross size (if
// it's got 'align-self:stretch'), for a certain case where the spec says
// the stretched cross size is considered "definite". That case is if we
// have a single-line (nowrap) flex container which itself has a definite
// cross-size. Otherwise, we'll wait to do stretching, since (in other
// cases) we don't know how much the item should stretch yet.
- const nsHTMLReflowState* flexContainerRS = aItemReflowState.parentReflowState;
+ const nsHTMLReflowState* flexContainerRS = aItemReflowState.mParentReflowState;
MOZ_ASSERT(flexContainerRS,
"flex item's reflow state should have ptr to container's state");
if (NS_STYLE_FLEX_WRAP_NOWRAP == flexContainerRS->mStylePosition->mFlexWrap) {
// XXXdholbert Maybe this should share logic with ComputeCrossSize()...
// Alternately, maybe tentative container cross size should be passed down.
nscoord containerCrossSize =
GET_CROSS_COMPONENT_LOGICAL(aAxisTracker, aAxisTracker.GetWritingMode(),
flexContainerRS->ComputedISize(),
@@ -1700,17 +1700,17 @@ FlexItem::FlexItem(nsHTMLReflowState& aF
// mAlignSelf, see below
{
MOZ_ASSERT(mFrame, "expecting a non-null child frame");
MOZ_ASSERT(mFrame->GetType() != nsGkAtoms::placeholderFrame,
"placeholder frames should not be treated as flex items");
MOZ_ASSERT(!(mFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW),
"out-of-flow frames should not be treated as flex items");
- const nsHTMLReflowState* containerRS = aFlexItemReflowState.parentReflowState;
+ const nsHTMLReflowState* containerRS = aFlexItemReflowState.mParentReflowState;
if (IsLegacyBox(containerRS->mStyleDisplay,
containerRS->frame->StyleContext())) {
// For -webkit-box/-webkit-inline-box, we need to:
// (1) Use "-webkit-box-align" instead of "align-items" to determine the
// container's cross-axis alignment behavior.
// (2) Suppress the ability for flex items to override that with their own
// cross-axis alignment. (The legacy box model doesn't support this.)
// So, each FlexItem simply copies the container's converted "align-items"
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -10246,17 +10246,17 @@ void DR_State::FindMatchingRule(DR_Frame
}
DR_FrameTreeNode* DR_State::CreateTreeNode(nsIFrame* aFrame,
const nsHTMLReflowState* aReflowState)
{
// find the frame of the parent reflow state (usually just the parent of aFrame)
nsIFrame* parentFrame;
if (aReflowState) {
- const nsHTMLReflowState* parentRS = aReflowState->parentReflowState;
+ const nsHTMLReflowState* parentRS = aReflowState->mParentReflowState;
parentFrame = (parentRS) ? parentRS->frame : nullptr;
} else {
parentFrame = aFrame->GetParent();
}
// find the parent tree node leaf
DR_FrameTreeNode* parentNode = nullptr;
@@ -10621,17 +10621,17 @@ nsHTMLReflowState::DisplayInitConstraint
if (!DR_state->mInited) DR_state->Init();
if (!DR_state->mActive) return nullptr;
DR_FrameTreeNode* treeNode = DR_state->CreateTreeNode(aFrame, aState);
if (treeNode && treeNode->mDisplay) {
DR_state->DisplayFrameTypeInfo(aFrame, treeNode->mIndent);
printf("InitConstraints parent=%p",
- (void*)aState->parentReflowState);
+ (void*)aState->mParentReflowState);
char width[16];
char height[16];
DR_state->PrettyUC(aContainingBlockWidth, width, 16);
DR_state->PrettyUC(aContainingBlockHeight, height, 16);
printf(" cb=%s,%s", width, height);
--- a/layout/generic/nsHTMLReflowState.cpp
+++ b/layout/generic/nsHTMLReflowState.cpp
@@ -62,17 +62,17 @@ nsHTMLReflowState::nsHTMLReflowState(nsP
, mBlockDelta(0)
, mOrthogonalLimit(NS_UNCONSTRAINEDSIZE)
, mReflowDepth(0)
{
NS_PRECONDITION(aRenderingContext, "no rendering context");
MOZ_ASSERT(aPresContext, "no pres context");
MOZ_ASSERT(aFrame, "no frame");
MOZ_ASSERT(aPresContext == aFrame->PresContext(), "wrong pres context");
- parentReflowState = nullptr;
+ mParentReflowState = nullptr;
AvailableISize() = aAvailableSpace.ISize(mWritingMode);
AvailableBSize() = aAvailableSpace.BSize(mWritingMode);
mFloatManager = nullptr;
mLineLayout = nullptr;
memset(&mFlags, 0, sizeof(mFlags));
mDiscoveredClearance = nullptr;
mPercentBSizeObserver = nullptr;
@@ -186,23 +186,23 @@ nsHTMLReflowState::nsHTMLReflowState(
{
MOZ_ASSERT(aPresContext, "no pres context");
MOZ_ASSERT(aFrame, "no frame");
MOZ_ASSERT(aPresContext == aFrame->PresContext(), "wrong pres context");
NS_PRECONDITION(!mFlags.mSpecialBSizeReflow ||
!NS_SUBTREE_DIRTY(aFrame),
"frame should be clean when getting special bsize reflow");
- parentReflowState = &aParentReflowState;
+ mParentReflowState = &aParentReflowState;
// If the parent is dirty, then the child is as well.
// XXX Are the other cases where the parent reflows a child a second
// time, as a resize?
if (!mFlags.mSpecialBSizeReflow)
- frame->AddStateBits(parentReflowState->frame->GetStateBits() &
+ frame->AddStateBits(mParentReflowState->frame->GetStateBits() &
NS_FRAME_IS_DIRTY);
AvailableISize() = aAvailableSpace.ISize(mWritingMode);
AvailableBSize() = aAvailableSpace.BSize(mWritingMode);
if (mWritingMode.IsOrthogonalTo(aParentReflowState.GetWritingMode())) {
// If we're setting up for an orthogonal flow, and the parent reflow state
// had a constrained ComputedBSize, we can use that as our AvailableISize
@@ -233,17 +233,17 @@ nsHTMLReflowState::nsHTMLReflowState(
mFlags.mStaticPosIsCBOrigin = !!(aFlags & STATIC_POS_IS_CB_ORIGIN);
mDiscoveredClearance = nullptr;
mPercentBSizeObserver = (aParentReflowState.mPercentBSizeObserver &&
aParentReflowState.mPercentBSizeObserver->NeedsToObserve(*this))
? aParentReflowState.mPercentBSizeObserver : nullptr;
if ((aFlags & DUMMY_PARENT_REFLOW_STATE) ||
- (parentReflowState->mFlags.mDummyParentReflowState &&
+ (mParentReflowState->mFlags.mDummyParentReflowState &&
frame->GetType() == nsGkAtoms::tableFrame)) {
mFlags.mDummyParentReflowState = true;
}
if (!(aFlags & CALLER_WILL_INIT)) {
Init(aPresContext, aContainingBlockSize);
}
}
@@ -363,18 +363,18 @@ void
nsHTMLReflowState::Init(nsPresContext* aPresContext,
const LogicalSize* aContainingBlockSize,
const nsMargin* aBorder,
const nsMargin* aPadding)
{
if (AvailableISize() == NS_UNCONSTRAINEDSIZE) {
// Look up the parent chain for an orthogonal inline limit,
// and reset AvailableISize() if found.
- for (const nsHTMLReflowState *parent = parentReflowState;
- parent != nullptr; parent = parent->parentReflowState) {
+ for (const nsHTMLReflowState *parent = mParentReflowState;
+ parent != nullptr; parent = parent->mParentReflowState) {
if (parent->GetWritingMode().IsOrthogonalTo(mWritingMode) &&
parent->mOrthogonalLimit != NS_UNCONSTRAINEDSIZE) {
AvailableISize() = parent->mOrthogonalLimit;
break;
}
}
}
@@ -455,18 +455,18 @@ nsHTMLReflowState::Init(nsPresContext*
break;
}
}
} else {
frame->RemoveStateBits(NS_FRAME_IN_CONSTRAINED_BSIZE);
}
}
- if (parentReflowState &&
- parentReflowState->GetWritingMode().IsOrthogonalTo(mWritingMode)) {
+ if (mParentReflowState &&
+ mParentReflowState->GetWritingMode().IsOrthogonalTo(mWritingMode)) {
// Orthogonal frames are always reflowed with an unconstrained
// dimension to avoid incomplete reflow across an orthogonal
// boundary. Normally this is the block-size, but for column sets
// with auto-height it's the inline-size, so that they can add
// columns in the container's block direction
if (type == nsGkAtoms::columnSetFrame &&
eStyleUnit_Auto == mStylePosition->ISize(mWritingMode).GetUnit()) {
ComputedISize() = NS_UNCONSTRAINEDSIZE;
@@ -481,31 +481,31 @@ nsHTMLReflowState::Init(nsPresContext*
ComputedISize() != NS_UNCONSTRAINEDSIZE,
"have unconstrained inline-size; this should only "
"result from very large sizes, not attempts at "
"intrinsic inline-size calculation");
}
void nsHTMLReflowState::InitCBReflowState()
{
- if (!parentReflowState) {
+ if (!mParentReflowState) {
mCBReflowState = nullptr;
return;
}
- if (parentReflowState->frame == frame->GetContainingBlock()) {
+ if (mParentReflowState->frame == frame->GetContainingBlock()) {
// Inner table frames need to use the containing block of the outer
// table frame.
if (frame->GetType() == nsGkAtoms::tableFrame) {
- mCBReflowState = parentReflowState->mCBReflowState;
+ mCBReflowState = mParentReflowState->mCBReflowState;
} else {
- mCBReflowState = parentReflowState;
+ mCBReflowState = mParentReflowState;
}
} else {
- mCBReflowState = parentReflowState->mCBReflowState;
+ mCBReflowState = mParentReflowState->mCBReflowState;
}
}
/* Check whether CalcQuirkContainingBlockHeight would stop on the
* given reflow state, using its block as a height. (essentially
* returns false for any case in which CalcQuirkContainingBlockHeight
* has a "continue" in its main loop.)
*
@@ -727,17 +727,17 @@ nsHTMLReflowState::InitResizeFlags(nsPre
// reflow (a quirk that makes such percentage height work on children
// of table cells) can cause not just a single percentage height to
// become fixed, but an entire descendant chain of percentage height
// to become fixed.
if (dependsOnCBBSize && mCBReflowState) {
const nsHTMLReflowState *rs = this;
bool hitCBReflowState = false;
do {
- rs = rs->parentReflowState;
+ rs = rs->mParentReflowState;
if (!rs) {
break;
}
if (rs->frame->GetStateBits() & NS_FRAME_CONTAINS_RELATIVE_BSIZE)
break; // no need to go further
rs->frame->AddStateBits(NS_FRAME_CONTAINS_RELATIVE_BSIZE);
@@ -1048,18 +1048,18 @@ nsHTMLReflowState::GetHypotheticalBoxCon
NS_ASSERTION(aFrame != frame, "How did that happen?");
/* Now aFrame is the containing block we want */
/* Check whether the containing block is currently being reflowed.
If so, use the info from the reflow state. */
const nsHTMLReflowState* state;
if (aFrame->GetStateBits() & NS_FRAME_IN_REFLOW) {
- for (state = parentReflowState; state && state->frame != aFrame;
- state = state->parentReflowState) {
+ for (state = mParentReflowState; state && state->frame != aFrame;
+ state = state->mParentReflowState) {
/* do nothing */
}
} else {
state = nullptr;
}
if (state) {
WritingMode wm = state->GetWritingMode();
@@ -1903,17 +1903,17 @@ CalcQuirkContainingBlockHeight(const nsH
const nsHTMLReflowState* secondAncestorRS = nullptr; // a candidate for body frame
// initialize the default to NS_AUTOHEIGHT as this is the containings block
// computed height when this function is called. It is possible that we
// don't alter this height especially if we are restricted to one level
nscoord result = NS_AUTOHEIGHT;
const nsHTMLReflowState* rs = aCBReflowState;
- for (; rs; rs = rs->parentReflowState) {
+ for (; rs; rs = rs->mParentReflowState) {
nsIAtom* frameType = rs->frame->GetType();
// if the ancestor is auto height then skip it and continue up if it
// is the first block frame and possibly the body/html
if (nsGkAtoms::blockFrame == frameType ||
#ifdef MOZ_XUL
nsGkAtoms::XULLabelFrame == frameType ||
#endif
nsGkAtoms::scrollFrame == frameType) {
@@ -1977,19 +1977,19 @@ CalcQuirkContainingBlockHeight(const nsH
"Second ancestor is not BODY");
}
}
#endif
}
// if we got to the html frame (a block child of the canvas) ...
else if (nsGkAtoms::blockFrame == frameType &&
- rs->parentReflowState &&
+ rs->mParentReflowState &&
nsGkAtoms::canvasFrame ==
- rs->parentReflowState->frame->GetType()) {
+ rs->mParentReflowState->frame->GetType()) {
// ... then subtract out margin/border/padding for the BODY element
result -= GetBlockMarginBorderPadding(secondAncestorRS);
}
break;
}
// Make sure not to return a negative height here!
return std::max(result, 0);
@@ -2118,17 +2118,17 @@ nsHTMLReflowState::InitConstraints(nsPre
WritingMode wm = GetWritingMode();
DISPLAY_INIT_CONSTRAINTS(frame, this,
aContainingBlockSize.ISize(wm),
aContainingBlockSize.BSize(wm),
aBorder, aPadding);
// If this is a reflow root, then set the computed width and
// height equal to the available space
- if (nullptr == parentReflowState || mFlags.mDummyParentReflowState) {
+ if (nullptr == mParentReflowState || mFlags.mDummyParentReflowState) {
// XXXldb This doesn't mean what it used to!
InitOffsets(wm, OffsetPercentBasis(frame, wm, aContainingBlockSize),
aFrameType, aBorder, aPadding);
// Override mComputedMargin since reflow roots start from the
// frame's boundary, which is inside the margin.
ComputedPhysicalMargin().SizeTo(0, 0, 0, 0);
ComputedPhysicalOffsets().SizeTo(0, 0, 0, 0);
@@ -2162,17 +2162,17 @@ nsHTMLReflowState::InitConstraints(nsPre
// See if the containing block height is based on the size of its
// content
nsIAtom* fType;
if (NS_AUTOHEIGHT == cbSize.BSize(wm)) {
// See if the containing block is a cell frame which needs
// to use the mComputedHeight of the cell instead of what the cell block passed in.
// XXX It seems like this could lead to bugs with min-height and friends
- if (cbrs->parentReflowState) {
+ if (cbrs->mParentReflowState) {
fType = cbrs->frame->GetType();
if (IS_TABLE_CELL(fType)) {
// use the cell's computed block size
cbSize.BSize(wm) = cbrs->ComputedSize(wm).BSize(wm);
}
}
}
@@ -2609,23 +2609,23 @@ nsHTMLReflowState::CalculateBlockSideMar
const nsStyleSides& styleSides = mStyleMargin->mMargin;
bool isAutoStartMargin = eStyleUnit_Auto == styleSides.GetIStartUnit(cbWM);
bool isAutoEndMargin = eStyleUnit_Auto == styleSides.GetIEndUnit(cbWM);
if (!isAutoStartMargin && !isAutoEndMargin) {
// Neither margin is 'auto' so we're over constrained. Use the
// 'direction' property of the parent to tell which margin to
// ignore
// First check if there is an HTML alignment that we should honor
- const nsHTMLReflowState* prs = parentReflowState;
+ const nsHTMLReflowState* prs = mParentReflowState;
if (aFrameType == nsGkAtoms::tableFrame) {
NS_ASSERTION(prs->frame->GetType() == nsGkAtoms::tableOuterFrame,
"table not inside outer table");
// Center the table within the outer table based on the alignment
// of the outer table's parent.
- prs = prs->parentReflowState;
+ prs = prs->mParentReflowState;
}
if (prs &&
(prs->mStyleText->mTextAlign == NS_STYLE_TEXT_ALIGN_MOZ_LEFT ||
prs->mStyleText->mTextAlign == NS_STYLE_TEXT_ALIGN_MOZ_CENTER ||
prs->mStyleText->mTextAlign == NS_STYLE_TEXT_ALIGN_MOZ_RIGHT)) {
if (prs->mWritingMode.IsBidiLTR()) {
isAutoStartMargin =
prs->mStyleText->mTextAlign != NS_STYLE_TEXT_ALIGN_MOZ_LEFT;
--- a/layout/generic/nsHTMLReflowState.h
+++ b/layout/generic/nsHTMLReflowState.h
@@ -264,17 +264,17 @@ protected:
* XXX Refactor so only a base class (nsSizingState?) is used for intrinsic
* size calculation.
*
* @see nsIFrame#Reflow()
*/
struct nsHTMLReflowState : public nsCSSOffsetState {
// the reflow states are linked together. this is the pointer to the
// parent's reflow state
- const nsHTMLReflowState* parentReflowState;
+ const nsHTMLReflowState* mParentReflowState;
// pointer to the float manager associated with this area
nsFloatManager* mFloatManager;
// LineLayout object (only for inline reflow; set to nullptr otherwise)
nsLineLayout* mLineLayout;
// The appropriate reflow state for the containing block (for
--- a/layout/generic/nsRubyBaseContainerFrame.cpp
+++ b/layout/generic/nsRubyBaseContainerFrame.cpp
@@ -343,17 +343,17 @@ nsRubyBaseContainerFrame::Reflow(nsPresC
bool hasSpan = false;
for (uint32_t i = 0; i < rtcCount; i++) {
nsRubyTextContainerFrame* textContainer = textContainers[i];
if (textContainer->IsSpanContainer()) {
hasSpan = true;
}
nsHTMLReflowState* reflowState = new nsHTMLReflowState(
- aPresContext, *aReflowState.parentReflowState, textContainer,
+ aPresContext, *aReflowState.mParentReflowState, textContainer,
availSize.ConvertTo(textContainer->GetWritingMode(), lineWM));
reflowStates.AppendElement(reflowState);
nsLineLayout* lineLayout = new nsLineLayout(aPresContext,
reflowState->mFloatManager,
reflowState, nullptr,
aReflowState.mLineLayout);
lineLayout->SetSuppressLineWrap(true);
lineLayouts.AppendElement(lineLayout);
--- a/layout/svg/nsSVGForeignObjectFrame.cpp
+++ b/layout/svg/nsSVGForeignObjectFrame.cpp
@@ -136,17 +136,17 @@ nsSVGForeignObjectFrame::Reflow(nsPresCo
// this assertion, then we should get the presShell to skip reflow roots
// that have a dirty parent since a reflow is going to come via the
// reflow root's parent anyway.
NS_ASSERTION(!(GetStateBits() & NS_FRAME_IS_DIRTY),
"Reflowing while a resize is pending is wasteful");
// ReflowSVG makes sure mRect is up to date before we're called.
- NS_ASSERTION(!aReflowState.parentReflowState,
+ NS_ASSERTION(!aReflowState.mParentReflowState,
"should only get reflow from being reflow root");
NS_ASSERTION(aReflowState.ComputedWidth() == GetSize().width &&
aReflowState.ComputedHeight() == GetSize().height,
"reflow roots should be reflowed at existing size and "
"svg.css should ensure we have no padding/border/margin");
DoReflow();
--- a/layout/tables/nsTableCellFrame.cpp
+++ b/layout/tables/nsTableCellFrame.cpp
@@ -128,44 +128,44 @@ nsTableCellFrame::NotifyPercentBSize(con
// is the inner cell frame.
// We'll only honor the percent bsize if sibling-cells/ancestors
// have specified/pct bsize. (Also, siblings only count for this if
// both this cell and the sibling cell span exactly 1 row.)
if (nsTableFrame::AncestorsHaveStyleBSize(*cellRS) ||
(GetTableFrame()->GetEffectiveRowSpan(*this) == 1 &&
- cellRS->parentReflowState->frame->
+ cellRS->mParentReflowState->frame->
HasAnyStateBits(NS_ROW_HAS_CELL_WITH_STYLE_BSIZE))) {
- for (const nsHTMLReflowState *rs = aReflowState.parentReflowState;
+ for (const nsHTMLReflowState *rs = aReflowState.mParentReflowState;
rs != cellRS;
- rs = rs->parentReflowState) {
+ rs = rs->mParentReflowState) {
rs->frame->AddStateBits(NS_FRAME_CONTAINS_RELATIVE_BSIZE);
}
nsTableFrame::RequestSpecialBSizeReflow(*cellRS);
}
}
}
// The cell needs to observe its block and things inside its block but nothing below that
bool
nsTableCellFrame::NeedsToObserve(const nsHTMLReflowState& aReflowState)
{
- const nsHTMLReflowState *rs = aReflowState.parentReflowState;
+ const nsHTMLReflowState *rs = aReflowState.mParentReflowState;
if (!rs)
return false;
if (rs->frame == this) {
// We always observe the child block. It will never send any
// notifications, but we need this so that the observer gets
// propagated to its kids.
return true;
}
- rs = rs->parentReflowState;
+ rs = rs->mParentReflowState;
if (!rs) {
return false;
}
// We always need to let the percent bsize observer be propagated
// from an outer table frame to an inner table frame.
nsIAtom *fType = aReflowState.frame->GetType();
if (fType == nsGkAtoms::tableFrame) {
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -1671,17 +1671,17 @@ nsTableFrame::ComputeAutoSize(nsRenderin
// Return true if aParentReflowState.frame or any of its ancestors within
// the containing table have non-auto bsize. (e.g. pct or fixed bsize)
bool
nsTableFrame::AncestorsHaveStyleBSize(const nsHTMLReflowState& aParentReflowState)
{
WritingMode wm = aParentReflowState.GetWritingMode();
for (const nsHTMLReflowState* rs = &aParentReflowState;
- rs && rs->frame; rs = rs->parentReflowState) {
+ rs && rs->frame; rs = rs->mParentReflowState) {
nsIAtom* frameType = rs->frame->GetType();
if (IS_TABLE_CELL(frameType) ||
(nsGkAtoms::tableRowFrame == frameType) ||
(nsGkAtoms::tableRowGroupFrame == frameType)) {
const nsStyleCoord &bsize = rs->mStylePosition->BSize(wm);
// calc() with percentages treated like 'auto' on internal table elements
if (bsize.GetUnit() != eStyleUnit_Auto &&
(!bsize.IsCalcUnit() || !bsize.HasPercent())) {
@@ -1706,31 +1706,31 @@ nsTableFrame::CheckRequestSpecialBSizeRe
aReflowState.frame->GetType() == nsGkAtoms::tableRowGroupFrame ||
aReflowState.frame->GetType() == nsGkAtoms::tableFrame,
"unexpected frame type");
WritingMode wm = aReflowState.GetWritingMode();
if (!aReflowState.frame->GetPrevInFlow() && // 1st in flow
(NS_UNCONSTRAINEDSIZE == aReflowState.ComputedBSize() || // no computed bsize
0 == aReflowState.ComputedBSize()) &&
eStyleUnit_Percent == aReflowState.mStylePosition->BSize(wm).GetUnit() && // pct bsize
- nsTableFrame::AncestorsHaveStyleBSize(*aReflowState.parentReflowState)) {
+ nsTableFrame::AncestorsHaveStyleBSize(*aReflowState.mParentReflowState)) {
nsTableFrame::RequestSpecialBSizeReflow(aReflowState);
}
}
// Notify the frame and its ancestors (up to the containing table) that a special
// bsize reflow will occur. During a special bsize reflow, a table, row group,
// row, or cell returns the last size it was reflowed at. However, the table may
// change the bsize of row groups, rows, cells in DistributeBSizeToRows after.
// And the row group can change the bsize of rows, cells in CalculateRowBSizes.
void
nsTableFrame::RequestSpecialBSizeReflow(const nsHTMLReflowState& aReflowState)
{
// notify the frame and its ancestors of the special reflow, stopping at the containing table
- for (const nsHTMLReflowState* rs = &aReflowState; rs && rs->frame; rs = rs->parentReflowState) {
+ for (const nsHTMLReflowState* rs = &aReflowState; rs && rs->frame; rs = rs->mParentReflowState) {
nsIAtom* frameType = rs->frame->GetType();
NS_ASSERTION(IS_TABLE_CELL(frameType) ||
nsGkAtoms::tableRowFrame == frameType ||
nsGkAtoms::tableRowGroupFrame == frameType ||
nsGkAtoms::tableFrame == frameType,
"unexpected frame type");
rs->frame->AddStateBits(NS_FRAME_CONTAINS_RELATIVE_BSIZE);
@@ -2755,17 +2755,17 @@ nsTableFrame::InitChildReflowState(nsHTM
WritingMode wm = GetWritingMode();
LogicalMargin border = rgFrame->GetBCBorderWidth(wm);
collapseBorder = border.GetPhysicalMargin(wm);
pCollapseBorder = &collapseBorder;
}
aReflowState.Init(presContext, nullptr, pCollapseBorder, &padding);
NS_ASSERTION(!mBits.mResizedColumns ||
- !aReflowState.parentReflowState->mFlags.mSpecialBSizeReflow,
+ !aReflowState.mParentReflowState->mFlags.mSpecialBSizeReflow,
"should not resize columns on special bsize reflow");
if (mBits.mResizedColumns) {
aReflowState.SetIResize(true);
}
}
// Position and size aKidFrame and update our reflow state. The origin of
// aKidRect is relative to the upper-left origin of our frame
--- a/layout/tables/nsTableRowGroupFrame.cpp
+++ b/layout/tables/nsTableRowGroupFrame.cpp
@@ -1558,19 +1558,19 @@ nsTableRowGroupFrame::GetBSizeBasis(cons
int32_t startRowIndex = GetStartRowIndex();
if ((aReflowState.ComputedBSize() > 0) && (aReflowState.ComputedBSize() < NS_UNCONSTRAINEDSIZE)) {
nscoord cellSpacing = tableFrame->GetRowSpacing(startRowIndex,
std::max(startRowIndex,
startRowIndex + GetRowCount() - 1));
result = aReflowState.ComputedBSize() - cellSpacing;
}
else {
- const nsHTMLReflowState* parentRS = aReflowState.parentReflowState;
+ const nsHTMLReflowState* parentRS = aReflowState.mParentReflowState;
if (parentRS && (tableFrame != parentRS->frame)) {
- parentRS = parentRS->parentReflowState;
+ parentRS = parentRS->mParentReflowState;
}
if (parentRS && (tableFrame == parentRS->frame) &&
(parentRS->ComputedBSize() > 0) && (parentRS->ComputedBSize() < NS_UNCONSTRAINEDSIZE)) {
nscoord cellSpacing = tableFrame->GetRowSpacing(-1, tableFrame->GetRowCount());
result = parentRS->ComputedBSize() - cellSpacing;
}
}