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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 canBubble, | 161 canBubble, |
162 cancelable, | 162 cancelable, |
163 abstractView, | 163 abstractView, |
164 detail, | 164 detail, |
165 static_cast<WebInputEvent::Modifiers>(event.modifiers()), | 165 static_cast<WebInputEvent::Modifiers>(event.modifiers()), |
166 TimeTicks::FromSeconds(event.timeStampSeconds()), | 166 TimeTicks::FromSeconds(event.timeStampSeconds()), |
167 abstractView | 167 abstractView |
168 ? abstractView->getInputDeviceCapabilities()->firesTouchEvents( | 168 ? abstractView->getInputDeviceCapabilities()->firesTouchEvents( |
169 event.fromTouch()) | 169 event.fromTouch()) |
170 : nullptr), | 170 : nullptr), |
171 m_screenLocation(event.globalX, event.globalY), | 171 m_screenLocation(event.positionInScreen().x, event.positionInScreen().y), |
172 m_movementDelta(flooredIntPoint(event.movementInRootFrame())), | 172 m_movementDelta(flooredIntPoint(event.movementInRootFrame())), |
173 m_positionType(PositionType::Position), | 173 m_positionType(PositionType::Position), |
174 m_button(static_cast<short>(event.button)), | 174 m_button(static_cast<short>(event.button)), |
175 m_buttons(webInputEventModifiersToButtons(event.modifiers())), | 175 m_buttons(webInputEventModifiersToButtons(event.modifiers())), |
176 m_relatedTarget(relatedTarget), | 176 m_relatedTarget(relatedTarget), |
177 m_syntheticEventType(event.fromTouch() ? FromTouch | 177 m_syntheticEventType(event.fromTouch() ? FromTouch |
178 : RealOrIndistinguishable), | 178 : RealOrIndistinguishable), |
179 m_region(region) { | 179 m_region(region) { |
180 IntPoint rootFrameCoordinates = flooredIntPoint(event.positionInRootFrame()); | 180 IntPoint rootFrameCoordinates = flooredIntPoint(event.positionInRootFrame()); |
181 initCoordinatesFromRootFrame(rootFrameCoordinates.x(), | 181 initCoordinatesFromRootFrame(rootFrameCoordinates.x(), |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 | 570 |
571 int MouseEvent::offsetY() { | 571 int MouseEvent::offsetY() { |
572 if (!hasPosition()) | 572 if (!hasPosition()) |
573 return 0; | 573 return 0; |
574 if (!m_hasCachedRelativePosition) | 574 if (!m_hasCachedRelativePosition) |
575 computeRelativePosition(); | 575 computeRelativePosition(); |
576 return std::round(m_offsetLocation.y()); | 576 return std::round(m_offsetLocation.y()); |
577 } | 577 } |
578 | 578 |
579 } // namespace blink | 579 } // namespace blink |
OLD | NEW |