OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2006-2009 Google Inc. | 3 * Copyright (C) 2006-2009 Google Inc. |
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 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 result.globalY = temp.globalY; | 1134 result.globalY = temp.globalY; |
1135 | 1135 |
1136 result.modifiers = modifiersFromEvent(event); | 1136 result.modifiers = modifiersFromEvent(event); |
1137 result.timeStampSeconds = [event timestamp]; | 1137 result.timeStampSeconds = [event timestamp]; |
1138 | 1138 |
1139 // MacOS X gestures are used only for pinch support. | 1139 // MacOS X gestures are used only for pinch support. |
1140 result.sourceDevice = WebGestureEvent::Touchpad; | 1140 result.sourceDevice = WebGestureEvent::Touchpad; |
1141 switch ([event type]) { | 1141 switch ([event type]) { |
1142 case NSEventTypeMagnify: | 1142 case NSEventTypeMagnify: |
1143 result.type = WebInputEvent::GesturePinchUpdate; | 1143 result.type = WebInputEvent::GesturePinchUpdate; |
1144 result.data.pinchUpdate.scale = [event magnification]; | 1144 result.data.pinchUpdate.scale = [event magnification] + 1.0; |
1145 break; | 1145 break; |
1146 default: | 1146 default: |
1147 ASSERT_NOT_REACHED(); | 1147 ASSERT_NOT_REACHED(); |
1148 result.type = WebInputEvent::Undefined; | 1148 result.type = WebInputEvent::Undefined; |
1149 } | 1149 } |
1150 | 1150 |
1151 return result; | 1151 return result; |
1152 } | 1152 } |
1153 | 1153 |
1154 } // namespace blink | 1154 } // namespace blink |
OLD | NEW |