<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Implement iterator for traversing composed DOM"
href="https://bugs.webkit.org/show_bug.cgi?id=149997#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Implement iterator for traversing composed DOM"
href="https://bugs.webkit.org/show_bug.cgi?id=149997">bug 149997</a>
from <span class="vcard"><a class="email" href="mailto:koivisto@iki.fi" title="Antti Koivisto <koivisto@iki.fi>"> <span class="fn">Antti Koivisto</span></a>
</span></b>
<pre><span class="quote">> Walking up the tree each time seems unnecessary / inefficient
> since we may never get out of the current shadow DOM.</span >
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.
<span class="quote">> It's probably better to figure out the counting shadow root instead
> since node->treeScope->root() will just get you that in O(1).</span >
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.
<span class="quote">> It looks like this function isn't used anywhere. Why don't we add it when
> we need it?</span >
For future use. I plan to add some tests that dump the composed tree.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>