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

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 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 d16098b86608aa8456b020de36f66e9c36818fd2..4b3e626bb4d4207b5061521b975503be7a30dc50 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(CSSPrimitiveValue* stopColor, const LayoutObject& object)
+static Color resolveStopColor(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)

Powered by Google App Engine
This is Rietveld 408576698