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

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

Issue 2904993002: Call IdleSpellCheckCallback::Deactivate() in PrepareForLeakDetection() (Closed)
Patch Set: Add runtime flag guard Created 3 years, 6 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 | « no previous file | 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 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 } 1071 }
1072 1072
1073 DEFINE_TRACE(SpellChecker) { 1073 DEFINE_TRACE(SpellChecker) {
1074 visitor->Trace(frame_); 1074 visitor->Trace(frame_);
1075 visitor->Trace(spell_check_requester_); 1075 visitor->Trace(spell_check_requester_);
1076 visitor->Trace(idle_spell_check_callback_); 1076 visitor->Trace(idle_spell_check_callback_);
1077 } 1077 }
1078 1078
1079 void SpellChecker::PrepareForLeakDetection() { 1079 void SpellChecker::PrepareForLeakDetection() {
1080 spell_check_requester_->PrepareForLeakDetection(); 1080 spell_check_requester_->PrepareForLeakDetection();
1081 if (RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled())
1082 idle_spell_check_callback_->Deactivate();
1081 } 1083 }
1082 1084
1083 Vector<TextCheckingResult> SpellChecker::FindMisspellings(const String& text) { 1085 Vector<TextCheckingResult> SpellChecker::FindMisspellings(const String& text) {
1084 Vector<UChar> characters; 1086 Vector<UChar> characters;
1085 text.AppendTo(characters); 1087 text.AppendTo(characters);
1086 unsigned length = text.length(); 1088 unsigned length = text.length();
1087 1089
1088 TextBreakIterator* iterator = WordBreakIterator(characters.data(), length); 1090 TextBreakIterator* iterator = WordBreakIterator(characters.data(), length);
1089 if (!iterator) 1091 if (!iterator)
1090 return Vector<TextCheckingResult>(); 1092 return Vector<TextCheckingResult>();
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 if (!input.IsFocusedElementInDocument()) 1222 if (!input.IsFocusedElementInDocument())
1221 return false; 1223 return false;
1222 } 1224 }
1223 } 1225 }
1224 HTMLElement* element = 1226 HTMLElement* element =
1225 Traversal<HTMLElement>::FirstAncestorOrSelf(*position.AnchorNode()); 1227 Traversal<HTMLElement>::FirstAncestorOrSelf(*position.AnchorNode());
1226 return element && element->IsSpellCheckingEnabled(); 1228 return element && element->IsSpellCheckingEnabled();
1227 } 1229 }
1228 1230
1229 } // namespace blink 1231 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698