Bug 1448294 - Clean up naming of 'styleContext' variables after the big nsStyleContext rename. r=emilio
authorJonathan Watt <jwatt@jwatt.org>
Thu, 22 Mar 2018 13:49:21 +0000
changeset 465961 142c279497d5aaf403e6b55051576276d6e613f6
parent 465960 70d34544b744e50d26f2b400d86312587ec3fbf6
child 465962 b99844d179cacf74a5d39ad23429be91e989c331
child 465975 73534eb3eb8c5820e2332c33e0a188761aa88c0b
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1448294
milestone61.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 1448294 - Clean up naming of 'styleContext' variables after the big nsStyleContext rename. r=emilio Reviewers: emilio Bug #: 1448294 Differential Revision: https://phabricator.services.mozilla.com/D796 MozReview-Commit-ID: KJq2i9nrg7y
dom/animation/KeyframeEffect.cpp
dom/animation/KeyframeEffectReadOnly.cpp
dom/base/Element.cpp
dom/base/nsDOMWindowUtils.cpp
dom/base/nsPlainTextSerializer.cpp
dom/base/nsXHTMLContentSerializer.cpp
dom/smil/nsSMILCSSValueType.cpp
dom/svg/SVGContentUtils.cpp
dom/svg/SVGGeometryElement.cpp
dom/svg/SVGLengthList.h
dom/svg/SVGPathElement.cpp
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsLayoutUtils.cpp
layout/base/nsPresContext.cpp
layout/forms/nsComboboxControlFrame.cpp
layout/forms/nsRangeFrame.cpp
layout/generic/nsTextFrame.cpp
layout/inspector/InspectorUtils.cpp
layout/mathml/nsMathMLChar.cpp
layout/mathml/nsMathMLmtableFrame.cpp
layout/style/StyleAnimationValue.cpp
layout/tables/nsTableFrame.cpp
layout/xul/nsListBoxBodyFrame.cpp
--- a/dom/animation/KeyframeEffect.cpp
+++ b/dom/animation/KeyframeEffect.cpp
@@ -105,19 +105,19 @@ KeyframeEffect::SetTarget(const Nullable
       nsNodeUtils::AnimationRemoved(mAnimation);
     }
   }
 
   mTarget = newTarget;
 
   if (mTarget) {
     UpdateTargetRegistration();
-    RefPtr<ComputedStyle> styleContext = GetTargetComputedStyle();
-    if (styleContext) {
-      UpdateProperties(styleContext);
+    RefPtr<ComputedStyle> computedStyle = GetTargetComputedStyle();
+    if (computedStyle) {
+      UpdateProperties(computedStyle);
     }
 
     MaybeUpdateFrameForCompositor();
 
     RequestRestyle(EffectCompositor::RestyleType::Layer);
 
     nsAutoAnimationMutationBatch mb(mTarget->mElement->OwnerDoc());
     if (mAnimation) {
@@ -158,17 +158,17 @@ KeyframeEffect::SetComposite(const Compo
 
   mEffectOptions.mComposite = aComposite;
 
   if (mAnimation && mAnimation->IsRelevant()) {
     nsNodeUtils::AnimationChanged(mAnimation);
   }
 
   if (mTarget) {
-    RefPtr<ComputedStyle> styleContext = GetTargetComputedStyle();
-    if (styleContext) {
-      UpdateProperties(styleContext);
+    RefPtr<ComputedStyle> computedStyle = GetTargetComputedStyle();
+    if (computedStyle) {
+      UpdateProperties(computedStyle);
     }
   }
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -1018,27 +1018,27 @@ KeyframeEffectReadOnly::GetKeyframes(JSC
   // a longhand that comes from a variable reference in a shorthand? Servo says,
   // "an empty string" which is not particularly helpful.
   //
   // We should just store shorthands as-is (bug 1391537) and then return the
   // variable references, but for now, since we don't do that, and in order to
   // be consistent with Gecko, we just expand the variables (assuming we have
   // enough context to do so). For that we need to grab the style context so we
   // know what custom property values to provide.
-  RefPtr<ComputedStyle> styleContext;
+  RefPtr<ComputedStyle> computedStyle;
   if (isServo && isCSSAnimation) {
     // The following will flush style but that's ok since if you update
     // a variable's computed value, you expect to see that updated value in the
     // result of getKeyframes().
     //
     // If we don't have a target, the following will return null. In that case
     // we might end up returning variables as-is or empty string. That should be
     // acceptable however, since such a case is rare and this is only
     // short-term (and unshipped) behavior until bug 1391537 is fixed.
-    styleContext = GetTargetComputedStyle();
+    computedStyle = GetTargetComputedStyle();
   }
 
   for (const Keyframe& keyframe : mKeyframes) {
     // Set up a dictionary object for the explicit members
     BaseComputedKeyframe keyframeDict;
     if (keyframe.mOffset) {
       keyframeDict.mOffset.SetValue(keyframe.mOffset.value());
     }
@@ -1081,17 +1081,17 @@ KeyframeEffectReadOnly::GetKeyframes(JSC
       if (isServo) {
         // Don't serialize the custom properties for this keyframe.
         if (propertyValue.mProperty ==
               nsCSSPropertyID::eCSSPropertyExtra_variable) {
           continue;
         }
         if (propertyValue.mServoDeclarationBlock) {
           const ComputedStyle* servoComputedStyle =
-            styleContext ? styleContext->AsServo() : nullptr;
+            computedStyle ? computedStyle->AsServo() : nullptr;
           Servo_DeclarationBlock_SerializeOneValue(
             propertyValue.mServoDeclarationBlock,
             propertyValue.mProperty,
             &stringValue,
             servoComputedStyle,
             customProperties);
         } else {
           RawServoAnimationValue* value =
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -1500,20 +1500,20 @@ Element::GetElementsByClassName(const ns
 void
 Element::GetElementsWithGrid(nsTArray<RefPtr<Element>>& aElements)
 {
   // This helper function is passed to GetElementsByMatching()
   // to identify elements with styling which will cause them to
   // generate a nsGridContainerFrame during layout.
   auto IsDisplayGrid = [](Element* aElement) -> bool
   {
-    RefPtr<ComputedStyle> styleContext =
+    RefPtr<ComputedStyle> computedStyle =
       nsComputedDOMStyle::GetComputedStyle(aElement, nullptr);
-    if (styleContext) {
-      const nsStyleDisplay* display = styleContext->StyleDisplay();
+    if (computedStyle) {
+      const nsStyleDisplay* display = computedStyle->StyleDisplay();
       return (display->mDisplay == StyleDisplay::Grid ||
               display->mDisplay == StyleDisplay::InlineGrid);
     }
     return false;
   };
 
   GetElementsByMatching(IsDisplayGrid, aElements);
 }
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -2714,19 +2714,19 @@ nsDOMWindowUtils::ComputeAnimationDistan
 
   Element* element = content->AsElement();
   AnimationValue v1 = AnimationValue::FromString(property, aValue1, element);
   AnimationValue v2 = AnimationValue::FromString(property, aValue2, element);
   if (v1.IsNull() || v2.IsNull()) {
     return NS_ERROR_ILLEGAL_VALUE;
   }
 
-  RefPtr<ComputedStyle> styleContext =
+  RefPtr<ComputedStyle> computedStyle =
     nsComputedDOMStyle::GetComputedStyle(element, nullptr);
-  *aResult = v1.ComputeDistance(property, v2, styleContext);
+  *aResult = v1.ComputeDistance(property, v2, computedStyle);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDOMWindowUtils::GetAnimationTypeForLonghand(const nsAString& aProperty,
                                               nsAString& aResult)
 {
   nsCSSPropertyID propertyID =
@@ -2812,24 +2812,24 @@ nsDOMWindowUtils::GetUnanimatedComputedS
   }
 
   nsIPresShell* shell = GetPresShell();
   if (!shell) {
     return NS_ERROR_FAILURE;
   }
 
   RefPtr<nsAtom> pseudo = nsCSSPseudoElements::GetPseudoAtom(aPseudoElement);
-  RefPtr<ComputedStyle> styleContext =
+  RefPtr<ComputedStyle> computedStyle =
     nsComputedDOMStyle::GetUnanimatedComputedStyleNoFlush(element, pseudo);
-  if (!styleContext) {
+  if (!computedStyle) {
     return NS_ERROR_FAILURE;
   }
 
   RefPtr<RawServoAnimationValue> value =
-    Servo_ComputedValues_ExtractAnimationValue(styleContext->AsServo(),
+    Servo_ComputedValues_ExtractAnimationValue(computedStyle,
                                                propertyID).Consume();
   if (!value) {
     return NS_ERROR_FAILURE;
   }
   Servo_AnimationValue_Serialize(value, propertyID, &aResult);
   return NS_OK;
 }
 
--- a/dom/base/nsPlainTextSerializer.cpp
+++ b/dom/base/nsPlainTextSerializer.cpp
@@ -1846,33 +1846,33 @@ bool
 nsPlainTextSerializer::IsInPre()
 {
   return !mPreformatStack.empty() && mPreformatStack.top();
 }
 
 bool
 nsPlainTextSerializer::IsElementPreformatted(Element* aElement)
 {
-  RefPtr<ComputedStyle> styleContext =
+  RefPtr<ComputedStyle> computedStyle =
     nsComputedDOMStyle::GetComputedStyleNoFlush(aElement, nullptr);
-  if (styleContext) {
-    const nsStyleText* textStyle = styleContext->StyleText();
+  if (computedStyle) {
+    const nsStyleText* textStyle = computedStyle->StyleText();
     return textStyle->WhiteSpaceOrNewlineIsSignificant();
   }
   // Fall back to looking at the tag, in case there is no style information.
   return GetIdForContent(aElement) == nsGkAtoms::pre;
 }
 
 bool
 nsPlainTextSerializer::IsElementBlock(Element* aElement)
 {
-  RefPtr<ComputedStyle> styleContext =
+  RefPtr<ComputedStyle> computedStyle =
     nsComputedDOMStyle::GetComputedStyleNoFlush(aElement, nullptr);
-  if (styleContext) {
-    const nsStyleDisplay* displayStyle = styleContext->StyleDisplay();
+  if (computedStyle) {
+    const nsStyleDisplay* displayStyle = computedStyle->StyleDisplay();
     return displayStyle->IsBlockOutsideStyle();
   }
   // Fall back to looking at the tag, in case there is no style information.
   return nsContentUtils::IsHTMLBlock(aElement);
 }
 
 /**
  * This method is required only to identify LI's inside OL.
--- a/dom/base/nsXHTMLContentSerializer.cpp
+++ b/dom/base/nsXHTMLContentSerializer.cpp
@@ -715,20 +715,20 @@ nsXHTMLContentSerializer::MaybeLeaveFrom
 bool
 nsXHTMLContentSerializer::IsElementPreformatted(nsIContent* aNode)
 {
   MOZ_ASSERT(ShouldMaintainPreLevel(), "We should not be calling this needlessly");
 
   if (!aNode->IsElement()) {
     return false;
   }
-  RefPtr<ComputedStyle> styleContext =
+  RefPtr<ComputedStyle> computedStyle =
     nsComputedDOMStyle::GetComputedStyleNoFlush(aNode->AsElement(), nullptr);
-  if (styleContext) {
-    const nsStyleText* textStyle = styleContext->StyleText();
+  if (computedStyle) {
+    const nsStyleText* textStyle = computedStyle->StyleText();
     return textStyle->WhiteSpaceOrNewlineIsSignificant();
   }
   return false;
 }
 
 bool
 nsXHTMLContentSerializer::SerializeLIValueAttribute(nsIContent* aElement,
                                                     nsAString& aStr)
--- a/dom/smil/nsSMILCSSValueType.cpp
+++ b/dom/smil/nsSMILCSSValueType.cpp
@@ -545,25 +545,25 @@ nsSMILCSSValueType::ValueFromString(nsCS
   if (doc && !nsStyleUtil::CSPAllowsInlineStyle(nullptr,
                                                 doc->NodePrincipal(),
                                                 nullptr,
                                                 doc->GetDocumentURI(),
                                                 0, aString, nullptr)) {
     return;
   }
 
-  RefPtr<ComputedStyle> styleContext =
+  RefPtr<ComputedStyle> computedStyle =
     nsComputedDOMStyle::GetComputedStyle(aTargetElement, nullptr);
-  if (!styleContext) {
+  if (!computedStyle) {
     return;
   }
 
   ServoAnimationValues parsedValues =
     ValueFromStringHelper(aPropID, aTargetElement, presContext,
-                          styleContext, aString);
+                          computedStyle, aString);
   if (aIsContextSensitive) {
     // FIXME: Bug 1358955 - detect context-sensitive values and set this value
     // appropriately.
     *aIsContextSensitive = false;
   }
 
   if (!parsedValues.IsEmpty()) {
     sSingleton.Init(aValue);
--- a/dom/svg/SVGContentUtils.cpp
+++ b/dom/svg/SVGContentUtils.cpp
@@ -170,29 +170,29 @@ GetStrokeDashData(SVGContentUtils::AutoS
 
 void
 SVGContentUtils::GetStrokeOptions(AutoStrokeOptions* aStrokeOptions,
                                   nsSVGElement* aElement,
                                   ComputedStyle* aComputedStyle,
                                   SVGContextPaint* aContextPaint,
                                   StrokeOptionFlags aFlags)
 {
-  RefPtr<ComputedStyle> styleContext;
+  RefPtr<ComputedStyle> computedStyle;
   if (aComputedStyle) {
-    styleContext = aComputedStyle;
+    computedStyle = aComputedStyle;
   } else {
-    styleContext =
+    computedStyle =
       nsComputedDOMStyle::GetComputedStyleNoFlush(aElement, nullptr);
   }
 
-  if (!styleContext) {
+  if (!computedStyle) {
     return;
   }
 
-  const nsStyleSVG* styleSVG = styleContext->StyleSVG();
+  const nsStyleSVG* styleSVG = computedStyle->StyleSVG();
 
   bool checkedDashAndStrokeIsDashed = false;
   if (aFlags != eIgnoreStrokeDashing) {
     DashState dashState =
       GetStrokeDashData(aStrokeOptions, aElement, styleSVG, aContextPaint);
 
     if (dashState == eNoStroke) {
       // Hopefully this will shortcircuit any stroke operations:
@@ -202,17 +202,17 @@ SVGContentUtils::GetStrokeOptions(AutoSt
     if (dashState == eContinuousStroke && aStrokeOptions->mDashPattern) {
       // Prevent our caller from wasting time looking at a pattern without gaps:
       aStrokeOptions->DiscardDashPattern();
     }
     checkedDashAndStrokeIsDashed = (dashState == eDashedStroke);
   }
 
   aStrokeOptions->mLineWidth =
-    GetStrokeWidth(aElement, styleContext, aContextPaint);
+    GetStrokeWidth(aElement, computedStyle, aContextPaint);
 
   aStrokeOptions->mMiterLimit = Float(styleSVG->mStrokeMiterlimit);
 
   switch (styleSVG->mStrokeLinejoin) {
   case NS_STYLE_STROKE_LINEJOIN_MITER:
     aStrokeOptions->mLineJoin = JoinStyle::MITER_OR_BEVEL;
     break;
   case NS_STYLE_STROKE_LINEJOIN_ROUND:
@@ -243,52 +243,52 @@ SVGContentUtils::GetStrokeOptions(AutoSt
   }
 }
 
 Float
 SVGContentUtils::GetStrokeWidth(nsSVGElement* aElement,
                                 ComputedStyle* aComputedStyle,
                                 SVGContextPaint* aContextPaint)
 {
-  RefPtr<ComputedStyle> styleContext;
+  RefPtr<ComputedStyle> computedStyle;
   if (aComputedStyle) {
-    styleContext = aComputedStyle;
+    computedStyle = aComputedStyle;
   } else {
-    styleContext =
+    computedStyle =
       nsComputedDOMStyle::GetComputedStyleNoFlush(aElement, nullptr);
   }
 
-  if (!styleContext) {
+  if (!computedStyle) {
     return 0.0f;
   }
 
-  const nsStyleSVG* styleSVG = styleContext->StyleSVG();
+  const nsStyleSVG* styleSVG = computedStyle->StyleSVG();
 
   if (aContextPaint && styleSVG->StrokeWidthFromObject()) {
     return aContextPaint->GetStrokeWidth();
   }
 
   return SVGContentUtils::CoordToFloat(aElement, styleSVG->mStrokeWidth);
 }
 
 float
 SVGContentUtils::GetFontSize(Element *aElement)
 {
   if (!aElement)
     return 1.0f;
 
-  RefPtr<ComputedStyle> styleContext =
+  RefPtr<ComputedStyle> computedStyle =
     nsComputedDOMStyle::GetComputedStyleNoFlush(aElement, nullptr);
-  if (!styleContext) {
+  if (!computedStyle) {
     // ReportToConsole
     NS_WARNING("Couldn't get style context for content in GetFontStyle");
     return 1.0f;
   }
 
-  return GetFontSize(styleContext);
+  return GetFontSize(computedStyle);
 }
 
 float
 SVGContentUtils::GetFontSize(nsIFrame *aFrame)
 {
   MOZ_ASSERT(aFrame, "NULL frame in GetFontSize");
   return GetFontSize(aFrame->Style());
 }
@@ -307,25 +307,25 @@ SVGContentUtils::GetFontSize(ComputedSty
 }
 
 float
 SVGContentUtils::GetFontXHeight(Element *aElement)
 {
   if (!aElement)
     return 1.0f;
 
-  RefPtr<ComputedStyle> styleContext =
+  RefPtr<ComputedStyle> computedStyle =
     nsComputedDOMStyle::GetComputedStyleNoFlush(aElement, nullptr);
-  if (!styleContext) {
+  if (!computedStyle) {
     // ReportToConsole
     NS_WARNING("Couldn't get style context for content in GetFontStyle");
     return 1.0f;
   }
 
-  return GetFontXHeight(styleContext);
+  return GetFontXHeight(computedStyle);
 }
 
 float
 SVGContentUtils::GetFontXHeight(nsIFrame *aFrame)
 {
   MOZ_ASSERT(aFrame, "NULL frame in GetFontXHeight");
   return GetFontXHeight(aFrame->Style());
 }
--- a/dom/svg/SVGGeometryElement.cpp
+++ b/dom/svg/SVGGeometryElement.cpp
@@ -133,24 +133,24 @@ SVGGeometryElement::GetOrBuildPathForMea
   return GetOrBuildPath(drawTarget, fillRule);
 }
 
 FillRule
 SVGGeometryElement::GetFillRule()
 {
   FillRule fillRule = FillRule::FILL_WINDING; // Equivalent to StyleFillRule::Nonzero
 
-  RefPtr<ComputedStyle> styleContext =
+  RefPtr<ComputedStyle> computedStyle =
     nsComputedDOMStyle::GetComputedStyleNoFlush(this, nullptr);
 
-  if (styleContext) {
-    MOZ_ASSERT(styleContext->StyleSVG()->mFillRule == StyleFillRule::Nonzero ||
-               styleContext->StyleSVG()->mFillRule == StyleFillRule::Evenodd);
+  if (computedStyle) {
+    MOZ_ASSERT(computedStyle->StyleSVG()->mFillRule == StyleFillRule::Nonzero ||
+               computedStyle->StyleSVG()->mFillRule == StyleFillRule::Evenodd);
 
-    if (styleContext->StyleSVG()->mFillRule == StyleFillRule::Evenodd) {
+    if (computedStyle->StyleSVG()->mFillRule == StyleFillRule::Evenodd) {
       fillRule = FillRule::FILL_EVEN_ODD;
     }
   } else {
     // ReportToConsole
     NS_WARNING("Couldn't get style context for content in GetFillRule");
   }
 
   return fillRule;
--- a/dom/svg/SVGLengthList.h
+++ b/dom/svg/SVGLengthList.h
@@ -296,17 +296,17 @@ private:
  * SVGLengthList objects as if they were simply a list of float values in user
  * units. When consumers request the value at a given index, this class
  * dynamically converts the corresponding SVGLength from its actual unit and
  * returns its value in user units.
  *
  * Consumers should check that the user unit values returned are finite. Even
  * if the consumer can guarantee the list's element has a valid viewport
  * ancestor to resolve percentage units against, and a valid presContext and
- * styleContext to resolve absolute and em/ex units against, unit conversions
+ * ComputedStyle to resolve absolute and em/ex units against, unit conversions
  * could still overflow. In that case the value returned will be
  * numeric_limits<float>::quiet_NaN().
  */
 class MOZ_STACK_CLASS SVGUserUnitList
 {
 public:
 
   SVGUserUnitList()
--- a/dom/svg/SVGPathElement.cpp
+++ b/dom/svg/SVGPathElement.cpp
@@ -293,27 +293,28 @@ SVGPathElement::BuildPath(PathBuilder* a
   // spec regarding zero length sub-paths when square line caps are in use,
   // SVGPathData needs to know our stroke-linecap style and, if "square", then
   // also our stroke width. See the comment for
   // ApproximateZeroLengthSubpathSquareCaps for more info.
 
   uint8_t strokeLineCap = NS_STYLE_STROKE_LINECAP_BUTT;
   Float strokeWidth = 0;
 
-  RefPtr<ComputedStyle> styleContext =
+  RefPtr<ComputedStyle> computedStyle =
     nsComputedDOMStyle::GetComputedStyleNoFlush(this, nullptr);
-  if (styleContext) {
-    const nsStyleSVG* style = styleContext->StyleSVG();
+  if (computedStyle) {
+    const nsStyleSVG* style = computedStyle->StyleSVG();
     // Note: the path that we return may be used for hit-testing, and SVG
     // exposes hit-testing of strokes that are not actually painted. For that
     // reason we do not check for eStyleSVGPaintType_None or check the stroke
     // opacity here.
     if (style->mStrokeLinecap != NS_STYLE_STROKE_LINECAP_BUTT) {
       strokeLineCap = style->mStrokeLinecap;
-      strokeWidth = SVGContentUtils::GetStrokeWidth(this, styleContext, nullptr);
+      strokeWidth =
+        SVGContentUtils::GetStrokeWidth(this, computedStyle, nullptr);
     }
   }
 
   return mD.GetAnimValue().BuildPath(aBuilder, strokeLineCap, strokeWidth);
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -2069,24 +2069,24 @@ nsCSSFrameConstructor::ConstructTable(ns
                                       const nsStyleDisplay*    aDisplay,
                                       nsFrameItems&            aFrameItems)
 {
   NS_PRECONDITION(aDisplay->mDisplay == StyleDisplay::Table ||
                   aDisplay->mDisplay == StyleDisplay::InlineTable,
                   "Unexpected call");
 
   nsIContent* const content = aItem.mContent;
-  ComputedStyle* const styleContext = aItem.mComputedStyle;
+  ComputedStyle* const computedStyle = aItem.mComputedStyle;
   const uint32_t nameSpaceID = aItem.mNameSpaceID;
 
   // create the pseudo SC for the table wrapper as a child of the inner SC
   RefPtr<ComputedStyle> outerComputedStyle;
   outerComputedStyle = mPresShell->StyleSet()->
     ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::tableWrapper,
-                                       styleContext);
+                                       computedStyle);
 
   // Create the table wrapper frame which holds the caption and inner table frame
   nsContainerFrame* newFrame;
   if (kNameSpaceID_MathML == nameSpaceID)
     newFrame = NS_NewMathMLmtableOuterFrame(mPresShell, outerComputedStyle);
   else
     newFrame = NS_NewTableWrapperFrame(mPresShell, outerComputedStyle);
 
@@ -2095,19 +2095,19 @@ nsCSSFrameConstructor::ConstructTable(ns
                               aParentFrame);
 
   // Init the table wrapper frame
   InitAndRestoreFrame(aState, content, geometricParent, newFrame);
 
   // Create the inner table frame
   nsContainerFrame* innerFrame;
   if (kNameSpaceID_MathML == nameSpaceID)
-    innerFrame = NS_NewMathMLmtableFrame(mPresShell, styleContext);
+    innerFrame = NS_NewMathMLmtableFrame(mPresShell, computedStyle);
   else
-    innerFrame = NS_NewTableFrame(mPresShell, styleContext);
+    innerFrame = NS_NewTableFrame(mPresShell, computedStyle);
 
   InitAndRestoreFrame(aState, content, newFrame, innerFrame);
   innerFrame->AddStateBits(NS_FRAME_OWNS_ANON_BOXES);
 
   // Put the newly created frames into the right child list
   SetInitialSingleChild(newFrame, innerFrame);
 
   aState.AddChild(newFrame, aFrameItems, content, aParentFrame);
@@ -2134,17 +2134,17 @@ nsCSSFrameConstructor::ConstructTable(ns
                "implementations for table frames are not currently expected "
                "to output a list where the items have their own children");
   if (aItem.mFCData->mBits & FCDATA_USE_CHILD_ITEMS) {
     ConstructFramesFromItemList(aState, aItem.mChildItems,
                                 innerFrame,
                                 aItem.mFCData->mBits & FCDATA_IS_WRAPPER_ANON_BOX,
                                 childItems);
   } else {
-    ProcessChildren(aState, content, styleContext, innerFrame,
+    ProcessChildren(aState, content, computedStyle, innerFrame,
                     true, childItems, false, aItem.mPendingBinding);
   }
 
   nsFrameItems captionItems;
   PullOutCaptionFrames(childItems, captionItems);
 
   // Set the inner table frame's initial primary list
   innerFrame->SetInitialChildList(kPrincipalList, childItems);
@@ -2188,27 +2188,27 @@ nsCSSFrameConstructor::ConstructTableRow
   MOZ_ASSERT(aDisplay->mDisplay == StyleDisplay::TableRow ||
              aDisplay->mDisplay == StyleDisplay::TableRowGroup ||
              aDisplay->mDisplay == StyleDisplay::TableFooterGroup ||
              aDisplay->mDisplay == StyleDisplay::TableHeaderGroup,
              "Not a row or row group");
   MOZ_ASSERT(aItem.mComputedStyle->StyleDisplay() == aDisplay,
              "Display style doesn't match style");
   nsIContent* const content = aItem.mContent;
-  ComputedStyle* const styleContext = aItem.mComputedStyle;
+  ComputedStyle* const computedStyle = aItem.mComputedStyle;
   const uint32_t nameSpaceID = aItem.mNameSpaceID;
 
   nsContainerFrame* newFrame;
   if (aDisplay->mDisplay == StyleDisplay::TableRow) {
     if (kNameSpaceID_MathML == nameSpaceID)
-      newFrame = NS_NewMathMLmtrFrame(mPresShell, styleContext);
+      newFrame = NS_NewMathMLmtrFrame(mPresShell, computedStyle);
     else
-      newFrame = NS_NewTableRowFrame(mPresShell, styleContext);
+      newFrame = NS_NewTableRowFrame(mPresShell, computedStyle);
   } else {
-    newFrame = NS_NewTableRowGroupFrame(mPresShell, styleContext);
+    newFrame = NS_NewTableRowGroupFrame(mPresShell, computedStyle);
   }
 
   InitAndRestoreFrame(aState, content, aParentFrame, newFrame);
 
   nsFrameConstructorSaveState absoluteSaveState;
   MakeTablePartAbsoluteContainingBlockIfNeeded(aState, aDisplay,
                                                absoluteSaveState,
                                                newFrame);
@@ -2218,46 +2218,46 @@ nsCSSFrameConstructor::ConstructTableRow
                "nsIAnonymousContentCreator::CreateAnonymousContent "
                "implementations for table frames are not currently expected "
                "to output a list where the items have their own children");
   if (aItem.mFCData->mBits & FCDATA_USE_CHILD_ITEMS) {
     ConstructFramesFromItemList(aState, aItem.mChildItems, newFrame,
                                 aItem.mFCData->mBits & FCDATA_IS_WRAPPER_ANON_BOX,
                                 childItems);
   } else {
-    ProcessChildren(aState, content, styleContext, newFrame,
+    ProcessChildren(aState, content, computedStyle, newFrame,
                     true, childItems, false, aItem.mPendingBinding);
   }
 
   newFrame->SetInitialChildList(kPrincipalList, childItems);
   aFrameItems.AddChild(newFrame);
   return newFrame;
 }
 
 nsIFrame*
 nsCSSFrameConstructor::ConstructTableCol(nsFrameConstructorState& aState,
                                          FrameConstructionItem&   aItem,
                                          nsContainerFrame*        aParentFrame,
                                          const nsStyleDisplay*    aStyleDisplay,
                                          nsFrameItems&            aFrameItems)
 {
   nsIContent* const content = aItem.mContent;
-  ComputedStyle* const styleContext = aItem.mComputedStyle;
-
-  nsTableColFrame* colFrame = NS_NewTableColFrame(mPresShell, styleContext);
+  ComputedStyle* const computedStyle = aItem.mComputedStyle;
+
+  nsTableColFrame* colFrame = NS_NewTableColFrame(mPresShell, computedStyle);
   InitAndRestoreFrame(aState, content, aParentFrame, colFrame);
 
-  NS_ASSERTION(colFrame->Style() == styleContext, "Unexpected style");
+  NS_ASSERTION(colFrame->Style() == computedStyle, "Unexpected style");
 
   aFrameItems.AddChild(colFrame);
 
   // construct additional col frames if the col frame has a span > 1
   int32_t span = colFrame->GetSpan();
   for (int32_t spanX = 1; spanX < span; spanX++) {
-    nsTableColFrame* newCol = NS_NewTableColFrame(mPresShell, styleContext);
+    nsTableColFrame* newCol = NS_NewTableColFrame(mPresShell, computedStyle);
     InitAndRestoreFrame(aState, content, aParentFrame, newCol, false);
     aFrameItems.LastChild()->SetNextContinuation(newCol);
     newCol->SetPrevContinuation(aFrameItems.LastChild());
     aFrameItems.AddChild(newCol);
     newCol->SetColType(eColAnonymousCol);
   }
 
   return colFrame;
@@ -2269,47 +2269,47 @@ nsCSSFrameConstructor::ConstructTableCel
                                           nsContainerFrame*        aParentFrame,
                                           const nsStyleDisplay*    aDisplay,
                                           nsFrameItems&            aFrameItems)
 {
   MOZ_ASSERT(aDisplay->mDisplay == StyleDisplay::TableCell,
              "Unexpected call");
 
   nsIContent* const content = aItem.mContent;
-  ComputedStyle* const styleContext = aItem.mComputedStyle;
+  ComputedStyle* const computedStyle = aItem.mComputedStyle;
   const uint32_t nameSpaceID = aItem.mNameSpaceID;
 
   nsTableFrame* tableFrame =
     static_cast<nsTableRowFrame*>(aParentFrame)->GetTableFrame();
   nsContainerFrame* newFrame;
   // <mtable> is border separate in mathml.css and the MathML code doesn't implement
   // border collapse. For those users who style <mtable> with border collapse,
   // give them the default non-MathML table frames that understand border collapse.
   // This won't break us because MathML table frames are all subclasses of the default
   // table code, and so we can freely mix <mtable> with <mtr> or <tr>, <mtd> or <td>.
   // What will happen is just that non-MathML frames won't understand MathML attributes
   // and will therefore miss the special handling that the MathML code does.
   if (kNameSpaceID_MathML == nameSpaceID && !tableFrame->IsBorderCollapse()) {
-    newFrame = NS_NewMathMLmtdFrame(mPresShell, styleContext, tableFrame);
+    newFrame = NS_NewMathMLmtdFrame(mPresShell, computedStyle, tableFrame);
   } else {
     // Warning: If you change this and add a wrapper frame around table cell
     // frames, make sure Bug 368554 doesn't regress!
     // See IsInAutoWidthTableCellForQuirk() in nsImageFrame.cpp.
-    newFrame = NS_NewTableCellFrame(mPresShell, styleContext, tableFrame);
+    newFrame = NS_NewTableCellFrame(mPresShell, computedStyle, tableFrame);
   }
 
   // Initialize the table cell frame
   InitAndRestoreFrame(aState, content, aParentFrame, newFrame);
   newFrame->AddStateBits(NS_FRAME_OWNS_ANON_BOXES);
 
   // Resolve pseudo style and initialize the body cell frame
   RefPtr<ComputedStyle> innerPseudoStyle;
   innerPseudoStyle = mPresShell->StyleSet()->
     ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::cellContent,
-                                       styleContext);
+                                       computedStyle);
 
   // Create a block frame that will format the cell's content
   bool isBlock;
   nsContainerFrame* cellInnerFrame;
   if (kNameSpaceID_MathML == nameSpaceID) {
     cellInnerFrame = NS_NewMathMLmtdInnerFrame(mPresShell, innerPseudoStyle);
     isBlock = false;
   } else {
@@ -2341,17 +2341,17 @@ nsCSSFrameConstructor::ConstructTableCel
       aState.PushFloatContainingBlock(cellInnerFrame, floatSaveState);
     }
 
     ConstructFramesFromItemList(aState, aItem.mChildItems, cellInnerFrame,
                                 aItem.mFCData->mBits & FCDATA_IS_WRAPPER_ANON_BOX,
                                 childItems);
   } else {
     // Process the child content
-    ProcessChildren(aState, content, styleContext, cellInnerFrame,
+    ProcessChildren(aState, content, computedStyle, cellInnerFrame,
                     true, childItems, isBlock, aItem.mPendingBinding);
   }
 
   cellInnerFrame->SetInitialChildList(kPrincipalList, childItems);
   SetInitialSingleChild(newFrame, cellInnerFrame);
   aFrameItems.AddChild(newFrame);
   return newFrame;
 }
@@ -2450,20 +2450,20 @@ nsCSSFrameConstructor::ConstructDocEleme
     if (!aDocElement->HasServoData()) {
       // NOTE(emilio): If the root has a non-null binding, we'll stop at the
       // document element and won't process any children, loading the bindings
       // (or failing to do so) will take care of the rest.
       set->StyleNewSubtree(aDocElement);
     }
   }
 
-  RefPtr<ComputedStyle> styleContext =
+  RefPtr<ComputedStyle> computedStyle =
     mPresShell->StyleSet()->AsServo()->ResolveServoStyle(aDocElement);
 
-  const nsStyleDisplay* display = styleContext->StyleDisplay();
+  const nsStyleDisplay* display = computedStyle->StyleDisplay();
 
   // Ensure that our XBL bindings are installed.
   if (display->mBinding) {
     // Get the XBL loader.
     nsresult rv;
     bool resolveStyle;
 
     nsXBLService* xblService = nsXBLService::GetInstance();
@@ -2483,36 +2483,36 @@ nsCSSFrameConstructor::ConstructDocEleme
     if (binding) {
       // For backwards compat, keep firing the root's constructor
       // after all of its kids' constructors.  So tell the binding
       // manager about it right now.
       mDocument->BindingManager()->AddToAttachedQueue(binding);
     }
 
     if (resolveStyle) {
-      styleContext =
+      computedStyle =
         mPresShell->StyleSet()->AsServo()->ResolveServoStyle(aDocElement);
-      display = styleContext->StyleDisplay();
+      display = computedStyle->StyleDisplay();
     }
   }
 
   // --------- IF SCROLLABLE WRAP IN SCROLLFRAME --------
 
   NS_ASSERTION(!display->IsScrollableOverflow() ||
                state.mPresContext->IsPaginated() ||
                propagatedScrollFrom == aDocElement,
                "Scrollbars should have been propagated to the viewport");
 
   if (MOZ_UNLIKELY(display->mDisplay == StyleDisplay::None)) {
-    RegisterDisplayNoneStyleFor(aDocElement, styleContext);
+    RegisterDisplayNoneStyleFor(aDocElement, computedStyle);
     return nullptr;
   }
 
   // Make sure to start any background image loads for the root element now.
-  styleContext->StartBackgroundImageLoads();
+  computedStyle->StartBackgroundImageLoads();
 
   nsFrameConstructorSaveState docElementContainingBlockAbsoluteSaveState;
   if (mHasRootAbsPosContainingBlock) {
     // Push the absolute containing block now so we can absolutely position
     // the root element
     mDocElementContainingBlock->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
     state.PushAbsoluteContainingBlock(mDocElementContainingBlock,
                                       mDocElementContainingBlock,
@@ -2533,17 +2533,17 @@ nsCSSFrameConstructor::ConstructDocEleme
   nsIFrame* newFrame;
   bool processChildren = false;
 
   nsFrameConstructorSaveState absoluteSaveState;
 
   // Check whether we need to build a XUL box or SVG root frame
 #ifdef MOZ_XUL
   if (aDocElement->IsXULElement()) {
-    contentFrame = NS_NewDocElementBoxFrame(mPresShell, styleContext);
+    contentFrame = NS_NewDocElementBoxFrame(mPresShell, computedStyle);
     InitAndRestoreFrame(state, aDocElement, mDocElementContainingBlock,
                         contentFrame);
     newFrame = contentFrame;
     processChildren = true;
   }
   else
 #endif
   if (aDocElement->IsSVGElement()) {
@@ -2555,47 +2555,47 @@ nsCSSFrameConstructor::ConstructDocEleme
 
     // XXXbz on the other hand, if we converted this whole function to
     // FrameConstructionData/Item, then we'd need the right function
     // here... but would probably be able to get away with less code in this
     // function in general.
     // Use a null PendingBinding, since our binding is not in fact pending.
     static const FrameConstructionData rootSVGData = FCDATA_DECL(0, nullptr);
     already_AddRefed<ComputedStyle> extraRef =
-      RefPtr<ComputedStyle>(styleContext).forget();
+      RefPtr<ComputedStyle>(computedStyle).forget();
     AutoFrameConstructionItem item(this, &rootSVGData, aDocElement,
                                    aDocElement->NodeInfo()->NameAtom(),
                                    kNameSpaceID_SVG, nullptr, extraRef, true,
                                    nullptr);
 
     nsFrameItems frameItems;
     contentFrame = static_cast<nsContainerFrame*>(
       ConstructOuterSVG(state, item, mDocElementContainingBlock,
-                        styleContext->StyleDisplay(),
+                        computedStyle->StyleDisplay(),
                         frameItems));
     newFrame = frameItems.FirstChild();
     NS_ASSERTION(frameItems.OnlyChild(), "multiple root element frames");
   } else if (display->mDisplay == StyleDisplay::Flex ||
              display->mDisplay == StyleDisplay::WebkitBox ||
              (StylePrefs::sEmulateMozBoxWithFlex &&
               display->mDisplay == StyleDisplay::MozBox)) {
-    contentFrame = NS_NewFlexContainerFrame(mPresShell, styleContext);
+    contentFrame = NS_NewFlexContainerFrame(mPresShell, computedStyle);
     InitAndRestoreFrame(state, aDocElement, mDocElementContainingBlock,
                         contentFrame);
     newFrame = contentFrame;
     processChildren = true;
 
     newFrame->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
     if (display->IsAbsPosContainingBlock(newFrame)) {
       state.PushAbsoluteContainingBlock(contentFrame, newFrame,
                                         absoluteSaveState);
     }
 
   } else if (display->mDisplay == StyleDisplay::Grid) {
-    contentFrame = NS_NewGridContainerFrame(mPresShell, styleContext);
+    contentFrame = NS_NewGridContainerFrame(mPresShell, computedStyle);
     InitAndRestoreFrame(state, aDocElement, mDocElementContainingBlock,
                         contentFrame);
     newFrame = contentFrame;
     processChildren = true;
 
     newFrame->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
     if (display->IsAbsPosContainingBlock(newFrame)) {
       state.PushAbsoluteContainingBlock(contentFrame, newFrame,
@@ -2607,41 +2607,41 @@ nsCSSFrameConstructor::ConstructDocEleme
 
     // XXXbz on the other hand, if we converted this whole function to
     // FrameConstructionData/Item, then we'd need the right function
     // here... but would probably be able to get away with less code in this
     // function in general.
     // Use a null PendingBinding, since our binding is not in fact pending.
     static const FrameConstructionData rootTableData = FCDATA_DECL(0, nullptr);
     already_AddRefed<ComputedStyle> extraRef =
-      RefPtr<ComputedStyle>(styleContext).forget();
+      RefPtr<ComputedStyle>(computedStyle).forget();
     AutoFrameConstructionItem item(this, &rootTableData, aDocElement,
                                    aDocElement->NodeInfo()->NameAtom(),
                                    kNameSpaceID_None, nullptr, extraRef, true,
                                    nullptr);
 
     nsFrameItems frameItems;
     // if the document is a table then just populate it.
     contentFrame = static_cast<nsContainerFrame*>(
       ConstructTable(state, item, mDocElementContainingBlock,
-                     styleContext->StyleDisplay(),
+                     computedStyle->StyleDisplay(),
                      frameItems));
     newFrame = frameItems.FirstChild();
     NS_ASSERTION(frameItems.OnlyChild(), "multiple root element frames");
   } else {
     MOZ_ASSERT(display->mDisplay == StyleDisplay::Block ||
                display->mDisplay == StyleDisplay::FlowRoot,
                "Unhandled display type for root element");
-    contentFrame = NS_NewBlockFormattingContext(mPresShell, styleContext);
+    contentFrame = NS_NewBlockFormattingContext(mPresShell, computedStyle);
     nsFrameItems frameItems;
     // Use a null PendingBinding, since our binding is not in fact pending.
     ConstructBlock(state, aDocElement,
                    state.GetGeometricParent(display,
                                             mDocElementContainingBlock),
-                   mDocElementContainingBlock, styleContext,
+                   mDocElementContainingBlock, computedStyle,
                    &contentFrame, frameItems,
                    display->IsAbsPosContainingBlock(contentFrame) ? contentFrame : nullptr,
                    nullptr);
     newFrame = frameItems.FirstChild();
     NS_ASSERTION(frameItems.OnlyChild(), "multiple root element frames");
   }
 
   MOZ_ASSERT(newFrame);
@@ -2665,17 +2665,17 @@ nsCSSFrameConstructor::ConstructDocEleme
   if (processChildren) {
     // Still need to process the child content
     nsFrameItems childItems;
 
     NS_ASSERTION(!nsLayoutUtils::GetAsBlock(contentFrame) &&
                  !contentFrame->IsFrameOfType(nsIFrame::eSVG),
                  "Only XUL frames should reach here");
     // Use a null PendingBinding, since our binding is not in fact pending.
-    ProcessChildren(state, aDocElement, styleContext, contentFrame, true,
+    ProcessChildren(state, aDocElement, computedStyle, contentFrame, true,
                     childItems, false, nullptr);
 
     // Set the initial child lists
     contentFrame->SetInitialChildList(kPrincipalList, childItems);
   }
 
   // set the primary frame
   aDocElement->SetPrimaryFrame(contentFrame);
@@ -2880,32 +2880,31 @@ nsCSSFrameConstructor::SetUpDocElementCo
       }
 
       // Build the frame. We give it the content we are wrapping which is the
       // document element, the root frame, the parent view port frame, and we
       // should get back the new frame and the scrollable view if one was
       // created.
 
       // resolve a context for the scrollframe
-      RefPtr<ComputedStyle>  styleContext;
-      styleContext =
+      RefPtr<ComputedStyle>  computedStyle =
         styleSet->ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::viewportScroll,
                                                      viewportPseudoStyle);
 
       // Note that the viewport scrollframe is always built with
       // overflow:auto style. This forces the scroll frame to create
       // anonymous content for both scrollbars. This is necessary even
       // if the HTML or BODY elements are overriding the viewport
       // scroll style to 'hidden' --- dynamic style changes might put
       // scrollbars back on the viewport and we don't want to have to
       // reframe the viewport to create the scrollbar content.
       newFrame = nullptr;
       rootPseudoStyle = BeginBuildingScrollFrame( state,
                                                   aDocElement,
-                                                  styleContext,
+                                                  computedStyle,
                                                   viewportFrame,
                                                   rootPseudo,
                                                   true,
                                                   newFrame);
       parentFrame = newFrame;
   }
 
   rootFrame->SetComputedStyleWithoutNotification(rootPseudoStyle);
@@ -3071,30 +3070,30 @@ ClearLazyBits(nsIContent* aStartContent,
 nsIFrame*
 nsCSSFrameConstructor::ConstructSelectFrame(nsFrameConstructorState& aState,
                                             FrameConstructionItem&   aItem,
                                             nsContainerFrame*        aParentFrame,
                                             const nsStyleDisplay*    aStyleDisplay,
                                             nsFrameItems&            aFrameItems)
 {
   nsIContent* const content = aItem.mContent;
-  ComputedStyle* const styleContext = aItem.mComputedStyle;
+  ComputedStyle* const computedStyle = aItem.mComputedStyle;
 
   // Construct a frame-based listbox or combobox
   dom::HTMLSelectElement* sel = dom::HTMLSelectElement::FromNode(content);
   MOZ_ASSERT(sel);
   if (sel->IsCombobox()) {
     // Construct a frame-based combo box.
     // The frame-based combo box is built out of three parts. A display area, a button and
     // a dropdown list. The display area and button are created through anonymous content.
     // The drop-down list's frame is created explicitly. The combobox frame shares its content
     // with the drop-down list.
     nsFrameState flags = NS_BLOCK_FLOAT_MGR;
     nsComboboxControlFrame* comboboxFrame =
-      NS_NewComboboxControlFrame(mPresShell, styleContext, flags);
+      NS_NewComboboxControlFrame(mPresShell, computedStyle, flags);
 
     // Save the history state so we don't restore during construction
     // since the complete tree is required before we restore.
     nsILayoutHistoryState *historyState = aState.mFrameState;
     aState.mFrameState = nullptr;
     // Initialize the combobox frame
     InitAndRestoreFrame(aState, content,
                         aState.GetGeometricParent(aStyleDisplay, aParentFrame),
@@ -3103,17 +3102,17 @@ nsCSSFrameConstructor::ConstructSelectFr
     comboboxFrame->AddStateBits(NS_FRAME_OWNS_ANON_BOXES);
 
     aState.AddChild(comboboxFrame, aFrameItems, content, aParentFrame);
 
     // Resolve pseudo element style for the dropdown list
     RefPtr<ComputedStyle> listStyle;
     listStyle = mPresShell->StyleSet()->
       ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::dropDownList,
-                                         styleContext);
+                                         computedStyle);
 
     // Create a listbox
     nsContainerFrame* listFrame = NS_NewListControlFrame(mPresShell, listStyle);
 
     // Notify the listbox that it is being used as a dropdown list.
     nsIListControlFrame * listControlFrame = do_QueryFrame(listFrame);
     if (listControlFrame) {
       listControlFrame->SetComboboxFrame(comboboxFrame);
@@ -3130,17 +3129,17 @@ nsCSSFrameConstructor::ConstructSelectFr
                  "Ended up with floating dropdown list somehow.");
 
     // child frames of combobox frame
     nsFrameItems childItems;
 
     // Initialize the scroll frame positioned. Note that it is NOT
     // initialized as absolutely positioned.
     nsContainerFrame* scrolledFrame =
-      NS_NewSelectsAreaFrame(mPresShell, styleContext, flags);
+      NS_NewSelectsAreaFrame(mPresShell, computedStyle, flags);
 
     InitializeSelectFrame(aState, listFrame, scrolledFrame, content,
                           comboboxFrame, listStyle, true,
                           aItem.mPendingBinding, childItems);
 
     if (!nsLayoutUtils::IsContentSelectEnabled()) {
       // TODO(kuoe0) Remove this assertion when content-select is shipped.
       NS_ASSERTION(listFrame->GetView(), "ListFrame's view is nullptr");
@@ -3189,26 +3188,27 @@ nsCSSFrameConstructor::ConstructSelectFr
     if (aState.mFrameState) {
       // Restore frame state for the entire subtree of |comboboxFrame|.
       RestoreFrameState(comboboxFrame, aState.mFrameState);
     }
     return comboboxFrame;
   }
 
   // Listbox, not combobox
-  nsContainerFrame* listFrame = NS_NewListControlFrame(mPresShell, styleContext);
+  nsContainerFrame* listFrame =
+    NS_NewListControlFrame(mPresShell, computedStyle);
 
   nsContainerFrame* scrolledFrame = NS_NewSelectsAreaFrame(
-      mPresShell, styleContext, NS_BLOCK_FLOAT_MGR);
+      mPresShell, computedStyle, NS_BLOCK_FLOAT_MGR);
 
   // ******* this code stolen from Initialze ScrollFrame ********
   // please adjust this code to use BuildScrollFrame.
 
   InitializeSelectFrame(aState, listFrame, scrolledFrame, content,
-                        aParentFrame, styleContext, false,
+                        aParentFrame, computedStyle, false,
                         aItem.mPendingBinding, aFrameItems);
 
   return listFrame;
 }
 
 /**
  * Used to be InitializeScrollFrame but now it's only used for the select tag
  * But the select tag should really be fixed to use GFX scrollbars that can
@@ -3260,32 +3260,33 @@ nsCSSFrameConstructor::InitializeSelectF
 nsIFrame*
 nsCSSFrameConstructor::ConstructFieldSetFrame(nsFrameConstructorState& aState,
                                               FrameConstructionItem&   aItem,
                                               nsContainerFrame*        aParentFrame,
                                               const nsStyleDisplay*    aStyleDisplay,
                                               nsFrameItems&            aFrameItems)
 {
   nsIContent* const content = aItem.mContent;
-  ComputedStyle* const styleContext = aItem.mComputedStyle;
-
-  nsContainerFrame* fieldsetFrame = NS_NewFieldSetFrame(mPresShell, styleContext);
+  ComputedStyle* const computedStyle = aItem.mComputedStyle;
+
+  nsContainerFrame* fieldsetFrame =
+    NS_NewFieldSetFrame(mPresShell, computedStyle);
 
   // Initialize it
   InitAndRestoreFrame(aState, content,
                       aState.GetGeometricParent(aStyleDisplay, aParentFrame),
                       fieldsetFrame);
 
   fieldsetFrame->AddStateBits(NS_FRAME_OWNS_ANON_BOXES);
 
   // Resolve style and initialize the frame
   RefPtr<ComputedStyle> fieldsetContentStyle;
   fieldsetContentStyle = mPresShell->StyleSet()->
     ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::fieldsetContent,
-                                       styleContext);
+                                       computedStyle);
 
   const nsStyleDisplay* fieldsetContentDisplay = fieldsetContentStyle->StyleDisplay();
   bool isScrollable = fieldsetContentDisplay->IsScrollableOverflow();
   nsContainerFrame* scrollFrame = nullptr;
   if (isScrollable) {
     fieldsetContentStyle =
       BeginBuildingScrollFrame(aState, content, fieldsetContentStyle,
                                fieldsetFrame, nsCSSAnonBoxes::scrolledContent,
@@ -3351,17 +3352,17 @@ nsCSSFrameConstructor::ConstructFieldSet
   nsFrameConstructorSaveState absoluteSaveState;
   nsFrameItems                childItems;
 
   contentFrame->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
   if (absPosContainer) {
     aState.PushAbsoluteContainingBlock(contentFrame, absPosContainer, absoluteSaveState);
   }
 
-  ProcessChildren(aState, content, styleContext, contentFrame, true,
+  ProcessChildren(aState, content, computedStyle, contentFrame, true,
                   childItems, true, aItem.mPendingBinding);
 
   nsFrameItems fieldsetKids;
   fieldsetKids.AddChild(scrollFrame ? scrollFrame : contentFrameTop);
 
   for (nsFrameList::Enumerator e(childItems); !e.AtEnd(); e.Next()) {
     nsIFrame* child = e.get();
     nsContainerFrame* cif = child->GetContentInsertionFrame();
@@ -3866,27 +3867,27 @@ nsCSSFrameConstructor::ConstructFrameFro
       aItem.mContent->IsHTMLElement(nsGkAtoms::iframe))
   {
     return;
   }
 
   nsIContent* const content = aItem.mContent;
   nsIFrame* newFrame;
   nsIFrame* primaryFrame;
-  ComputedStyle* const styleContext = aItem.mComputedStyle;
-  const nsStyleDisplay* display = styleContext->StyleDisplay();
+  ComputedStyle* const computedStyle = aItem.mComputedStyle;
+  const nsStyleDisplay* display = computedStyle->StyleDisplay();
   if (bits & FCDATA_FUNC_IS_FULL_CTOR) {
     newFrame =
       (this->*(data->mFullConstructor))(aState, aItem, aParentFrame,
                                         display, aFrameItems);
     MOZ_ASSERT(newFrame, "Full constructor failed");
     primaryFrame = newFrame;
   } else {
     newFrame =
-      (*data->mFunc.mCreationFunc)(mPresShell, styleContext);
+      (*data->mFunc.mCreationFunc)(mPresShell, computedStyle);
 
     bool allowOutOfFlow = !(bits & FCDATA_DISALLOW_OUT_OF_FLOW);
     bool isPopup = aItem.mIsPopup;
     NS_ASSERTION(!isPopup ||
                  (aState.mPopupItems.containingBlock &&
                   aState.mPopupItems.containingBlock->IsPopupSetFrame()),
                  "Should have a containing block here!");
 
@@ -3895,17 +3896,17 @@ nsCSSFrameConstructor::ConstructFrameFro
       (allowOutOfFlow ? aState.GetGeometricParent(display, aParentFrame)
                       : aParentFrame);
 
     // Must init frameToAddToList to null, since it's inout
     nsIFrame* frameToAddToList = nullptr;
     if ((bits & FCDATA_MAY_NEED_SCROLLFRAME) &&
         display->IsScrollableOverflow()) {
       nsContainerFrame* scrollframe = nullptr;
-      BuildScrollFrame(aState, content, styleContext, newFrame,
+      BuildScrollFrame(aState, content, computedStyle, newFrame,
                        geometricParent, scrollframe);
       frameToAddToList = scrollframe;
     } else {
       InitAndRestoreFrame(aState, content, geometricParent, newFrame);
       frameToAddToList = newFrame;
     }
 
     // Use frameToAddToList as the primary frame.  In the non-scrollframe case
@@ -3918,17 +3919,17 @@ nsCSSFrameConstructor::ConstructFrameFro
     // kids, do it now.
     const nsStyleDisplay* maybeAbsoluteContainingBlockDisplay = display;
     nsIFrame* maybeAbsoluteContainingBlockStyleFrame = primaryFrame;
     nsIFrame* maybeAbsoluteContainingBlock = newFrame;
     nsIFrame* possiblyLeafFrame = newFrame;
     if (bits & FCDATA_CREATE_BLOCK_WRAPPER_FOR_ALL_KIDS) {
       RefPtr<ComputedStyle> outerSC = mPresShell->StyleSet()->
         ResolveInheritingAnonymousBoxStyle(*data->mAnonBoxPseudo,
-                                           styleContext);
+                                           computedStyle);
 #ifdef DEBUG
       nsContainerFrame* containerFrame = do_QueryFrame(newFrame);
       MOZ_ASSERT(containerFrame);
 #endif
       nsContainerFrame* container = static_cast<nsContainerFrame*>(newFrame);
       nsContainerFrame* outerFrame;
       nsContainerFrame* innerFrame;
       if (bits & FCDATA_ALLOW_GRID_FLEX_COLUMNSET) {
@@ -4054,17 +4055,17 @@ nsCSSFrameConstructor::ConstructFrameFro
           aState.PushFloatContainingBlock(newFrameAsContainer, floatSaveState);
         }
         ConstructFramesFromItemList(aState, aItem.mChildItems,
                                     newFrameAsContainer,
                                     bits & FCDATA_IS_WRAPPER_ANON_BOX,
                                     childItems);
       } else {
         // Process the child frames.
-        ProcessChildren(aState, content, styleContext, newFrameAsContainer,
+        ProcessChildren(aState, content, computedStyle, newFrameAsContainer,
                         !(bits & FCDATA_DISALLOW_GENERATED_CONTENT),
                         childItems,
                         (bits & FCDATA_ALLOW_BLOCK_STYLES) != 0,
                         aItem.mPendingBinding, possiblyLeafFrame);
       }
 
       if (bits & FCDATA_WRAP_KIDS_IN_BLOCKS) {
         nsFrameItems newItems;
@@ -4905,28 +4906,28 @@ nsCSSFrameConstructor::ConstructScrollab
   nsFrameConstructorState& aState,
   FrameConstructionItem& aItem,
   nsContainerFrame* aParentFrame,
   const nsStyleDisplay* aDisplay,
   nsFrameItems& aFrameItems,
   BlockFrameCreationFunc aConstructor)
 {
   nsIContent* const content = aItem.mContent;
-  ComputedStyle* const styleContext = aItem.mComputedStyle;
+  ComputedStyle* const computedStyle = aItem.mComputedStyle;
 
   nsContainerFrame* newFrame = nullptr;
   RefPtr<ComputedStyle> scrolledContentStyle
-    = BeginBuildingScrollFrame(aState, content, styleContext,
+    = BeginBuildingScrollFrame(aState, content, computedStyle,
                                aState.GetGeometricParent(aDisplay, aParentFrame),
                                nsCSSAnonBoxes::scrolledContent,
                                false, newFrame);
 
   // Create our block frame
   // pass a temporary stylecontext, the correct one will be set later
-  nsContainerFrame* scrolledFrame = aConstructor(mPresShell, styleContext);
+  nsContainerFrame* scrolledFrame = aConstructor(mPresShell, computedStyle);
 
   // Make sure to AddChild before we call ConstructBlock so that we
   // end up before our descendants in fixed-pos lists as needed.
   aState.AddChild(newFrame, aFrameItems, content, aParentFrame);
 
   nsFrameItems blockItem;
   ConstructBlock(aState, content, newFrame, newFrame, scrolledContentStyle,
                  &scrolledFrame, blockItem,
@@ -4956,17 +4957,17 @@ nsIFrame*
 nsCSSFrameConstructor::ConstructNonScrollableBlockWithConstructor(
   nsFrameConstructorState& aState,
   FrameConstructionItem& aItem,
   nsContainerFrame* aParentFrame,
   const nsStyleDisplay* aDisplay,
   nsFrameItems& aFrameItems,
   BlockFrameCreationFunc aConstructor)
 {
-  ComputedStyle* const styleContext = aItem.mComputedStyle;
+  ComputedStyle* const computedStyle = aItem.mComputedStyle;
 
   // We want a block formatting context root in paginated contexts for
   // every block that would be scrollable in a non-paginated context.
   // We mark our blocks with a bit here if this condition is true, so
   // we can check it later in nsFrame::ApplyPaginatedOverflowClipping.
   bool clipPaginatedOverflow =
     (aItem.mFCData->mBits & FCDATA_FORCED_NON_SCROLLABLE_BLOCK) != 0;
   nsFrameState flags = nsFrameState(0);
@@ -4976,21 +4977,21 @@ nsCSSFrameConstructor::ConstructNonScrol
        clipPaginatedOverflow) &&
       !nsSVGUtils::IsInSVGTextSubtree(aParentFrame)) {
     flags = NS_BLOCK_FORMATTING_CONTEXT_STATE_BITS;
     if (clipPaginatedOverflow) {
       flags |= NS_BLOCK_CLIP_PAGINATED_OVERFLOW;
     }
   }
 
-  nsContainerFrame* newFrame = aConstructor(mPresShell, styleContext);
+  nsContainerFrame* newFrame = aConstructor(mPresShell, computedStyle);
   newFrame->AddStateBits(flags);
   ConstructBlock(aState, aItem.mContent,
                  aState.GetGeometricParent(aDisplay, aParentFrame),
-                 aParentFrame, styleContext, &newFrame,
+                 aParentFrame, computedStyle, &newFrame,
                  aFrameItems,
                  aDisplay->IsAbsPosContainingBlock(newFrame) ? newFrame : nullptr,
                  aItem.mPendingBinding);
   return newFrame;
 }
 
 
 void
@@ -5176,33 +5177,33 @@ nsCSSFrameConstructor::ConstructFrameWit
                                    nsContainerFrame*        aParentFrame,
                                    nsFrameItems&            aFrameItems,
                                    ContainerFrameCreationFunc aConstructor,
                                    ContainerFrameCreationFunc aInnerConstructor,
                                    nsICSSAnonBoxPseudo*     aInnerPseudo,
                                    bool                     aCandidateRootFrame)
 {
   nsIContent* const content = aItem.mContent;
-  ComputedStyle* const styleContext = aItem.mComputedStyle;
+  ComputedStyle* const computedStyle = aItem.mComputedStyle;
 
   // Create the outer frame:
-  nsContainerFrame* newFrame = aConstructor(mPresShell, styleContext);
+  nsContainerFrame* newFrame = aConstructor(mPresShell, computedStyle);
 
   InitAndRestoreFrame(aState, content,
                       aCandidateRootFrame ?
-                        aState.GetGeometricParent(styleContext->StyleDisplay(),
+                        aState.GetGeometricParent(computedStyle->StyleDisplay(),
                                                   aParentFrame) :
                         aParentFrame,
                       newFrame);
   newFrame->AddStateBits(NS_FRAME_OWNS_ANON_BOXES);
 
   // Create the pseudo SC for the anonymous wrapper child as a child of the SC:
   RefPtr<ComputedStyle> scForAnon;
   scForAnon = mPresShell->StyleSet()->
-    ResolveInheritingAnonymousBoxStyle(aInnerPseudo, styleContext);
+    ResolveInheritingAnonymousBoxStyle(aInnerPseudo, computedStyle);
 
   // Create the anonymous inner wrapper frame
   nsContainerFrame* innerFrame = aInnerConstructor(mPresShell, scForAnon);
 
   InitAndRestoreFrame(aState, content, newFrame, innerFrame);
 
   // Put the newly created frames into the right child list
   SetInitialSingleChild(newFrame, innerFrame);
@@ -5224,17 +5225,17 @@ nsCSSFrameConstructor::ConstructFrameWit
                "be implemented for frames for which we explicitly create an "
                "anonymous child to wrap its child frames");
   if (aItem.mFCData->mBits & FCDATA_USE_CHILD_ITEMS) {
     ConstructFramesFromItemList(aState, aItem.mChildItems,
                                 innerFrame,
                                 aItem.mFCData->mBits & FCDATA_IS_WRAPPER_ANON_BOX,
                                 childItems);
   } else {
-    ProcessChildren(aState, content, styleContext, innerFrame,
+    ProcessChildren(aState, content, computedStyle, innerFrame,
                     true, childItems, false, aItem.mPendingBinding);
   }
 
   // Set the inner wrapper frame's initial primary list
   innerFrame->SetInitialChildList(kPrincipalList, childItems);
 
   return newFrame;
 }
@@ -5632,18 +5633,18 @@ nsCSSFrameConstructor::AddFrameConstruct
                                                  bool aSuppressWhiteSpaceOptimizations,
                                                  const InsertionPoint& aInsertion,
                                                  FrameConstructionItemList& aItems)
 {
   nsContainerFrame* parentFrame = aInsertion.mParentFrame;
   if (!ShouldCreateItemsForChild(aState, aContent, parentFrame)) {
     return;
   }
-  RefPtr<ComputedStyle> styleContext = ResolveComputedStyle(aContent);
-  DoAddFrameConstructionItems(aState, aContent, styleContext,
+  RefPtr<ComputedStyle> computedStyle = ResolveComputedStyle(aContent);
+  DoAddFrameConstructionItems(aState, aContent, computedStyle,
                               aSuppressWhiteSpaceOptimizations, parentFrame,
                               nullptr, aItems);
 }
 
 void
 nsCSSFrameConstructor::SetAsUndisplayedContent(nsFrameConstructorState& aState,
                                                FrameConstructionItemList& aList,
                                                nsIContent* aContent,
@@ -5684,17 +5685,17 @@ nsCSSFrameConstructor::AddFrameConstruct
   MOZ_ASSERT(aContent->IsInComposedDoc());
   MOZ_ASSERT(!aContent->GetPrimaryFrame() || aState.mCreatingExtraFrames ||
              aContent->NodeInfo()->NameAtom() == nsGkAtoms::area);
 
   // The following code allows the user to specify the base tag
   // of an element using XBL.  XUL and HTML objects (like boxes, menus, etc.)
   // can then be extended arbitrarily.
   const nsStyleDisplay* display = aComputedStyle->StyleDisplay();
-  RefPtr<ComputedStyle> styleContext(aComputedStyle);
+  RefPtr<ComputedStyle> computedStyle(aComputedStyle);
   PendingBinding* pendingBinding = nullptr;
   if (aFlags & ITEM_ALLOW_XBL_BASE) {
     if (display->mBinding) {
       // Ensure that our XBL bindings are installed.
 
       nsXBLService* xblService = nsXBLService::GetInstance();
       if (!xblService)
         return;
@@ -5712,32 +5713,33 @@ nsCSSFrameConstructor::AddFrameConstruct
 
       if (newPendingBinding->mBinding) {
         pendingBinding = newPendingBinding;
         // aState takes over owning newPendingBinding
         aState.AddPendingBinding(newPendingBinding.forget());
       }
 
       if (resolveStyle) {
-        styleContext =
+        computedStyle =
           mPresShell->StyleSet()->AsServo()->ResolveServoStyle(aContent->AsElement());
       }
 
-      display = styleContext->StyleDisplay();
-      aComputedStyle = styleContext;
+      display = computedStyle->StyleDisplay();
+      aComputedStyle = computedStyle;
       aTag = mDocument->BindingManager()->ResolveTag(aContent, &aNameSpaceID);
     }
   }
 
   const bool isGeneratedContent = !!(aFlags & ITEM_IS_GENERATED_CONTENT);
 
   // Pre-check for display "none" - if we find that, don't create
   // any frame at all
   if (StyleDisplay::None == display->mDisplay) {
-    SetAsUndisplayedContent(aState, aItems, aContent, styleContext, isGeneratedContent);
+    SetAsUndisplayedContent(aState, aItems, aContent, computedStyle,
+                            isGeneratedContent);
     return;
   }
 
   bool isText = !aContent->IsElement();
 
   // never create frames for non-option/optgroup kids of <select> and
   // non-option kids of <optgroup> inside a <select>.
   // XXXbz it's not clear how this should best work with XBL.
@@ -5749,17 +5751,17 @@ nsCSSFrameConstructor::AddFrameConstruct
         !aContent->IsHTMLElement(nsGkAtoms::option) &&
         // <optgroup> is OK in <select> but not in <optgroup>
         (!aContent->IsHTMLElement(nsGkAtoms::optgroup) ||
          !parent->IsHTMLElement(nsGkAtoms::select)) &&
         // Allow native anonymous content no matter what
         !aContent->IsRootOfNativeAnonymousSubtree()) {
       // No frame for aContent
       if (!isText) {
-        SetAsUndisplayedContent(aState, aItems, aContent, styleContext,
+        SetAsUndisplayedContent(aState, aItems, aContent, computedStyle,
                                 isGeneratedContent);
       }
       return;
     }
   }
 
   // When constructing a child of a non-open <details>, create only the frame
   // for the main <summary> element, and skip other elements.  This only applies
@@ -5768,17 +5770,17 @@ nsCSSFrameConstructor::AddFrameConstruct
   // content.
   auto* details = HTMLDetailsElement::FromNodeOrNull(parent);
   if (details && !details->Open() &&
       (!aContent->IsRootOfNativeAnonymousSubtree() ||
        aContent->IsGeneratedContentContainerForBefore() ||
        aContent->IsGeneratedContentContainerForAfter())) {
     auto* summary = HTMLSummaryElement::FromNodeOrNull(aContent);
     if (!summary || !summary->IsMainSummary()) {
-      SetAsUndisplayedContent(aState, aItems, aContent, styleContext,
+      SetAsUndisplayedContent(aState, aItems, aContent, computedStyle,
                               isGeneratedContent);
       return;
     }
   }
 
   bool isPopup = false;
   bool foundMathMLData = false;
   // Try to find frame construction data for this content
@@ -5793,77 +5795,77 @@ nsCSSFrameConstructor::AddFrameConstruct
     Element* element = aContent->AsElement();
 
     // Don't create frames for non-SVG element children of SVG elements.
     if (aNameSpaceID != kNameSpaceID_SVG &&
         ((aParentFrame &&
           IsFrameForSVG(aParentFrame) &&
           !aParentFrame->IsFrameOfType(nsIFrame::eSVGForeignObject)) ||
          (aFlags & ITEM_IS_WITHIN_SVG_TEXT))) {
-      SetAsUndisplayedContent(aState, aItems, element, styleContext,
+      SetAsUndisplayedContent(aState, aItems, element, computedStyle,
                               isGeneratedContent);
       return;
     }
 
     data = FindHTMLData(element, aTag, aNameSpaceID, aParentFrame,
-                        styleContext);
+                        computedStyle);
     if (!data) {
-      data = FindXULTagData(element, aTag, aNameSpaceID, styleContext);
+      data = FindXULTagData(element, aTag, aNameSpaceID, computedStyle);
     }
     if (!data) {
-      data = FindMathMLData(element, aTag, aNameSpaceID, styleContext);
+      data = FindMathMLData(element, aTag, aNameSpaceID, computedStyle);
       foundMathMLData = !!data;
     }
     if (!data) {
       data = FindSVGData(element, aTag, aNameSpaceID, aParentFrame,
                          aFlags & ITEM_IS_WITHIN_SVG_TEXT,
                          aFlags & ITEM_ALLOWS_TEXT_PATH_CHILD,
-                         styleContext);
+                         computedStyle);
     }
 
     // Now check for XUL display types
     if (!data) {
-      data = FindXULDisplayData(display, element, styleContext);
+      data = FindXULDisplayData(display, element, computedStyle);
     }
 
     // And general display types
     if (!data) {
-      data = FindDisplayData(display, element, styleContext);
+      data = FindDisplayData(display, element, computedStyle);
     }
 
     NS_ASSERTION(data, "Should have frame construction data now");
 
     if (data->mBits & FCDATA_SUPPRESS_FRAME) {
-      SetAsUndisplayedContent(aState, aItems, element, styleContext, isGeneratedContent);
+      SetAsUndisplayedContent(aState, aItems, element, computedStyle, isGeneratedContent);
       return;
     }
 
 #ifdef MOZ_XUL
     if ((data->mBits & FCDATA_IS_POPUP) &&
         (!aParentFrame || // Parent is inline
          !aParentFrame->IsMenuFrame())) {
       if (!aState.mPopupItems.containingBlock &&
           !aState.mHavePendingPopupgroup) {
-        SetAsUndisplayedContent(aState, aItems, element, styleContext,
+        SetAsUndisplayedContent(aState, aItems, element, computedStyle,
                                 isGeneratedContent);
         return;
       }
 
       isPopup = true;
     }
 #endif /* MOZ_XUL */
   }
 
   uint32_t bits = data->mBits;
 
   // Inside colgroups, suppress everything except columns.
   if (aParentFrame && aParentFrame->IsTableColGroupFrame() &&
       (!(bits & FCDATA_IS_TABLE_PART) ||
        display->mDisplay != StyleDisplay::TableColumn)) {
-    SetAsUndisplayedContent(aState, aItems, aContent, styleContext, isGeneratedContent);
+    SetAsUndisplayedContent(aState, aItems, aContent, computedStyle, isGeneratedContent);
     return;
   }
 
   bool canHavePageBreak =
     (aFlags & ITEM_ALLOW_PAGE_BREAK) && aState.mPresContext->IsPaginated() &&
     !display->IsAbsolutelyPositionedStyle() &&
     !(aParentFrame && aParentFrame->IsGridContainerFrame()) &&
     !(bits & FCDATA_IS_TABLE_PART) && !(bits & FCDATA_IS_SVG_TEXT);
@@ -5873,69 +5875,69 @@ nsCSSFrameConstructor::AddFrameConstruct
   }
 
   // FIXME(emilio, https://github.com/w3c/csswg-drafts/issues/2167):
   //
   // Figure out what should happen for display: contents in MathML.
   if (display->mDisplay == StyleDisplay::Contents &&
       !foundMathMLData) {
     if (!GetDisplayContentsStyleFor(aContent)) {
-      MOZ_ASSERT(styleContext->GetPseudo() || !isGeneratedContent,
+      MOZ_ASSERT(computedStyle->GetPseudo() || !isGeneratedContent,
                  "Should have had pseudo type");
       aState.mFrameManager->RegisterDisplayContentsStyleFor(aContent,
-                                                            styleContext);
+                                                            computedStyle);
     } else {
       aState.mFrameManager->ChangeRegisteredDisplayContentsStyleFor(aContent,
-                                                                    styleContext);
+                                                                    computedStyle);
     }
 
     if (aParentFrame) {
       aParentFrame->AddStateBits(NS_FRAME_MAY_HAVE_GENERATED_CONTENT);
     }
     CreateGeneratedContentItem(aState, aParentFrame, aContent->AsElement(),
-                               styleContext, CSSPseudoElementType::before,
+                               computedStyle, CSSPseudoElementType::before,
                                aItems);
 
     FlattenedChildIterator iter(aContent);
     for (nsIContent* child = iter.GetNextChild(); child; child = iter.GetNextChild()) {
       if (!ShouldCreateItemsForChild(aState, child, aParentFrame)) {
         continue;
       }
 
       RefPtr<ComputedStyle> childContext = ResolveComputedStyle(child);
       DoAddFrameConstructionItems(aState, child, childContext,
                                   aSuppressWhiteSpaceOptimizations,
                                   aParentFrame, aAnonChildren, aItems);
     }
     aItems.SetParentHasNoXBLChildren(!iter.XBLInvolved());
 
     CreateGeneratedContentItem(aState, aParentFrame, aContent->AsElement(),
-                               styleContext, CSSPseudoElementType::after,
+                               computedStyle, CSSPseudoElementType::after,
                                aItems);
     if (canHavePageBreak && display->mBreakAfter) {
       AddPageBreakItem(aContent, aItems);
     }
     return;
   }
 
   FrameConstructionItem* item = nullptr;
   if (details && details->Open()) {
     auto* summary = HTMLSummaryElement::FromNodeOrNull(aContent);
     if (summary && summary->IsMainSummary()) {
       // If details is open, the main summary needs to be rendered as if it is
       // the first child, so add the item to the front of the item list.
       item = aItems.PrependItem(this, data, aContent, aTag, aNameSpaceID,
-                                pendingBinding, styleContext.forget(),
+                                pendingBinding, computedStyle.forget(),
                                 aSuppressWhiteSpaceOptimizations, aAnonChildren);
     }
   }
 
   if (!item) {
     item = aItems.AppendItem(this, data, aContent, aTag, aNameSpaceID,
-                             pendingBinding, styleContext.forget(),
+                             pendingBinding, computedStyle.forget(),
                              aSuppressWhiteSpaceOptimizations, aAnonChildren);
   }
   item->mIsText = isText;
   item->mIsGeneratedContent = isGeneratedContent;
   item->mIsAnonymousContentCreatorContent =
     aFlags & ITEM_IS_ANONYMOUSCONTENTCREATOR_CONTENT;
   if (isGeneratedContent) {
     // We need to keep this alive until the frame takes ownership.
@@ -6076,18 +6078,18 @@ nsCSSFrameConstructor::AtLineBoundary(FC
 void
 nsCSSFrameConstructor::ConstructFramesFromItem(nsFrameConstructorState& aState,
                                                FCItemIterator& aIter,
                                                nsContainerFrame* aParentFrame,
                                                nsFrameItems& aFrameItems)
 {
   nsContainerFrame* adjParentFrame = aParentFrame;
   FrameConstructionItem& item = aIter.item();
-  ComputedStyle* styleContext = item.mComputedStyle;
-  AdjustParentFrame(&adjParentFrame, item.mFCData, styleContext);
+  ComputedStyle* computedStyle = item.mComputedStyle;
+  AdjustParentFrame(&adjParentFrame, item.mFCData, computedStyle);
 
   if (item.mIsText) {
     // If this is collapsible whitespace next to a line boundary,
     // don't create a frame. item.IsWhitespace() also sets the
     // NS_CREATE_FRAME_IF_NON_WHITESPACE flag in the text node. (If we
     // end up creating a frame, nsTextFrame::Init will clear the flag.)
     // We don't do this for generated content, because some generated
     // text content is empty text nodes that are about to be initialized.
@@ -6095,34 +6097,34 @@ nsCSSFrameConstructor::ConstructFramesFr
     // container's frame construction item is marked with
     // mIsGeneratedContent, and we might not have an aParentFrame.)
     // We don't do it for content that may have XBL anonymous siblings,
     // because they make it difficult to correctly create the frame
     // due to dynamic changes.
     // We don't do it for SVG text, since we might need to position and
     // measure the white space glyphs due to x/y/dx/dy attributes.
     if (AtLineBoundary(aIter) &&
-        !styleContext->StyleText()->WhiteSpaceOrNewlineIsSignificant() &&
+        !computedStyle->StyleText()->WhiteSpaceOrNewlineIsSignificant() &&
         aIter.List()->ParentHasNoXBLChildren() &&
         !(aState.mAdditionalStateBits & NS_FRAME_GENERATED_CONTENT) &&
         (item.mFCData->mBits & FCDATA_IS_LINE_PARTICIPANT) &&
         !(item.mFCData->mBits & FCDATA_IS_SVG_TEXT) &&
         !mAlwaysCreateFramesForIgnorableWhitespace &&
         item.IsWhitespace(aState))
       return;
 
     ConstructTextFrame(item.mFCData, aState, item.mContent,
-                       adjParentFrame, styleContext,
+                       adjParentFrame, computedStyle,
                        aFrameItems);
     return;
   }
 
   // Start background loads during frame construction so that we're
   // guaranteed that they will be started before onload fires.
-  styleContext->StartBackgroundImageLoads();
+  computedStyle->StartBackgroundImageLoads();
 
   nsFrameState savedStateBits = aState.mAdditionalStateBits;
   if (item.mIsGeneratedContent) {
     // Ensure that frames created here are all tagged with
     // NS_FRAME_GENERATED_CONTENT.
     aState.mAdditionalStateBits |= NS_FRAME_GENERATED_CONTENT;
   }
 
@@ -6446,18 +6448,18 @@ nsCSSFrameConstructor::IsValidSibling(ns
     if (UNSET_DISPLAY == aDisplay) {
       if (aContent->IsNodeOfType(nsINode::eCOMMENT) ||
           aContent->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
         // Comments and processing instructions never have frames, so we should
         // not try to generate styles for them.
         return false;
       }
       // FIXME(emilio): This is buggy some times, see bug 1424656.
-      RefPtr<ComputedStyle> styleContext = ResolveComputedStyle(aContent);
-      const nsStyleDisplay* display = styleContext->StyleDisplay();
+      RefPtr<ComputedStyle> computedStyle = ResolveComputedStyle(aContent);
+      const nsStyleDisplay* display = computedStyle->StyleDisplay();
       aDisplay = display->mDisplay;
     }
     if (LayoutFrameType::Menu == parentType) {
       return
         (StyleDisplay::MozPopup == aDisplay) ==
         (StyleDisplay::MozPopup == siblingDisplay);
     }
     // To have decent performance we want to return false in cases in which
@@ -8613,70 +8615,70 @@ nsCSSFrameConstructor::CreateContinuingT
 
 nsIFrame*
 nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext*    aPresContext,
                                              nsIFrame*         aFrame,
                                              nsContainerFrame* aParentFrame,
                                              bool              aIsFluid)
 {
   nsIPresShell*              shell = aPresContext->PresShell();
-  ComputedStyle*             styleContext = aFrame->Style();
+  ComputedStyle*             computedStyle = aFrame->Style();
   nsIFrame*                  newFrame = nullptr;
   nsIFrame*                  nextContinuation = aFrame->GetNextContinuation();
   nsIFrame*                  nextInFlow = aFrame->GetNextInFlow();
 
   // Use the frame type to determine what type of frame to create
   LayoutFrameType frameType = aFrame->Type();
   nsIContent* content = aFrame->GetContent();
 
   NS_ASSERTION(aFrame->GetSplittableType() != NS_FRAME_NOT_SPLITTABLE,
                "why CreateContinuingFrame for a non-splittable frame?");
 
   if (LayoutFrameType::Text == frameType) {
-    newFrame = NS_NewContinuingTextFrame(shell, styleContext);
+    newFrame = NS_NewContinuingTextFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
   } else if (LayoutFrameType::Inline == frameType) {
-    newFrame = NS_NewInlineFrame(shell, styleContext);
+    newFrame = NS_NewInlineFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
   } else if (LayoutFrameType::Block == frameType) {
     MOZ_ASSERT(!aFrame->IsTableCaption(),
                "no support for fragmenting table captions yet");
-    newFrame = NS_NewBlockFrame(shell, styleContext);
+    newFrame = NS_NewBlockFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
 #ifdef MOZ_XUL
   } else if (LayoutFrameType::XULLabel == frameType) {
-    newFrame = NS_NewXULLabelFrame(shell, styleContext);
+    newFrame = NS_NewXULLabelFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
 #endif
   } else if (LayoutFrameType::ColumnSet == frameType) {
     MOZ_ASSERT(!aFrame->IsTableCaption(),
                "no support for fragmenting table captions yet");
-    newFrame = NS_NewColumnSetFrame(shell, styleContext, nsFrameState(0));
+    newFrame = NS_NewColumnSetFrame(shell, computedStyle, nsFrameState(0));
     newFrame->Init(content, aParentFrame, aFrame);
   } else if (LayoutFrameType::Page == frameType) {
     nsContainerFrame* canvasFrame;
     newFrame = ConstructPageFrame(shell, aParentFrame, aFrame, canvasFrame);
   } else if (LayoutFrameType::TableWrapper == frameType) {
     newFrame =
       CreateContinuingOuterTableFrame(shell, aPresContext, aFrame, aParentFrame,
-                                      content, styleContext);
+                                      content, computedStyle);
 
   } else if (LayoutFrameType::Table == frameType) {
     newFrame =
       CreateContinuingTableFrame(shell, aFrame, aParentFrame,
-                                 content, styleContext);
+                                 content, computedStyle);
 
   } else if (LayoutFrameType::TableRowGroup == frameType) {
-    newFrame = NS_NewTableRowGroupFrame(shell, styleContext);
+    newFrame = NS_NewTableRowGroupFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
     if (newFrame->GetStateBits() & NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN) {
       nsTableFrame::RegisterPositionedTablePart(newFrame);
     }
   } else if (LayoutFrameType::TableRow == frameType) {
-    nsTableRowFrame* rowFrame = NS_NewTableRowFrame(shell, styleContext);
+    nsTableRowFrame* rowFrame = NS_NewTableRowFrame(shell, computedStyle);
 
     rowFrame->Init(content, aParentFrame, aFrame);
     if (rowFrame->GetStateBits() & NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN) {
       nsTableFrame::RegisterPositionedTablePart(rowFrame);
     }
 
     // Create a continuing frame for each table cell frame
     nsFrameItems  newChildList;
@@ -8696,54 +8698,54 @@ nsCSSFrameConstructor::CreateContinuingF
 
   } else if (IS_TABLE_CELL(frameType)) {
     // Warning: If you change this and add a wrapper frame around table cell
     // frames, make sure Bug 368554 doesn't regress!
     // See IsInAutoWidthTableCellForQuirk() in nsImageFrame.cpp.
     nsTableFrame* tableFrame =
       static_cast<nsTableRowFrame*>(aParentFrame)->GetTableFrame();
     nsTableCellFrame* cellFrame =
-      NS_NewTableCellFrame(shell, styleContext, tableFrame);
+      NS_NewTableCellFrame(shell, computedStyle, tableFrame);
 
     cellFrame->Init(content, aParentFrame, aFrame);
     if (cellFrame->GetStateBits() & NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN) {
       nsTableFrame::RegisterPositionedTablePart(cellFrame);
     }
 
     // Create a continuing area frame
     nsIFrame* blockFrame = aFrame->PrincipalChildList().FirstChild();
     nsIFrame* continuingBlockFrame =
       CreateContinuingFrame(aPresContext, blockFrame,
                             static_cast<nsContainerFrame*>(cellFrame));
 
     SetInitialSingleChild(cellFrame, continuingBlockFrame);
     newFrame = cellFrame;
   } else if (LayoutFrameType::Line == frameType) {
-    newFrame = NS_NewFirstLineFrame(shell, styleContext);
+    newFrame = NS_NewFirstLineFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
   } else if (LayoutFrameType::Letter == frameType) {
-    newFrame = NS_NewFirstLetterFrame(shell, styleContext);
+    newFrame = NS_NewFirstLetterFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
   } else if (LayoutFrameType::Image == frameType) {
-    newFrame = NS_NewImageFrame(shell, styleContext);
+    newFrame = NS_NewImageFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
   } else if (LayoutFrameType::ImageControl == frameType) {
-    newFrame = NS_NewImageControlFrame(shell, styleContext);
+    newFrame = NS_NewImageControlFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
   } else if (LayoutFrameType::Placeholder == frameType) {
     // create a continuing out of flow frame
     nsIFrame* oofFrame = nsPlaceholderFrame::GetRealFrameForPlaceholder(aFrame);
     nsIFrame* oofContFrame =
       CreateContinuingFrame(aPresContext, oofFrame, aParentFrame);
     newFrame =
       CreatePlaceholderFrameFor(shell, content, oofContFrame,
                                 aParentFrame, aFrame,
                                 aFrame->GetStateBits() & PLACEHOLDER_TYPE_MASK);
   } else if (LayoutFrameType::FieldSet == frameType) {
-    nsContainerFrame* fieldset = NS_NewFieldSetFrame(shell, styleContext);
+    nsContainerFrame* fieldset = NS_NewFieldSetFrame(shell, computedStyle);
 
     fieldset->Init(content, aParentFrame, aFrame);
 
     // Create a continuing area frame
     // XXXbz we really shouldn't have to do this by hand!
     nsContainerFrame* blockFrame = GetFieldSetBlockFrame(aFrame);
     if (blockFrame) {
       nsIFrame* continuingBlockFrame =
@@ -8751,35 +8753,35 @@ nsCSSFrameConstructor::CreateContinuingF
       // Set the fieldset's initial child list
       SetInitialSingleChild(fieldset, continuingBlockFrame);
     } else {
       MOZ_ASSERT(aFrame->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER,
                  "FieldSet block may only be null for overflow containers");
     }
     newFrame = fieldset;
   } else if (LayoutFrameType::Legend == frameType) {
-    newFrame = NS_NewLegendFrame(shell, styleContext);
+    newFrame = NS_NewLegendFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
   } else if (LayoutFrameType::FlexContainer == frameType) {
-    newFrame = NS_NewFlexContainerFrame(shell, styleContext);
+    newFrame = NS_NewFlexContainerFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
   } else if (LayoutFrameType::GridContainer == frameType) {
-    newFrame = NS_NewGridContainerFrame(shell, styleContext);
+    newFrame = NS_NewGridContainerFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
   } else if (LayoutFrameType::Ruby == frameType) {
-    newFrame = NS_NewRubyFrame(shell, styleContext);
+    newFrame = NS_NewRubyFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
   } else if (LayoutFrameType::RubyBaseContainer == frameType) {
-    newFrame = NS_NewRubyBaseContainerFrame(shell, styleContext);
+    newFrame = NS_NewRubyBaseContainerFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
   } else if (LayoutFrameType::RubyTextContainer == frameType) {
-    newFrame = NS_NewRubyTextContainerFrame(shell, styleContext);
+    newFrame = NS_NewRubyTextContainerFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
   } else if (LayoutFrameType::Details == frameType) {
-    newFrame = NS_NewDetailsFrame(shell, styleContext);
+    newFrame = NS_NewDetailsFrame(shell, computedStyle);
     newFrame->Init(content, aParentFrame, aFrame);
   } else {
     MOZ_CRASH("unexpected frame type");
   }
 
   // Init() set newFrame to be a fluid continuation of aFrame.
   // If we want a non-fluid continuation, we need to call SetPrevContinuation()
   // to reset NS_FRAME_IS_FLUID_CONTINUATION.
@@ -8861,24 +8863,24 @@ nsCSSFrameConstructor::ReplicateFixedFra
   // page - bug 389619)
   for (nsIFrame* fixed = firstFixed; fixed; fixed = fixed->GetNextSibling()) {
     nsIFrame* prevPlaceholder = fixed->GetPlaceholderFrame();
     if (prevPlaceholder &&
         nsLayoutUtils::IsProperAncestorFrame(prevCanvasFrame, prevPlaceholder)) {
       // We want to use the same style as the primary style frame for
       // our content
       nsIContent* content = fixed->GetContent();
-      ComputedStyle* styleContext =
+      ComputedStyle* computedStyle =
         nsLayoutUtils::GetStyleFrame(content)->Style();
       AutoFrameConstructionItemList items(this);
       AddFrameConstructionItemsInternal(state, content, canvasFrame,
                                         content->NodeInfo()->NameAtom(),
                                         content->GetNameSpaceID(),
                                         true,
-                                        styleContext,
+                                        computedStyle,
                                         ITEM_ALLOW_XBL_BASE |
                                           ITEM_ALLOW_PAGE_BREAK,
                                         nullptr, items);
       ConstructFramesFromItemList(state, items, canvasFrame,
                                   /* aParentIsWrapperAnonBox = */ false,
                                   fixedPlaceholders);
     }
   }
@@ -10307,30 +10309,30 @@ nsCSSFrameConstructor::AddFCItemsForAnon
                !content->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION),
                "Why is someone creating garbage anonymous content");
 
     // Make sure we eagerly performed the servo cascade when the anonymous
     // nodes were created.
     MOZ_ASSERT(!content->IsStyledByServo() || !content->IsElement() ||
                content->AsElement()->HasServoData());
 
-    RefPtr<ComputedStyle> styleContext = ResolveComputedStyle(content);
+    RefPtr<ComputedStyle> computedStyle = ResolveComputedStyle(content);
 
     nsTArray<nsIAnonymousContentCreator::ContentInfo>* anonChildren = nullptr;
     if (!aAnonymousItems[i].mChildren.IsEmpty()) {
       anonChildren = &aAnonymousItems[i].mChildren;
     }
 
     uint32_t flags = ITEM_ALLOW_XBL_BASE | ITEM_ALLOW_PAGE_BREAK |
                      ITEM_IS_ANONYMOUSCONTENTCREATOR_CONTENT | aExtraFlags;
 
     AddFrameConstructionItemsInternal(aState, content, aFrame,
                                       content->NodeInfo()->NameAtom(),
                                       content->GetNameSpaceID(),
-                                      true, styleContext, flags,
+                                      true, computedStyle, flags,
                                       anonChildren, aItemsToConstruct);
   }
 }
 
 void
 nsCSSFrameConstructor::ProcessChildren(nsFrameConstructorState& aState,
                                        nsIContent*              aContent,
                                        ComputedStyle*          aComputedStyle,
@@ -10408,25 +10410,25 @@ nsCSSFrameConstructor::ProcessChildren(n
                                 itemsToConstruct);
 
   if (!aPossiblyLeafFrame->IsLeaf()) {
     // :before/:after content should have the same style parent as normal kids.
     //
     // Note that we don't use this style for looking up things like special
     // block styles because in some cases involving table pseudo-frames it has
     // nothing to do with the parent frame's desired behavior.
-    ComputedStyle* styleContext;
+    ComputedStyle* computedStyle;
 
     if (aCanHaveGeneratedContent) {
       aFrame->AddStateBits(NS_FRAME_MAY_HAVE_GENERATED_CONTENT);
-      styleContext =
+      computedStyle =
         nsFrame::CorrectStyleParentFrame(aFrame, nullptr)->Style();
       // Probe for generated content before
       CreateGeneratedContentItem(aState, aFrame, aContent->AsElement(),
-                                 styleContext, CSSPseudoElementType::before,
+                                 computedStyle, CSSPseudoElementType::before,
                                  itemsToConstruct);
     }
 
     const bool addChildItems = MOZ_LIKELY(mCurrentDepth < kMaxDepth);
     if (!addChildItems) {
       NS_WARNING("ProcessChildren max depth exceeded");
     }
 
@@ -10460,17 +10462,17 @@ nsCSSFrameConstructor::ProcessChildren(n
         ClearLazyBits(child, child->GetNextSibling());
       }
     }
     itemsToConstruct.SetParentHasNoXBLChildren(!iter.XBLInvolved());
 
     if (aCanHaveGeneratedContent) {
       // Probe for generated content after
       CreateGeneratedContentItem(aState, aFrame, aContent->AsElement(),
-                                 styleContext, CSSPseudoElementType::after,
+                                 computedStyle, CSSPseudoElementType::after,
                                  itemsToConstruct);
     }
   } else {
     ClearLazyBits(aContent->GetFirstChild(), nullptr);
   }
 
   ConstructFramesFromItemList(aState, itemsToConstruct, aFrame,
                               /* aParentIsWrapperAnonBox = */ false,
@@ -11285,32 +11287,32 @@ nsCSSFrameConstructor::CreateListBoxCont
   if (aParentFrame) {
     nsFrameItems            frameItems;
     nsFrameConstructorState state(mPresShell,
                                   GetAbsoluteContainingBlock(aParentFrame, FIXED_POS),
                                   GetAbsoluteContainingBlock(aParentFrame, ABS_POS),
                                   GetFloatContainingBlock(aParentFrame),
                                   do_AddRef(mTempFrameTreeState));
 
-    RefPtr<ComputedStyle> styleContext = ResolveComputedStyle(aChild);
+    RefPtr<ComputedStyle> computedStyle = ResolveComputedStyle(aChild);
 
     // Pre-check for display "none" - only if we find that, do we create
     // any frame at all
-    const nsStyleDisplay* display = styleContext->StyleDisplay();
+    const nsStyleDisplay* display = computedStyle->StyleDisplay();
 
     if (StyleDisplay::None == display->mDisplay) {
       *aNewFrame = nullptr;
       return;
     }
 
     AutoFrameConstructionItemList items(this);
     AddFrameConstructionItemsInternal(state, aChild, aParentFrame,
                                       aChild->NodeInfo()->NameAtom(),
                                       aChild->GetNameSpaceID(),
-                                      true, styleContext,
+                                      true, computedStyle,
                                       ITEM_ALLOW_XBL_BASE, nullptr, items);
     ConstructFramesFromItemList(state, items, aParentFrame,
                                 /* aParentIsWrapperAnonBox = */ false,
                                 frameItems);
 
     nsIFrame* newFrame = frameItems.FirstChild();
     *aNewFrame = newFrame;
 
@@ -11471,24 +11473,24 @@ nsCSSFrameConstructor::ConstructInline(n
   //   Text("d")
   // Block (anonymous, outer span)
   //   Block (div)
   //     Text("e")
   // Inline (outer span)
   //   Text("f")
 
   nsIContent* const content = aItem.mContent;
-  ComputedStyle* const styleContext = aItem.mComputedStyle;
+  ComputedStyle* const computedStyle = aItem.mComputedStyle;
 
   bool positioned =
     StyleDisplay::Inline == aDisplay->mDisplay &&
     aDisplay->IsRelativelyPositionedStyle() &&
     !nsSVGUtils::IsInSVGTextSubtree(aParentFrame);
 
-  nsInlineFrame* newFrame = NS_NewInlineFrame(mPresShell, styleContext);
+  nsInlineFrame* newFrame = NS_NewInlineFrame(mPresShell, computedStyle);
 
   // Initialize the frame
   InitAndRestoreFrame(aState, content, aParentFrame, newFrame);
 
   // Inline frames can always have generated content
   newFrame->AddStateBits(NS_FRAME_MAY_HAVE_GENERATED_CONTENT);
 
   nsFrameConstructorSaveState absoluteSaveState;  // definition cannot be inside next block
@@ -11543,30 +11545,30 @@ nsCSSFrameConstructor::ConstructInline(n
 void
 nsCSSFrameConstructor::CreateIBSiblings(nsFrameConstructorState& aState,
                                         nsContainerFrame* aInitialInline,
                                         bool aIsPositioned,
                                         nsFrameItems& aChildItems,
                                         nsFrameItems& aSiblings)
 {
   nsIContent* content = aInitialInline->GetContent();
-  ComputedStyle* styleContext = aInitialInline->Style();
+  ComputedStyle* computedStyle = aInitialInline->Style();
   nsContainerFrame* parentFrame = aInitialInline->GetParent();
 
   // Resolve the right style for our anonymous blocks.
   //
   // The distinction in styles is needed because of CSS 2.1, section
   // 9.2.1.1, which says:
   //
   //   When such an inline box is affected by relative positioning, any
   //   resulting translation also affects the block-level box contained
   //   in the inline box.
   RefPtr<ComputedStyle> blockSC = mPresShell->StyleSet()->
     ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::mozBlockInsideInlineWrapper,
-                                       styleContext);
+                                       computedStyle);
 
   nsContainerFrame* lastNewInline =
     static_cast<nsContainerFrame*>(aInitialInline->FirstContinuation());
   do {
     // On entry to this loop aChildItems is not empty and the first frame in it
     // is block-level.
     NS_PRECONDITION(aChildItems.NotEmpty(), "Should have child items");
     NS_PRECONDITION(!aChildItems.FirstChild()->IsInlineOutside(),
@@ -11586,17 +11588,17 @@ nsCSSFrameConstructor::CreateIBSiblings(
 
     MoveChildrenTo(aInitialInline, blockFrame, blockKids);
 
     SetFrameIsIBSplit(lastNewInline, blockFrame);
     aSiblings.AddChild(blockFrame);
 
     // Now grab the initial inlines in aChildItems and put them into an inline
     // frame.
-    nsInlineFrame* inlineFrame = NS_NewInlineFrame(mPresShell, styleContext);
+    nsInlineFrame* inlineFrame = NS_NewInlineFrame(mPresShell, computedStyle);
     InitAndRestoreFrame(aState, content, parentFrame, inlineFrame, false);
     inlineFrame->AddStateBits(NS_FRAME_MAY_HAVE_GENERATED_CONTENT |
                               NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
     if (aIsPositioned) {
       inlineFrame->MarkAsAbsoluteContainingBlock();
     }
 
     if (aChildItems.NotEmpty()) {
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -4678,31 +4678,31 @@ nsLayoutUtils::ComputeObjectDestRect(con
     }
   }
   return nsRect(imageTopLeftPt, concreteObjectSize);
 }
 
 already_AddRefed<nsFontMetrics>
 nsLayoutUtils::GetFontMetricsForFrame(const nsIFrame* aFrame, float aInflation)
 {
-  ComputedStyle* styleContext = aFrame->Style();
+  ComputedStyle* computedStyle = aFrame->Style();
   uint8_t variantWidth = NS_FONT_VARIANT_WIDTH_NORMAL;
-  if (styleContext->IsTextCombined()) {
+  if (computedStyle->IsTextCombined()) {
     MOZ_ASSERT(aFrame->IsTextFrame());
     auto textFrame = static_cast<const nsTextFrame*>(aFrame);
     auto clusters = textFrame->CountGraphemeClusters();
     if (clusters == 2) {
       variantWidth = NS_FONT_VARIANT_WIDTH_HALF;
     } else if (clusters == 3) {
       variantWidth = NS_FONT_VARIANT_WIDTH_THIRD;
     } else if (clusters == 4) {
       variantWidth = NS_FONT_VARIANT_WIDTH_QUARTER;
     }
   }
-  return GetFontMetricsForComputedStyle(styleContext, aInflation, variantWidth);
+  return GetFontMetricsForComputedStyle(computedStyle, aInflation, variantWidth);
 }
 
 already_AddRefed<nsFontMetrics>
 nsLayoutUtils::GetFontMetricsForComputedStyle(ComputedStyle* aComputedStyle,
                                              float aInflation,
                                              uint8_t aVariantWidth)
 {
   nsPresContext* pc = aComputedStyle->PresContext();
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -2215,25 +2215,25 @@ nsPresContext::HasAuthorSpecifiedRules(c
     MOZ_ASSERT(elem->GetParent(), "Pseudo element has no parent element?");
     elem = elem->GetParent()->AsElement();
   }
   if (MOZ_UNLIKELY(!elem->HasServoData())) {
     // Probably shouldn't happen, but does. See bug 1387953
     return false;
   }
 
-  ComputedStyle* styleContext = aFrame->Style();
-  CSSPseudoElementType pseudoType = styleContext->GetPseudoType();
+  ComputedStyle* computedStyle = aFrame->Style();
+  CSSPseudoElementType pseudoType = computedStyle->GetPseudoType();
   // Anonymous boxes are more complicated, and we just assume that they
   // cannot have any author-specified rules here.
   if (pseudoType == CSSPseudoElementType::InheritingAnonBox ||
       pseudoType == CSSPseudoElementType::NonInheritingAnonBox) {
     return false;
   }
-  return Servo_HasAuthorSpecifiedRules(styleContext->AsServo(),
+  return Servo_HasAuthorSpecifiedRules(computedStyle->AsServo(),
                                        elem, pseudoType,
                                        aRuleTypeMask,
                                        UseDocumentColors());
 }
 
 gfxUserFontSet*
 nsPresContext::GetUserFontSet(bool aFlushUserFontSet)
 {
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -1381,28 +1381,28 @@ nsIFrame*
 nsComboboxControlFrame::CreateFrameForDisplayNode()
 {
   MOZ_ASSERT(mDisplayContent);
 
   // Get PresShell
   nsIPresShell *shell = PresShell();
   StyleSetHandle styleSet = shell->StyleSet();
 
-  // create the style contexts for the anonymous block frame and text frame
-  RefPtr<ComputedStyle> styleContext;
-  styleContext = styleSet->
+  // create the ComputedStyle for the anonymous block frame and text frame
+  RefPtr<ComputedStyle> computedStyle;
+  computedStyle = styleSet->
     ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::mozDisplayComboboxControlFrame,
                                        mComputedStyle);
 
   RefPtr<ComputedStyle> textComputedStyle;
   textComputedStyle =
     styleSet->ResolveStyleForText(mDisplayContent, mComputedStyle);
 
   // Start by creating our anonymous block frame
-  mDisplayFrame = new (shell) nsComboboxDisplayFrame(styleContext, this);
+  mDisplayFrame = new (shell) nsComboboxDisplayFrame(computedStyle, this);
   mDisplayFrame->Init(mContent, this, nullptr);
 
   // Create a text frame and put it inside the block frame
   nsIFrame* textFrame = NS_NewTextFrame(shell, textComputedStyle);
 
   // initialize the text frame
   textFrame->Init(mDisplayContent, mDisplayFrame, nullptr);
   mDisplayContent->SetPrimaryFrame(textFrame);
--- a/layout/forms/nsRangeFrame.cpp
+++ b/layout/forms/nsRangeFrame.cpp
@@ -215,41 +215,41 @@ nsRect
 nsDisplayRangeFocusRing::GetBounds(nsDisplayListBuilder* aBuilder,
                                    bool* aSnap) const
 {
   *aSnap = false;
   nsRect rect(ToReferenceFrame(), Frame()->GetSize());
 
   // We want to paint as if specifying a border for ::-moz-focus-outer
   // specifies an outline for our frame, so inflate by the border widths:
-  ComputedStyle* styleContext =
+  ComputedStyle* computedStyle =
     static_cast<nsRangeFrame*>(mFrame)->mOuterFocusStyle;
-  MOZ_ASSERT(styleContext, "We only exist if mOuterFocusStyle is non-null");
-  rect.Inflate(styleContext->StyleBorder()->GetComputedBorder());
+  MOZ_ASSERT(computedStyle, "We only exist if mOuterFocusStyle is non-null");
+  rect.Inflate(computedStyle->StyleBorder()->GetComputedBorder());
 
   return rect;
 }
 
 void
 nsDisplayRangeFocusRing::Paint(nsDisplayListBuilder* aBuilder,
                                gfxContext* aCtx)
 {
   bool unused;
-  ComputedStyle* styleContext =
+  ComputedStyle* computedStyle =
     static_cast<nsRangeFrame*>(mFrame)->mOuterFocusStyle;
-  MOZ_ASSERT(styleContext, "We only exist if mOuterFocusStyle is non-null");
+  MOZ_ASSERT(computedStyle, "We only exist if mOuterFocusStyle is non-null");
 
   PaintBorderFlags flags = aBuilder->ShouldSyncDecodeImages()
                          ? PaintBorderFlags::SYNC_DECODE_IMAGES
                          : PaintBorderFlags();
 
   ImgDrawResult result =
     nsCSSRendering::PaintBorder(mFrame->PresContext(), *aCtx, mFrame,
                                 mVisibleRect, GetBounds(aBuilder, &unused),
-                                styleContext, flags);
+                                computedStyle, flags);
 
   nsDisplayItemGenericImageGeometry::UpdateDrawResult(this, result);
 }
 
 void
 nsRangeFrame::BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                const nsDisplayListSet& aLists)
 {
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -5570,26 +5570,26 @@ nsRect
 nsTextFrame::UpdateTextEmphasis(WritingMode aWM, PropertyProvider& aProvider)
 {
   const nsStyleText* styleText = StyleText();
   if (!styleText->HasTextEmphasis()) {
     DeleteProperty(EmphasisMarkProperty());
     return nsRect();
   }
 
-  ComputedStyle* styleContext = Style();
-  bool isTextCombined = styleContext->IsTextCombined();
+  ComputedStyle* computedStyle = Style();
+  bool isTextCombined = computedStyle->IsTextCombined();
   if (isTextCombined) {
-    styleContext = GetParent()->Style();
+    computedStyle = GetParent()->Style();
   }
   RefPtr<nsFontMetrics> fm = nsLayoutUtils::
-    GetFontMetricsOfEmphasisMarks(styleContext, GetFontSizeInflation());
+    GetFontMetricsOfEmphasisMarks(computedStyle, GetFontSizeInflation());
   EmphasisMarkInfo* info = new EmphasisMarkInfo;
   info->textRun =
-    GenerateTextRunForEmphasisMarks(this, fm, styleContext, styleText);
+    GenerateTextRunForEmphasisMarks(this, fm, computedStyle, styleText);
   info->advance = info->textRun->GetAdvanceWidth();
 
   // Calculate the baseline offset
   LogicalSide side = styleText->TextEmphasisSide(aWM);
   LogicalSize frameSize = GetLogicalSize(aWM);
   // The overflow rect is inflated in the inline direction by half
   // advance of the emphasis mark on each side, so that even if a mark
   // is drawn for a zero-width character, it won't be clipped.
--- a/layout/inspector/InspectorUtils.cpp
+++ b/layout/inspector/InspectorUtils.cpp
@@ -163,32 +163,32 @@ InspectorUtils::GetCSSStyleRules(GlobalO
                                  const nsAString& aPseudo,
                                  nsTArray<RefPtr<css::Rule>>& aResult)
 {
   RefPtr<nsAtom> pseudoElt;
   if (!aPseudo.IsEmpty()) {
     pseudoElt = NS_Atomize(aPseudo);
   }
 
-  RefPtr<ComputedStyle> styleContext =
+  RefPtr<ComputedStyle> computedStyle =
     GetCleanComputedStyleForElement(&aElement, pseudoElt);
-  if (!styleContext) {
+  if (!computedStyle) {
     // This can fail for elements that are not in the document or
     // if the document they're in doesn't have a presshell.  Bail out.
     return;
   }
 
 
   nsIDocument* doc = aElement.OwnerDoc();
   nsIPresShell* shell = doc->GetShell();
   if (!shell) {
     return;
   }
 
-  ComputedStyle* servo = styleContext->AsServo();
+  ComputedStyle* servo = computedStyle->AsServo();
   nsTArray<const RawServoStyleRule*> rawRuleList;
   Servo_ComputedValues_GetStyleRuleList(servo, &rawRuleList);
 
   AutoTArray<ServoStyleRuleMap*, 1> maps;
   {
     ServoStyleSet* styleSet = shell->StyleSet()->AsServo();
     ServoStyleRuleMap* map = styleSet->StyleRuleMap();
     maps.AppendElement(map);
@@ -957,19 +957,17 @@ InspectorUtils::GetCleanComputedStyleFor
 
   nsPresContext *presContext = presShell->GetPresContext();
   if (!presContext) {
     return nullptr;
   }
 
   presContext->EnsureSafeToHandOutCSSRules();
 
-  RefPtr<ComputedStyle> styleContext =
-    nsComputedDOMStyle::GetComputedStyle(aElement, aPseudo);
-  return styleContext.forget();
+  return nsComputedDOMStyle::GetComputedStyle(aElement, aPseudo);
 }
 
 /* static */ void
 InspectorUtils::GetUsedFontFaces(GlobalObject& aGlobalObject,
                                  nsRange& aRange,
                                  uint32_t aMaxRanges,
                                  nsTArray<nsAutoPtr<InspectorFontFace>>& aResult,
                                  ErrorResult& aRv)
--- a/layout/mathml/nsMathMLChar.cpp
+++ b/layout/mathml/nsMathMLChar.cpp
@@ -1940,69 +1940,70 @@ private:
 };
 
 void nsDisplayMathMLCharDebug::Paint(nsDisplayListBuilder* aBuilder,
                                      gfxContext* aCtx)
 {
   // for visual debug
   Sides skipSides;
   nsPresContext* presContext = mFrame->PresContext();
-  ComputedStyle* styleContext = mFrame->Style();
+  ComputedStyle* computedStyle = mFrame->Style();
   nsRect rect = mRect + ToReferenceFrame();
 
   PaintBorderFlags flags = aBuilder->ShouldSyncDecodeImages()
                          ? PaintBorderFlags::SYNC_DECODE_IMAGES
                          : PaintBorderFlags();
 
   // Since this is used only for debugging, we don't need to worry about
   // tracking the ImgDrawResult.
   Unused <<
     nsCSSRendering::PaintBorder(presContext, *aCtx, mFrame, mVisibleRect,
-                                rect, styleContext, flags, skipSides);
+                                rect, computedStyle, flags, skipSides);
 
   nsCSSRendering::PaintOutline(presContext, *aCtx, mFrame,
-                               mVisibleRect, rect, styleContext);
+                               mVisibleRect, rect, computedStyle);
 }
 #endif
 
 
 void
 nsMathMLChar::Display(nsDisplayListBuilder*   aBuilder,
                       nsIFrame*               aForFrame,
                       const nsDisplayListSet& aLists,
                       uint32_t                aIndex,
                       const nsRect*           aSelectedRect)
 {
-  ComputedStyle* parentContext = aForFrame->Style();
-  ComputedStyle* styleContext = mComputedStyle;
+  bool usingParentStyle = false;
+  ComputedStyle* computedStyle = mComputedStyle;
 
   if (mDraw == DRAW_NORMAL) {
     // normal drawing if there is nothing special about this char
-    // Set default context to the parent context
-    styleContext = parentContext;
+    // Use our parent element's style
+    usingParentStyle = true;
+    computedStyle = aForFrame->Style();
   }
 
-  if (!styleContext->StyleVisibility()->IsVisible())
+  if (!computedStyle->StyleVisibility()->IsVisible())
     return;
 
-  // if the leaf style context that we use for stretchy chars has a background
+  // if the leaf computed style that we use for stretchy chars has a background
   // color we use it -- this feature is mostly used for testing and debugging
   // purposes. Normally, users will set the background on the container frame.
   // paint the selection background -- beware MathML frames overlap a lot
   if (aSelectedRect && !aSelectedRect->IsEmpty()) {
     aLists.BorderBackground()->AppendToTop(
       MakeDisplayItem<nsDisplayMathMLSelectionRect>(aBuilder, aForFrame, *aSelectedRect));
   }
   else if (mRect.width && mRect.height) {
-    if (styleContext != parentContext &&
-        NS_GET_A(styleContext->StyleBackground()->
-                 BackgroundColor(styleContext)) > 0) {
+    if (!usingParentStyle &&
+        NS_GET_A(computedStyle->StyleBackground()->
+                 BackgroundColor(computedStyle)) > 0) {
       nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
         aBuilder, aForFrame, mRect, aLists.BorderBackground(),
-        /* aAllowWillPaintBorderOptimization */ true, styleContext);
+        /* aAllowWillPaintBorderOptimization */ true, computedStyle);
     }
     //else
     //  our container frame will take care of painting its background
 
 #if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
     // for visual debug
     aLists.BorderBackground()->AppendToTop(
       MakeDisplayItem<nsDisplayMathMLCharDebug>(aBuilder, aForFrame, mRect));
@@ -2044,28 +2045,27 @@ nsMathMLChar::ApplyTransforms(gfxContext
 }
 
 void
 nsMathMLChar::PaintForeground(nsIFrame* aForFrame,
                               gfxContext& aRenderingContext,
                               nsPoint aPt,
                               bool aIsSelected)
 {
-  ComputedStyle* parentContext = aForFrame->Style();
-  ComputedStyle* styleContext = mComputedStyle;
+  ComputedStyle* computedStyle = mComputedStyle;
   nsPresContext* presContext = aForFrame->PresContext();
 
   if (mDraw == DRAW_NORMAL) {
     // normal drawing if there is nothing special about this char
-    // Set default context to the parent context
-    styleContext = parentContext;
+    // Use our parent element's style
+    computedStyle = aForFrame->Style();
   }
 
   // Set color ...
-  nscolor fgColor = styleContext->
+  nscolor fgColor = computedStyle->
     GetVisitedDependentColor(&nsStyleText::mWebkitTextFillColor);
   if (aIsSelected) {
     // get color to use for selection from the look&feel object
     fgColor = LookAndFeel::GetColor(LookAndFeel::eColorID_TextSelectForeground,
                                     fgColor);
   }
   aRenderingContext.SetColor(Color::FromABGR(fgColor));
   aRenderingContext.Save();
--- a/layout/mathml/nsMathMLmtableFrame.cpp
+++ b/layout/mathml/nsMathMLmtableFrame.cpp
@@ -443,17 +443,17 @@ ExtractSpacingValues(const nsAString&   
                      nsAtom*           aAttribute,
                      nsTArray<nscoord>& aSpacingArray,
                      nsIFrame*          aFrame,
                      nscoord            aDefaultValue0,
                      nscoord            aDefaultValue1,
                      float              aFontSizeInflation)
 {
   nsPresContext* presContext = aFrame->PresContext();
-  ComputedStyle* styleContext = aFrame->Style();
+  ComputedStyle* computedStyle = aFrame->Style();
 
   const char16_t* start = aString.BeginReading();
   const char16_t* end = aString.EndReading();
 
   int32_t startIndex = 0;
   int32_t count = 0;
   int32_t elementNum = 0;
 
@@ -478,17 +478,17 @@ ExtractSpacingValues(const nsAString&   
       nscoord newValue;
       if (aAttribute == nsGkAtoms::framespacing_ && elementNum) {
         newValue = aDefaultValue1;
       } else {
         newValue = aDefaultValue0;
       }
       nsMathMLFrame::ParseNumericValue(valueString, &newValue,
                                        nsMathMLElement::PARSE_ALLOW_UNITLESS,
-                                       presContext, styleContext,
+                                       presContext, computedStyle,
                                        aFontSizeInflation);
       aSpacingArray.AppendElement(newValue);
 
       startIndex += count;
       count = 0;
       elementNum++;
     }
   }
--- a/layout/style/StyleAnimationValue.cpp
+++ b/layout/style/StyleAnimationValue.cpp
@@ -224,32 +224,32 @@ AnimationValue::FromString(nsCSSProperty
 
   nsCOMPtr<nsIPresShell> shell = doc->GetShell();
   if (!shell) {
     return result;
   }
 
   // GetComputedStyle() flushes style, so we shouldn't assume that any
   // non-owning references we have are still valid.
-  RefPtr<ComputedStyle> styleContext =
+  RefPtr<ComputedStyle> computedStyle =
     nsComputedDOMStyle::GetComputedStyle(aElement, nullptr);
-  MOZ_ASSERT(styleContext);
+  MOZ_ASSERT(computedStyle);
 
   RefPtr<RawServoDeclarationBlock> declarations =
     ServoCSSParser::ParseProperty(aProperty, aValue,
                                   ServoCSSParser::GetParsingEnvironment(doc));
 
   if (!declarations) {
     return result;
   }
 
   result.mServo =
     shell->StyleSet()->AsServo()->ComputeAnimationValue(aElement,
                                                         declarations,
-                                                        styleContext);
+                                                        computedStyle);
   return result;
 }
 
 /* static */ AnimationValue
 AnimationValue::Opacity(StyleBackendType aBackendType, float aOpacity)
 {
   AnimationValue result;
 
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -729,29 +729,26 @@ nsTableFrame::AppendAnonymousColFrames(n
 
   // Get the last col frame
   nsFrameList newColFrames;
 
   int32_t startIndex = mColFrames.Length();
   int32_t lastIndex  = startIndex + aNumColsToAdd - 1;
 
   for (int32_t childX = startIndex; childX <= lastIndex; childX++) {
-    nsIContent* iContent;
-    RefPtr<ComputedStyle> styleContext;
-
     // all anonymous cols that we create here use a pseudo style context of the
     // col group
-    iContent = aColGroupFrame->GetContent();
-    styleContext = shell->StyleSet()->
+    nsIContent* iContent = aColGroupFrame->GetContent();
+    RefPtr<ComputedStyle> computedStyle = shell->StyleSet()->
       ResolveNonInheritingAnonymousBoxStyle(nsCSSAnonBoxes::tableCol);
     // ASSERTION to check for bug 54454 sneaking back in...
     NS_ASSERTION(iContent, "null content in CreateAnonymousColFrames");
 
     // create the new col frame
-    nsIFrame* colFrame = NS_NewTableColFrame(shell, styleContext);
+    nsIFrame* colFrame = NS_NewTableColFrame(shell, computedStyle);
     ((nsTableColFrame *) colFrame)->SetColType(aColType);
     colFrame->Init(iContent, aColGroupFrame, nullptr);
 
     newColFrames.AppendFrame(nullptr, colFrame);
   }
   nsFrameList& cols = aColGroupFrame->GetWritableChildList();
   nsIFrame* oldLastCol = cols.LastChild();
   const nsFrameList::Slice& newCols =
--- a/layout/xul/nsListBoxBodyFrame.cpp
+++ b/layout/xul/nsListBoxBodyFrame.cpp
@@ -709,44 +709,44 @@ nsListBoxBodyFrame::ComputeIntrinsicISiz
 
   int32_t index = 0;
   nsCOMPtr<nsIDOMElement> firstRowEl;
   GetItemAtIndex(index, getter_AddRefs(firstRowEl));
   nsCOMPtr<nsIContent> firstRowContent(do_QueryInterface(firstRowEl));
 
   if (firstRowContent) {
     nsPresContext* presContext = aBoxLayoutState.PresContext();
-    RefPtr<ComputedStyle> styleContext =
+    RefPtr<ComputedStyle> computedStyle =
       presContext->StyleSet()->ResolveStyleFor(
           firstRowContent->AsElement(), nullptr, LazyComputeBehavior::Allow);
 
     nscoord width = 0;
     nsMargin margin(0,0,0,0);
 
-    if (styleContext->StylePadding()->GetPadding(margin))
+    if (computedStyle->StylePadding()->GetPadding(margin))
       width += margin.LeftRight();
-    width += styleContext->StyleBorder()->GetComputedBorder().LeftRight();
-    if (styleContext->StyleMargin()->GetMargin(margin))
+    width += computedStyle->StyleBorder()->GetComputedBorder().LeftRight();
+    if (computedStyle->StyleMargin()->GetMargin(margin))
       width += margin.LeftRight();
 
     FlattenedChildIterator iter(mContent);
     for (nsIContent* child = iter.GetNextChild(); child; child = iter.GetNextChild()) {
       if (child->IsXULElement(nsGkAtoms::listitem)) {
         gfxContext* rendContext = aBoxLayoutState.GetRenderingContext();
         if (rendContext) {
           nsAutoString value;
           for (nsIContent* text = child->GetFirstChild();
                text; text = text->GetNextSibling()) {
             if (text->IsNodeOfType(nsINode::eTEXT)) {
               text->AppendTextTo(value);
             }
           }
 
           RefPtr<nsFontMetrics> fm =
-            nsLayoutUtils::GetFontMetricsForComputedStyle(styleContext);
+            nsLayoutUtils::GetFontMetricsForComputedStyle(computedStyle);
 
           nscoord textWidth =
             nsLayoutUtils::AppUnitWidthOfStringBidi(value, this, *fm,
                                                     *rendContext);
           textWidth += width;
 
           if (textWidth > largestWidth)
             largestWidth = textWidth;