Summary: | Remove branch from DescendantIteratorAdapter::begin() when invoking for ContainerNode | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antti Koivisto <koivisto> | ||||||
Component: | DOM | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, esprehn+autocc, kangil.han, kling | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Antti Koivisto
2013-08-27 06:34:32 PDT
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
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. |