| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 void SpellCheckerClientImpl::checkSpellingOfString(const String& text, int* miss
pellingLocation, int* misspellingLength) | 117 void SpellCheckerClientImpl::checkSpellingOfString(const String& text, int* miss
pellingLocation, int* misspellingLength) |
| 118 { | 118 { |
| 119 // SpellCheckWord will write (0, 0) into the output vars, which is what our | 119 // SpellCheckWord will write (0, 0) into the output vars, which is what our |
| 120 // caller expects if the word is spelled correctly. | 120 // caller expects if the word is spelled correctly. |
| 121 int spellLocation = -1; | 121 int spellLocation = -1; |
| 122 int spellLength = 0; | 122 int spellLength = 0; |
| 123 | 123 |
| 124 // Check to see if the provided text is spelled correctly. | 124 // Check to see if the provided text is spelled correctly. |
| 125 if (m_webView->spellCheckClient()) { | 125 if (m_webView->spellCheckClient()) { |
| 126 m_webView->spellCheckClient()->spellCheck(text, spellLocation, spellLeng
th, 0); | 126 m_webView->spellCheckClient()->spellCheck(text, spellLocation, spellLeng
th, nullptr); |
| 127 } else { | 127 } else { |
| 128 spellLocation = 0; | 128 spellLocation = 0; |
| 129 spellLength = 0; | 129 spellLength = 0; |
| 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) |
| (...skipping 58 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 |