[Webkit-unassigned] [Bug 88148] REGRESSION(r118098): <content> element does not render distributed children when cloned from another document

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jun 2 09:26:42 PDT 2012


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





--- Comment #4 from Dominic Cooney <dominicc at chromium.org>  2012-06-02 09:26:42 PST ---
(In reply to comment #3)
> I see. The decision is made at the creation time and is permanent. So even if the object is moved from one  document to another, its nature stays the same. Hmm... This seems deficient.

Ah… maybe a less intrusive workaround than using an iframe, since you are cloning the node anyway and then adopting it, is to use importNode. This will create a new node in the new document.

adoptNode can return a new node, but it doesn’t. So it could be special-cased for elements of "context enabled features." It feels a bit sad to layer all this complexity in here – although <content> specifically is a presentation feature, so relying on having a window is arguably OK, you can certainly observe whether you got HTMLContentElement or HTMLUnknownElement from script.

One question I still need clarified – what is the intended "context"? Per window? Origin? (Morita-san?)

> BTW, this is not just about wrappers. The code that breaks us is the one generated for HTMLElementFactory.cpp, which is used by the parser.

Good point.

> > A temporary workaround for the Web Components polyfill would be to create a document in a same-origin iframe.
> 
> Yep, that's what I'll do in the meantime.

Maybe importNode is your friend. <http://jsfiddle.net/QWt5j/>

-- 
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