W3C home > Mailing lists > Public > www-style@w3.org > April 2011

Re: The Unwanted Effect of XBL Shadow DOM Elements on Layout

From: Dimitri Glazkov <dglazkov@google.com>
Date: Fri, 8 Apr 2011 09:29:42 -0700
Message-ID: <BANLkTimtYxbLb_spvLPxnMjcXig_A9j7UA@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style@w3.org" <www-style@w3.org>
On Thu, Apr 7, 2011 at 6:54 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 4/7/11 4:51 PM, Tab Atkins Jr. wrote:
>>
>> On Thu, Apr 7, 2011 at 2:09 PM, Boris Zbarsky<bzbarsky@mit.edu>  wrote:
>>>
>>> Does the shadow root have the bound element as the parent?
>>>
>>> If not, then this doesn't sound equivalent.
>>
>> Yes, for some definition of "parent".
>
> I'm talking about the .parentNode definition of "parent".

In WebKit today, shadow DOM subtree roots have a null parentNode.
Instead, there is a special accessor called shadowHost, which is what
you need to explicitly walk over of the boundary.

However, internally both are stored in the same field and there's a
flag that indicates the purpose of what's stored there:

http://codesearch.google.com/codesearch/p#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/dom/Node.h&l=723&exact_package=chromium

:DG<

>
> -Boris
>
>
>
Received on Friday, 8 April 2011 16:30:07 GMT

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