Chromium Code Reviews| 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 25 matching lines...) Expand all Loading... | |
| 36 // Note that these values are adjusted to counter the effects of zoom, s o that values | 36 // Note that these values are adjusted to counter the effects of zoom, s o that values |
| 37 // exposed via DOM APIs are invariant under zooming. | 37 // exposed via DOM APIs are invariant under zooming. |
| 38 int screenX() const { return m_screenLocation.x(); } | 38 int screenX() const { return m_screenLocation.x(); } |
| 39 int screenY() const { return m_screenLocation.y(); } | 39 int screenY() const { return m_screenLocation.y(); } |
| 40 const IntPoint& screenLocation() const { return m_screenLocation; } | 40 const IntPoint& screenLocation() const { return m_screenLocation; } |
| 41 int clientX() const { return m_clientLocation.x(); } | 41 int clientX() const { return m_clientLocation.x(); } |
| 42 int clientY() const { return m_clientLocation.y(); } | 42 int clientY() const { return m_clientLocation.y(); } |
| 43 int movementX() const { return m_movementDelta.x(); } | 43 int movementX() const { return m_movementDelta.x(); } |
| 44 int movementY() const { return m_movementDelta.y(); } | 44 int movementY() const { return m_movementDelta.y(); } |
| 45 const LayoutPoint& clientLocation() const { return m_clientLocation; } | 45 const LayoutPoint& clientLocation() const { return m_clientLocation; } |
| 46 virtual int layerX() override final; | 46 int layerX(); |
|
philipj_slow
2015/07/01 14:17:46
Good riddance pointless virtual!
| |
| 47 virtual int layerY() override final; | 47 int layerY(); |
| 48 int offsetX(); | 48 int offsetX(); |
| 49 int offsetY(); | 49 int offsetY(); |
| 50 // FIXME: rename isSimulated to fromKeyboard() and replace m_isSimulated with a new value | 50 // FIXME: rename isSimulated to fromKeyboard() and replace m_isSimulated with a new value |
| 51 // in PlatformMouseEvent::SyntheticEventType. isSimulated() is only true for synthetic | 51 // in PlatformMouseEvent::SyntheticEventType. isSimulated() is only true for synthetic |
| 52 // mouse events that derive from keyboard input, which do not have a pos ition. | 52 // mouse events that derive from keyboard input, which do not have a pos ition. |
| 53 bool isSimulated() const { return m_isSimulated; } | 53 bool isSimulated() const { return m_isSimulated; } |
| 54 virtual int pageX() const override final; | 54 int pageX() const; |
| 55 virtual int pageY() const override final; | 55 int pageY() const; |
| 56 int x() const; | 56 int x() const; |
| 57 int y() const; | 57 int y() const; |
| 58 | 58 |
| 59 // Page point in "absolute" coordinates (i.e. post-zoomed, page-relative coords, | 59 // Page point in "absolute" coordinates (i.e. post-zoomed, page-relative coords, |
| 60 // usable with LayoutObject::absoluteToLocal). | 60 // usable with LayoutObject::absoluteToLocal). |
| 61 const LayoutPoint& absoluteLocation() const { return m_absoluteLocation; } | 61 const LayoutPoint& absoluteLocation() const { return m_absoluteLocation; } |
| 62 void setAbsoluteLocation(const LayoutPoint& p) { m_absoluteLocation = p; } | 62 void setAbsoluteLocation(const LayoutPoint& p) { m_absoluteLocation = p; } |
| 63 | 63 |
| 64 DECLARE_VIRTUAL_TRACE(); | 64 DECLARE_VIRTUAL_TRACE(); |
| 65 | 65 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 87 LayoutPoint m_layerLocation; | 87 LayoutPoint m_layerLocation; |
| 88 LayoutPoint m_offsetLocation; | 88 LayoutPoint m_offsetLocation; |
| 89 LayoutPoint m_absoluteLocation; | 89 LayoutPoint m_absoluteLocation; |
| 90 bool m_isSimulated; | 90 bool m_isSimulated; |
| 91 bool m_hasCachedRelativePosition; | 91 bool m_hasCachedRelativePosition; |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace blink | 94 } // namespace blink |
| 95 | 95 |
| 96 #endif // MouseRelatedEvent_h | 96 #endif // MouseRelatedEvent_h |
| OLD | NEW |