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 29 matching lines...) Expand all Loading... |
40 int clientX() const { return m_clientLocation.x(); } | 40 int clientX() const { return m_clientLocation.x(); } |
41 int clientY() const { return m_clientLocation.y(); } | 41 int clientY() const { return m_clientLocation.y(); } |
42 int movementX() const { return m_movementDelta.x(); } | 42 int movementX() const { return m_movementDelta.x(); } |
43 int movementY() const { return m_movementDelta.y(); } | 43 int movementY() const { return m_movementDelta.y(); } |
44 const LayoutPoint& clientLocation() const { return m_clientLocation; } | 44 const LayoutPoint& clientLocation() const { return m_clientLocation; } |
45 virtual int layerX() OVERRIDE FINAL; | 45 virtual int layerX() OVERRIDE FINAL; |
46 virtual int layerY() OVERRIDE FINAL; | 46 virtual int layerY() OVERRIDE FINAL; |
47 int offsetX(); | 47 int offsetX(); |
48 int offsetY(); | 48 int offsetY(); |
49 bool isSimulated() const { return m_isSimulated; } | 49 bool isSimulated() const { return m_isSimulated; } |
| 50 bool derivesFromTouch() const { return m_derivesFromTouch; } |
50 virtual int pageX() const OVERRIDE FINAL; | 51 virtual int pageX() const OVERRIDE FINAL; |
51 virtual int pageY() const OVERRIDE FINAL; | 52 virtual int pageY() const OVERRIDE FINAL; |
52 int x() const; | 53 int x() const; |
53 int y() const; | 54 int y() const; |
54 | 55 |
55 // Page point in "absolute" coordinates (i.e. post-zoomed, page-relative
coords, | 56 // Page point in "absolute" coordinates (i.e. post-zoomed, page-relative
coords, |
56 // usable with RenderObject::absoluteToLocal). | 57 // usable with RenderObject::absoluteToLocal). |
57 const LayoutPoint& absoluteLocation() const { return m_absoluteLocation;
} | 58 const LayoutPoint& absoluteLocation() const { return m_absoluteLocation;
} |
58 void setAbsoluteLocation(const LayoutPoint& p) { m_absoluteLocation = p;
} | 59 void setAbsoluteLocation(const LayoutPoint& p) { m_absoluteLocation = p;
} |
59 | 60 |
60 virtual void trace(Visitor*) OVERRIDE; | 61 virtual void trace(Visitor*) OVERRIDE; |
61 | 62 |
62 protected: | 63 protected: |
63 MouseRelatedEvent(); | 64 MouseRelatedEvent(); |
64 MouseRelatedEvent(const AtomicString& type, bool canBubble, bool cancela
ble, PassRefPtrWillBeRawPtr<AbstractView>, | 65 MouseRelatedEvent(const AtomicString& type, bool canBubble, bool cancela
ble, |
65 int detail, const IntPoint& screenLocation, const IntP
oint& windowLocation, | 66 PassRefPtrWillBeRawPtr<AbstractView>, int detail, const IntPoint& sc
reenLocation, |
66 const IntPoint& movementDelta, | 67 const IntPoint& windowLocation, const IntPoint& movementDelta, bool
ctrlKey, bool altKey, |
67 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey
, bool isSimulated = false); | 68 bool shiftKey, bool metaKey, bool isSimulated = false, bool derivesF
romTouch = false); |
68 | 69 |
69 void initCoordinates(); | 70 void initCoordinates(); |
70 void initCoordinates(const LayoutPoint& clientLocation); | 71 void initCoordinates(const LayoutPoint& clientLocation); |
71 virtual void receivedTarget() OVERRIDE FINAL; | 72 virtual void receivedTarget() OVERRIDE FINAL; |
72 | 73 |
73 void computePageLocation(); | 74 void computePageLocation(); |
74 void computeRelativePosition(); | 75 void computeRelativePosition(); |
75 | 76 |
76 // Expose these so MouseEvent::initMouseEvent can set them. | 77 // Expose these so MouseEvent::initMouseEvent can set them. |
77 IntPoint m_screenLocation; | 78 IntPoint m_screenLocation; |
78 LayoutPoint m_clientLocation; | 79 LayoutPoint m_clientLocation; |
79 LayoutPoint m_movementDelta; | 80 LayoutPoint m_movementDelta; |
80 | 81 |
81 private: | 82 private: |
82 LayoutPoint m_pageLocation; | 83 LayoutPoint m_pageLocation; |
83 LayoutPoint m_layerLocation; | 84 LayoutPoint m_layerLocation; |
84 LayoutPoint m_offsetLocation; | 85 LayoutPoint m_offsetLocation; |
85 LayoutPoint m_absoluteLocation; | 86 LayoutPoint m_absoluteLocation; |
86 bool m_isSimulated; | 87 bool m_isSimulated; |
87 bool m_hasCachedRelativePosition; | 88 bool m_hasCachedRelativePosition; |
| 89 bool m_derivesFromTouch; |
88 }; | 90 }; |
89 | 91 |
90 } // namespace blink | 92 } // namespace blink |
91 | 93 |
92 #endif // MouseRelatedEvent_h | 94 #endif // MouseRelatedEvent_h |
OLD | NEW |