| 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 23 matching lines...) Expand all Loading... |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 // | 36 // |
| 37 // The below code was adapted from the WebKit file webview.cpp | 37 // The below code was adapted from the WebKit file webview.cpp |
| 38 // | 38 // |
| 39 | 39 |
| 40 static const unsigned CtrlKey = 1 << 0; | 40 static const unsigned CtrlKey = 1 << 0; |
| 41 static const unsigned AltKey = 1 << 1; | 41 static const unsigned AltKey = 1 << 1; |
| 42 static const unsigned ShiftKey = 1 << 2; | 42 static const unsigned ShiftKey = 1 << 2; |
| 43 static const unsigned MetaKey = 1 << 3; | 43 static const unsigned MetaKey = 1 << 3; |
| 44 #if OS(MACOSX) | 44 #if OS(MACOSX) && !OS(IOS) |
| 45 // Aliases for the generic key defintions to make kbd shortcuts definitions more | 45 // Aliases for the generic key defintions to make kbd shortcuts definitions more |
| 46 // readable on OS X. | 46 // readable on OS X. |
| 47 static const unsigned OptionKey = AltKey; | 47 static const unsigned OptionKey = AltKey; |
| 48 | 48 |
| 49 // Do not use this constant for anything but cursor movement commands. Keys | 49 // Do not use this constant for anything but cursor movement commands. Keys |
| 50 // with cmd set have their |isSystemKey| bit set, so chances are the shortcut | 50 // with cmd set have their |isSystemKey| bit set, so chances are the shortcut |
| 51 // will not be executed. Another, less important, reason is that shortcuts | 51 // will not be executed. Another, less important, reason is that shortcuts |
| 52 // defined in the renderer do not blink the menu item that they triggered. See | 52 // defined in the renderer do not blink the menu item that they triggered. See |
| 53 // http://crbug.com/25856 and the bugs linked from there for details. | 53 // http://crbug.com/25856 and the bugs linked from there for details. |
| 54 static const unsigned CommandKey = MetaKey; | 54 static const unsigned CommandKey = MetaKey; |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 if (event.metaKey()) | 189 if (event.metaKey()) |
| 190 return false; | 190 return false; |
| 191 #endif | 191 #endif |
| 192 } | 192 } |
| 193 #endif | 193 #endif |
| 194 | 194 |
| 195 return true; | 195 return true; |
| 196 } | 196 } |
| 197 } // namespace blink | 197 } // namespace blink |
| 198 | 198 |
| OLD | NEW |