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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 ASSERT_NOT_REACHED(); | 146 ASSERT_NOT_REACHED(); |
147 } | 147 } |
148 } | 148 } |
149 | 149 |
150 // PlatformWheelEventBuilder -------------------------------------------------- | 150 // PlatformWheelEventBuilder -------------------------------------------------- |
151 | 151 |
152 PlatformWheelEventBuilder::PlatformWheelEventBuilder(Widget* widget, const WebMo
useWheelEvent& e) | 152 PlatformWheelEventBuilder::PlatformWheelEventBuilder(Widget* widget, const WebMo
useWheelEvent& e) |
153 { | 153 { |
154 m_position = widget->convertFromRootFrame(flooredIntPoint(convertHitPointToR
ootFrame(widget, FloatPoint(e.x, e.y)))); | 154 m_position = widget->convertFromRootFrame(flooredIntPoint(convertHitPointToR
ootFrame(widget, FloatPoint(e.x, e.y)))); |
155 m_globalPosition = IntPoint(e.globalX, e.globalY); | 155 m_globalPosition = IntPoint(e.globalX, e.globalY); |
156 m_deltaX = e.deltaX; | 156 m_deltaX = scaleDeltaToWindow(widget, e.deltaX); |
157 m_deltaY = e.deltaY; | 157 m_deltaY = scaleDeltaToWindow(widget, e.deltaY); |
158 m_wheelTicksX = e.wheelTicksX; | 158 m_wheelTicksX = e.wheelTicksX; |
159 m_wheelTicksY = e.wheelTicksY; | 159 m_wheelTicksY = e.wheelTicksY; |
160 m_granularity = e.scrollByPage ? | 160 m_granularity = e.scrollByPage ? |
161 ScrollByPageWheelEvent : ScrollByPixelWheelEvent; | 161 ScrollByPageWheelEvent : ScrollByPixelWheelEvent; |
162 | 162 |
163 m_type = PlatformEvent::Wheel; | 163 m_type = PlatformEvent::Wheel; |
164 | 164 |
165 m_timestamp = e.timeStampSeconds; | 165 m_timestamp = e.timeStampSeconds; |
166 m_modifiers = e.modifiers; | 166 m_modifiers = e.modifiers; |
167 | 167 |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 break; | 745 break; |
746 case GestureSourceTouchscreen: | 746 case GestureSourceTouchscreen: |
747 sourceDevice = WebGestureDeviceTouchscreen; | 747 sourceDevice = WebGestureDeviceTouchscreen; |
748 break; | 748 break; |
749 case GestureSourceUninitialized: | 749 case GestureSourceUninitialized: |
750 ASSERT_NOT_REACHED(); | 750 ASSERT_NOT_REACHED(); |
751 } | 751 } |
752 } | 752 } |
753 | 753 |
754 } // namespace blink | 754 } // namespace blink |
OLD | NEW |