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

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

Issue 415773008: Remove dead code backing WheelEvent.webkitDirectionInvertedFromDevice (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | « no previous file | Source/core/events/WheelEvent.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, 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserv ed.
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 static PassRefPtrWillBeRawPtr<WheelEvent> create(const AtomicString& type, c onst WheelEventInit& initializer) 62 static PassRefPtrWillBeRawPtr<WheelEvent> create(const AtomicString& type, c onst WheelEventInit& initializer)
63 { 63 {
64 return adoptRefWillBeNoop(new WheelEvent(type, initializer)); 64 return adoptRefWillBeNoop(new WheelEvent(type, initializer));
65 } 65 }
66 66
67 static PassRefPtrWillBeRawPtr<WheelEvent> create(const FloatPoint& wheelTick s, 67 static PassRefPtrWillBeRawPtr<WheelEvent> create(const FloatPoint& wheelTick s,
68 const FloatPoint& rawDelta, unsigned deltaMode, PassRefPtrWillBeRawPtr<A bstractView> view, 68 const FloatPoint& rawDelta, unsigned deltaMode, PassRefPtrWillBeRawPtr<A bstractView> view,
69 const IntPoint& screenLocation, const IntPoint& pageLocation, 69 const IntPoint& screenLocation, const IntPoint& pageLocation,
70 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool directionIn vertedFromDevice) 70 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
71 { 71 {
72 return adoptRefWillBeNoop(new WheelEvent(wheelTicks, rawDelta, deltaMode , view, 72 return adoptRefWillBeNoop(new WheelEvent(wheelTicks, rawDelta, deltaMode , view,
73 screenLocation, pageLocation, ctrlKey, altKey, shiftKey, metaKey, direct ionInvertedFromDevice)); 73 screenLocation, pageLocation, ctrlKey, altKey, shiftKey, metaKey));
74 } 74 }
75 75
76 void initWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtrWillBeRawPtr<Abs tractView>, 76 void initWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtrWillBeRawPtr<Abs tractView>,
77 int screenX, int screenY, int pageX, int pageY, 77 int screenX, int screenY, int pageX, int pageY,
78 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); 78 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);
79 79
80 void initWebKitWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtrWillBeRawP tr<AbstractView>, 80 void initWebKitWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtrWillBeRawP tr<AbstractView>,
81 int screenX, int screenY, int pageX, int pageY, 81 int screenX, int screenY, int pageX, int pageY,
82 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); 82 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);
83 83
84 double deltaX() const { return m_deltaX; } // Positive when scrolling right. 84 double deltaX() const { return m_deltaX; } // Positive when scrolling right.
85 double deltaY() const { return m_deltaY; } // Positive when scrolling down. 85 double deltaY() const { return m_deltaY; } // Positive when scrolling down.
86 double deltaZ() const { return m_deltaZ; } 86 double deltaZ() const { return m_deltaZ; }
87 int wheelDelta() const { return wheelDeltaY() ? wheelDeltaY() : wheelDeltaX( ); } // Deprecated. 87 int wheelDelta() const { return wheelDeltaY() ? wheelDeltaY() : wheelDeltaX( ); } // Deprecated.
88 int wheelDeltaX() const { return m_wheelDelta.x(); } // Deprecated, negative when scrolling right. 88 int wheelDeltaX() const { return m_wheelDelta.x(); } // Deprecated, negative when scrolling right.
89 int wheelDeltaY() const { return m_wheelDelta.y(); } // Deprecated, negative when scrolling down. 89 int wheelDeltaY() const { return m_wheelDelta.y(); } // Deprecated, negative when scrolling down.
90 unsigned deltaMode() const { return m_deltaMode; } 90 unsigned deltaMode() const { return m_deltaMode; }
91 float ticksX() const { return static_cast<float>(m_wheelDelta.x()) / TickMul tiplier; } 91 float ticksX() const { return static_cast<float>(m_wheelDelta.x()) / TickMul tiplier; }
92 float ticksY() const { return static_cast<float>(m_wheelDelta.y()) / TickMul tiplier; } 92 float ticksY() const { return static_cast<float>(m_wheelDelta.y()) / TickMul tiplier; }
93 93
94 bool webkitDirectionInvertedFromDevice() const { return m_directionInvertedF romDevice; } 94 bool webkitDirectionInvertedFromDevice() const { return false; }
95 95
96 virtual const AtomicString& interfaceName() const OVERRIDE; 96 virtual const AtomicString& interfaceName() const OVERRIDE;
97 virtual bool isMouseEvent() const OVERRIDE; 97 virtual bool isMouseEvent() const OVERRIDE;
98 virtual bool isWheelEvent() const OVERRIDE; 98 virtual bool isWheelEvent() const OVERRIDE;
99 99
100 virtual void trace(Visitor*) OVERRIDE; 100 virtual void trace(Visitor*) OVERRIDE;
101 101
102 private: 102 private:
103 WheelEvent(); 103 WheelEvent();
104 WheelEvent(const AtomicString&, const WheelEventInit&); 104 WheelEvent(const AtomicString&, const WheelEventInit&);
105 WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, 105 WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,
106 unsigned, PassRefPtrWillBeRawPtr<AbstractView>, const IntPoint& screenLo cation, const IntPoint& pageLocation, 106 unsigned, PassRefPtrWillBeRawPtr<AbstractView>, const IntPoint& screenLo cation, const IntPoint& pageLocation,
107 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool directionIn vertedFromDevice); 107 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);
108 108
109 IntPoint m_wheelDelta; 109 IntPoint m_wheelDelta;
110 double m_deltaX; 110 double m_deltaX;
111 double m_deltaY; 111 double m_deltaY;
112 double m_deltaZ; 112 double m_deltaZ;
113 unsigned m_deltaMode; 113 unsigned m_deltaMode;
114 bool m_directionInvertedFromDevice;
115 }; 114 };
116 115
117 DEFINE_EVENT_TYPE_CASTS(WheelEvent); 116 DEFINE_EVENT_TYPE_CASTS(WheelEvent);
118 117
119 class WheelEventDispatchMediator FINAL : public EventDispatchMediator { 118 class WheelEventDispatchMediator FINAL : public EventDispatchMediator {
120 public: 119 public:
121 static PassRefPtrWillBeRawPtr<WheelEventDispatchMediator> create(const Platf ormWheelEvent&, PassRefPtrWillBeRawPtr<AbstractView>); 120 static PassRefPtrWillBeRawPtr<WheelEventDispatchMediator> create(const Platf ormWheelEvent&, PassRefPtrWillBeRawPtr<AbstractView>);
122 private: 121 private:
123 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtrWillBeRawPtr <AbstractView>); 122 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtrWillBeRawPtr <AbstractView>);
124 WheelEvent* event() const; 123 WheelEvent* event() const;
125 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; 124 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
126 }; 125 };
127 126
128 } // namespace blink 127 } // namespace blink
129 128
130 #endif // WheelEvent_h 129 #endif // WheelEvent_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/events/WheelEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698