OLD | NEW |
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 || m_type == PlatformEvent::GestureScrollEnd) | 128 || m_type == PlatformEvent::GestureScrollEnd) |
129 return m_data.m_scroll.m_resendingPluginId; | 129 return m_data.m_scroll.m_resendingPluginId; |
130 | 130 |
131 // This function is called by *all* gesture event types in | 131 // This function is called by *all* gesture event types in |
132 // GestureEvent::Create(), so we return -1 for all other types. | 132 // GestureEvent::Create(), so we return -1 for all other types. |
133 return -1; | 133 return -1; |
134 } | 134 } |
135 | 135 |
136 bool preventPropagation() const | 136 bool preventPropagation() const |
137 { | 137 { |
| 138 // TODO(tdresser) Once we've decided if we're getting rid of scroll |
| 139 // chaining, we should remove all scroll chaining related logic. See |
| 140 // crbug.com/526462 for details. |
138 ASSERT(m_type == PlatformEvent::GestureScrollUpdate); | 141 ASSERT(m_type == PlatformEvent::GestureScrollUpdate); |
139 return m_data.m_scroll.m_preventPropagation; | 142 return true; |
140 } | 143 } |
141 | 144 |
142 float scale() const | 145 float scale() const |
143 { | 146 { |
144 ASSERT(m_type == PlatformEvent::GesturePinchUpdate); | 147 ASSERT(m_type == PlatformEvent::GesturePinchUpdate); |
145 return m_data.m_pinchUpdate.m_scale; | 148 return m_data.m_pinchUpdate.m_scale; |
146 } | 149 } |
147 | 150 |
148 void applyTouchAdjustment(const IntPoint& adjustedPosition) | 151 void applyTouchAdjustment(const IntPoint& adjustedPosition) |
149 { | 152 { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 206 |
204 struct { | 207 struct { |
205 float m_scale; | 208 float m_scale; |
206 } m_pinchUpdate; | 209 } m_pinchUpdate; |
207 } m_data; | 210 } m_data; |
208 }; | 211 }; |
209 | 212 |
210 } // namespace blink | 213 } // namespace blink |
211 | 214 |
212 #endif // PlatformGestureEvent_h | 215 #endif // PlatformGestureEvent_h |
OLD | NEW |