| Index: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
|
| index 132364a8ffea5ca12541469836fe9348350d9801..9a0a197d941fb125ea7bed701bc26998ad2690c1 100644
|
| --- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
|
| @@ -751,12 +751,16 @@ bool WebFrameWidgetImpl::selectionBounds(WebRect& anchor, WebRect& focus) const
|
| return false;
|
|
|
| FrameSelection& selection = localFrame->selection();
|
| + if (selection.isNone())
|
| + return false;
|
|
|
| - if (selection.isCaret()) {
|
| - // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
|
| - // needs to be audited. See http://crbug.com/590369 for more details.
|
| - localFrame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
|
| + // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
|
| + // needs to be audited. See http://crbug.com/590369 for more details.
|
| + localFrame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
|
| +
|
| + DocumentLifecycle::DisallowTransitionScope disallowTransition(localFrame->document()->lifecycle());
|
|
|
| + if (selection.isCaret()) {
|
| anchor = focus = selection.absoluteCaretBounds();
|
| } else {
|
| const EphemeralRange selectedRange = selection.selection().toNormalizedEphemeralRange();
|
|
|