| 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, 2004, 2005, 2006 Apple Computer, Inc. | 5 * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. |
| 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 27 matching lines...) Expand all Loading... |
| 38 Position, | 38 Position, |
| 39 // Positionless mouse events are used, for example, for 'click' events f
rom keyboard input. | 39 // Positionless mouse events are used, for example, for 'click' events f
rom keyboard input. |
| 40 // It's kind of surprising for a mouse event not to have a position. | 40 // It's kind of surprising for a mouse event not to have a position. |
| 41 Positionless | 41 Positionless |
| 42 }; | 42 }; |
| 43 // Note that these values are adjusted to counter the effects of zoom, so th
at values | 43 // Note that these values are adjusted to counter the effects of zoom, so th
at values |
| 44 // exposed via DOM APIs are invariant under zooming. | 44 // exposed via DOM APIs are invariant under zooming. |
| 45 int screenX() const { return m_screenLocation.x(); } | 45 int screenX() const { return m_screenLocation.x(); } |
| 46 int screenY() const { return m_screenLocation.y(); } | 46 int screenY() const { return m_screenLocation.y(); } |
| 47 const IntPoint& screenLocation() const { return m_screenLocation; } | 47 const IntPoint& screenLocation() const { return m_screenLocation; } |
| 48 int clientX() const { return m_clientLocation.x(); } | 48 int clientX() const { return m_clientLocation.x().toInt(); } |
| 49 int clientY() const { return m_clientLocation.y(); } | 49 int clientY() const { return m_clientLocation.y().toInt(); } |
| 50 int movementX() const { return m_movementDelta.x(); } | 50 int movementX() const { return m_movementDelta.x().toInt(); } |
| 51 int movementY() const { return m_movementDelta.y(); } | 51 int movementY() const { return m_movementDelta.y().toInt(); } |
| 52 const LayoutPoint& clientLocation() const { return m_clientLocation; } | 52 const LayoutPoint& clientLocation() const { return m_clientLocation; } |
| 53 int layerX(); | 53 int layerX(); |
| 54 int layerY(); | 54 int layerY(); |
| 55 int offsetX(); | 55 int offsetX(); |
| 56 int offsetY(); | 56 int offsetY(); |
| 57 int pageX() const; | 57 int pageX() const; |
| 58 int pageY() const; | 58 int pageY() const; |
| 59 int x() const; | 59 int x() const; |
| 60 int y() const; | 60 int y() const; |
| 61 bool hasPosition() const { return m_positionType == PositionType::Position;
} | 61 bool hasPosition() const { return m_positionType == PositionType::Position;
} |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 LayoutPoint m_layerLocation; | 94 LayoutPoint m_layerLocation; |
| 95 LayoutPoint m_offsetLocation; | 95 LayoutPoint m_offsetLocation; |
| 96 LayoutPoint m_absoluteLocation; | 96 LayoutPoint m_absoluteLocation; |
| 97 PositionType m_positionType; | 97 PositionType m_positionType; |
| 98 bool m_hasCachedRelativePosition; | 98 bool m_hasCachedRelativePosition; |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 } // namespace blink | 101 } // namespace blink |
| 102 | 102 |
| 103 #endif // MouseRelatedEvent_h | 103 #endif // MouseRelatedEvent_h |
| OLD | NEW |