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

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

Issue 2785103005: Remove stale spellcheck markers at idle time (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
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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 detail.length, result.replacement); 647 detail.length, result.replacement);
648 } 648 }
649 continue; 649 continue;
650 } 650 }
651 NOTREACHED(); 651 NOTREACHED();
652 } 652 }
653 } 653 }
654 654
655 void SpellChecker::updateMarkersForWordsAffectedByEditing( 655 void SpellChecker::updateMarkersForWordsAffectedByEditing(
656 bool doNotRemoveIfSelectionAtWordBoundary) { 656 bool doNotRemoveIfSelectionAtWordBoundary) {
657 if (RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled())
yosin_UTC9 2017/04/05 01:52:35 Nice! (^_^)b
658 return;
659
657 DCHECK(frame().selection().isAvailable()); 660 DCHECK(frame().selection().isAvailable());
658 TRACE_EVENT0("blink", "SpellChecker::updateMarkersForWordsAffectedByEditing"); 661 TRACE_EVENT0("blink", "SpellChecker::updateMarkersForWordsAffectedByEditing");
659 // TODO(editing-dev): We should hoist 662 // TODO(editing-dev): We should hoist
660 // updateStyleAndLayoutIgnorePendingStylesheets to caller. See 663 // updateStyleAndLayoutIgnorePendingStylesheets to caller. See
661 // http://crbug.com/590369 for more details. 664 // http://crbug.com/590369 for more details.
662 frame().document()->updateStyleAndLayoutIgnorePendingStylesheets(); 665 frame().document()->updateStyleAndLayoutIgnorePendingStylesheets();
663 if (!isSpellCheckingEnabledFor( 666 if (!isSpellCheckingEnabledFor(
664 frame().selection().computeVisibleSelectionInDOMTree())) 667 frame().selection().computeVisibleSelectionInDOMTree()))
665 return; 668 return;
666 669
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 if (!input.isFocusedElementInDocument()) 1179 if (!input.isFocusedElementInDocument())
1177 return false; 1180 return false;
1178 } 1181 }
1179 } 1182 }
1180 HTMLElement* element = 1183 HTMLElement* element =
1181 Traversal<HTMLElement>::firstAncestorOrSelf(*position.anchorNode()); 1184 Traversal<HTMLElement>::firstAncestorOrSelf(*position.anchorNode());
1182 return element && element->isSpellCheckingEnabled(); 1185 return element && element->isSpellCheckingEnabled();
1183 } 1186 }
1184 1187
1185 } // namespace blink 1188 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698