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

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

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 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/core/events/WebKitAnimationEvent.cpp ('k') | Source/core/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 * 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 28 matching lines...) Expand all
39 , deltaMode(WheelEvent::DOM_DELTA_PIXEL) 39 , deltaMode(WheelEvent::DOM_DELTA_PIXEL)
40 { 40 {
41 } 41 }
42 42
43 WheelEvent::WheelEvent() 43 WheelEvent::WheelEvent()
44 : m_deltaX(0) 44 : m_deltaX(0)
45 , m_deltaY(0) 45 , m_deltaY(0)
46 , m_deltaZ(0) 46 , m_deltaZ(0)
47 , m_deltaMode(DOM_DELTA_PIXEL) 47 , m_deltaMode(DOM_DELTA_PIXEL)
48 { 48 {
49 ScriptWrappable::init(this);
50 } 49 }
51 50
52 WheelEvent::WheelEvent(const AtomicString& type, const WheelEventInit& initializ er) 51 WheelEvent::WheelEvent(const AtomicString& type, const WheelEventInit& initializ er)
53 : MouseEvent(type, initializer) 52 : MouseEvent(type, initializer)
54 , m_wheelDelta(initializer.wheelDeltaX ? initializer.wheelDeltaX : -initiali zer.deltaX, initializer.wheelDeltaY ? initializer.wheelDeltaY : -initializer.del taY) 53 , m_wheelDelta(initializer.wheelDeltaX ? initializer.wheelDeltaX : -initiali zer.deltaX, initializer.wheelDeltaY ? initializer.wheelDeltaY : -initializer.del taY)
55 , m_deltaX(initializer.deltaX ? initializer.deltaX : -initializer.wheelDelta X) 54 , m_deltaX(initializer.deltaX ? initializer.deltaX : -initializer.wheelDelta X)
56 , m_deltaY(initializer.deltaY ? initializer.deltaY : -initializer.wheelDelta Y) 55 , m_deltaY(initializer.deltaY ? initializer.deltaY : -initializer.wheelDelta Y)
57 , m_deltaZ(initializer.deltaZ) 56 , m_deltaZ(initializer.deltaZ)
58 , m_deltaMode(initializer.deltaMode) 57 , m_deltaMode(initializer.deltaMode)
59 { 58 {
60 ScriptWrappable::init(this);
61 } 59 }
62 60
63 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode, 61 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode,
64 PassRefPtrWillBeRawPtr<AbstractView> view, const IntPoint& screenLocation, c onst IntPoint& pageLocation, 62 PassRefPtrWillBeRawPtr<AbstractView> view, const IntPoint& screenLocation, c onst IntPoint& pageLocation,
65 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) 63 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
66 : MouseEvent(EventTypeNames::wheel, true, true, view, 0, screenLocation.x(), screenLocation.y(), 64 : MouseEvent(EventTypeNames::wheel, true, true, view, 0, screenLocation.x(), screenLocation.y(),
67 pageLocation.x(), pageLocation.y(), 0, 0, ctrlKey, altKey, shiftKey, met aKey, 0, nullptr, 65 pageLocation.x(), pageLocation.y(), 0, 0, ctrlKey, altKey, shiftKey, met aKey, 0, nullptr,
68 nullptr, false, PlatformMouseEvent::RealOrIndistinguishable) 66 nullptr, false, PlatformMouseEvent::RealOrIndistinguishable)
69 , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultipl ier) 67 , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultipl ier)
70 , m_deltaX(-rawDelta.x()) 68 , m_deltaX(-rawDelta.x())
71 , m_deltaY(-rawDelta.y()) 69 , m_deltaY(-rawDelta.y())
72 , m_deltaZ(0) 70 , m_deltaZ(0)
73 , m_deltaMode(deltaMode) 71 , m_deltaMode(deltaMode)
74 { 72 {
75 ScriptWrappable::init(this);
76 } 73 }
77 74
78 const AtomicString& WheelEvent::interfaceName() const 75 const AtomicString& WheelEvent::interfaceName() const
79 { 76 {
80 return EventNames::WheelEvent; 77 return EventNames::WheelEvent;
81 } 78 }
82 79
83 bool WheelEvent::isMouseEvent() const 80 bool WheelEvent::isMouseEvent() const
84 { 81 {
85 return false; 82 return false;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 return toWheelEvent(EventDispatchMediator::event()); 117 return toWheelEvent(EventDispatchMediator::event());
121 } 118 }
122 119
123 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t 120 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t
124 { 121 {
125 ASSERT(event()); 122 ASSERT(event());
126 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled(); 123 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled();
127 } 124 }
128 125
129 } // namespace blink 126 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/events/WebKitAnimationEvent.cpp ('k') | Source/core/fileapi/Blob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698