Bug 77608 - Remove Element::ensureShadowRoot
Summary: Remove Element::ensureShadowRoot
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Shinya Kawanaka
URL:
Keywords:
Depends on: 75930 77612 77929 77930 77932 77936 90938
Blocks: 77603 85263
  Show dependency treegraph
 
Reported: 2012-02-01 23:21 PST by Shinya Kawanaka
Modified: 2012-08-08 01:13 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.68 KB, patch)
2012-08-07 21:01 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.