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

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

Issue 181153003: Make Event RefCountedGarbageCollected and implement trace() methods to the Event hierarcy (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 bool WheelEvent::isMouseEvent() const 119 bool WheelEvent::isMouseEvent() const
120 { 120 {
121 return false; 121 return false;
122 } 122 }
123 123
124 bool WheelEvent::isWheelEvent() const 124 bool WheelEvent::isWheelEvent() const
125 { 125 {
126 return true; 126 return true;
127 } 127 }
128 128
129 void WheelEvent::trace(Visitor* visitor)
130 {
131 MouseEvent::trace(visitor);
132 }
133
129 inline static unsigned deltaMode(const PlatformWheelEvent& event) 134 inline static unsigned deltaMode(const PlatformWheelEvent& event)
130 { 135 {
131 return event.granularity() == ScrollByPageWheelEvent ? WheelEvent::DOM_DELTA _PAGE : WheelEvent::DOM_DELTA_PIXEL; 136 return event.granularity() == ScrollByPageWheelEvent ? WheelEvent::DOM_DELTA _PAGE : WheelEvent::DOM_DELTA_PIXEL;
132 } 137 }
133 138
134 PassRefPtr<WheelEventDispatchMediator> WheelEventDispatchMediator::create(const PlatformWheelEvent& event, PassRefPtr<AbstractView> view) 139 PassRefPtr<WheelEventDispatchMediator> WheelEventDispatchMediator::create(const PlatformWheelEvent& event, PassRefPtr<AbstractView> view)
135 { 140 {
136 return adoptRef(new WheelEventDispatchMediator(event, view)); 141 return adoptRef(new WheelEventDispatchMediator(event, view));
137 } 142 }
138 143
(...skipping 12 matching lines...) Expand all
151 return toWheelEvent(EventDispatchMediator::event()); 156 return toWheelEvent(EventDispatchMediator::event());
152 } 157 }
153 158
154 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t 159 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t
155 { 160 {
156 ASSERT(event()); 161 ASSERT(event());
157 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled(); 162 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled();
158 } 163 }
159 164
160 } // namespace WebCore 165 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698