Chromium Code Reviews| Index: third_party/WebKit/Source/core/animation/animatable/AnimatableUnknown.h |
| diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableUnknown.h b/third_party/WebKit/Source/core/animation/animatable/AnimatableUnknown.h |
| index 8d5c0b87e6a915a9558364c6e6e04c8d3f338830..a100d79896674d32161588f5238fcc14ac7ebb9c 100644 |
| --- a/third_party/WebKit/Source/core/animation/animatable/AnimatableUnknown.h |
| +++ b/third_party/WebKit/Source/core/animation/animatable/AnimatableUnknown.h |
| @@ -41,14 +41,14 @@ class AnimatableUnknown final : public AnimatableValue { |
| public: |
| ~AnimatableUnknown() override {} |
| - static PassRefPtr<AnimatableUnknown> create(CSSValue* value) { |
| + static PassRefPtr<AnimatableUnknown> create(const CSSValue* value) { |
| return adoptRef(new AnimatableUnknown(value)); |
| } |
| static PassRefPtr<AnimatableUnknown> create(CSSValueID value) { |
| return adoptRef(new AnimatableUnknown(CSSIdentifierValue::create(value))); |
| } |
| - CSSValue* toCSSValue() const { return m_value; } |
| + const CSSValue* toCSSValue() const { return m_value; } |
| CSSValueID toCSSValueID() const { |
| return toCSSIdentifierValue(m_value.get())->getValueID(); |
| } |
| @@ -62,26 +62,23 @@ class AnimatableUnknown final : public AnimatableValue { |
| bool usesDefaultInterpolationWith(const AnimatableValue*) const override; |
| private: |
| - explicit AnimatableUnknown(CSSValue* value) : m_value(value) { |
| - DCHECK(m_value); |
| - } |
| + explicit AnimatableUnknown(const CSSValue* value) : m_value(value) {} |
| AnimatableType type() const override { return TypeUnknown; } |
| bool equalTo(const AnimatableValue*) const override; |
| - const Persistent<CSSValue> m_value; |
| + const Persistent<const CSSValue> m_value; |
| }; |
| DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableUnknown, isUnknown()); |
| inline bool AnimatableUnknown::equalTo(const AnimatableValue* value) const { |
| const AnimatableUnknown* unknown = toAnimatableUnknown(value); |
| - return m_value == unknown->m_value || m_value->equals(*unknown->m_value); |
| + return compareCSSValuePtr(m_value.get(), unknown->m_value.get()); |
| } |
| inline bool AnimatableUnknown::usesDefaultInterpolationWith( |
| const AnimatableValue* value) const { |
| - const AnimatableUnknown& unknown = toAnimatableUnknown(*value); |
| - return !m_value->equals(*unknown.m_value); |
| + return equalTo(value); |
|
Eric Willigers
2017/03/04 04:16:31
Why the change from not equals to equals?
alancutter (OOO until 2018)
2017/03/05 23:23:57
Whoops, fixed.
|
| } |
| } // namespace blink |