Web Animations API: Don't allow quirky CSS values in keyframes

This patch makes the use of quirky CSS values like -webkit-text color
and unitless dimensions fail to parse when used in element.animate().

BUG=526921

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

git-svn-id: svn://svn.chromium.org/blink/trunk@201524 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 92ad7830
<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<style>
body {
color: blue;
}
#target {
color: green;
}
</style>
<body>
<div id="target"></div>
</body>
<script>
test(function() {
var animation = target.animate([{
color: '-webkit-text',
}, {
color: '-webkit-text',
}], 1);
animation.pause();
animation.currentTime = 0;
assert_equals(getComputedStyle(target).color, 'rgb(0, 128, 0)');
}, 'KeyframeEffects do not support quirky values.');
</script>
...@@ -95,7 +95,7 @@ public: ...@@ -95,7 +95,7 @@ public:
private: private:
StringKeyframe() StringKeyframe()
: m_propertySet(MutableStylePropertySet::create(HTMLQuirksMode)) : m_propertySet(MutableStylePropertySet::create(HTMLStandardMode))
{ } { }
StringKeyframe(const StringKeyframe& copyFrom); StringKeyframe(const StringKeyframe& copyFrom);
......
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