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

Side by Side Diff: Source/core/input/EventHandler.cpp

Issue 1253053005: Dont reset unusedScrollDelta for nonScrollable Axes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed relavant tests Created 5 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
« no previous file with comments | « no previous file | Source/web/tests/WebFrameTest.cpp » ('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) 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 2325 matching lines...) Expand 10 before | Expand all | Expand 10 after
2336 } 2336 }
2337 } 2337 }
2338 2338
2339 if (RuntimeEnabledFeatures::scrollCustomizationEnabled()) 2339 if (RuntimeEnabledFeatures::scrollCustomizationEnabled())
2340 return false; 2340 return false;
2341 2341
2342 // Try to scroll the frame view. 2342 // Try to scroll the frame view.
2343 ScrollResult scrollResult = m_frame->applyScrollDelta(delta, false); 2343 ScrollResult scrollResult = m_frame->applyScrollDelta(delta, false);
2344 FloatPoint position = FloatPoint(gestureEvent.position().x(), gestureEvent.p osition().y()); 2344 FloatPoint position = FloatPoint(gestureEvent.position().x(), gestureEvent.p osition().y());
2345 FloatSize velocity = FloatSize(gestureEvent.velocityX(), gestureEvent.veloci tyY()); 2345 FloatSize velocity = FloatSize(gestureEvent.velocityX(), gestureEvent.veloci tyY());
2346 if (m_frame->isMainFrame() && m_frame->view() && m_frame->view()->scrollable Area()) {
2347 ScrollableArea* scrollablearea = m_frame->view()->scrollableArea();
2348 // TODO(sataya.m) : In Case of android set unusedDelta to 0 to ensure ov erflow is not reported
2349 // on non-scrollable axis. Move this check to CC to block OverscrollGlow Animation on non-scrollable axes.
2350 scrollResult.unusedScrollDeltaX = scrollablearea->scrollSize(HorizontalS crollbar) ? scrollResult.unusedScrollDeltaX : 0;
2351 scrollResult.unusedScrollDeltaY = scrollablearea->scrollSize(VerticalScr ollbar) ? scrollResult.unusedScrollDeltaY : 0;
2352 }
2353 handleOverscroll(scrollResult, position, velocity); 2346 handleOverscroll(scrollResult, position, velocity);
2354 if (scrollResult.didScroll()) { 2347 if (scrollResult.didScroll()) {
2355 setFrameWasScrolledByUser(); 2348 setFrameWasScrolledByUser();
2356 return true; 2349 return true;
2357 } 2350 }
2358 2351
2359 return false; 2352 return false;
2360 } 2353 }
2361 2354
2362 void EventHandler::clearGestureScrollState() 2355 void EventHandler::clearGestureScrollState()
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after
4002 unsigned EventHandler::accessKeyModifiers() 3995 unsigned EventHandler::accessKeyModifiers()
4003 { 3996 {
4004 #if OS(MACOSX) 3997 #if OS(MACOSX)
4005 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3998 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
4006 #else 3999 #else
4007 return PlatformEvent::AltKey; 4000 return PlatformEvent::AltKey;
4008 #endif 4001 #endif
4009 } 4002 }
4010 4003
4011 } // namespace blink 4004 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698