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

Unified Diff: third_party/WebKit/Source/core/editing/PlainTextRange.cpp

Issue 1740173003: TextIteratorAlgorithm should not force layout update in constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed my WIP comment. Created 4 years, 10 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
Index: third_party/WebKit/Source/core/editing/PlainTextRange.cpp
diff --git a/third_party/WebKit/Source/core/editing/PlainTextRange.cpp b/third_party/WebKit/Source/core/editing/PlainTextRange.cpp
index 7cfb84d3ba034f28437dd9c0c45e3f34382c3cb6..3fb2866a20f4847f050d6c595e447317f23a3ab8 100644
--- a/third_party/WebKit/Source/core/editing/PlainTextRange.cpp
+++ b/third_party/WebKit/Source/core/editing/PlainTextRange.cpp
@@ -82,6 +82,11 @@ EphemeralRange PlainTextRange::createRangeFor(const ContainerNode& scope, GetRan
if (getRangeFor == ForSelection)
behaviorFlags |= TextIteratorEmitsCharactersBetweenAllVisiblePositions;
auto range = EphemeralRange::rangeOfContents(scope);
+
+ // TODO(dglazkov): The use of updateLayoutIgnorePendingStylesheets needs to be audited.
+ // see http://crbug.com/590369 for more details.
+ scope.document().updateLayoutIgnorePendingStylesheets();
+
TextIterator it(range.startPosition(), range.endPosition(), behaviorFlags);
// FIXME: the atEnd() check shouldn't be necessary, workaround for

Powered by Google App Engine
This is Rietveld 408576698