[Webkit-unassigned] [Bug 149997] Implement iterator for traversing composed DOM

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 12 13:17:15 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=149997

--- Comment #7 from Antti Koivisto <koivisto at iki.fi> ---
> Walking up the tree each time seems unnecessary / inefficient
> since we may never get out of the current shadow DOM.

Stack setup code is there mostly for completeness sake (that is, it allows starting from any node within any root). In normal use the stack build as you traverse.

> It's probably better to figure out the counting shadow root instead
> since node->treeScope->root() will just get you that in O(1).

Not sure what you mean. In general case there is no way to know if there is a trip to shadow tree between a node and its ancestor without walking the parent chain.

> It looks like this function isn't used anywhere.  Why don't we add it when
> we need it?

For future use. I plan to add some tests that dump the composed tree.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151012/263ebbb7/attachment.html>


More information about the webkit-unassigned mailing list