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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 newModifiers |= PlatformEvent::ShiftKey; | 108 newModifiers |= PlatformEvent::ShiftKey; |
109 if (webModifiers & WebInputEvent::ControlKey) | 109 if (webModifiers & WebInputEvent::ControlKey) |
110 newModifiers |= PlatformEvent::CtrlKey; | 110 newModifiers |= PlatformEvent::CtrlKey; |
111 if (webModifiers & WebInputEvent::AltKey) | 111 if (webModifiers & WebInputEvent::AltKey) |
112 newModifiers |= PlatformEvent::AltKey; | 112 newModifiers |= PlatformEvent::AltKey; |
113 if (webModifiers & WebInputEvent::MetaKey) | 113 if (webModifiers & WebInputEvent::MetaKey) |
114 newModifiers |= PlatformEvent::MetaKey; | 114 newModifiers |= PlatformEvent::MetaKey; |
115 return newModifiers; | 115 return newModifiers; |
116 } | 116 } |
117 | 117 |
118 static unsigned toPlatformMouseEventModifiers(int webModifiers) | 118 unsigned toPlatformMouseEventModifiers(int webModifiers) |
119 { | 119 { |
120 unsigned newModifiers = toPlatformEventModifiers(webModifiers); | 120 unsigned newModifiers = toPlatformEventModifiers(webModifiers); |
121 if (webModifiers & WebInputEvent::LeftButtonDown) | 121 if (webModifiers & WebInputEvent::LeftButtonDown) |
122 newModifiers |= PlatformEvent::LeftButtonDown; | 122 newModifiers |= PlatformEvent::LeftButtonDown; |
123 if (webModifiers & WebInputEvent::MiddleButtonDown) | 123 if (webModifiers & WebInputEvent::MiddleButtonDown) |
124 newModifiers |= PlatformEvent::MiddleButtonDown; | 124 newModifiers |= PlatformEvent::MiddleButtonDown; |
125 if (webModifiers & WebInputEvent::RightButtonDown) | 125 if (webModifiers & WebInputEvent::RightButtonDown) |
126 newModifiers |= PlatformEvent::RightButtonDown; | 126 newModifiers |= PlatformEvent::RightButtonDown; |
127 return newModifiers; | 127 return newModifiers; |
128 } | 128 } |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 modifiers = getWebInputModifiers(event); | 810 modifiers = getWebInputModifiers(event); |
811 | 811 |
812 globalX = event.screenX(); | 812 globalX = event.screenX(); |
813 globalY = event.screenY(); | 813 globalY = event.screenY(); |
814 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL
ocation(), *layoutObject); | 814 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL
ocation(), *layoutObject); |
815 x = localPoint.x(); | 815 x = localPoint.x(); |
816 y = localPoint.y(); | 816 y = localPoint.y(); |
817 } | 817 } |
818 | 818 |
819 } // namespace blink | 819 } // namespace blink |
OLD | NEW |