[webkit-reviews] review granted: [Bug 49686] Converge means of querying a parent node into one way, which is Node::parentNode. : [Attachment 75050] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 29 12:37:37 PST 2010


Darin Adler <darin at apple.com> has granted Dimitri Glazkov (Google)
<dglazkov at chromium.org>'s request for review:
Bug 49686: Converge means of querying a parent node into one way, which is
Node::parentNode.
https://bugs.webkit.org/show_bug.cgi?id=49686

Attachment 75050: Patch
https://bugs.webkit.org/attachment.cgi?id=75050&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=75050&action=review

> WebCore/dom/Node.h:659
>      Element* ancestorElement() const;
> +    // Use Node::parentNode as the consistent way of querying a parent node.

> +    using TreeShared<ContainerNode>::parent;

I suggest paragraphing this comment and function separately rather than
grouping with ancestorElement.

This comment is slightly confusing. What it implies but does not say is that we
make the inherited parent function private to make sure we get a compile error
if we forget to follow that rule outside Node member functions. Many readers
might not be able to figure that out.


More information about the webkit-reviews mailing list