Summary: | Multiple selectors break keyframes animation | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Matthew Gertner <matthew> | ||||||
Component: | CSS | Assignee: | Dean Jackson <dino> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | dino, simon.fraser, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | Other | ||||||||
Hardware: | Unspecified | ||||||||
OS: | iOS 9.3 | ||||||||
Attachments: |
|
Description
Matthew Gertner
2016-05-30 03:04:22 PDT
Created attachment 280638 [details]
Testcase
KeyframeList::insert() is just replacing earlier keyframes with later ones having the same key, rather than merging. Created attachment 280815 [details]
Patch
Comment on attachment 280815 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=280815&action=review > Source/WebCore/css/StyleResolver.cpp:525 > + const Vector<Ref<StyleKeyframe>>* keyframes = &keyframesRule->keyframes(); auto? > Source/WebCore/css/StyleResolver.cpp:550 > + Ref<StyleKeyframe> styleKeyframe = StyleKeyframe::create(MutableStyleProperties::create()); auto? > Source/WebCore/css/StyleResolver.cpp:552 > + styleKeyframe.ptr()->mutableProperties().mergeAndOverrideOnConflict(originalKeyframe->properties()); Weird to call mergeAndOverrideOnConflict() when mutableProperties() is empty. Could we not have just passed the properties to MutableStyleProperties::create() ? > Source/WebCore/css/StyleResolver.cpp:566 > + No blank line. > LayoutTests/animations/duplicate-keys-expected.html:33 > + testRunner.waitUntilDone(); > + window.addEventListener("load", function () { > + var box = document.querySelector(".box"); > + internals.pauseAnimationAtTimeOnElement("foo", 0.1, box); > + testRunner.notifyDone(); You don't need to use waitUntilDone/notifyDone if the test finishes inside the load event. Committed r201818: <http://trac.webkit.org/changeset/201818> |