| Index: third_party/WebKit/Source/core/editing/VisibleSelection.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/VisibleSelection.cpp b/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
|
| index 0eee09a79d238487d598111db1374098c6df1a16..17b7cafa73c6632b4c0ed700c3ca1e4a0ef59613 100644
|
| --- a/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
|
| @@ -316,13 +316,9 @@ VisibleSelectionTemplate<Strategy>::toNormalizedEphemeralRange() const {
|
|
|
| // Make sure we have an updated layout since this function is called
|
| // in the course of running edit commands which modify the DOM.
|
| - // Failing to call this can result in equivalentXXXPosition calls returning
|
| + // Failing to ensure this can result in equivalentXXXPosition calls returning
|
| // incorrect results.
|
| - m_start.document()->updateStyleAndLayout();
|
| -
|
| - // Check again, because updating layout can clear the selection.
|
| - if (isNone())
|
| - return EphemeralRangeTemplate<Strategy>();
|
| + DCHECK(!m_start.document()->needsLayoutTreeUpdate());
|
|
|
| if (isCaret()) {
|
| // If the selection is a caret, move the range start upstream. This
|
|
|