Bug 1277129 Part 6b - Rename rendContext to mRenderingContext in SizeComputationInput. draft
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 21 Jul 2016 12:58:29 +0800
changeset 390456 79160785fb5c07a7265102a7a992426e92c825fc
parent 390455 98d6286c2cdbb033faec0a5c61dcfc0ca975e31d
child 390457 c39519c4f0f96737e0164c106b58b5e6f68ee1de
push id23670
push usertlin@mozilla.com
push dateThu, 21 Jul 2016 05:05:21 +0000
bugs1277129
milestone50.0a1
Bug 1277129 Part 6b - Rename rendContext to mRenderingContext in SizeComputationInput. MozReview-Commit-ID: EvQcvDeAnMD
layout/forms/nsComboboxControlFrame.cpp
layout/forms/nsFieldSetFrame.cpp
layout/forms/nsHTMLButtonControlFrame.cpp
layout/generic/BlockReflowInput.cpp
layout/generic/ReflowInput.cpp
layout/generic/ReflowInput.h
layout/generic/nsBlockFrame.cpp
layout/generic/nsBulletFrame.cpp
layout/generic/nsFlexContainerFrame.cpp
layout/generic/nsGfxScrollFrame.cpp
layout/generic/nsGridContainerFrame.cpp
layout/generic/nsLineLayout.cpp
layout/generic/nsRubyBaseContainerFrame.cpp
layout/generic/nsTextFrame.cpp
layout/generic/nsVideoFrame.cpp
layout/mathml/nsMathMLContainerFrame.cpp
layout/mathml/nsMathMLSelectedFrame.cpp
layout/mathml/nsMathMLTokenFrame.cpp
layout/mathml/nsMathMLmfencedFrame.cpp
layout/mathml/nsMathMLmrootFrame.cpp
layout/mathml/nsMathMLmtableFrame.cpp
layout/tables/BasicTableLayoutStrategy.cpp
layout/tables/FixedTableLayoutStrategy.cpp
layout/tables/nsTableFrame.cpp
layout/xul/nsBoxFrame.cpp
layout/xul/nsLeafBoxFrame.cpp
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -865,17 +865,17 @@ nsComboboxControlFrame::Reflow(nsPresCon
   if ((IsThemed(disp) && !aPresContext->GetTheme()->ThemeNeedsComboboxDropmarker()) ||
       StyleDisplay()->mAppearance == NS_THEME_NONE) {
     buttonISize = 0;
   }
   else {
     nsIScrollableFrame* scrollable = do_QueryFrame(mListControlFrame);
     NS_ASSERTION(scrollable, "List must be a scrollable frame");
     buttonISize = scrollable->GetNondisappearingScrollbarWidth(
-      PresContext(), aReflowState.rendContext, wm);
+      PresContext(), aReflowState.mRenderingContext, wm);
     if (buttonISize > aReflowState.ComputedISize()) {
       buttonISize = 0;
     }
   }
 
   mDisplayISize = aReflowState.ComputedISize() - buttonISize;
 
   nsBlockFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
