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

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

Issue 658953003: Remove redundant Mac event structures (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/mac/ScrollElasticityController.mm ('k') | no next file » | 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 if (e.modifiers & WebInputEvent::AltKey) 161 if (e.modifiers & WebInputEvent::AltKey)
162 m_modifiers |= PlatformEvent::AltKey; 162 m_modifiers |= PlatformEvent::AltKey;
163 if (e.modifiers & WebInputEvent::MetaKey) 163 if (e.modifiers & WebInputEvent::MetaKey)
164 m_modifiers |= PlatformEvent::MetaKey; 164 m_modifiers |= PlatformEvent::MetaKey;
165 165
166 m_hasPreciseScrollingDeltas = e.hasPreciseScrollingDeltas; 166 m_hasPreciseScrollingDeltas = e.hasPreciseScrollingDeltas;
167 #if OS(MACOSX) 167 #if OS(MACOSX)
168 m_phase = static_cast<PlatformWheelEventPhase>(e.phase); 168 m_phase = static_cast<PlatformWheelEventPhase>(e.phase);
169 m_momentumPhase = static_cast<PlatformWheelEventPhase>(e.momentumPhase); 169 m_momentumPhase = static_cast<PlatformWheelEventPhase>(e.momentumPhase);
170 m_timestamp = e.timeStampSeconds; 170 m_timestamp = e.timeStampSeconds;
171 m_scrollCount = 0;
172 m_unacceleratedScrollingDeltaX = e.deltaX;
173 m_unacceleratedScrollingDeltaY = e.deltaY;
174 m_canRubberbandLeft = e.canRubberbandLeft; 171 m_canRubberbandLeft = e.canRubberbandLeft;
175 m_canRubberbandRight = e.canRubberbandRight; 172 m_canRubberbandRight = e.canRubberbandRight;
176 #endif 173 #endif
177 } 174 }
178 175
179 // PlatformGestureEventBuilder ------------------------------------------------- - 176 // PlatformGestureEventBuilder ------------------------------------------------- -
180 177
181 PlatformGestureEventBuilder::PlatformGestureEventBuilder(Widget* widget, const W ebGestureEvent& e) 178 PlatformGestureEventBuilder::PlatformGestureEventBuilder(Widget* widget, const W ebGestureEvent& e)
182 { 179 {
183 float scale = widgetInputEventsScaleFactor(widget); 180 float scale = widgetInputEventsScaleFactor(widget);
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 modifiers = getWebInputModifiers(event); 826 modifiers = getWebInputModifiers(event);
830 827
831 globalX = event.screenX(); 828 globalX = event.screenX();
832 globalY = event.screenY(); 829 globalY = event.screenY();
833 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL ocation(), *renderObject); 830 IntPoint localPoint = convertAbsoluteLocationForRenderObject(event.absoluteL ocation(), *renderObject);
834 x = localPoint.x(); 831 x = localPoint.x();
835 y = localPoint.y(); 832 y = localPoint.y();
836 } 833 }
837 834
838 } // namespace blink 835 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/mac/ScrollElasticityController.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698