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

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

Issue 1401863002: Stop handling neutral keyframes in CSSValueInterpolationType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_fixCSSValueInterpolationType
Patch Set: Rebased Created 5 years, 2 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/CSSValueInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSValueInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSValueInterpolationType.cpp
index 728a9bb58374ebe86f827bdd1807b82d5e51f730..bf9e74c33b77e05b42dd1815bbea48a9fede404c 100644
--- a/third_party/WebKit/Source/core/animation/CSSValueInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSValueInterpolationType.cpp
@@ -25,7 +25,9 @@ public:
private:
CSSValueNonInterpolableValue(PassRefPtrWillBeRawPtr<CSSValue> cssValue)
: m_cssValue(cssValue)
- { }
+ {
+ ASSERT(m_cssValue);
+ }
RefPtrWillBePersistent<CSSValue> m_cssValue;
};
@@ -35,14 +37,15 @@ DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(CSSValueNonInterpolableValue);
PassOwnPtr<InterpolationValue> CSSValueInterpolationType::maybeConvertSingle(const CSSPropertySpecificKeyframe& keyframe, const StyleResolverState*, ConversionCheckers&) const
{
+ if (keyframe.isNeutral())
+ return nullptr;
+
return InterpolationValue::create(*this, InterpolableList::create(0), CSSValueNonInterpolableValue::create(keyframe.value()));
}
void CSSValueInterpolationType::apply(const InterpolableValue&, const NonInterpolableValue* nonInterpolableValue, StyleResolverState& state) const
{
- CSSValue* value = toCSSValueNonInterpolableValue(nonInterpolableValue)->cssValue();
- if (value)
- StyleBuilder::applyProperty(m_property, state, value);
+ StyleBuilder::applyProperty(m_property, state, toCSSValueNonInterpolableValue(nonInterpolableValue)->cssValue());
}
} // namespace blink
« 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