--- a/layout/forms/nsFieldSetFrame.cpp
+++ b/layout/forms/nsFieldSetFrame.cpp
@@ -424,23 +424,23 @@ nsFieldSetFrame::Reflow(nsPresContext*  
   WritingMode wm = GetWritingMode();
   WritingMode innerWM = inner ? inner->GetWritingMode() : wm;
   WritingMode legendWM = legend ? legend->GetWritingMode() : wm;
   LogicalSize innerAvailSize = aReflowState.ComputedSizeWithPadding(innerWM);
   LogicalSize legendAvailSize = aReflowState.ComputedSizeWithPadding(legendWM);
   innerAvailSize.BSize(innerWM) = legendAvailSize.BSize(legendWM) =
     NS_UNCONSTRAINEDSIZE;
   NS_ASSERTION(!inner ||
-      nsLayoutUtils::IntrinsicForContainer(aReflowState.rendContext,
+      nsLayoutUtils::IntrinsicForContainer(aReflowState.mRenderingContext,
                                            inner,
                                            nsLayoutUtils::MIN_ISIZE) <=
                innerAvailSize.ISize(innerWM),
                "Bogus availSize.ISize; should be bigger");
   NS_ASSERTION(!legend ||
-      nsLayoutUtils::IntrinsicForContainer(aReflowState.rendContext,
+      nsLayoutUtils::IntrinsicForContainer(aReflowState.mRenderingContext,
                                            legend,
                                            nsLayoutUtils::MIN_ISIZE) <=
                legendAvailSize.ISize(legendWM),
                "Bogus availSize.ISize; should be bigger");
 
   // get our border and padding
   LogicalMargin border = aReflowState.ComputedLogicalBorderPadding() -
                          aReflowState.ComputedLogicalPadding();
--- a/layout/forms/nsHTMLButtonControlFrame.cpp
+++ b/layout/forms/nsHTMLButtonControlFrame.cpp
@@ -281,17 +281,17 @@ nsHTMLButtonControlFrame::ReflowButtonCo
     LogicalMargin(wm, mRenderer.GetAddedButtonBorderAndPadding());
 
   // See whether out availSize's inline-size is big enough.  If it's
   // smaller than our intrinsic min iSize, that means that the kid
   // wouldn't really fit.  In that case, we overflow into our internal
   // focuspadding (which other browsers don't have) so that there's a
   // little more space for it.
   // Note that GetMinISize includes the focusPadding.
-  nscoord IOverflow = GetMinISize(aButtonReflowState.rendContext) -
+  nscoord IOverflow = GetMinISize(aButtonReflowState.mRenderingContext) -
                       aButtonReflowState.ComputedISize();
   nscoord IFocusPadding = focusPadding.IStartEnd(wm);
   nscoord focusPaddingReduction = std::min(IFocusPadding,
                                            std::max(IOverflow, 0));
   if (focusPaddingReduction > 0) {
     nscoord startReduction = focusPadding.IStart(wm);
     if (focusPaddingReduction != IFocusPadding) {
       startReduction = NSToCoordRound(startReduction *
--- a/layout/generic/BlockReflowInput.cpp
+++ b/layout/generic/BlockReflowInput.cpp
@@ -176,17 +176,17 @@ BlockReflowInput::ComputeReplacedBlockOf
 
   nscoord iStartOffset, iEndOffset;
   if (aFloatAvailableSpace.ISize(wm) == mContentArea.ISize(wm)) {
     // We don't need to compute margins when there are no floats around.
     iStartOffset = 0;
     iEndOffset = 0;
   } else {
     LogicalMargin frameMargin(wm);
-    SizeComputationInput os(aFrame, mReflowState.rendContext,
+    SizeComputationInput os(aFrame, mReflowState.mRenderingContext,
                         wm, mContentArea.ISize(wm));
     frameMargin =
       os.ComputedLogicalMargin().ConvertTo(wm, aFrame->GetWritingMode());
 
     nscoord iStartFloatIOffset =
       aFloatAvailableSpace.IStart(wm) - mContentArea.IStart(wm);
     iStartOffset = std::max(iStartFloatIOffset, frameMargin.IStart(wm)) -
                    frameMargin.IStart(wm);
@@ -232,17 +232,17 @@ BlockReflowInput::ComputeBlockAvailSpace
   printf("CBAS frame=%p has floats %d\n",
          aFrame, aFloatAvailableSpace.mHasFloats);
 #endif
   WritingMode wm = mReflowState.GetWritingMode();
   aResult.BStart(wm) = mBCoord;
   aResult.BSize(wm) = GetFlag(BRS_UNCONSTRAINEDBSIZE)
     ? NS_UNCONSTRAINEDSIZE
     : 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
   // it off the page/column. Negative available height can confuse other code
   // and is nonsense in principle.
 
   // XXX Do we really want this condition to be this restrictive (i.e.,
   // more restrictive than it used to be)?  The |else| here is allowed
   // by the CSS spec, but only out of desperation given implementations,
   // and the behavior it leads to is quite undesirable (it can cause
@@ -681,17 +681,17 @@ FloatMarginISize(const ReflowInput& aCBR
                  nsIFrame *aFloat,
                  const SizeComputationInput& aFloatOffsetState)
 {
   AutoMaybeDisableFontInflation an(aFloat);
   WritingMode wm = aFloatOffsetState.GetWritingMode();
 
   LogicalSize floatSize =
     aFloat->ComputeSize(
-              aCBReflowState.rendContext,
+              aCBReflowState.mRenderingContext,
               wm,
               aCBReflowState.ComputedSize(wm),
               aFloatAvailableISize,
               aFloatOffsetState.ComputedLogicalMargin().Size(wm),
               aFloatOffsetState.ComputedLogicalBorderPadding().Size(wm) -
                 aFloatOffsetState.ComputedLogicalPadding().Size(wm),
               aFloatOffsetState.ComputedLogicalPadding().Size(wm),
               nsIFrame::ComputeSizeFlags::eShrinkWrap);
@@ -741,17 +741,17 @@ BlockReflowInput::FlowAndPlaceFloat(nsIF
     // Get the band of available space
   nsFlowAreaRect floatAvailableSpace = GetFloatAvailableSpace(mBCoord);
   LogicalRect adjustedAvailableSpace =
     mBlock->AdjustFloatAvailableSpace(*this, floatAvailableSpace.mRect, aFloat);
 
   NS_ASSERTION(aFloat->GetParent() == mBlock,
                "Float frame has wrong parent");
 
-  SizeComputationInput offsets(aFloat, mReflowState.rendContext,
+  SizeComputationInput offsets(aFloat, mReflowState.mRenderingContext,
                            wm, mReflowState.ComputedISize());
 
   nscoord floatMarginISize = FloatMarginISize(mReflowState,
                                               adjustedAvailableSpace.ISize(wm),
                                               aFloat, offsets);
 
   LogicalMargin floatMargin(wm); // computed margin
   LogicalMargin floatOffsets(wm);
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -150,17 +150,17 @@ FontSizeInflationListMarginAdjustment(co
 // well as the inline-size, since flex items and grid items resolve
 // block-direction percent margins and padding against the
 // containing-block block-size, rather than its inline-size.
 SizeComputationInput::SizeComputationInput(nsIFrame *aFrame,
                                    nsRenderingContext *aRenderingContext,
                                    WritingMode aContainingBlockWritingMode,
                                    nscoord aContainingBlockISize)
   : mFrame(aFrame)
-  , rendContext(aRenderingContext)
+  , mRenderingContext(aRenderingContext)
   , mWritingMode(aFrame->GetWritingMode())
 {
   MOZ_ASSERT(!aFrame->IsFlexOrGridItem(),
              "We're about to resolve percent margin & padding "
              "values against CB inline size, which is incorrect for "
              "flex/grid items. "
              "Additionally for grid items, this path doesn't handle baseline "
              "padding contribution - see SizeComputationInput::InitOffsets");
@@ -175,17 +175,17 @@ SizeComputationInput::SizeComputationInp
 // computed.
 ReflowInput::ReflowInput(
                      nsPresContext*           aPresContext,
                      const ReflowInput& aParentReflowState,
                      nsIFrame*                aFrame,
                      const LogicalSize&       aAvailableSpace,
                      const LogicalSize*       aContainingBlockSize,
                      uint32_t                 aFlags)
-  : SizeComputationInput(aFrame, aParentReflowState.rendContext)
+  : SizeComputationInput(aFrame, aParentReflowState.mRenderingContext)
   , mBlockDelta(0)
   , mOrthogonalLimit(NS_UNCONSTRAINEDSIZE)
   , mReflowDepth(aParentReflowState.mReflowDepth + 1)
   , mFlags(aParentReflowState.mFlags)
 {
   MOZ_ASSERT(aPresContext, "no pres context");
   MOZ_ASSERT(aFrame, "no frame");
   MOZ_ASSERT(aPresContext == aFrame->PresContext(), "wrong pres context");
@@ -251,17 +251,17 @@ ReflowInput::ReflowInput(
 }
 
 inline nscoord
 SizeComputationInput::ComputeISizeValue(nscoord aContainingBlockISize,
                                     nscoord aContentEdgeToBoxSizing,
                                     nscoord aBoxSizingToMarginEdge,
                                     const nsStyleCoord& aCoord) const
 {
-  return nsLayoutUtils::ComputeISizeValue(rendContext, mFrame,
+  return nsLayoutUtils::ComputeISizeValue(mRenderingContext, mFrame,
                                           aContainingBlockISize,
                                           aContentEdgeToBoxSizing,
                                           aBoxSizingToMarginEdge,
                                           aCoord);
 }
 
 nscoord
 SizeComputationInput::ComputeISizeValue(nscoord aContainingBlockISize,
@@ -1618,17 +1618,17 @@ ReflowInput::InitAbsoluteConstraints(nsP
     }
   }
 
   LogicalSize computedSize(wm);
   {
     AutoMaybeDisableFontInflation an(mFrame);
 
     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()?
                          ComputedLogicalMargin().Size(wm) +
                            ComputedLogicalOffsets().Size(wm),
                          ComputedLogicalBorderPadding().Size(wm) -
                            ComputedLogicalPadding().Size(wm),
                          ComputedLogicalPadding().Size(wm),
                          computeSizeFlags);
     ComputedISize() = computedSize.ISize(wm);
@@ -2361,17 +2361,17 @@ ReflowInput::InitConstraints(nsPresConte
 
       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();
       }
 
       LogicalSize size =
-        mFrame->ComputeSize(rendContext, wm, cbSize, AvailableISize(),
+        mFrame->ComputeSize(mRenderingContext, wm, cbSize, AvailableISize(),
                            ComputedLogicalMargin().Size(wm),
                            ComputedLogicalBorderPadding().Size(wm) -
                              ComputedLogicalPadding().Size(wm),
                            ComputedLogicalPadding().Size(wm),
                            computeSizeFlags);
 
       ComputedISize() = size.ISize(wm);
       ComputedBSize() = size.BSize(wm);
--- a/layout/generic/ReflowInput.h
+++ b/layout/generic/ReflowInput.h
@@ -101,18 +101,18 @@ namespace mozilla {
 struct SizeComputationInput {
 public:
   typedef mozilla::WritingMode WritingMode;
   typedef mozilla::LogicalMargin LogicalMargin;
 
   // The frame being reflowed.
   nsIFrame* mFrame;
 
-  // rendering context to use for measurement
-  nsRenderingContext* rendContext;
+  // Rendering context to use for measurement.
+  nsRenderingContext* mRenderingContext;
 
   const nsMargin& ComputedPhysicalMargin() const { return mComputedMargin; }
   const nsMargin& ComputedPhysicalBorderPadding() const { return mComputedBorderPadding; }
   const nsMargin& ComputedPhysicalPadding() const { return mComputedPadding; }
 
   // We may need to eliminate the (few) users of these writable-reference accessors
   // as part of migrating to logical coordinates.
   nsMargin& ComputedPhysicalMargin() { return mComputedMargin; }
@@ -161,17 +161,17 @@ protected:
 
   // Computed padding values
   nsMargin         mComputedPadding;
 
 public:
   // Callers using this constructor must call InitOffsets on their own.
   SizeComputationInput(nsIFrame *aFrame, nsRenderingContext *aRenderingContext)
     : mFrame(aFrame)
-    , rendContext(aRenderingContext)
+    , mRenderingContext(aRenderingContext)
     , mWritingMode(aFrame->GetWritingMode())
   {
   }
 
   SizeComputationInput(nsIFrame *aFrame, nsRenderingContext *aRenderingContext,
                    mozilla::WritingMode aContainingBlockWritingMode,
                    nscoord aContainingBlockISize);
 
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -979,17 +979,17 @@ CalculateContainingBlockSizeForAbsolutes
     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->mFrame);
       nsMargin scrollbars(0,0,0,0);
       if (scrollFrame) {
         scrollbars =
           scrollFrame->GetDesiredScrollbarSizes(aLastRS->mFrame->PresContext(),
-                                                aLastRS->rendContext);
+                                                aLastRS->mRenderingContext);
         if (!lastButOneRS->mFlags.mAssumingHScrollbar) {
           scrollbars.top = scrollbars.bottom = 0;
         }
         if (!lastButOneRS->mFlags.mAssumingVScrollbar) {
           scrollbars.left = scrollbars.right = 0;
         }
       }
       // We found a reflow state for the outermost wrapping frame, so use
@@ -7394,17 +7394,17 @@ nsBlockFrame::BlockCanIntersectFloats(ns
 /* static */
 nsBlockFrame::ReplacedElementISizeToClear
 nsBlockFrame::ISizeToClearPastFloats(const BlockReflowInput& aState,
                                      const LogicalRect& aFloatAvailableSpace,
                                      nsIFrame* aFrame)
 {
   nscoord inlineStartOffset, inlineEndOffset;
   WritingMode wm = aState.mReflowState.GetWritingMode();
-  SizeComputationInput offsetState(aFrame, aState.mReflowState.rendContext,
+  SizeComputationInput offsetState(aFrame, aState.mReflowState.mRenderingContext,
                                wm, aState.mContentArea.ISize(wm));
 
   ReplacedElementISizeToClear result;
   aState.ComputeReplacedBlockOffsetsForFloats(aFrame, aFloatAvailableSpace,
                                               inlineStartOffset,
                                               inlineEndOffset);
   nscoord availISize = aState.mContentArea.ISize(wm) -
                        inlineStartOffset - inlineEndOffset;
--- a/layout/generic/nsBulletFrame.cpp
+++ b/layout/generic/nsBulletFrame.cpp
@@ -637,17 +637,17 @@ nsBulletFrame::Reflow(nsPresContext* aPr
   MarkInReflow();
   DO_GLOBAL_REFLOW_COUNT("nsBulletFrame");
   DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
 
   float inflation = nsLayoutUtils::FontSizeInflationFor(this);
   SetFontSizeInflation(inflation);
 
   // Get the base size
-  GetDesiredSize(aPresContext, aReflowState.rendContext, aMetrics, inflation,
+  GetDesiredSize(aPresContext, aReflowState.mRenderingContext, aMetrics, inflation,
                  &mPadding);
 
   // Add in the border and padding; split the top/bottom between the
   // ascent and descent to make things look nice
   WritingMode wm = aReflowState.GetWritingMode();
   const LogicalMargin& bp = aReflowState.ComputedLogicalBorderPadding();
   mPadding.BStart(wm) += NSToCoordRound(bp.BStart(wm) * inflation);
   mPadding.IEnd(wm) += NSToCoordRound(bp.IEnd(wm) * inflation);
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -1563,17 +1563,17 @@ nsFlexContainerFrame::
     }
   }
 
   // Measure content, if needed (w/ intrinsic-width method or a reflow)
   if (minSizeNeedsToMeasureContent || flexBasisNeedsToMeasureContent) {
     if (aAxisTracker.IsMainAxisHorizontal()) {
       if (minSizeNeedsToMeasureContent) {
         nscoord frameMinISize =
-          aFlexItem.Frame()->GetMinISize(aItemReflowState.rendContext);
+          aFlexItem.Frame()->GetMinISize(aItemReflowState.mRenderingContext);
         resolvedMinSize = std::min(resolvedMinSize, frameMinISize);
       }
       NS_ASSERTION(!flexBasisNeedsToMeasureContent,
                    "flex-basis:auto should have been resolved in the "
                    "reflow state, for horizontal flexbox. It shouldn't need "
                    "special handling here");
     } else {
       // If this item is flexible (vertically), or if we're measuring the
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -226,17 +226,17 @@ struct MOZ_STACK_CLASS ScrollReflowInput
   // Whether we decided to show the vertical scrollbar
   bool mShowVScrollbar;
 
   ScrollReflowInput(nsIScrollableFrame* aFrame,
                     const ReflowInput& aState) :
     mReflowState(aState),
     // mBoxState is just used for scrollbars so we don't need to
     // worry about the reflow depth here
-    mBoxState(aState.mFrame->PresContext(), aState.rendContext, 0),
+    mBoxState(aState.mFrame->PresContext(), aState.mRenderingContext, 0),
     mStyles(aFrame->GetScrollbarStyles()) {
   }
 };
 
 } // namespace mozilla
 
 // XXXldb Can this go away?
 static nsSize ComputeInsideBorderSize(ScrollReflowInput* aState,
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -1667,17 +1667,17 @@ struct nsGridContainerFrame::SharedGridD
    */
   NS_DECLARE_FRAME_PROPERTY_DELETABLE(Prop, SharedGridData)
 };
 
 struct MOZ_STACK_CLASS nsGridContainerFrame::GridReflowState
 {
   GridReflowState(nsGridContainerFrame*    aFrame,
                   const ReflowInput& aRS)
-    : GridReflowState(aFrame, *aRS.rendContext, &aRS, aRS.mStylePosition,
+    : GridReflowState(aFrame, *aRS.mRenderingContext, &aRS, aRS.mStylePosition,
                       aRS.GetWritingMode())
   {}
   GridReflowState(nsGridContainerFrame* aFrame,
                   nsRenderingContext&   aRC)
     : GridReflowState(aFrame, aRC, nullptr, aFrame->StylePosition(),
                       aFrame->GetWritingMode())
   {}
 
--- a/layout/generic/nsLineLayout.cpp
+++ b/layout/generic/nsLineLayout.cpp
@@ -939,17 +939,17 @@ nsLineLayout::ReflowFrame(nsIFrame* aFra
     GetLastOptionalBreakPosition(&savedOptionalBreakOffset,
                                  &savedOptionalBreakPriority);
 
   if (!isText) {
     aFrame->Reflow(mPresContext, metrics, *reflowStateHolder, aReflowStatus);
   } else {
     static_cast<nsTextFrame*>(aFrame)->
       ReflowText(*this, availableSpaceOnLine,
-                 psd->mReflowState->rendContext->GetDrawTarget(),
+                 psd->mReflowState->mRenderingContext->GetDrawTarget(),
                  metrics, aReflowStatus);
   }
 
   pfd->mJustificationInfo = mJustificationInfo;
   mJustificationInfo = JustificationInfo();
 
   // See if the frame is a placeholderFrame and if it is process
   // the float. At the same time, check if the frame has any non-collapsed-away
@@ -2583,17 +2583,17 @@ nsLineLayout::TrimTrailingWhiteSpaceIn(P
       *aDeltaISize = 0;
       return true;
     }
     else if (pfd->mIsTextFrame) {
       // Call TrimTrailingWhiteSpace even on empty textframes because they
       // might have a soft hyphen which should now appear, changing the frame's
       // width
       nsTextFrame::TrimOutput trimOutput = static_cast<nsTextFrame*>(pfd->mFrame)->
-          TrimTrailingWhiteSpace(mBlockReflowState->rendContext->GetDrawTarget());
+          TrimTrailingWhiteSpace(mBlockReflowState->mRenderingContext->GetDrawTarget());
 #ifdef NOISY_TRIM
       nsFrame::ListTag(stdout, psd->mFrame->mFrame);
       printf(": trim of ");
       nsFrame::ListTag(stdout, pfd->mFrame);
       printf(" returned %d\n", trimOutput.mDeltaWidth);
 #endif
 
       if (trimOutput.mChanged) {
--- a/layout/generic/nsRubyBaseContainerFrame.cpp
+++ b/layout/generic/nsRubyBaseContainerFrame.cpp
@@ -577,17 +577,17 @@ nsRubyBaseContainerFrame::ReflowOneColum
   const auto& textReflowStates = aReflowState.mTextReflowStates;
   nscoord istart = baseReflowState.mLineLayout->GetCurrentICoord();
 
   if (aColumn.mBaseFrame) {
     bool allowBreakBefore = aColumnIndex ?
       aReflowState.mAllowLineBreak : aReflowState.mAllowInitialLineBreak;
     if (allowBreakBefore) {
       gfxBreakPriority breakPriority = LineBreakBefore(
-        aColumn.mBaseFrame, baseReflowState.rendContext->GetDrawTarget(),
+        aColumn.mBaseFrame, baseReflowState.mRenderingContext->GetDrawTarget(),
         baseReflowState.mLineLayout->LineContainerFrame(),
         baseReflowState.mLineLayout->GetLine());
       if (breakPriority != gfxBreakPriority::eNoBreak) {
         gfxBreakPriority lastBreakPriority =
           baseReflowState.mLineLayout->LastOptionalBreakPriority();
         if (breakPriority >= lastBreakPriority) {
           // Either we have been overflow, or we are forced
           // to break here, do break before.
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -8662,17 +8662,17 @@ nsTextFrame::Reflow(nsPresContext*      
   // but not inside a cell. For now, just don't reflow.
   if (!aReflowState.mLineLayout) {
     ClearMetrics(aMetrics);
     aStatus = NS_FRAME_COMPLETE;
     return;
   }
 
   ReflowText(*aReflowState.mLineLayout, aReflowState.AvailableWidth(),
-             aReflowState.rendContext->GetDrawTarget(), aMetrics, aStatus);
+             aReflowState.mRenderingContext->GetDrawTarget(), aMetrics, aStatus);
 
   NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);
 }
 
 #ifdef ACCESSIBILITY
 /**
  * Notifies accessibility about text reflow. Used by nsTextFrame::ReflowText.
  */
--- a/layout/generic/nsVideoFrame.cpp
+++ b/layout/generic/nsVideoFrame.cpp
@@ -334,17 +334,17 @@ nsVideoFrame::Reflow(nsPresContext*     
       kidReflowState.SetComputedHeight(posterRenderRect.height);
       ReflowChild(imageFrame, aPresContext, kidDesiredSize, kidReflowState,
                   posterRenderRect.x, posterRenderRect.y, 0, aStatus);
       FinishReflowChild(imageFrame, aPresContext,
                         kidDesiredSize, &kidReflowState,
                         posterRenderRect.x, posterRenderRect.y, 0);
     } else if (child->GetContent() == mVideoControls) {
       // Reflow the video controls frame.
-      nsBoxLayoutState boxState(PresContext(), aReflowState.rendContext);
+      nsBoxLayoutState boxState(PresContext(), aReflowState.mRenderingContext);
       nsSize size = child->GetSize();
       nsBoxFrame::LayoutChildAt(boxState,
                                 child,
                                 nsRect(mBorderPadding.left,
                                        mBorderPadding.top,
                                        aReflowState.ComputedWidth(),
                                        aReflowState.ComputedHeight()));
       if (child->GetSize() != size) {
--- a/layout/mathml/nsMathMLContainerFrame.cpp
+++ b/layout/mathml/nsMathMLContainerFrame.cpp
@@ -852,17 +852,17 @@ nsMathMLContainerFrame::ReflowChild(nsIF
       // GetBaseline().  This is what nsFrame::GetBaseline() will do anyway.
       aDesiredSize.SetBlockStartAscent(aDesiredSize.BSize(wm));
     } else {
       aDesiredSize.SetBlockStartAscent(ascent);
     }
   }
   if (IsForeignChild(aChildFrame)) {
     // 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.rightBearing = r.XMost();
     aDesiredSize.mBoundingMetrics.ascent = aDesiredSize.BlockStartAscent() - r.y;
     aDesiredSize.mBoundingMetrics.descent = r.YMost() - aDesiredSize.BlockStartAscent();
     aDesiredSize.mBoundingMetrics.width = aDesiredSize.Width();
   }
 }
 
@@ -902,17 +902,17 @@ nsMathMLContainerFrame::Reflow(nsPresCon
 
   /////////////
   // If we are a container which is entitled to stretch its children, then we
   // ask our stretchy children to stretch themselves
 
   // The stretching of siblings of an embellished child is _deferred_ until
   // 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) &&
       (NS_MATHML_WILL_STRETCH_ALL_CHILDREN_VERTICALLY(mPresentationData.flags) ||
        NS_MATHML_WILL_STRETCH_ALL_CHILDREN_HORIZONTALLY(mPresentationData.flags))) {
 
     // get the stretchy direction
     nsStretchDirection stretchDir =
       NS_MATHML_WILL_STRETCH_ALL_CHILDREN_VERTICALLY(mPresentationData.flags) 
--- a/layout/mathml/nsMathMLSelectedFrame.cpp
+++ b/layout/mathml/nsMathMLSelectedFrame.cpp
@@ -152,17 +152,17 @@ nsMathMLSelectedFrame::Reflow(nsPresCont
     ReflowInput childReflowState(aPresContext, aReflowState,
                                        childFrame, availSize);
     ReflowChild(childFrame, aPresContext, aDesiredSize,
                 childReflowState, aStatus);
     SaveReflowAndBoundingMetricsFor(childFrame, aDesiredSize,
                                     aDesiredSize.mBoundingMetrics);
     mBoundingMetrics = aDesiredSize.mBoundingMetrics;
   }
-  FinalizeReflow(aReflowState.rendContext->GetDrawTarget(), aDesiredSize);
+  FinalizeReflow(aReflowState.mRenderingContext->GetDrawTarget(), aDesiredSize);
   NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
 }
 
 // Only place the selected child ...
 /* virtual */ nsresult
 nsMathMLSelectedFrame::Place(DrawTarget*          aDrawTarget,
                              bool                 aPlaceOrigin,
                              ReflowOutput& aDesiredSize)
--- a/layout/mathml/nsMathMLTokenFrame.cpp
+++ b/layout/mathml/nsMathMLTokenFrame.cpp
@@ -145,17 +145,17 @@ nsMathMLTokenFrame::Reflow(nsPresContext
     ReflowChild(childFrame, aPresContext, childDesiredSize,
                 childReflowState, aStatus);
     //NS_ASSERTION(NS_FRAME_IS_COMPLETE(aStatus), "bad status");
     SaveReflowAndBoundingMetricsFor(childFrame, childDesiredSize,
                                     childDesiredSize.mBoundingMetrics);
   }
 
   // place and size children
-  FinalizeReflow(aReflowState.rendContext->GetDrawTarget(), aDesiredSize);
+  FinalizeReflow(aReflowState.mRenderingContext->GetDrawTarget(), aDesiredSize);
 
   aStatus = NS_FRAME_COMPLETE;
   NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
 }
 
 // For token elements, mBoundingMetrics is computed at the ReflowToken
 // pass, it is not computed here because our children may be text frames
 // that do not implement the GetBoundingMetrics() interface.
--- a/layout/mathml/nsMathMLmfencedFrame.cpp
+++ b/layout/mathml/nsMathMLmfencedFrame.cpp
@@ -221,17 +221,17 @@ nsMathMLmfencedFrame::Reflow(nsPresConte
   aDesiredSize.mBoundingMetrics = nsBoundingMetrics();
 
   int32_t i;
   const nsStyleFont* font = StyleFont();
   float fontSizeInflation = nsLayoutUtils::FontSizeInflationFor(this);
   RefPtr<nsFontMetrics> fm =
     nsLayoutUtils::GetFontMetricsForFrame(this, fontSizeInflation);
   nscoord axisHeight, em;
-  GetAxisHeight(aReflowState.rendContext->GetDrawTarget(), fm, axisHeight);
+  GetAxisHeight(aReflowState.mRenderingContext->GetDrawTarget(), fm, axisHeight);
   GetEmHeight(fm, em);
   // leading to be left at the top and the bottom of stretched chars
   nscoord leading = NSToCoordRound(0.2f * em); 
 
   /////////////
   // Reflow children
   // Asking each child to cache its bounding metrics
 
@@ -281,17 +281,17 @@ nsMathMLmfencedFrame::Reflow(nsPresConte
   }
 
   /////////////
   // Ask stretchy children to stretch themselves
 
   nsBoundingMetrics containerSize;
   nsStretchDirection stretchDir = NS_STRETCH_DIRECTION_VERTICAL;
 
-  DrawTarget* drawTarget = aReflowState.rendContext->GetDrawTarget();
+  DrawTarget* drawTarget = aReflowState.mRenderingContext->GetDrawTarget();
 
   GetPreferredStretchSize(drawTarget,
                           0, /* i.e., without embellishments */
                           stretchDir, containerSize);
   childFrame = firstChild;
   while (childFrame) {
     nsIMathMLFrame* mathmlChild = do_QueryFrame(childFrame);
     if (mathmlChild) {
--- a/layout/mathml/nsMathMLmrootFrame.cpp
+++ b/layout/mathml/nsMathMLmrootFrame.cpp
@@ -167,17 +167,17 @@ nsMathMLmrootFrame::Reflow(nsPresContext
   MarkInReflow();
   nsReflowStatus childStatus;
 
   mPresentationData.flags &= ~NS_MATHML_ERROR;
   aDesiredSize.ClearSize();
   aDesiredSize.SetBlockStartAscent(0);
 
   nsBoundingMetrics bmSqr, bmBase, bmIndex;
-  DrawTarget* drawTarget = aReflowState.rendContext->GetDrawTarget();
+  DrawTarget* drawTarget = aReflowState.mRenderingContext->GetDrawTarget();
 
   //////////////////
   // Reflow Children
 
   int32_t count = 0;
   nsIFrame* baseFrame = nullptr;
   nsIFrame* indexFrame = nullptr;
   ReflowOutput baseSize(aReflowState);
--- a/layout/mathml/nsMathMLmtableFrame.cpp
+++ b/layout/mathml/nsMathMLmtableFrame.cpp
@@ -885,17 +885,17 @@ nsMathMLmtableWrapperFrame::Reflow(nsPre
       aDesiredSize.SetBlockStartAscent(dy + blockSize / 2);
       break;
     case eAlign_axis:
     default: {
       // XXX should instead use style data from the row of reference here ?
       RefPtr<nsFontMetrics> fm =
         nsLayoutUtils::GetInflatedFontMetricsForFrame(this);
       nscoord axisHeight;
-      GetAxisHeight(aReflowState.rendContext->GetDrawTarget(), fm, axisHeight);
+      GetAxisHeight(aReflowState.mRenderingContext->GetDrawTarget(), fm, axisHeight);
       if (rowFrame) {
         // anchor the table on the axis of the row of reference
         // XXX fallback to baseline because it is a hard problem
         // XXX need to fetch the axis of the row; would need rowalign=axis to work better
         nscoord rowAscent = ((nsTableRowFrame*)rowFrame)->GetMaxCellAscent();
         if (rowAscent) { // the row has at least one cell with 'vertical-align: baseline'
           aDesiredSize.SetBlockStartAscent(dy + rowAscent);
           break;
--- a/layout/tables/BasicTableLayoutStrategy.cpp
+++ b/layout/tables/BasicTableLayoutStrategy.cpp
@@ -532,17 +532,17 @@ BasicTableLayoutStrategy::ComputeColumnI
     NS_ASSERTION((mMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) ==
                  (mPrefISize == NS_INTRINSIC_WIDTH_UNKNOWN),
                  "dirtyness out of sync");
     NS_ASSERTION((mMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) ==
                  (mPrefISizePctExpand == NS_INTRINSIC_WIDTH_UNKNOWN),
                  "dirtyness out of sync");
     // XXX Is this needed?
     if (mMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
-        ComputeIntrinsicISizes(aReflowState.rendContext);
+        ComputeIntrinsicISizes(aReflowState.mRenderingContext);
     }
 
     nsTableCellMap *cellMap = mTableFrame->GetCellMap();
     int32_t colCount = cellMap->GetColCount();
     if (colCount <= 0)
         return; // nothing to do
 
     DistributeISizeToColumns(iSize, 0, colCount, BTLS_FINAL_ISIZE, false);
--- a/layout/tables/FixedTableLayoutStrategy.cpp
+++ b/layout/tables/FixedTableLayoutStrategy.cpp
@@ -208,17 +208,17 @@ FixedTableLayoutStrategy::ComputeColumnI
       NS_ERROR("column frames out of sync with cell map");
       continue;
     }
     oldColISizes.AppendElement(colFrame->GetFinalISize());
     colFrame->ResetPrefPercent();
     const nsStyleCoord *styleISize = &colFrame->StylePosition()->ISize(wm);
     nscoord colISize;
     if (styleISize->ConvertsToLength()) {
-      colISize = nsLayoutUtils::ComputeISizeValue(aReflowState.rendContext,
+      colISize = nsLayoutUtils::ComputeISizeValue(aReflowState.mRenderingContext,
                                                   colFrame, 0, 0, 0,
                                                   *styleISize);
       specTotal += colISize;
     } else if (styleISize->GetUnit() == eStyleUnit_Percent) {
       float pct = styleISize->GetPercentValue();
       colISize = NSToCoordFloor(pct * float(tableISize));
       colFrame->AddPrefPercent(pct);
       pctTotal += pct;
@@ -242,17 +242,17 @@ FixedTableLayoutStrategy::ComputeColumnI
              (styleISize->GetIntValue() == NS_STYLE_WIDTH_MAX_CONTENT ||
               styleISize->GetIntValue() == NS_STYLE_WIDTH_MIN_CONTENT))) {
           // XXX This should use real percentage padding
           // Note that the difference between MIN_ISIZE and PREF_ISIZE
           // shouldn't matter for any of these values of styleISize; use
           // MIN_ISIZE for symmetry with GetMinISize above, just in case
           // there is a difference.
           colISize =
-            nsLayoutUtils::IntrinsicForContainer(aReflowState.rendContext,
+            nsLayoutUtils::IntrinsicForContainer(aReflowState.mRenderingContext,
                                                  cellFrame,
                                                  nsLayoutUtils::MIN_ISIZE);
         } else if (styleISize->GetUnit() == eStyleUnit_Percent) {
           // XXX This should use real percentage padding
           float pct = styleISize->GetPercentValue();
           colISize = NSToCoordFloor(pct * float(tableISize));
 
           if (cellStylePos->mBoxSizing == StyleBoxSizing::Content) {
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -2014,17 +2014,17 @@ nsTableFrame::FixupPositionedTableParts(
     // 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
     // correct containing block.
     WritingMode wm = positionedPart->GetWritingMode();
     LogicalSize availSize(wm, size);
     availSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
     ReflowInput reflowState(aPresContext, positionedPart,
-                                  aReflowState.rendContext, availSize,
+                                  aReflowState.mRenderingContext, availSize,
                                   ReflowInput::DUMMY_PARENT_REFLOW_STATE);
     nsReflowStatus reflowStatus = NS_FRAME_COMPLETE;
 
     // Reflow absolutely-positioned descendants of the positioned part.
     // FIXME: Unconditionally using NS_UNCONSTRAINEDSIZE for the bsize and
     // ignoring any change to the reflow status aren't correct. We'll never
     // paginate absolutely positioned frames.
     nsFrame* positionedFrame = static_cast<nsFrame*>(positionedPart);
@@ -2087,17 +2087,17 @@ nsTableFrame::ReflowTable(ReflowOutput& 
   aDesiredSize.ISize(wm) = aReflowState.ComputedISize() +
                      aReflowState.ComputedLogicalBorderPadding().IStartEnd(wm);
   TableReflowInput reflowState(aReflowState,
                                  LogicalSize(wm, aDesiredSize.ISize(wm),
                                              aAvailBSize));
   ReflowChildren(reflowState, aStatus, aLastChildReflowed,
                  aDesiredSize.mOverflowAreas);
 
-  ReflowColGroups(aReflowState.rendContext);
+  ReflowColGroups(aReflowState.mRenderingContext);
 }
 
 nsIFrame*
 nsTableFrame::GetFirstBodyRowGroupFrame()
 {
   nsIFrame* headerFrame = nullptr;
   nsIFrame* footerFrame = nullptr;
 
--- a/layout/xul/nsBoxFrame.cpp
+++ b/layout/xul/nsBoxFrame.cpp
@@ -654,17 +654,17 @@ nsBoxFrame::Reflow(nsPresContext*       
 
   printf(" *\n");
 
 #endif
 
   aStatus = NS_FRAME_COMPLETE;
 
   // create the layout state
-  nsBoxLayoutState state(aPresContext, aReflowState.rendContext,
+  nsBoxLayoutState state(aPresContext, aReflowState.mRenderingContext,
                          &aReflowState, aReflowState.mReflowDepth);
 
   WritingMode wm = aReflowState.GetWritingMode();
   LogicalSize computedSize(wm, aReflowState.ComputedISize(),
                            aReflowState.ComputedBSize());
 
   LogicalMargin m = aReflowState.ComputedLogicalBorderPadding();
   // GetXULBorderAndPadding(m);
--- a/layout/xul/nsLeafBoxFrame.cpp
+++ b/layout/xul/nsLeafBoxFrame.cpp
@@ -233,17 +233,17 @@ nsLeafBoxFrame::Reflow(nsPresContext*   
 
   printf(" *\n");
 
 #endif
 
   aStatus = NS_FRAME_COMPLETE;
 
   // create the layout state
-  nsBoxLayoutState state(aPresContext, aReflowState.rendContext);
+  nsBoxLayoutState state(aPresContext, aReflowState.mRenderingContext);
 
   nsSize computedSize(aReflowState.ComputedWidth(),aReflowState.ComputedHeight());
 
   nsMargin m;
   m = aReflowState.ComputedPhysicalBorderPadding();
 
   //GetXULBorderAndPadding(m);