| Index: Source/core/editing/Editor.cpp
|
| diff --git a/Source/core/editing/Editor.cpp b/Source/core/editing/Editor.cpp
|
| index a421ee5dd24d5b976ce17be1fc047e00129ab4ba..9d68a29fcb3aa72b2b89cd5ee3921ee29251ffd1 100644
|
| --- a/Source/core/editing/Editor.cpp
|
| +++ b/Source/core/editing/Editor.cpp
|
| @@ -111,8 +111,8 @@ VisibleSelection Editor::selectionForCommand(Event* event)
|
| return selection;
|
| // If the target is a text control, and the current selection is outside of its shadow tree,
|
| // then use the saved selection for that text control.
|
| - HTMLTextFormControlElement* textFormControlOfSelectionStart = enclosingTextFormControl(selection.start());
|
| - HTMLTextFormControlElement* textFromControlOfTarget = isHTMLTextFormControlElement(event->target()->toNode()) ? toHTMLTextFormControlElement(event->target()->toNode()) : 0;
|
| + Handle<HTMLTextFormControlElement> textFormControlOfSelectionStart = enclosingTextFormControl(selection.start());
|
| + Handle<HTMLTextFormControlElement> textFromControlOfTarget = isHTMLTextFormControlElement(event->target()->toNode()) ? toHTMLTextFormControlElement(event->target()->toNode()) : nullptr;
|
| if (textFromControlOfTarget && (selection.start().isNull() || textFromControlOfTarget != textFormControlOfSelectionStart)) {
|
| if (RefPtr<Range> range = textFromControlOfTarget->selection())
|
| return VisibleSelection(range.get(), DOWNSTREAM, selection.isDirectional());
|
|
|