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

Side by Side Diff: Source/platform/mac/ScrollAnimatorMac.mm

Issue 722353002: Add development Blink setting for impl-side rubber-banding (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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) 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2010, 2011 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 didEndScrollGesture(); 1073 didEndScrollGesture();
1074 else if (phase == PlatformWheelEventPhaseMayBegin) 1074 else if (phase == PlatformWheelEventPhaseMayBegin)
1075 mayBeginScrollGesture(); 1075 mayBeginScrollGesture();
1076 } 1076 }
1077 1077
1078 #if USE(RUBBER_BANDING) 1078 #if USE(RUBBER_BANDING)
1079 bool ScrollAnimatorMac::handleWheelEvent(const PlatformWheelEvent& wheelEvent) 1079 bool ScrollAnimatorMac::handleWheelEvent(const PlatformWheelEvent& wheelEvent)
1080 { 1080 {
1081 m_haveScrolledSincePageLoad = true; 1081 m_haveScrolledSincePageLoad = true;
1082 1082
1083 if (!wheelEvent.hasPreciseScrollingDeltas() || !rubberBandingEnabledForSyste m()) 1083 if (!wheelEvent.hasPreciseScrollingDeltas() || !rubberBandingEnabledForSyste m() || m_scrollableArea->rubberBandingOnCompositorThread())
1084 return ScrollAnimator::handleWheelEvent(wheelEvent); 1084 return ScrollAnimator::handleWheelEvent(wheelEvent);
1085 1085
1086 // FIXME: This is somewhat roundabout hack to allow forwarding wheel events 1086 // FIXME: This is somewhat roundabout hack to allow forwarding wheel events
1087 // up to the parent scrollable area. It takes advantage of the fact that 1087 // up to the parent scrollable area. It takes advantage of the fact that
1088 // the base class implementation of handleWheelEvent will not accept the 1088 // the base class implementation of handleWheelEvent will not accept the
1089 // wheel event if there is nowhere to scroll. 1089 // wheel event if there is nowhere to scroll.
1090 if (fabsf(wheelEvent.deltaY()) >= fabsf(wheelEvent.deltaX())) { 1090 if (fabsf(wheelEvent.deltaY()) >= fabsf(wheelEvent.deltaX())) {
1091 if (!allowsVerticalStretching()) 1091 if (!allowsVerticalStretching())
1092 return ScrollAnimator::handleWheelEvent(wheelEvent); 1092 return ScrollAnimator::handleWheelEvent(wheelEvent);
1093 } else { 1093 } else {
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 return; 1360 return;
1361 1361
1362 m_visibleScrollerThumbRect = rectInViewCoordinates; 1362 m_visibleScrollerThumbRect = rectInViewCoordinates;
1363 } 1363 }
1364 1364
1365 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() { 1365 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() {
1366 return ScrollbarThemeMacCommon::isOverlayAPIAvailable(); 1366 return ScrollbarThemeMacCommon::isOverlayAPIAvailable();
1367 } 1367 }
1368 1368
1369 } // namespace blink 1369 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | Source/platform/scroll/ScrollableArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698