| 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 156ae7305e8ff3fc451267c821247c1ddfd83b8b..113ff3500dc734c3651ff1378fe245c0cc671a37 100644
|
| --- a/third_party/WebKit/Source/core/editing/DOMSelection.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
|
| @@ -210,15 +210,11 @@ void DOMSelection::collapse(Node* node,
|
| if (exceptionState.hadException())
|
| return;
|
|
|
| - // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
|
| - // needs to be audited. See http://crbug.com/590369 for more details.
|
| - // In the long term, we should change FrameSelection::setSelection to take a
|
| - // parameter that does not require clean layout, so that modifying selection
|
| - // no longer performs synchronous layout by itself.
|
| - frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
|
| -
|
| - frame()->selection().setSelection(createVisibleSelection(
|
| - Position(node, offset), frame()->selection().isDirectional()));
|
| + frame()->selection().setSelection(
|
| + SelectionInDOMTree::Builder()
|
| + .collapse(Position(node, offset))
|
| + .setIsDirectional(frame()->selection().isDirectional())
|
| + .build());
|
| }
|
|
|
| void DOMSelection::collapseToEnd(ExceptionState& exceptionState) {
|
|
|