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

Unified Diff: ui/events/event.cc

Issue 101573006: Changes MouseEvent constructor to take changed_button_flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test; needs updated expectations as mouse entered wasnt sent before because of env::mouse_butto… Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/event.h ('k') | ui/events/event_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event.cc
diff --git a/ui/events/event.cc b/ui/events/event.cc
index 246e39721f2f6a20ec8c75c339ea95721c1f3a6a..22e1625add8b3219ee53f93f21ec9fc9d6b6fc6e 100644
--- a/ui/events/event.cc
+++ b/ui/events/event.cc
@@ -281,9 +281,10 @@ MouseEvent::MouseEvent(const base::NativeEvent& native_event)
MouseEvent::MouseEvent(EventType type,
const gfx::Point& location,
const gfx::Point& root_location,
- int flags)
+ int flags,
+ int changed_button_flags)
: LocatedEvent(type, location, root_location, EventTimeForNow(), flags),
- changed_button_flags_(0) {
+ changed_button_flags_(changed_button_flags) {
if (this->type() == ET_MOUSE_MOVED && IsAnyButton())
SetType(ET_MOUSE_DRAGGED);
}
@@ -664,7 +665,7 @@ ScrollEvent::ScrollEvent(EventType type,
float x_offset_ordinal,
float y_offset_ordinal,
int finger_count)
- : MouseEvent(type, location, location, flags),
+ : MouseEvent(type, location, location, flags, 0),
x_offset_(x_offset),
y_offset_(y_offset),
x_offset_ordinal_(x_offset_ordinal),
« no previous file with comments | « ui/events/event.h ('k') | ui/events/event_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698