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

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

Issue 2088683002: Make StringKeyframe constructor take a const CSSValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_make_csspropertyspecifickeyframe_take_const
Patch Set: Removed the persistent const 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/animation/StringKeyframe.h
diff --git a/third_party/WebKit/Source/core/animation/StringKeyframe.h b/third_party/WebKit/Source/core/animation/StringKeyframe.h
index 411aedf6945b2e58c8429f34543756b73f37f5ee..1f031128c68d422cb469b184b93048cf364b9874 100644
--- a/third_party/WebKit/Source/core/animation/StringKeyframe.h
+++ b/third_party/WebKit/Source/core/animation/StringKeyframe.h
@@ -50,12 +50,12 @@ public:
class CSSPropertySpecificKeyframe : public Keyframe::PropertySpecificKeyframe {
public:
- static PassRefPtr<CSSPropertySpecificKeyframe> create(double offset, PassRefPtr<TimingFunction> easing, CSSValue* value, EffectModel::CompositeOperation composite)
+ static PassRefPtr<CSSPropertySpecificKeyframe> create(double offset, PassRefPtr<TimingFunction> easing, const CSSValue* value, EffectModel::CompositeOperation composite)
{
return adoptRef(new CSSPropertySpecificKeyframe(offset, easing, value, composite));
}
- CSSValue* value() const { return m_value.get(); }
+ const CSSValue* value() const { return m_value.get(); }
virtual bool populateAnimatableValue(CSSPropertyID, Element&, const ComputedStyle* baseStyle, bool force) const;
const PassRefPtr<AnimatableValue> getAnimatableValue() const final { return m_animatableValueCache.get(); }
@@ -65,9 +65,9 @@ public:
PassRefPtr<Keyframe::PropertySpecificKeyframe> neutralKeyframe(double offset, PassRefPtr<TimingFunction> easing) const final;
private:
- CSSPropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easing, CSSValue* value, EffectModel::CompositeOperation composite)
+ CSSPropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easing, const CSSValue* value, EffectModel::CompositeOperation composite)
: Keyframe::PropertySpecificKeyframe(offset, easing, composite)
- , m_value(value)
+ , m_value(const_cast<CSSValue*>(value))
{ }
virtual PassRefPtr<Keyframe::PropertySpecificKeyframe> cloneWithOffset(double offset) const;
@@ -75,6 +75,7 @@ public:
void populateAnimatableValueCaches(CSSPropertyID, Keyframe::PropertySpecificKeyframe&, Element*, CSSValue& fromCSSValue, CSSValue& toCSSValue) const;
+ // TODO(sashab): Make this a const CSSValue.
Persistent<CSSValue> m_value;
mutable RefPtr<AnimatableValue> m_animatableValueCache;
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698