WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
109271
Keyframe rule should be ignored if keyframe selector has invalid value
https://bugs.webkit.org/show_bug.cgi?id=109271
Summary
Keyframe rule should be ignored if keyframe selector has invalid value
Alexander Shalamov
Reported
2013-02-08 01:04:51 PST
Whenever keyframe selector has invalid value (negative or more than 100%), keyframe rule should be ignored.
Attachments
Patch 1
(11.91 KB, patch)
2013-02-08 05:24 PST
,
Alexander Shalamov
no flags
Details
Formatted Diff
Diff
Patch 2
(11.88 KB, patch)
2013-02-08 05:32 PST
,
Alexander Shalamov
webkit-ews
: commit-queue-
Details
Formatted Diff
Diff
Patch 3
(11.85 KB, patch)
2013-02-11 05:17 PST
,
Alexander Shalamov
no flags
Details
Formatted Diff
Diff
Patch 4
(11.77 KB, patch)
2013-04-12 04:44 PDT
,
Alexander Shalamov
simon.fraser
: review-
Details
Formatted Diff
Diff
Patch 5
(11.90 KB, patch)
2013-04-16 06:27 PDT
,
Alexander Shalamov
dino
: review-
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Alexander Shalamov
Comment 1
2013-02-08 05:24:59 PST
Created
attachment 187297
[details]
Patch 1 Patch for initial review.
Alexander Shalamov
Comment 2
2013-02-08 05:32:40 PST
Created
attachment 187299
[details]
Patch 2 - remove unnecessary rule.release() in CSSParser::createKeyframesRule
Early Warning System Bot
Comment 3
2013-02-08 05:42:09 PST
Comment on
attachment 187299
[details]
Patch 2
Attachment 187299
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/16427613
Early Warning System Bot
Comment 4
2013-02-08 05:43:51 PST
Comment on
attachment 187299
[details]
Patch 2
Attachment 187299
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/16427615
WebKit Review Bot
Comment 5
2013-02-08 05:55:22 PST
Comment on
attachment 187299
[details]
Patch 2
Attachment 187299
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/16408747
EFL EWS Bot
Comment 6
2013-02-08 06:09:35 PST
Comment on
attachment 187299
[details]
Patch 2
Attachment 187299
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/16434636
Peter Beverloo (cr-android ews)
Comment 7
2013-02-08 06:11:27 PST
Comment on
attachment 187299
[details]
Patch 2
Attachment 187299
[details]
did not pass cr-android-ews (chromium-android): Output:
http://queues.webkit.org/results/16418649
WebKit Review Bot
Comment 8
2013-02-08 06:17:09 PST
Comment on
attachment 187299
[details]
Patch 2
Attachment 187299
[details]
did not pass cr-linux-debug-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/16432666
Build Bot
Comment 9
2013-02-08 06:29:25 PST
Comment on
attachment 187299
[details]
Patch 2
Attachment 187299
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://queues.webkit.org/results/16445707
Build Bot
Comment 10
2013-02-08 07:19:39 PST
Comment on
attachment 187299
[details]
Patch 2
Attachment 187299
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/16415765
Alexander Shalamov
Comment 11
2013-02-11 05:17:43 PST
Created
attachment 187550
[details]
Patch 3 fix for linking issue
Alexander Shalamov
Comment 12
2013-04-12 04:44:12 PDT
Created
attachment 197744
[details]
Patch 4 rebased to master
Simon Fraser (smfr)
Comment 13
2013-04-12 09:15:01 PDT
Comment on
attachment 197744
[details]
Patch 4 View in context:
https://bugs.webkit.org/attachment.cgi?id=197744&action=review
> LayoutTests/animations/keyframe-rule-negative-selector-percentage.html:6 > + -100% {
What about comma-separate keyframe selectors, like 10%, -20%? Please test those.
Alexander Shalamov
Comment 14
2013-04-16 06:27:47 PDT
Created
attachment 198324
[details]
Patch 5 Added comma separated keyframe selectors to layout test.
Dean Jackson
Comment 15
2013-04-18 22:18:44 PDT
Comment on
attachment 198324
[details]
Patch 5 View in context:
https://bugs.webkit.org/attachment.cgi?id=198324&action=review
Nearly there! You might want to test -0% as well.
> Source/WebCore/ChangeLog:7 > + Keyframe rule should be ignored if keyframe selector has invalid value > +
https://bugs.webkit.org/show_bug.cgi?id=109271
> + > + Reviewed by NOBODY (OOPS!). > +
Please outline what you changed. You updated the CSS grammar - it's important to describe why you did that.
> Source/WebCore/ChangeLog:26 > + * css/CSSGrammar.y.in: > + * css/CSSParser.cpp: > + (WebCore::CSSParser::createKeyframesRule): > + (WebCore::CSSParser::updateSpecifiers): > + * css/StyleResolver.cpp: > + (WebCore::StyleResolver::keyframeStylesForAnimation): > + * css/WebKitCSSKeyframeRule.cpp: > + (WebCore::StyleKeyframe::keyText): > + (WebCore): > + (WebCore::StyleKeyframe::setKeyText): > + (WebCore::StyleKeyframe::setKeys): > + (WebCore::StyleKeyframe::parseKeyString): > + (WebCore::StyleKeyframe::reportMemoryUsage): > + * css/WebKitCSSKeyframeRule.h: > + (StyleKeyframe): > + (WebCore::StyleKeyframe::isValid): > + (WebCore::StyleKeyframe::getKeys):
And provide some details here too.
> Source/WebCore/css/CSSParser.cpp:11351 > + if (keyframe->isValid()) { > + rule->parserAppendKeyframe(keyframe); > + continue; > + } > + return 0;
You should do this the other way around. if (!keyframe->isValid()) return 0; rule->parserAppendKeyframe(keyframe);
> Source/WebCore/css/CSSParser.cpp:11630 > + if (value && value->unit == CSSPrimitiveValue::CSS_NUMBER) { > + keyframeKeys.append(static_cast<float>(value->fValue / 100)); > + continue; > + } > + keyframeKeys.clear(); > + break;
Same here. Early break/return in the invalid case.
Brent Fulgham
Comment 16
2022-07-13 14:04:01 PDT
I believe keyframe animation works properly now. Could you REOPEN if you believe a specific case is still not handled properly?
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