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

Unified Diff: third_party/WebKit/Source/web/mac/WebSubstringUtil.mm

Issue 1909343003: TextIteratorAlgorithm should not force layout update in constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/mac/WebSubstringUtil.mm
diff --git a/third_party/WebKit/Source/web/mac/WebSubstringUtil.mm b/third_party/WebKit/Source/web/mac/WebSubstringUtil.mm
index 26f6185fed011efbf3504af0f245d53ba21527b0..6cd6d6625410d4ff9c2755e5960fed33f365b43c 100644
--- a/third_party/WebKit/Source/web/mac/WebSubstringUtil.mm
+++ b/third_party/WebKit/Source/web/mac/WebSubstringUtil.mm
@@ -65,6 +65,11 @@ static NSAttributedString* attributedSubstringFromRange(const EphemeralRange& ra
size_t length = range.endPosition().computeOffsetInContainerNode() - range.startPosition().computeOffsetInContainerNode();
unsigned position = 0;
+
+ // TODO(dglazkov): The use of updateLayoutIgnorePendingStylesheets needs to be audited.
+ // see http://crbug.com/590369 for more details.
+ range.startPosition().document()->updateLayoutIgnorePendingStylesheets();
+
for (TextIterator it(range.startPosition(), range.endPosition()); !it.atEnd() && [string length] < length; it.advance()) {
unsigned numCharacters = it.length();
if (!numCharacters)
« no previous file with comments | « third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698