| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 can_bubble, | 35 can_bubble, |
| 36 cancelable, | 36 cancelable, |
| 37 ComposedMode::kComposed, | 37 ComposedMode::kComposed, |
| 38 platform_time_stamp, | 38 platform_time_stamp, |
| 39 view, | 39 view, |
| 40 detail, | 40 detail, |
| 41 source_capabilities), | 41 source_capabilities), |
| 42 modifiers_(modifiers) {} | 42 modifiers_(modifiers) {} |
| 43 | 43 |
| 44 UIEventWithKeyState::UIEventWithKeyState(const AtomicString& type, | 44 UIEventWithKeyState::UIEventWithKeyState(const AtomicString& type, |
| 45 const EventModifierInit& initializer) | 45 const EventModifierInit& initializer, |
| 46 : UIEvent(type, initializer), modifiers_(0) { | 46 TimeTicks platform_time_stamp) |
| 47 : UIEvent(type, initializer, platform_time_stamp), modifiers_(0) { |
| 47 if (initializer.ctrlKey()) | 48 if (initializer.ctrlKey()) |
| 48 modifiers_ |= WebInputEvent::kControlKey; | 49 modifiers_ |= WebInputEvent::kControlKey; |
| 49 if (initializer.shiftKey()) | 50 if (initializer.shiftKey()) |
| 50 modifiers_ |= WebInputEvent::kShiftKey; | 51 modifiers_ |= WebInputEvent::kShiftKey; |
| 51 if (initializer.altKey()) | 52 if (initializer.altKey()) |
| 52 modifiers_ |= WebInputEvent::kAltKey; | 53 modifiers_ |= WebInputEvent::kAltKey; |
| 53 if (initializer.metaKey()) | 54 if (initializer.metaKey()) |
| 54 modifiers_ |= WebInputEvent::kMetaKey; | 55 modifiers_ |= WebInputEvent::kMetaKey; |
| 55 if (initializer.modifierAltGraph()) | 56 if (initializer.modifierAltGraph()) |
| 56 modifiers_ |= WebInputEvent::kAltGrKey; | 57 modifiers_ |= WebInputEvent::kAltGrKey; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 } | 153 } |
| 153 | 154 |
| 154 UIEventWithKeyState* FindEventWithKeyState(Event* event) { | 155 UIEventWithKeyState* FindEventWithKeyState(Event* event) { |
| 155 for (Event* e = event; e; e = e->UnderlyingEvent()) | 156 for (Event* e = event; e; e = e->UnderlyingEvent()) |
| 156 if (e->IsKeyboardEvent() || e->IsMouseEvent()) | 157 if (e->IsKeyboardEvent() || e->IsMouseEvent()) |
| 157 return static_cast<UIEventWithKeyState*>(e); | 158 return static_cast<UIEventWithKeyState*>(e); |
| 158 return nullptr; | 159 return nullptr; |
| 159 } | 160 } |
| 160 | 161 |
| 161 } // namespace blink | 162 } // namespace blink |
| OLD | NEW |