| Index: Source/core/html/HTMLTextFormControlElement.cpp
 | 
| diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp
 | 
| index 06a5579087d1bb2131efb3dd86802a41428cfacb..b9aa7e929b8cac2821c69278223ec4fcfec6497f 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);
 | 
| +    TemporaryRangeScope 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;
 | 
| +    TemporaryRangeScope scope;
 | 
|      ASSERT(indexPosition.document());
 | 
|      RefPtrWillBeRawPtr<Range> range = Range::create(*indexPosition.document());
 | 
|      range->setStart(innerEditorElement(), 0, ASSERT_NO_EXCEPTION);
 | 
| 
 |