Re: [CSSOM] CSSRule.NAMESPACE_RULE

On Mar 12, 2010, at 1:03 AM, Anne van Kesteren wrote:

> On Tue, 02 Mar 2010 21:54:06 +0100, Daniel Glazman <daniel.glazman@disruptive-innovations.com> wrote:
>> Le 02/03/10 14:37, Anne van Kesteren a écrit :
>>> I guess... And we expose @import in the same silly way too. Blurp. It is
>>> a mess.
>> 
>> You have a suggestion to expose @import differently? I'd love to
>> read that...
> 
> Well, in retrospect I think that various syntactic constructs such as namespaces and imports should have been exposed on the CSSStyleSheet object instead. E.g. all @import rules could just be CSSStyleSheet.importedStyleSheets which returns a StyleSheetList. It is too late now though.
> 
> Anyway, I have changed NAMESPACE_RULE to use constant 8 instead. Having said that, I noticed Firefox uses 0 currently. We could use that as well. (0 and 2 can be re-allocated.)

WebKit already uses 8 and 9 for animation keyframe-related rules:

        const unsigned short WEBKIT_KEYFRAMES_RULE = 8;
        const unsigned short WEBKIT_KEYFRAME_RULE = 9;

WebKit also has:
        const unsigned short UNKNOWN_RULE = 0;

We're playing a game of whack-a-mole here. We really need partition out numeric ranges somehow.

Simon

Received on Friday, 12 March 2010 18:01:50 UTC