mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-12 06:52:25 +00:00
Bug 1347409 part 1 - introduce nsStyleSVGFallbackType so that we can begin to distinguish the type of paintserver fallback r=cam
This commit is contained in:
parent
8ddc231e13
commit
732aac6704
@ -1254,6 +1254,7 @@ nsStyleSVGReset::HasMask() const
|
||||
// nsStyleSVGPaint implementation
|
||||
nsStyleSVGPaint::nsStyleSVGPaint(nsStyleSVGPaintType aType)
|
||||
: mType(aType)
|
||||
, mFallbackType(eStyleSVGFallbackType_NotSet)
|
||||
, mFallbackColor(NS_RGB(0, 0, 0))
|
||||
{
|
||||
MOZ_ASSERT(aType == nsStyleSVGPaintType(0) ||
|
||||
@ -1288,6 +1289,7 @@ nsStyleSVGPaint::Reset()
|
||||
MOZ_FALLTHROUGH;
|
||||
case eStyleSVGPaintType_ContextFill:
|
||||
case eStyleSVGPaintType_ContextStroke:
|
||||
mFallbackType = eStyleSVGFallbackType_NotSet;
|
||||
mFallbackColor = NS_RGB(0, 0, 0);
|
||||
break;
|
||||
}
|
||||
|
@ -3376,7 +3376,7 @@ protected:
|
||||
nscoord mTwipsPerPixel;
|
||||
};
|
||||
|
||||
enum nsStyleSVGPaintType {
|
||||
enum nsStyleSVGPaintType : uint8_t {
|
||||
eStyleSVGPaintType_None = 1,
|
||||
eStyleSVGPaintType_Color,
|
||||
eStyleSVGPaintType_Server,
|
||||
@ -3384,6 +3384,12 @@ enum nsStyleSVGPaintType {
|
||||
eStyleSVGPaintType_ContextStroke
|
||||
};
|
||||
|
||||
enum nsStyleSVGFallbackType : uint8_t {
|
||||
eStyleSVGFallbackType_NotSet,
|
||||
eStyleSVGFallbackType_None,
|
||||
eStyleSVGFallbackType_Color,
|
||||
};
|
||||
|
||||
enum nsStyleSVGOpacitySource : uint8_t {
|
||||
eStyleSVGOpacitySource_Normal,
|
||||
eStyleSVGOpacitySource_ContextFillOpacity,
|
||||
@ -3418,6 +3424,10 @@ public:
|
||||
return mPaint.mPaintServer;
|
||||
}
|
||||
|
||||
nsStyleSVGFallbackType GetFallbackType() const {
|
||||
return mFallbackType;
|
||||
}
|
||||
|
||||
nscolor GetFallbackColor() const {
|
||||
MOZ_ASSERT(mType == eStyleSVGPaintType_Server ||
|
||||
mType == eStyleSVGPaintType_ContextFill ||
|
||||
@ -3439,6 +3449,7 @@ private:
|
||||
mozilla::css::URLValue* mPaintServer;
|
||||
} mPaint;
|
||||
nsStyleSVGPaintType mType;
|
||||
nsStyleSVGFallbackType mFallbackType;
|
||||
nscolor mFallbackColor;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user