| 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 79689699ab7321b56aa665fb1d521ff9f584e24a..f9a54e515331fbbfcf5f83fb2b2fa379f6ef930c 100644
|
| --- a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
|
| @@ -1210,6 +1210,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 ensured 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);
|
| }
|
|
|
|
|