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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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, 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 16 matching lines...) Expand all
27 #include "platform/PlatformMouseEvent.h" 27 #include "platform/PlatformMouseEvent.h"
28 #include "platform/PlatformWheelEvent.h" 28 #include "platform/PlatformWheelEvent.h"
29 29
30 namespace blink { 30 namespace blink {
31 31
32 inline static unsigned convertDeltaMode(const PlatformWheelEvent& event) 32 inline static unsigned convertDeltaMode(const PlatformWheelEvent& event)
33 { 33 {
34 return event.granularity() == ScrollByPageWheelEvent ? WheelEvent::DOM_DELTA _PAGE : WheelEvent::DOM_DELTA_PIXEL; 34 return event.granularity() == ScrollByPageWheelEvent ? WheelEvent::DOM_DELTA _PAGE : WheelEvent::DOM_DELTA_PIXEL;
35 } 35 }
36 36
37 PassRefPtrWillBeRawPtr<WheelEvent> WheelEvent::create(const PlatformWheelEvent& event, PassRefPtrWillBeRawPtr<AbstractView> view) 37 RawPtr<WheelEvent> WheelEvent::create(const PlatformWheelEvent& event, RawPtr<Ab stractView> view)
38 { 38 {
39 return adoptRefWillBeNoop(new WheelEvent(FloatPoint(event.wheelTicksX(), eve nt.wheelTicksY()), FloatPoint(event.deltaX(), event.deltaY()), 39 return (new WheelEvent(FloatPoint(event.wheelTicksX(), event.wheelTicksY()), FloatPoint(event.deltaX(), event.deltaY()),
40 convertDeltaMode(event), view, event.globalPosition(), event.position(), 40 convertDeltaMode(event), view, event.globalPosition(), event.position(),
41 event.modifiers(), 41 event.modifiers(),
42 MouseEvent::platformModifiersToButtons(event.modifiers()), event.timesta mp(), 42 MouseEvent::platformModifiersToButtons(event.modifiers()), event.timesta mp(),
43 event.canScroll(), event.resendingPluginId(), event.hasPreciseScrollingD eltas(), 43 event.canScroll(), event.resendingPluginId(), event.hasPreciseScrollingD eltas(),
44 static_cast<Event::RailsMode>(event.railsMode()))); 44 static_cast<Event::RailsMode>(event.railsMode())));
45 } 45 }
46 46
47 WheelEvent::WheelEvent() 47 WheelEvent::WheelEvent()
48 : m_deltaX(0) 48 : m_deltaX(0)
49 , m_deltaY(0) 49 , m_deltaY(0)
(...skipping 14 matching lines...) Expand all
64 , m_deltaZ(initializer.deltaZ()) 64 , m_deltaZ(initializer.deltaZ())
65 , m_deltaMode(initializer.deltaMode()) 65 , m_deltaMode(initializer.deltaMode())
66 , m_canScroll(true) 66 , m_canScroll(true)
67 , m_resendingPluginId(-1) 67 , m_resendingPluginId(-1)
68 , m_hasPreciseScrollingDeltas(false) 68 , m_hasPreciseScrollingDeltas(false)
69 , m_railsMode(RailsModeFree) 69 , m_railsMode(RailsModeFree)
70 { 70 {
71 } 71 }
72 72
73 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode, 73 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode,
74 PassRefPtrWillBeRawPtr<AbstractView> view, const IntPoint& screenLocation, c onst IntPoint& windowLocation, 74 RawPtr<AbstractView> view, const IntPoint& screenLocation, const IntPoint& w indowLocation,
75 PlatformEvent::Modifiers modifiers, unsigned short buttons, double platformT imeStamp, 75 PlatformEvent::Modifiers modifiers, unsigned short buttons, double platformT imeStamp,
76 bool canScroll, int resendingPluginId, bool hasPreciseScrollingDeltas, Rails Mode railsMode) 76 bool canScroll, int resendingPluginId, bool hasPreciseScrollingDeltas, Rails Mode railsMode)
77 : MouseEvent(EventTypeNames::wheel, true, true, view, 0, screenLocation.x(), screenLocation.y(), 77 : MouseEvent(EventTypeNames::wheel, true, true, view, 0, screenLocation.x(), screenLocation.y(),
78 windowLocation.x(), windowLocation.y(), 0, 0, modifiers, 0, buttons, 78 windowLocation.x(), windowLocation.y(), 0, 0, modifiers, 0, buttons,
79 nullptr, platformTimeStamp, PlatformMouseEvent::RealOrIndistinguishable) 79 nullptr, platformTimeStamp, PlatformMouseEvent::RealOrIndistinguishable)
80 , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultipl ier) 80 , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultipl ier)
81 , m_deltaX(-rawDelta.x()) 81 , m_deltaX(-rawDelta.x())
82 , m_deltaY(-rawDelta.y()) 82 , m_deltaY(-rawDelta.y())
83 , m_deltaZ(0) 83 , m_deltaZ(0)
84 , m_deltaMode(deltaMode) 84 , m_deltaMode(deltaMode)
(...skipping 12 matching lines...) Expand all
97 bool WheelEvent::isMouseEvent() const 97 bool WheelEvent::isMouseEvent() const
98 { 98 {
99 return false; 99 return false;
100 } 100 }
101 101
102 bool WheelEvent::isWheelEvent() const 102 bool WheelEvent::isWheelEvent() const
103 { 103 {
104 return true; 104 return true;
105 } 105 }
106 106
107 PassRefPtrWillBeRawPtr<EventDispatchMediator> WheelEvent::createMediator() 107 RawPtr<EventDispatchMediator> WheelEvent::createMediator()
108 { 108 {
109 return WheelEventDispatchMediator::create(this); 109 return WheelEventDispatchMediator::create(this);
110 } 110 }
111 111
112 DEFINE_TRACE(WheelEvent) 112 DEFINE_TRACE(WheelEvent)
113 { 113 {
114 MouseEvent::trace(visitor); 114 MouseEvent::trace(visitor);
115 } 115 }
116 116
117 PassRefPtrWillBeRawPtr<WheelEventDispatchMediator> WheelEventDispatchMediator::c reate(PassRefPtrWillBeRawPtr<WheelEvent> event) 117 RawPtr<WheelEventDispatchMediator> WheelEventDispatchMediator::create(RawPtr<Whe elEvent> event)
118 { 118 {
119 return adoptRefWillBeNoop(new WheelEventDispatchMediator(event)); 119 return (new WheelEventDispatchMediator(event));
120 } 120 }
121 121
122 WheelEventDispatchMediator::WheelEventDispatchMediator(PassRefPtrWillBeRawPtr<Wh eelEvent> event) 122 WheelEventDispatchMediator::WheelEventDispatchMediator(RawPtr<WheelEvent> event)
123 : EventDispatchMediator(event) 123 : EventDispatchMediator(event)
124 { 124 {
125 } 125 }
126 126
127 WheelEvent& WheelEventDispatchMediator::event() const 127 WheelEvent& WheelEventDispatchMediator::event() const
128 { 128 {
129 return toWheelEvent(EventDispatchMediator::event()); 129 return toWheelEvent(EventDispatchMediator::event());
130 } 130 }
131 131
132 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons t 132 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons t
133 { 133 {
134 return EventDispatchMediator::dispatchEvent(dispatcher) && !event().defaultH andled(); 134 return EventDispatchMediator::dispatchEvent(dispatcher) && !event().defaultH andled();
135 } 135 }
136 136
137 } // namespace blink 137 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698