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

Unified Diff: Source/core/editing/ReplaceSelectionCommand.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/MarkupAccumulator.cpp ('k') | Source/core/editing/TextIterator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/ReplaceSelectionCommand.cpp
diff --git a/Source/core/editing/ReplaceSelectionCommand.cpp b/Source/core/editing/ReplaceSelectionCommand.cpp
index 2e6bce9dd0bf875e3f6b2830e089b9bcd33d83aa..65d9392602e7a5c54968b30417678ec70b42dfed 100644
--- a/Source/core/editing/ReplaceSelectionCommand.cpp
+++ b/Source/core/editing/ReplaceSelectionCommand.cpp
@@ -295,7 +295,7 @@ void ReplacementFragment::removeInterchangeNodes(Node* container)
}
node = node->firstChild();
}
- if (!container->hasChildNodes())
+ if (!container->hasChildren())
return;
// Interchange newlines at the "end" of the incoming fragment must be
// either the last node in the fragment or the last leaf in the fragment.
@@ -1417,7 +1417,7 @@ Node* ReplaceSelectionCommand::insertAsListItems(PassRefPtr<HTMLElement> prpList
{
RefPtr<HTMLElement> listElement = prpListElement;
- while (listElement->hasChildNodes() && isListElement(listElement->firstChild()) && listElement->hasOneChild())
+ while (listElement->hasChildren() && isListElement(listElement->firstChild()) && listElement->hasOneChild())
listElement = toHTMLElement(listElement->firstChild());
bool isStart = isStartOfParagraph(insertPos);
« no previous file with comments | « Source/core/editing/MarkupAccumulator.cpp ('k') | Source/core/editing/TextIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698