summaryrefslogtreecommitdiffstats
path: root/layout/style/StyleComplexColor.h
diff options
context:
space:
mode:
Diffstat (limited to 'layout/style/StyleComplexColor.h')
-rw-r--r--layout/style/StyleComplexColor.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/layout/style/StyleComplexColor.h b/layout/style/StyleComplexColor.h
index 4acf90a56..6385b57a1 100644
--- a/layout/style/StyleComplexColor.h
+++ b/layout/style/StyleComplexColor.h
@@ -24,16 +24,29 @@ struct StyleComplexColor
{
nscolor mColor;
uint8_t mForegroundRatio;
-
- static StyleComplexColor FromColor(nscolor aColor) { return {aColor, 0}; }
- static StyleComplexColor CurrentColor() { return {NS_RGBA(0, 0, 0, 0), 255}; }
+ // Whether the complex color represents a computed-value time auto
+ // value. This is only a flag indicating that this value should not
+ // be interpolatable with other colors, while other fields still
+ // represents the actual used color of this value.
+ bool mIsAuto;
+
+ static StyleComplexColor FromColor(nscolor aColor) {
+ return {aColor, 0, false};
+ }
+ static StyleComplexColor CurrentColor() {
+ return {NS_RGBA(0, 0, 0, 0), 255, false};
+ }
+ static StyleComplexColor Auto() {
+ return {NS_RGBA(0, 0, 0, 0), 255, true};
+ }
bool IsNumericColor() const { return mForegroundRatio == 0; }
bool IsCurrentColor() const { return mForegroundRatio == 255; }
bool operator==(const StyleComplexColor& aOther) const {
return mForegroundRatio == aOther.mForegroundRatio &&
- (IsCurrentColor() || mColor == aOther.mColor);
+ (IsCurrentColor() || mColor == aOther.mColor) &&
+ mIsAuto == aOther.mIsAuto;
}
bool operator!=(const StyleComplexColor& aOther) const {
return !(*this == aOther);