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

Unified Diff: Source/core/editing/htmlediting.cpp

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/editing/VisibleUnits.cpp ('k') | Source/core/editing/markup.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/htmlediting.cpp
diff --git a/Source/core/editing/htmlediting.cpp b/Source/core/editing/htmlediting.cpp
index 501df6febcd320b6f8363059268641f98228ecdf..da02a2d7b22c7a1d81a582df5c8a366d42d4ec57 100644
--- a/Source/core/editing/htmlediting.cpp
+++ b/Source/core/editing/htmlediting.cpp
@@ -65,7 +65,7 @@ using namespace HTMLNames;
// purposes of editing.
bool isAtomicNode(const Node *node)
{
- return node && (!node->hasChildNodes() || editingIgnoresContent(node));
+ return node && (!node->hasChildren() || editingIgnoresContent(node));
}
// Compare two positions, taking into account the possibility that one or both
@@ -348,8 +348,8 @@ int lastOffsetForEditing(const Node* node)
if (node->offsetInCharacters())
return node->maxCharacterOffset();
- if (node->hasChildNodes())
- return node->childNodeCount();
+ if (node->hasChildren())
+ return node->countChildren();
// NOTE: This should preempt the childNodeCount for, e.g., select nodes
if (editingIgnoresContent(node))
@@ -503,7 +503,7 @@ Node* isLastPositionBeforeTable(const VisiblePosition& visiblePosition)
VisiblePosition visiblePositionBeforeNode(Node* node)
{
ASSERT(node);
- if (node->hasChildNodes())
+ if (node->hasChildren())
return VisiblePosition(firstPositionInOrBeforeNode(node), DOWNSTREAM);
ASSERT(node->parentNode());
ASSERT(!node->parentNode()->isShadowRoot());
@@ -514,7 +514,7 @@ VisiblePosition visiblePositionBeforeNode(Node* node)
VisiblePosition visiblePositionAfterNode(Node* node)
{
ASSERT(node);
- if (node->hasChildNodes())
+ if (node->hasChildren())
return VisiblePosition(lastPositionInOrAfterNode(node), DOWNSTREAM);
ASSERT(node->parentNode());
ASSERT(!node->parentNode()->isShadowRoot());
« no previous file with comments | « Source/core/editing/VisibleUnits.cpp ('k') | Source/core/editing/markup.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698