Bug 59012

Summary: Shadows should be imported along with their host nodes
Product: WebKit Reporter: Dominic Cooney <dominicc>
Component: DOMAssignee: Roland Steiner <rolandsteiner>
Severity: Normal CC: commit-queue, rolandsteiner, tkent
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 52962, 61909    
Description Flags
Patch none

Description Dominic Cooney 2011-04-20 11:43:39 PDT
Document::importedNode doesn’t import new-style shadows. This means that as nodes are imported, they lose their shadows.
Comment 1 Dominic Cooney 2011-04-20 11:44:11 PDT
Comment 2 Roland Steiner 2011-04-20 19:30:18 PDT
Created attachment 90478 [details]
Comment 3 Kent Tamura 2011-04-20 19:33:41 PDT
Comment on attachment 90478 [details]

Looks good
Comment 4 Kent Tamura 2011-04-20 19:51:36 PDT
BTW, what about Node::cloneNode()?
Comment 5 Roland Steiner 2011-04-21 09:59:09 PDT
(In reply to comment #4)
> BTW, what about Node::cloneNode()?

Both importNode() and cloneNode() call copyNonAttributeProperties for nodes they clone, so both are handled by this patch.

But note that a direct call to cloneNode() and importNode() is currently forbidden. It the end it depends on the JS API we will have for shadowRoot, I think. If you can assign directly to element.shadowRoot, e.g.,

    myBoundElement.shadowRoot = myOtherBoundElement.shadowRoot.cloneNode()

then we will need to allow a direct call to cloneNode and importNode on a ShadowRoot.
Comment 6 WebKit Commit Bot 2011-04-21 11:32:31 PDT
Comment on attachment 90478 [details]

Clearing flags on attachment: 90478

Committed r84528: <http://trac.webkit.org/changeset/84528>
Comment 7 WebKit Commit Bot 2011-04-21 11:32:35 PDT
All reviewed patches have been landed.  Closing bug.