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