<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Implement ComposedTreeIterator in terms of ElementAndTextDescendantIterator"
href="https://bugs.webkit.org/show_bug.cgi?id=154003">bug 154003</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #270878 Flags</td>
<td>review?
</td>
<td>review+
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Implement ComposedTreeIterator in terms of ElementAndTextDescendantIterator"
href="https://bugs.webkit.org/show_bug.cgi?id=154003#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Implement ComposedTreeIterator in terms of ElementAndTextDescendantIterator"
href="https://bugs.webkit.org/show_bug.cgi?id=154003">bug 154003</a>
from <span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=270878&action=diff" name="attach_270878" title="patch">attachment 270878</a> <a href="attachment.cgi?id=270878&action=edit" title="patch">[details]</a></span>
patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=270878&action=review">https://bugs.webkit.org/attachment.cgi?id=270878&action=review</a>
r=me assuming you find and fix the assertion failure (or maybe just a crash) that the mac-debug bot is showing.
<span class="quote">> Source/WebCore/dom/ComposedTreeIterator.h:161
> + Iterator()
> + : ComposedTreeIterator()
> + { }</span >
I think you can write:
Iterator() = default;
Which I think is better.
<span class="quote">> Source/WebCore/dom/ComposedTreeIterator.h:162
> Iterator(ContainerNode& root)</span >
explicit?
<span class="quote">> Source/WebCore/dom/ComposedTreeIterator.h:177
> + Iterator begin() { return Iterator(m_parent); }</span >
Since the constructor is not explicit, could just write:
return m_parent;
<span class="quote">> Source/WebCore/dom/ComposedTreeIterator.h:178
> + Iterator end() { return Iterator(); }</span >
I slightly prefer:
return { };
<span class="quote">> Source/WebCore/dom/ElementAndTextDescendantIterator.h:36
> +class ElementAndTextDescendantIterator {</span >
This class has a lot of code. Any way for it to share more with other classes?
<span class="quote">> Source/WebCore/dom/ElementAndTextDescendantIterator.h:38
> + ElementAndTextDescendantIterator();</span >
I prefer = default.
<span class="quote">> Source/WebCore/dom/ElementAndTextDescendantIterator.h:39
> + ElementAndTextDescendantIterator(ContainerNode& root);</span >
explicit?
<span class="quote">> Source/WebCore/dom/ElementAndTextDescendantIterator.h:52
> + bool operator!() const { return !m_current; }</span >
I normally expect an explicit operator bool any place I see an operator!
<span class="quote">> Source/WebCore/dom/ElementAndTextDescendantIterator.h:86
> + ElementAndTextDescendantIteratorAdapter(ContainerNode& root);</span >
explicit?
<span class="quote">> Source/WebCore/dom/ElementAndTextDescendantIterator.h:99
> + : m_current(nullptr)</span >
Why not initialize this in the class definition?</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>