| Index: third_party/WebKit/Source/core/editing/DOMSelection.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/DOMSelection.cpp b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
|
| index b3c2e3b205ea2611a44d4dca631320125766c83d..4540f0f6369de4b28cfb82f37fc318da948c1a68 100644
|
| --- a/third_party/WebKit/Source/core/editing/DOMSelection.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
|
| @@ -204,7 +204,10 @@ unsigned DOMSelection::rangeCount() const {
|
| return 0;
|
| if (documentCachedRange())
|
| return 1;
|
| - if (frame()->selection().isNone())
|
| + if (frame()
|
| + ->selection()
|
| + .computeVisibleSelectionInDOMTreeDeprecated()
|
| + .isNone())
|
| return 0;
|
| // Any selection can be adjusted to Range for Document.
|
| if (isSelectionOfDocument())
|
| @@ -463,7 +466,11 @@ void DOMSelection::extend(Node* node,
|
| LOG(FATAL)
|
| << "Selection has a cached Range, but anchorPosition is null. start="
|
| << range->startContainer() << " end=" << range->endContainer();
|
| - } else if (frame() && !frame()->selection().isNone()) {
|
| + } else if (frame() &&
|
| + !frame()
|
| + ->selection()
|
| + .computeVisibleSelectionInDOMTreeDeprecated()
|
| + .isNone()) {
|
| LOG(FATAL) << "FrameSelection is not none, but anchorPosition is null.";
|
| }
|
| }
|
| @@ -649,7 +656,7 @@ void DOMSelection::deleteFromDocument() {
|
|
|
| FrameSelection& selection = frame()->selection();
|
|
|
| - if (selection.isNone())
|
| + if (selection.computeVisibleSelectionInDOMTreeDeprecated().isNone())
|
| return;
|
|
|
| // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
|
|
|