W3C home > Mailing lists > Public > www-svg@w3.org > November 2003

Re: getComputedStyle / getOverrideStyle

From: Sigurd Lerstad <sigler@bredband.no>
Date: Thu, 6 Nov 2003 21:07:49 +0100
Message-ID: <039001c3a4a1$a79efbd0$5c1273d5@mmstudio>
To: "Boris Zbarsky" <bzbarsky@MIT.EDU>
Cc: <www-svg@w3.org>, <www-style@w3.org>

>
> > I know that getComputedStyle always includes all the computed properties
of
> > the element, but if getComputedStyle also contains the result of the
> > animated properties, what's the point of getOverrideStyle?
>
> The point (such as it is) is that getOverrideStyle is _writable_ and
allows you
> to effectively set inline style even if the document language does not
support
> such a concept.  Computed style is readonly.

Yes, but in this case, animations setting animated properties into
getOverrideStyle (as specified in the SVG spec), it's the UA itself that
does that, and the UA of course also has write-permission into
getComputedStyle

> Are there any UAs which actually implement getOverrideStyle?  None of the
> browsers do, but do any of the SVG implementations?
>

I'm trying to implement it in my LXViewer, and that's why I need to know how
it works. Are you saying that writing into getOverrideStyle (by UA itself or
a user), that also changes the values that are in getComputedStyle?
If that's true, I can see how that works now, For a given element, the UA
computes the computed properties based on stylesheets etc. and then looks at
the override style on the element to see if there are any properties there,
and then "overrides" the computed style with those.

Is that how it works?

thanks,

--
Sigurd Lerstad
Received on Thursday, 6 November 2003 15:04:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 5 November 2012 23:52:55 GMT