| Index: third_party/WebKit/Source/core/page/FocusController.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/FocusController.cpp b/third_party/WebKit/Source/core/page/FocusController.cpp
|
| index de9da91658722ce16c2e4d1f9ba55da8cf1a3666..01e6583590c348f1ebcc1df00d580dc2d5c1607b 100644
|
| --- a/third_party/WebKit/Source/core/page/FocusController.cpp
|
| +++ b/third_party/WebKit/Source/core/page/FocusController.cpp
|
| @@ -1068,10 +1068,11 @@ static void clearSelectionIfNeeded(LocalFrame* oldFocusedFrame,
|
| return;
|
|
|
| FrameSelection& selection = oldFocusedFrame->selection();
|
| - if (selection.isNone())
|
| + const SelectionInDOMTree& selectionInDOMTree = selection.selectionInDOMTree();
|
| + if (selectionInDOMTree.isNone())
|
| return;
|
|
|
| - Node* selectionStartNode = selection.selection().start().anchorNode();
|
| + Node* selectionStartNode = selectionInDOMTree.base().anchorNode();
|
| if (selectionStartNode == newFocusedElement ||
|
| selectionStartNode->isDescendantOf(newFocusedElement))
|
| return;
|
|
|