Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(763)

Unified Diff: Source/core/dom/ParentNode.h

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/ParentNode.h
diff --git a/Source/core/dom/ParentNode.h b/Source/core/dom/ParentNode.h
index 45f146c0e8581b68958d572121397ba8421c0248..dda6a8afb7da6170f1c740b3dee34ec320dee0ef 100644
--- a/Source/core/dom/ParentNode.h
+++ b/Source/core/dom/ParentNode.h
@@ -38,28 +38,25 @@ namespace WebCore {
class ParentNode {
public:
- static PassRefPtr<HTMLCollection> children(ContainerNode* node)
+ static PassRefPtr<HTMLCollection> children(ContainerNode& node)
{
- return node->children();
+ return node.children();
}
- static Element* firstElementChild(ContainerNode* node)
+ static Element* firstElementChild(ContainerNode& node)
{
- ASSERT(node);
- return ElementTraversal::firstWithin(*node);
+ return ElementTraversal::firstWithin(node);
}
- static Element* lastElementChild(ContainerNode* node)
+ static Element* lastElementChild(ContainerNode& node)
{
- ASSERT(node);
- return ElementTraversal::lastWithin(*node);
+ return ElementTraversal::lastWithin(node);
}
- static unsigned childElementCount(ContainerNode* node)
+ static unsigned childElementCount(ContainerNode& node)
{
- ASSERT(node);
unsigned count = 0;
- for (Element* child = ElementTraversal::firstWithin(*node); child; child = ElementTraversal::nextSibling(*child))
+ for (Element* child = ElementTraversal::firstWithin(node); child; child = ElementTraversal::nextSibling(*child))
++count;
return count;
}

Powered by Google App Engine
This is Rietveld 408576698