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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 m_modifiers = 0; | 98 m_modifiers = 0; |
99 if (e.modifiers & WebInputEvent::ShiftKey) | 99 if (e.modifiers & WebInputEvent::ShiftKey) |
100 m_modifiers |= PlatformEvent::ShiftKey; | 100 m_modifiers |= PlatformEvent::ShiftKey; |
101 if (e.modifiers & WebInputEvent::ControlKey) | 101 if (e.modifiers & WebInputEvent::ControlKey) |
102 m_modifiers |= PlatformEvent::CtrlKey; | 102 m_modifiers |= PlatformEvent::CtrlKey; |
103 if (e.modifiers & WebInputEvent::AltKey) | 103 if (e.modifiers & WebInputEvent::AltKey) |
104 m_modifiers |= PlatformEvent::AltKey; | 104 m_modifiers |= PlatformEvent::AltKey; |
105 if (e.modifiers & WebInputEvent::MetaKey) | 105 if (e.modifiers & WebInputEvent::MetaKey) |
106 m_modifiers |= PlatformEvent::MetaKey; | 106 m_modifiers |= PlatformEvent::MetaKey; |
107 | 107 |
108 m_modifierFlags = e.modifiers; | |
109 m_timestamp = e.timeStampSeconds; | 108 m_timestamp = e.timeStampSeconds; |
110 m_clickCount = e.clickCount; | 109 m_clickCount = e.clickCount; |
111 | 110 |
112 switch (e.type) { | 111 switch (e.type) { |
113 case WebInputEvent::MouseMove: | 112 case WebInputEvent::MouseMove: |
114 case WebInputEvent::MouseLeave: // synthesize a move event | 113 case WebInputEvent::MouseLeave: // synthesize a move event |
115 m_type = PlatformEvent::MouseMoved; | 114 m_type = PlatformEvent::MouseMoved; |
116 break; | 115 break; |
117 | 116 |
118 case WebInputEvent::MouseDown: | 117 case WebInputEvent::MouseDown: |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 modifiers = getWebInputModifiers(event); | 815 modifiers = getWebInputModifiers(event); |
817 | 816 |
818 globalX = event.screenX(); | 817 globalX = event.screenX(); |
819 globalY = event.screenY(); | 818 globalY = event.screenY(); |
820 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); | 819 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL
ocation(), *renderObject); |
821 x = localPoint.x(); | 820 x = localPoint.x(); |
822 y = localPoint.y(); | 821 y = localPoint.y(); |
823 } | 822 } |
824 | 823 |
825 } // namespace blink | 824 } // namespace blink |
OLD | NEW |