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

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

Issue 2781213002: Remove useless SpellChecker::clearMisspellingsForMovingParagraphs() (Closed)
Patch Set: Created 3 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 void SpellChecker::showSpellingGuessPanel() { 311 void SpellChecker::showSpellingGuessPanel() {
312 if (spellCheckerClient().spellingUIIsShowing()) { 312 if (spellCheckerClient().spellingUIIsShowing()) {
313 spellCheckerClient().showSpellingUI(false); 313 spellCheckerClient().showSpellingUI(false);
314 return; 314 return;
315 } 315 }
316 316
317 advanceToNextMisspelling(true); 317 advanceToNextMisspelling(true);
318 spellCheckerClient().showSpellingUI(true); 318 spellCheckerClient().showSpellingUI(true);
319 } 319 }
320 320
321 void SpellChecker::clearMisspellingsForMovingParagraphs(
322 const SelectionInDOMTree& movingSelection) {
323 removeMarkers(
324 createVisibleSelection(movingSelection).toNormalizedEphemeralRange(),
325 DocumentMarker::MisspellingMarkers());
326 }
327
328 void SpellChecker::markMisspellingsForMovingParagraphs( 321 void SpellChecker::markMisspellingsForMovingParagraphs(
329 const VisibleSelection& movingSelection) { 322 const VisibleSelection& movingSelection) {
330 if (RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled()) 323 if (RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled())
331 return; 324 return;
332 325
333 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets 326 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
334 // needs to be audited. See http://crbug.com/590369 for more details. 327 // needs to be audited. See http://crbug.com/590369 for more details.
335 // In the long term we should use idle time spell checker to prevent 328 // In the long term we should use idle time spell checker to prevent
336 // synchronous layout caused by spell checking (see crbug.com/517298). 329 // synchronous layout caused by spell checking (see crbug.com/517298).
337 frame().document()->updateStyleAndLayoutIgnorePendingStylesheets(); 330 frame().document()->updateStyleAndLayoutIgnorePendingStylesheets();
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 if (!input.isFocusedElementInDocument()) 1176 if (!input.isFocusedElementInDocument())
1184 return false; 1177 return false;
1185 } 1178 }
1186 } 1179 }
1187 HTMLElement* element = 1180 HTMLElement* element =
1188 Traversal<HTMLElement>::firstAncestorOrSelf(*position.anchorNode()); 1181 Traversal<HTMLElement>::firstAncestorOrSelf(*position.anchorNode());
1189 return element && element->isSpellCheckingEnabled(); 1182 return element && element->isSpellCheckingEnabled();
1190 } 1183 }
1191 1184
1192 } // namespace blink 1185 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698