Currently we have an unnecessary branch in begin().
Created attachment 209764 [details] patch
Comment on attachment 209764 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=209764&action=review r=me I guess. > Source/WebCore/dom/ContainerNode.h:150 > + bool isContainerNode() WTF_DELETED_FUNCTION; Does this do the right thing? Node::isContainerNode() is a const function.
Created attachment 209771 [details] Simpler patch
https://trac.webkit.org/r154682
Comment on attachment 209771 [details] Simpler patch View in context: https://bugs.webkit.org/attachment.cgi?id=209771&action=review > Source/WebCore/dom/DescendantIterator.h:41 > - DescendantIterator(const ContainerNode* root); > - DescendantIterator(const ContainerNode* root, ElementType* current); > + DescendantIterator(const Node* root); > + DescendantIterator(const Node* root, ElementType* current); Why is this a good change? I understand it’s only used for equality comparison, but are there really callers that need to use this with a Node*?
(In reply to comment #5) > Why is this a good change? I understand it’s only used for equality comparison, but are there really callers that need to use this with a Node*? Yeah, for now. But it is true that it might be better to just fix the call sites.