<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>22769</bug_id>
          
          <creation_ts>2013-07-23 10:21:08 +0000</creation_ts>
          <short_desc>insertRule() should parse generic qualified rules / at-rules further</short_desc>
          <delta_ts>2013-08-26 14:29:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>CSSOM</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Sapin">simon.sapin</reporter>
          <assigned_to name="Simon Pieters">zcorpan</assigned_to>
          <cc>zcorpan</cc>
          
          <qa_contact>public-css-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>91124</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Sapin">simon.sapin</who>
    <bug_when>2013-07-23 10:21:08 +0000</bug_when>
    <thetext>The CSSStyleSheet and CSSGroupingRule interfaces both have a insertRule() method that refers (indirectly) to the &quot;Parse a rule&quot; algorithm of CSS Syntax.
The result of &quot;Parse a rule&quot; (when it’s not a syntax error) is a generic qualified rule or at-rule whose prelude and block can contain anything.

These concepts of generic rules exist for separation of concerns so that Syntax does not have to know about Selectors, every CSS at-rule, etc. For example, a valid qualified rule can be an invalid style rule if its prelude is an invalid list of selectors.

Perhaps I’m splitting hairs, but I think that CSSOM is missing a step where the results from Syntax are parsed further into specific rules, as defined in their respective specification. This can return a syntax error even if Syntax’s &quot;Parse a rule&quot; did not, in which case insertRule() should throw.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92573</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-08-26 14:29:02 +0000</bug_when>
    <thetext>https://dvcs.w3.org/hg/csswg/rev/b47ea7ac01c7</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>