Commit e450c785 authored by alancutter's avatar alancutter Committed by Commit bot

Fix debug crash when compositing keyword animations together

This change makes CSSValueInterpolationType composite by replacement
instead of crashing in debug.

Review URL: https://codereview.chromium.org/1401853002

Cr-Commit-Position: refs/heads/master@{#353940}
parent 70ab3999
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id="target"></div>
<script>
test(() => {
target.animate({position: 'absolute'}, {fill: 'forwards'});
target.animate({position: 'static', composite: 'add'}, {fill: 'forwards'});
getComputedStyle(target).position;
}, "Don't crash when compositing keyword animations.");
</script>
...@@ -29,6 +29,11 @@ public: ...@@ -29,6 +29,11 @@ public:
return nullptr; return nullptr;
} }
void composite(UnderlyingValue& underlyingValue, double underlyingFraction, const InterpolationValue& value) const final
{
underlyingValue.set(&value);
}
void apply(const InterpolableValue&, const NonInterpolableValue*, StyleResolverState&) const final; void apply(const InterpolableValue&, const NonInterpolableValue*, StyleResolverState&) const final;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment