Bug 1541546 - Use only the new name for StyleColor. r=heycam
☠☠ backed out by 95484a7dc30b ☠ ☠
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 04 Apr 2019 11:35:33 +0000
changeset 467962 895863144707dd9216fcb26807a22217a5e3eda1
parent 467961 4da6fb98e8f9d7db99181e763919a765f0d06f1b
child 467963 1778699fa005874daead175293e374af9c7a092d
push id35813
push useraiakab@mozilla.com
push dateThu, 04 Apr 2019 16:07:30 +0000
treeherdermozilla-central@aa623df2ae8f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1541546
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1541546 - Use only the new name for StyleColor. r=heycam That is, change all uses of StyleComplexColor to just StyleColor. Differential Revision: https://phabricator.services.mozilla.com/D25977
layout/generic/nsColumnSetFrame.cpp
layout/generic/nsImageFrame.cpp
layout/painting/nsCSSRendering.cpp
layout/style/ComputedStyle.cpp
layout/style/ComputedStyle.h
layout/style/GeckoBindings.cpp
layout/style/StyleColor.cpp
layout/style/StyleColorInlines.h
layout/style/StyleComplexColor.cpp
layout/style/StyleComplexColor.h
layout/style/moz.build
layout/style/nsComputedDOMStyle.cpp
layout/style/nsComputedDOMStyle.h
layout/style/nsStyleStruct.cpp
layout/style/nsStyleStruct.h
servo/components/style/properties/properties.mako.rs
servo/ports/geckolib/cbindgen.toml
--- a/layout/generic/nsColumnSetFrame.cpp
+++ b/layout/generic/nsColumnSetFrame.cpp
@@ -206,23 +206,23 @@ void nsColumnSetFrame::CreateBorderRende
   // the column rule as the left border. PaintBorder() does all the rendering
   // for us, so we not only save an enormous amount of code but we'll support
   // all the line styles that we support on borders!
   nsStyleBorder border(*presContext->Document());
   Sides skipSides;
   if (isVertical) {
     border.SetBorderWidth(eSideTop, ruleWidth);
     border.SetBorderStyle(eSideTop, ruleStyle);
-    border.mBorderTopColor = StyleComplexColor::FromColor(ruleColor);
+    border.mBorderTopColor = StyleColor::FromColor(ruleColor);
     skipSides |= mozilla::eSideBitsLeftRight;
     skipSides |= mozilla::eSideBitsBottom;
   } else {
     border.SetBorderWidth(eSideLeft, ruleWidth);
     border.SetBorderStyle(eSideLeft, ruleStyle);
-    border.mBorderLeftColor = StyleComplexColor::FromColor(ruleColor);
+    border.mBorderLeftColor = StyleColor::FromColor(ruleColor);
     skipSides |= mozilla::eSideBitsTopBottom;
     skipSides |= mozilla::eSideBitsRight;
   }
   // If we use box-decoration-break: slice (the default), the border
   // renderers will require clipping if we have continuations (see the
   // aNeedsClip parameter to ConstructBorderRenderer in nsCSSRendering).
   //
   // Since it doesn't matter which box-decoration-break we use since
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -1257,17 +1257,17 @@ void nsImageFrame::DisplayAltText(nsPres
     firstLine = false;
   }
 }
 
 struct nsRecessedBorder : public nsStyleBorder {
   nsRecessedBorder(nscoord aBorderWidth, nsPresContext* aPresContext)
       : nsStyleBorder(*aPresContext->Document()) {
     NS_FOR_CSS_SIDES(side) {
-      BorderColorFor(side) = StyleComplexColor::Black();
+      BorderColorFor(side) = StyleColor::Black();
       mBorder.Side(side) = aBorderWidth;
       // Note: use SetBorderStyle here because we want to affect
       // mComputedBorder
       SetBorderStyle(side, StyleBorderStyle::Inset);
     }
   }
 };
 
