| Index: Source/core/html/HTMLTextFormControlElement.cpp
|
| diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp
|
| index 06a5579087d1bb2131efb3dd86802a41428cfacb..8c9fc9a6f7b1fd096474582d0235f4e7594a53d4 100644
|
| --- a/Source/core/html/HTMLTextFormControlElement.cpp
|
| +++ b/Source/core/html/HTMLTextFormControlElement.cpp
|
| @@ -317,6 +317,7 @@ VisiblePosition HTMLTextFormControlElement::visiblePositionForIndex(int index) c
|
| {
|
| if (index <= 0)
|
| return VisiblePosition(firstPositionInNode(innerEditorElement()), DOWNSTREAM);
|
| + TempRangeScope scope;
|
| RefPtrWillBeRawPtr<Range> range = Range::create(document());
|
| range->selectNodeContents(innerEditorElement(), ASSERT_NO_EXCEPTION);
|
| CharacterIterator it(range.get());
|
| @@ -329,6 +330,7 @@ int HTMLTextFormControlElement::indexForVisiblePosition(const VisiblePosition& p
|
| Position indexPosition = pos.deepEquivalent().parentAnchoredEquivalent();
|
| if (enclosingTextFormControl(indexPosition) != this)
|
| return 0;
|
| + TempRangeScope scope;
|
| ASSERT(indexPosition.document());
|
| RefPtrWillBeRawPtr<Range> range = Range::create(*indexPosition.document());
|
| range->setStart(innerEditorElement(), 0, ASSERT_NO_EXCEPTION);
|
|
|