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

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

Issue 1654653002: Canvas2d: Implement rerouting event by hit region's control. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass existing tests. Created 4 years, 10 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, 2005, 2006, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 , m_syntheticEventType(syntheticEventType) 128 , m_syntheticEventType(syntheticEventType)
129 { 129 {
130 } 130 }
131 131
132 MouseEvent::MouseEvent(const AtomicString& eventType, const MouseEventInit& init ializer) 132 MouseEvent::MouseEvent(const AtomicString& eventType, const MouseEventInit& init ializer)
133 : MouseRelatedEvent(eventType, initializer) 133 : MouseRelatedEvent(eventType, initializer)
134 , m_button(initializer.button()) 134 , m_button(initializer.button())
135 , m_buttons(initializer.buttons()) 135 , m_buttons(initializer.buttons())
136 , m_relatedTarget(initializer.relatedTarget()) 136 , m_relatedTarget(initializer.relatedTarget())
137 , m_syntheticEventType(PlatformMouseEvent::RealOrIndistinguishable) 137 , m_syntheticEventType(PlatformMouseEvent::RealOrIndistinguishable)
138 , m_region(initializer.region())
138 { 139 {
139 } 140 }
140 141
141 MouseEvent::~MouseEvent() 142 MouseEvent::~MouseEvent()
142 { 143 {
143 } 144 }
144 145
145 unsigned short MouseEvent::platformModifiersToButtons(unsigned modifiers) 146 unsigned short MouseEvent::platformModifiersToButtons(unsigned modifiers)
146 { 147 {
147 unsigned short buttons = 0; 148 unsigned short buttons = 0;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 doubleClickEvent->setTrusted(mouseEvent.isTrusted()); 304 doubleClickEvent->setTrusted(mouseEvent.isTrusted());
304 if (mouseEvent.defaultHandled()) 305 if (mouseEvent.defaultHandled())
305 doubleClickEvent->setDefaultHandled(); 306 doubleClickEvent->setDefaultHandled();
306 EventDispatcher::dispatchEvent(dispatcher.node(), MouseEventDispatchMediator ::create(doubleClickEvent)); 307 EventDispatcher::dispatchEvent(dispatcher.node(), MouseEventDispatchMediator ::create(doubleClickEvent));
307 if (doubleClickEvent->defaultHandled() || doubleClickEvent->defaultPrevented ()) 308 if (doubleClickEvent->defaultHandled() || doubleClickEvent->defaultPrevented ())
308 return false; 309 return false;
309 return !swallowEvent; 310 return !swallowEvent;
310 } 311 }
311 312
312 } // namespace blink 313 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698