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

Unified Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2775003003: Move Node::lengthOfContents into Range, its only user. (Closed)
Patch Set: const. Created 3 years, 9 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 | « third_party/WebKit/Source/core/dom/Node.h ('k') | third_party/WebKit/Source/core/dom/Range.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index 9e1e08e42a39a3c8586e233f4bbf9da0a943e588..9bc67deca1d0043cec06f3f1919348d9b26a045f 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -2493,27 +2493,6 @@ DEFINE_TRACE_WRAPPERS(Node) {
EventTarget::traceWrappers(visitor);
}
-unsigned Node::lengthOfContents() const {
- // This switch statement must be consistent with that of
- // Range::processContentsBetweenOffsets.
- switch (getNodeType()) {
- case Node::kTextNode:
- case Node::kCdataSectionNode:
- case Node::kCommentNode:
- case Node::kProcessingInstructionNode:
- return toCharacterData(this)->length();
- case Node::kElementNode:
- case Node::kDocumentNode:
- case Node::kDocumentFragmentNode:
- return toContainerNode(this)->countChildren();
- case Node::kAttributeNode:
- case Node::kDocumentTypeNode:
- return 0;
- }
- NOTREACHED();
- return 0;
-}
-
} // namespace blink
#ifndef NDEBUG
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | third_party/WebKit/Source/core/dom/Range.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698