[Webkit-unassigned] [Bug 76611] Refactoring: Reconsider the attach order of light children when a shadow tree exists.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 20 08:45:05 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=76611


MORITA Hajime <morrita at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #123284|review?                     |review-
               Flag|                            |




--- Comment #2 from MORITA Hajime <morrita at google.com>  2012-01-20 08:45:05 PST ---
(From update of attachment 123284)
View in context: https://bugs.webkit.org/attachment.cgi?id=123284&action=review

It looks this is rather complicated than we originally thought...

> Source/WebCore/ChangeLog:8
> +        Children of an element having a shadow root were to be attached in Element::attach(),

How about to say "Each child" instead of "Children"?

> Source/WebCore/ChangeLog:12
> +        a HTMLContentElement must detach them before attaching them.

a -> an

> Source/WebCore/ChangeLog:13
> +

The point here is that we've been attaching each light child twice when it has a parent with shadow root.

> Source/WebCore/ChangeLog:17
> +        No new tests, no change in behavior.

You mentioned above that this changes the behavior...

> Source/WebCore/dom/ShadowRoot.cpp:157
> +    Element* host = shadowHost();

We don't need the |host| local variable.

> Source/WebCore/html/shadow/HTMLContentElement.cpp:81
> +

Seeing this, now I start wondering whether this is correct or not.
What does happen if we remove HTMLContentElement from the shadow tree?
In that case, we will detach the selected nodes regardless that they are staying in the light DOM.
That looks wrong. But it's not clear what is the right thing to do here...

Apparently we need to do something here. But maybe it's not dettach(). But I'm not sure.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list