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

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

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.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
index 8f6b2ab6a72e51b9aaa46ca2f01a86bed0ffc378..9fb105fce15ccafe1908a0ce59c42607f32e3fb1 100644
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
@@ -220,13 +220,6 @@ CSSPrimitiveValue::CSSPrimitiveValue(double num, UnitType type)
m_value.num = num;
}
-CSSPrimitiveValue::CSSPrimitiveValue(RGBA32 color)
- : CSSValue(PrimitiveClass)
-{
- init(UnitType::RGBColor);
- m_value.rgbcolor = color;
-}
-
CSSPrimitiveValue::CSSPrimitiveValue(const Length& length, float zoom)
: CSSValue(PrimitiveClass)
{
@@ -359,7 +352,6 @@ void CSSPrimitiveValue::cleanup()
case UnitType::DotsPerInch:
case UnitType::DotsPerCentimeter:
case UnitType::Fraction:
- case UnitType::RGBColor:
case UnitType::Unknown:
case UnitType::ValueID:
break;
@@ -786,7 +778,6 @@ const char* CSSPrimitiveValue::unitTypeToString(UnitType type)
return "vmax";
case UnitType::Unknown:
case UnitType::ValueID:
- case UnitType::RGBColor:
case UnitType::Calc:
case UnitType::CalcPercentageWithNumber:
case UnitType::CalcPercentageWithLength:
@@ -845,10 +836,6 @@ String CSSPrimitiveValue::customCSSText() const
case UnitType::ValueID:
text = valueName(m_value.valueID);
break;
- case UnitType::RGBColor: {
- text = Color(m_value.rgbcolor).serializedAsCSSComponentValue();
- break;
- }
case UnitType::Calc:
text = m_value.calc->customCSSText();
break;
@@ -902,8 +889,6 @@ bool CSSPrimitiveValue::equals(const CSSPrimitiveValue& other) const
return m_value.num == other.m_value.num;
case UnitType::ValueID:
return m_value.valueID == other.m_value.valueID;
- case UnitType::RGBColor:
- return m_value.rgbcolor == other.m_value.rgbcolor;
case UnitType::Calc:
return m_value.calc && other.m_value.calc && m_value.calc->equals(*other.m_value.calc);
case UnitType::Integer:
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPrimitiveValue.h ('k') | third_party/WebKit/Source/core/css/CSSShadowValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698