Bug 52558

Summary: ShadowElement::m_shadowParent should be removed
Product: WebKit Reporter: Hajime Morrita <morrita>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, dominicc, rolandsteiner
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on: 48698    
Bug Blocks:    
Attachments:
Description Flags
Patch eric: review+

Description Hajime Morrita 2011-01-17 00:42:34 PST
ShadowElement::m_shadowParent is used by anyone and there is Node::shadowParent().
Currently m_shadowParent is served for some lifecycle trick, but we shouldn't need that.
Comment 1 Hajime Morrita 2011-01-19 23:32:26 PST
Created attachment 79556 [details]
Patch
Comment 2 Hajime Morrita 2011-01-19 23:33:09 PST
Hi Dimitri, could you take a look? I just removed an unused variable. Tests passed.
Comment 3 Eric Seidel (no email) 2011-01-20 02:26:45 PST
Comment on attachment 79556 [details]
Patch

OK.  Do we need to ref the parent?  That's the only side-effect of this change I can see.
Comment 4 Hajime Morrita 2011-01-20 04:02:12 PST
Hi Eric, thank you for taking a look!
I'll land this soon.

(In reply to comment #3)
> (From update of attachment 79556 [details])
> OK.  Do we need to ref the parent?  That's the only side-effect of this change I can see.
No, the shadow root belongs the host(parent), and the host has normal lifecycle as usual DOM node.
Comment 5 Hajime Morrita 2011-01-20 04:08:27 PST
Committed r76221: <http://trac.webkit.org/changeset/76221>
Comment 6 Dimitri Glazkov (Google) 2011-01-22 09:54:07 PST
For what it's worth, we should remove ShadowElement entirely. Its purpose is very limited already, and it'll become completely useless once we convert all elements that rely on it to new shadow DOM.
Comment 7 Hajime Morrita 2011-01-23 23:32:22 PST
(In reply to comment #6)
> For what it's worth, we should remove ShadowElement entirely. Its purpose is very limited already, and it'll become completely useless once we convert all elements that rely on it to new shadow DOM.
Yes. I think we should do it after shadow migration is finished.