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

Side by Side Diff: third_party/WebKit/Source/core/events/MouseEvent.h

Issue 2296303002: Make a pen in eraser mode visible thru PointerEvent.buttons (Closed)
Patch Set: Incremental patch on crrev.com/2289273002 Created 4 years, 3 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, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 bool fromTouch() const { return m_syntheticEventType == PlatformMouseEvent:: FromTouch; } 86 bool fromTouch() const { return m_syntheticEventType == PlatformMouseEvent:: FromTouch; }
87 87
88 const AtomicString& interfaceName() const override; 88 const AtomicString& interfaceName() const override;
89 89
90 bool isMouseEvent() const override; 90 bool isMouseEvent() const override;
91 int which() const final; 91 int which() const final;
92 92
93 EventDispatchMediator* createMediator() override; 93 EventDispatchMediator* createMediator() override;
94 94
95 // Follows the definition of |buttons| in the PointerEvent Spec:
96 // https://w3c.github.io/pointerevents/#the-buttons-property
97 // which extends the UI Events Spec definition:
98 // https://www.w3.org/TR/uievents/#interface-mouseevent
95 enum class Buttons : unsigned { 99 enum class Buttons : unsigned {
96 None = 0, 100 None = 0,
97 Left = 1 << 0, 101 Left = 1 << 0,
98 Right = 1 << 1, 102 Right = 1 << 1,
99 Middle = 1 << 2 103 Middle = 1 << 2,
104 X1 = 1 << 3,
105 X2 = 1 << 4,
106 Eraser = 1 << 5
100 }; 107 };
101 108
102 DECLARE_VIRTUAL_TRACE(); 109 DECLARE_VIRTUAL_TRACE();
103 110
104 protected: 111 protected:
105 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, Abstra ctView*, 112 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, Abstra ctView*,
106 int detail, int screenX, int screenY, int windowX, int windowY, 113 int detail, int screenX, int screenY, int windowX, int windowY,
107 int movementX, int movementY, 114 int movementX, int movementY,
108 PlatformEvent::Modifiers, short button, unsigned short buttons, 115 PlatformEvent::Modifiers, short button, unsigned short buttons,
109 EventTarget* relatedTarget, 116 EventTarget* relatedTarget,
(...skipping 30 matching lines...) Expand all
140 MouseEvent& event() const; 147 MouseEvent& event() const;
141 148
142 DispatchEventResult dispatchEvent(EventDispatcher&) const override; 149 DispatchEventResult dispatchEvent(EventDispatcher&) const override;
143 }; 150 };
144 151
145 DEFINE_EVENT_TYPE_CASTS(MouseEvent); 152 DEFINE_EVENT_TYPE_CASTS(MouseEvent);
146 153
147 } // namespace blink 154 } // namespace blink
148 155
149 #endif // MouseEvent_h 156 #endif // MouseEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698