| Index: third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
|
| index 5cc04a2bce4a99d935bfcbbc1b3fa9d29d1b0319..238385e2c460f66a6cb440149332f43f8e3c8f64 100644
|
| --- a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
|
| @@ -1211,6 +1211,12 @@ String plainText(const EphemeralRange& range, TextIteratorBehaviorFlags behavior
|
|
|
| String plainText(const EphemeralRangeInFlatTree& range, TextIteratorBehaviorFlags behavior)
|
| {
|
| + // TODO(xiaochengh): Move this check and the DisallowTransitionScope to
|
| + // |createPlainText| after we have ensure that both versions of |plainText|
|
| + // are called with clean layout.
|
| + if (range.isNull())
|
| + return emptyString();
|
| + DocumentLifecycle::DisallowTransitionScope disallowTransition(range.startPosition().document()->lifecycle());
|
| return createPlainText<EditingInFlatTreeStrategy>(range, behavior);
|
| }
|
|
|
|
|