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

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

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 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 , m_end(end) 243 , m_end(end)
244 { 244 {
245 } 245 }
246 246
247 TextCheckingHelper::~TextCheckingHelper() 247 TextCheckingHelper::~TextCheckingHelper()
248 { 248 {
249 } 249 }
250 250
251 String TextCheckingHelper::findFirstMisspelling(int& firstMisspellingOffset, boo l markAll) 251 String TextCheckingHelper::findFirstMisspelling(int& firstMisspellingOffset, boo l markAll)
252 { 252 {
253 // TODO(dglazkov): The use of updateLayoutIgnorePendingStylesheets needs to be audited.
254 // see http://crbug.com/590369 for more details.
255 m_start.document()->updateLayoutIgnorePendingStylesheets();
256
253 WordAwareIterator it(m_start, m_end); 257 WordAwareIterator it(m_start, m_end);
254 firstMisspellingOffset = 0; 258 firstMisspellingOffset = 0;
255 259
256 String firstMisspelling; 260 String firstMisspelling;
257 int currentChunkOffset = 0; 261 int currentChunkOffset = 0;
258 262
259 while (!it.atEnd()) { 263 while (!it.atEnd()) {
260 int length = it.length(); 264 int length = it.length();
261 265
262 // Skip some work for one-space-char hunks 266 // Skip some work for one-space-char hunks
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 return false; 586 return false;
583 587
584 const Settings* settings = frame->settings(); 588 const Settings* settings = frame->settings();
585 if (!settings) 589 if (!settings)
586 return false; 590 return false;
587 591
588 return settings->unifiedTextCheckerEnabled(); 592 return settings->unifiedTextCheckerEnabled();
589 } 593 }
590 594
591 } // namespace blink 595 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698