Re: Mutation events replacement

On Wed, Jul 20, 2011 at 9:32 AM, Dave Raggett <> wrote:
> Isn't there a cheap way to distinguish changes to the DOM (setAttribute)
> from indirect changes to how CSSMutableStyleDeclaration is formatted to
> text?   It sounds as if you already have a setter function that knows how to
> update the CSSMutableStyleDeclaration from a string, so I would have thought
> that this is easy to deal with, right?

Yes.  The real issue isn't that modifying style attribute as string is
expensive (of course it is expensive) but the problem is that the fact our
internal representation of style attribute isn't string so that whenever
style attribute is changed, we'd have to
serialize CSSMutableStyleDeclaration.

I'm not sure how much of cost that is in practice because style attribute
tends to be short in many cases but this feature cannot be turned on by
default as it becomes a significant performance burden on UA for all other
use cases.

Maybe we can treat style attribute differently and tell which property was

- Ryosuke

Received on Wednesday, 20 July 2011 16:41:12 UTC