OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |