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

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

Issue 1201193005: Move UIEvent.pageX/pageY/layerX/layerY to MouseEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase again; UseCounter changed already again Created 5 years, 5 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
« no previous file with comments | « Source/core/events/MouseEvent.idl ('k') | Source/core/events/UIEvent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25 matching lines...) Expand all
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();
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 23 matching lines...) Expand all
89 LayoutPoint m_layerLocation; 89 LayoutPoint m_layerLocation;
90 LayoutPoint m_offsetLocation; 90 LayoutPoint m_offsetLocation;
91 LayoutPoint m_absoluteLocation; 91 LayoutPoint m_absoluteLocation;
92 bool m_isSimulated; 92 bool m_isSimulated;
93 bool m_hasCachedRelativePosition; 93 bool m_hasCachedRelativePosition;
94 }; 94 };
95 95
96 } // namespace blink 96 } // namespace blink
97 97
98 #endif // MouseRelatedEvent_h 98 #endif // MouseRelatedEvent_h
OLDNEW
« no previous file with comments | « Source/core/events/MouseEvent.idl ('k') | Source/core/events/UIEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698