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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 { | 117 { |
118 float scale = widgetScaleFactor(widget); | 118 float scale = widgetScaleFactor(widget); |
119 m_position = widget->convertFromContainingWindow(IntPoint(e.x / scale, e.y /
scale)); | 119 m_position = widget->convertFromContainingWindow(IntPoint(e.x / scale, e.y /
scale)); |
120 m_globalPosition = IntPoint(e.globalX, e.globalY); | 120 m_globalPosition = IntPoint(e.globalX, e.globalY); |
121 m_deltaX = e.deltaX; | 121 m_deltaX = e.deltaX; |
122 m_deltaY = e.deltaY; | 122 m_deltaY = e.deltaY; |
123 m_wheelTicksX = e.wheelTicksX; | 123 m_wheelTicksX = e.wheelTicksX; |
124 m_wheelTicksY = e.wheelTicksY; | 124 m_wheelTicksY = e.wheelTicksY; |
125 m_granularity = e.scrollByPage ? | 125 m_granularity = e.scrollByPage ? |
126 ScrollByPageWheelEvent : ScrollByPixelWheelEvent; | 126 ScrollByPageWheelEvent : ScrollByPixelWheelEvent; |
127 | 127 |
128 m_type = PlatformEvent::Wheel; | 128 m_type = PlatformEvent::Wheel; |
129 | 129 |
130 m_modifiers = 0; | 130 m_modifiers = 0; |
131 if (e.modifiers & WebInputEvent::ShiftKey) | 131 if (e.modifiers & WebInputEvent::ShiftKey) |
132 m_modifiers |= PlatformEvent::ShiftKey; | 132 m_modifiers |= PlatformEvent::ShiftKey; |
133 if (e.modifiers & WebInputEvent::ControlKey) | 133 if (e.modifiers & WebInputEvent::ControlKey) |
134 m_modifiers |= PlatformEvent::CtrlKey; | 134 m_modifiers |= PlatformEvent::CtrlKey; |
135 if (e.modifiers & WebInputEvent::AltKey) | 135 if (e.modifiers & WebInputEvent::AltKey) |
136 m_modifiers |= PlatformEvent::AltKey; | 136 m_modifiers |= PlatformEvent::AltKey; |
137 if (e.modifiers & WebInputEvent::MetaKey) | 137 if (e.modifiers & WebInputEvent::MetaKey) |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 modifiers = getWebInputModifiers(event); | 739 modifiers = getWebInputModifiers(event); |
740 | 740 |
741 globalX = event.screenX(); | 741 globalX = event.screenX(); |
742 globalY = event.screenY(); | 742 globalY = event.screenY(); |
743 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); | 743 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); |
744 x = localPoint.x(); | 744 x = localPoint.x(); |
745 y = localPoint.y(); | 745 y = localPoint.y(); |
746 } | 746 } |
747 | 747 |
748 } // namespace WebKit | 748 } // namespace WebKit |
OLD | NEW |