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

Unified Diff: Source/core/svg/SVGTextContentElement.cpp

Issue 1307803003: Introduce nextPositionOf() for VisiblePosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-28T18:13:02 Created 5 years, 4 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/layout/PendingSelection.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGTextContentElement.cpp
diff --git a/Source/core/svg/SVGTextContentElement.cpp b/Source/core/svg/SVGTextContentElement.cpp
index fb4420a70db01a1d478b87f52c0a0ede5b56abfe..85a3fd4323af107bbb2e6a8474852715af11059a 100644
--- a/Source/core/svg/SVGTextContentElement.cpp
+++ b/Source/core/svg/SVGTextContentElement.cpp
@@ -190,12 +190,12 @@ void SVGTextContentElement::selectSubString(unsigned charnum, unsigned nchars, E
// Find selection start
VisiblePosition start(firstPositionInNode(const_cast<SVGTextContentElement*>(this)));
for (unsigned i = 0; i < charnum; ++i)
- start = start.next();
+ start = nextPositionOf(start);
// Find selection end
VisiblePosition end(start);
for (unsigned i = 0; i < nchars; ++i)
- end = end.next();
+ end = nextPositionOf(end);
document().frame()->selection().setSelection(VisibleSelection(start, end));
}
« no previous file with comments | « Source/core/layout/PendingSelection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698