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

Unified Diff: third_party/WebKit/Source/core/css/CSSGradientValue.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/CSSGradientValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSGradientValue.cpp b/third_party/WebKit/Source/core/css/CSSGradientValue.cpp
index 8d76c9427c0459d41fd23503eb2b2d5967b78606..e96e061e85274ad3d2c8885c81d576e3e75cae8b 100644
--- a/third_party/WebKit/Source/core/css/CSSGradientValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSGradientValue.cpp
@@ -192,9 +192,9 @@ static void replaceColorHintsWithColorStops(Vector<GradientStop>& stops, const W
}
}
-static Color resolveStopColor(const CSSPrimitiveValue& stopColor, const LayoutObject& object)
+static Color resolveStopColor(const CSSValue& stopColor, const LayoutObject& object)
{
- return object.document().textLinkColors().colorFromPrimitiveValue(stopColor, object.resolveColor(CSSPropertyColor));
+ return object.document().textLinkColors().colorFromCSSValue(stopColor, object.resolveColor(CSSPropertyColor));
}
void CSSGradientValue::addDeprecatedStops(Gradient* gradient, const LayoutObject& object)
@@ -549,7 +549,7 @@ bool CSSGradientValue::isCacheable() const
for (size_t i = 0; i < m_stops.size(); ++i) {
const CSSGradientColorStop& stop = m_stops[i];
- if (!stop.isHint() && stop.m_color->colorIsDerivedFromElement())
+ if (!stop.isHint() && stop.m_color->isPrimitiveValue() && toCSSPrimitiveValue(*stop.m_color).colorIsDerivedFromElement())
return false;
if (!stop.m_position)
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSGradientValue.h ('k') | third_party/WebKit/Source/core/css/CSSPrimitiveValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698