[Bug 22769] New: insertRule() should parse generic qualified rules / at-rules further

https://www.w3.org/Bugs/Public/show_bug.cgi?id=22769

            Bug ID: 22769
           Summary: insertRule() should parse generic qualified rules /
                    at-rules further
    Classification: Unclassified
           Product: CSS
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: CSSOM
          Assignee: glenn@skynav.com
          Reporter: simon.sapin@exyr.org
        QA Contact: public-css-bugzilla@w3.org

The CSSStyleSheet and CSSGroupingRule interfaces both have a insertRule()
method that refers (indirectly) to the "Parse a rule" algorithm of CSS Syntax.
The result of "Parse a rule" (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
"Parse a rule" did not, in which case insertRule() should throw.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 23 July 2013 10:21:10 UTC