| 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 755cd849d23247806bb41382e98224910e27227b..26573bc13360bc2d72ede0a50cc48a658dfdc383 100644
|
| --- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
|
| @@ -429,8 +429,10 @@ bool FrameSelection::SelectionHasFocus() const {
|
| // TODO(editing-dev): Hoist UpdateStyleAndLayoutIgnorePendingStylesheets
|
| // to caller. See http://crbug.com/590369 for more details.
|
| GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets();
|
| + if (ComputeVisibleSelectionInFlatTree().IsNone())
|
| + return false;
|
| const Node* current =
|
| - ComputeVisibleSelectionInDOMTree().Start().ComputeContainerNode();
|
| + ComputeVisibleSelectionInFlatTree().Start().ComputeContainerNode();
|
| if (!current)
|
| return false;
|
|
|
| @@ -444,12 +446,6 @@ bool FrameSelection::SelectionHasFocus() const {
|
| if (focused_element->IsTextControl())
|
| return focused_element->ContainsIncludingHostElements(*current);
|
|
|
| - if (ComputeVisibleSelectionInFlatTree().IsNone()) {
|
| - // TODO(editing-dev): We should avoid any case where VSInFlatTree is none
|
| - // but VSInDOMTree is not none.
|
| - DLOG(FATAL) << ComputeVisibleSelectionInDOMTree();
|
| - }
|
| -
|
| // Selection has focus if it contains the focused element.
|
| const PositionInFlatTree& focused_position =
|
| PositionInFlatTree::FirstPositionInNode(focused_element);
|
|
|