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

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

Issue 2052663004: Remove canScroll from WebMouseWheelEvent as it is unused now. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 4 years, 6 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 // - magnitude roughly matches wheels: f(2) > 25 && f(2) < 100 942 // - magnitude roughly matches wheels: f(2) > 25 && f(2) < 100
943 // - a formula that's relatively easy to use from JavaScript 943 // - a formula that's relatively easy to use from JavaScript
944 // Note that 'wheel' event deltaY values have their sign inverted. So to 944 // Note that 'wheel' event deltaY values have their sign inverted. So to
945 // convert a wheel deltaY back to a scale use Math.exp(-deltaY/100). 945 // convert a wheel deltaY back to a scale use Math.exp(-deltaY/100).
946 DCHECK_GT(pinchEvent.data.pinchUpdate.scale, 0); 946 DCHECK_GT(pinchEvent.data.pinchUpdate.scale, 0);
947 wheelEvent.deltaY = 100.0f * log(pinchEvent.data.pinchUpdate.scale); 947 wheelEvent.deltaY = 100.0f * log(pinchEvent.data.pinchUpdate.scale);
948 wheelEvent.hasPreciseScrollingDeltas = true; 948 wheelEvent.hasPreciseScrollingDeltas = true;
949 wheelEvent.wheelTicksX = 0; 949 wheelEvent.wheelTicksX = 0;
950 wheelEvent.wheelTicksY = 950 wheelEvent.wheelTicksY =
951 pinchEvent.data.pinchUpdate.scale > 1 ? 1 : -1; 951 pinchEvent.data.pinchUpdate.scale > 1 ? 1 : -1;
952 wheelEvent.canScroll = false;
953 952
954 return handleInputEvent(wheelEvent); 953 return handleInputEvent(wheelEvent);
955 } 954 }
956 955
957 void WebViewImpl::transferActiveWheelFlingAnimation(const WebActiveWheelFlingPar ameters& parameters) 956 void WebViewImpl::transferActiveWheelFlingAnimation(const WebActiveWheelFlingPar ameters& parameters)
958 { 957 {
959 TRACE_EVENT0("blink", "WebViewImpl::transferActiveWheelFlingAnimation"); 958 TRACE_EVENT0("blink", "WebViewImpl::transferActiveWheelFlingAnimation");
960 DCHECK(!m_gestureAnimation); 959 DCHECK(!m_gestureAnimation);
961 m_positionOnFlingStart = parameters.point; 960 m_positionOnFlingStart = parameters.point;
962 m_globalPositionOnFlingStart = parameters.globalPoint; 961 m_globalPositionOnFlingStart = parameters.globalPoint;
(...skipping 3601 matching lines...) Expand 10 before | Expand all | Expand 10 after
4564 { 4563 {
4565 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4564 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4566 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4565 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4567 if (!page()) 4566 if (!page())
4568 return 1; 4567 return 1;
4569 4568
4570 return page()->deviceScaleFactor(); 4569 return page()->deviceScaleFactor();
4571 } 4570 }
4572 4571
4573 } // namespace blink 4572 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698