Skip to content
  • akling@apple.com's avatar
    CSS parser: Add error recovery while parsing @-webkit-keyframes key values. · afa57b4c
    akling@apple.com authored
    <http://webkit.org/b/115175>
    
    Source/WebCore:
    
    From Blink r148714 by <apavlov@chromium.org>:
    
    If not a percentage, "from", or "to" value is used in a key list, the rule is erroneous,
    and due to the absense of recovery, the parser skips the following, valid CSS rule.
    
    On a related note, keyframes, whose selectors contain invalid keys, should be discarded
    altogether, according to <http://www.w3.org/TR/css3-animations/#keyframes>
    
    Tests: animations/keyframes-invalid-keys.html
           fast/css/webkit-keyframes-errors.html
    
    * css/CSSGrammar.y.in:
    * css/CSSParser.cpp:
    (WebCore::CSSParser::rewriteSpecifiers):
    
    LayoutTests:
    
    From Blink r148714 by <apavlov@chromium.org>.
    
    * animations/keyframes-invalid-keys-expected.txt: Added.
    * animations/keyframes-invalid-keys.html: Added.
    * fast/css/webkit-keyframes-errors-expected.html: Added.
    * fast/css/webkit-keyframes-errors.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    afa57b4c