Re: [cssom] unrecognized rules and properties

On 12/7/09 2:40 PM, Mike Wilson wrote:
> My naive solution would be
> to keep the unrecognized properties in their own
> area, but still connected to the owner rule, as the
> only access pattern is coming from user script and
> not from browser internal code. From a quick look at
> the Mozilla codebase I would think that a simple
> key-value store added to the nsCSSDeclaration class
> would do the trick, in addition to the compiled
> properties carried by this class. Then augmenting
> nsCSSDeclaration::ToString() [for cssText
> serialization] and other methods with code for this
> new member would be straight-forward.

Sort of.  mOrder and everything using it would need changing, as would 
the parser (of course; I don't know off the top of my head how simple 
the parser changes would be).

> I realize I might be missing heaps of details here,
> but are you really saying that you would have to
> rework large parts of this code to accomodate this
> data?

I think more would need to be reworked than seems like at first glance. 
  I haven't gone through and checked the precise boundaries of what 
needs to be reworked...

> Anyway, enough said about that. Switching back to the
> more theoretical subject, I'd be very interested in
> hearing your (and any other browser implementor's)
> view about the use case I mentioned; being able to
> implement new standards through script in old
> browsers?

It seems like a somewhat useful use case, in fact, which which is why I 
was thinking about how much work this would be to do in Gecko.

-Boris

Received on Tuesday, 8 December 2009 04:31:18 UTC