OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) |
3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) | 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) |
4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
5 * Copyright (C) 2003, 2005, 2006, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2008 Apple Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 : PositionType::kPosition), | 222 : PositionType::kPosition), |
223 button_(button), | 223 button_(button), |
224 buttons_(buttons), | 224 buttons_(buttons), |
225 related_target_(related_target), | 225 related_target_(related_target), |
226 synthetic_event_type_(synthetic_event_type), | 226 synthetic_event_type_(synthetic_event_type), |
227 region_(region) { | 227 region_(region) { |
228 InitCoordinatesFromRootFrame(window_x, window_y); | 228 InitCoordinatesFromRootFrame(window_x, window_y); |
229 } | 229 } |
230 | 230 |
231 MouseEvent::MouseEvent(const AtomicString& event_type, | 231 MouseEvent::MouseEvent(const AtomicString& event_type, |
232 const MouseEventInit& initializer) | 232 const MouseEventInit& initializer, |
233 : UIEventWithKeyState(event_type, initializer), | 233 TimeTicks platform_time_stamp) |
| 234 : UIEventWithKeyState(event_type, initializer, platform_time_stamp), |
234 screen_location_( | 235 screen_location_( |
235 DoublePoint(initializer.screenX(), initializer.screenY())), | 236 DoublePoint(initializer.screenX(), initializer.screenY())), |
236 movement_delta_( | 237 movement_delta_( |
237 IntPoint(initializer.movementX(), initializer.movementY())), | 238 IntPoint(initializer.movementX(), initializer.movementY())), |
238 position_type_(PositionType::kPosition), | 239 position_type_(PositionType::kPosition), |
239 button_(initializer.button()), | 240 button_(initializer.button()), |
240 buttons_(initializer.buttons()), | 241 buttons_(initializer.buttons()), |
241 related_target_(initializer.relatedTarget()), | 242 related_target_(initializer.relatedTarget()), |
242 synthetic_event_type_(kRealOrIndistinguishable), | 243 synthetic_event_type_(kRealOrIndistinguishable), |
243 region_(initializer.region()) { | 244 region_(initializer.region()) { |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 | 576 |
576 int MouseEvent::offsetY() { | 577 int MouseEvent::offsetY() { |
577 if (!HasPosition()) | 578 if (!HasPosition()) |
578 return 0; | 579 return 0; |
579 if (!has_cached_relative_position_) | 580 if (!has_cached_relative_position_) |
580 ComputeRelativePosition(); | 581 ComputeRelativePosition(); |
581 return std::round(offset_location_.Y()); | 582 return std::round(offset_location_.Y()); |
582 } | 583 } |
583 | 584 |
584 } // namespace blink | 585 } // namespace blink |
OLD | NEW |