--- a/layout/painting/nsCSSRendering.cpp
+++ b/layout/painting/nsCSSRendering.cpp
@@ -629,17 +629,17 @@ ImgDrawResult nsCSSRendering::PaintBorde
         *styleBorder, aComputedStyle, aFlags, aSkipSides);
   }
 
   nsStyleBorder newStyleBorder(*styleBorder);
 
   NS_FOR_CSS_SIDES(side) {
     nscolor color = aComputedStyle->GetVisitedDependentColor(
         nsStyleBorder::BorderColorFieldFor(side));
-    newStyleBorder.BorderColorFor(side) = StyleComplexColor::FromColor(color);
+    newStyleBorder.BorderColorFor(side) = StyleColor::FromColor(color);
   }
   return PaintBorderWithStyleBorder(aPresContext, aRenderingContext, aForFrame,
                                     aDirtyRect, aBorderArea, newStyleBorder,
                                     aComputedStyle, aFlags, aSkipSides);
 }
 
 Maybe<nsCSSBorderRenderer> nsCSSRendering::CreateBorderRenderer(
     nsPresContext* aPresContext, DrawTarget* aDrawTarget, nsIFrame* aForFrame,
@@ -655,17 +655,17 @@ Maybe<nsCSSBorderRenderer> nsCSSRenderin
         *styleBorder, aComputedStyle, aOutBorderIsEmpty, aSkipSides);
   }
 
   nsStyleBorder newStyleBorder(*styleBorder);
 
   NS_FOR_CSS_SIDES(side) {
     nscolor color = aComputedStyle->GetVisitedDependentColor(
         nsStyleBorder::BorderColorFieldFor(side));
-    newStyleBorder.BorderColorFor(side) = StyleComplexColor::FromColor(color);
+    newStyleBorder.BorderColorFor(side) = StyleColor::FromColor(color);
   }
   return CreateBorderRendererWithStyleBorder(
       aPresContext, aDrawTarget, aForFrame, aDirtyRect, aBorderArea,
       newStyleBorder, aComputedStyle, aOutBorderIsEmpty, aSkipSides);
 }
 
 ImgDrawResult nsCSSRendering::CreateWebRenderCommandsForBorder(
     nsDisplayItem* aItem, nsIFrame* aForFrame, const nsRect& aBorderArea,
@@ -1941,17 +1941,17 @@ static bool IsOpaqueBorderEdge(const nsS
 
   // If we're using a border image, assume it's not fully opaque,
   // because we may not even have the image loaded at this point, and
   // even if we did, checking whether the relevant tile is fully
   // opaque would be too much work.
   if (aBorder.mBorderImageSource.GetType() != eStyleImageType_Null)
     return false;
 
-  StyleComplexColor color = aBorder.BorderColorFor(aSide);
+  StyleColor color = aBorder.BorderColorFor(aSide);
   // We don't know the foreground color here, so if it's being used
   // we must assume it might be transparent.
   return !color.MaybeTransparent();
 }
 
 /**
  * Returns true if all border edges are either missing or opaque.
  */
--- a/layout/style/ComputedStyle.cpp
+++ b/layout/style/ComputedStyle.cpp
@@ -278,17 +278,17 @@ static nscolor GetVisitedDependentColorI
 }
 
 static nscolor ExtractColor(const ComputedStyle& aStyle,
                             const nscolor& aColor) {
   return aColor;
 }
 
 static nscolor ExtractColor(const ComputedStyle& aStyle,
-                            const StyleComplexColor& aColor) {
+                            const StyleColor& aColor) {
   return aColor.CalcColor(aStyle);
 }
 
 // Currently caret-color, the only property in the list which is a ColorOrAuto,
 // always maps auto to currentcolor.
 static nscolor ExtractColor(const ComputedStyle& aStyle,
                             const StyleColorOrAuto& aColor) {
   if (aColor.IsAuto()) {
--- a/layout/style/ComputedStyle.h
+++ b/layout/style/ComputedStyle.h
@@ -13,19 +13,19 @@
 #include <algorithm>
 #include "mozilla/Assertions.h"
 #include "mozilla/CachedInheritingStyles.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/PseudoStyleType.h"
 #include "mozilla/ServoComputedData.h"
 #include "mozilla/ServoTypes.h"
 #include "mozilla/ServoUtils.h"
-#include "mozilla/StyleComplexColor.h"
 #include "nsCSSAnonBoxes.h"
 #include "nsCSSPseudoElements.h"
+#include "nsColor.h"
 
 #include "nsStyleStructFwd.h"
 
 enum nsChangeHint : uint32_t;
 class nsIPresShell;
 class nsPresContext;
 class nsWindowSizes;
 
--- a/layout/style/GeckoBindings.cpp
+++ b/layout/style/GeckoBindings.cpp
@@ -1221,17 +1221,17 @@ nsStyleGradient* Gecko_CreateGradient(ui
 
   result->mAngle.SetNoneValue();
   result->mBgPosX.SetNoneValue();
   result->mBgPosY.SetNoneValue();
   result->mRadiusX.SetNoneValue();
   result->mRadiusY.SetNoneValue();
 
   nsStyleGradientStop dummyStop = {nsStyleCoord(eStyleUnit_None),
-                                   StyleComplexColor::Black(), 0};
+                                   StyleColor::Black(), 0};
 
   for (uint32_t i = 0; i < aStopCount; i++) {
     result->mStops.AppendElement(dummyStop);
   }
 
   return result;
 }
 
rename from layout/style/StyleComplexColor.cpp
rename to layout/style/StyleColor.cpp
--- a/layout/style/StyleComplexColor.cpp
+++ b/layout/style/StyleColor.cpp
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "mozilla/StyleComplexColor.h"
+#include "mozilla/StyleColorInlines.h"
 
 #include "mozilla/ComputedStyle.h"
 #include "mozilla/ComputedStyleInlines.h"
 #include "nsIFrame.h"
 #include "nsStyleStruct.h"
 
 using namespace mozilla;
 
@@ -41,52 +41,52 @@ static nscolor LinearBlendColors(nscolor
   }
 
   auto r = ClampColor((p1 * r1 + p2 * r2) / a);
   auto g = ClampColor((p1 * g1 + p2 * g2) / a);
   auto b = ClampColor((p1 * b1 + p2 * b2) / a);
   return NS_RGBA(r, g, b, NSToIntRound(a * 255));
 }
 
