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

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

Issue 1860903002: Update Source/platform/ to assume Oilpan only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: back out ScrollAnimatorMac() accidental change Created 4 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/web/SpellCheckerClientImpl.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 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 130 }
131 131
132 // Note: the Mac code checks if the pointers are null before writing to them , 132 // Note: the Mac code checks if the pointers are null before writing to them ,
133 // so we do too. 133 // so we do too.
134 if (misspellingLocation) 134 if (misspellingLocation)
135 *misspellingLocation = spellLocation; 135 *misspellingLocation = spellLocation;
136 if (misspellingLength) 136 if (misspellingLength)
137 *misspellingLength = spellLength; 137 *misspellingLength = spellLength;
138 } 138 }
139 139
140 void SpellCheckerClientImpl::requestCheckingOfString(RawPtr<TextCheckingRequest> request) 140 void SpellCheckerClientImpl::requestCheckingOfString(TextCheckingRequest* reques t)
141 { 141 {
142 if (m_webView->spellCheckClient()) { 142 if (!m_webView->spellCheckClient())
143 const String& text = request->data().text(); 143 return;
144 const Vector<uint32_t>& markers = request->data().markers(); 144 const String& text = request->data().text();
145 const Vector<unsigned>& markerOffsets = request->data().offsets(); 145 const Vector<uint32_t>& markers = request->data().markers();
146 m_webView->spellCheckClient()->requestCheckingOfText(text, markers, mark erOffsets, new WebTextCheckingCompletionImpl(request)); 146 const Vector<unsigned>& markerOffsets = request->data().offsets();
147 } 147 m_webView->spellCheckClient()->requestCheckingOfText(text, markers, markerOf fsets, new WebTextCheckingCompletionImpl(request));
148 } 148 }
149 149
150 void SpellCheckerClientImpl::checkGrammarOfString(const String& text, WTF::Vecto r<GrammarDetail>& details, int* badGrammarLocation, int* badGrammarLength) 150 void SpellCheckerClientImpl::checkGrammarOfString(const String& text, WTF::Vecto r<GrammarDetail>& details, int* badGrammarLocation, int* badGrammarLength)
151 { 151 {
152 if (badGrammarLocation) 152 if (badGrammarLocation)
153 *badGrammarLocation = -1; 153 *badGrammarLocation = -1;
154 if (badGrammarLength) 154 if (badGrammarLength)
155 *badGrammarLength = 0; 155 *badGrammarLength = 0;
156 156
157 if (!m_webView->spellCheckClient()) 157 if (!m_webView->spellCheckClient())
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 196
197 bool SpellCheckerClientImpl::spellingUIIsShowing() 197 bool SpellCheckerClientImpl::spellingUIIsShowing()
198 { 198 {
199 if (m_webView->spellCheckClient()) 199 if (m_webView->spellCheckClient())
200 return m_webView->spellCheckClient()->isShowingSpellingUI(); 200 return m_webView->spellCheckClient()->isShowingSpellingUI();
201 return false; 201 return false;
202 } 202 }
203 203
204 } // namespace blink 204 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/SpellCheckerClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698