Bug 77608

Summary: Remove Element::ensureShadowRoot
Product: WebKit Reporter: Shinya Kawanaka <shinyak>
Component: DOMAssignee: Shinya Kawanaka <shinyak>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 75930, 77612, 77929, 77930, 77932, 77936, 90938    
Bug Blocks: 77603, 85263    
Attachments:
Description Flags
Patch none

Description Shinya Kawanaka 2012-02-01 23:21:10 PST
We often use ensureShadowRoot, but most of them are not necessary, because a shadow root is created in Something::create method.
If we can remove it, the code can be much clearer when supporting multiple shadow trees.
Comment 1 Shinya Kawanaka 2012-02-06 19:44:06 PST
ensureShadowRoot makes the life cycle of shadow root confusing.
Most of shadow roots are created near the constructor, so let's remove it to make the life cycle of shadow root understanding.
Comment 2 Shinya Kawanaka 2012-02-06 19:52:00 PST
Let me mention that INPUT and MEDIA may create their shadow root in the non-constructor phase.
So when adding shadow root to these elements, we should be careful.
Comment 3 Shinya Kawanaka 2012-02-06 20:03:57 PST
SVG and ValidationMessage also create shadow root in non-constructor phase...
Comment 4 Shinya Kawanaka 2012-07-10 21:22:33 PDT
To support Shadow DOM for all the elements, this should be fixed immediately...
Comment 5 Shinya Kawanaka 2012-08-07 21:01:39 PDT
Created attachment 157101 [details]
Patch
Comment 6 Ryosuke Niwa 2012-08-07 23:05:20 PDT
Comment on attachment 157101 [details]
Patch

Yay! Less code.
Comment 7 WebKit Review Bot 2012-08-08 01:13:27 PDT
Comment on attachment 157101 [details]
Patch

Clearing flags on attachment: 157101

Committed r125007: <http://trac.webkit.org/changeset/125007>
Comment 8 WebKit Review Bot 2012-08-08 01:13:31 PDT
All reviewed patches have been landed.  Closing bug.