Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: Source/core/events/MouseRelatedEvent.h

Issue 1174683004: Populates sourceDevice attribute into MouseEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 MouseRelatedEvent(const AtomicString& type, bool canBubble, bool cancela ble, 68 MouseRelatedEvent(const AtomicString& type, bool canBubble, bool cancela ble,
69 PassRefPtrWillBeRawPtr<AbstractView>, int detail, const IntPoint& sc reenLocation, 69 PassRefPtrWillBeRawPtr<AbstractView>, int detail, const IntPoint& sc reenLocation,
70 const IntPoint& rootFrameLocation, const IntPoint& movementDelta, bo ol ctrlKey, bool altKey, 70 const IntPoint& rootFrameLocation, const IntPoint& movementDelta, bo ol ctrlKey, bool altKey,
71 bool shiftKey, bool metaKey, bool isSimulated = false); 71 bool shiftKey, bool metaKey, bool isSimulated = false, InputDevice* sourceDevice = nullptr);
Rick Byers 2015/06/25 03:34:54 nit: as discussed offline, default InputDevice val
lanwei 2015/06/25 19:26:40 Done.
72 72
73 void initCoordinates(); 73 void initCoordinates();
74 void initCoordinates(const LayoutPoint& clientLocation); 74 void initCoordinates(const LayoutPoint& clientLocation);
75 virtual void receivedTarget() override final; 75 virtual void receivedTarget() override final;
76 76
77 void computePageLocation(); 77 void computePageLocation();
78 void computeRelativePosition(); 78 void computeRelativePosition();
79 79
80 // Expose these so MouseEvent::initMouseEvent can set them. 80 // Expose these so MouseEvent::initMouseEvent can set them.
81 IntPoint m_screenLocation; 81 IntPoint m_screenLocation;
82 LayoutPoint m_clientLocation; 82 LayoutPoint m_clientLocation;
83 LayoutPoint m_movementDelta; 83 LayoutPoint m_movementDelta;
84 84
85 private: 85 private:
86 LayoutPoint m_pageLocation; 86 LayoutPoint m_pageLocation;
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698