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

Unified Diff: third_party/WebKit/Source/core/animation/StringKeyframe.cpp

Issue 2044023005: Make PropertyReference value() return a const CSSValue& (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_remove_style_property_set_mutable_overload
Patch Set: Rebase Created 4 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
Index: third_party/WebKit/Source/core/animation/StringKeyframe.cpp
diff --git a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
index 9cc5716717e22c10b057ad4dae1e0d30eead712b..1c086691c2dcd3fa141df615891dde36e8e5205a 100644
--- a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
+++ b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
@@ -29,11 +29,11 @@ void StringKeyframe::setCSSPropertyValue(CSSPropertyID property, const String& v
m_cssPropertyMap->setProperty(property, value, false, styleSheetContents);
}
-void StringKeyframe::setCSSPropertyValue(CSSPropertyID property, const CSSValue* value)
+void StringKeyframe::setCSSPropertyValue(CSSPropertyID property, const CSSValue& value)
{
ASSERT(property != CSSPropertyInvalid);
ASSERT(CSSAnimations::isAnimatableProperty(property));
- m_cssPropertyMap->setProperty(property, value, false);
+ m_cssPropertyMap->setProperty(property, &value, false);
}
void StringKeyframe::setPresentationAttributeValue(CSSPropertyID property, const String& value, Element* element, StyleSheetContents* styleSheetContents)
@@ -56,7 +56,7 @@ PropertyHandleSet StringKeyframe::properties() const
for (unsigned i = 0; i < m_cssPropertyMap->propertyCount(); ++i) {
StylePropertySet::PropertyReference propertyReference = m_cssPropertyMap->propertyAt(i);
DCHECK(
- !isShorthandProperty(propertyReference.id()) || propertyReference.value()->isVariableReferenceValue())
+ !isShorthandProperty(propertyReference.id()) || propertyReference.value().isVariableReferenceValue())
<< "Web Animations: Encountered unexpanded shorthand CSS property (" << propertyReference.id() << ").";
properties.add(PropertyHandle(propertyReference.id(), false));
}
@@ -78,10 +78,10 @@ PassRefPtr<Keyframe> StringKeyframe::clone() const
PassRefPtr<Keyframe::PropertySpecificKeyframe> StringKeyframe::createPropertySpecificKeyframe(PropertyHandle property) const
{
if (property.isCSSProperty())
- return CSSPropertySpecificKeyframe::create(offset(), &easing(), cssPropertyValue(property.cssProperty()), composite());
+ return CSSPropertySpecificKeyframe::create(offset(), &easing(), &cssPropertyValue(property.cssProperty()), composite());
if (property.isPresentationAttribute())
- return CSSPropertySpecificKeyframe::create(offset(), &easing(), presentationAttributeValue(property.presentationAttribute()), composite());
+ return CSSPropertySpecificKeyframe::create(offset(), &easing(), &presentationAttributeValue(property.presentationAttribute()), composite());
ASSERT(property.isSVGAttribute());
return SVGPropertySpecificKeyframe::create(offset(), &easing(), svgPropertyValue(property.svgAttribute()), composite());

Powered by Google App Engine
This is Rietveld 408576698