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

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

Issue 2227803003: Plumb phase/momentum for WheelEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 updateWebMouseEventFromCoreMouseEvent(event, widget, layoutItem, *this); 634 updateWebMouseEventFromCoreMouseEvent(event, widget, layoutItem, *this);
635 deltaX = -event.deltaX(); 635 deltaX = -event.deltaX();
636 deltaY = -event.deltaY(); 636 deltaY = -event.deltaY();
637 wheelTicksX = event.ticksX(); 637 wheelTicksX = event.ticksX();
638 wheelTicksY = event.ticksY(); 638 wheelTicksY = event.ticksY();
639 scrollByPage = event.deltaMode() == WheelEvent::kDomDeltaPage; 639 scrollByPage = event.deltaMode() == WheelEvent::kDomDeltaPage;
640 resendingPluginId = event.resendingPluginId(); 640 resendingPluginId = event.resendingPluginId();
641 railsMode = static_cast<RailsMode>(event.getRailsMode()); 641 railsMode = static_cast<RailsMode>(event.getRailsMode());
642 hasPreciseScrollingDeltas = event.hasPreciseScrollingDeltas(); 642 hasPreciseScrollingDeltas = event.hasPreciseScrollingDeltas();
643 dispatchType = event.cancelable() ? WebInputEvent::Blocking : WebInputEvent: :EventNonBlocking; 643 dispatchType = event.cancelable() ? WebInputEvent::Blocking : WebInputEvent: :EventNonBlocking;
644 #if OS(MACOSX)
645 phase = static_cast<Phase>(event.phase());
646 momentumPhase = static_cast<Phase>(event.momentumPhase());
647 canRubberbandLeft = static_cast<Phase>(event.canRubberbandLeft());
648 canRubberbandRight = event.canRubberbandRight();
649 #endif
644 } 650 }
645 651
646 WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event) 652 WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event)
647 { 653 {
648 if (event.type() == EventTypeNames::keydown) 654 if (event.type() == EventTypeNames::keydown)
649 type = KeyDown; 655 type = KeyDown;
650 else if (event.type() == EventTypeNames::keyup) 656 else if (event.type() == EventTypeNames::keyup)
651 type = WebInputEvent::KeyUp; 657 type = WebInputEvent::KeyUp;
652 else if (event.type() == EventTypeNames::keypress) 658 else if (event.type() == EventTypeNames::keypress)
653 type = WebInputEvent::Char; 659 type = WebInputEvent::Char;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 break; 822 break;
817 case GestureSourceTouchscreen: 823 case GestureSourceTouchscreen:
818 sourceDevice = WebGestureDeviceTouchscreen; 824 sourceDevice = WebGestureDeviceTouchscreen;
819 break; 825 break;
820 case GestureSourceUninitialized: 826 case GestureSourceUninitialized:
821 NOTREACHED(); 827 NOTREACHED();
822 } 828 }
823 } 829 }
824 830
825 } // namespace blink 831 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698