| Index: third_party/WebKit/Source/core/editing/FrameSelection.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/FrameSelection.cpp b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
|
| index 32f757091bc7672b4cd4d36b70da3af669fd239d..87cc575035a736a6c195ccf7d97831fef4e885ba 100644
|
| --- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
|
| @@ -166,7 +166,8 @@ const VisibleSelectionInFlatTree& FrameSelection::selectionInFlatTree() const {
|
| void FrameSelection::moveCaretSelection(const IntPoint& point) {
|
| DCHECK(!document().needsLayoutTreeUpdate());
|
|
|
| - Element* const editable = rootEditableElement();
|
| + Element* const editable =
|
| + computeVisibleSelectionInDOMTree().rootEditableElement();
|
| if (!editable)
|
| return;
|
|
|
| @@ -835,7 +836,8 @@ void FrameSelection::setFocusedNodeIfNeeded() {
|
| if (isNone() || !isFocused())
|
| return;
|
|
|
| - if (Element* target = rootEditableElement()) {
|
| + if (Element* target =
|
| + computeVisibleSelectionInDOMTreeDeprecated().rootEditableElement()) {
|
| // Walk up the DOM tree to search for a node to focus.
|
| document().updateStyleAndLayoutTreeIgnorePendingStylesheets();
|
| while (target) {
|
|
|