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

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

Issue 850443002: Scroll Customization Prototype (Not for review, WIP) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase / cleanup / minor bug fixes Created 5 years, 9 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
« no previous file with comments | « Source/platform/PlatformGestureEvent.h ('k') | Source/web/WebViewImpl.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) 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 m_type = PlatformEvent::GestureScrollBegin; 218 m_type = PlatformEvent::GestureScrollBegin;
219 break; 219 break;
220 case WebInputEvent::GestureScrollEnd: 220 case WebInputEvent::GestureScrollEnd:
221 m_type = PlatformEvent::GestureScrollEnd; 221 m_type = PlatformEvent::GestureScrollEnd;
222 break; 222 break;
223 case WebInputEvent::GestureFlingStart: 223 case WebInputEvent::GestureFlingStart:
224 m_type = PlatformEvent::GestureFlingStart; 224 m_type = PlatformEvent::GestureFlingStart;
225 break; 225 break;
226 case WebInputEvent::GestureScrollUpdate: 226 case WebInputEvent::GestureScrollUpdate:
227 m_type = PlatformEvent::GestureScrollUpdate; 227 m_type = PlatformEvent::GestureScrollUpdate;
228 m_data.m_scrollUpdate.m_deltaX = scaleDeltaToWindow(widget, e.data.scrol lUpdate.deltaX); 228 m_data.m_scroll.m_deltaX = scaleDeltaToWindow(widget, e.data.scrollUpdat e.deltaX);
229 m_data.m_scrollUpdate.m_deltaY = scaleDeltaToWindow(widget, e.data.scrol lUpdate.deltaY); 229 m_data.m_scroll.m_deltaY = scaleDeltaToWindow(widget, e.data.scrollUpdat e.deltaY);
230 m_data.m_scrollUpdate.m_velocityX = e.data.scrollUpdate.velocityX; 230 m_data.m_scroll.m_velocityX = e.data.scrollUpdate.velocityX;
231 m_data.m_scrollUpdate.m_velocityY = e.data.scrollUpdate.velocityY; 231 m_data.m_scroll.m_velocityY = e.data.scrollUpdate.velocityY;
232 m_data.m_scrollUpdate.m_preventPropagation = e.data.scrollUpdate.prevent Propagation; 232 m_data.m_scroll.m_preventPropagation = e.data.scrollUpdate.preventPropag ation;
233 m_data.m_scroll.m_inertial = e.data.scrollUpdate.inertial;
233 break; 234 break;
234 case WebInputEvent::GestureTap: 235 case WebInputEvent::GestureTap:
235 m_type = PlatformEvent::GestureTap; 236 m_type = PlatformEvent::GestureTap;
236 m_area = expandedIntSize(scaleSizeToWindow(widget, FloatSize(e.data.tap. width, e.data.tap.height))); 237 m_area = expandedIntSize(scaleSizeToWindow(widget, FloatSize(e.data.tap. width, e.data.tap.height)));
237 m_data.m_tap.m_tapCount = e.data.tap.tapCount; 238 m_data.m_tap.m_tapCount = e.data.tap.tapCount;
238 break; 239 break;
239 case WebInputEvent::GestureTapUnconfirmed: 240 case WebInputEvent::GestureTapUnconfirmed:
240 m_type = PlatformEvent::GestureTapUnconfirmed; 241 m_type = PlatformEvent::GestureTapUnconfirmed;
241 m_area = expandedIntSize(scaleSizeToWindow(widget, FloatSize(e.data.tap. width, e.data.tap.height))); 242 m_area = expandedIntSize(scaleSizeToWindow(widget, FloatSize(e.data.tap. width, e.data.tap.height)));
242 break; 243 break;
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 modifiers = getWebInputModifiers(event); 811 modifiers = getWebInputModifiers(event);
811 812
812 globalX = event.screenX(); 813 globalX = event.screenX();
813 globalY = event.screenY(); 814 globalY = event.screenY();
814 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL ocation(), *layoutObject); 815 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL ocation(), *layoutObject);
815 x = localPoint.x(); 816 x = localPoint.x();
816 y = localPoint.y(); 817 y = localPoint.y();
817 } 818 }
818 819
819 } // namespace blink 820 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/PlatformGestureEvent.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698