-template<>
-bool StyleComplexColor::MaybeTransparent() const {
+template <>
+bool StyleColor::MaybeTransparent() const {
   // We know that the color is opaque when it's a numeric color with
   // alpha == 255.
   // TODO(djg): Should we extend this to check Complex with bgRatio =
   // 0, and fgRatio * alpha >= 255?
   return !IsNumeric() || AsNumeric().alpha != 255;
 }
 
 static nscolor RGBAToNSColor(const StyleRGBA& aRGBA) {
   return NS_RGBA(aRGBA.red, aRGBA.green, aRGBA.blue, aRGBA.alpha);
 }
 
-template<>
-nscolor StyleComplexColor::CalcColor(nscolor aForegroundColor) const {
+template <>
+nscolor StyleColor::CalcColor(nscolor aForegroundColor) const {
   if (IsNumeric()) {
     return RGBAToNSColor(AsNumeric());
   }
   if (IsCurrentColor()) {
     return aForegroundColor;
   }
   MOZ_ASSERT(IsComplex());
   const auto& complex = AsComplex();
   return LinearBlendColors(RGBAToNSColor(complex.color), complex.ratios.bg,
                            aForegroundColor, complex.ratios.fg);
 }
 
-template<>
-nscolor StyleComplexColor::CalcColor(const ComputedStyle& aStyle) const {
+template <>
+nscolor StyleColor::CalcColor(const ComputedStyle& aStyle) const {
   // Common case that is numeric color, which is pure background, we
   // can skip resolving StyleColor().
   // TODO(djg): Is this optimization worth it?
   if (IsNumeric()) {
     return RGBAToNSColor(AsNumeric());
   }
 
   auto fgColor = aStyle.StyleColor()->mColor;
   return CalcColor(fgColor);
 }
 
-template<>
-nscolor StyleComplexColor::CalcColor(const nsIFrame* aFrame) const {
+template <>
+nscolor StyleColor::CalcColor(const nsIFrame* aFrame) const {
   return CalcColor(*aFrame->Style());
 }
rename from layout/style/StyleComplexColor.h
rename to layout/style/StyleColorInlines.h
--- a/layout/style/StyleComplexColor.h
+++ b/layout/style/StyleColorInlines.h
@@ -1,26 +1,24 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* represent a color combines a numeric color and currentcolor */
+/* Inline functions for StyleColor (aka values::computed::Color) */
 
-#ifndef mozilla_StyleComplexColor_h_
-#define mozilla_StyleComplexColor_h_
+#ifndef mozilla_StyleColorInlines_h_
+#define mozilla_StyleColorInlines_h_
 
 #include "nsColor.h"
 #include "mozilla/ServoStyleConsts.h"
 
 namespace mozilla {
 
-using StyleComplexColor = StyleColor;
-
 template<>
 inline StyleColor StyleColor::FromColor(nscolor aColor) {
   return StyleColor::Numeric({NS_GET_R(aColor), NS_GET_G(aColor),
                               NS_GET_B(aColor), NS_GET_A(aColor)});
 }
 
 template<>
 inline StyleColor StyleColor::Black() {
@@ -32,20 +30,20 @@ inline StyleColor StyleColor::White() {
   return FromColor(NS_RGB(255, 255, 255));
 }
 
 template<>
 inline StyleColor StyleColor::Transparent() {
   return FromColor(NS_RGBA(0, 0, 0, 0));
 }
 
-template<>
-nscolor StyleComplexColor::CalcColor(nscolor aForegroundColor) const;
+template <>
+nscolor StyleColor::CalcColor(nscolor aForegroundColor) const;
 
-template<>
-nscolor StyleComplexColor::CalcColor(const ComputedStyle&) const;
+template <>
+nscolor StyleColor::CalcColor(const ComputedStyle&) const;
 
-template<>
-nscolor StyleComplexColor::CalcColor(const nsIFrame*) const;
+template <>
+nscolor StyleColor::CalcColor(const nsIFrame*) const;
 
 }  // namespace mozilla
 
-#endif  // mozilla_StyleComplexColor_h_
+#endif  // mozilla_StyleColor_h_
--- a/layout/style/moz.build
+++ b/layout/style/moz.build
@@ -103,17 +103,17 @@ EXPORTS.mozilla += [
     'ServoStyleConstsForwards.h',
     'ServoStyleSet.h',
     'ServoStyleSetInlines.h',
     'ServoTraversalStatistics.h',
     'ServoTypes.h',
     'ServoUtils.h',
     'SheetType.h',
     'StyleAnimationValue.h',
-    'StyleComplexColor.h',
+    'StyleColorInlines.h',
     'StyleSheet.h',
     'StyleSheetInfo.h',
     'StyleSheetInlines.h',
     'URLExtraData.h',
     'UserAgentStyleSheetID.h',
     'UserAgentStyleSheetList.h',
 ]
 
@@ -218,17 +218,17 @@ UNIFIED_SOURCES += [
     'PseudoStyleType.cpp',
     'Rule.cpp',
     'ServoCSSParser.cpp',
     'ServoCSSRuleList.cpp',
     'ServoElementSnapshot.cpp',
     'ServoStyleSet.cpp',
     'StreamLoader.cpp',
     'StyleAnimationValue.cpp',
-    'StyleComplexColor.cpp',
+    'StyleColor.cpp',
     'StyleSheet.cpp',
     'URLExtraData.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -1036,17 +1036,17 @@ already_AddRefed<CSSValue> nsComputedDOM
 void nsComputedDOMStyle::SetToRGBAColor(nsROCSSPrimitiveValue* aValue,
                                         nscolor aColor) {
   nsAutoString string;
   nsStyleUtil::GetSerializedColorValue(aColor, string);
   aValue->SetString(string);
 }
 
 void nsComputedDOMStyle::SetValueFromComplexColor(
-    nsROCSSPrimitiveValue* aValue, const StyleComplexColor& aColor) {
+    nsROCSSPrimitiveValue* aValue, const mozilla::StyleColor& aColor) {
   SetToRGBAColor(aValue, aColor.CalcColor(*mComputedStyle));
 }
 
 already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetColor() {
   RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
   SetToRGBAColor(val, StyleColor()->mColor);
   return val.forget();
 }
@@ -1860,17 +1860,17 @@ already_AddRefed<CSSValue> nsComputedDOM
   const nsStyleUI* ui = StyleUI();
   if (ui->mScrollbarColor.IsAuto()) {
     RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
     val->SetIdent(eCSSKeyword_auto);
     return val.forget();
   }
 
   RefPtr<nsDOMCSSValueList> list = GetROCSSValueList(false);
-  auto put = [this, &list](const StyleComplexColor& color) {
+  auto put = [this, &list](const mozilla::StyleColor& color) {
     RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
     SetValueFromComplexColor(val, color);
     list->AppendCSSValue(val.forget());
   };
   auto& colors = ui->mScrollbarColor.AsColors();
   put(colors.thumb);
   put(colors.track);
   return list.forget();
@@ -1994,17 +1994,17 @@ already_AddRefed<CSSValue> nsComputedDOM
   return val.forget();
 }
 
 already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetTextDecoration() {
   const nsStyleTextReset* textReset = StyleTextReset();
 
   bool isInitialStyle =
       textReset->mTextDecorationStyle == NS_STYLE_TEXT_DECORATION_STYLE_SOLID;
-  StyleComplexColor color = textReset->mTextDecorationColor;
+  const mozilla::StyleColor& color = textReset->mTextDecorationColor;
 
   RefPtr<nsROCSSPrimitiveValue> textDecorationLine = new nsROCSSPrimitiveValue;
 
   {
     nsAutoString decorationLine;
     Servo_GetPropertyValue(mComputedStyle, eCSSProperty_text_decoration_line,
                            &decorationLine);
     textDecorationLine->SetString(decorationLine);
--- a/layout/style/nsComputedDOMStyle.h
+++ b/layout/style/nsComputedDOMStyle.h
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* DOM object returned from element.getComputedStyle() */
 
 #ifndef nsComputedDOMStyle_h__
 #define nsComputedDOMStyle_h__
 
 #include "mozilla/Attributes.h"
-#include "mozilla/StyleComplexColor.h"
+#include "mozilla/StyleColorInlines.h"
 #include "mozilla/UniquePtr.h"
 #include "mozilla/dom/Element.h"
 #include "nsCOMPtr.h"
 #include "nsContentUtils.h"
 #include "nscore.h"
 #include "nsDOMCSSDeclaration.h"
 #include "mozilla/ComputedStyle.h"
 #include "nsIWeakReferenceUtils.h"
@@ -365,17 +365,17 @@ class nsComputedDOMStyle final : public 
   already_AddRefed<CSSValue> DoGetPaintOrder();
 
   // For working around a MSVC bug. See related comment in
   // GenerateComputedDOMStyleGenerated.py.
   already_AddRefed<CSSValue> DummyGetter();
 
   /* Helper functions */
   void SetValueFromComplexColor(nsROCSSPrimitiveValue* aValue,
-                                const mozilla::StyleComplexColor& aColor);
+                                const mozilla::StyleColor& aColor);
   void SetValueToPosition(const mozilla::Position& aPosition,
                           nsDOMCSSValueList* aValueList);
   void SetValueToURLValue(const mozilla::css::URLValue* aURL,
                           nsROCSSPrimitiveValue* aValue);
 
   void SetValueToSize(nsROCSSPrimitiveValue* aValue, const mozilla::StyleSize&,
                       nscoord aMinAppUnits = nscoord_MIN,
                       nscoord aMaxAppUnits = nscoord_MAX);
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -254,20 +254,20 @@ nsStyleBorder::nsStyleBorder(const Docum
           StyleRectWithAllSides(StyleNonNegativeLengthOrNumber::Number(0.))),
       mBorderImageSlice(
           {StyleRectWithAllSides(StyleNumberOrPercentage::Percentage({1.})),
            false}),
       mBorderImageRepeatH(StyleBorderImageRepeat::Stretch),
       mBorderImageRepeatV(StyleBorderImageRepeat::Stretch),
       mFloatEdge(StyleFloatEdge::ContentBox),
       mBoxDecorationBreak(StyleBoxDecorationBreak::Slice),
-      mBorderTopColor(StyleComplexColor::CurrentColor()),
-      mBorderRightColor(StyleComplexColor::CurrentColor()),
-      mBorderBottomColor(StyleComplexColor::CurrentColor()),
-      mBorderLeftColor(StyleComplexColor::CurrentColor()),
+      mBorderTopColor(StyleColor::CurrentColor()),
+      mBorderRightColor(StyleColor::CurrentColor()),
+      mBorderBottomColor(StyleColor::CurrentColor()),
+      mBorderLeftColor(StyleColor::CurrentColor()),
       mComputedBorder(0, 0, 0, 0),
       mTwipsPerPixel(TwipsPerPixel(aDocument)) {
   MOZ_COUNT_CTOR(nsStyleBorder);
 
   nscoord medium = kMediumBorderWidth;
   NS_FOR_CSS_SIDES(side) {
     mBorderImageWidth.Set(side, nsStyleCoord(1.0f, eStyleUnit_Factor));
     mBorder.Side(side) = medium;
@@ -401,17 +401,17 @@ nsChangeHint nsStyleBorder::CalcDifferen
 
   return nsChangeHint(0);
 }
 
 nsStyleOutline::nsStyleOutline(const Document& aDocument)
     : mOutlineRadius(ZeroBorderRadius()),
       mOutlineWidth(kMediumBorderWidth),
       mOutlineOffset(0),
-      mOutlineColor(StyleComplexColor::CurrentColor()),
+      mOutlineColor(StyleColor::CurrentColor()),
       mOutlineStyle(StyleOutlineStyle::BorderStyle(StyleBorderStyle::None)),
       mActualOutlineWidth(0),
       mTwipsPerPixel(TwipsPerPixel(aDocument)) {
   MOZ_COUNT_CTOR(nsStyleOutline);
 }
 
 nsStyleOutline::nsStyleOutline(const nsStyleOutline& aSrc)
     : mOutlineRadius(aSrc.mOutlineRadius),
@@ -584,17 +584,17 @@ nsChangeHint nsStyleXUL::CalcDifference(
 // --------------------
 // nsStyleColumn
 //
 /* static */ const uint32_t nsStyleColumn::kMaxColumnCount;
 /* static */ const uint32_t nsStyleColumn::kColumnCountAuto;
 
 nsStyleColumn::nsStyleColumn(const Document& aDocument)
     : mColumnWidth(eStyleUnit_Auto),
-      mColumnRuleColor(StyleComplexColor::CurrentColor()),
+      mColumnRuleColor(StyleColor::CurrentColor()),
       mColumnRuleStyle(StyleBorderStyle::None),
       mColumnRuleWidth(kMediumBorderWidth),
       mTwipsPerPixel(TwipsPerPixel(aDocument)) {
   MOZ_COUNT_CTOR(nsStyleColumn);
 }
 
 nsStyleColumn::~nsStyleColumn() { MOZ_COUNT_DTOR(nsStyleColumn); }
 
@@ -1062,19 +1062,19 @@ void nsStyleFilter::SetDropShadow(nsCSSS
   mType = NS_STYLE_FILTER_DROP_SHADOW;
 }
 
 // --------------------
 // nsStyleSVGReset
 //
 nsStyleSVGReset::nsStyleSVGReset(const Document& aDocument)
     : mMask(nsStyleImageLayers::LayerType::Mask),
-      mStopColor(StyleComplexColor::Black()),
-      mFloodColor(StyleComplexColor::Black()),
-      mLightingColor(StyleComplexColor::White()),
+      mStopColor(StyleColor::Black()),
+      mFloodColor(StyleColor::Black()),
+      mLightingColor(StyleColor::White()),
       mStopOpacity(1.0f),
       mFloodOpacity(1.0f),
       mDominantBaseline(NS_STYLE_DOMINANT_BASELINE_AUTO),
       mVectorEffect(NS_STYLE_VECTOR_EFFECT_NONE),
       mMaskType(NS_STYLE_MASK_TYPE_LUMINANCE) {
   MOZ_COUNT_CTOR(nsStyleSVGReset);
 }
 
@@ -1171,20 +1171,20 @@ bool nsStyleSVGReset::HasMask() const {
     }
   }
 
   return false;
 }
 
 // nsStyleSVGPaint implementation
 nsStyleSVGPaint::nsStyleSVGPaint(nsStyleSVGPaintType aType)
-    : mPaint(StyleComplexColor::Black()),
+    : mPaint(StyleColor::Black()),
       mType(aType),
       mFallbackType(eStyleSVGFallbackType_NotSet),
-      mFallbackColor(StyleComplexColor::Black()) {
+      mFallbackColor(StyleColor::Black()) {
   MOZ_ASSERT(aType == nsStyleSVGPaintType(0) ||
              aType == eStyleSVGPaintType_None ||
              aType == eStyleSVGPaintType_Color);
 }
 
 nsStyleSVGPaint::nsStyleSVGPaint(const nsStyleSVGPaint& aSource)
     : nsStyleSVGPaint(nsStyleSVGPaintType(0)) {
   Assign(aSource);
@@ -1192,26 +1192,26 @@ nsStyleSVGPaint::nsStyleSVGPaint(const n
 
 nsStyleSVGPaint::~nsStyleSVGPaint() { Reset(); }
 
 void nsStyleSVGPaint::Reset() {
   switch (mType) {
     case eStyleSVGPaintType_None:
       break;
     case eStyleSVGPaintType_Color:
-      mPaint.mColor = StyleComplexColor::Black();
+      mPaint.mColor = StyleColor::Black();
       break;
     case eStyleSVGPaintType_Server:
       mPaint.mPaintServer->Release();
       mPaint.mPaintServer = nullptr;
       MOZ_FALLTHROUGH;
     case eStyleSVGPaintType_ContextFill:
     case eStyleSVGPaintType_ContextStroke:
       mFallbackType = eStyleSVGFallbackType_NotSet;
-      mFallbackColor = StyleComplexColor::Black();
+      mFallbackColor = StyleColor::Black();
       break;
   }
   mType = nsStyleSVGPaintType(0);
 }
 
 nsStyleSVGPaint& nsStyleSVGPaint::operator=(const nsStyleSVGPaint& aOther) {
   if (this != &aOther) {
     Assign(aOther);
@@ -1244,34 +1244,34 @@ void nsStyleSVGPaint::Assign(const nsSty
 
 void nsStyleSVGPaint::SetNone() {
   Reset();
   mType = eStyleSVGPaintType_None;
 }
 
 void nsStyleSVGPaint::SetContextValue(nsStyleSVGPaintType aType,
                                       nsStyleSVGFallbackType aFallbackType,
-                                      StyleComplexColor aFallbackColor) {
+                                      StyleColor aFallbackColor) {
   MOZ_ASSERT(aType == eStyleSVGPaintType_ContextFill ||
              aType == eStyleSVGPaintType_ContextStroke);
   Reset();
   mType = aType;
   mFallbackType = aFallbackType;
   mFallbackColor = aFallbackColor;
 }
 
-void nsStyleSVGPaint::SetColor(StyleComplexColor aColor) {
+void nsStyleSVGPaint::SetColor(StyleColor aColor) {
   Reset();
   mType = eStyleSVGPaintType_Color;
   mPaint.mColor = aColor;
 }
 
 void nsStyleSVGPaint::SetPaintServer(css::URLValue* aPaintServer,
                                      nsStyleSVGFallbackType aFallbackType,
-                                     StyleComplexColor aFallbackColor) {
+                                     StyleColor aFallbackColor) {
   MOZ_ASSERT(aPaintServer);
   Reset();
   mType = eStyleSVGPaintType_Server;
   mPaint.mPaintServer = aPaintServer;
   mPaint.mPaintServer->AddRef();
   mFallbackType = aFallbackType;
   mFallbackColor = aFallbackColor;
 }
@@ -2796,17 +2796,17 @@ nsChangeHint nsStyleImageLayers::Layer::
 }
 
 // --------------------
 // nsStyleBackground
 //
 
 nsStyleBackground::nsStyleBackground(const Document& aDocument)
     : mImage(nsStyleImageLayers::LayerType::Background),
-      mBackgroundColor(StyleComplexColor::Transparent()) {
+      mBackgroundColor(StyleColor::Transparent()) {
   MOZ_COUNT_CTOR(nsStyleBackground);
 }
 
 nsStyleBackground::nsStyleBackground(const nsStyleBackground& aSource)
     : mImage(aSource.mImage), mBackgroundColor(aSource.mBackgroundColor) {
   MOZ_COUNT_CTOR(nsStyleBackground);
 }
 
@@ -3642,17 +3642,17 @@ nsChangeHint nsStyleContent::CalcDiffere
 
 nsStyleTextReset::nsStyleTextReset(const Document& aDocument)
     : mTextOverflow(),
       mTextDecorationLine(StyleTextDecorationLine_NONE),
       mTextDecorationStyle(NS_STYLE_TEXT_DECORATION_STYLE_SOLID),
       mUnicodeBidi(NS_STYLE_UNICODE_BIDI_NORMAL),
       mInitialLetterSink(0),
       mInitialLetterSize(0.0f),
-      mTextDecorationColor(StyleComplexColor::CurrentColor()) {
+      mTextDecorationColor(StyleColor::CurrentColor()) {
   MOZ_COUNT_CTOR(nsStyleTextReset);
 }
 
 nsStyleTextReset::nsStyleTextReset(const nsStyleTextReset& aSource)
     : mTextOverflow(aSource.mTextOverflow),
       mTextDecorationLine(aSource.mTextDecorationLine),
       mTextDecorationStyle(aSource.mTextDecorationStyle),
       mUnicodeBidi(aSource.mUnicodeBidi),
@@ -3725,19 +3725,19 @@ nsStyleText::nsStyleText(const Document&
       mRubyAlign(NS_STYLE_RUBY_ALIGN_SPACE_AROUND),
       mRubyPosition(NS_STYLE_RUBY_POSITION_OVER),
       mTextSizeAdjust(NS_STYLE_TEXT_SIZE_ADJUST_AUTO),
       mTextCombineUpright(NS_STYLE_TEXT_COMBINE_UPRIGHT_NONE),
       mControlCharacterVisibility(
           nsLayoutUtils::ControlCharVisibilityDefault()),
       mTextEmphasisStyle(NS_STYLE_TEXT_EMPHASIS_STYLE_NONE),
       mTextRendering(StyleTextRendering::Auto),
-      mTextEmphasisColor(StyleComplexColor::CurrentColor()),
-      mWebkitTextFillColor(StyleComplexColor::CurrentColor()),
-      mWebkitTextStrokeColor(StyleComplexColor::CurrentColor()),
+      mTextEmphasisColor(StyleColor::CurrentColor()),
+      mWebkitTextFillColor(StyleColor::CurrentColor()),
+      mWebkitTextStrokeColor(StyleColor::CurrentColor()),
       mMozTabSize(
           StyleNonNegativeLengthOrNumber::Number(NS_STYLE_TABSIZE_INITIAL)),
       mWordSpacing(LengthPercentage::Zero()),
       mLetterSpacing({0.}),
       mLineHeight(StyleLineHeight::Normal()),
       mTextIndent(LengthPercentage::Zero()),
       mWebkitTextStrokeWidth(0),
       mTextShadow(nullptr) {
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -11,17 +11,17 @@
 
 #ifndef nsStyleStruct_h___
 #define nsStyleStruct_h___
 
 #include "mozilla/Attributes.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/SheetType.h"
 #include "mozilla/StaticPtr.h"
-#include "mozilla/StyleComplexColor.h"
+#include "mozilla/StyleColorInlines.h"
 #include "mozilla/UniquePtr.h"
 #include "nsColor.h"
 #include "nsCoord.h"
 #include "nsMargin.h"
 #include "nsFont.h"
 #include "nsStyleAutoArray.h"
 #include "nsStyleCoord.h"
 #include "nsStyleConsts.h"
@@ -128,17 +128,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
   nscoord mScriptUnconstrainedSize;
   nscoord mScriptMinSize;  // length
   float mScriptSizeMultiplier;
   RefPtr<nsAtom> mLanguage;
 };
 
 struct nsStyleGradientStop {
   nsStyleCoord mLocation;  // percent, coord, calc, none
-  mozilla::StyleComplexColor mColor;
+  mozilla::StyleColor mColor;
   bool mIsInterpolationHint;
 
   // Use ==/!= on nsStyleGradient instead of on the gradient stop.
   bool operator==(const nsStyleGradientStop&) const = delete;
   bool operator!=(const nsStyleGradientStop&) const = delete;
 };
 
 class nsStyleGradient final {
@@ -681,17 +681,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
   // This is defined in nsStyleStructInlines.h.
   inline bool HasLocalBackground() const;
 
   const nsStyleImageLayers::Layer& BottomLayer() const {
     return mImage.BottomLayer();
   }
 
   nsStyleImageLayers mImage;
-  mozilla::StyleComplexColor mBackgroundColor;
+  mozilla::StyleColor mBackgroundColor;
 };
 
 struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleMargin {
   explicit nsStyleMargin(const mozilla::dom::Document&);
   nsStyleMargin(const nsStyleMargin& aMargin);
   ~nsStyleMargin() { MOZ_COUNT_DTOR(nsStyleMargin); }
   void TriggerImageLoads(mozilla::dom::Document&, const nsStyleMargin*) {}
   const static bool kHasTriggerImageLoads = false;
@@ -752,25 +752,25 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
 };
 
 struct nsCSSShadowItem {
   nscoord mXOffset;
   nscoord mYOffset;
   nscoord mRadius;
   nscoord mSpread;
 
-  mozilla::StyleComplexColor mColor;
+  mozilla::StyleColor mColor;
   bool mInset;
 
   nsCSSShadowItem()
       : mXOffset(0),
         mYOffset(0),
         mRadius(0),
         mSpread(0),
-        mColor(mozilla::StyleComplexColor::CurrentColor()),
+        mColor(mozilla::StyleColor::CurrentColor()),
         mInset(false) {
     MOZ_COUNT_CTOR(nsCSSShadowItem);
   }
   ~nsCSSShadowItem() { MOZ_COUNT_DTOR(nsCSSShadowItem); }
 
   bool operator==(const nsCSSShadowItem& aOther) const {
     return (mXOffset == aOther.mXOffset && mYOffset == aOther.mYOffset &&
             mRadius == aOther.mRadius && mSpread == aOther.mSpread &&
@@ -953,52 +953,52 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
   mozilla::StyleBoxDecorationBreak mBoxDecorationBreak;
 
  protected:
   mozilla::StyleBorderStyle mBorderStyle[4];  // StyleBorderStyle::*
 
  public:
   // the colors to use for a simple border.
   // not used for -moz-border-colors
-  mozilla::StyleComplexColor mBorderTopColor;
-  mozilla::StyleComplexColor mBorderRightColor;
-  mozilla::StyleComplexColor mBorderBottomColor;
-  mozilla::StyleComplexColor mBorderLeftColor;
-
-  mozilla::StyleComplexColor& BorderColorFor(mozilla::Side aSide) {
+  mozilla::StyleColor mBorderTopColor;
+  mozilla::StyleColor mBorderRightColor;
+  mozilla::StyleColor mBorderBottomColor;
+  mozilla::StyleColor mBorderLeftColor;
+
+  mozilla::StyleColor& BorderColorFor(mozilla::Side aSide) {
     switch (aSide) {
       case mozilla::eSideTop:
         return mBorderTopColor;
       case mozilla::eSideRight:
         return mBorderRightColor;
       case mozilla::eSideBottom:
         return mBorderBottomColor;
       case mozilla::eSideLeft:
         return mBorderLeftColor;
     }
     MOZ_ASSERT_UNREACHABLE("Unknown side");
     return mBorderTopColor;
   }
 
-  const mozilla::StyleComplexColor& BorderColorFor(mozilla::Side aSide) const {
+  const mozilla::StyleColor& BorderColorFor(mozilla::Side aSide) const {
     switch (aSide) {
       case mozilla::eSideTop:
         return mBorderTopColor;
       case mozilla::eSideRight:
         return mBorderRightColor;
       case mozilla::eSideBottom:
         return mBorderBottomColor;
       case mozilla::eSideLeft:
         return mBorderLeftColor;
     }
     MOZ_ASSERT_UNREACHABLE("Unknown side");
     return mBorderTopColor;
   }
 
-  static mozilla::StyleComplexColor nsStyleBorder::*BorderColorFieldFor(
+  static mozilla::StyleColor nsStyleBorder::*BorderColorFieldFor(
       mozilla::Side aSide) {
     switch (aSide) {
       case mozilla::eSideTop:
         return &nsStyleBorder::mBorderTopColor;
       case mozilla::eSideRight:
         return &nsStyleBorder::mBorderRightColor;
       case mozilla::eSideBottom:
         return &nsStyleBorder::mBorderBottomColor;
@@ -1050,17 +1050,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
 
   // This is the specified value of outline-width, but with length values
   // computed to absolute.  mActualOutlineWidth stores the outline-width
   // value used by layout.  (We must store mOutlineWidth for the same
   // style struct resolution reasons that we do nsStyleBorder::mBorder;
   // see that field's comment.)
   nscoord mOutlineWidth;
   nscoord mOutlineOffset;
-  mozilla::StyleComplexColor mOutlineColor;
+  mozilla::StyleColor mOutlineColor;
   mozilla::StyleOutlineStyle mOutlineStyle;
 
   nscoord GetOutlineWidth() const { return mActualOutlineWidth; }
 
   bool ShouldPaintOutline() const {
     if (mOutlineStyle.IsAuto()) {
       return true;
     }
@@ -1435,17 +1435,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
 
   nsStyleTextOverflow mTextOverflow;  // enum, string
 
   mozilla::StyleTextDecorationLine mTextDecorationLine;
   uint8_t mTextDecorationStyle;  // NS_STYLE_TEXT_DECORATION_STYLE_*
   uint8_t mUnicodeBidi;          // NS_STYLE_UNICODE_BIDI_*
   nscoord mInitialLetterSink;    // 0 means normal
   float mInitialLetterSize;      // 0.0f means normal
-  mozilla::StyleComplexColor mTextDecorationColor;
+  mozilla::StyleColor mTextDecorationColor;
 };
 
 struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleText {
   explicit nsStyleText(const mozilla::dom::Document&);
   nsStyleText(const nsStyleText& aOther);
   ~nsStyleText();
   void TriggerImageLoads(mozilla::dom::Document&, const nsStyleText*) {}
   const static bool kHasTriggerImageLoads = false;
@@ -1468,19 +1468,19 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
   uint8_t mRubyPosition;        // NS_STYLE_RUBY_POSITION_*
   uint8_t mTextSizeAdjust;      // NS_STYLE_TEXT_SIZE_ADJUST_*
   uint8_t mTextCombineUpright;  // NS_STYLE_TEXT_COMBINE_UPRIGHT_*
   uint8_t
       mControlCharacterVisibility;  // NS_STYLE_CONTROL_CHARACTER_VISIBILITY_*
   uint8_t mTextEmphasisPosition;    // NS_STYLE_TEXT_EMPHASIS_POSITION_*
   uint8_t mTextEmphasisStyle;       // NS_STYLE_TEXT_EMPHASIS_STYLE_*
   mozilla::StyleTextRendering mTextRendering;
-  mozilla::StyleComplexColor mTextEmphasisColor;
-  mozilla::StyleComplexColor mWebkitTextFillColor;
-  mozilla::StyleComplexColor mWebkitTextStrokeColor;
+  mozilla::StyleColor mTextEmphasisColor;
+  mozilla::StyleColor mWebkitTextFillColor;
+  mozilla::StyleColor mWebkitTextStrokeColor;
 
   mozilla::StyleNonNegativeLengthOrNumber mMozTabSize;
   mozilla::LengthPercentage mWordSpacing;
   mozilla::StyleLetterSpacing mLetterSpacing;
   mozilla::StyleLineHeight mLineHeight;
   mozilla::LengthPercentage mTextIndent;
   nscoord mWebkitTextStrokeWidth;  // coord
 
@@ -2605,17 +2605,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
   static const uint32_t kMaxColumnCount = 1000;
 
   // This represents the value of column-count: auto.
   static const uint32_t kColumnCountAuto = 0;
 
   uint32_t mColumnCount = kColumnCountAuto;
   nsStyleCoord mColumnWidth;  // coord, auto
 
-  mozilla::StyleComplexColor mColumnRuleColor;
+  mozilla::StyleColor mColumnRuleColor;
   mozilla::StyleBorderStyle mColumnRuleStyle;  // StyleborderStyle::*
   mozilla::StyleColumnFill mColumnFill = mozilla::StyleColumnFill::Balance;
   mozilla::StyleColumnSpan mColumnSpan = mozilla::StyleColumnSpan::None;
 
   nscoord GetComputedColumnRuleWidth() const {
     return (IsVisibleBorderStyle(mColumnRuleStyle) ? mColumnRuleWidth : 0);
   }
 
@@ -2659,30 +2659,30 @@ class nsStyleSVGPaint {
   nsStyleSVGPaint(const nsStyleSVGPaint& aSource);
   ~nsStyleSVGPaint();
 
   nsStyleSVGPaint& operator=(const nsStyleSVGPaint& aOther);
 
   nsStyleSVGPaintType Type() const { return mType; }
 
   void SetNone();
-  void SetColor(mozilla::StyleComplexColor aColor);
+  void SetColor(mozilla::StyleColor aColor);
   void SetPaintServer(mozilla::css::URLValue* aPaintServer,
                       nsStyleSVGFallbackType aFallbackType,
-                      mozilla::StyleComplexColor aFallbackColor);
+                      mozilla::StyleColor aFallbackColor);
   void SetPaintServer(mozilla::css::URLValue* aPaintServer) {
     SetPaintServer(aPaintServer, eStyleSVGFallbackType_NotSet,
-                   mozilla::StyleComplexColor::Black());
+                   mozilla::StyleColor::Black());
   }
   void SetContextValue(nsStyleSVGPaintType aType,
                        nsStyleSVGFallbackType aFallbackType,
-                       mozilla::StyleComplexColor aFallbackColor);
+                       mozilla::StyleColor aFallbackColor);
   void SetContextValue(nsStyleSVGPaintType aType) {
     SetContextValue(aType, eStyleSVGFallbackType_NotSet,
-                    mozilla::StyleComplexColor::Black());
+                    mozilla::StyleColor::Black());
   }
 
   nscolor GetColor(mozilla::ComputedStyle* aComputedStyle) const {
     MOZ_ASSERT(mType == eStyleSVGPaintType_Color);
     return mPaint.mColor.CalcColor(*aComputedStyle);
   }
 
   mozilla::css::URLValue* GetPaintServer() const {
@@ -2704,24 +2704,24 @@ class nsStyleSVGPaint {
     return !(*this == aOther);
   }
 
  private:
   void Reset();
   void Assign(const nsStyleSVGPaint& aOther);
 
   union ColorOrPaintServer {
-    mozilla::StyleComplexColor mColor;
+    mozilla::StyleColor mColor;
     mozilla::css::URLValue* mPaintServer;
-    explicit ColorOrPaintServer(mozilla::StyleComplexColor c) : mColor(c) {}
+    explicit ColorOrPaintServer(mozilla::StyleColor c) : mColor(c) {}
   };
   ColorOrPaintServer mPaint;
   nsStyleSVGPaintType mType;
   nsStyleSVGFallbackType mFallbackType;
-  mozilla::StyleComplexColor mFallbackColor;
+  mozilla::StyleColor mFallbackColor;
 };
 
 struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleSVG {
   explicit nsStyleSVG(const mozilla::dom::Document&);
   nsStyleSVG(const nsStyleSVG& aSource);
   ~nsStyleSVG();
   void TriggerImageLoads(mozilla::dom::Document&, const nsStyleSVG*) {}
   const static bool kHasTriggerImageLoads = false;
@@ -2892,19 +2892,19 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
   bool HasMask() const;
 
   bool HasNonScalingStroke() const {
     return mVectorEffect == NS_STYLE_VECTOR_EFFECT_NON_SCALING_STROKE;
   }
 
   nsStyleImageLayers mMask;
   mozilla::StyleShapeSource mClipPath;
-  mozilla::StyleComplexColor mStopColor;
-  mozilla::StyleComplexColor mFloodColor;
-  mozilla::StyleComplexColor mLightingColor;
+  mozilla::StyleColor mStopColor;
+  mozilla::StyleColor mFloodColor;
+  mozilla::StyleColor mLightingColor;
 
   float mStopOpacity;
   float mFloodOpacity;
 
   uint8_t mDominantBaseline;  // NS_STYLE_DOMINANT_BASELINE_*
   uint8_t mVectorEffect;      // NS_STYLE_VECTOR_EFFECT_*
   uint8_t mMaskType;          // NS_STYLE_MASK_TYPE_*
 };
--- a/servo/components/style/properties/properties.mako.rs
+++ b/servo/components/style/properties/properties.mako.rs
@@ -1288,17 +1288,17 @@ impl LonghandId {
         )
     }
 
     /// Whether computed values of this property lossily convert any complex
     /// colors into RGBA colors.
     ///
     /// In Gecko, there are some properties still that compute currentcolor
     /// down to an RGBA color at computed value time, instead of as
-    /// `StyleComplexColor`s. For these properties, we must return `false`,
+    /// `StyleColor`s. For these properties, we must return `false`,
     /// so that we correctly avoid caching style data in the rule tree.
     pub fn stores_complex_colors_lossily(&self) -> bool {
         % if product == "gecko":
         matches!(*self,
             % for property in data.longhands:
             % if property.predefined_type == "RGBAColor":
             LonghandId::${property.camel_case} |
             % endif
--- a/servo/ports/geckolib/cbindgen.toml
+++ b/servo/ports/geckolib/cbindgen.toml
@@ -286,22 +286,22 @@ renaming_overrides_prefixing = true
 
 "GenericColor" = """
   static inline StyleGenericColor FromColor(nscolor);
   static inline StyleGenericColor Black();
   static inline StyleGenericColor White();
   static inline StyleGenericColor Transparent();
   bool MaybeTransparent() const;
   /**
-   * Compute the color for this StyleComplexColor, taking into
-   * account the foreground color from the frame's ComputedStyle.
+   * Compute the final color, taking into account the foreground color from the
+   * frame's ComputedStyle.
    */
   nscolor CalcColor(const nsIFrame*) const;
   /**
-   * Compute the color for this StyleComplexColor, taking into
-   * account the foreground color the style.
+   * Compute the final color, taking into account the foreground color from the
+   * style.
    */
   nscolor CalcColor(const ComputedStyle&) const;
   /**
-   * Compute the color for this StyleComplexColor, making the argument the foreground color.
+   * Compute the final color, making the argument the foreground color.
    */
   nscolor CalcColor(nscolor) const;
 """