Re: [cssom] getComputedStyle and elements outside the tree

On Mon, Apr 19, 2010 at 8:26 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> Gecko's behavior for win.getComputedStyle(elt) is to take the element elt
> and compute its style based on the styles of the current document of window
> |win|.  This means that selector matching will be performed based on the DOM
> (fragment) the element is in, but using the list of rules from window |win|.
>  This applies to not only document rules but UA rules too (so if the
> document in |win| is in quirks mode, quirks rules will be applied to the
> element).
>

A number of Google teams have come to us with bugs of their pages working in
Gecko, but not WebKit due to this issue. In practice, it's not too hard to
work around, so changing WebKit hasn't been a high priority, but it's pretty
clear (anecdotally anyways) that developers expect the Gecko behavior.

Ojan

Received on Saturday, 1 May 2010 16:04:32 UTC