Bug 1548673 Part 1 - Rename NS_INTRINSIC_WIDTH_UNKNOWN to NS_INTRINSIC_ISIZE_UNKNOWN. r=jfkthame
authorTing-Yu Lin <tlin@mozilla.com>
Fri, 03 May 2019 17:34:36 +0000
changeset 531350 a3ddb4c1ce28569b398d3b0789aef50a11d412e5
parent 531349 b97e4935d9b9efc7b06bd0f539042038adb9209f
child 531351 2a7dcc0cc43d85811a6a06904094143dc499dc8d
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame
bugs1548673
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1548673 Part 1 - Rename NS_INTRINSIC_WIDTH_UNKNOWN to NS_INTRINSIC_ISIZE_UNKNOWN. r=jfkthame This patch is generated by running the following script under layout/, and then manually delete the FIXME comment in LayoutConstants.h #!/bin/bash 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 NS_INTRINSIC_WIDTH_UNKNOWN NS_INTRINSIC_ISIZE_UNKNOWN Differential Revision: https://phabricator.services.mozilla.com/D29746
layout/base/LayoutConstants.h
layout/base/nsLayoutUtils.cpp
layout/base/nsLayoutUtils.h
layout/forms/nsFileControlFrame.cpp
layout/forms/nsTextControlFrame.cpp
layout/forms/nsTextControlFrame.h
layout/generic/BRFrame.cpp
layout/generic/nsBlockFrame.cpp
layout/generic/nsBlockFrame.h
layout/generic/nsFlexContainerFrame.cpp
layout/generic/nsFlexContainerFrame.h
layout/generic/nsGridContainerFrame.cpp
layout/generic/nsGridContainerFrame.h
layout/generic/nsInlineFrame.h
layout/mathml/nsMathMLContainerFrame.cpp
layout/mathml/nsMathMLContainerFrame.h
layout/tables/BasicTableLayoutStrategy.cpp
layout/tables/FixedTableLayoutStrategy.cpp
--- a/layout/base/LayoutConstants.h
+++ b/layout/base/LayoutConstants.h
@@ -20,13 +20,11 @@
 //       namely NS_UNCONSTRAINEDSIZE.
 #define NS_INTRINSICSIZE NS_UNCONSTRAINEDSIZE
 #define NS_AUTOHEIGHT NS_UNCONSTRAINEDSIZE
 #define NS_AUTOOFFSET NS_UNCONSTRAINEDSIZE
 
 // +1 is to avoid clamped huge margin values being processed as auto margins
 #define NS_AUTOMARGIN (NS_UNCONSTRAINEDSIZE + 1)
 
