WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
158199
Multiple selectors break keyframes animation
https://bugs.webkit.org/show_bug.cgi?id=158199
Summary
Multiple selectors break keyframes animation
Matthew Gertner
Reported
2016-05-30 03:04:22 PDT
I am using CSS code like the following: @keyframes foo { 0% { transform: scale(0.3); opacity: 1; } 50% { transform: scale(1); opacity: 0; } 100% { transform: scale(2); opacity: 0; } } This works fine, but when run through css-nano, some selectors are combined as so: @keyframes foo { 0% { transform: scale(0.3); opacity: 1; } 50% { transform: scale(1); } 50%,to { opacity: 0; } to { transform: scale(2); } } Looks like in this case the opacity rule is applied to 50% but not to 100%. This appears to work fine in other browsers I tested.
Attachments
Testcase
(846 bytes, text/html)
2016-06-06 15:33 PDT
,
Simon Fraser (smfr)
no flags
Details
Patch
(11.00 KB, patch)
2016-06-08 11:05 PDT
,
Dean Jackson
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-06-06 10:43:17 PDT
<
rdar://problem/26652591
>
Simon Fraser (smfr)
Comment 2
2016-06-06 15:33:03 PDT
Created
attachment 280638
[details]
Testcase
Simon Fraser (smfr)
Comment 3
2016-06-06 15:59:38 PDT
KeyframeList::insert() is just replacing earlier keyframes with later ones having the same key, rather than merging.
Dean Jackson
Comment 4
2016-06-08 11:05:15 PDT
Created
attachment 280815
[details]
Patch
Simon Fraser (smfr)
Comment 5
2016-06-08 11:09:53 PDT
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.
Dean Jackson
Comment 6
2016-06-08 11:45:25 PDT
Committed
r201818
: <
http://trac.webkit.org/changeset/201818
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug