RESOLVED FIXED 54269
Convert ContainerNode::firstElementChild() to a free function.
https://bugs.webkit.org/show_bug.cgi?id=54269
Summary Convert ContainerNode::firstElementChild() to a free function.
Andy Estes
Reported 2011-02-10 20:56:54 PST
Convert ContainerNode::firstElementChild() to a free function.
Attachments
Patch (4.98 KB, patch)
2011-02-10 21:15 PST, Andy Estes
no flags
Andy Estes
Comment 1 2011-02-10 21:15:39 PST
Eric Seidel (no email)
Comment 2 2011-02-10 21:21:35 PST
Comment on attachment 82097 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=82097&action=review > Source/WebCore/dom/Element.cpp:1657 > + return WebCore::firstElementChild(this); We don't generally use WebCore:: > Source/WebCore/dom/Element.h:518 > +inline Element* firstElementChild(const ContainerNode* container) Shouldn't Element::firstElementChild() call this? Wow, this is also one of the rare cases where a const Node* might actually be correct! (Normally such a wrong since it makes little sense to have a const* to a RefCounted object.)
Andy Estes
Comment 3 2011-02-10 21:23:41 PST
Comment on attachment 82097 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=82097&action=review >> Source/WebCore/dom/Element.cpp:1657 >> + return WebCore::firstElementChild(this); > > We don't generally use WebCore:: I have to do that since the name in the class scope shadows the name in the namespace scope. I guess I could name the free function something else to avoid this. >> Source/WebCore/dom/Element.h:518 >> +inline Element* firstElementChild(const ContainerNode* container) > > Shouldn't Element::firstElementChild() call this? > > Wow, this is also one of the rare cases where a const Node* might actually be correct! (Normally such a wrong since it makes little sense to have a const* to a RefCounted object.) It does call it :)
Eric Seidel (no email)
Comment 4 2011-02-10 21:29:06 PST
Comment on attachment 82097 [details] Patch Andy, you're just so far ahead of me I can't even see you!
WebKit Commit Bot
Comment 5 2011-02-10 23:22:09 PST
Comment on attachment 82097 [details] Patch Clearing flags on attachment: 82097 Committed r78317: <http://trac.webkit.org/changeset/78317>
WebKit Commit Bot
Comment 6 2011-02-10 23:22:14 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.