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

Side by Side Diff: third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.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, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 , m_end(end) 229 , m_end(end)
230 { 230 {
231 } 231 }
232 232
233 TextCheckingHelper::~TextCheckingHelper() 233 TextCheckingHelper::~TextCheckingHelper()
234 { 234 {
235 } 235 }
236 236
237 String TextCheckingHelper::findFirstMisspelling(int& firstMisspellingOffset, boo l markAll) 237 String TextCheckingHelper::findFirstMisspelling(int& firstMisspellingOffset, boo l markAll)
238 { 238 {
239 // TODO(dglazkov): The use of updateLayoutIgnorePendingStylesheets needs to be audited.
240 // see http://crbug.com/590369 for more details.
241 m_start.document()->updateLayoutIgnorePendingStylesheets();
242
239 WordAwareIterator it(m_start, m_end); 243 WordAwareIterator it(m_start, m_end);
240 firstMisspellingOffset = 0; 244 firstMisspellingOffset = 0;
241 245
242 String firstMisspelling; 246 String firstMisspelling;
243 int currentChunkOffset = 0; 247 int currentChunkOffset = 0;
244 248
245 while (!it.atEnd()) { 249 while (!it.atEnd()) {
246 int length = it.length(); 250 int length = it.length();
247 251
248 // Skip some work for one-space-char hunks 252 // Skip some work for one-space-char hunks
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 return false; 568 return false;
565 569
566 const Settings* settings = frame->settings(); 570 const Settings* settings = frame->settings();
567 if (!settings) 571 if (!settings)
568 return false; 572 return false;
569 573
570 return settings->unifiedTextCheckerEnabled(); 574 return settings->unifiedTextCheckerEnabled();
571 } 575 }
572 576
573 } // namespace blink 577 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698