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

Side by Side Diff: Source/WebCore/dom/WheelEvent.cpp

Issue 13814002: First part of work to move V8 binding integrity off of vtables. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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
« no previous file with comments | « Source/WebCore/dom/UIEvent.cpp ('k') | Source/WebCore/fileapi/Blob.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 * 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 25 matching lines...) Expand all
36 : wheelDeltaX(0) 36 : wheelDeltaX(0)
37 , wheelDeltaY(0) 37 , wheelDeltaY(0)
38 , deltaMode(WheelEvent::DOM_DELTA_PIXEL) 38 , deltaMode(WheelEvent::DOM_DELTA_PIXEL)
39 { 39 {
40 } 40 }
41 41
42 WheelEvent::WheelEvent() 42 WheelEvent::WheelEvent()
43 : m_deltaMode(DOM_DELTA_PIXEL) 43 : m_deltaMode(DOM_DELTA_PIXEL)
44 , m_directionInvertedFromDevice(false) 44 , m_directionInvertedFromDevice(false)
45 { 45 {
46 ScriptWrappable::init(this);
46 } 47 }
47 48
48 WheelEvent::WheelEvent(const AtomicString& type, const WheelEventInit& initializ er) 49 WheelEvent::WheelEvent(const AtomicString& type, const WheelEventInit& initializ er)
49 : MouseEvent(type, initializer) 50 : MouseEvent(type, initializer)
50 , m_wheelDelta(IntPoint(initializer.wheelDeltaX, initializer.wheelDeltaY)) 51 , m_wheelDelta(IntPoint(initializer.wheelDeltaX, initializer.wheelDeltaY))
51 , m_deltaMode(initializer.deltaMode) 52 , m_deltaMode(initializer.deltaMode)
52 { 53 {
54 ScriptWrappable::init(this);
53 } 55 }
54 56
55 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode, 57 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode,
56 PassRefPtr<AbstractView> view, const IntPoint& screenLocation, const IntPoin t& pageLocation, 58 PassRefPtr<AbstractView> view, const IntPoint& screenLocation, const IntPoin t& pageLocation,
57 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool directionInvert edFromDevice) 59 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool directionInvert edFromDevice)
58 : MouseEvent(eventNames().mousewheelEvent, 60 : MouseEvent(eventNames().mousewheelEvent,
59 true, true, view, 0, screenLocation.x(), screenLocation.y(), 61 true, true, view, 0, screenLocation.x(), screenLocation.y(),
60 pageLocation.x(), pageLocation.y(), 62 pageLocation.x(), pageLocation.y(),
61 #if ENABLE(POINTER_LOCK) 63 #if ENABLE(POINTER_LOCK)
62 0, 0, 64 0, 0,
63 #endif 65 #endif
64 ctrlKey, altKey, shiftKey, metaKey, 0, 0, 0, false) 66 ctrlKey, altKey, shiftKey, metaKey, 0, 0, 0, false)
65 , m_wheelDelta(IntPoint(static_cast<int>(wheelTicks.x() * TickMultiplier), s tatic_cast<int>(wheelTicks.y() * TickMultiplier))) 67 , m_wheelDelta(IntPoint(static_cast<int>(wheelTicks.x() * TickMultiplier), s tatic_cast<int>(wheelTicks.y() * TickMultiplier)))
66 , m_rawDelta(roundedIntPoint(rawDelta)) 68 , m_rawDelta(roundedIntPoint(rawDelta))
67 , m_deltaMode(deltaMode) 69 , m_deltaMode(deltaMode)
68 , m_directionInvertedFromDevice(directionInvertedFromDevice) 70 , m_directionInvertedFromDevice(directionInvertedFromDevice)
69 { 71 {
72 ScriptWrappable::init(this);
70 } 73 }
71 74
72 void WheelEvent::initWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<Abstrac tView> view, 75 void WheelEvent::initWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<Abstrac tView> view,
73 int screenX, int screenY, int pageX, int pageY, 76 int screenX, int screenY, int pageX, int pageY,
74 bool ctrlKey, bool altKey, bool shiftKey, bool m etaKey) 77 bool ctrlKey, bool altKey, bool shiftKey, bool m etaKey)
75 { 78 {
76 if (dispatched()) 79 if (dispatched())
77 return; 80 return;
78 81
79 initUIEvent(eventNames().mousewheelEvent, true, true, view, 0); 82 initUIEvent(eventNames().mousewheelEvent, true, true, view, 0);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 return static_cast<WheelEvent*>(EventDispatchMediator::event()); 140 return static_cast<WheelEvent*>(EventDispatchMediator::event());
138 } 141 }
139 142
140 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t 143 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t
141 { 144 {
142 ASSERT(event()); 145 ASSERT(event());
143 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled(); 146 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled();
144 } 147 }
145 148
146 } // namespace WebCore 149 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/dom/UIEvent.cpp ('k') | Source/WebCore/fileapi/Blob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698