| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 break; | 197 break; |
| 198 case WebInputEvent::GestureScrollUpdate: | 198 case WebInputEvent::GestureScrollUpdate: |
| 199 m_type = PlatformEvent::GestureScrollUpdate; | 199 m_type = PlatformEvent::GestureScrollUpdate; |
| 200 m_data.m_scroll.m_resendingPluginId = e.resendingPluginId; | 200 m_data.m_scroll.m_resendingPluginId = e.resendingPluginId; |
| 201 m_data.m_scroll.m_deltaX = scaleDeltaToWindow(widget, e.data.scrollUpdat
e.deltaX); | 201 m_data.m_scroll.m_deltaX = scaleDeltaToWindow(widget, e.data.scrollUpdat
e.deltaX); |
| 202 m_data.m_scroll.m_deltaY = scaleDeltaToWindow(widget, e.data.scrollUpdat
e.deltaY); | 202 m_data.m_scroll.m_deltaY = scaleDeltaToWindow(widget, e.data.scrollUpdat
e.deltaY); |
| 203 m_data.m_scroll.m_velocityX = e.data.scrollUpdate.velocityX; | 203 m_data.m_scroll.m_velocityX = e.data.scrollUpdate.velocityX; |
| 204 m_data.m_scroll.m_velocityY = e.data.scrollUpdate.velocityY; | 204 m_data.m_scroll.m_velocityY = e.data.scrollUpdate.velocityY; |
| 205 m_data.m_scroll.m_preventPropagation = e.data.scrollUpdate.preventPropag
ation; | 205 m_data.m_scroll.m_preventPropagation = e.data.scrollUpdate.preventPropag
ation; |
| 206 m_data.m_scroll.m_inertial = e.data.scrollUpdate.inertial; | 206 m_data.m_scroll.m_inertial = e.data.scrollUpdate.inertial; |
| 207 switch (e.data.scrollUpdate.deltaUnits) { |
| 208 case WebGestureEvent::ScrollUnits::PrecisePixels: |
| 209 m_data.m_scroll.m_deltaUnits = ScrollGranularity::ScrollByPrecisePix
el; |
| 210 break; |
| 211 case WebGestureEvent::ScrollUnits::Pixels: |
| 212 m_data.m_scroll.m_deltaUnits = ScrollGranularity::ScrollByPixel; |
| 213 break; |
| 214 case WebGestureEvent::ScrollUnits::Page: |
| 215 m_data.m_scroll.m_deltaUnits = ScrollGranularity::ScrollByPage; |
| 216 break; |
| 217 default: |
| 218 ASSERT_NOT_REACHED(); |
| 219 } |
| 207 break; | 220 break; |
| 208 case WebInputEvent::GestureTap: | 221 case WebInputEvent::GestureTap: |
| 209 m_type = PlatformEvent::GestureTap; | 222 m_type = PlatformEvent::GestureTap; |
| 210 m_area = expandedIntSize(scaleSizeToWindow(widget, FloatSize(e.data.tap.
width, e.data.tap.height))); | 223 m_area = expandedIntSize(scaleSizeToWindow(widget, FloatSize(e.data.tap.
width, e.data.tap.height))); |
| 211 m_data.m_tap.m_tapCount = e.data.tap.tapCount; | 224 m_data.m_tap.m_tapCount = e.data.tap.tapCount; |
| 212 break; | 225 break; |
| 213 case WebInputEvent::GestureTapUnconfirmed: | 226 case WebInputEvent::GestureTapUnconfirmed: |
| 214 m_type = PlatformEvent::GestureTapUnconfirmed; | 227 m_type = PlatformEvent::GestureTapUnconfirmed; |
| 215 m_area = expandedIntSize(scaleSizeToWindow(widget, FloatSize(e.data.tap.
width, e.data.tap.height))); | 228 m_area = expandedIntSize(scaleSizeToWindow(widget, FloatSize(e.data.tap.
width, e.data.tap.height))); |
| 216 break; | 229 break; |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 break; | 739 break; |
| 727 case GestureSourceTouchscreen: | 740 case GestureSourceTouchscreen: |
| 728 sourceDevice = WebGestureDeviceTouchscreen; | 741 sourceDevice = WebGestureDeviceTouchscreen; |
| 729 break; | 742 break; |
| 730 case GestureSourceUninitialized: | 743 case GestureSourceUninitialized: |
| 731 ASSERT_NOT_REACHED(); | 744 ASSERT_NOT_REACHED(); |
| 732 } | 745 } |
| 733 } | 746 } |
| 734 | 747 |
| 735 } // namespace blink | 748 } // namespace blink |
| OLD | NEW |