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

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

Issue 171773008: Rename childNodeCount() / childNode() methods for clarity (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Further renaming for consistency 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
« no previous file with comments | « Source/core/dom/Node.idl ('k') | Source/core/dom/Position.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Position.h
diff --git a/Source/core/dom/Position.h b/Source/core/dom/Position.h
index eea78f644ce9d277e6cbf2df36b2eb63eb7da14d..5f92fe5822c9d7e6f80ac315374ebf3015ced6e4 100644
--- a/Source/core/dom/Position.h
+++ b/Source/core/dom/Position.h
@@ -274,10 +274,10 @@ inline Position positionAfterNode(Node* anchorNode)
inline int lastOffsetInNode(Node* node)
{
- return node->offsetInCharacters() ? node->maxCharacterOffset() : static_cast<int>(node->childNodeCount());
+ return node->offsetInCharacters() ? node->maxCharacterOffset() : static_cast<int>(node->countChildren());
}
-// firstPositionInNode and lastPositionInNode return parent-anchored positions, lastPositionInNode construction is O(n) due to childNodeCount()
+// firstPositionInNode and lastPositionInNode return parent-anchored positions, lastPositionInNode construction is O(n) due to countChildren()
inline Position firstPositionInNode(Node* anchorNode)
{
if (anchorNode->isTextNode())
« no previous file with comments | « Source/core/dom/Node.idl ('k') | Source/core/dom/Position.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698