Summary: | Sign in front of keyframe selector causes the subsequent ruleset to be ignored | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||||||
Component: | CSS | Assignee: | Glenn Adams <glenn> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | cmarcelo, dino, glenn, koivisto, macpherson, menard, seikwon.kim, simon.fraser, tasak, webkit.review.bot, zherczeg | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 93414 | ||||||||||||
Attachments: |
|
Description
Simon Fraser (smfr)
2012-09-14 17:28:56 PDT
Created attachment 164254 [details]
Testcase
Looks like dashes are only handled in NthChildMode. Maybe we need a mode for keyframe selectors. According to the spec: http://dev.w3.org/csswg/css3-animations/#keyframes, "If a keyframe selector specifies negative percentage values or values higher than 100%, then the keyframe will be ignored." So I think, the attached TestCase does not work. Best regards, Takashi Sakamoto (In reply to comment #0) > A keyframes rule like: > > @-webkit-keyframes fade { > -10% { background-color: blue; } > 100% { background-color: green; } > } > > will cause stylesheet parsing to abort. > > I don't understand why, since the 'key' production is using PERCENTAGE, which is a <number>, which should accept signs. > > I think this is a problem in the lexer code. (In reply to comment #3) > According to the spec: http://dev.w3.org/csswg/css3-animations/#keyframes, > "If a keyframe selector specifies negative percentage values or values higher than 100%, then the keyframe will be ignored." That's not the point. A minus sign in front of the keyframe selector causes the entire rest of the stylesheet to be ignored. That's obviously wrong. Created attachment 166351 [details]
Better test case.
This test case shows that it is the next (ruleset) statement that is being skipped, and not the entire remaining stylesheet.
Created attachment 166375 [details]
Patch
Comment on attachment 166375 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166375&action=review > Source/WebCore/ChangeLog:8 > + Upon encountering negative percentage, ignore only subsequent block. I don't think we should ignore the block at the parsing level. This is totally valid CSS; we just need to handle keyframes outside of 0-100% in the code. Created attachment 166381 [details]
Patch
Comment on attachment 166381 [details] Patch address comment #7 Comment on attachment 166381 [details] Patch Clearing flags on attachment: 166381 Committed r130007: <http://trac.webkit.org/changeset/130007> All reviewed patches have been landed. Closing bug. |