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

Unified Diff: Source/core/css/CSSGradientValue.cpp

Issue 1164573002: CSSValue Immediates: Change CSSValue to an object instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 5 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
« no previous file with comments | « Source/core/css/CSSFontFeatureValue.cpp ('k') | Source/core/css/CSSGridTemplateAreasValue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSGradientValue.cpp
diff --git a/Source/core/css/CSSGradientValue.cpp b/Source/core/css/CSSGradientValue.cpp
index 11c8c2b53ea29f91c3c0ec9d24f94537af17ceb0..b2e665e64bf337be2fe19970c3c98328b1014f5c 100644
--- a/Source/core/css/CSSGradientValue.cpp
+++ b/Source/core/css/CSSGradientValue.cpp
@@ -192,7 +192,7 @@ static void replaceColorHintsWithColorStops(Vector<GradientStop>& stops, const W
}
}
-static Color resolveStopColor(CSSPrimitiveValue* stopColor, const LayoutObject& object)
+static Color resolveStopColor(CSSPrimitiveValue& stopColor, const LayoutObject& object)
{
return object.document().textLinkColors().colorFromPrimitiveValue(stopColor, object.resolveColor(CSSPropertyColor));
}
@@ -214,7 +214,7 @@ void CSSGradientValue::addDeprecatedStops(Gradient* gradient, const LayoutObject
else
offset = stop.m_position->getFloatValue();
- gradient->addColorStop(offset, resolveStopColor(stop.m_color.get(), object));
+ gradient->addColorStop(offset, resolveStopColor(*stop.m_color.get(), object));
}
}
@@ -376,7 +376,7 @@ void CSSGradientValue::addStops(Gradient* gradient, const CSSToLengthConversionD
if (stop.isHint())
hasHints = true;
else
- stops[i].color = resolveStopColor(stop.m_color.get(), object);
+ stops[i].color = resolveStopColor(*stop.m_color.get(), object);
if (stop.m_position) {
if (stop.m_position->isPercentage())
@@ -563,7 +563,7 @@ bool CSSGradientValue::knownToBeOpaque(const LayoutObject* object) const
{
ASSERT(object);
for (auto& stop : m_stops) {
- if (!stop.isHint() && resolveStopColor(stop.m_color.get(), *object).hasAlpha())
+ if (!stop.isHint() && resolveStopColor(*stop.m_color.get(), *object).hasAlpha())
return false;
}
return true;
« no previous file with comments | « Source/core/css/CSSFontFeatureValue.cpp ('k') | Source/core/css/CSSGridTemplateAreasValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698