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) 2009 Google, Inc. All rights reserved. | 3 * Copyright (C) 2009 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 // | 353 // |
354 | 354 |
355 static const unsigned CtrlKey = 1 << 0; | 355 static const unsigned CtrlKey = 1 << 0; |
356 static const unsigned AltKey = 1 << 1; | 356 static const unsigned AltKey = 1 << 1; |
357 static const unsigned ShiftKey = 1 << 2; | 357 static const unsigned ShiftKey = 1 << 2; |
358 static const unsigned MetaKey = 1 << 3; | 358 static const unsigned MetaKey = 1 << 3; |
359 #if PLATFORM(DARWIN) | 359 #if PLATFORM(DARWIN) |
360 // Aliases for the generic key defintions to make kbd shortcuts definitions more | 360 // Aliases for the generic key defintions to make kbd shortcuts definitions more |
361 // readable on OS X. | 361 // readable on OS X. |
362 static const unsigned OptionKey = AltKey; | 362 static const unsigned OptionKey = AltKey; |
| 363 |
| 364 // Do not use this constant for anything but cursor movement commands. Keys |
| 365 // with cmd set have their |isSystemKey| bit set, so chances are the shortcut |
| 366 // will not be executed. Another, less important, reason is that shortcuts |
| 367 // defined in the renderer do not blink the menu item that they triggered. See |
| 368 // http://crbug.com/25856 and the bugs linked from there for details. |
363 static const unsigned CommandKey = MetaKey; | 369 static const unsigned CommandKey = MetaKey; |
364 #endif | 370 #endif |
365 | 371 |
366 // Keys with special meaning. These will be delegated to the editor using | 372 // Keys with special meaning. These will be delegated to the editor using |
367 // the execCommand() method | 373 // the execCommand() method |
368 struct KeyDownEntry { | 374 struct KeyDownEntry { |
369 unsigned virtualKey; | 375 unsigned virtualKey; |
370 unsigned modifiers; | 376 unsigned modifiers; |
371 const char* name; | 377 const char* name; |
372 }; | 378 }; |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 notImplemented(); | 912 notImplemented(); |
907 } | 913 } |
908 | 914 |
909 void EditorClientImpl::setInputMethodState(bool enabled) | 915 void EditorClientImpl::setInputMethodState(bool enabled) |
910 { | 916 { |
911 if (m_webView->client()) | 917 if (m_webView->client()) |
912 m_webView->client()->setInputMethodEnabled(enabled); | 918 m_webView->client()->setInputMethodEnabled(enabled); |
913 } | 919 } |
914 | 920 |
915 } // namesace WebKit | 921 } // namesace WebKit |
OLD | NEW |