W3C home > Mailing lists > Public > www-style@w3.org > May 2010

Re: [cssom] getComputedStyle and elements outside the tree

From: Ojan Vafai <ojan@chromium.org>
Date: Sat, 1 May 2010 09:03:41 -0700
Message-ID: <o2q78dc8441005010903ub6bfe211mfbd154bfb9c5be9a@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Anne van Kesteren <annevk@opera.com>, www-style@w3.org
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:27 GMT