Chromium Code Reviews| Index: chrome/browser/renderer_host/text_input_client_mac.mm |
| diff --git a/chrome/browser/renderer_host/text_input_client_mac.mm b/chrome/browser/renderer_host/text_input_client_mac.mm |
| index f78f8b32a318b283eb327d81b03a32ad22930d38..e1aea504ab06e9a6b6cbd4473dab95705fb0b2ab 100644 |
| --- a/chrome/browser/renderer_host/text_input_client_mac.mm |
| +++ b/chrome/browser/renderer_host/text_input_client_mac.mm |
| @@ -84,6 +84,11 @@ NSAttributedString* TextInputClientMac::GetAttributedSubstringFromRange( |
| void TextInputClientMac::SetCharacterIndexAndSignal(NSUInteger index) { |
| lock_.Acquire(); |
| + // |index| could be WTF::notFound (-1) and it's value is different from |
| + // NSNotFound so we need to convert it. |
| + if (index == static_cast<NSUInteger>(-1)) { |
|
Robert Sesek
2011/05/19 15:16:56
I think a better place to do this would be in text
bashi
2011/05/20 04:43:15
Moved it to text_input_client_message_filter.mm.
|
| + index = NSNotFound; |
| + } |
| character_index_ = index; |
| lock_.Release(); |
| condition_.Signal(); |