WebCore:
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Mar 2008 19:45:21 +0000 (19:45 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Mar 2008 19:45:21 +0000 (19:45 +0000)
commitb58bee140e2d512255b56ab78ce74a489b1a821f
tree6b644ad9a0cb26ffd36399cb9b1107a928faeb97
parentcce3164a2af366ebaba3849a4f23be4050405023
WebCore:

        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: https://svn.webkit.org/repository/webkit/trunk@30715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css/insertRule-font-face-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/insertRule-font-face.html [new file with mode: 0644]
LayoutTests/fast/css/insertRule-media-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/insertRule-media.html [new file with mode: 0644]
LayoutTests/fast/css/resources/insertRule-font-face.js [new file with mode: 0644]
LayoutTests/fast/css/resources/insertRule-media.js [new file with mode: 0644]
WebCore/ChangeLog
WebCore/css/CSSGrammar.y