Commit 7bd5f3cf authored by xiaochengh's avatar xiaochengh Committed by Commit bot

Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in plainText

BUG=590369

Review-Url: https://codereview.chromium.org/2313613003
Cr-Commit-Position: refs/heads/master@{#417217}
parent 134a59bd
...@@ -1187,10 +1187,7 @@ static String createPlainText(const EphemeralRangeTemplate<Strategy>& range, Tex ...@@ -1187,10 +1187,7 @@ static String createPlainText(const EphemeralRangeTemplate<Strategy>& range, Tex
if (range.isNull()) if (range.isNull())
return emptyString(); return emptyString();
DocumentLifecycle::DisallowTransitionScope disallowTransition(range.startPosition().document()->lifecycle());
// TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets needs to be audited.
// see http://crbug.com/590369 for more details.
range.startPosition().document()->updateStyleAndLayoutIgnorePendingStylesheets();
TextIteratorAlgorithm<Strategy> it(range.startPosition(), range.endPosition(), behavior); TextIteratorAlgorithm<Strategy> it(range.startPosition(), range.endPosition(), behavior);
...@@ -1219,12 +1216,6 @@ String plainText(const EphemeralRange& range, TextIteratorBehaviorFlags behavior ...@@ -1219,12 +1216,6 @@ String plainText(const EphemeralRange& range, TextIteratorBehaviorFlags behavior
String plainText(const EphemeralRangeInFlatTree& 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); return createPlainText<EditingInFlatTreeStrategy>(range, behavior);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment