| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 m_type = PlatformEvent::GesturePinchUpdate; | 247 m_type = PlatformEvent::GesturePinchUpdate; |
| 248 m_data.m_pinchUpdate.m_scale = e.data.pinchUpdate.scale; | 248 m_data.m_pinchUpdate.m_scale = e.data.pinchUpdate.scale; |
| 249 break; | 249 break; |
| 250 default: | 250 default: |
| 251 ASSERT_NOT_REACHED(); | 251 ASSERT_NOT_REACHED(); |
| 252 } | 252 } |
| 253 m_position = widget->convertFromContainingWindow(flooredIntPoint(convertHitP
ointToWindow(widget, FloatPoint(e.x, e.y)))); | 253 m_position = widget->convertFromContainingWindow(flooredIntPoint(convertHitP
ointToWindow(widget, FloatPoint(e.x, e.y)))); |
| 254 m_globalPosition = IntPoint(e.globalX, e.globalY); | 254 m_globalPosition = IntPoint(e.globalX, e.globalY); |
| 255 m_timestamp = e.timeStampSeconds; | 255 m_timestamp = e.timeStampSeconds; |
| 256 m_modifiers = e.modifiers; | 256 m_modifiers = e.modifiers; |
| 257 switch (e.sourceDevice) { |
| 258 case WebGestureDeviceTouchpad: |
| 259 m_source = PlatformGestureSourceTouchpad; |
| 260 break; |
| 261 case WebGestureDeviceTouchscreen: |
| 262 m_source = PlatformGestureSourceTouchscreen; |
| 263 break; |
| 264 case WebGestureDeviceUninitialized: |
| 265 ASSERT_NOT_REACHED(); |
| 266 } |
| 257 } | 267 } |
| 258 | 268 |
| 259 // MakePlatformKeyboardEvent -------------------------------------------------- | 269 // MakePlatformKeyboardEvent -------------------------------------------------- |
| 260 | 270 |
| 261 inline PlatformEvent::Type toPlatformKeyboardEventType(WebInputEvent::Type type) | 271 inline PlatformEvent::Type toPlatformKeyboardEventType(WebInputEvent::Type type) |
| 262 { | 272 { |
| 263 switch (type) { | 273 switch (type) { |
| 264 case WebInputEvent::KeyUp: | 274 case WebInputEvent::KeyUp: |
| 265 return PlatformEvent::KeyUp; | 275 return PlatformEvent::KeyUp; |
| 266 case WebInputEvent::KeyDown: | 276 case WebInputEvent::KeyDown: |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 } | 704 } |
| 695 | 705 |
| 696 timeStampSeconds = event.platformTimeStamp(); | 706 timeStampSeconds = event.platformTimeStamp(); |
| 697 modifiers = event.modifiers(); | 707 modifiers = event.modifiers(); |
| 698 | 708 |
| 699 globalX = event.screenX(); | 709 globalX = event.screenX(); |
| 700 globalY = event.screenY(); | 710 globalY = event.screenY(); |
| 701 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL
ocation(), *layoutObject); | 711 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL
ocation(), *layoutObject); |
| 702 x = localPoint.x(); | 712 x = localPoint.x(); |
| 703 y = localPoint.y(); | 713 y = localPoint.y(); |
| 714 |
| 715 switch (event.source()) { |
| 716 case GestureSourceTouchpad: |
| 717 sourceDevice = WebGestureDeviceTouchpad; |
| 718 break; |
| 719 case GestureSourceTouchscreen: |
| 720 sourceDevice = WebGestureDeviceTouchscreen; |
| 721 break; |
| 722 case GestureSourceUninitialized: |
| 723 ASSERT_NOT_REACHED(); |
| 724 } |
| 704 } | 725 } |
| 705 | 726 |
| 706 } // namespace blink | 727 } // namespace blink |
| OLD | NEW |