| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 66 protected: | 66 protected: |
| 67 MouseRelatedEvent(); | 67 MouseRelatedEvent(); |
| 68 // TODO(lanwei): Will make this argument non-optional and all the caller
s need to provide |
| 69 // sourceDevice even when it is null, see https://crbug.com/476530. |
| 68 MouseRelatedEvent(const AtomicString& type, bool canBubble, bool cancela
ble, | 70 MouseRelatedEvent(const AtomicString& type, bool canBubble, bool cancela
ble, |
| 69 PassRefPtrWillBeRawPtr<AbstractView>, int detail, const IntPoint& sc
reenLocation, | 71 PassRefPtrWillBeRawPtr<AbstractView>, int detail, const IntPoint& sc
reenLocation, |
| 70 const IntPoint& rootFrameLocation, const IntPoint& movementDelta, bo
ol ctrlKey, bool altKey, | 72 const IntPoint& rootFrameLocation, const IntPoint& movementDelta, bo
ol ctrlKey, bool altKey, |
| 71 bool shiftKey, bool metaKey, bool isSimulated = false); | 73 bool shiftKey, bool metaKey, bool isSimulated = false, InputDevice*
sourceDevice = nullptr); |
| 72 | 74 |
| 73 void initCoordinates(); | 75 void initCoordinates(); |
| 74 void initCoordinates(const LayoutPoint& clientLocation); | 76 void initCoordinates(const LayoutPoint& clientLocation); |
| 75 virtual void receivedTarget() override final; | 77 virtual void receivedTarget() override final; |
| 76 | 78 |
| 77 void computePageLocation(); | 79 void computePageLocation(); |
| 78 void computeRelativePosition(); | 80 void computeRelativePosition(); |
| 79 | 81 |
| 80 // Expose these so MouseEvent::initMouseEvent can set them. | 82 // Expose these so MouseEvent::initMouseEvent can set them. |
| 81 IntPoint m_screenLocation; | 83 IntPoint m_screenLocation; |
| 82 LayoutPoint m_clientLocation; | 84 LayoutPoint m_clientLocation; |
| 83 LayoutPoint m_movementDelta; | 85 LayoutPoint m_movementDelta; |
| 84 | 86 |
| 85 private: | 87 private: |
| 86 LayoutPoint m_pageLocation; | 88 LayoutPoint m_pageLocation; |
| 87 LayoutPoint m_layerLocation; | 89 LayoutPoint m_layerLocation; |
| 88 LayoutPoint m_offsetLocation; | 90 LayoutPoint m_offsetLocation; |
| 89 LayoutPoint m_absoluteLocation; | 91 LayoutPoint m_absoluteLocation; |
| 90 bool m_isSimulated; | 92 bool m_isSimulated; |
| 91 bool m_hasCachedRelativePosition; | 93 bool m_hasCachedRelativePosition; |
| 92 }; | 94 }; |
| 93 | 95 |
| 94 } // namespace blink | 96 } // namespace blink |
| 95 | 97 |
| 96 #endif // MouseRelatedEvent_h | 98 #endif // MouseRelatedEvent_h |
| OLD | NEW |