| Index: third_party/WebKit/Source/core/editing/VisiblePosition.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/VisiblePosition.cpp b/third_party/WebKit/Source/core/editing/VisiblePosition.cpp
|
| index 96df893fd0da153e1c29f0650eae693f937bc1a1..efe277be9972a9c7953cca7536689b38654a22b8 100644
|
| --- a/third_party/WebKit/Source/core/editing/VisiblePosition.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/VisiblePosition.cpp
|
| @@ -60,6 +60,15 @@ VisiblePositionTemplate<Strategy> VisiblePositionTemplate<Strategy>::create(cons
|
| if (positionWithAffinity.isNull())
|
| return VisiblePositionTemplate<Strategy>();
|
| DCHECK(positionWithAffinity.position().isConnected()) << positionWithAffinity;
|
| +
|
| + Document& document = *positionWithAffinity.position().document();
|
| +
|
| + // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
|
| + // needs to be audited. See http://crbug.com/590369 for more details.
|
| + document.updateStyleAndLayoutIgnorePendingStylesheets();
|
| +
|
| + DocumentLifecycle::DisallowTransitionScope disallowTransition(document.lifecycle());
|
| +
|
| const PositionTemplate<Strategy> deepPosition = canonicalPositionOf(positionWithAffinity.position());
|
| if (deepPosition.isNull())
|
| return VisiblePositionTemplate<Strategy>();
|
|
|