Bug 77925 - Introduces Element::youngestShadowRoot() and Element::oldestShadowRoot()
Summary: Introduces Element::youngestShadowRoot() and Element::oldestShadowRoot()
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-06 18:47 PST by Shinya Kawanaka
Modified: 2012-02-08 21:38 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shinya Kawanaka 2012-02-06 18:47:43 PST
Instead of shadowRoot(), we should implement youngestShadowRoot() and oldestShadowRoot().
youngestShadowRoot() will be used in renderer, and oldestShadowRoot() will be used in elements.
Comment 1 Dominic Cooney 2012-02-06 19:49:24 PST
I think shadow roots should be a doubly linked list. new ShadowRoot() pushes on the front of the list. Tree flattening iterator uses the back pointer to get from the last child of a SR to the next sibling of the <shadow> element that output it.

Do we need oldestShadowRoot? Could callers just walk the list of roots themselves. I feel like this is builtInShadowRoot with a different name.
Comment 2 Shinya Kawanaka 2012-02-06 23:04:45 PST
(In reply to comment #1)
> I think shadow roots should be a doubly linked list. new ShadowRoot() pushes on the front of the list. Tree flattening iterator uses the back pointer to get from the last child of a SR to the next sibling of the <shadow> element that output it.
> 
> Do we need oldestShadowRoot? Could callers just walk the list of roots themselves. I feel like this is builtInShadowRoot with a different name.

Yeah, it's almost the same as builtinShadowRoot().
I and morrita discussed it. We concluded that it would be better to have it instead of having a reference for now, because it's too error-prone. Of course we can remove oldestShadowRoot later...
Comment 3 Shinya Kawanaka 2012-02-08 21:38:55 PST
Since we will introduce ShadowRootList in Bug 78069, I make this INVALID.