Bug 1448714 - Fix up comments referring to 'style context' after the rename of nsStyleContext. r=emilio
authorJonathan Watt <jwatt@jwatt.org>
Fri, 23 Mar 2018 13:49:21 +0000
changeset 463604 cc4577ab2771699a31fd8fe0c91539723c205310
parent 463603 3619a41def167002da5ed93d69833193c0f2edb3
child 463605 40ef480efa7a4dd38fa7f6c7d167d296dd0a401a
child 463606 d854ebbcbb7e39b29508c856b118ca52f6623d53
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1448714
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 1448714 - Fix up comments referring to 'style context' after the rename of nsStyleContext. r=emilio
dom/animation/EffectCompositor.h
dom/animation/Keyframe.h
dom/animation/KeyframeEffectReadOnly.cpp
dom/animation/KeyframeEffectReadOnly.h
dom/base/Element.cpp
dom/base/nsWindowMemoryReporter.cpp
dom/canvas/CanvasRenderingContext2D.cpp
dom/html/HTMLTableElement.cpp
dom/html/ImageDocument.cpp
dom/serviceworkers/test/fetch/context/index.html
dom/smil/nsSMILCSSProperty.cpp
dom/smil/nsSMILCSSProperty.h
dom/smil/nsSMILCompositor.cpp
dom/smil/nsSMILCompositor.h
dom/svg/SVGContentUtils.cpp
dom/svg/SVGGeometryElement.cpp
editor/libeditor/EditorBase.cpp
layout/base/PresShell.cpp
layout/base/nsChangeHint.h
layout/base/nsLayoutUtils.h
layout/base/nsPresArena.h
layout/forms/nsRangeFrame.h
layout/forms/test/test_bug572649.html
layout/generic/ReflowInput.cpp
layout/generic/WritingModes.h
layout/generic/nsBlockFrame.h
layout/generic/nsBulletFrame.cpp
layout/generic/nsFirstLetterFrame.cpp
layout/generic/nsFrame.h
layout/generic/nsFrameStateBits.h
layout/generic/nsImageFrame.cpp
layout/generic/nsInlineFrame.cpp
layout/generic/nsTextFrame.cpp
layout/generic/test/test_bug904810.html
layout/mathml/mathml.css
layout/mathml/nsMathMLChar.cpp
layout/mathml/nsMathMLChar.h
layout/mathml/nsMathMLFrame.cpp
layout/mathml/nsMathMLFrame.h
layout/mathml/nsMathMLmencloseFrame.cpp
layout/mathml/nsMathMLmfencedFrame.cpp
layout/mathml/nsMathMLmoFrame.cpp
layout/mathml/nsMathMLmrootFrame.cpp
layout/painting/RetainedDisplayListBuilder.cpp
layout/painting/nsCSSRendering.cpp
layout/painting/nsDisplayList.cpp
layout/reftests/bugs/1209603-1.html
layout/reftests/first-letter/reftest.list
layout/reftests/first-line/reftest.list
layout/style/ComputedStyle.h
layout/style/StyleSetHandleInlines.h
layout/style/nsComputedDOMStyle.h
layout/style/nsStyleStruct.cpp
layout/style/nsStyleStruct.h
layout/style/nsStyleTransformMatrix.cpp
layout/style/test/test_align_justify_computed_values.html
layout/style/test/test_invalidation_basic.html
layout/tables/nsTableFrame.cpp
layout/tables/nsTableWrapperFrame.cpp
layout/xul/nsImageBoxFrame.cpp
layout/xul/tree/nsTreeBodyFrame.cpp
layout/xul/tree/nsTreeBodyFrame.h
layout/xul/tree/nsTreeStyleCache.cpp
layout/xul/tree/nsTreeStyleCache.h
--- a/dom/animation/EffectCompositor.h
+++ b/dom/animation/EffectCompositor.h
@@ -239,17 +239,17 @@ private:
 
   // Get the properties in |aEffectSet| that we are able to animate on the
   // compositor but which are also specified at a higher level in the cascade
   // than the animations level.
   //
   // When |aBackendType| is StyleBackendType::Gecko, we determine which
   // properties are specified using the provided |aComputedStyle| and
   // |aElement| and |aPseudoType| are ignored. If |aComputedStyle| is nullptr,
