New issue
Advanced search Search tips

Issue 645393 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Web Animation property indexed keyframes do not use iterator protocol for their values

Project Member Reported by alancutter@chromium.org, Sep 9 2016

Issue description

Test case: https://jsfiddle.net/mg7w5pqb/

function* keyframes() {
  yield 'green';
  yield 'lime';
}
document.body.animate({
  backgroundColor: keyframes(),
}, {
  duration: 1000,
  fill: 'forwards',
});

This test passes in Firefox and fails in Chrome. Bug is likely in EffectInput::convertObjectForm().
 
Owner: alancutter@chromium.org

Comment 2 by suzyh@chromium.org, Sep 13 2016

Status: Started (was: Available)
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3abd8209bdc0a59fda5350b4e893c1eb0a28be88

commit 3abd8209bdc0a59fda5350b4e893c1eb0a28be88
Author: alancutter <alancutter@chromium.org>
Date: Wed Sep 14 07:59:09 2016

Web Animations: Support iterator protocol in property indexed keyframe values

For element.animate() calls of the form
"element.animate({property: [a, b, c]}, timing);" we were not accepting
non-array iterables for the value list.

This patch extends support for generic iterable objects to property indexed
keyframe values.

This behaviour corresponds to step 6.3 of
http://w3c.github.io/web-animations/#process-a-keyframe-like-object
where we cast the values as a (DOMString or sequence<DOMString>) object.

BUG= 645393 

Review-Url: https://codereview.chromium.org/2334123002
Cr-Commit-Position: refs/heads/master@{#418507}

[modify] https://crrev.com/3abd8209bdc0a59fda5350b4e893c1eb0a28be88/third_party/WebKit/LayoutTests/animations/element-animate-iterable-keyframes.html
[add] https://crrev.com/3abd8209bdc0a59fda5350b4e893c1eb0a28be88/third_party/WebKit/LayoutTests/animations/unstringable-keyframe-value-crash.html
[modify] https://crrev.com/3abd8209bdc0a59fda5350b4e893c1eb0a28be88/third_party/WebKit/Source/bindings/core/v8/DictionaryIterator.cpp
[modify] https://crrev.com/3abd8209bdc0a59fda5350b4e893c1eb0a28be88/third_party/WebKit/Source/bindings/core/v8/DictionaryIterator.h
[modify] https://crrev.com/3abd8209bdc0a59fda5350b4e893c1eb0a28be88/third_party/WebKit/Source/core/animation/EffectInput.cpp
[modify] https://crrev.com/3abd8209bdc0a59fda5350b4e893c1eb0a28be88/third_party/WebKit/Source/core/animation/EffectInput.h

Status: Fixed (was: Started)

Sign in to add a comment