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

Side by Side Diff: third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.cpp

Issue 1762993002: Revert of TextIteratorAlgorithm should not force layout update in constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
243 WordAwareIterator it(m_start, m_end); 239 WordAwareIterator it(m_start, m_end);
244 firstMisspellingOffset = 0; 240 firstMisspellingOffset = 0;
245 241
246 String firstMisspelling; 242 String firstMisspelling;
247 int currentChunkOffset = 0; 243 int currentChunkOffset = 0;
248 244
249 while (!it.atEnd()) { 245 while (!it.atEnd()) {
250 int length = it.length(); 246 int length = it.length();
251 247
252 // Skip some work for one-space-char hunks 248 // Skip some work for one-space-char hunks
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 return false; 564 return false;
569 565
570 const Settings* settings = frame->settings(); 566 const Settings* settings = frame->settings();
571 if (!settings) 567 if (!settings)
572 return false; 568 return false;
573 569
574 return settings->unifiedTextCheckerEnabled(); 570 return settings->unifiedTextCheckerEnabled();
575 } 571 }
576 572
577 } // namespace blink 573 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698