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

Side by Side Diff: sky/engine/platform/PlatformGestureEvent.h

Issue 774053003: Remove TouchAdjustment. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/page/TouchAdjustment.cpp ('k') | sky/engine/public/web/WebSettings.h » ('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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 || m_type == PlatformEvent::GestureScrollUpdateWithoutPropagation); 99 || m_type == PlatformEvent::GestureScrollUpdateWithoutPropagation);
100 return m_data.m_scrollUpdate.m_velocityY; 100 return m_data.m_scrollUpdate.m_velocityY;
101 } 101 }
102 102
103 float scale() const 103 float scale() const
104 { 104 {
105 ASSERT(m_type == PlatformEvent::GesturePinchUpdate); 105 ASSERT(m_type == PlatformEvent::GesturePinchUpdate);
106 return m_data.m_pinchUpdate.m_scale; 106 return m_data.m_pinchUpdate.m_scale;
107 } 107 }
108 108
109 void applyTouchAdjustment(const IntPoint& adjustedPosition)
110 {
111 // Update the window-relative position of the event so that the node tha t was
112 // ultimately hit is under this point (i.e. elementFromPoint for the cli ent
113 // co-ordinates in a 'click' event should yield the target). The global
114 // position is intentionally left unmodified because it's intended to re flect
115 // raw co-ordinates unrelated to any content.
116 m_position = adjustedPosition;
117 }
118
119 bool isScrollEvent() const 109 bool isScrollEvent() const
120 { 110 {
121 switch (m_type) { 111 switch (m_type) {
122 case GestureScrollBegin: 112 case GestureScrollBegin:
123 case GestureScrollEnd: 113 case GestureScrollEnd:
124 case GestureScrollUpdate: 114 case GestureScrollUpdate:
125 case GestureScrollUpdateWithoutPropagation: 115 case GestureScrollUpdateWithoutPropagation:
126 case GestureFlingStart: 116 case GestureFlingStart:
127 case GesturePinchBegin: 117 case GesturePinchBegin:
128 case GesturePinchEnd: 118 case GesturePinchEnd:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 152
163 struct { 153 struct {
164 float m_scale; 154 float m_scale;
165 } m_pinchUpdate; 155 } m_pinchUpdate;
166 } m_data; 156 } m_data;
167 }; 157 };
168 158
169 } // namespace blink 159 } // namespace blink
170 160
171 #endif // SKY_ENGINE_PLATFORM_PLATFORMGESTUREEVENT_H_ 161 #endif // SKY_ENGINE_PLATFORM_PLATFORMGESTUREEVENT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/page/TouchAdjustment.cpp ('k') | sky/engine/public/web/WebSettings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698