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

Side by Side Diff: Source/WebCore/page/EventHandler.cpp

Issue 11826009: Merge 139022 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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 | « LayoutTests/platform/chromium/fast/events/touch/gesture/touch-gesture-scroll-div-scaled-expected.txt ('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) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 2575 matching lines...) Expand 10 before | Expand all | Expand 10 after
2586 } 2586 }
2587 2587
2588 bool EventHandler::isScrollbarHandlingGestures() const 2588 bool EventHandler::isScrollbarHandlingGestures() const
2589 { 2589 {
2590 return m_scrollbarHandlingScrollGesture.get(); 2590 return m_scrollbarHandlingScrollGesture.get();
2591 } 2591 }
2592 2592
2593 bool EventHandler::handleGestureScrollCore(const PlatformGestureEvent& gestureEv ent, PlatformWheelEventGranularity granularity, bool latchedWheel) 2593 bool EventHandler::handleGestureScrollCore(const PlatformGestureEvent& gestureEv ent, PlatformWheelEventGranularity granularity, bool latchedWheel)
2594 { 2594 {
2595 const float tickDivisor = (float)WheelEvent::tickMultiplier; 2595 const float tickDivisor = (float)WheelEvent::tickMultiplier;
2596 const float scaleFactor = m_frame->pageZoomFactor() * m_frame->frameScaleFac tor();
2597 float scaledDeltaX = gestureEvent.deltaX() / scaleFactor;
2598 float scaledDeltaY = gestureEvent.deltaY() / scaleFactor;
2596 IntPoint point(gestureEvent.position().x(), gestureEvent.position().y()); 2599 IntPoint point(gestureEvent.position().x(), gestureEvent.position().y());
2597 IntPoint globalPoint(gestureEvent.globalPosition().x(), gestureEvent.globalP osition().y()); 2600 IntPoint globalPoint(gestureEvent.globalPosition().x(), gestureEvent.globalP osition().y());
2598 PlatformWheelEvent syntheticWheelEvent(point, globalPoint, 2601 PlatformWheelEvent syntheticWheelEvent(point, globalPoint,
2599 gestureEvent.deltaX(), gestureEvent.deltaY(), gestureEvent.deltaX() / ti ckDivisor, gestureEvent.deltaY() / tickDivisor, 2602 scaledDeltaX, scaledDeltaY, scaledDeltaX / tickDivisor, scaledDeltaY / t ickDivisor,
2600 granularity, 2603 granularity,
2601 gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey()); 2604 gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey());
2602 syntheticWheelEvent.setUseLatchedEventNode(latchedWheel); 2605 syntheticWheelEvent.setUseLatchedEventNode(latchedWheel);
2603 return handleWheelEvent(syntheticWheelEvent); 2606 return handleWheelEvent(syntheticWheelEvent);
2604 } 2607 }
2605 #endif 2608 #endif
2606 2609
2607 #if ENABLE(TOUCH_ADJUSTMENT) 2610 #if ENABLE(TOUCH_ADJUSTMENT)
2608 bool EventHandler::shouldApplyTouchAdjustment(const PlatformGestureEvent& event) const 2611 bool EventHandler::shouldApplyTouchAdjustment(const PlatformGestureEvent& event) const
2609 { 2612 {
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
3901 #endif 3904 #endif
3902 3905
3903 void EventHandler::setLastKnownMousePosition(const PlatformMouseEvent& event) 3906 void EventHandler::setLastKnownMousePosition(const PlatformMouseEvent& event)
3904 { 3907 {
3905 m_mousePositionIsUnknown = false; 3908 m_mousePositionIsUnknown = false;
3906 m_lastKnownMousePosition = event.position(); 3909 m_lastKnownMousePosition = event.position();
3907 m_lastKnownMouseGlobalPosition = event.globalPosition(); 3910 m_lastKnownMouseGlobalPosition = event.globalPosition();
3908 } 3911 }
3909 3912
3910 } // namespace WebCore 3913 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/platform/chromium/fast/events/touch/gesture/touch-gesture-scroll-div-scaled-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698