-// FIXME The macro should go through a renaming refactoring to reflect the fact
-// that it means an inline size, not a width.
-#define NS_INTRINSIC_WIDTH_UNKNOWN nscoord_MIN
+#define NS_INTRINSIC_ISIZE_UNKNOWN nscoord_MIN
 
 #endif  // LayoutConstants_h___
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -5375,17 +5375,17 @@ nscoord nsLayoutUtils::IntrinsicForAxis(
       IntrinsicSize intrinsicSize = aFrame->GetIntrinsicSize();
       const auto& intrinsicBSize =
           horizontalAxis ? intrinsicSize.width : intrinsicSize.height;
       if (intrinsicBSize) {
         result = *intrinsicBSize;
       } else {
         // We don't have an intrinsic bsize and we need aFrame's block-dir size.
         if (aFlags & BAIL_IF_REFLOW_NEEDED) {
-          return NS_INTRINSIC_WIDTH_UNKNOWN;
+          return NS_INTRINSIC_ISIZE_UNKNOWN;
         }
         // XXX Unfortunately, we probably don't know this yet, so this is
         // wrong... but it's not clear what we should do. If aFrame's inline
         // size hasn't been determined yet, we can't necessarily figure out its
         // block size either. For now, authors who put orthogonal elements into
         // things like buttons or table cells may have to explicitly provide
         // sizes rather than expecting intrinsic sizing to work "perfectly" in
         // underspecified cases.
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -1453,17 +1453,17 @@ class nsLayoutUtils {
    * size by reducing the *content size* (flooring at zero).  This is used for:
    * https://drafts.csswg.org/css-grid/#min-size-auto
    */
   enum class IntrinsicISizeType { MinISize, PrefISize };
   static const auto MIN_ISIZE = IntrinsicISizeType::MinISize;
   static const auto PREF_ISIZE = IntrinsicISizeType::PrefISize;
   enum {
     IGNORE_PADDING = 0x01,
-    BAIL_IF_REFLOW_NEEDED = 0x02,  // returns NS_INTRINSIC_WIDTH_UNKNOWN if so
+    BAIL_IF_REFLOW_NEEDED = 0x02,  // returns NS_INTRINSIC_ISIZE_UNKNOWN if so
     MIN_INTRINSIC_ISIZE = 0x04,  // use min-width/height instead of width/height
   };
   static nscoord IntrinsicForAxis(
       mozilla::PhysicalAxis aAxis, gfxContext* aRenderingContext,
       nsIFrame* aFrame, IntrinsicISizeType aType,
       const mozilla::Maybe<LogicalSize>& aPercentageBasis = mozilla::Nothing(),
       uint32_t aFlags = 0, nscoord aMarginBoxMinSizeClamp = NS_MAXSIZE);
   /**
--- a/layout/forms/nsFileControlFrame.cpp
+++ b/layout/forms/nsFileControlFrame.cpp
@@ -170,18 +170,18 @@ void nsFileControlFrame::Reflow(nsPresCo
           contentISize - buttonFrame->ISize(wm) -
           buttonFrame->GetLogicalUsedMargin(wm).IStartEnd(wm);
       if (CropTextToWidth(*aReflowInput.mRenderingContext, labelFrame,
                           availableISizeForLabel - labelBP, filename)) {
         nsBlockFrame::DidReflow(aPresContext, &aReflowInput);
         aStatus.Reset();
         labelFrame->AddStateBits(NS_FRAME_IS_DIRTY |
                                  NS_BLOCK_NEEDS_BIDI_RESOLUTION);
-        mMinWidth = NS_INTRINSIC_WIDTH_UNKNOWN;
-        mPrefWidth = NS_INTRINSIC_WIDTH_UNKNOWN;
+        mMinWidth = NS_INTRINSIC_ISIZE_UNKNOWN;
+        mPrefWidth = NS_INTRINSIC_ISIZE_UNKNOWN;
         done = true;
         continue;
       }
     }
     break;
   }
 }
 
@@ -523,17 +523,17 @@ nscoord nsFileControlFrame::GetMinISize(
   return result;
 }
 
 nscoord nsFileControlFrame::GetPrefISize(gfxContext* aRenderingContext) {
   nscoord result;
   DISPLAY_MIN_INLINE_SIZE(this, result);
 
   // Make sure we measure with the uncropped filename.
-  if (mPrefWidth == NS_INTRINSIC_WIDTH_UNKNOWN) {
+  if (mPrefWidth == NS_INTRINSIC_ISIZE_UNKNOWN) {
     nsAutoString filename;
     HTMLInputElement::FromNode(mContent)->GetDisplayFileName(filename);
     UpdateDisplayedValue(filename, false);
   }
 
   result = nsBlockFrame::GetPrefISize(aRenderingContext);
   return result;
 }
--- a/layout/forms/nsTextControlFrame.cpp
+++ b/layout/forms/nsTextControlFrame.cpp
@@ -107,17 +107,17 @@ class nsTextControlFrame::nsAnonDivObser
  private:
   ~nsAnonDivObserver() {}
   nsTextControlFrame& mFrame;
 };
 
 nsTextControlFrame::nsTextControlFrame(ComputedStyle* aStyle,
                                        nsPresContext* aPresContext)
     : nsContainerFrame(aStyle, aPresContext, kClassID),
-      mFirstBaseline(NS_INTRINSIC_WIDTH_UNKNOWN),
+      mFirstBaseline(NS_INTRINSIC_ISIZE_UNKNOWN),
       mEditorHasBeenInitialized(false),
       mIsProcessing(false)
 #ifdef DEBUG
       ,
       mInEditorInitialization(false)
 #endif
 {
   ClearCachedValue();
--- a/layout/forms/nsTextControlFrame.h
+++ b/layout/forms/nsTextControlFrame.h
@@ -67,17 +67,17 @@ class nsTextControlFrame final : public 
   }
 
   bool GetNaturalBaselineBOffset(mozilla::WritingMode aWM,
                                  BaselineSharingGroup aBaselineGroup,
                                  nscoord* aBaseline) const override {
     if (!IsSingleLineTextControl()) {
       return false;
     }
-    NS_ASSERTION(mFirstBaseline != NS_INTRINSIC_WIDTH_UNKNOWN,
+    NS_ASSERTION(mFirstBaseline != NS_INTRINSIC_ISIZE_UNKNOWN,
                  "please call Reflow before asking for the baseline");
     if (aBaselineGroup == BaselineSharingGroup::First) {
       *aBaseline = mFirstBaseline;
     } else {
       *aBaseline = BSize(aWM) - mFirstBaseline;
     }
     return true;
   }
@@ -101,17 +101,17 @@ class nsTextControlFrame final : public 
     // and we really mean it.
     return nsContainerFrame::IsFrameOfType(
         aFlags & ~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
   }
 
 #ifdef DEBUG
   void MarkIntrinsicISizesDirty() override {
     // Need another Reflow to have a correct baseline value again.
-    mFirstBaseline = NS_INTRINSIC_WIDTH_UNKNOWN;
+    mFirstBaseline = NS_INTRINSIC_ISIZE_UNKNOWN;
   }
 #endif
 
   // nsIAnonymousContentCreator
   virtual nsresult CreateAnonymousContent(
       nsTArray<ContentInfo>& aElements) override;
   virtual void AppendAnonymousContentTo(nsTArray<nsIContent*>& aElements,
                                         uint32_t aFilter) override;
@@ -331,17 +331,17 @@ class nsTextControlFrame final : public 
   // If its IsVoid() returns true, it doesn't cache |.value|.
   // Otherwise, it's cached when setting specific value or getting value from
   // TextEditor.  Additionally, when contents in the anonymous <div> element
   // is modified, this is cleared.
   //
   // FIXME(bug 1402545): Consider using an nsAutoString here.
   nsString mCachedValue;
 
-  // Our first baseline, or NS_INTRINSIC_WIDTH_UNKNOWN if we have a pending
+  // Our first baseline, or NS_INTRINSIC_ISIZE_UNKNOWN if we have a pending
   // Reflow.
   nscoord mFirstBaseline;
 
   // these packed bools could instead use the high order bits on mState, saving
   // 4 bytes
   bool mEditorHasBeenInitialized;
   bool mIsProcessing;
 
--- a/layout/generic/BRFrame.cpp
+++ b/layout/generic/BRFrame.cpp
@@ -65,17 +65,17 @@ class BRFrame final : public nsFrame {
 
 #ifdef ACCESSIBILITY
   virtual mozilla::a11y::AccType AccessibleType() override;
 #endif
 
  protected:
   explicit BRFrame(ComputedStyle* aStyle, nsPresContext* aPresContext)
       : nsFrame(aStyle, aPresContext, kClassID),
-        mAscent(NS_INTRINSIC_WIDTH_UNKNOWN) {}
+        mAscent(NS_INTRINSIC_ISIZE_UNKNOWN) {}
 
   virtual ~BRFrame();
 
   nscoord mAscent;
 };
 
 }  // namespace mozilla
 
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -677,18 +677,18 @@ static bool RemoveFirstLine(nsLineList& 
 }
 
 //////////////////////////////////////////////////////////////////////
 // Reflow methods
 
 /* virtual */
 void nsBlockFrame::MarkIntrinsicISizesDirty() {
   nsBlockFrame* dirtyBlock = static_cast<nsBlockFrame*>(FirstContinuation());
-  dirtyBlock->mMinWidth = NS_INTRINSIC_WIDTH_UNKNOWN;
-  dirtyBlock->mPrefWidth = NS_INTRINSIC_WIDTH_UNKNOWN;
+  dirtyBlock->mMinWidth = NS_INTRINSIC_ISIZE_UNKNOWN;
+  dirtyBlock->mPrefWidth = NS_INTRINSIC_ISIZE_UNKNOWN;
   if (!(GetStateBits() & NS_BLOCK_NEEDS_BIDI_RESOLUTION)) {
     for (nsIFrame* frame = dirtyBlock; frame;
          frame = frame->GetNextContinuation()) {
       frame->AddStateBits(NS_BLOCK_NEEDS_BIDI_RESOLUTION);
     }
   }
 
   nsContainerFrame::MarkIntrinsicISizesDirty();
@@ -697,18 +697,18 @@ void nsBlockFrame::MarkIntrinsicISizesDi
 void nsBlockFrame::CheckIntrinsicCacheAgainstShrinkWrapState() {
   nsPresContext* presContext = PresContext();
   if (!nsLayoutUtils::FontSizeInflationEnabled(presContext)) {
     return;
   }
   bool inflationEnabled = !presContext->mInflationDisabledForShrinkWrap;
   if (inflationEnabled !=
       !!(GetStateBits() & NS_BLOCK_FRAME_INTRINSICS_INFLATED)) {
-    mMinWidth = NS_INTRINSIC_WIDTH_UNKNOWN;
-    mPrefWidth = NS_INTRINSIC_WIDTH_UNKNOWN;
+    mMinWidth = NS_INTRINSIC_ISIZE_UNKNOWN;
+    mPrefWidth = NS_INTRINSIC_ISIZE_UNKNOWN;
     if (inflationEnabled) {
       AddStateBits(NS_BLOCK_FRAME_INTRINSICS_INFLATED);
     } else {
       RemoveStateBits(NS_BLOCK_FRAME_INTRINSICS_INFLATED);
     }
   }
 }
 
@@ -716,17 +716,17 @@ void nsBlockFrame::CheckIntrinsicCacheAg
 nscoord nsBlockFrame::GetMinISize(gfxContext* aRenderingContext) {
   nsIFrame* firstInFlow = FirstContinuation();
   if (firstInFlow != this) return firstInFlow->GetMinISize(aRenderingContext);
 
   DISPLAY_MIN_INLINE_SIZE(this, mMinWidth);
 
   CheckIntrinsicCacheAgainstShrinkWrapState();
 
-  if (mMinWidth != NS_INTRINSIC_WIDTH_UNKNOWN) return mMinWidth;
+  if (mMinWidth != NS_INTRINSIC_ISIZE_UNKNOWN) return mMinWidth;
 
   if (StyleDisplay()->IsContainSize()) {
     mMinWidth = 0;
     return mMinWidth;
   }
 
 #ifdef DEBUG
   if (gNoisyIntrinsic) {
@@ -794,17 +794,17 @@ nscoord nsBlockFrame::GetMinISize(gfxCon
 nscoord nsBlockFrame::GetPrefISize(gfxContext* aRenderingContext) {
   nsIFrame* firstInFlow = FirstContinuation();
   if (firstInFlow != this) return firstInFlow->GetPrefISize(aRenderingContext);
 
   DISPLAY_PREF_INLINE_SIZE(this, mPrefWidth);
 
   CheckIntrinsicCacheAgainstShrinkWrapState();
 
-  if (mPrefWidth != NS_INTRINSIC_WIDTH_UNKNOWN) return mPrefWidth;
+  if (mPrefWidth != NS_INTRINSIC_ISIZE_UNKNOWN) return mPrefWidth;
 
   if (StyleDisplay()->IsContainSize()) {
     mPrefWidth = 0;
     return mPrefWidth;
   }
 
 #ifdef DEBUG
   if (gNoisyIntrinsic) {
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -406,18 +406,18 @@ class nsBlockFrame : public nsContainerF
   // Update our first-letter styles during stylo post-traversal.  This needs to
   // be done at a slightly different time than our other pseudo-elements.
   void UpdateFirstLetterStyle(mozilla::ServoRestyleState& aRestyleState);
 
  protected:
   explicit nsBlockFrame(ComputedStyle* aStyle, nsPresContext* aPresContext,
                         ClassID aID = kClassID)
       : nsContainerFrame(aStyle, aPresContext, aID),
-        mMinWidth(NS_INTRINSIC_WIDTH_UNKNOWN),
-        mPrefWidth(NS_INTRINSIC_WIDTH_UNKNOWN) {
+        mMinWidth(NS_INTRINSIC_ISIZE_UNKNOWN),
+        mPrefWidth(NS_INTRINSIC_ISIZE_UNKNOWN) {
 #ifdef DEBUG
     InitDebugFlags();
 #endif
   }
 
   virtual ~nsBlockFrame();
 
 #ifdef DEBUG
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -1810,18 +1810,18 @@ nsFlexContainerFrame::MeasureAscentAndBS
       new CachedMeasuringReflowResult(aChildReflowInput, childDesiredSize);
 
   aItem.Frame()->SetProperty(CachedFlexMeasuringReflow(), result);
   return *result;
 }
 
 /* virtual */
 void nsFlexContainerFrame::MarkIntrinsicISizesDirty() {
-  mCachedMinISize = NS_INTRINSIC_WIDTH_UNKNOWN;
-  mCachedPrefISize = NS_INTRINSIC_WIDTH_UNKNOWN;
+  mCachedMinISize = NS_INTRINSIC_ISIZE_UNKNOWN;
+  mCachedPrefISize = NS_INTRINSIC_ISIZE_UNKNOWN;
 
   nsContainerFrame::MarkIntrinsicISizesDirty();
 }
 
 nscoord nsFlexContainerFrame::MeasureFlexItemContentBSize(
     nsPresContext* aPresContext, FlexItem& aFlexItem,
     bool aForceBResizeForMeasuringReflow,
     const ReflowInput& aParentReflowInput) {
@@ -2362,17 +2362,17 @@ void nsFlexContainerFrame::Init(nsIConte
 #ifdef DEBUG_FRAME_DUMP
 nsresult nsFlexContainerFrame::GetFrameName(nsAString& aResult) const {
   return MakeFrameName(NS_LITERAL_STRING("FlexContainer"), aResult);
 }
 #endif
 
 nscoord nsFlexContainerFrame::GetLogicalBaseline(
     mozilla::WritingMode aWM) const {
-  NS_ASSERTION(mBaselineFromLastReflow != NS_INTRINSIC_WIDTH_UNKNOWN,
+  NS_ASSERTION(mBaselineFromLastReflow != NS_INTRINSIC_ISIZE_UNKNOWN,
                "baseline has not been set");
 
   if (HasAnyStateBits(NS_STATE_FLEX_SYNTHESIZE_BASELINE)) {
     // Return a baseline synthesized from our margin-box.
     return nsContainerFrame::GetLogicalBaseline(aWM);
   }
   return mBaselineFromLastReflow;
 }
@@ -5210,30 +5210,30 @@ nscoord nsFlexContainerFrame::IntrinsicI
   }
 
   return containerISize;
 }
 
 /* virtual */
 nscoord nsFlexContainerFrame::GetMinISize(gfxContext* aRenderingContext) {
   DISPLAY_MIN_INLINE_SIZE(this, mCachedMinISize);
-  if (mCachedMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
+  if (mCachedMinISize == NS_INTRINSIC_ISIZE_UNKNOWN) {
     mCachedMinISize =
         StyleDisplay()->IsContainSize()
             ? 0
             : IntrinsicISize(aRenderingContext, nsLayoutUtils::MIN_ISIZE);
   }
 
   return mCachedMinISize;
 }
 
 /* virtual */
 nscoord nsFlexContainerFrame::GetPrefISize(gfxContext* aRenderingContext) {
   DISPLAY_PREF_INLINE_SIZE(this, mCachedPrefISize);
-  if (mCachedPrefISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
+  if (mCachedPrefISize == NS_INTRINSIC_ISIZE_UNKNOWN) {
     mCachedPrefISize =
         StyleDisplay()->IsContainSize()
             ? 0
             : IntrinsicISize(aRenderingContext, nsLayoutUtils::PREF_ISIZE);
   }
 
   return mCachedPrefISize;
 }
--- a/layout/generic/nsFlexContainerFrame.h
+++ b/layout/generic/nsFlexContainerFrame.h
@@ -232,20 +232,20 @@ class nsFlexContainerFrame final : publi
    */
   static void MarkCachedFlexMeasurementsDirty(nsIFrame* aItemFrame);
 
  protected:
   // Protected constructor & destructor
   explicit nsFlexContainerFrame(ComputedStyle* aStyle,
                                 nsPresContext* aPresContext)
       : nsContainerFrame(aStyle, aPresContext, kClassID),
-        mCachedMinISize(NS_INTRINSIC_WIDTH_UNKNOWN),
-        mCachedPrefISize(NS_INTRINSIC_WIDTH_UNKNOWN),
-        mBaselineFromLastReflow(NS_INTRINSIC_WIDTH_UNKNOWN),
-        mLastBaselineFromLastReflow(NS_INTRINSIC_WIDTH_UNKNOWN) {}
+        mCachedMinISize(NS_INTRINSIC_ISIZE_UNKNOWN),
+        mCachedPrefISize(NS_INTRINSIC_ISIZE_UNKNOWN),
+        mBaselineFromLastReflow(NS_INTRINSIC_ISIZE_UNKNOWN),
+        mLastBaselineFromLastReflow(NS_INTRINSIC_ISIZE_UNKNOWN) {}
 
   virtual ~nsFlexContainerFrame();
 
   /*
    * This method does the bulk of the flex layout, implementing the algorithm
    * described at:
    *   http://dev.w3.org/csswg/css-flexbox/#layout-algorithm
    * (with a few initialization pieces happening in the caller, Reflow().
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -1031,18 +1031,18 @@ struct nsGridContainerFrame::Tracks {
   explicit Tracks(LogicalAxis aAxis)
       : mContentBoxSize(0),
         mGridGap(0),
         mStateUnion(TrackSize::StateBits(0)),
         mAxis(aAxis),
         mCanResolveLineRangeSize(false) {
     mBaselineSubtreeAlign[BaselineSharingGroup::First] = NS_STYLE_ALIGN_AUTO;
     mBaselineSubtreeAlign[BaselineSharingGroup::Last] = NS_STYLE_ALIGN_AUTO;
-    mBaseline[BaselineSharingGroup::First] = NS_INTRINSIC_WIDTH_UNKNOWN;
-    mBaseline[BaselineSharingGroup::Last] = NS_INTRINSIC_WIDTH_UNKNOWN;
+    mBaseline[BaselineSharingGroup::First] = NS_INTRINSIC_ISIZE_UNKNOWN;
+    mBaseline[BaselineSharingGroup::Last] = NS_INTRINSIC_ISIZE_UNKNOWN;
   }
 
   void Initialize(const TrackSizingFunctions& aFunctions,
                   const NonNegativeLengthPercentageOrNormal& aGridGap,
                   uint32_t aNumTracks, nscoord aContentBoxSize);
 
   /**
    * Return the union of the state bits for the tracks in aRange.
@@ -3426,17 +3426,17 @@ static nscoord ContentContribution(
     gfxContext* aRC, WritingMode aCBWM, LogicalAxis aAxis,
     const Maybe<LogicalSize>& aPercentageBasis, IntrinsicISizeType aConstraint,
     nscoord aMinSizeClamp = NS_MAXSIZE, uint32_t aFlags = 0) {
   nsIFrame* child = aGridItem.mFrame;
   PhysicalAxis axis(aCBWM.PhysicalAxis(aAxis));
   nscoord size = nsLayoutUtils::IntrinsicForAxis(
       axis, aRC, child, aConstraint, aPercentageBasis,
       aFlags | nsLayoutUtils::BAIL_IF_REFLOW_NEEDED, aMinSizeClamp);
-  if (size == NS_INTRINSIC_WIDTH_UNKNOWN) {
+  if (size == NS_INTRINSIC_ISIZE_UNKNOWN) {
     // We need to reflow the child to find its BSize contribution.
     // XXX this will give mostly correct results for now (until bug 1174569).
     nscoord availISize = INFINITE_ISIZE_COORD;
     nscoord availBSize = NS_UNCONSTRAINEDSIZE;
     auto childWM = child->GetWritingMode();
     const bool isOrthogonal = childWM.IsOrthogonalTo(aCBWM);
     // The next two variables are MinSizeClamp values in the child's axes.
     nscoord iMinSizeClamp = NS_MAXSIZE;
@@ -3888,17 +3888,17 @@ void nsGridContainerFrame::Tracks::Initi
         if (grid) {
           if (isOrthogonal == isInlineAxis) {
             grid->GetBBaseline(BaselineSharingGroup::First, &baseline);
           } else {
             grid->GetIBaseline(BaselineSharingGroup::First, &baseline);
           }
         }
         if (grid || nsLayoutUtils::GetFirstLineBaseline(wm, child, &baseline)) {
-          NS_ASSERTION(baseline != NS_INTRINSIC_WIDTH_UNKNOWN,
+          NS_ASSERTION(baseline != NS_INTRINSIC_ISIZE_UNKNOWN,
                        "about to use an unknown baseline");
           auto frameSize = isInlineAxis ? child->ISize(wm) : child->BSize(wm);
           auto m = child->GetLogicalUsedMargin(wm);
           baseline += isInlineAxis ? m.IStart(wm) : m.BStart(wm);
           auto alignSize =
               frameSize + (isInlineAxis ? m.IStartEnd(wm) : m.BStartEnd(wm));
           firstBaselineItems.AppendElement(ItemBaselineData(
               {baselineTrack, baseline, alignSize, &gridItem}));
@@ -3909,17 +3909,17 @@ void nsGridContainerFrame::Tracks::Initi
         if (grid) {
           if (isOrthogonal == isInlineAxis) {
             grid->GetBBaseline(BaselineSharingGroup::Last, &baseline);
           } else {
             grid->GetIBaseline(BaselineSharingGroup::Last, &baseline);
           }
         }
         if (grid || nsLayoutUtils::GetLastLineBaseline(wm, child, &baseline)) {
-          NS_ASSERTION(baseline != NS_INTRINSIC_WIDTH_UNKNOWN,
+          NS_ASSERTION(baseline != NS_INTRINSIC_ISIZE_UNKNOWN,
                        "about to use an unknown baseline");
           auto frameSize = isInlineAxis ? child->ISize(wm) : child->BSize(wm);
           auto m = child->GetLogicalUsedMargin(wm);
           if (!grid) {
             // Convert to distance from border-box end.
             baseline = frameSize - baseline;
           }
           auto descent = baseline + (isInlineAxis ? m.IEnd(wm) : m.BEnd(wm));
@@ -5721,17 +5721,17 @@ void nsGridContainerFrame::Reflow(nsPres
 
 #ifdef DEBUG
   mDidPushItemsBitMayLie = false;
   SanityCheckGridItemsBeforeReflow();
 #endif  // DEBUG
 
   for (auto& perAxisBaseline : mBaseline) {
     for (auto& baseline : perAxisBaseline) {
-      baseline = NS_INTRINSIC_WIDTH_UNKNOWN;
+      baseline = NS_INTRINSIC_ISIZE_UNKNOWN;
     }
   }
 
   const nsStylePosition* stylePos = aReflowInput.mStylePosition;
   if (!prevInFlow) {
     InitImplicitNamedAreas(stylePos);
   }
   GridReflowInput gridReflowInput(this, aReflowInput);
@@ -6209,40 +6209,40 @@ nscoord nsGridContainerFrame::IntrinsicI
   for (const TrackSize& sz : state.mCols.mSizes) {
     length += sz.mBase;
   }
   return length + state.mCols.SumOfGridGaps();
 }
 
 nscoord nsGridContainerFrame::GetMinISize(gfxContext* aRC) {
   DISPLAY_MIN_INLINE_SIZE(this, mCachedMinISize);
-  if (mCachedMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
+  if (mCachedMinISize == NS_INTRINSIC_ISIZE_UNKNOWN) {
     mCachedMinISize = StyleDisplay()->IsContainSize()
                           ? 0
                           : IntrinsicISize(aRC, nsLayoutUtils::MIN_ISIZE);
   }
   return mCachedMinISize;
 }
 
 nscoord nsGridContainerFrame::GetPrefISize(gfxContext* aRC) {
   DISPLAY_PREF_INLINE_SIZE(this, mCachedPrefISize);
-  if (mCachedPrefISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
+  if (mCachedPrefISize == NS_INTRINSIC_ISIZE_UNKNOWN) {
     mCachedPrefISize = StyleDisplay()->IsContainSize()
                            ? 0
                            : IntrinsicISize(aRC, nsLayoutUtils::PREF_ISIZE);
   }
   return mCachedPrefISize;
 }
 
 void nsGridContainerFrame::MarkIntrinsicISizesDirty() {
-  mCachedMinISize = NS_INTRINSIC_WIDTH_UNKNOWN;
-  mCachedPrefISize = NS_INTRINSIC_WIDTH_UNKNOWN;
+  mCachedMinISize = NS_INTRINSIC_ISIZE_UNKNOWN;
+  mCachedPrefISize = NS_INTRINSIC_ISIZE_UNKNOWN;
   for (auto& perAxisBaseline : mBaseline) {
     for (auto& baseline : perAxisBaseline) {
-      baseline = NS_INTRINSIC_WIDTH_UNKNOWN;
+      baseline = NS_INTRINSIC_ISIZE_UNKNOWN;
     }
   }
   nsContainerFrame::MarkIntrinsicISizesDirty();
 }
 
 void nsGridContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
                                             const nsDisplayListSet& aLists) {
   DisplayBorderBackgroundOutline(aBuilder, aLists);
@@ -6430,17 +6430,17 @@ void nsGridContainerFrame::CalculateBase
     const nsSize& aCBPhysicalSize, nscoord aCBBorderPaddingStart,
     nscoord aCBBorderPaddingEnd, nscoord aCBSize) {
   const auto axis = aTracks.mAxis;
   auto firstBaseline = aTracks.mBaseline[BaselineSharingGroup::First];
   if (!(aBaselineSet & BaselineSet::eFirst)) {
     mBaseline[axis][BaselineSharingGroup::First] =
         ::SynthesizeBaselineFromBorderBox(BaselineSharingGroup::First, aWM,
                                           aCBSize);
-  } else if (firstBaseline == NS_INTRINSIC_WIDTH_UNKNOWN) {
+  } else if (firstBaseline == NS_INTRINSIC_ISIZE_UNKNOWN) {
     FindItemInGridOrderResult gridOrderFirstItem = FindFirstItemInGridOrder(
         *aIter, *aGridItems,
         axis == eLogicalAxisBlock ? &GridArea::mRows : &GridArea::mCols,
         axis == eLogicalAxisBlock ? &GridArea::mCols : &GridArea::mRows,
         aFragmentStartTrack);
     mBaseline[axis][BaselineSharingGroup::First] = SynthesizeBaseline(
         gridOrderFirstItem, axis, BaselineSharingGroup::First, aCBPhysicalSize,
         aCBSize, aWM);
@@ -6457,17 +6457,17 @@ void nsGridContainerFrame::CalculateBase
         aCBBorderPaddingStart + gapBeforeStartTrack + firstBaseline;
   }
 
   auto lastBaseline = aTracks.mBaseline[BaselineSharingGroup::Last];
   if (!(aBaselineSet & BaselineSet::eLast)) {
     mBaseline[axis][BaselineSharingGroup::Last] =
         ::SynthesizeBaselineFromBorderBox(BaselineSharingGroup::Last, aWM,
                                           aCBSize);
-  } else if (lastBaseline == NS_INTRINSIC_WIDTH_UNKNOWN) {
+  } else if (lastBaseline == NS_INTRINSIC_ISIZE_UNKNOWN) {
     // For finding items for the 'last baseline' we need to create a reverse
     // iterator ('aIter' is the forward iterator from the GridReflowInput).
     using Iter = ReverseCSSOrderAwareFrameIterator;
     auto orderState = aIter->ItemsAreAlreadyInOrder()
                           ? Iter::OrderState::eKnownOrdered
                           : Iter::OrderState::eKnownUnordered;
     Iter iter(this, kPrincipalList, Iter::ChildFilter::eSkipPlaceholders,
               orderState);
--- a/layout/generic/nsGridContainerFrame.h
+++ b/layout/generic/nsGridContainerFrame.h
@@ -289,21 +289,21 @@ class nsGridContainerFrame final : publi
   struct TrackSizingFunctions;
   struct Tracks;
   struct TranslatedLineRange;
   friend nsContainerFrame* NS_NewGridContainerFrame(
       mozilla::PresShell* aPresShell, ComputedStyle* aStyle);
   explicit nsGridContainerFrame(ComputedStyle* aStyle,
                                 nsPresContext* aPresContext)
       : nsContainerFrame(aStyle, aPresContext, kClassID),
-        mCachedMinISize(NS_INTRINSIC_WIDTH_UNKNOWN),
-        mCachedPrefISize(NS_INTRINSIC_WIDTH_UNKNOWN) {
+        mCachedMinISize(NS_INTRINSIC_ISIZE_UNKNOWN),
+        mCachedPrefISize(NS_INTRINSIC_ISIZE_UNKNOWN) {
     for (auto& perAxisBaseline : mBaseline) {
       for (auto& baseline : perAxisBaseline) {
-        baseline = NS_INTRINSIC_WIDTH_UNKNOWN;
+        baseline = NS_INTRINSIC_ISIZE_UNKNOWN;
       }
     }
   }
 
   /**
    * XXX temporary - move the ImplicitNamedAreas stuff to the style system.
    * The implicit area names that come from x-start .. x-end lines in
    * grid-template-columns / grid-template-rows are stored in this frame
--- a/layout/generic/nsInlineFrame.h
+++ b/layout/generic/nsInlineFrame.h
@@ -139,17 +139,17 @@ class nsInlineFrame : public nsContainer
       mLineContainer = nullptr;
       mLineLayout = nullptr;
       mSetParentPointer = false;
     }
   };
 
   nsInlineFrame(ComputedStyle* aStyle, nsPresContext* aPresContext, ClassID aID)
       : nsContainerFrame(aStyle, aPresContext, aID),
-        mBaseline(NS_INTRINSIC_WIDTH_UNKNOWN) {}
+        mBaseline(NS_INTRINSIC_ISIZE_UNKNOWN) {}
 
   virtual LogicalSides GetLogicalSkipSides(
       const ReflowInput* aReflowInput = nullptr) const override;
 
   void ReflowFrames(nsPresContext* aPresContext,
                     const ReflowInput& aReflowInput, InlineReflowInput& rs,
                     ReflowOutput& aMetrics, nsReflowStatus& aStatus);
 
--- a/layout/mathml/nsMathMLContainerFrame.cpp
+++ b/layout/mathml/nsMathMLContainerFrame.cpp
@@ -906,23 +906,23 @@ void nsMathMLContainerFrame::Reflow(nsPr
   NS_FRAME_SET_TRUNCATION(aStatus, aReflowInput, aDesiredSize);
 }
 
 static nscoord AddInterFrameSpacingToSize(ReflowOutput& aDesiredSize,
                                           nsMathMLContainerFrame* aFrame);
 
 /* virtual */
 void nsMathMLContainerFrame::MarkIntrinsicISizesDirty() {
-  mIntrinsicWidth = NS_INTRINSIC_WIDTH_UNKNOWN;
+  mIntrinsicWidth = NS_INTRINSIC_ISIZE_UNKNOWN;
   nsContainerFrame::MarkIntrinsicISizesDirty();
 }
 
 void nsMathMLContainerFrame::UpdateIntrinsicWidth(
     gfxContext* aRenderingContext) {
-  if (mIntrinsicWidth == NS_INTRINSIC_WIDTH_UNKNOWN) {
+  if (mIntrinsicWidth == NS_INTRINSIC_ISIZE_UNKNOWN) {
     ReflowOutput desiredSize(GetWritingMode());
     GetIntrinsicISizeMetrics(aRenderingContext, desiredSize);
 
     // Include the additional width added by FixInterFrameSpacing to ensure
     // consistent width calculations.
     AddInterFrameSpacingToSize(desiredSize, this);
     mIntrinsicWidth = desiredSize.ISize(GetWritingMode());
   }
--- a/layout/mathml/nsMathMLContainerFrame.h
+++ b/layout/mathml/nsMathMLContainerFrame.h
@@ -35,17 +35,17 @@ class PresShell;
 
 class nsMathMLContainerFrame : public nsContainerFrame, public nsMathMLFrame {
   friend class nsMathMLmfencedFrame;
 
  public:
   nsMathMLContainerFrame(ComputedStyle* aStyle, nsPresContext* aPresContext,
                          ClassID aID)
       : nsContainerFrame(aStyle, aPresContext, aID),
-        mIntrinsicWidth(NS_INTRINSIC_WIDTH_UNKNOWN),
+        mIntrinsicWidth(NS_INTRINSIC_ISIZE_UNKNOWN),
         mBlockStartAscent(0) {}
 
   NS_DECL_QUERYFRAME_TARGET(nsMathMLContainerFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_ABSTRACT_FRAME(nsMathMLContainerFrame)
 
   // --------------------------------------------------------------------------
   // Overloaded nsMathMLFrame methods -- see documentation in nsIMathMLFrame.h
--- a/layout/tables/BasicTableLayoutStrategy.cpp
+++ b/layout/tables/BasicTableLayoutStrategy.cpp
@@ -35,30 +35,30 @@ BasicTableLayoutStrategy::BasicTableLayo
 }
 
 /* virtual */
 BasicTableLayoutStrategy::~BasicTableLayoutStrategy() {}
 
 /* virtual */
 nscoord BasicTableLayoutStrategy::GetMinISize(gfxContext* aRenderingContext) {
   DISPLAY_MIN_INLINE_SIZE(mTableFrame, mMinISize);
-  if (mMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
+  if (mMinISize == NS_INTRINSIC_ISIZE_UNKNOWN) {
     ComputeIntrinsicISizes(aRenderingContext);
   }
   return mMinISize;
 }
 
 /* virtual */
 nscoord BasicTableLayoutStrategy::GetPrefISize(gfxContext* aRenderingContext,
                                                bool aComputingSize) {
   DISPLAY_PREF_INLINE_SIZE(mTableFrame, mPrefISize);
-  NS_ASSERTION((mPrefISize == NS_INTRINSIC_WIDTH_UNKNOWN) ==
-                   (mPrefISizePctExpand == NS_INTRINSIC_WIDTH_UNKNOWN),
+  NS_ASSERTION((mPrefISize == NS_INTRINSIC_ISIZE_UNKNOWN) ==
+                   (mPrefISizePctExpand == NS_INTRINSIC_ISIZE_UNKNOWN),
                "dirtyness out of sync");
-  if (mPrefISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
+  if (mPrefISize == NS_INTRINSIC_ISIZE_UNKNOWN) {
     ComputeIntrinsicISizes(aRenderingContext);
   }
   return aComputingSize ? mPrefISizePctExpand : mPrefISize;
 }
 
 struct CellISizeInfo {
   CellISizeInfo(nscoord aMinCoord, nscoord aPrefCoord, float aPrefPercent,
                 bool aHasSpecifiedISize)
@@ -472,40 +472,40 @@ void BasicTableLayoutStrategy::ComputeIn
 
   mMinISize = min;
   mPrefISize = pref;
   mPrefISizePctExpand = pref_pct_expand;
 }
 
 /* virtual */
 void BasicTableLayoutStrategy::MarkIntrinsicISizesDirty() {
-  mMinISize = NS_INTRINSIC_WIDTH_UNKNOWN;
-  mPrefISize = NS_INTRINSIC_WIDTH_UNKNOWN;
-  mPrefISizePctExpand = NS_INTRINSIC_WIDTH_UNKNOWN;
+  mMinISize = NS_INTRINSIC_ISIZE_UNKNOWN;
+  mPrefISize = NS_INTRINSIC_ISIZE_UNKNOWN;
+  mPrefISizePctExpand = NS_INTRINSIC_ISIZE_UNKNOWN;
   mLastCalcISize = nscoord_MIN;
 }
 
 /* virtual */
 void BasicTableLayoutStrategy::ComputeColumnISizes(
     const ReflowInput& aReflowInput) {
   nscoord iSize = aReflowInput.ComputedISize();
 
   if (mLastCalcISize == iSize) {
     return;
   }
   mLastCalcISize = iSize;
 
-  NS_ASSERTION((mMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) ==
-                   (mPrefISize == NS_INTRINSIC_WIDTH_UNKNOWN),
+  NS_ASSERTION((mMinISize == NS_INTRINSIC_ISIZE_UNKNOWN) ==
+                   (mPrefISize == NS_INTRINSIC_ISIZE_UNKNOWN),
                "dirtyness out of sync");
-  NS_ASSERTION((mMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) ==
-                   (mPrefISizePctExpand == NS_INTRINSIC_WIDTH_UNKNOWN),
+  NS_ASSERTION((mMinISize == NS_INTRINSIC_ISIZE_UNKNOWN) ==
+                   (mPrefISizePctExpand == NS_INTRINSIC_ISIZE_UNKNOWN),
                "dirtyness out of sync");
   // XXX Is this needed?
-  if (mMinISize == NS_INTRINSIC_WIDTH_UNKNOWN) {
+  if (mMinISize == NS_INTRINSIC_ISIZE_UNKNOWN) {
     ComputeIntrinsicISizes(aReflowInput.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
@@ -26,17 +26,17 @@ FixedTableLayoutStrategy::FixedTableLayo
 }
 
 /* virtual */
 FixedTableLayoutStrategy::~FixedTableLayoutStrategy() {}
 
 /* virtual */
 nscoord FixedTableLayoutStrategy::GetMinISize(gfxContext* aRenderingContext) {
   DISPLAY_MIN_INLINE_SIZE(mTableFrame, mMinISize);
-  if (mMinISize != NS_INTRINSIC_WIDTH_UNKNOWN) {
+  if (mMinISize != NS_INTRINSIC_ISIZE_UNKNOWN) {
     return mMinISize;
   }
 
   // It's theoretically possible to do something much better here that
   // depends only on the columns and the first row (where we look at
   // intrinsic inline sizes inside the first row and then reverse the
   // algorithm to find the narrowest inline size that would hold all of
   // those intrinsic inline sizes), but it wouldn't be compatible with
@@ -128,17 +128,17 @@ nscoord FixedTableLayoutStrategy::GetPre
   // other browsers.
   nscoord result = nscoord_MAX;
   DISPLAY_PREF_INLINE_SIZE(mTableFrame, result);
   return result;
 }
 
 /* virtual */
 void FixedTableLayoutStrategy::MarkIntrinsicISizesDirty() {
-  mMinISize = NS_INTRINSIC_WIDTH_UNKNOWN;
+  mMinISize = NS_INTRINSIC_ISIZE_UNKNOWN;
   mLastCalcISize = nscoord_MIN;
 }
 
 static inline nscoord AllocateUnassigned(nscoord aUnassignedSpace,
                                          float aShare) {
   if (aShare == 1.0f) {
     // This happens when the numbers we're dividing to get aShare are
     // equal.  We want to return unassignedSpace exactly, even if it