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

Side by Side Diff: Source/core/events/WheelEvent.cpp

Issue 1232003009: Implement DragEvent and move MouseEvent.dataTransfer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix plugin failure of LayoutTest Created 5 years, 4 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/input/EventHandler.cpp » ('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, 2005, 2006, 2008, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2008, 2010 Apple Inc. All rights reserved.
6 * Copyright (C) 2013 Samsung Electronics. All rights reserved. 6 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 , m_hasPreciseScrollingDeltas(false) 67 , m_hasPreciseScrollingDeltas(false)
68 , m_railsMode(RailsModeFree) 68 , m_railsMode(RailsModeFree)
69 { 69 {
70 } 70 }
71 71
72 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode, 72 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode,
73 PassRefPtrWillBeRawPtr<AbstractView> view, const IntPoint& screenLocation, c onst IntPoint& windowLocation, 73 PassRefPtrWillBeRawPtr<AbstractView> view, const IntPoint& screenLocation, c onst IntPoint& windowLocation,
74 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short butto ns, bool canScroll, bool hasPreciseScrollingDeltas, RailsMode railsMode) 74 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short butto ns, bool canScroll, bool hasPreciseScrollingDeltas, RailsMode railsMode)
75 : MouseEvent(EventTypeNames::wheel, true, true, view, 0, screenLocation.x(), screenLocation.y(), 75 : MouseEvent(EventTypeNames::wheel, true, true, view, 0, screenLocation.x(), screenLocation.y(),
76 windowLocation.x(), windowLocation.y(), 0, 0, ctrlKey, altKey, shiftKey, metaKey, 0, buttons, 76 windowLocation.x(), windowLocation.y(), 0, 0, ctrlKey, altKey, shiftKey, metaKey, 0, buttons,
77 nullptr, nullptr, false, PlatformMouseEvent::RealOrIndistinguishable) 77 nullptr, false, PlatformMouseEvent::RealOrIndistinguishable)
78 , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultipl ier) 78 , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultipl ier)
79 , m_deltaX(-rawDelta.x()) 79 , m_deltaX(-rawDelta.x())
80 , m_deltaY(-rawDelta.y()) 80 , m_deltaY(-rawDelta.y())
81 , m_deltaZ(0) 81 , m_deltaZ(0)
82 , m_deltaMode(deltaMode) 82 , m_deltaMode(deltaMode)
83 , m_canScroll(canScroll) 83 , m_canScroll(canScroll)
84 , m_hasPreciseScrollingDeltas(hasPreciseScrollingDeltas) 84 , m_hasPreciseScrollingDeltas(hasPreciseScrollingDeltas)
85 , m_railsMode(railsMode) 85 , m_railsMode(railsMode)
86 { 86 {
87 } 87 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 128
129 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons t 129 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons t
130 { 130 {
131 if (!(event().deltaX() || event().deltaY())) 131 if (!(event().deltaX() || event().deltaY()))
132 return true; 132 return true;
133 return EventDispatchMediator::dispatchEvent(dispatcher) && !event().defaultH andled(); 133 return EventDispatchMediator::dispatchEvent(dispatcher) && !event().defaultH andled();
134 } 134 }
135 135
136 } // namespace blink 136 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/events/MouseEvent.idl ('k') | Source/core/input/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698