| OLD | NEW |
| 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 Loading... |
| 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(PassRefPtrWillBeRawPtr<Text
CheckingRequest> request) | 140 void SpellCheckerClientImpl::requestCheckingOfString(RawPtr<TextCheckingRequest>
request) |
| 141 { | 141 { |
| 142 if (m_webView->spellCheckClient()) { | 142 if (m_webView->spellCheckClient()) { |
| 143 const String& text = request->data().text(); | 143 const String& text = request->data().text(); |
| 144 const Vector<uint32_t>& markers = request->data().markers(); | 144 const Vector<uint32_t>& markers = request->data().markers(); |
| 145 const Vector<unsigned>& markerOffsets = request->data().offsets(); | 145 const Vector<unsigned>& markerOffsets = request->data().offsets(); |
| 146 m_webView->spellCheckClient()->requestCheckingOfText(text, markers, mark
erOffsets, new WebTextCheckingCompletionImpl(request)); | 146 m_webView->spellCheckClient()->requestCheckingOfText(text, markers, mark
erOffsets, new WebTextCheckingCompletionImpl(request)); |
| 147 } | 147 } |
| 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) |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |