Bug 77608 - Remove Element::ensureShadowRoot
: Remove Element::ensureShadowRoot
Status: RESOLVED FIXED
: WebKit
HTML DOM
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
:
: 75930 77612 77929 77930 77932 77936 90938
: 77603 85263
  Show dependency treegraph
 
Reported: 2012-02-01 23:21 PST by
Modified: 2012-08-08 01:13 PST (History)


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


Note

You need to log in before you can comment on or make changes to this bug.


Description From 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 From 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 From 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 From 2012-02-06 20:03:57 PST -------
SVG and ValidationMessage also create shadow root in non-constructor phase...
------- Comment #4 From 2012-07-10 21:22:33 PST -------
To support Shadow DOM for all the elements, this should be fixed immediately...
------- Comment #5 From 2012-08-07 21:01:39 PST -------
Created an attachment (id=157101) [details]
Patch
------- Comment #6 From 2012-08-07 23:05:20 PST -------
(From update of attachment 157101 [details])
Yay! Less code.
------- Comment #7 From 2012-08-08 01:13:27 PST -------
(From update of attachment 157101 [details])
Clearing flags on attachment: 157101

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