Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp

Issue 2313613003: Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in plainText (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f9a54e515331fbbfcf5f83fb2b2fa379f6ef930c..4c84660ec10b88c91e58108624bcf6a42c9fcd37 100644
--- a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
@@ -1178,10 +1178,7 @@ static String createPlainText(const EphemeralRangeTemplate<Strategy>& range, Tex
if (range.isNull())
return emptyString();
-
- // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets needs to be audited.
- // see http://crbug.com/590369 for more details.
- range.startPosition().document()->updateStyleAndLayoutIgnorePendingStylesheets();
+ DocumentLifecycle::DisallowTransitionScope disallowTransition(range.startPosition().document()->lifecycle());
TextIteratorAlgorithm<Strategy> it(range.startPosition(), range.endPosition(), behavior);
@@ -1210,12 +1207,6 @@ 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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698