-
ddkilzer@apple.com authored
Dynamically inserting CSS rule with @media query fails with DOM Exception 12 <http://bugs.webkit.org/show_bug.cgi?id=15986> Reviewed by Darin. Allow any valid rule (@font-face, @import, @media, @page or style) to be parsed when using CSSStyleSheet.insertRule(). Previously only import and style rules were allowed. Note that @page rules always throw an exception because they're not implemented yet, so no test case was added for them. Tests: fast/css/insertRule-font-face.html fast/css/insertRule-media.html * css/CSSGrammar.y: Extracted 'valid_rule' out of 'rule'. Renamed 'ruleset_or_import' to 'valid_rule_or_import' and changed its definition. LayoutTests: Dynamically inserting CSS rule with @media query fails with DOM Exception 12 <http://bugs.webkit.org/show_bug.cgi?id=15986> Reviewed by Darin. * fast/css/insertRule-font-face.html: Added. * fast/css/insertRule-media.html: Added. * fast/css/resources/insertRule-font-face.js: Added. * fast/css/resources/insertRule-media.js: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
a75202e1