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

Side by Side Diff: third_party/WebKit/Source/web/SpellCheckerClientImpl.cpp

Issue 2251693003: Rename "ContinuousSpellChecking" to "SpellChecking" in Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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) 2012 Google, Inc. All rights reserved. 3 * Copyright (C) 2012 Google, Inc. All rights reserved.
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // cause any problems to the LocalFrame's behavior. 73 // cause any problems to the LocalFrame's behavior.
74 if (!element) 74 if (!element)
75 return true; 75 return true;
76 const LayoutObject* layoutObject = element->layoutObject(); 76 const LayoutObject* layoutObject = element->layoutObject();
77 if (!layoutObject) 77 if (!layoutObject)
78 return false; 78 return false;
79 79
80 return true; 80 return true;
81 } 81 }
82 82
83 bool SpellCheckerClientImpl::isContinuousSpellCheckingEnabled() 83 bool SpellCheckerClientImpl::isSpellCheckingEnabled()
84 { 84 {
85 if (m_spellCheckThisFieldStatus == SpellCheckForcedOff) 85 if (m_spellCheckThisFieldStatus == SpellCheckForcedOff)
86 return false; 86 return false;
87 if (m_spellCheckThisFieldStatus == SpellCheckForcedOn) 87 if (m_spellCheckThisFieldStatus == SpellCheckForcedOn)
88 return true; 88 return true;
89 return shouldSpellcheckByDefault(); 89 return shouldSpellcheckByDefault();
90 } 90 }
91 91
92 void SpellCheckerClientImpl::toggleContinuousSpellChecking() 92 void SpellCheckerClientImpl::toggleSpellCheckingEnabled()
93 { 93 {
94 if (isContinuousSpellCheckingEnabled()) { 94 if (isSpellCheckingEnabled()) {
95 m_spellCheckThisFieldStatus = SpellCheckForcedOff; 95 m_spellCheckThisFieldStatus = SpellCheckForcedOff;
96 if (Page* page = m_webView->page()) { 96 if (Page* page = m_webView->page()) {
97 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree(). traverseNext()) { 97 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree(). traverseNext()) {
98 if (!frame->isLocalFrame()) 98 if (!frame->isLocalFrame())
99 continue; 99 continue;
100 toLocalFrame(frame)->document()->markers().removeMarkers(Documen tMarker::MisspellingMarkers()); 100 toLocalFrame(frame)->document()->markers().removeMarkers(Documen tMarker::MisspellingMarkers());
101 } 101 }
102 } 102 }
103 } else { 103 } else {
104 m_spellCheckThisFieldStatus = SpellCheckForcedOn; 104 m_spellCheckThisFieldStatus = SpellCheckForcedOn;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 167 }
168 168
169 bool SpellCheckerClientImpl::spellingUIIsShowing() 169 bool SpellCheckerClientImpl::spellingUIIsShowing()
170 { 170 {
171 if (m_webView->spellCheckClient()) 171 if (m_webView->spellCheckClient())
172 return m_webView->spellCheckClient()->isShowingSpellingUI(); 172 return m_webView->spellCheckClient()->isShowingSpellingUI();
173 return false; 173 return false;
174 } 174 }
175 175
176 } // namespace blink 176 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/SpellCheckerClientImpl.h ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698