Re: [cssom] getComputedStyle and elements outside the tree

On Sat, 01 May 2010 18:03:41 +0200, Ojan Vafai <ojan@chromium.org> wrote:
> 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.

Thanks for this Ojan!

It should be possible for us (Opera) to change this as well so I have  
attempted to align the specification with Gecko. I would very much  
appreciate feedback.

http://dev.w3.org/csswg/cssom/#extensions-to-the-window-interface


(I hope the delay in between things is not much of an issue. Just ping me  
if something is needed faster.)


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Wednesday, 14 July 2010 12:25:19 UTC