| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 | 1127 |
| 1128 #if !OS(MACOSX) | 1128 #if !OS(MACOSX) |
| 1129 const WebInputEvent::Type contextMenuTriggeringEventType = | 1129 const WebInputEvent::Type contextMenuTriggeringEventType = |
| 1130 #if OS(WIN) | 1130 #if OS(WIN) |
| 1131 WebInputEvent::KeyUp; | 1131 WebInputEvent::KeyUp; |
| 1132 #else | 1132 #else |
| 1133 WebInputEvent::RawKeyDown; | 1133 WebInputEvent::RawKeyDown; |
| 1134 #endif | 1134 #endif |
| 1135 | 1135 |
| 1136 bool isUnmodifiedMenuKey = !(event.modifiers & WebInputEvent::InputModifiers
) && event.windowsKeyCode == VKEY_APPS; | 1136 bool isUnmodifiedMenuKey = !(event.modifiers & WebInputEvent::InputModifiers
) && event.windowsKeyCode == VKEY_APPS; |
| 1137 bool isShiftF10 = event.modifiers == WebInputEvent::ShiftKey && event.window
sKeyCode == VKEY_F10; | 1137 bool isShiftF10 = (event.modifiers & WebInputEvent::InputModifiers) == WebIn
putEvent::ShiftKey && event.windowsKeyCode == VKEY_F10; |
| 1138 if ((isUnmodifiedMenuKey || isShiftF10) && event.type == contextMenuTriggeri
ngEventType) { | 1138 if ((isUnmodifiedMenuKey || isShiftF10) && event.type == contextMenuTriggeri
ngEventType) { |
| 1139 sendContextMenuEvent(event); | 1139 sendContextMenuEvent(event); |
| 1140 return WebInputEventResult::HandledSystem; | 1140 return WebInputEventResult::HandledSystem; |
| 1141 } | 1141 } |
| 1142 #endif // !OS(MACOSX) | 1142 #endif // !OS(MACOSX) |
| 1143 | 1143 |
| 1144 if (keyEventDefault(event)) | 1144 if (keyEventDefault(event)) |
| 1145 return WebInputEventResult::HandledSystem; | 1145 return WebInputEventResult::HandledSystem; |
| 1146 return WebInputEventResult::NotHandled; | 1146 return WebInputEventResult::NotHandled; |
| 1147 } | 1147 } |
| (...skipping 3385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4533 { | 4533 { |
| 4534 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4534 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
| 4535 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4535 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4536 if (!page()) | 4536 if (!page()) |
| 4537 return 1; | 4537 return 1; |
| 4538 | 4538 |
| 4539 return page()->deviceScaleFactor(); | 4539 return page()->deviceScaleFactor(); |
| 4540 } | 4540 } |
| 4541 | 4541 |
| 4542 } // namespace blink | 4542 } // namespace blink |
| OLD | NEW |