ACTION-545: Update CSSOM to throw SyntaxError on insertRule with above weirdness as argument

Hi,

I noticed that I have an old action in tracker [1]. It's about insertRule  
with invalid stuff.

http://lists.w3.org/Archives/Public/www-style/2013Feb/0229.html

As far as I can tell this is well defined in the CSSOM spec now.

Empty string:

http://dev.w3.org/csswg/css-syntax/#parse-a-rule0 step 2
"Otherwise, consume a qualified rule and let rule be the return value. If  
nothing was returned, return a syntax error."
...which then results in a SyntaxError in CSSOM.


Garbage after rule or more than one rule:

http://dev.w3.org/csswg/css-syntax/#parse-a-rule0 step 4
"If the next input token is an <EOF-token>, return rule. Otherwise, return  
a syntax error."
...which then results in a SyntaxError in CSSOM.


What the return value is:

http://dev.w3.org/csswg/cssom/#dom-cssgroupingrule-insertrule
It returns /index/.


[1] https://www.w3.org/Style/CSS/Tracker/actions/545

-- 
Simon Pieters
Opera Software

Received on Thursday, 11 September 2014 14:50:25 UTC