-  // we automatically look up the style context of primary frame of the
+  // we automatically look up the ComputedStyle of primary frame of the
   // (pseudo-)element.
   //
   // When |aBackendType| is StyleBackendType::Servo, we use the |StrongRuleNode|
   // stored on the (pseudo-)element indicated by |aElement| and |aPseudoType|.
   static nsCSSPropertyIDSet
   GetOverriddenProperties(StyleBackendType aBackendType,
                           EffectSet& aEffectSet,
                           dom::Element* aElement,
--- a/dom/animation/Keyframe.h
+++ b/dom/animation/Keyframe.h
@@ -55,17 +55,17 @@ struct PropertyValuePair
  * corresponds closely to the type of objects returned via the getKeyframes()
  * API.
  *
  * Before computing an output animation value, however, we flatten these frames
  * down to a series of per-property value arrays where we also resolve any
  * overlapping shorthands/longhands, convert specified CSS values to computed
  * values, etc.
  *
- * When the target element or style context changes, however, we rebuild these
+ * When the target element or computed style changes, however, we rebuild these
  * per-property arrays from the original list of keyframes objects. As a result,
  * these objects represent the master definition of the effect's values.
  */
 struct Keyframe
 {
   Keyframe() = default;
   Keyframe(const Keyframe& aOther) = default;
   Keyframe(Keyframe&& aOther)
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -1014,17 +1014,17 @@ KeyframeEffectReadOnly::GetKeyframes(JSC
   // shorthands to longhands if needed, and store a reference to the unparsed
   // value. When it comes time to serialize, however, what do you serialize for
   // 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
+  // enough context to do so). For that we need to grab the ComputedStyle so we
   // know what custom property values to provide.
   RefPtr<ComputedStyle> computedStyle;
   if (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
--- a/dom/animation/KeyframeEffectReadOnly.h
+++ b/dom/animation/KeyframeEffectReadOnly.h
@@ -315,20 +315,20 @@ protected:
   void UnregisterTarget();
 
   // Update the associated frame state bits so that, if necessary, a stacking
   // context will be created and the effect sent to the compositor.  We
   // typically need to do this when the properties referenced by the keyframe
   // have changed, or when the target frame might have changed.
   void MaybeUpdateFrameForCompositor();
 
-  // Looks up the style context associated with the target element, if any.
+  // Looks up the ComputedStyle associated with the target element, if any.
   // We need to be careful to *not* call this when we are updating the style
   // context. That's because calling GetComputedStyle when we are in the process
-  // of building a style context may trigger various forms of infinite
+  // of building a ComputedStyle may trigger various forms of infinite
   // recursion.
   already_AddRefed<ComputedStyle> GetTargetComputedStyle();
 
   // A wrapper for marking cascade update according to the current
   // target and its effectSet.
   void MarkCascadeNeedsUpdate();
 
   void EnsureBaseStyles(const ComputedStyle* aComputedValues,
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -538,17 +538,17 @@ Element::GetBindingURL(nsIDocument *aDoc
   bool isXULorPluginElement = (IsXULElement() ||
                                IsHTMLElement(nsGkAtoms::object) ||
                                IsHTMLElement(nsGkAtoms::embed));
   if (!aDocument->GetShell() || GetPrimaryFrame() || !isXULorPluginElement) {
     *aResult = nullptr;
     return true;
   }
 
-  // Get the computed -moz-binding directly from the style context
+  // Get the computed -moz-binding directly from the ComputedStyle
   RefPtr<ComputedStyle> sc =
     nsComputedDOMStyle::GetComputedStyleNoFlush(this, nullptr);
   NS_ENSURE_TRUE(sc, false);
 
   NS_IF_ADDREF(*aResult = sc->StyleDisplay()->mBinding);
   return true;
 }
 
@@ -576,17 +576,17 @@ Element::WrapObject(JSContext *aCx, JS::
 
     // In theory we could call ExecuteAttachedHandler here when it's safe to
     // run script if we also removed the binding from the PAQ queue, but that
     // seems like a scary change that would mosly just add more
     // inconsistencies.
     return obj;
   }
 
-  // Make sure the style context goes away _before_ we load the binding
+  // Make sure the ComputedStyle goes away _before_ we load the binding
   // since that can destroy the relevant presshell.
 
   {
     // Make a scope so that ~nsRefPtr can GC before returning obj.
     RefPtr<css::URLValue> bindingURL;
     bool ok = GetBindingURL(doc, getter_AddRefs(bindingURL));
     if (!ok) {
       dom::Throw(aCx, NS_ERROR_FAILURE);
--- a/dom/base/nsWindowMemoryReporter.cpp
+++ b/dom/base/nsWindowMemoryReporter.cpp
@@ -438,17 +438,17 @@ CollectWindowReports(nsGlobalWindowInner
 
   REPORT_SIZE("/layout/line-boxes", mArenaSizes.mLineBoxes,
               "Memory used by line boxes within a window.");
 
   REPORT_SIZE("/layout/rule-nodes", mArenaSizes.mRuleNodes,
               "Memory used by CSS rule nodes within a window.");
 
   REPORT_SIZE("/layout/style-contexts", mArenaSizes.mComputedStyles,
-              "Memory used by style contexts within a window.");
+              "Memory used by ComputedStyles within a window.");
 
   // There are many different kinds of style structs, but it is likely that
   // only a few matter. Implement a cutoff so we don't bloat about:memory with
   // many uninteresting entries.
   const size_t STYLE_SUNDRIES_THRESHOLD =
     js::MemoryReportingSundriesThreshold();
 
   // This is the Gecko style structs, which are in the nsPresArena.
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -2704,17 +2704,17 @@ GetFontStyleForServo(Element* aElement, 
   if (Servo_DeclarationBlock_HasCSSWideKeyword(declarations,
                                                eCSSProperty_font_size_adjust)) {
     return nullptr;
   }
 
   ServoStyleSet* styleSet = aPresShell->StyleSet()->AsServo();
 
   RefPtr<ComputedStyle> parentStyle;
-  // have to get a parent style context for inherit-like relative
+  // have to get a parent ComputedStyle for inherit-like relative
   // values (2em, bolder, etc.)
   if (aElement && aElement->IsInComposedDoc()) {
     parentStyle = nsComputedDOMStyle::GetComputedStyle(aElement, nullptr);
     if (!parentStyle) {
       // The flush killed the shell, so we couldn't get any meaningful style
       // back.
       aError.Throw(NS_ERROR_FAILURE);
       return nullptr;
@@ -3712,17 +3712,17 @@ CanvasRenderingContext2D::SetFont(const 
 }
 
 bool
 CanvasRenderingContext2D::SetFontInternal(const nsAString& aFont,
                                           ErrorResult& aError)
 {
   /*
     * If font is defined with relative units (e.g. ems) and the parent
-    * style context changes in between calls, setting the font to the
+    * ComputedStyle changes in between calls, setting the font to the
     * same value as previous could result in a different computed value,
     * so we cannot have the optimization where we check if the new font
     * string is equal to the old one.
     */
 
   if (!mCanvasElement && !mDocShell) {
     NS_WARNING("Canvas element must be non-null or a docshell must be provided");
     aError.Throw(NS_ERROR_FAILURE);
@@ -4346,17 +4346,17 @@ CanvasRenderingContext2D::DrawOrMeasureT
   }
 
   if (!IsFinite(aX) || !IsFinite(aY)) {
     return NS_OK;
   }
 
   CanvasBidiProcessor processor;
 
-  // If we don't have a style context, we can't set up vertical-text flags
+  // If we don't have a ComputedStyle, we can't set up vertical-text flags
   // (for now, at least; perhaps we need new Canvas API to control this).
   processor.mTextRunFlags = canvasStyle
     ? nsLayoutUtils::GetTextRunFlagsForStyle(canvasStyle,
                                              canvasStyle->StyleFont(),
                                              canvasStyle->StyleText(),
                                              0)
     : gfx::ShapedTextFlags();
 
--- a/dom/html/HTMLTableElement.cpp
+++ b/dom/html/HTMLTableElement.cpp
@@ -935,17 +935,17 @@ HTMLTableElement::MapAttributesIntoRule(
                                         GenericSpecifiedValues* aData)
 {
   // XXX Bug 211636:  This function is used by a single style rule
   // that's used to match two different type of elements -- tables, and
   // table cells.  (nsHTMLTableCellElement overrides
   // WalkContentStyleRules so that this happens.)  This violates the
   // nsIStyleRule contract, since it's the same style rule object doing
   // the mapping in two different ways.  It's also incorrect since it's
-  // testing the display type of the style context rather than checking
+  // testing the display type of the ComputedStyle rather than checking
   // which *element* it's matching (style rules should not stop matching
   // when the display type is changed).
 
   nsCompatibility mode = aData->Document()->GetCompatibilityMode();
 
   if (aData->ShouldComputeStyleStruct(NS_STYLE_INHERIT_BIT(TableBorder))) {
     // cellspacing
     const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::cellspacing);
--- a/dom/html/ImageDocument.cpp
+++ b/dom/html/ImageDocument.cpp
@@ -727,17 +727,17 @@ ImageDocument::CreateSyntheticDocument()
   imageLoader->SetLoadingEnabled(true);
 
   return NS_OK;
 }
 
 nsresult
 ImageDocument::CheckOverflowing(bool changeState)
 {
-  /* Create a scope so that the style context gets destroyed before we might
+  /* Create a scope so that the ComputedStyle gets destroyed before we might
    * call RebuildStyleData.  Also, holding onto pointers to the
    * presentation through style resolution is potentially dangerous.
    */
   {
     nsPresContext* context = GetPresContext();
     if (!context) {
       return NS_OK;
     }
--- a/dom/serviceworkers/test/fetch/context/index.html
+++ b/dom/serviceworkers/test/fetch/context/index.html
@@ -280,17 +280,17 @@
   function testStyle() {
     return new Promise(function(resolve, reject) {
       var link = document.createElement("link");
       link.rel = "stylesheet";
       link.href = "style.css";
       document.documentElement.appendChild(link);
       navigator.serviceWorker.addEventListener("message", function onMessage(e) {
         if (e.data.data == "style") {
-          is(e.data.context, "style", "Expected the style context on a request coming from a stylesheet");
+          is(e.data.context, "style", "Expected the ComputedStyle on a request coming from a stylesheet");
           navigator.serviceWorker.removeEventListener("message", onMessage);
           resolve();
         }
       });
     });
   }
 
   function testTrack() {
--- a/dom/smil/nsSMILCSSProperty.cpp
+++ b/dom/smil/nsSMILCSSProperty.cpp
@@ -39,29 +39,29 @@ nsSMILCSSProperty::GetBaseValue() const
 {
   // To benefit from Return Value Optimization and avoid copy constructor calls
   // due to our use of return-by-value, we must return the exact same object
   // from ALL return points. This function must only return THIS variable:
   nsSMILValue baseValue;
 
   // SPECIAL CASE: (a) Shorthands
   //               (b) 'display'
-  //               (c) No base style context
+  //               (c) No base ComputedStyle
   if (nsCSSProps::IsShorthand(mPropID) ||
       mPropID == eCSSProperty_display ||
       !mBaseComputedStyle) {
     // We can't look up the base (computed-style) value of shorthand
     // properties because they aren't guaranteed to have a consistent computed
     // value.
     //
     // Also, although we can look up the base value of the display property,
     // doing so involves clearing and resetting the property which can cause
     // frames to be recreated which we'd like to avoid.
     //
-    // Furthermore, if we don't (yet) have a base style context we obviously
+    // Furthermore, if we don't (yet) have a base ComputedStyle we obviously
     // can't resolve a base value.
     //
     // In any case, just return a dummy value (initialized with the right
     // type, so as not to indicate failure).
     nsSMILValue tmpVal(&nsSMILCSSValueType::sSingleton);
     Swap(baseValue, tmpVal);
     return baseValue;
   }
--- a/dom/smil/nsSMILCSSProperty.h
+++ b/dom/smil/nsSMILCSSProperty.h
@@ -30,17 +30,17 @@ class Element;
  */
 class nsSMILCSSProperty : public nsISMILAttr
 {
 public:
   /**
    * Constructs a new nsSMILCSSProperty.
    * @param  aPropID   The CSS property we're interested in animating.
    * @param  aElement  The element whose CSS property is being animated.
-   * @param  aBaseComputedStyle  The style context to use when getting the base
+   * @param  aBaseComputedStyle  The ComputedStyle to use when getting the base
    *                             value. If this is nullptr and GetBaseValue is
    *                             called, an empty nsSMILValue initialized with
    *                             the nsSMILCSSValueType will be returned.
    */
   nsSMILCSSProperty(nsCSSPropertyID aPropID,
                     mozilla::dom::Element* aElement,
                     mozilla::ComputedStyle* aBaseComputedStyle);
 
@@ -74,13 +74,13 @@ protected:
   // as the Compositing step, and DOM elements don't get a chance to die during
   // that time.
   mozilla::dom::Element*   mElement;
 
   // The style to use when fetching base styles.
   //
   // As with mElement, since an nsISMILAttr only lives as long as the
   // compositing step and since ComposeAttribute holds an owning reference to
-  // the base style context, we can use a non-owning reference here.
+  // the base ComputedStyle, we can use a non-owning reference here.
   mozilla::ComputedStyle* mBaseComputedStyle;
 };
 
 #endif // NS_SMILCSSPROPERTY_H_
--- a/dom/smil/nsSMILCompositor.cpp
+++ b/dom/smil/nsSMILCompositor.cpp
@@ -50,17 +50,17 @@ nsSMILCompositor::AddAnimationFunction(n
 }
 
 void
 nsSMILCompositor::ComposeAttribute(bool& aMightHavePendingStyleUpdates)
 {
   if (!mKey.mElement)
     return;
 
-  // If we might need to resolve base styles, grab a suitable style context
+  // If we might need to resolve base styles, grab a suitable ComputedStyle
   // for initializing our nsISMILAttr with.
   RefPtr<ComputedStyle> baseComputedStyle;
   if (MightNeedBaseStyle()) {
     baseComputedStyle =
       nsComputedDOMStyle::GetUnanimatedComputedStyleNoFlush(mKey.mElement,
                                                             nullptr);
   }
 
--- a/dom/smil/nsSMILCompositor.h
+++ b/dom/smil/nsSMILCompositor.h
@@ -70,17 +70,17 @@ public:
   // Transfers |aOther|'s mCachedBaseValue to |this|
   void StealCachedBaseValue(nsSMILCompositor* aOther) {
     mCachedBaseValue = mozilla::Move(aOther->mCachedBaseValue);
   }
 
  private:
   // Create a nsISMILAttr for my target, on the heap.
   //
-  // @param aBaseComputedStyle  An optional style context which, if set, will be
+  // @param aBaseComputedStyle  An optional ComputedStyle which, if set, will be
   //                           used when fetching the base style.
   mozilla::UniquePtr<nsISMILAttr>
   CreateSMILAttr(mozilla::ComputedStyle* aBaseComputedStyle);
 
   // Returns the CSS property this compositor should animate, or
   // eCSSProperty_UNKNOWN if this compositor does not animate a CSS property.
   nsCSSPropertyID GetCSSPropertyToAnimate() const;
 
--- a/dom/svg/SVGContentUtils.cpp
+++ b/dom/svg/SVGContentUtils.cpp
@@ -274,34 +274,34 @@ SVGContentUtils::GetFontSize(Element *aE
 {
   if (!aElement)
     return 1.0f;
 
   RefPtr<ComputedStyle> computedStyle =
     nsComputedDOMStyle::GetComputedStyleNoFlush(aElement, nullptr);
   if (!computedStyle) {
     // ReportToConsole
-    NS_WARNING("Couldn't get style context for content in GetFontStyle");
+    NS_WARNING("Couldn't get ComputedStyle for content in GetFontStyle");
     return 1.0f;
   }
 
   return GetFontSize(computedStyle);
 }
 
 float
 SVGContentUtils::GetFontSize(nsIFrame *aFrame)
 {
   MOZ_ASSERT(aFrame, "NULL frame in GetFontSize");
   return GetFontSize(aFrame->Style());
 }
 
 float
 SVGContentUtils::GetFontSize(ComputedStyle *aComputedStyle)
 {
-  MOZ_ASSERT(aComputedStyle, "NULL style context in GetFontSize");
+  MOZ_ASSERT(aComputedStyle, "NULL ComputedStyle in GetFontSize");
 
   nsPresContext *presContext = aComputedStyle->PresContext();
   MOZ_ASSERT(presContext, "NULL pres context in GetFontSize");
 
   nscoord fontSize = aComputedStyle->StyleFont()->mSize;
   return nsPresContext::AppUnitsToFloatCSSPixels(fontSize) /
          presContext->EffectiveTextZoom();
 }
@@ -311,34 +311,34 @@ SVGContentUtils::GetFontXHeight(Element 
 {
   if (!aElement)
     return 1.0f;
 
   RefPtr<ComputedStyle> computedStyle =
     nsComputedDOMStyle::GetComputedStyleNoFlush(aElement, nullptr);
   if (!computedStyle) {
     // ReportToConsole
-    NS_WARNING("Couldn't get style context for content in GetFontStyle");
+    NS_WARNING("Couldn't get ComputedStyle for content in GetFontStyle");
     return 1.0f;
   }
 
   return GetFontXHeight(computedStyle);
 }
 
 float
 SVGContentUtils::GetFontXHeight(nsIFrame *aFrame)
 {
   MOZ_ASSERT(aFrame, "NULL frame in GetFontXHeight");
   return GetFontXHeight(aFrame->Style());
 }
 
 float
 SVGContentUtils::GetFontXHeight(ComputedStyle *aComputedStyle)
 {
-  MOZ_ASSERT(aComputedStyle, "NULL style context in GetFontXHeight");
+  MOZ_ASSERT(aComputedStyle, "NULL ComputedStyle in GetFontXHeight");
 
   nsPresContext *presContext = aComputedStyle->PresContext();
   MOZ_ASSERT(presContext, "NULL pres context in GetFontXHeight");
 
   RefPtr<nsFontMetrics> fontMetrics =
     nsLayoutUtils::GetFontMetricsForComputedStyle(aComputedStyle);
 
   if (!fontMetrics) {
--- a/dom/svg/SVGGeometryElement.cpp
+++ b/dom/svg/SVGGeometryElement.cpp
@@ -145,17 +145,17 @@ SVGGeometryElement::GetFillRule()
     MOZ_ASSERT(computedStyle->StyleSVG()->mFillRule == StyleFillRule::Nonzero ||
                computedStyle->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");
+    NS_WARNING("Couldn't get ComputedStyle for content in GetFillRule");
   }
 
   return fillRule;
 }
 
 float
 SVGGeometryElement::GetTotalLength()
 {
--- a/editor/libeditor/EditorBase.cpp
+++ b/editor/libeditor/EditorBase.cpp
@@ -4131,30 +4131,31 @@ EditorBase::IsPreformatted(nsIDOMNode* a
 {
   nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);
 
   NS_ENSURE_TRUE(aResult && content, NS_ERROR_NULL_POINTER);
 
   nsCOMPtr<nsIPresShell> ps = GetPresShell();
   NS_ENSURE_TRUE(ps, NS_ERROR_NOT_INITIALIZED);
 
-  // Look at the node (and its parent if it's not an element), and grab its style context
+  // Look at the node (and its parent if it's not an element), and grab its
+  // ComputedStyle.
   RefPtr<ComputedStyle> elementStyle;
   if (!content->IsElement()) {
     content = content->GetParent();
   }
   if (content && content->IsElement()) {
     elementStyle =
       nsComputedDOMStyle::GetComputedStyleNoFlush(content->AsElement(), nullptr);
   }
 
   if (!elementStyle) {
-    // Consider nodes without a style context to be NOT preformatted:
+    // Consider nodes without a ComputedStyle to be NOT preformatted:
     // For instance, this is true of JS tags inside the body (which show
-    // up as #text nodes but have no style context).
+    // up as #text nodes but have no ComputedStyle).
     *aResult = false;
     return NS_OK;
   }
 
   const nsStyleText* styleText = elementStyle->StyleText();
 
   *aResult = styleText->WhiteSpaceIsSignificant();
   return NS_OK;
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -4263,17 +4263,17 @@ PresShell::DoFlushPendingNotifications(m
     // reflows after those constructors run.
     if (!mIsDestroying) {
       mDocument->BindingManager()->ProcessAttachedQueue();
     }
 
     // Now those constructors or events might have posted restyle
     // events.  At the same time, we still need up-to-date style data.
     // In particular, reflow depends on style being completely up to
-    // date.  If it's not, then style context reparenting, which can
+    // date.  If it's not, then style reparenting, which can
     // happen during reflow, might suddenly pick up the new rules and
     // we'll end up with frames whose style doesn't match the frame
     // type.
     if (!mIsDestroying) {
       nsAutoScriptBlocker scriptBlocker;
 #ifdef MOZ_GECKO_PROFILER
       AutoProfilerStyleMarker tracingStyleFlush(Move(mStyleCause));
 #endif
@@ -9717,17 +9717,17 @@ PresShell::VerifyIncrementalReflow()
 void
 PresShell::ListComputedStyles(FILE *out, int32_t aIndent)
 {
   nsIFrame* rootFrame = GetRootFrame();
   if (rootFrame) {
     rootFrame->Style()->List(out, aIndent);
   }
 
-  // The root element's frame's style context is the root of a separate tree.
+  // The root element's frame's ComputedStyle is the root of a separate tree.
   Element* rootElement = mDocument->GetRootElement();
   if (rootElement) {
     nsIFrame* rootElementFrame = rootElement->GetPrimaryFrame();
     if (rootElementFrame) {
       rootElementFrame->Style()->List(out, aIndent);
     }
   }
 }
--- a/layout/base/nsChangeHint.h
+++ b/layout/base/nsChangeHint.h
@@ -161,17 +161,17 @@ enum nsChangeHint : uint32_t {
    * This will schedule an invalidating paint. This is useful if something
    * has changed which will be invalidated by DLBI.
    */
   nsChangeHint_SchedulePaint = 1 << 20,
 
   /**
    * A hint reflecting that style data changed with no change handling
    * behavior.  We need to return this, rather than nsChangeHint(0),
-   * so that certain optimizations that manipulate the style context tree are
+   * so that certain optimizations that manipulate the style tree are
    * correct.
    *
    * nsChangeHint_NeutralChange must be returned by CalcDifference on a given
    * style struct if the data in the style structs are meaningfully different
    * and if no other change hints are returned.  If any other change hints are
    * set, then nsChangeHint_NeutralChange need not also be included, but it is
    * safe to do so.  (An example of style structs having non-meaningfully
    * different data would be cached information that would be re-calculated
@@ -537,29 +537,29 @@ NS_RemoveSubsumedHints(nsChangeHint aOur
 /**
  * |nsRestyleHint| is a bitfield for the result of
  * |HasStateDependentStyle| and |HasAttributeDependentStyle|.  When no
  * restyling is necessary, use |nsRestyleHint(0)|.
  *
  * Without eRestyle_Force or eRestyle_ForceDescendants, the restyling process
  * can stop processing at a frame when it detects no style changes and it is
  * known that the styles of the subtree beneath it will not change, leaving
- * the old style context on the frame.  eRestyle_Force can be used to skip this
- * optimization on a frame, and to force its new style context to be used.
+ * the old ComputedStyle on the frame.  eRestyle_Force can be used to skip this
+ * optimization on a frame, and to force its new ComputedStyle to be used.
  *
  * Similarly, eRestyle_ForceDescendants will cause the frame and all of its
- * descendants to be traversed and for the new style contexts that are created
+ * descendants to be traversed and for the new ComputedStyles that are created
  * to be set on the frames.
  *
  * NOTE: When adding new restyle hints, please also add them to
  * RestyleManager::RestyleHintToString.
  */
 enum nsRestyleHint : uint32_t {
-  // Rerun selector matching on the element.  If a new style context
-  // results, update the style contexts of descendants.  (Irrelevant if
+  // Rerun selector matching on the element.  If a new ComputedStyle
+  // results, update the ComputedStyles of descendants.  (Irrelevant if
   // eRestyle_Subtree is also set, since that implies a superset of the
   // work.)
   eRestyle_Self = 1 << 0,
 
   // Rerun selector matching on descendants of the element that match
   // a given selector.
   eRestyle_SomeDescendants = 1 << 1,
 
@@ -569,34 +569,34 @@ enum nsRestyleHint : uint32_t {
   // selector matching.)
   eRestyle_Subtree = 1 << 2,
 
   // Rerun selector matching on all later siblings of the element and
   // all of their descendants.
   eRestyle_LaterSiblings = 1 << 3,
 
   // Replace the style data coming from CSS transitions without updating
-  // any other style data.  If a new style context results, update style
+  // any other style data.  If a new ComputedStyle results, update style
   // contexts on the descendants.  (Irrelevant if eRestyle_Self or
   // eRestyle_Subtree is also set, since those imply a superset of the
   // work.)
   eRestyle_CSSTransitions = 1 << 4,
 
   // Replace the style data coming from CSS animations without updating
-  // any other style data.  If a new style context results, update style
+  // any other style data.  If a new ComputedStyle results, update style
   // contexts on the descendants.  (Irrelevant if eRestyle_Self or
   // eRestyle_Subtree is also set, since those imply a superset of the
   // work.)
   eRestyle_CSSAnimations = 1 << 5,
 
   // Replace the style data coming from inline style without updating
-  // any other style data.  If a new style context results, update style
+  // any other style data.  If a new ComputedStyle results, update style
   // contexts on the descendants.  (Irrelevant if eRestyle_Self or
   // eRestyle_Subtree is also set, since those imply a superset of the
-  // work.)  Supported only for element style contexts and not for
+  // work.)  Supported only for element ComputedStyles and not for
   // pseudo-elements or anonymous boxes, on which it converts to
   // eRestyle_Self.
   // If the change is for the advance of a declarative animation, use
   // the value below instead.
   eRestyle_StyleAttribute = 1 << 6,
 
   // Same as eRestyle_StyleAttribute, but for when the change results
   // from the advance of a declarative animation.
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -364,29 +364,29 @@ public:
    * @param aFrame the frame to start at
    * @return a frame of type mozilla::LayoutFrameType::Page or nullptr if no
    *         such ancestor exists
    */
   static nsIFrame* GetPageFrame(nsIFrame* aFrame);
 
   /**
    * Given a frame which is the primary frame for an element,
-   * return the frame that has the non-pseudoelement style context for
+   * return the frame that has the non-pseudoelement ComputedStyle for
    * the content.
    * This is aPrimaryFrame itself except for tableWrapper frames.
    *
    * Given a non-null input, this will return null if and only if its
    * argument is a table wrapper frame that is mid-destruction (and its
    * table frame has been destroyed).
    */
   static nsIFrame* GetStyleFrame(nsIFrame* aPrimaryFrame);
 
   /**
    * Given a content node,
-   * return the frame that has the non-pseudoelement style context for
+   * return the frame that has the non-pseudoelement ComputedStyle for
    * the content.  May return null.
    * This is aContent->GetPrimaryFrame() except for tableWrapper frames.
    */
   static nsIFrame* GetStyleFrame(const nsIContent* aContent);
 
   /**
    * Gets the real primary frame associated with the content object.
    *
@@ -672,17 +672,17 @@ public:
                                 uint8_t aDirection);
 
   /**
    * HasPseudoStyle returns true if aContent (whose primary style
    * context is aComputedStyle) has the aPseudoElement pseudo-style
    * attached to it; returns false otherwise.
    *
    * @param aContent the content node we're looking at
-   * @param aComputedStyle aContent's style context
+   * @param aComputedStyle aContent's ComputedStyle
    * @param aPseudoElement the id of the pseudo style we care about
    * @param aPresContext the presentation context
    * @return whether aContent has aPseudoElement style attached to it
    */
   static bool HasPseudoStyle(nsIContent* aContent,
                              ComputedStyle* aComputedStyle,
                              mozilla::CSSPseudoElementType aPseudoElement,
                              nsPresContext* aPresContext);
@@ -1830,17 +1830,17 @@ public:
                                         float               aOpacity);
 
   /**
    * Draw an image.
    * See https://wiki.mozilla.org/Gecko:Image_Snapping_and_Rendering
    *   @param aRenderingContext Where to draw the image, set up with an
    *                            appropriate scale and transform for drawing in
    *                            app units.
-   *   @param aComputedStyle     The style context of the nsIFrame (or
+   *   @param aComputedStyle    The ComputedStyle of the nsIFrame (or
    *                            pseudo-element) for which this image is being
    *                            drawn.
    *   @param aImage            The image.
    *   @param aDest             Where one copy of the image should mapped to.
    *   @param aFill             The area to be filled with copies of the
    *                            image.
    *   @param aAnchor           A point in aFill which we will ensure is
    *                            pixel-aligned in the output.
--- a/layout/base/nsPresArena.h
+++ b/layout/base/nsPresArena.h
@@ -93,17 +93,17 @@ public:
    * Clears all currently registered ArenaRefPtrs.  This will be called during
    * the destructor, but can be called by users of nsPresArena who want to
    * ensure arena-allocated objects are released earlier.
    */
   void ClearArenaRefPtrs();
 
   /**
    * Clears all currently registered ArenaRefPtrs for the given ArenaObjectID.
-   * This is called when we reconstruct the rule tree so that style contexts
+   * This is called when we reconstruct the rule tree so that ComputedStyles
    * pointing into the old rule tree aren't released afterwards, triggering an
    * assertion in ~ComputedStyle.
    */
   void ClearArenaRefPtrs(mozilla::ArenaObjectID aObjectID);
 
   /**
    * Increment nsWindowSizes with sizes of interesting objects allocated in this
    * arena.
--- a/layout/forms/nsRangeFrame.h
+++ b/layout/forms/nsRangeFrame.h
@@ -178,17 +178,17 @@ private:
 
   /**
    * The div used to show the ::-moz-range-thumb pseudo-element.
    * @see nsRangeFrame::CreateAnonymousContent
    */
   nsCOMPtr<Element> mThumbDiv;
 
   /**
-   * Cached style context for -moz-focus-outer CSS pseudo-element style.
+   * Cached ComputedStyle for -moz-focus-outer CSS pseudo-element style.
    */
   RefPtr<ComputedStyle> mOuterFocusStyle;
 
   class DummyTouchListener final : public nsIDOMEventListener
   {
   private:
     ~DummyTouchListener() {}
 
--- a/layout/forms/test/test_bug572649.html
+++ b/layout/forms/test/test_bug572649.html
@@ -31,19 +31,19 @@ https://bugzilla.mozilla.org/show_bug.cg
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 572649 **/
 SimpleTest.waitForExplicitFinish();
 
-// We intermittently trigger two "Wrong parent style context" assertions
+// We intermittently trigger two "Wrong parent ComputedStyle" assertions
 // on B2G emulator builds (bug XXXXXXX).  The two frames that get incorrect
-// style context parents are scroll bar parts in the <textarea>.
+// ComputedStyle parents are scroll bar parts in the <textarea>.
 SimpleTest.expectAssertions(0, 2);
 
 addLoadEvent(function() {
   var area = document.getElementById("area");
 
   is(area.scrollTop, 0, "The textarea should not be scrolled initially");
   area.addEventListener("focus", function() {
     setTimeout(function() {
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -2890,17 +2890,17 @@ ReflowInput::CalcLineHeight() const
 }
 
 /* static */ nscoord
 ReflowInput::CalcLineHeight(nsIContent* aContent,
                                   ComputedStyle* aComputedStyle,
                                   nscoord aBlockBSize,
                                   float aFontSizeInflation)
 {
-  NS_PRECONDITION(aComputedStyle, "Must have a style context");
+  NS_PRECONDITION(aComputedStyle, "Must have a ComputedStyle");
 
   nscoord lineHeight =
     ComputeLineHeight(aComputedStyle, aBlockBSize, aFontSizeInflation);
 
   NS_ASSERTION(lineHeight >= 0, "ComputeLineHeight screwed up");
 
   HTMLInputElement* input = HTMLInputElement::FromNodeOrNull(aContent);
   if (input && input->IsSingleLineTextControl()) {
--- a/layout/generic/WritingModes.h
+++ b/layout/generic/WritingModes.h
@@ -476,17 +476,17 @@ public:
    * XXX We will probably eliminate this and require explicit initialization
    *     in all cases once transition is complete.
    */
   WritingMode()
     : mWritingMode(0)
   { }
 
   /**
-   * Construct writing mode based on a style context
+   * Construct writing mode based on a ComputedStyle.
    */
   explicit WritingMode(ComputedStyle* aComputedStyle)
   {
     NS_ASSERTION(aComputedStyle, "we need an ComputedStyle here");
     InitFromStyleVisibility(aComputedStyle->StyleVisibility());
   }
 
   explicit WritingMode(const nsStyleVisibility* aStyleVisibility)
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -933,17 +933,17 @@ protected:
   // this block until our next continuation takes them.
   nsFrameList* GetPushedFloats() const;
   // Get the pushed floats list, or if there is not currently one,
   // make a new empty one.
   nsFrameList* EnsurePushedFloats();
   // Remove and return the pushed floats list.
   nsFrameList* RemovePushedFloats();
 
-  // Resolve a style context for our bullet frame.  aType should be
+  // Resolve a ComputedStyle for our bullet frame.  aType should be
   // mozListBullet or mozListNumber.  Passing in the style set is an
   // optimization, because all callsites have it.
   already_AddRefed<ComputedStyle> ResolveBulletStyle(
     mozilla::CSSPseudoElementType aType,
     mozilla::StyleSetHandle aStyleSet);
 
 #ifdef DEBUG
   void VerifyLines(bool aFinalCheckOK);
--- a/layout/generic/nsBulletFrame.cpp
+++ b/layout/generic/nsBulletFrame.cpp
@@ -143,17 +143,17 @@ nsBulletFrame::DidSetComputedStyle(Compu
       // accessed via different URLs.
       DeregisterAndCancelImageRequest();
 
       // Register the new request.
       mImageRequest = Move(newRequestClone);
       RegisterImageRequest(/* aKnownToBeAnimated = */ false);
     }
   } else {
-    // No image request on the new style context.
+    // No image request on the new ComputedStyle.
     DeregisterAndCancelImageRequest();
   }
 
 #ifdef ACCESSIBILITY
   // Update the list bullet accessible. If old style list isn't available then
   // no need to update the accessible tree because it's not created yet.
   if (aOldComputedStyle) {
     nsAccessibilityService* accService = nsIPresShell::AccService();
--- a/layout/generic/nsFirstLetterFrame.cpp
+++ b/layout/generic/nsFirstLetterFrame.cpp
@@ -52,19 +52,19 @@ nsFirstLetterFrame::BuildDisplayList(nsD
 
 void
 nsFirstLetterFrame::Init(nsIContent*       aContent,
                          nsContainerFrame* aParent,
                          nsIFrame*         aPrevInFlow)
 {
   RefPtr<ComputedStyle> newSC;
   if (aPrevInFlow) {
-    // Get proper style context for ourselves.  We're creating the frame
+    // Get proper ComputedStyle for ourselves.  We're creating the frame
     // that represents everything *except* the first letter, so just create
-    // a style context that inherits from our style parent, with no extra rules.
+    // a ComputedStyle that inherits from our style parent, with no extra rules.
     nsIFrame* styleParent =
       CorrectStyleParentFrame(aParent, nsCSSPseudoElements::firstLetter);
     ComputedStyle* parentComputedStyle = styleParent->Style();
     newSC = PresContext()->StyleSet()->
       ResolveStyleForFirstLetterContinuation(parentComputedStyle);
     SetComputedStyleWithoutNotification(newSC);
   }
 
@@ -316,21 +316,21 @@ nsFirstLetterFrame::CreateContinuationFo
   nsIPresShell* presShell = aPresContext->PresShell();
   nsPlaceholderFrame* placeholderFrame = GetPlaceholderFrame();
   nsContainerFrame* parent = placeholderFrame->GetParent();
 
   nsIFrame* continuation = presShell->FrameConstructor()->
     CreateContinuingFrame(aPresContext, aChild, parent, aIsFluid);
 
   // The continuation will have gotten the first letter style from its
-  // prev continuation, so we need to repair the style context so it
+  // prev continuation, so we need to repair the ComputedStyle so it
   // doesn't have the first letter styling.
   //
-  // Note that getting parent frame's style context is different from getting
-  // this frame's style context's parent in the presence of ::first-line,
+  // Note that getting parent frame's ComputedStyle is different from getting
+  // this frame's ComputedStyle's parent in the presence of ::first-line,
   // which we do want the continuation to inherit from.
   ComputedStyle* parentSC = parent->Style();
   if (parentSC) {
     RefPtr<ComputedStyle> newSC;
     newSC = presShell->StyleSet()->ResolveStyleForFirstLetterContinuation(parentSC);
     continuation->SetComputedStyle(newSC);
     nsLayoutUtils::MarkDescendantsDirty(continuation);
   }
@@ -367,17 +367,17 @@ nsFirstLetterFrame::DrainOverflowFrames(
 
   // It's also possible that we have an overflow list for ourselves
   AutoFrameListPtr overflowFrames(aPresContext, StealOverflowFrames());
   if (overflowFrames) {
     NS_ASSERTION(mFrames.NotEmpty(), "overflow list w/o frames");
     mFrames.AppendFrames(nullptr, *overflowFrames);
   }
 
-  // Now repair our first frames style context (since we only reflow
+  // Now repair our first frames ComputedStyle (since we only reflow
   // one frame there is no point in doing any other ones until they
   // are reflowed)
   nsIFrame* kid = mFrames.FirstChild();
   if (kid) {
     nsIContent* kidContent = kid->GetContent();
     if (kidContent) {
       NS_ASSERTION(kidContent->IsNodeOfType(nsINode::eTEXT),
                    "should contain only text nodes");
@@ -406,16 +406,16 @@ nsFirstLetterFrame::GetLogicalBaseline(W
   return mBaseline;
 }
 
 nsIFrame::LogicalSides
 nsFirstLetterFrame::GetLogicalSkipSides(const ReflowInput* aReflowInput) const
 {
   if (GetPrevContinuation()) {
     // We shouldn't get calls to GetSkipSides for later continuations since
-    // they have separate style contexts with initial values for all the
+    // they have separate ComputedStyles with initial values for all the
     // properties that could trigger a call to GetSkipSides.  Then again,
     // it's not really an error to call GetSkipSides on any frame, so
     // that's why we handle it properly.
     return LogicalSides(eLogicalSideBitsAll);
   }
   return LogicalSides();  // first continuation displays all sides
 }
--- a/layout/generic/nsFrame.h
+++ b/layout/generic/nsFrame.h
@@ -245,27 +245,27 @@ public:
   mozilla::a11y::AccType AccessibleType() override;
 #endif
 
   ComputedStyle* GetParentComputedStyle(nsIFrame** aProviderFrame) const override {
     return DoGetParentComputedStyle(aProviderFrame);
   }
 
   /**
-   * Do the work for getting the parent style context frame so that
+   * Do the work for getting the parent ComputedStyle frame so that
    * other frame's |GetParentComputedStyle| methods can call this
    * method on *another* frame.  (This function handles out-of-flow
    * frames by using the frame manager's placeholder map and it also
    * handles block-within-inline and generated content wrappers.)
    *
    * @param aProviderFrame (out) the frame associated with the returned value
-   *     or null if the style context is for display:contents content.
-   * @return The style context that should be the parent of this frame's
-   *         style context.  Null is permitted, and means that this frame's
-   *         style context should be the root of the style context tree.
+   *   or null if the ComputedStyle is for display:contents content.
+   * @return The ComputedStyle that should be the parent of this frame's
+   *   ComputedStyle.  Null is permitted, and means that this frame's
+   *   ComputedStyle should be the root of the ComputedStyle tree.
    */
   ComputedStyle* DoGetParentComputedStyle(nsIFrame** aProviderFrame) const;
 
   bool IsEmpty() override;
   bool IsSelfEmpty() override;
 
   void MarkIntrinsicISizesDirty() override;
   nscoord GetMinISize(gfxContext *aRenderingContext) override;
@@ -551,17 +551,17 @@ public:
   /**
    * Add a display item for the CSS outline, after calling
    * IsVisibleForPainting to confirm we are visible.
    */
   void DisplayOutline(nsDisplayListBuilder*   aBuilder,
                       const nsDisplayListSet& aLists);
 
   /**
-   * Adjust the given parent frame to the right style context parent frame for
+   * Adjust the given parent frame to the right ComputedStyle parent frame for
    * the child, given the pseudo-type of the prospective child.  This handles
    * things like walking out of table pseudos and so forth.
    *
    * @param aProspectiveParent what GetParent() on the child returns.
    *                           Must not be null.
    * @param aChildPseudo the child's pseudo type, if any.
    */
   static nsIFrame*
--- a/layout/generic/nsFrameStateBits.h
+++ b/layout/generic/nsFrameStateBits.h
@@ -259,18 +259,18 @@ FRAME_STATE_BIT(Generic, 52, NS_FRAME_HA
 
 // Frame is not displayed directly due to it being, or being under, an SVG
 // <defs> element or an SVG resource element (<mask>, <pattern>, etc.)
 FRAME_STATE_BIT(Generic, 53, NS_FRAME_IS_NONDISPLAY)
 
 // Frame has a LayerActivityProperty property
 FRAME_STATE_BIT(Generic, 54, NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY)
 
-// Frame owns anonymous boxes whose style contexts it will need to update during
-// a stylo tree traversal.
+// Frame owns anonymous boxes whose ComputedStyles it will need to update
+// during a stylo tree traversal.
 FRAME_STATE_BIT(Generic, 55, NS_FRAME_OWNS_ANON_BOXES)
 
 // Frame maybe has a counter-reset/increment style
 FRAME_STATE_BIT(Generic, 56, NS_FRAME_HAS_CSS_COUNTER_STYLE)
 
 // The display list of the frame can be handled by the shortcut for
 // COMMON CASE.
 FRAME_STATE_BIT(Generic, 57, NS_FRAME_SIMPLE_DISPLAYLIST)
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -232,17 +232,17 @@ nsImageFrame::DidSetComputedStyle(Comput
 
   if (!mImage) {
     // We'll pick this change up whenever we do get an image.
     return;
   }
 
   nsStyleImageOrientation newOrientation = StyleVisibility()->mImageOrientation;
 
-  // We need to update our orientation either if we had no style context before
+  // We need to update our orientation either if we had no ComputedStyle before
   // because this is the first time it's been set, or if the image-orientation
   // property changed from its previous value.
   bool shouldUpdateOrientation =
     !aOldComputedStyle ||
     aOldComputedStyle->StyleVisibility()->mImageOrientation != newOrientation;
 
   if (shouldUpdateOrientation) {
     nsCOMPtr<imgIContainer> image(mImage->Unwrap());
@@ -2103,17 +2103,17 @@ nsImageFrame::GetCursor(const nsPoint& a
                         nsIFrame::Cursor& aCursor)
 {
   if (nsImageMap* map = GetImageMap()) {
     nsIntPoint p;
     TranslateEventCoords(aPoint, p);
     nsCOMPtr<nsIContent> area = map->GetArea(p.x, p.y);
     if (area) {
       // Use the cursor from the style of the *area* element.
-      // XXX Using the image as the parent style context isn't
+      // XXX Using the image as the parent ComputedStyle isn't
       // technically correct, but it's probably the right thing to do
       // here, since it means that areas on which the cursor isn't
       // specified will inherit the style from the image.
       RefPtr<ComputedStyle> areaStyle =
         PresShell()->StyleSet()->
           ResolveStyleFor(area->AsElement(), Style(),
                           LazyComputeBehavior::Allow);
       FillCursorInformationFromStyle(areaStyle->StyleUserInterface(),
--- a/layout/generic/nsInlineFrame.cpp
+++ b/layout/generic/nsInlineFrame.cpp
@@ -355,19 +355,19 @@ nsInlineFrame::Reflow(nsPresContext*    
         mFrames.SetFrames(*prevOverflowFrames);
         lazilySetParentPointer = true;
       } else {
         // Insert the new frames at the beginning of the child list
         // and set their parent pointer
         const nsFrameList::Slice& newFrames =
           mFrames.InsertFrames(this, nullptr, *prevOverflowFrames);
         // If our prev in flow was under the first continuation of a first-line
-        // frame then we need to reparent the style contexts to remove the
+        // frame then we need to reparent the ComputedStyles to remove the
         // the special first-line styling. In the lazilySetParentPointer case
-        // we reparent the style contexts when we set their parents in
+        // we reparent the ComputedStyles when we set their parents in
         // nsInlineFrame::ReflowFrames and nsInlineFrame::ReflowInlineFrame.
         if (aReflowInput.mLineLayout->GetInFirstLine()) {
           ReparentChildListStyle(aPresContext, newFrames, this);
         }
       }
     }
   }
 
@@ -955,37 +955,37 @@ nsInlineFrame::UpdateStyleOfOwnedAnonBox
 
   nsIFrame* blockFrame = GetProperty(nsIFrame::IBSplitSibling());
   MOZ_ASSERT(blockFrame, "Why did we have an IB split?");
 
   // The later inlines need to get our style.
   ComputedStyle* ourStyle = Style();
 
   // The anonymous block's style inherits from ours, and we already have our new
-  // style context.
+  // ComputedStyle.
   RefPtr<ComputedStyle> newContext =
     aRestyleState.StyleSet().ResolveInheritingAnonymousBoxStyle(
       nsCSSAnonBoxes::mozBlockInsideInlineWrapper, ourStyle);
 
-  // We're guaranteed that newContext only differs from the old style context on
+  // We're guaranteed that newContext only differs from the old ComputedStyle on
   // the block in things they might inherit from us.  And changehint processing
   // guarantees walking the continuation and ib-sibling chains, so our existing
   // changehint being in aChangeList is good enough.  So we don't need to touch
   // aChangeList at all here.
 
   while (blockFrame) {
     MOZ_ASSERT(!blockFrame->GetPrevContinuation(),
                "Must be first continuation");
 
     MOZ_ASSERT(blockFrame->Style()->GetPseudo() ==
                nsCSSAnonBoxes::mozBlockInsideInlineWrapper,
-               "Unexpected kind of style context");
+               "Unexpected kind of ComputedStyle");
 
     // We don't want to just walk through using GetNextContinuationWithSameStyle
-    // here, because we want to set updated style contexts on both our
+    // here, because we want to set updated ComputedStyles on both our
     // ib-sibling blocks and inlines.
     for (nsIFrame* cont = blockFrame; cont; cont = cont->GetNextContinuation()) {
       cont->SetComputedStyle(newContext);
     }
 
     nsIFrame* nextInline = blockFrame->GetProperty(nsIFrame::IBSplitSibling());
 
     // This check is here due to bug 1431232.  Please remove it once
@@ -1021,22 +1021,22 @@ nsFirstLineFrame::Init(nsIContent*      
                        nsIFrame*         aPrevInFlow)
 {
   nsInlineFrame::Init(aContent, aParent, aPrevInFlow);
   if (!aPrevInFlow) {
     MOZ_ASSERT(Style()->GetPseudo() == nsCSSPseudoElements::firstLine);
     return;
   }
 
-  // This frame is a continuation - fixup the style context if aPrevInFlow
+  // This frame is a continuation - fixup the computed style if aPrevInFlow
   // is the first-in-flow (the only one with a ::first-line pseudo).
   if (aPrevInFlow->Style()->GetPseudo() == nsCSSPseudoElements::firstLine) {
     MOZ_ASSERT(FirstInFlow() == aPrevInFlow);
-    // Create a new style context that is a child of the parent
-    // style context thus removing the ::first-line style. This way
+    // Create a new ComputedStyle that is a child of the parent
+    // ComputedStyle thus removing the ::first-line style. This way
     // we behave as if an anonymous (unstyled) span was the child
     // of the parent frame.
     ComputedStyle* parentContext = aParent->Style();
     RefPtr<ComputedStyle> newSC = PresContext()->StyleSet()->
       ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::mozLineFrame,
                                          parentContext);
     SetComputedStyle(newSC);
   } else {
@@ -1083,17 +1083,17 @@ nsFirstLineFrame::Reflow(nsPresContext* 
   }
 
   // Check for an overflow list with our prev-in-flow
   nsFirstLineFrame* prevInFlow = (nsFirstLineFrame*)GetPrevInFlow();
   if (prevInFlow) {
     AutoFrameListPtr prevOverflowFrames(aPresContext,
                                         prevInFlow->StealOverflowFrames());
     if (prevOverflowFrames) {
-      // Reparent the new frames and their style contexts.
+      // Reparent the new frames and their ComputedStyles.
       const nsFrameList::Slice& newFrames =
         mFrames.InsertFrames(this, nullptr, *prevOverflowFrames);
       ReparentChildListStyle(aPresContext, newFrames, this);
     }
   }
 
   // It's also possible that we have an overflow list for ourselves.
   DrainSelfOverflowList();
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -249,17 +249,17 @@ static const nsFrameState TEXT_WHITESPAC
  *
  *   - A TextRunUserData in the case a text run maps multiple flows, but it
  *   doesn't have any glyph observer for changes in SVG fonts.
  *
  * You can differentiate between the four different cases with the
  * TEXT_IS_SIMPLE_FLOW and TEXT_MIGHT_HAVE_GLYPH_CHANGES flags.
  *
  * We go to considerable effort to make sure things work even if in-flow
- * siblings have different style contexts (i.e., first-letter and first-line).
+ * siblings have different ComputedStyles (i.e., first-letter and first-line).
  *
  * Our convention is that unsigned integer character offsets are offsets into
  * the transformed string. Signed integer character offsets are offsets into
  * the DOM string.
  *
  * XXX currently we don't handle hyphenated breaks between text frames where the
  * hyphen occurs at the end of the first text frame, e.g.
  *   <b>Kit&shy;</b>ty
--- a/layout/generic/test/test_bug904810.html
+++ b/layout/generic/test/test_bug904810.html
@@ -22,19 +22,19 @@ third line
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 904810 **/
 
 SimpleTest.waitForExplicitFinish();
 
-// We intermittently trigger two "Wrong parent style context" assertions
+// We intermittently trigger two "Wrong parent ComputedStyle" assertions
 // on B2G emulator builds (bug XXXXXXX).  The two frames that get incorrect
-// style context parents are scroll bar parts in the <textarea>.
+// ComputedStyle parents are scroll bar parts in the <textarea>.
 SimpleTest.expectAssertions(0, 2);
 
 SimpleTest.waitForFocus(function test() {
   function shiftLeft(i) {
     for ( ; i > 0; --i)
       synthesizeKey("KEY_ArrowLeft", {shiftKey:true});
   }
 
--- a/layout/mathml/mathml.css
+++ b/layout/mathml/mathml.css
@@ -199,17 +199,17 @@ mtable[frame="dashed"] > mtr > mtd:last-
 mtable[rowspacing] > mtr > mtd,
 mtable[columnspacing] > mtr > mtd,
 mtable[framespacing] > mtr > mtd {
   /* Spacing handled outside of CSS */
   padding: 0px;
 }
 
 /**************************************************************************/
-/* This rule is used to give a style context suitable for nsMathMLChars.
+/* This rule is used to give a ComputedStyle suitable for nsMathMLChars.
    We don't actually style -moz-math-anonymous by default. */
 /*
 ::-moz-math-anonymous {
 }
 */
 
 /**********************************************************************/
 /* This is used when wrapping non-MathML inline elements inside math. */
--- a/layout/mathml/nsMathMLChar.cpp
+++ b/layout/mathml/nsMathMLChar.cpp
@@ -756,17 +756,17 @@ InitCharGlobals()
 nsMathMLChar::~nsMathMLChar()
 {
   MOZ_COUNT_DTOR(nsMathMLChar);
 }
 
 ComputedStyle*
 nsMathMLChar::GetComputedStyle() const
 {
-  NS_ASSERTION(mComputedStyle, "chars should always have style context");
+  NS_ASSERTION(mComputedStyle, "chars should always have a ComputedStyle");
   return mComputedStyle;
 }
 
 void
 nsMathMLChar::SetComputedStyle(ComputedStyle* aComputedStyle)
 {
   MOZ_ASSERT(aComputedStyle);
   mComputedStyle = aComputedStyle;
@@ -814,31 +814,31 @@ nsMathMLChar::SetData(nsString& aData)
  1) If the base size of the char is sufficient to cover the
     container' size, we use that. If not, it will still be
     used as a fallback if the other stages in the pipeline fail.
     Issues :
     a) The base size, the parts and the variants of a char can
        be in different fonts. For eg., the base size for '(' should
        come from a normal ascii font if CMEX10 is used, since CMEX10
        only contains the stretched versions. Hence, there are two
-       style contexts in use throughout the process. The leaf style
+       ComputedStyles in use throughout the process. The leaf style
        context of the char holds fonts with which to try to stretch
-       the char. The parent style context of the char contains fonts
+       the char. The parent ComputedStyle of the char contains fonts
        for normal rendering. So the parent context is the one used
        to get the initial base size at the start of the pipeline.
     b) For operators that can be largeop's in display mode,
        we will skip the base size even if it fits, so that
        the next stage in the pipeline is given a chance to find
        a largeop variant. If the next stage fails, we fallback
        to the base size.
 
  2) We search for the first larger variant of the char that fits the
     container' size.  We first search for larger variants using the glyph
     table corresponding to the first existing font specified in the list of
-    stretchy fonts held by the leaf style context (from -moz-math-stretchy in
+    stretchy fonts held by the leaf ComputedStyle (from -moz-math-stretchy in
     mathml.css).  Generic fonts are resolved by the preference
     "font.mathfont-family".
     Issues :
     a) the largeop and display settings determine the starting
        size when we do the above search, regardless of whether
        smaller variants already fit the container' size.
     b) if it is a largeopOnly request (i.e., a displaystyle operator
        with largeop=true and stretchy=false), we break after finding
@@ -1090,17 +1090,17 @@ private:
 // Returns true if the size is OK, false to keep searching.
 // Always updates the char if a better match is found.
 bool
 nsMathMLChar::
 StretchEnumContext::TryVariants(nsGlyphTable* aGlyphTable,
                                 RefPtr<gfxFontGroup>* aFontGroup,
                                 const FontFamilyList& aFamilyList)
 {
-  // Use our stretchy style context now that stretching is in progress
+  // Use our stretchy ComputedStyle now that stretching is in progress
   ComputedStyle *sc = mChar->mComputedStyle;
   nsFont font = sc->StyleFont()->mFont;
   NormalizeDefaultFont(font, mFontSizeInflation);
 
   bool isVertical = (mDirection == NS_STRETCH_DIRECTION_VERTICAL);
   nscoord oneDevPixel = mPresContext->AppUnitsPerDevPixel();
   char16_t uchar = mChar->mData[0];
   bool largeop = (NS_STRETCH_LARGEOP & mStretchHint) != 0;
@@ -1236,17 +1236,17 @@ StretchEnumContext::TryVariants(nsGlyphT
 // 3. Build by parts.
 // Returns true if the size is OK, false to keep searching.
 // Always updates the char if a better match is found.
 bool
 nsMathMLChar::StretchEnumContext::TryParts(nsGlyphTable* aGlyphTable,
                                            RefPtr<gfxFontGroup>* aFontGroup,
                                            const FontFamilyList& aFamilyList)
 {
-  // Use our stretchy style context now that stretching is in progress
+  // Use our stretchy ComputedStyle now that stretching is in progress
   nsFont font = mChar->mComputedStyle->StyleFont()->mFont;
   NormalizeDefaultFont(font, mFontSizeInflation);
 
   // Compute the bounding metrics of all partial glyphs
   RefPtr<gfxTextRun> textRun[4];
   nsGlyphCode chdata[4];
   nsBoundingMetrics bmdata[4];
   nscoord sizedata[4];
--- a/layout/mathml/nsMathMLChar.h
+++ b/layout/mathml/nsMathMLChar.h
@@ -171,30 +171,30 @@ public:
   nscoord
   GetMaxWidth(nsIFrame* aForFrame,
               DrawTarget* aDrawTarget,
               float aFontSizeInflation,
               uint32_t aStretchHint = NS_STRETCH_NORMAL);
 
   // Metrics that _exactly_ enclose the char. The char *must* have *already*
   // being stretched before you can call the GetBoundingMetrics() method.
-  // IMPORTANT: since chars have their own style contexts, and may be rendered
+  // IMPORTANT: since chars have their own ComputedStyles, and may be rendered
   // with glyphs that are not in the parent font, just calling the default
   // aRenderingContext.GetBoundingMetrics(aChar) can give incorrect results.
   void
   GetBoundingMetrics(nsBoundingMetrics& aBoundingMetrics) {
     aBoundingMetrics = mBoundingMetrics;
   }
 
   void
   SetBoundingMetrics(nsBoundingMetrics& aBoundingMetrics) {
     mBoundingMetrics = aBoundingMetrics;
   }
 
-  // Hooks to access the extra leaf style contexts given to the MathMLChars.
+  // Hooks to access the extra leaf ComputedStyles given to the MathMLChars.
   // They provide an interface to make them accessible to the Style System via
   // the Get/Set AdditionalComputedStyle() APIs. Owners of MathMLChars
   // should honor these APIs.
   mozilla::ComputedStyle* GetComputedStyle() const;
 
   void SetComputedStyle(mozilla::ComputedStyle* aComputedStyle);
 
 protected:
--- a/layout/mathml/nsMathMLFrame.cpp
+++ b/layout/mathml/nsMathMLFrame.cpp
@@ -85,19 +85,19 @@ nsMathMLFrame::UpdatePresentationData(ui
       mPresentationData.flags |= NS_MATHML_DTLS;
     } else {
       mPresentationData.flags &= ~NS_MATHML_DTLS;
     }
   }
   return NS_OK;
 }
 
-// Helper to give a style context suitable for doing the stretching of
+// Helper to give a ComputedStyle suitable for doing the stretching of
 // a MathMLChar. Frame classes that use this should ensure that the
-// extra leaf style contexts given to the MathMLChars are accessible to
+// extra leaf ComputedStyle given to the MathMLChars are accessible to
 // the Style System via the Get/Set AdditionalComputedStyle() APIs.
 /* static */ void
 nsMathMLFrame::ResolveMathMLCharStyle(nsPresContext*  aPresContext,
                                       nsIContent*      aContent,
                                       ComputedStyle*  aParentComputedStyle,
                                       nsMathMLChar*    aMathMLChar)
 {
   CSSPseudoElementType pseudoType =
--- a/layout/mathml/nsMathMLFrame.h
+++ b/layout/mathml/nsMathMLFrame.h
@@ -99,18 +99,18 @@ public:
   }
 
   bool
   IsMrowLike() override
   {
     return false;
   }
 
-  // helper to give a style context suitable for doing the stretching to the
-  // MathMLChar. Frame classes that use this should make the extra style contexts
+  // helper to give a ComputedStyle suitable for doing the stretching to the
+  // MathMLChar. Frame classes that use this should make the extra ComputedStyle
   // accessible to the Style System via Get/Set AdditionalmComputedStyle.
   static void
   ResolveMathMLCharStyle(nsPresContext* aPresContext,
                          nsIContent* aContent,
                          mozilla::ComputedStyle* aParenComputedStyle,
                          nsMathMLChar* aMathMLChar);
 
   // helper to get the mEmbellishData of a frame
--- a/layout/mathml/nsMathMLmencloseFrame.cpp
+++ b/layout/mathml/nsMathMLmencloseFrame.cpp
@@ -60,17 +60,17 @@ nsMathMLmencloseFrame::~nsMathMLmenclose
 
 nsresult nsMathMLmencloseFrame::AllocateMathMLChar(nsMencloseNotation mask)
 {
   // Is the char already allocated?
   if ((mask == NOTATION_LONGDIV && mLongDivCharIndex >= 0) ||
       (mask == NOTATION_RADICAL && mRadicalCharIndex >= 0))
     return NS_OK;
 
-  // No need to track the style context given to our MathML chars.
+  // No need to track the ComputedStyle given to our MathML chars.
   // The Style System will use Get/SetAdditionalComputedStyle() to keep it
   // up-to-date if dynamic changes arise.
   uint32_t i = mMathMLChar.Length();
   nsAutoString Char;
 
   if (!mMathMLChar.AppendElement())
     return NS_ERROR_OUT_OF_MEMORY;
 
@@ -721,17 +721,17 @@ nsMathMLmencloseFrame::AttributeChanged(
     InitNotations();
   }
 
   return nsMathMLContainerFrame::
     AttributeChanged(aNameSpaceID, aAttribute, aModType);
 }
 
 //////////////////
-// the Style System will use these to pass the proper style context to our
+// the Style System will use these to pass the proper ComputedStyle to our
 // MathMLChar
 ComputedStyle*
 nsMathMLmencloseFrame::GetAdditionalComputedStyle(int32_t aIndex) const
 {
   int32_t len = mMathMLChar.Length();
   if (aIndex >= 0 && aIndex < len)
     return mMathMLChar[aIndex].GetComputedStyle();
   else
--- a/layout/mathml/nsMathMLmfencedFrame.cpp
+++ b/layout/mathml/nsMathMLmfencedFrame.cpp
@@ -51,17 +51,17 @@ nsMathMLmfencedFrame::SetInitialChildLis
 {
   // First, let the base class do its work
   nsMathMLContainerFrame::SetInitialChildList(aListID, aChildList);
 
   // InheritAutomaticData will not get called if our parent is not a mathml
   // frame, so initialize NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY for
   // GetPreferredStretchSize() from Reflow().
   mPresentationData.flags |= NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY;
-  // No need to track the style contexts given to our MathML chars.
+  // No need to track the ComputedStyle given to our MathML chars.
   // The Style System will use Get/SetAdditionalComputedStyle() to keep them
   // up-to-date if dynamic changes arise.
   CreateFencesAndSeparators(PresContext());
 }
 
 nsresult
 nsMathMLmfencedFrame::AttributeChanged(int32_t         aNameSpaceID,
                                        nsAtom*        aAttribute,
@@ -677,17 +677,18 @@ nsMathMLmfencedFrame::FixInterFrameSpaci
     mSeparatorsChar[i].GetRect(rect);
     rect.MoveBy(gap, 0);
     mSeparatorsChar[i].SetRect(rect);
   }
   return gap;
 }
 
 // ----------------------
-// the Style System will use these to pass the proper style context to our MathMLChar
+// the Style System will use these to pass the proper ComputedStyle to our
+// MathMLChar
 ComputedStyle*
 nsMathMLmfencedFrame::GetAdditionalComputedStyle(int32_t aIndex) const
 {
   int32_t openIndex = -1;
   int32_t closeIndex = -1;
   int32_t lastIndex = mSeparatorsCount-1;
 
   if (mOpenChar) {
--- a/layout/mathml/nsMathMLmoFrame.cpp
+++ b/layout/mathml/nsMathMLmoFrame.cpp
@@ -11,17 +11,17 @@
 #include "nsFrameSelection.h"
 #include "nsMathMLElement.h"
 #include <algorithm>
 
 //
 // <mo> -- operator, fence, or separator - implementation
 //
 
-// additional style context to be used by our MathMLChar.
+// additional ComputedStyle to be used by our MathMLChar.
 #define NS_MATHML_CHAR_STYLE_CONTEXT_INDEX   0
 
 nsIFrame*
 NS_NewMathMLmoFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle)
 {
   return new (aPresShell) nsMathMLmoFrame(aStyle);
 }
 
@@ -938,17 +938,17 @@ nsMathMLmoFrame::SetInitialChildList(Chi
 void
 nsMathMLmoFrame::Reflow(nsPresContext*          aPresContext,
                         ReflowOutput&     aDesiredSize,
                         const ReflowInput& aReflowInput,
                         nsReflowStatus&          aStatus)
 {
   MOZ_ASSERT(aStatus.IsEmpty(), "Caller should pass a fresh reflow status!");
 
-  // certain values use units that depend on our style context, so
+  // certain values use units that depend on our ComputedStyle, so
   // it is safer to just process the whole lot here
   ProcessOperatorData();
 
   nsMathMLTokenFrame::Reflow(aPresContext, aDesiredSize,
                              aReflowInput, aStatus);
 }
 
 nsresult
@@ -1086,18 +1086,18 @@ nsMathMLmoFrame::AttributeChanged(int32_
     return ReLayoutChildren(target);
   }
 
   return nsMathMLTokenFrame::
          AttributeChanged(aNameSpaceID, aAttribute, aModType);
 }
 
 // ----------------------
-// No need to track the style context given to our MathML char.
-// the Style System will use these to pass the proper style context to our MathMLChar
+// No need to track the ComputedStyle given to our MathML char.
+// the Style System will use these to pass the proper ComputedStyle to our MathMLChar
 ComputedStyle*
 nsMathMLmoFrame::GetAdditionalComputedStyle(int32_t aIndex) const
 {
   switch (aIndex) {
   case NS_MATHML_CHAR_STYLE_CONTEXT_INDEX:
     return mMathMLChar.GetComputedStyle();
   default:
     return nullptr;
--- a/layout/mathml/nsMathMLmrootFrame.cpp
+++ b/layout/mathml/nsMathMLmrootFrame.cpp
@@ -11,17 +11,17 @@
 #include "gfxMathTable.h"
 
 using namespace mozilla;
 
 //
 // <mroot> -- form a radical - implementation
 //
 
-// additional style context to be used by our MathMLChar.
+// additional ComputedStyle to be used by our MathMLChar.
 #define NS_SQR_CHAR_STYLE_CONTEXT_INDEX   0
 
 static const char16_t kSqrChar = char16_t(0x221A);
 
 nsIFrame*
 NS_NewMathMLmrootFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle)
 {
   return new (aPresShell) nsMathMLmrootFrame(aStyle);
@@ -44,17 +44,17 @@ void
 nsMathMLmrootFrame::Init(nsIContent*       aContent,
                          nsContainerFrame* aParent,
                          nsIFrame*         aPrevInFlow)
 {
   nsMathMLContainerFrame::Init(aContent, aParent, aPrevInFlow);
 
   nsPresContext *presContext = PresContext();
 
-  // No need to track the style context given to our MathML char.
+  // No need to track the ComputedStyle given to our MathML char.
   // The Style System will use Get/SetAdditionalComputedStyle() to keep it
   // up-to-date if dynamic changes arise.
   nsAutoString sqrChar; sqrChar.Assign(kSqrChar);
   mSqrChar.SetData(sqrChar);
   ResolveMathMLCharStyle(presContext, mContent, mComputedStyle, &mSqrChar);
 }
 
 NS_IMETHODIMP
@@ -389,17 +389,18 @@ nsMathMLmrootFrame::GetIntrinsicISizeMet
 
   aDesiredSize.Width() = width;
   aDesiredSize.mBoundingMetrics.width = width;
   aDesiredSize.mBoundingMetrics.leftBearing = 0;
   aDesiredSize.mBoundingMetrics.rightBearing = width;
 }
 
 // ----------------------
-// the Style System will use these to pass the proper style context to our MathMLChar
+// the Style System will use these to pass the proper ComputedStyle to our
+// MathMLChar
 ComputedStyle*
 nsMathMLmrootFrame::GetAdditionalComputedStyle(int32_t aIndex) const
 {
   switch (aIndex) {
   case NS_SQR_CHAR_STYLE_CONTEXT_INDEX:
     return mSqrChar.GetComputedStyle();
   default:
     return nullptr;
--- a/layout/painting/RetainedDisplayListBuilder.cpp
+++ b/layout/painting/RetainedDisplayListBuilder.cpp
@@ -17,17 +17,17 @@
  * Code for doing display list building for a modified subset of the window,
  * and then merging it into the existing display list (for the full window).
  *
  * The approach primarily hinges on the observation that the ‘true’ ordering of
  * display items is represented by a DAG (only items that intersect in 2d space
  * have a defined ordering). Our display list is just one of a many possible linear
  * representations of this ordering.
  *
- * Each time a frame changes (gets a new style context, or has a size/position
+ * Each time a frame changes (gets a new ComputedStyle, or has a size/position
  * change), we schedule a paint (as we do currently), but also reord the frame that
  * changed.
  *
  * When the next paint occurs we union the overflow areas (in screen space) of the
  * changed frames, and compute a rect/region that contains all changed items. We
  * then build a display list just for this subset of the screen and merge it into
  * the display list from last paint.
  *
--- a/layout/painting/nsCSSRendering.cpp
+++ b/layout/painting/nsCSSRendering.cpp
@@ -795,17 +795,17 @@ ConstructBorderRenderer(nsPresContext* a
                         const nsRect& aDirtyRect,
                         const nsRect& aBorderArea,
                         const nsStyleBorder& aStyleBorder,
                         Sides aSkipSides,
                         bool* aNeedsClip)
 {
   nsMargin border = aStyleBorder.GetComputedBorder();
 
-  // Get our style context's color struct.
+  // Get our ComputedStyle's color struct.
   const nsStyleColor* ourColor = aComputedStyle->StyleColor();
 
   // In NavQuirks mode we want to use the parent's context as a starting point
   // for determining the background color.
   bool quirks = aPresContext->CompatibilityMode() == eCompatibility_NavQuirks;
   nsIFrame* bgFrame = nsCSSRendering::FindNonTransparentBackgroundFrame(aForFrame, quirks);
   ComputedStyle* bgContext = bgFrame->Style();
   nscolor bgColor = bgContext->
@@ -898,18 +898,18 @@ nsCSSRendering::PaintBorderWithStyleBord
                                            PaintBorderFlags aFlags,
                                            Sides aSkipSides)
 {
   DrawTarget& aDrawTarget = *aRenderingContext.GetDrawTarget();
 
   PrintAsStringNewline("++ PaintBorder");
 
   // Check to see if we have an appearance defined.  If so, we let the theme
-  // renderer draw the border.  DO not get the data from aForFrame, since the passed in style context
-  // may be different!  Always use |aComputedStyle|!
+  // renderer draw the border.  DO not get the data from aForFrame, since the
+  // passed in ComputedStyle may be different!  Always use |aComputedStyle|!
   const nsStyleDisplay* displayData = aComputedStyle->StyleDisplay();
   if (displayData->mAppearance) {
     nsITheme *theme = aPresContext->GetTheme();
     if (theme &&
         theme->ThemeSupportsWidget(aPresContext, aForFrame,
                                    displayData->mAppearance)) {
       return ImgDrawResult::SUCCESS; // Let the theme handle it.
     }
@@ -1046,17 +1046,17 @@ nsCSSRendering::CreateBorderRendererForO
                                                gfxContext* aRenderingContext,
                                                nsIFrame* aForFrame,
                                                const nsRect& aDirtyRect,
                                                const nsRect& aBorderArea,
                                                ComputedStyle* aComputedStyle)
 {
   nscoord             twipsRadii[8];
 
-  // Get our style context's color struct.
+  // Get our ComputedStyle's color struct.
   const nsStyleOutline* ourOutline = aComputedStyle->StyleOutline();
 
   if (!ourOutline->ShouldPaintOutline()) {
     // Empty outline
     return Nothing();
   }
 
   nsIFrame* bgFrame = nsCSSRendering::FindNonTransparentBackgroundFrame
@@ -1219,17 +1219,17 @@ nsCSSRendering::PaintFocus(nsPresContext
                              NS_STYLE_BORDER_STYLE_DOTTED,
                              NS_STYLE_BORDER_STYLE_DOTTED };
   nscolor focusColors[4] = { aColor, aColor, aColor, aColor };
 
   // Because this renders a dotted border, the background color
   // should not be used.  Therefore, we provide a value that will
   // be blatantly wrong if it ever does get used.  (If this becomes
   // something that CSS can style, this function will then have access
-  // to a style context and can use the same logic that PaintBorder
+  // to a ComputedStyle and can use the same logic that PaintBorder
   // and PaintOutline do.)
   //
   // WebRender layers-free mode don't use PaintFocus function. Just assign
   // the backface-visibility to true for this case.
   nsCSSBorderRenderer br(aPresContext,
                          nullptr,
                          aDrawTarget,
                          focusRect,
@@ -1403,17 +1403,17 @@ nsCSSRendering::FindBackgroundStyleFrame
  * Thus, in our implementation, it is responsible for ensuring that:
  *  + we paint the correct background on the |nsCanvasFrame|,
  *    |nsRootBoxFrame|, or |nsPageFrame|,
  *  + we don't paint the background on the root element, and
  *  + we don't paint the background on the BODY element in *some* cases,
  *    and for SGML-based HTML documents only.
  *
  * |FindBackground| returns true if a background should be painted, and
- * the resulting style context to use for the background information
+ * the resulting ComputedStyle to use for the background information
  * will be filled in to |aBackground|.
  */
 ComputedStyle*
 nsCSSRendering::FindRootFrameBackground(nsIFrame* aForFrame)
 {
   return FindBackgroundStyleFrame(aForFrame)->Style();
 }
 
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -1794,17 +1794,17 @@ nsDisplayListBuilder::IsAnimatedGeometry
     return AGR_YES;
   }
 
   if ((aFrame->GetStateBits() & NS_FRAME_MAY_BE_TRANSFORMED) &&
       aFrame->IsFrameOfType(nsIFrame::eSVG)) {
     // For SVG containers, they always have
     // NS_FRAME_MAY_BE_TRANSFORMED bit.  However, they would be
     // affected by the fragement identifiers in the svgView form at
-    // runtime without a new style context.
+    // runtime without a new ComputedStyle.
     // For example, layout/reftests/svg/fragmentIdentifier-01.xhtml
     //
     // see https://www.w3.org/TR/SVG/linking.html#SVGFragmentIdentifiers
     result = AGR_MAYBE;
   }
 
   if (aParent) {
     *aParent = parent;
--- a/layout/reftests/bugs/1209603-1.html
+++ b/layout/reftests/bugs/1209603-1.html
@@ -27,21 +27,21 @@ getComputedStyle(a, "").marginTop;
      also needs to be different from 20px now to avoid sibling-sharing -->
 <div style="font-size: 30px"><p id="b">Should be 20px font size.</p></div>
 
 <script>
 // Note that A and B share rule nodes, and note that the margin struct
 // has been conditionally (on font size) cached on their shared rule node.
 var b = document.getElementById("b");
 
-// force style context construction and computation of the font struct on
+// force ComputedStyle construction and computation of the font struct on
 // B's parent
 getComputedStyle(b.parentNode, "").fontSize;
 
-// force style context construction (and computation of the color
+// force ComputedStyle construction (and computation of the color
 // struct) on B, but not the margin struct or font struct
 getComputedStyle(b, "").color;
 
 // restyle B and flush
 b.parentNode.style.fontSize = "10px";
 getComputedStyle(b, "").marginTop;
 // This flush will call CalcStyleDifference on B, which will find no
 // cached font struct on the old context, but which will find a
--- a/layout/reftests/first-letter/reftest.list
+++ b/layout/reftests/first-letter/reftest.list
@@ -1,13 +1,13 @@
 # basic functionality
 == basic-1.html basic-ref.html
 == basic-2.html basic-ref.html
 
-# parent style context correct
+# parent ComputedStyle correct
 == parent-style-1.html parent-style-1-ref.html
 
 # others
 == nested-1a.html nested-1-ref.html
 == nested-1b.html nested-1-ref.html
 == nested-1c.html nested-1-ref.html
 == nested-1d.html nested-1-ref.html
 == nested-1e.html nested-1-ref.html
--- a/layout/reftests/first-line/reftest.list
+++ b/layout/reftests/first-line/reftest.list
@@ -2,17 +2,17 @@
 == basic-1.html basic-ref.html
 
 # handling of out-of-flows when ::first-line happens
 == out-of-flow-1a.html out-of-flow-1-ref.html
 == out-of-flow-1b.html out-of-flow-1-ref.html
 == out-of-flow-1c.html out-of-flow-1-ref.html
 == out-of-flow-1d.html out-of-flow-1-ref.html
 
-# parent style context correct
+# parent computed style correct
 == parent-style-1.html parent-style-1-ref.html
 == parent-style-2.html parent-style-2-ref.html
 == parent-style-3.html parent-style-3-ref.html
 
 # stress-tests
 load stress-1.html # assertion test
 == stress-2.html stress-2-ref.html # assertion + rendering test
 load stress-3.html # assertion test
--- a/layout/style/ComputedStyle.h
+++ b/layout/style/ComputedStyle.h
@@ -34,27 +34,27 @@ extern "C" {
   void Gecko_ComputedStyle_Destroy(mozilla::ComputedStyle*);
 }
 
 MOZ_DEFINE_MALLOC_ENCLOSING_SIZE_OF(ServoComputedValuesMallocEnclosingSizeOf)
 
 /**
  * A ComputedStyle represents the computed style data for an element.  The
  * computed style data are stored in a set of structs (see nsStyleStruct.h) that
- * are cached either on the style context or in the rule tree (see nsRuleNode.h
+ * are cached either on the ComputedStyle or in the rule tree (see nsRuleNode.h
  * for a description of this caching and how the cached structs are shared).
  *
  * Since the data in |nsIStyleRule|s and |nsRuleNode|s are immutable (with a few
  * exceptions, like system color changes), the data in an ComputedStyle are also
  * immutable (with the additional exception of GetUniqueStyleData).  When style
- * data change, ElementRestyler::Restyle creates a new style context.
+ * data change, ElementRestyler::Restyle creates a new ComputedStyle.
  *
  * ComputedStyles are reference counted. References are generally held by:
- *  1. the |nsIFrame|s that are using the style context and
- *  2. any *child* style contexts (this might be the reverse of
+ *  1. the |nsIFrame|s that are using the ComputedStyle and
+ *  2. any *child* ComputedStyle (this might be the reverse of
  *     expectation, but it makes sense in this case)
  *
  * FIXME(emilio): This comment is somewhat outdated now.
  */
 
 class ComputedStyle
 {
 public:
@@ -73,21 +73,21 @@ public:
   {
     return mozilla::eArenaObjectID_GeckoComputedStyle;
   }
   nsIPresShell* Arena();
 
   void AddRef() { Servo_ComputedStyle_AddRef(this); }
   void Release() { Servo_ComputedStyle_Release(this); }
 
-  // Return the style context whose style data should be used for the R,
+  // Return the ComputedStyle whose style data should be used for the R,
   // G, and B components of color, background-color, and border-*-color
   // if RelevantLinkIsVisited().
   //
-  // GetPseudo() and GetPseudoType() on this style context return the
+  // GetPseudo() and GetPseudoType() on this ComputedStyle return the
   // same as on |this|, and its depth in the tree (number of GetParent()
   // calls until null is returned) is the same as |this|, since its
   // parent is either |this|'s parent or |this|'s parent's
   // style-if-visited.
   //
   // Structs on this context should never be examined without also
   // examining the corresponding struct on |this|.  Doing so will likely
   // both (1) lead to a privacy leak and (2) lead to dynamic change bugs
@@ -127,85 +127,85 @@ public:
 
   bool IsAnonBox() const {
     return IsInheritingAnonBox() || IsNonInheritingAnonBox();
   }
 
   bool IsPseudoElement() const { return mPseudoTag && !IsAnonBox(); }
 
 
-  // Does this style context or any of its ancestors have text
+  // Does this ComputedStyle or any of its ancestors have text
   // decoration lines?
   // Differs from nsStyleTextReset::HasTextDecorationLines, which tests
   // only the data for a single context.
   bool HasTextDecorationLines() const
     { return !!(mBits & NS_STYLE_HAS_TEXT_DECORATION_LINES); }
 
   // Whether any line break inside should be suppressed? If this returns
   // true, the line should not be broken inside, which means inlines act
   // as if nowrap is set, <br> is suppressed, and blocks are inlinized.
   // This bit is propogated to all children of line partitipants. It is
   // currently used by ruby to make its content frames unbreakable.
   // NOTE: for nsTextFrame, use nsTextFrame::ShouldSuppressLineBreak()
   // instead of this method.
   bool ShouldSuppressLineBreak() const
     { return !!(mBits & NS_STYLE_SUPPRESS_LINEBREAK); }
 
-  // Does this style context or any of its ancestors have display:none set?
+  // Does this ComputedStyle or any of its ancestors have display:none set?
   bool IsInDisplayNoneSubtree() const
     { return !!(mBits & NS_STYLE_IN_DISPLAY_NONE_SUBTREE); }
 
   // Is this horizontal-in-vertical (tate-chu-yoko) text? This flag is
-  // only set on style contexts whose pseudo is nsCSSAnonBoxes::mozText.
+  // only set on ComputedStyles whose pseudo is nsCSSAnonBoxes::mozText.
   bool IsTextCombined() const
     { return !!(mBits & NS_STYLE_IS_TEXT_COMBINED); }
 
-  // Does this style context represent the style for a pseudo-element or
-  // inherit data from such a style context?  Whether this returns true
+  // Does this ComputedStyle represent the style for a pseudo-element or
+  // inherit data from such a ComputedStyle?  Whether this returns true
   // is equivalent to whether it or any of its ancestors returns
   // non-null for IsPseudoElement().
   bool HasPseudoElementData() const
     { return !!(mBits & NS_STYLE_HAS_PSEUDO_ELEMENT_DATA); }
 
   bool HasChildThatUsesResetStyle() const
     { return mBits & NS_STYLE_HAS_CHILD_THAT_USES_RESET_STYLE; }
 
   // Is the only link whose visitedness is allowed to influence the
-  // style of the node this style context is for (which is that element
+  // style of the node this ComputedStyle is for (which is that element
   // or its nearest ancestor that is a link) visited?
   bool RelevantLinkVisited() const
     { return !!(mBits & NS_STYLE_RELEVANT_LINK_VISITED); }
 
-  // Is this a style context for a link?
+  // Is this a ComputedStyle for a link?
   inline bool IsLinkContext() const;
 
-  // Is this style context the GetStyleIfVisited() for some other style
+  // Is this ComputedStyle the GetStyleIfVisited() for some other style
   // context?
   bool IsStyleIfVisited() const
     { return !!(mBits & NS_STYLE_IS_STYLE_IF_VISITED); }
 
-  // Tells this style context that it should return true from
+  // Tells this ComputedStyle that it should return true from
   // IsStyleIfVisited.
   void SetIsStyleIfVisited()
     { mBits |= NS_STYLE_IS_STYLE_IF_VISITED; }
 
-  // Does any descendant of this style context have any style values
-  // that were computed based on this style context's ancestors?
+  // Does any descendant of this ComputedStyle have any style values
+  // that were computed based on this ComputedStyle's ancestors?
   bool HasChildThatUsesGrandancestorStyle() const
     { return !!(mBits & NS_STYLE_CHILD_USES_GRANDANCESTOR_STYLE); }
 
-  // Is this style context shared with a sibling or cousin?
+  // Is this ComputedStyle shared with a sibling or cousin?
   // (See nsStyleSet::GetContext.)
   bool IsShared() const
     { return !!(mBits & NS_STYLE_IS_SHARED); }
 
   /**
-   * Returns whether this style context has cached style data for a
+   * Returns whether this ComputedStyle has cached style data for a
    * given style struct and it does NOT own that struct.  This can
-   * happen because it was inherited from the parent style context, or
+   * happen because it was inherited from the parent ComputedStyle, or
    * because it was stored conditionally on the rule node.
    */
   bool HasCachedDependentStyleData(nsStyleStructID aSID) {
     return mBits & GetBitForSID(aSID);
   }
 
   ComputedStyle* GetCachedInheritingAnonBoxStyle(nsAtom* aAnonBox) const
   {
@@ -268,17 +268,17 @@ public:
   #define STYLE_STRUCT(name_) \
     inline const nsStyle##name_ * ThreadsafeStyle##name_();
   #include "nsStyleStructList.h"
   #undef STYLE_STRUCT
 
 
   /**
    * PeekStyle* is like Style* but doesn't trigger style
-   * computation if the data is not cached on either the style context
+   * computation if the data is not cached on either the ComputedStyle
    * or the rule node.
    *
    * Perhaps this shouldn't be a public ComputedStyle API.
    */
   #define STYLE_STRUCT(name_)  \
     inline const nsStyle##name_ * PeekStyle##name_();
   #include "nsStyleStructList.h"
   #undef STYLE_STRUCT
@@ -322,17 +322,17 @@ public:
    *
    * Combine the R, G, and B components of whichever of aColors should
    * be used based on aLinkIsVisited with the A component of aColors[0].
    */
   static nscolor CombineVisitedColors(nscolor *aColors,
                                       bool aLinkIsVisited);
 
   /**
-   * Start the background image loads for this style context.
+   * Start the background image loads for this ComputedStyle.
    */
   inline void StartBackgroundImageLoads();
 
   static bool IsReset(const nsStyleStructID aSID) {
     MOZ_ASSERT(0 <= aSID && aSID < nsStyleStructID_Length,
                "must be an inherited or reset SID");
     return nsStyleStructID_Reset_Start <= aSID;
   }
@@ -386,24 +386,24 @@ protected:
   #define STYLE_STRUCT_RESET(name_)             \
     template<bool aComputeData>                 \
     const nsStyle##name_ * DoGetStyle##name_();
 
   #include "nsStyleStructList.h"
   #undef STYLE_STRUCT_RESET
   #undef STYLE_STRUCT_INHERITED
 
-  // If this style context is for a pseudo-element or anonymous box,
+  // If this ComputedStyle is for a pseudo-element or anonymous box,
   // the relevant atom.
   RefPtr<nsAtom> mPseudoTag;
 
   // mBits stores a number of things:
   //  - It records (using the style struct bits) which structs are
   //    inherited from the parent context or owned by the rule node (i.e.,
-  //    not owned by the style context).
+  //    not owned by the ComputedStyle).
   //  - It also stores the additional bits listed at the top of
   //    nsStyleStruct.h.
   uint64_t                mBits;
 };
 
 } // namespace mozilla
 
 #endif
--- a/layout/style/StyleSetHandleInlines.h
+++ b/layout/style/StyleSetHandleInlines.h
@@ -69,17 +69,17 @@ StyleSetHandle::Ptr::BeginUpdate()
 }
 
 nsresult
 StyleSetHandle::Ptr::EndUpdate()
 {
   FORWARD(EndUpdate, ());
 }
 
-// resolve a style context
+// resolve a ComputedStyle
 already_AddRefed<ComputedStyle>
 StyleSetHandle::Ptr::ResolveStyleFor(dom::Element* aElement,
                                      ComputedStyle* aParentStyle,
                                      LazyComputeBehavior aMayCompute)
 {
   FORWARD(ResolveStyleFor, (aElement, aParentStyle, aMayCompute));
 }
 
--- a/layout/style/nsComputedDOMStyle.h
+++ b/layout/style/nsComputedDOMStyle.h
@@ -725,29 +725,29 @@ private:
 
   // We don't really have a good immutable representation of "presentation".
   // Given the way GetComputedStyle is currently used, we should just grab the
   // 0th presshell, if any, from the document.
   nsWeakPtr mDocumentWeak;
   nsCOMPtr<nsIContent> mContent;
 
   /**
-   * Strong reference to the style context we access data from.  This can be
-   * either a style context we resolved ourselves or a style context we got
+   * Strong reference to the ComputedStyle we access data from.  This can be
+   * either a ComputedStyle we resolved ourselves or a ComputedStyle we got
    * from our frame.
    *
-   * If we got the style context from the frame, we clear out mComputedStyle
+   * If we got the ComputedStyle from the frame, we clear out mComputedStyle
    * in ClearCurrentStyleSources.  If we resolved one ourselves, then
    * ClearCurrentStyleSources leaves it in mComputedStyle for use the next
    * time this nsComputedDOMStyle object is queried.  UpdateCurrentStyleSources
-   * in this case will check that the style context is still valid to be used,
+   * in this case will check that the ComputedStyle is still valid to be used,
    * by checking whether flush styles results in any restyles having been
    * processed.
    *
-   * Since an ArenaRefPtr is used to hold the style context, it will be cleared
+   * Since an ArenaRefPtr is used to hold the ComputedStyle, it will be cleared
    * if the pres arena from which it was allocated goes away.
    */
   mozilla::ArenaRefPtr<mozilla::ComputedStyle> mComputedStyle;
   RefPtr<nsAtom> mPseudo;
 
   /*
    * While computing style data, the primary frame for mContent --- named "outer"
    * because we should use it to compute positioning data.  Null
@@ -775,17 +775,17 @@ private:
    * The nsComputedDOMStyle generation at the time we last resolved a style
    * context and stored it in mComputedStyle.
    */
   uint64_t mComputedStyleGeneration;
 
   bool mExposeVisitedStyle;
 
   /**
-   * Whether we resolved a style context last time we called
+   * Whether we resolved a ComputedStyle last time we called
    * UpdateCurrentStyleSources.  Initially false.
    */
   bool mResolvedComputedStyle;
 
 #ifdef DEBUG
   bool mFlushedPendingReflows;
 #endif
 };
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -4004,20 +4004,20 @@ nsStyleDisplay::CalcDifference(const nsS
   // Note:  Our current behavior for handling changes to the
   // transition-duration, transition-delay, and transition-timing-function
   // properties is to do nothing.  In other words, the transition
   // property that matters is what it is when the transition begins, and
   // we don't stop a transition later because the transition property
   // changed.
   // We do handle changes to transition-property, but we don't need to
   // bother with anything here, since the transition manager is notified
-  // of any style context change anyway.
+  // of any ComputedStyle change anyway.
 
   // Note: Likewise, for animation-*, the animation manager gets
-  // notified about every new style context constructed, and it uses
+  // notified about every new ComputedStyle constructed, and it uses
   // that opportunity to handle dynamic changes appropriately.
 
   // But we still need to return nsChangeHint_NeutralChange for these
   // properties, since some data did change in the style struct.
 
   if (!hint &&
       (mOriginalDisplay != aNewData.mOriginalDisplay ||
        mOriginalFloat != aNewData.mOriginalFloat ||
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -88,17 +88,17 @@ class ImageTracker;
 // See ComputedStyle::IsInDisplayNoneSubtree
 #define NS_STYLE_IN_DISPLAY_NONE_SUBTREE   0x100000000
 // See ComputedStyle::FindChildWithRules
 #define NS_STYLE_INELIGIBLE_FOR_SHARING    0x200000000
 // See ComputedStyle::HasChildThatUsesResetStyle
 #define NS_STYLE_HAS_CHILD_THAT_USES_RESET_STYLE 0x400000000
 // See ComputedStyle::IsTextCombined
 #define NS_STYLE_IS_TEXT_COMBINED          0x800000000
-// Whether a style context is a Gecko or Servo context
+// Whether a ComputedStyle is a Gecko or Servo context
 #define NS_STYLE_CONTEXT_IS_GECKO          0x1000000000
 // See ComputedStyle::GetPseudoEnum
 #define NS_STYLE_CONTEXT_TYPE_SHIFT        37
 
 namespace mozilla {
 
 struct Position {
   using Coord = nsStyleCoord::CalcValue;
@@ -1330,17 +1330,17 @@ protected:
   nscoord       mActualOutlineWidth;
   nscoord       mTwipsPerPixel;
 };
 
 
 /**
  * An object that allows sharing of arrays that store 'quotes' property
  * values.  This is particularly important for inheritance, where we want
- * to share the same 'quotes' value with a parent style context.
+ * to share the same 'quotes' value with a parent ComputedStyle.
  */
 class nsStyleQuoteValues
 {
 public:
   typedef nsTArray<std::pair<nsString, nsString>> QuotePairArray;
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(nsStyleQuoteValues);
   QuotePairArray mQuotePairs;
 
@@ -1605,17 +1605,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
   uint8_t       mAlignItems;            // [reset] see nsStyleConsts.h
   uint8_t       mAlignSelf;             // [reset] see nsStyleConsts.h
   uint16_t      mJustifyContent;        // [reset] fallback value in the high byte
   // We cascade mSpecifiedJustifyItems, to handle the auto value, but store the
   // computed value in mJustifyItems.
   //
   // They're effectively only different in this regard: mJustifyItems is set to
   // mSpecifiedJustifyItems, except when the latter is AUTO -- in that case,
-  // mJustifyItems is set to NORMAL, or to the parent style context's
+  // mJustifyItems is set to NORMAL, or to the parent ComputedStyle's
   // mJustifyItems if it has the legacy flag.
   //
   // This last part happens in ComputedStyle::ApplyStyleFixups.
   uint8_t       mSpecifiedJustifyItems; // [reset] see nsStyleConsts.h
   uint8_t       mJustifyItems;          // [reset] see nsStyleConsts.h
   uint8_t       mJustifySelf;           // [reset] see nsStyleConsts.h
   uint8_t       mFlexDirection;         // [reset] see nsStyleConsts.h
   uint8_t       mFlexWrap;              // [reset] see nsStyleConsts.h
@@ -2666,17 +2666,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
    * Returns whether the element is a containing block for its
    * absolutely positioned descendants.
    * aContextFrame is the frame for which this is the nsStyleDisplay.
    */
   inline bool IsAbsPosContainingBlock(const nsIFrame* aContextFrame) const;
 
   /**
    * The same as IsAbsPosContainingBlock, except skipping the tests that
-   * are based on the frame rather than the style context (thus
+   * are based on the frame rather than the ComputedStyle (thus
    * potentially returning a false positive).
    *
    * FIXME(stylo-everywhere): Pretty sure the template can go here.
    */
   template<class ComputedStyleLike>
   inline bool IsAbsPosContainingBlockForAppropriateFrame(
                 ComputedStyleLike* aComputedStyle) const;
 
@@ -2691,17 +2691,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
    * Returns true when the element is a containing block for its fixed-pos
    * descendants.
    * aContextFrame is the frame for which this is the nsStyleDisplay.
    */
   inline bool IsFixedPosContainingBlock(const nsIFrame* aContextFrame) const;
 
   /**
    * The same as IsFixedPosContainingBlock, except skipping the tests that
-   * are based on the frame rather than the style context (thus
+   * are based on the frame rather than the ComputedStyle (thus
    * potentially returning a false positive).
    *
    * FIXME(stylo-everywhere): Pretty sure the template can go here.
    */
   template<class ComputedStyleLike>
   inline bool IsFixedPosContainingBlockForAppropriateFrame(
                 ComputedStyleLike* aComputedStyle) const;
 
--- a/layout/style/nsStyleTransformMatrix.cpp
+++ b/layout/style/nsStyleTransformMatrix.cpp
@@ -142,17 +142,17 @@ ProcessTranslatePart(const nsCSSValue& a
   nscoord offset = 0;
   float percent = 0.0f;
 
   if (aValue.GetUnit() == eCSSUnit_Percent) {
     percent = aValue.GetPercentValue();
   } else if (aValue.GetUnit() == eCSSUnit_Pixel ||
              aValue.GetUnit() == eCSSUnit_Number) {
     // Handle this here (even though nsRuleNode::CalcLength handles it
-    // fine) so that callers are allowed to pass a null style context
+    // fine) so that callers are allowed to pass a null ComputedStyle
     // and pres context to SetToTransformFunction if they know (as
     // StyleAnimationValue does) that all lengths within the transform
     // function have already been computed to pixels and percents.
     //
     // Raw numbers are treated as being pixels.
     //
     // Don't convert to aValue to AppUnits here to avoid precision issues.
     return aValue.GetFloatValue();
--- a/layout/style/test/test_align_justify_computed_values.html
+++ b/layout/style/test/test_align_justify_computed_values.html
@@ -128,31 +128,31 @@ function testNodeThatHasParent(elem) {
  }
 
 /*
  * Main test function
  */
 function main() {
   // Test the root node
   // ==================
-  // (It's special because it has no parent style context.)
+  // (It's special because it has no parent ComputedStyle.)
 
   var rootNode = document.documentElement;
 
   // Sanity-check that we actually have the root node, as far as CSS is concerned.
   // (Note: rootNode.parentNode is a HTMLDocument object -- not an element that
   // we inherit style from.)
   ok(!rootNode.parentNode.style,
      "expecting root node to have no node to inherit style from");
 
   testGeneralNode(rootNode);
 
   // Test the body node
   // ==================
-  // (It's special because it has no grandparent style context.)
+  // (It's special because it has no grandparent ComputedStyle.)
 
   var body = document.getElementsByTagName("body")[0];
   is(body.parentNode, document.documentElement,
      "expecting body element's parent to be the root node");
 
   testGeneralNode(body);
   testNodeThatHasParent(body);
 
--- a/layout/style/test/test_invalidation_basic.html
+++ b/layout/style/test/test_invalidation_basic.html
@@ -19,17 +19,17 @@
   <div></div>
 </div>
 <div></div>
 <div></div>
 <script>
 SimpleTest.waitForExplicitFinish();
 const utils = SpecialPowers.getDOMWindowUtils(window);
 
-// TODO(emilio): Add an API to get the style contexts we've recreated, to make
+// TODO(emilio): Add an API to get the ComputedStyles we've recreated, to make
 // more elaborated tests.
 document.documentElement.offsetTop;
 const initialRestyleGeneration = utils.restyleGeneration;
 
 // Normally we'd restyle the whole subtree in this case, but we should go down
 // the tree invalidating as little as needed (nothing in this case).
 container.classList.add("foo");
 document.documentElement.offsetTop;
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -133,17 +133,17 @@ struct BCPropertyData
 ComputedStyle*
 nsTableFrame::GetParentComputedStyle(nsIFrame** aProviderFrame) const
 {
   // Since our parent, the table wrapper frame, returned this frame, we
   // must return whatever our parent would normally have returned.
 
   NS_PRECONDITION(GetParent(), "table constructed without table wrapper");
   if (!mContent->GetParent() && !Style()->GetPseudo()) {
-    // We're the root.  We have no style context parent.
+    // We're the root.  We have no ComputedStyle parent.
     *aProviderFrame = nullptr;
     return nullptr;
   }
 
   return GetParent()->DoGetParentComputedStyle(aProviderFrame);
 }
 
 nsTableFrame::nsTableFrame(ComputedStyle* aStyle, ClassID aID)
@@ -728,17 +728,17 @@ 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++) {
-    // all anonymous cols that we create here use a pseudo style context of the
+    // all anonymous cols that we create here use a pseudo ComputedStyle of the
     // col group
     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
@@ -5102,17 +5102,17 @@ public:
 private:
   WeakFrame mFrame;
 };
 
 bool
 nsTableFrame::BCRecalcNeeded(ComputedStyle* aOldComputedStyle,
                              ComputedStyle* aNewComputedStyle)
 {
-  // Attention: the old style context is the one we're forgetting,
+  // Attention: the old ComputedStyle is the one we're forgetting,
   // and hence possibly completely bogus for GetStyle* purposes.
   // We use PeekStyleData instead.
 
   const nsStyleBorder* oldStyleData = aOldComputedStyle->PeekStyleBorder();
   if (!oldStyleData)
     return false;
 
   const nsStyleBorder* newStyleData = aNewComputedStyle->StyleBorder();
@@ -8197,17 +8197,17 @@ nsTableFrame::UpdateStyleOfOwnedAnonBoxe
   //
   // NOTE(emilio): We can't use the ChangesHandledFor optimization (and we
   // assert against that), because the table wrapper is up in the frame tree
   // compared to the owner frame.
   uint32_t equalStructs; // Not used, actually.
   nsChangeHint wrapperHint =
     aWrapperFrame->Style()->CalcStyleDifference(newStyle, &equalStructs);
 
-  // CalcStyleDifference will handle caching structs on the new style context,
+  // CalcStyleDifference will handle caching structs on the new ComputedStyle,
   // but only if we're not on a style worker thread.
   MOZ_ASSERT(!ServoStyleSet::IsInServoTraversal(),
              "if we can get in here from style worker threads, then we need "
              "a ResolveSameStructsAs call to ensure structs are cached on "
              "aNewComputedStyle");
 
   if (wrapperHint) {
     aRestyleState.ChangeList().AppendChange(
--- a/layout/tables/nsTableWrapperFrame.cpp
+++ b/layout/tables/nsTableWrapperFrame.cpp
@@ -211,24 +211,24 @@ nsTableWrapperFrame::BuildDisplayListFor
     kid = kid->GetNextSibling();
   }
 }
 
 ComputedStyle*
 nsTableWrapperFrame::GetParentComputedStyle(nsIFrame** aProviderFrame) const
 {
   // The table wrapper frame and the (inner) table frame split the style
-  // data by giving the table frame the style context associated with
-  // the table content node and creating a style context for the wrapper
-  // frame that is a *child* of the table frame's style context,
+  // data by giving the table frame the ComputedStyle associated with
+  // the table content node and creating a ComputedStyle for the wrapper
+  // frame that is a *child* of the table frame's ComputedStyle,
   // matching the ::-moz-table-wrapper pseudo-element. html.css has a
   // rule that causes that pseudo-element (and thus the wrapper table)
   // to inherit *some* style properties from the table frame.  The
   // children of the table inherit directly from the inner table, and
-  // the table wrapper's style context is a leaf.
+  // the table wrapper's ComputedStyle is a leaf.
 
   return (*aProviderFrame = InnerTableFrame())->Style();
 }
 
 // INCREMENTAL REFLOW HELPER FUNCTIONS
 
 void
 nsTableWrapperFrame::InitChildReflowInput(nsPresContext& aPresContext,
--- a/layout/xul/nsImageBoxFrame.cpp
+++ b/layout/xul/nsImageBoxFrame.cpp
@@ -637,17 +637,18 @@ nsImageBoxFrame::CanOptimizeToImageLayer
     return false;
   }
   return true;
 }
 
 //
 // DidSetComputedStyle
 //
-// When the style context changes, make sure that all of our image is up to date.
+// When the ComputedStyle changes, make sure that all of our image is up to
+// date.
 //
 /* virtual */ void
 nsImageBoxFrame::DidSetComputedStyle(ComputedStyle* aOldComputedStyle)
 {
   nsLeafBoxFrame::DidSetComputedStyle(aOldComputedStyle);
 
   // Fetch our subrect.
   const nsStyleList* myList = StyleList();
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -2052,17 +2052,17 @@ nsITheme*
 nsTreeBodyFrame::GetTwistyRect(int32_t aRowIndex,
                                nsTreeColumn* aColumn,
                                nsRect& aImageRect,
                                nsRect& aTwistyRect,
                                nsPresContext* aPresContext,
                                ComputedStyle* aTwistyContext)
 {
   // The twisty rect extends all the way to the end of the cell.  This is incorrect.  We need to
-  // determine the twisty rect's true width.  This is done by examining the style context for
+  // determine the twisty rect's true width.  This is done by examining the ComputedStyle for
   // a width first.  If it has one, we use that.  If it doesn't, we use the image's natural width.
   // If the image hasn't loaded and if no width is specified, then we just bail. If there is
   // a -moz-appearance involved, adjust the rect by the minimum widget size provided by
   // the theme implementation.
   aImageRect = GetImageSize(aRowIndex, aColumn, true, aTwistyContext);
   if (aImageRect.height > aTwistyRect.height)
     aImageRect.height = aTwistyRect.height;
   if (aImageRect.width > aTwistyRect.width)
@@ -2105,17 +2105,17 @@ nsTreeBodyFrame::GetImage(int32_t aRowIn
 
   nsAutoString imageSrc;
   mView->GetImageSrc(aRowIndex, aCol, imageSrc);
   RefPtr<imgRequestProxy> styleRequest;
   if (!aUseContext && !imageSrc.IsEmpty()) {
     aAllowImageRegions = false;
   }
   else {
-    // Obtain the URL from the style context.
+    // Obtain the URL from the ComputedStyle.
     aAllowImageRegions = true;
     styleRequest = aComputedStyle->StyleList()->GetListStyleImage();
     if (!styleRequest)
       return NS_OK;
     nsCOMPtr<nsIURI> uri;
     styleRequest->GetURI(getter_AddRefs(uri));
     nsAutoCString spec;
     nsresult rv = uri->GetSpec(spec);
@@ -2217,17 +2217,17 @@ nsTreeBodyFrame::GetImage(int32_t aRowIn
 }
 
 nsRect nsTreeBodyFrame::GetImageSize(int32_t aRowIndex, nsTreeColumn* aCol, bool aUseContext,
                                      ComputedStyle* aComputedStyle)
 {
   // XXX We should respond to visibility rules for collapsed vs. hidden.
 
   // This method returns the width of the twisty INCLUDING borders and padding.
-  // It first checks the style context for a width.  If none is found, it tries to
+  // It first checks the ComputedStyle for a width.  If none is found, it tries to
   // use the default image width for the twisty.  If no image is found, it defaults
   // to border+padding.
   nsRect r(0,0,0,0);
   nsMargin bp(0,0,0,0);
   GetBorderPadding(aComputedStyle, bp);
   r.Inflate(bp);
 
   // Now r contains our border+padding info.  We now need to get our width and
--- a/layout/xul/tree/nsTreeBodyFrame.h
+++ b/layout/xul/tree/nsTreeBodyFrame.h
@@ -279,17 +279,17 @@ protected:
 
   // This method paints a drop feedback of the tree.
   ImgDrawResult PaintDropFeedback(const nsRect&        aDropFeedbackRect,
                                nsPresContext*       aPresContext,
                                gfxContext&          aRenderingContext,
                                const nsRect&        aDirtyRect,
                                nsPoint              aPt);
 
-  // This method is called with a specific style context and rect to
+  // This method is called with a specific ComputedStyle and rect to
   // paint the background rect as if it were a full-blown frame.
   ImgDrawResult PaintBackgroundLayer(ComputedStyle*      aComputedStyle,
                                      nsPresContext*       aPresContext,
                                      gfxContext&          aRenderingContext,
                                      const nsRect&        aRect,
                                      const nsRect&        aDirtyRect);
 
 
@@ -348,17 +348,17 @@ protected:
   int32_t GetIndentation();
 
   // Calculates our width/height once border and padding have been removed.
   void CalcInnerBox();
 
   // Calculate the total width of our scrollable portion
   nscoord CalcHorzWidth(const ScrollParts& aParts);
 
-  // Looks up a style context in the style cache.  On a cache miss we resolve
+  // Looks up a ComputedStyle in the style cache.  On a cache miss we resolve
   // the pseudo-styles passed in and place them into the cache.
   ComputedStyle* GetPseudoComputedStyle(nsICSSAnonBoxPseudo* aPseudoElement);
 
   // Retrieves the scrollbars and scrollview relevant to this treebody. We
   // traverse the frame tree under our base element, in frame order, looking
   // for the first relevant vertical scrollbar, horizontal scrollbar, and
   // scrollable frame (with associated content and scrollable view). These
   // are all volatile and should not be retained.
@@ -569,29 +569,29 @@ protected: // Data Members
 
   // Cached column information.
   RefPtr<nsTreeColumns> mColumns;
 
   // The current view for this tree widget.  We get all of our row and cell data
   // from the view.
   nsCOMPtr<nsITreeView> mView;
 
-  // A cache of all the style contexts we have seen for rows and cells of the tree.  This is a mapping from
-  // a list of atoms to a corresponding style context.  This cache stores every combination that
+  // A cache of all the ComputedStyles we have seen for rows and cells of the tree.  This is a mapping from
+  // a list of atoms to a corresponding ComputedStyle.  This cache stores every combination that
   // occurs in the tree, so for n distinct properties, this cache could have 2 to the n entries
   // (the power set of all row properties).
   nsTreeStyleCache mStyleCache;
 
   // A hashtable that maps from URLs to image request/listener pairs.  The URL
-  // is provided by the view or by the style context. The style context
+  // is provided by the view or by the ComputedStyle. The ComputedStyle
   // represents a resolved :-moz-tree-cell-image (or twisty) pseudo-element.
   // It maps directly to an imgIRequest.
   nsDataHashtable<nsStringHashKey, nsTreeImageCacheEntry> mImageCache;
 
-  // A scratch array used when looking up cached style contexts.
+  // A scratch array used when looking up cached ComputedStyles.
   mozilla::AtomArray mScratchArray;
 
   // The index of the first visible row and the # of rows visible onscreen.
   // The tree only examines onscreen rows, starting from
   // this index and going up to index+pageLength.
   int32_t mTopRowIndex;
   int32_t mPageLength;
 
--- a/layout/xul/tree/nsTreeStyleCache.cpp
+++ b/layout/xul/tree/nsTreeStyleCache.cpp
@@ -27,17 +27,17 @@ nsTreeStyleCache::Transition::Hash() con
 {
   // Make a 32-bit integer that combines the low-order 16 bits of the state and the input symbol.
   uint32_t hb = mState << 16;
   uint32_t lb = (NS_PTR_TO_UINT32(mInputSymbol.get()) << 16) >> 16;
   return hb+lb;
 }
 
 
-// The style context cache impl
+// The ComputedStyle cache impl
 ComputedStyle*
 nsTreeStyleCache::GetComputedStyle(nsPresContext* aPresContext,
                                    nsIContent* aContent,
                                    ComputedStyle* aStyle,
                                    nsICSSAnonBoxPseudo* aPseudoElement,
                                    const AtomArray & aInputWord)
 {
   MOZ_ASSERT(nsCSSAnonBoxes::IsTreePseudoElement(aPseudoElement));
@@ -69,28 +69,28 @@ nsTreeStyleCache::GetComputedStyle(nsPre
       // We had a miss. Make a new state and add it to our hash.
       currState = mNextState;
       mNextState++;
       mTransitionTable->Put(transition, currState);
     }
   }
 
   // We're in a final state.
-  // Look up our style context for this state.
+  // Look up our ComputedStyle for this state.
   ComputedStyle* result = nullptr;
   if (mCache) {
     result = mCache->GetWeak(currState);
   }
   if (!result) {
     // We missed the cache. Resolve this pseudo-style.
     RefPtr<ComputedStyle> newResult = aPresContext->StyleSet()->
         ResolveXULTreePseudoStyle(aContent->AsElement(),
                                   aPseudoElement, aStyle, aInputWord);
 
-    // Put the style context in our table, transferring the owning reference to the table.
+    // Put the ComputedStyle in our table, transferring the owning reference to the table.
     if (!mCache) {
       mCache = new ComputedStyleCache();
     }
     result = newResult.get();
     mCache->Put(currState, newResult.forget());
   }
 
   return result;
--- a/layout/xul/tree/nsTreeStyleCache.h
+++ b/layout/xul/tree/nsTreeStyleCache.h
@@ -66,21 +66,21 @@ protected:
   // It transitions from state to state by looking up entries in the transition table (which is
   // a mapping from (S,i)->S', where S is the current state, i is the next
   // property in the input word, and S' is the state to transition to.
   //
   // If S' is not found, it is constructed and entered into the hashtable
   // under the key (S,i).
   //
   // Once the entire word has been consumed, the final state is used
-  // to reference the cache table to locate the style context.
+  // to reference the cache table to locate the ComputedStyle.
   nsAutoPtr<TransitionTable> mTransitionTable;
 
-  // The cache of all active style contexts.  This is a hash from
-  // a final state in the DFA, Sf, to the resultant style context.
+  // The cache of all active ComputedStyles.  This is a hash from
+  // a final state in the DFA, Sf, to the resultant ComputedStyle.
   typedef nsRefPtrHashtable<nsUint32HashKey, mozilla::ComputedStyle> ComputedStyleCache;
   nsAutoPtr<ComputedStyleCache> mCache;
 
   // An integer counter that is used when we need to make new states in the
   // DFA.
   DFAState mNextState;
 };