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

Side by Side Diff: sky/engine/core/events/WheelEvent.cpp

Issue 706123005: Remove nop ScriptWrappable::init calls (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/events/UIEvent.cpp ('k') | sky/engine/core/frame/Console.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 27 matching lines...) Expand all
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_deltaX(0) 43 : m_deltaX(0)
44 , m_deltaY(0) 44 , m_deltaY(0)
45 , m_deltaZ(0) 45 , m_deltaZ(0)
46 , m_deltaMode(DOM_DELTA_PIXEL) 46 , m_deltaMode(DOM_DELTA_PIXEL)
47 { 47 {
48 ScriptWrappable::init(this);
49 } 48 }
50 49
51 WheelEvent::WheelEvent(const AtomicString& type, const WheelEventInit& initializ er) 50 WheelEvent::WheelEvent(const AtomicString& type, const WheelEventInit& initializ er)
52 : MouseEvent(type, initializer) 51 : MouseEvent(type, initializer)
53 , m_wheelDelta(initializer.wheelDeltaX ? initializer.wheelDeltaX : -initiali zer.deltaX, initializer.wheelDeltaY ? initializer.wheelDeltaY : -initializer.del taY) 52 , m_wheelDelta(initializer.wheelDeltaX ? initializer.wheelDeltaX : -initiali zer.deltaX, initializer.wheelDeltaY ? initializer.wheelDeltaY : -initializer.del taY)
54 , m_deltaX(initializer.deltaX ? initializer.deltaX : -initializer.wheelDelta X) 53 , m_deltaX(initializer.deltaX ? initializer.deltaX : -initializer.wheelDelta X)
55 , m_deltaY(initializer.deltaY ? initializer.deltaY : -initializer.wheelDelta Y) 54 , m_deltaY(initializer.deltaY ? initializer.deltaY : -initializer.wheelDelta Y)
56 , m_deltaZ(initializer.deltaZ) 55 , m_deltaZ(initializer.deltaZ)
57 , m_deltaMode(initializer.deltaMode) 56 , m_deltaMode(initializer.deltaMode)
58 { 57 {
59 ScriptWrappable::init(this);
60 } 58 }
61 59
62 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode, 60 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode,
63 PassRefPtr<AbstractView> view, const IntPoint& screenLocation, const IntPoin t& pageLocation, 61 PassRefPtr<AbstractView> view, const IntPoint& screenLocation, const IntPoin t& pageLocation,
64 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) 62 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
65 : MouseEvent(EventTypeNames::wheel, true, true, view, 0, screenLocation.x(), screenLocation.y(), 63 : MouseEvent(EventTypeNames::wheel, true, true, view, 0, screenLocation.x(), screenLocation.y(),
66 pageLocation.x(), pageLocation.y(), 0, 0, ctrlKey, altKey, shiftKey, met aKey, 0, 64 pageLocation.x(), pageLocation.y(), 0, 0, ctrlKey, altKey, shiftKey, met aKey, 0,
67 nullptr, false, PlatformMouseEvent::RealOrIndistinguishable) 65 nullptr, false, PlatformMouseEvent::RealOrIndistinguishable)
68 , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultipl ier) 66 , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultipl ier)
69 , m_deltaX(-rawDelta.x()) 67 , m_deltaX(-rawDelta.x())
70 , m_deltaY(-rawDelta.y()) 68 , m_deltaY(-rawDelta.y())
71 , m_deltaZ(0) 69 , m_deltaZ(0)
72 , m_deltaMode(deltaMode) 70 , m_deltaMode(deltaMode)
73 { 71 {
74 ScriptWrappable::init(this);
75 } 72 }
76 73
77 const AtomicString& WheelEvent::interfaceName() const 74 const AtomicString& WheelEvent::interfaceName() const
78 { 75 {
79 return EventNames::WheelEvent; 76 return EventNames::WheelEvent;
80 } 77 }
81 78
82 bool WheelEvent::isMouseEvent() const 79 bool WheelEvent::isMouseEvent() const
83 { 80 {
84 return false; 81 return false;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 return toWheelEvent(EventDispatchMediator::event()); 116 return toWheelEvent(EventDispatchMediator::event());
120 } 117 }
121 118
122 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t 119 bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons t
123 { 120 {
124 ASSERT(event()); 121 ASSERT(event());
125 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled(); 122 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled();
126 } 123 }
127 124
128 } // namespace blink 125 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/events/UIEvent.cpp ('k') | sky/engine/core/frame/Console.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698