Summary: | Cloning elements with shadow DOM does redundant element creation | ||
---|---|---|---|
Product: | WebKit | Reporter: | Dominic Cooney <dominicc> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | morrita, tkent |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 61983 |
Description
Dominic Cooney
2011-06-03 00:53:42 PDT
So, reverting http://trac.webkit.org/changeset/84528/trunk/Source/WebCore/dom/Element.cpp will solve everything? I meant reverting http://trac.webkit.org/changeset/84528 . Reverting 84528 will ensure that there is no redundant element creation. However it does not ensure that cloned elements end up with valid shadow trees. (For example, <keygen> has no hook to clone its shadow.) I think we need a general solution where elements with shadow roots get notified when they are cloned, so that they can participate in the clone. For elements like <input type="…"> where setting the type attribute will create a shadow tree anyway, it can just assert that the shadow tree was created. For elements like keygen, it can create the clone shadow tree at that point. (In reply to comment #3) Keygen build the shadow tree in the constructor. Cloning a keygen needs nothing else, right? Yes, you’re right, keygen would work if r84528 was reverted. Maybe we should revert it… Is this valid yet? |