| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 } | 115 } |
| 116 | 116 |
| 117 bool inertial() const | 117 bool inertial() const |
| 118 { | 118 { |
| 119 ASSERT(m_type == PlatformEvent::GestureScrollUpdate || m_type == Platfor
mEvent::GestureScrollEnd); | 119 ASSERT(m_type == PlatformEvent::GestureScrollUpdate || m_type == Platfor
mEvent::GestureScrollEnd); |
| 120 return m_data.m_scroll.m_inertial; | 120 return m_data.m_scroll.m_inertial; |
| 121 } | 121 } |
| 122 | 122 |
| 123 bool preventPropagation() const | 123 bool preventPropagation() const |
| 124 { | 124 { |
| 125 // TODO(tdresser) Once we've decided if we're getting rid of scroll |
| 126 // chaining, we should remove all scroll chaining related logic. See |
| 127 // crbug.com/526462 for details. |
| 125 ASSERT(m_type == PlatformEvent::GestureScrollUpdate); | 128 ASSERT(m_type == PlatformEvent::GestureScrollUpdate); |
| 126 return m_data.m_scroll.m_preventPropagation; | 129 return true; |
| 127 } | 130 } |
| 128 | 131 |
| 129 float scale() const | 132 float scale() const |
| 130 { | 133 { |
| 131 ASSERT(m_type == PlatformEvent::GesturePinchUpdate); | 134 ASSERT(m_type == PlatformEvent::GesturePinchUpdate); |
| 132 return m_data.m_pinchUpdate.m_scale; | 135 return m_data.m_pinchUpdate.m_scale; |
| 133 } | 136 } |
| 134 | 137 |
| 135 void applyTouchAdjustment(const IntPoint& adjustedPosition) | 138 void applyTouchAdjustment(const IntPoint& adjustedPosition) |
| 136 { | 139 { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 192 |
| 190 struct { | 193 struct { |
| 191 float m_scale; | 194 float m_scale; |
| 192 } m_pinchUpdate; | 195 } m_pinchUpdate; |
| 193 } m_data; | 196 } m_data; |
| 194 }; | 197 }; |
| 195 | 198 |
| 196 } // namespace blink | 199 } // namespace blink |
| 197 | 200 |
| 198 #endif // PlatformGestureEvent_h | 201 #endif // PlatformGestureEvent_h |
| OLD | NEW |