| Index: third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp b/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
|
| index e94156d02c1b8b69dc8c1087b694d12f12973d45..174bdb33879295143299fc2673a7e0b5a99a45b5 100644
|
| --- a/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
|
| @@ -208,7 +208,17 @@ void SelectionAdjuster::adjustSelectionInDOMTree(
|
| const Position& extent = toPositionInDOMTree(selectionInFlatTree.extent());
|
|
|
| if (isCrossingShadowBoundaries(selectionInFlatTree)) {
|
| - *selection = createVisibleSelectionDeprecated(base, extent);
|
| + DCHECK(base.document());
|
| +
|
| + // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
|
| + // needs to be audited. See http://crbug.com/590369 for more details.
|
| + // This layout update call cannot be hoisted out of the |if|, otherwise it's
|
| + // going to cause performance regression (http://crbug.com/652301).
|
| + // TODO(yosin): Implement and apply lazy visible selection validation so
|
| + // that we don't need to update layout here.
|
| + base.document()->updateStyleAndLayoutIgnorePendingStylesheets();
|
| +
|
| + *selection = createVisibleSelection(base, extent);
|
| return;
|
| }
|
|
|
|
|