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

Unified Diff: third_party/WebKit/Source/core/animation/animatable/AnimatableUnknown.h

Issue 2723883005: Add registered custom property wrapping support to CSSAnimatableValueFactory (Closed)
Patch Set: Rebased Created 3 years, 10 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 | third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698