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

Unified Diff: Source/core/html/HTMLTextFormControlElement.cpp

Issue 1317053004: Make VisiblePosition constructor private (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-09-02T12:44:47 Rebase Created 5 years, 3 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
Index: Source/core/html/HTMLTextFormControlElement.cpp
diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp
index 5e180c36bcb567e2f04dc97a2c729b88ba700cea..3cdd8ce96894cc3a99b8a3b37aaec34e01718398 100644
--- a/Source/core/html/HTMLTextFormControlElement.cpp
+++ b/Source/core/html/HTMLTextFormControlElement.cpp
@@ -395,14 +395,14 @@ void HTMLTextFormControlElement::setSelectionRange(int start, int end, TextField
VisiblePosition HTMLTextFormControlElement::visiblePositionForIndex(int index) const
{
if (index <= 0)
- return VisiblePosition(firstPositionInNode(innerEditorElement()));
+ return createVisiblePosition(firstPositionInNode(innerEditorElement()));
Position start, end;
bool selected = Range::selectNodeContents(innerEditorElement(), start, end);
if (!selected)
return VisiblePosition();
CharacterIterator it(start, end);
it.advance(index - 1);
- return VisiblePosition(it.endPosition(), TextAffinity::Upstream);
+ return createVisiblePosition(it.endPosition(), TextAffinity::Upstream);
}
int HTMLTextFormControlElement::indexForVisiblePosition(const VisiblePosition& pos) const
« no previous file with comments | « Source/core/editing/spellcheck/TextCheckingHelper.cpp ('k') | Source/core/html/HTMLTextFormControlElementTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698