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

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

Issue 237583016: Remove some dead code in dom/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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/Position.h ('k') | Source/core/dom/Range.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Position.cpp
diff --git a/Source/core/dom/Position.cpp b/Source/core/dom/Position.cpp
index 2bdca345bcd35b71212f7de66cb6dc3262769838..f180639030f1a045ad5f56c929419b91681c4518 100644
--- a/Source/core/dom/Position.cpp
+++ b/Source/core/dom/Position.cpp
@@ -504,34 +504,6 @@ Position Position::previousCharacterPosition(EAffinity affinity) const
return *this;
}
-// return first following position rendered at a different location, or "this"
-Position Position::nextCharacterPosition(EAffinity affinity) const
-{
- if (isNull())
- return Position();
-
- Node* fromRootEditableElement = deprecatedNode()->rootEditableElement();
-
- bool atEndOfLine = isEndOfLine(VisiblePosition(*this, affinity));
- bool rendered = isCandidate();
-
- Position currentPos = *this;
- while (!currentPos.atEndOfTree()) {
- currentPos = currentPos.next();
-
- if (currentPos.deprecatedNode()->rootEditableElement() != fromRootEditableElement)
- return *this;
-
- if (atEndOfLine || !rendered) {
- if (currentPos.isCandidate())
- return currentPos;
- } else if (rendersInDifferentPosition(currentPos))
- return currentPos;
- }
-
- return *this;
-}
-
// Whether or not [node, 0] and [node, lastOffsetForEditing(node)] are their own VisiblePositions.
// If true, adjacent candidates are visually distinct.
// FIXME: Disregard nodes with renderers that have no height, as we do in isCandidate.
« no previous file with comments | « Source/core/dom/Position.h ('k') | Source/core/dom/Range.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698