W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: Mutation events replacement

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Wed, 20 Jul 2011 09:40:13 -0700
Message-ID: <CABNRm62DO9BktG4sBgH6k4yi4hGU7bnknnLH2PkKhs_yY1L2+Q@mail.gmail.com>
To: Dave Raggett <dsr@w3.org>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, public-webapps@w3.org
On Wed, Jul 20, 2011 at 9:32 AM, Dave Raggett <dsr@w3.org> 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:22 UTC