Chromium Code Reviews| Index: content/browser/renderer_host/input/web_input_event_builders_mac.mm |
| diff --git a/content/browser/renderer_host/input/web_input_event_builders_mac.mm b/content/browser/renderer_host/input/web_input_event_builders_mac.mm |
| index 1e116e84b939c24efb5f248caebe1e6f07c4f72f..dc628c42c744dd5646fce199652c3d9c5c7d2408 100644 |
| --- a/content/browser/renderer_host/input/web_input_event_builders_mac.mm |
| +++ b/content/browser/renderer_host/input/web_input_event_builders_mac.mm |
| @@ -631,6 +631,28 @@ blink::WebKeyboardEvent WebKeyboardEventBuilder::Build(NSEvent* event) { |
| // End Apple code. |
| + // Handle Apple's private use character |
| + if ([text_str length] == 1) { |
|
dtapuska
2015/12/10 20:50:12
Can we do this in TextFromEvent and UnmodifiedText
chongz
2015/12/11 06:38:46
Moved text_str filter into a single function, but
|
| + unichar c = [text_str characterAtIndex:0]; |
| + if (c == NSDeleteFunctionKey) { |
| + // Delete should be 0x7F |
| + text_str = @"\x7F"; |
| + } else if (c >= 0xF700 && c <= 0xF747) { |
|
erikchen
2015/12/10 21:48:09
Where are you getting 0xF747 from?
https://code
dtapuska
2015/12/10 21:53:01
F7FF I'd prefer; would match this:
http://www.ope
chongz
2015/12/11 06:38:46
Done.
|
| + // Other Apple private use characters should be "\0" |
| + text_str = @"\0"; |
| + } |
| + } |
| + if ([unmodified_str length] == 1) { |
| + unichar c = [unmodified_str characterAtIndex:0]; |
| + if (c == NSDeleteFunctionKey) { |
| + // Delete should be 0x7F |
| + unmodified_str = @"\x7F"; |
| + } else if (c >= 0xF700 && c <= 0xF747) { |
| + // Other Apple private use characters should be "\0" |
| + unmodified_str = @"\0"; |
| + } |
| + } |
| + |
| if ([text_str length] < blink::WebKeyboardEvent::textLengthCap && |
| [unmodified_str length] < blink::WebKeyboardEvent::textLengthCap) { |
| [text_str getCharacters:&result.text[0]]; |