Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1051)

Unified Diff: third_party/WebKit/Source/core/css/CSSPrimitiveValue.h

Issue 1376573004: Split out Color from CSSPrimitiveValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_property
Patch Set: Rebase and review feedback Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/CSSPrimitiveValue.h
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h
index 44f2b254ba1682c1038f5379a73f1736a4541317..a089786f82b2b5907c0d3917cdbbe8d80ec90923 100644
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h
@@ -26,7 +26,6 @@
#include "core/CSSValueKeywords.h"
#include "core/CoreExport.h"
#include "core/css/CSSValue.h"
-#include "platform/graphics/Color.h"
#include "wtf/BitVector.h"
#include "wtf/Forward.h"
#include "wtf/MathExtras.h"
@@ -38,7 +37,6 @@ namespace blink {
class CSSCalcValue;
class CSSToLengthConversionData;
class Length;
-class RGBColor;
class ComputedStyle;
// Dimension calculations are imprecise, often resulting in values of e.g.
@@ -86,7 +84,6 @@ public:
Seconds,
Hertz,
Kilohertz,
- RGBColor,
ViewportWidth,
ViewportHeight,
ViewportMin,
@@ -176,7 +173,6 @@ public:
bool isNumber() const { return typeWithCalcResolved() == UnitType::Number || typeWithCalcResolved() == UnitType::Integer; }
bool isPercentage() const { return typeWithCalcResolved() == UnitType::Percentage; }
bool isPx() const { return typeWithCalcResolved() == UnitType::Pixels; }
- bool isRGBColor() const { return type() == UnitType::RGBColor; }
bool isTime() const { return type() == UnitType::Seconds || type() == UnitType::Milliseconds; }
bool isCalculated() const { return type() == UnitType::Calc; }
bool isCalculatedPercentageWithNumber() const { return typeWithCalcResolved() == UnitType::CalcPercentageWithNumber; }
@@ -193,10 +189,6 @@ public:
{
return adoptRefWillBeNoop(new CSSPrimitiveValue(valueID));
}
- static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createColor(RGBA32 rgbValue)
- {
- return adoptRefWillBeNoop(new CSSPrimitiveValue(rgbValue));
- }
static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create(double value, UnitType type)
{
return adoptRefWillBeNoop(new CSSPrimitiveValue(value, type));
@@ -230,8 +222,6 @@ public:
int getIntValue() const { return getValue<int>(); }
template<typename T> inline T getValue() const { return clampTo<T>(getDoubleValue()); }
- RGBA32 getRGBA32Value() const { ASSERT(isRGBColor()); return m_value.rgbcolor; }
-
CSSCalcValue* cssCalcValue() const { ASSERT(isCalculated()); return m_value.calc; }
CSSValueID getValueID() const { return type() == UnitType::ValueID ? m_value.valueID : CSSValueInvalid; }
@@ -254,7 +244,6 @@ public:
private:
CSSPrimitiveValue(CSSValueID);
- CSSPrimitiveValue(RGBA32 color);
CSSPrimitiveValue(const Length&, float zoom);
CSSPrimitiveValue(double, UnitType);
@@ -286,7 +275,6 @@ private:
union {
CSSValueID valueID;
double num;
- RGBA32 rgbcolor;
// FIXME: oilpan: Should be a member, but no support for members in unions. Just trace the raw ptr for now.
CSSCalcValue* calc;
} m_value;
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSGradientValue.cpp ('k') | third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698