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
This commit is contained in:
Emilio Cobos Álvarez 2019-04-04 11:35:33 +00:00
Родитель 3a1e1a41c4
Коммит 68aa7a9c80
15 изменённых файлов: 94 добавлений и 94 удалений

Просмотреть файл

@ -211,13 +211,13 @@ void nsColumnSetFrame::CreateBorderRenderers(
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;
}

Просмотреть файл

@ -1262,7 +1262,7 @@ 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

Просмотреть файл

@ -634,7 +634,7 @@ ImgDrawResult nsCSSRendering::PaintBorder(
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,
@ -660,7 +660,7 @@ Maybe<nsCSSBorderRenderer> nsCSSRendering::CreateBorderRenderer(
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,
@ -1946,7 +1946,7 @@ static bool IsOpaqueBorderEdge(const nsStyleBorder& aBorder,
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();

Просмотреть файл

@ -283,7 +283,7 @@ static nscolor ExtractColor(const ComputedStyle& aStyle,
}
static nscolor ExtractColor(const ComputedStyle& aStyle,
const StyleComplexColor& aColor) {
const StyleColor& aColor) {
return aColor.CalcColor(aStyle);
}

Просмотреть файл

@ -18,9 +18,9 @@
#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"

Просмотреть файл

@ -1226,7 +1226,7 @@ nsStyleGradient* Gecko_CreateGradient(uint8_t aShape, uint8_t aSize,
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);

Просмотреть файл

@ -4,14 +4,14 @@
* 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;
namespace mozilla {
// Blend one RGBA color with another based on a given ratios.
// It is a linear combination of each channel with alpha premultipled.
@ -46,8 +46,8 @@ static nscolor LinearBlendColors(nscolor aBg, float aBgRatio, nscolor aFg,
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 =
@ -59,8 +59,8 @@ 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());
}
@ -73,8 +73,8 @@ nscolor StyleComplexColor::CalcColor(nscolor aForegroundColor) const {
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?
@ -86,7 +86,9 @@ nscolor StyleComplexColor::CalcColor(const ComputedStyle& aStyle) const {
return CalcColor(fgColor);
}
template<>
nscolor StyleComplexColor::CalcColor(const nsIFrame* aFrame) const {
template <>
nscolor StyleColor::CalcColor(const nsIFrame* aFrame) const {
return CalcColor(*aFrame->Style());
}
} // namespace mozilla

Просмотреть файл

@ -4,18 +4,16 @@
* 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),
@ -37,15 +35,15 @@ 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_

Просмотреть файл

@ -108,7 +108,7 @@ EXPORTS.mozilla += [
'ServoUtils.h',
'SheetType.h',
'StyleAnimationValue.h',
'StyleComplexColor.h',
'StyleColorInlines.h',
'StyleSheet.h',
'StyleSheetInfo.h',
'StyleSheetInlines.h',
@ -223,7 +223,7 @@ UNIFIED_SOURCES += [
'ServoStyleSet.cpp',
'StreamLoader.cpp',
'StyleAnimationValue.cpp',
'StyleComplexColor.cpp',
'StyleColor.cpp',
'StyleSheet.cpp',
'URLExtraData.cpp',
]

Просмотреть файл

@ -1041,7 +1041,7 @@ void nsComputedDOMStyle::SetToRGBAColor(nsROCSSPrimitiveValue* aValue,
}
void nsComputedDOMStyle::SetValueFromComplexColor(
nsROCSSPrimitiveValue* aValue, const StyleComplexColor& aColor) {
nsROCSSPrimitiveValue* aValue, const mozilla::StyleColor& aColor) {
SetToRGBAColor(aValue, aColor.CalcColor(*mComputedStyle));
}
@ -1865,7 +1865,7 @@ already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetScrollbarColor() {
}
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());
@ -1999,7 +1999,7 @@ already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetTextDecoration() {
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;

Просмотреть файл

@ -10,7 +10,7 @@
#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"
@ -370,7 +370,7 @@ class nsComputedDOMStyle final : public nsDOMCSSDeclaration,
/* 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,

Просмотреть файл

@ -259,10 +259,10 @@ nsStyleBorder::nsStyleBorder(const Document& aDocument)
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);
@ -406,7 +406,7 @@ 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)) {
@ -589,7 +589,7 @@ nsChangeHint nsStyleXUL::CalcDifference(const nsStyleXUL& aNewData) const {
nsStyleColumn::nsStyleColumn(const Document& aDocument)
: mColumnWidth(eStyleUnit_Auto),
mColumnRuleColor(StyleComplexColor::CurrentColor()),
mColumnRuleColor(StyleColor::CurrentColor()),
mColumnRuleStyle(StyleBorderStyle::None),
mColumnRuleWidth(kMediumBorderWidth),
mTwipsPerPixel(TwipsPerPixel(aDocument)) {
@ -1067,9 +1067,9 @@ void nsStyleFilter::SetDropShadow(nsCSSShadowArray* aDropShadow) {
//
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),
@ -1176,10 +1176,10 @@ bool nsStyleSVGReset::HasMask() const {
// 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);
@ -1197,7 +1197,7 @@ void nsStyleSVGPaint::Reset() {
case eStyleSVGPaintType_None:
break;
case eStyleSVGPaintType_Color:
mPaint.mColor = StyleComplexColor::Black();
mPaint.mColor = StyleColor::Black();
break;
case eStyleSVGPaintType_Server:
mPaint.mPaintServer->Release();
@ -1206,7 +1206,7 @@ void nsStyleSVGPaint::Reset() {
case eStyleSVGPaintType_ContextFill:
case eStyleSVGPaintType_ContextStroke:
mFallbackType = eStyleSVGFallbackType_NotSet;
mFallbackColor = StyleComplexColor::Black();
mFallbackColor = StyleColor::Black();
break;
}
mType = nsStyleSVGPaintType(0);
@ -1249,7 +1249,7 @@ void nsStyleSVGPaint::SetNone() {
void nsStyleSVGPaint::SetContextValue(nsStyleSVGPaintType aType,
nsStyleSVGFallbackType aFallbackType,
StyleComplexColor aFallbackColor) {
StyleColor aFallbackColor) {
MOZ_ASSERT(aType == eStyleSVGPaintType_ContextFill ||
aType == eStyleSVGPaintType_ContextStroke);
Reset();
@ -1258,7 +1258,7 @@ void nsStyleSVGPaint::SetContextValue(nsStyleSVGPaintType aType,
mFallbackColor = aFallbackColor;
}
void nsStyleSVGPaint::SetColor(StyleComplexColor aColor) {
void nsStyleSVGPaint::SetColor(StyleColor aColor) {
Reset();
mType = eStyleSVGPaintType_Color;
mPaint.mColor = aColor;
@ -1266,7 +1266,7 @@ void nsStyleSVGPaint::SetColor(StyleComplexColor aColor) {
void nsStyleSVGPaint::SetPaintServer(css::URLValue* aPaintServer,
nsStyleSVGFallbackType aFallbackType,
StyleComplexColor aFallbackColor) {
StyleColor aFallbackColor) {
MOZ_ASSERT(aPaintServer);
Reset();
mType = eStyleSVGPaintType_Server;
@ -2801,7 +2801,7 @@ nsChangeHint nsStyleImageLayers::Layer::CalcDifference(
nsStyleBackground::nsStyleBackground(const Document& aDocument)
: mImage(nsStyleImageLayers::LayerType::Background),
mBackgroundColor(StyleComplexColor::Transparent()) {
mBackgroundColor(StyleColor::Transparent()) {
MOZ_COUNT_CTOR(nsStyleBackground);
}
@ -3647,7 +3647,7 @@ nsStyleTextReset::nsStyleTextReset(const Document& aDocument)
mUnicodeBidi(NS_STYLE_UNICODE_BIDI_NORMAL),
mInitialLetterSink(0),
mInitialLetterSize(0.0f),
mTextDecorationColor(StyleComplexColor::CurrentColor()) {
mTextDecorationColor(StyleColor::CurrentColor()) {
MOZ_COUNT_CTOR(nsStyleTextReset);
}
@ -3730,9 +3730,9 @@ nsStyleText::nsStyleText(const Document& aDocument)
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()),

Просмотреть файл

@ -16,7 +16,7 @@
#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"
@ -133,7 +133,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleFont {
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.
@ -686,7 +686,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleBackground {
}
nsStyleImageLayers mImage;
mozilla::StyleComplexColor mBackgroundColor;
mozilla::StyleColor mBackgroundColor;
};
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleMargin {
@ -757,7 +757,7 @@ struct nsCSSShadowItem {
nscoord mRadius;
nscoord mSpread;
mozilla::StyleComplexColor mColor;
mozilla::StyleColor mColor;
bool mInset;
nsCSSShadowItem()
@ -765,7 +765,7 @@ struct nsCSSShadowItem {
mYOffset(0),
mRadius(0),
mSpread(0),
mColor(mozilla::StyleComplexColor::CurrentColor()),
mColor(mozilla::StyleColor::CurrentColor()),
mInset(false) {
MOZ_COUNT_CTOR(nsCSSShadowItem);
}
@ -958,12 +958,12 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleBorder {
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::StyleColor mBorderTopColor;
mozilla::StyleColor mBorderRightColor;
mozilla::StyleColor mBorderBottomColor;
mozilla::StyleColor mBorderLeftColor;
mozilla::StyleComplexColor& BorderColorFor(mozilla::Side aSide) {
mozilla::StyleColor& BorderColorFor(mozilla::Side aSide) {
switch (aSide) {
case mozilla::eSideTop:
return mBorderTopColor;
@ -978,7 +978,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleBorder {
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;
@ -993,7 +993,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleBorder {
return mBorderTopColor;
}
static mozilla::StyleComplexColor nsStyleBorder::*BorderColorFieldFor(
static mozilla::StyleColor nsStyleBorder::*BorderColorFieldFor(
mozilla::Side aSide) {
switch (aSide) {
case mozilla::eSideTop:
@ -1055,7 +1055,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleOutline {
// see that field's comment.)
nscoord mOutlineWidth;
nscoord mOutlineOffset;
mozilla::StyleComplexColor mOutlineColor;
mozilla::StyleColor mOutlineColor;
mozilla::StyleOutlineStyle mOutlineStyle;
nscoord GetOutlineWidth() const { return mActualOutlineWidth; }
@ -1440,7 +1440,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleTextReset {
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 {
@ -1473,9 +1473,9 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleText {
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;
@ -2610,7 +2610,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleColumn {
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;
@ -2664,20 +2664,20 @@ class nsStyleSVGPaint {
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 {
@ -2709,14 +2709,14 @@ class nsStyleSVGPaint {
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 {
@ -2897,9 +2897,9 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleSVGReset {
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;

Просмотреть файл

@ -1293,7 +1293,7 @@ impl LonghandId {
///
/// 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":

Просмотреть файл

@ -291,17 +291,17 @@ renaming_overrides_prefixing = true
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;
"""