RESOLVED FIXED 49686
Converge means of querying a parent node into one way, which is Node::parentNode.
https://bugs.webkit.org/show_bug.cgi?id=49686
Summary Converge means of querying a parent node into one way, which is Node::parentN...
Dimitri Glazkov (Google)
Reported Wednesday, November 17, 2010 10:01:31 PM UTC
Converge means of querying a parent node into one way, which is Node::parentNode.
Attachments
Patch (54.13 KB, patch)
2010-11-17 14:04 PST, Dimitri Glazkov (Google)
no flags
Patch (62.38 KB, patch)
2010-11-17 16:01 PST, Dimitri Glazkov (Google)
no flags
Patch (1.38 KB, patch)
2010-11-17 16:45 PST, Dimitri Glazkov (Google)
no flags
Patch (5.45 KB, patch)
2010-11-29 12:04 PST, Dimitri Glazkov (Google)
darin: review+
Dimitri Glazkov (Google)
Comment 1 Wednesday, November 17, 2010 10:04:38 PM UTC
Early Warning System Bot
Comment 2 Wednesday, November 17, 2010 10:25:04 PM UTC
WebKit Review Bot
Comment 3 Wednesday, November 17, 2010 10:27:22 PM UTC
Darin Adler
Comment 4 Wednesday, November 17, 2010 10:52:58 PM UTC
Comment on attachment 74153 [details] Patch EWS says you missed some cases. I suggest landing most of the changes to call parentNode instead of parent first, and then land the patch that makes parent private separately along with the last few stragglers.
Darin Adler
Comment 5 Wednesday, November 17, 2010 10:53:17 PM UTC
Comment on attachment 74153 [details] Patch r=me as long as you don’t break the build
Dimitri Glazkov (Google)
Comment 6 Wednesday, November 17, 2010 10:54:42 PM UTC
(In reply to comment #4) > (From update of attachment 74153 [details]) > EWS says you missed some cases. I suggest landing most of the changes to call parentNode instead of parent first, and then land the patch that makes parent private separately along with the last few stragglers. Will do.
Dimitri Glazkov (Google)
Comment 7 Thursday, November 18, 2010 12:01:38 AM UTC
Dimitri Glazkov (Google)
Comment 8 Thursday, November 18, 2010 12:23:22 AM UTC
Comment on attachment 74171 [details] Patch parent to parentNode conversion landed as http://trac.webkit.org/changeset/72259.
Dimitri Glazkov (Google)
Comment 9 Thursday, November 18, 2010 12:45:34 AM UTC
Dimitri Glazkov (Google)
Comment 10 Thursday, November 18, 2010 12:47:34 AM UTC
Comment on attachment 74178 [details] Patch Letting the EWS bots cook it.
Adam Barth
Comment 11 Thursday, November 18, 2010 1:17:40 AM UTC
They can cook r+ patches now too. :)
Early Warning System Bot
Comment 12 Thursday, November 18, 2010 1:21:32 AM UTC
Darin Adler
Comment 13 Thursday, November 18, 2010 6:21:56 AM UTC
Comment on attachment 74178 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=74178&action=review review- because EWS says XSLTProcessorQt.cpp still has some calls to parent in it and ... > WebCore/dom/Node.h:658 > + ContainerNode* parent() const { return TreeShared<ContainerNode>::parent(); } A cleaner way of doing this is with a using declaration: using TreeShared<ContainerNode>::parent; That way you don’t introduce a new inline function, just change the visibility of the existing function. I think this also deserves a comment. It’s not clear why the function is private without a comment.
Dimitri Glazkov (Google)
Comment 14 Monday, November 29, 2010 8:04:31 PM UTC
Darin Adler
Comment 15 Monday, November 29, 2010 8:37:37 PM UTC
Comment on attachment 75050 [details] Patch 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.
Dimitri Glazkov (Google)
Comment 16 Monday, November 29, 2010 9:25:42 PM UTC
(In reply to comment #15) > (From update of attachment 75050 [details]) > 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. Thanks! Landing with an improved, paragraphed comment/decl.
Dimitri Glazkov (Google)
Comment 17 Monday, November 29, 2010 9:27:55 PM UTC
Note You need to log in before you can comment on or make changes to this bug.