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

Side by Side Diff: Source/web/WebInputEventConversion.cpp

Issue 703983002: Add preventPropagation bit to GestureScrollUpdate event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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 | « Source/web/WebInputEvent.cpp ('k') | Source/web/WebViewImpl.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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 break; 176 break;
177 case WebInputEvent::GestureFlingStart: 177 case WebInputEvent::GestureFlingStart:
178 m_type = PlatformEvent::GestureFlingStart; 178 m_type = PlatformEvent::GestureFlingStart;
179 break; 179 break;
180 case WebInputEvent::GestureScrollUpdate: 180 case WebInputEvent::GestureScrollUpdate:
181 m_type = PlatformEvent::GestureScrollUpdate; 181 m_type = PlatformEvent::GestureScrollUpdate;
182 m_data.m_scrollUpdate.m_deltaX = scaleDeltaToWindow(widget, e.data.scrol lUpdate.deltaX); 182 m_data.m_scrollUpdate.m_deltaX = scaleDeltaToWindow(widget, e.data.scrol lUpdate.deltaX);
183 m_data.m_scrollUpdate.m_deltaY = scaleDeltaToWindow(widget, e.data.scrol lUpdate.deltaY); 183 m_data.m_scrollUpdate.m_deltaY = scaleDeltaToWindow(widget, e.data.scrol lUpdate.deltaY);
184 m_data.m_scrollUpdate.m_velocityX = e.data.scrollUpdate.velocityX; 184 m_data.m_scrollUpdate.m_velocityX = e.data.scrollUpdate.velocityX;
185 m_data.m_scrollUpdate.m_velocityY = e.data.scrollUpdate.velocityY; 185 m_data.m_scrollUpdate.m_velocityY = e.data.scrollUpdate.velocityY;
186 m_data.m_scrollUpdate.m_preventPropagation = e.data.scrollUpdate.prevent Propagation;
186 break; 187 break;
187 case WebInputEvent::GestureScrollUpdateWithoutPropagation: 188 case WebInputEvent::GestureScrollUpdateWithoutPropagation:
188 m_type = PlatformEvent::GestureScrollUpdateWithoutPropagation; 189 m_type = PlatformEvent::GestureScrollUpdateWithoutPropagation;
189 m_data.m_scrollUpdate.m_deltaX = scaleDeltaToWindow(widget, e.data.scrol lUpdate.deltaX); 190 m_data.m_scrollUpdate.m_deltaX = scaleDeltaToWindow(widget, e.data.scrol lUpdate.deltaX);
190 m_data.m_scrollUpdate.m_deltaY = scaleDeltaToWindow(widget, e.data.scrol lUpdate.deltaY); 191 m_data.m_scrollUpdate.m_deltaY = scaleDeltaToWindow(widget, e.data.scrol lUpdate.deltaY);
191 m_data.m_scrollUpdate.m_velocityX = e.data.scrollUpdate.velocityX; 192 m_data.m_scrollUpdate.m_velocityX = e.data.scrollUpdate.velocityX;
192 m_data.m_scrollUpdate.m_velocityY = e.data.scrollUpdate.velocityY; 193 m_data.m_scrollUpdate.m_velocityY = e.data.scrollUpdate.velocityY;
194 m_data.m_scrollUpdate.m_preventPropagation = e.data.scrollUpdate.prevent Propagation;
193 break; 195 break;
194 case WebInputEvent::GestureTap: 196 case WebInputEvent::GestureTap:
195 m_type = PlatformEvent::GestureTap; 197 m_type = PlatformEvent::GestureTap;
196 m_area = expandedIntSize(scaleSizeToWindow(widget, FloatSize(e.data.tap. width, e.data.tap.height))); 198 m_area = expandedIntSize(scaleSizeToWindow(widget, FloatSize(e.data.tap. width, e.data.tap.height)));
197 m_data.m_tap.m_tapCount = e.data.tap.tapCount; 199 m_data.m_tap.m_tapCount = e.data.tap.tapCount;
198 break; 200 break;
199 case WebInputEvent::GestureTapUnconfirmed: 201 case WebInputEvent::GestureTapUnconfirmed:
200 m_type = PlatformEvent::GestureTapUnconfirmed; 202 m_type = PlatformEvent::GestureTapUnconfirmed;
201 m_area = expandedIntSize(scaleSizeToWindow(widget, FloatSize(e.data.tap. width, e.data.tap.height))); 203 m_area = expandedIntSize(scaleSizeToWindow(widget, FloatSize(e.data.tap. width, e.data.tap.height)));
202 break; 204 break;
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 modifiers = getWebInputModifiers(event); 816 modifiers = getWebInputModifiers(event);
815 817
816 globalX = event.screenX(); 818 globalX = event.screenX();
817 globalY = event.screenY(); 819 globalY = event.screenY();
818 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL ocation(), *renderObject); 820 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL ocation(), *renderObject);
819 x = localPoint.x(); 821 x = localPoint.x();
820 y = localPoint.y(); 822 y = localPoint.y();
821 } 823 }
822 824
823 } // namespace blink 825 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebInputEvent.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698