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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2050033002: Revert of Remove enable/disable wheel gestures setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@can_scroll_remove
Patch Set: 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
« no previous file with comments | « cc/proto/layer_tree_settings.proto ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2502 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 .Contains(gfx::ToRoundedPoint(hit_test_point_in_layer_space))) { 2513 .Contains(gfx::ToRoundedPoint(hit_test_point_in_layer_space))) {
2514 TRACE_EVENT0("cc", 2514 TRACE_EVENT0("cc",
2515 "LayerImpl::tryScroll: Failed NonFastScrollableRegion"); 2515 "LayerImpl::tryScroll: Failed NonFastScrollableRegion");
2516 scroll_status.thread = InputHandler::SCROLL_ON_MAIN_THREAD; 2516 scroll_status.thread = InputHandler::SCROLL_ON_MAIN_THREAD;
2517 scroll_status.main_thread_scrolling_reasons = 2517 scroll_status.main_thread_scrolling_reasons =
2518 MainThreadScrollingReason::kNonFastScrollableRegion; 2518 MainThreadScrollingReason::kNonFastScrollableRegion;
2519 return scroll_status; 2519 return scroll_status;
2520 } 2520 }
2521 } 2521 }
2522 2522
2523 if (IsWheelBasedScroll(type) &&
2524 !active_tree()->settings().use_mouse_wheel_gestures) {
2525 EventListenerProperties event_properties =
2526 active_tree()->event_listener_properties(
2527 EventListenerClass::kMouseWheel);
2528 if (event_properties != EventListenerProperties::kNone) {
2529 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed WheelEventHandlers");
2530 scroll_status.thread = InputHandler::SCROLL_ON_MAIN_THREAD;
2531 scroll_status.main_thread_scrolling_reasons =
2532 MainThreadScrollingReason::kEventHandlers;
2533 return scroll_status;
2534 }
2535 }
2536
2523 if (!scroll_node->data.scrollable) { 2537 if (!scroll_node->data.scrollable) {
2524 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Ignored not scrollable"); 2538 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Ignored not scrollable");
2525 scroll_status.thread = InputHandler::SCROLL_IGNORED; 2539 scroll_status.thread = InputHandler::SCROLL_IGNORED;
2526 scroll_status.main_thread_scrolling_reasons = 2540 scroll_status.main_thread_scrolling_reasons =
2527 MainThreadScrollingReason::kNotScrollable; 2541 MainThreadScrollingReason::kNotScrollable;
2528 return scroll_status; 2542 return scroll_status;
2529 } 2543 }
2530 2544
2531 gfx::ScrollOffset max_scroll_offset = 2545 gfx::ScrollOffset max_scroll_offset =
2532 scroll_tree.MaxScrollOffset(scroll_node->id); 2546 scroll_tree.MaxScrollOffset(scroll_node->id);
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after
4035 const { 4049 const {
4036 return fixed_raster_scale_attempted_scale_change_history_.count() >= 4050 return fixed_raster_scale_attempted_scale_change_history_.count() >=
4037 kFixedRasterScaleAttemptedScaleChangeThreshold; 4051 kFixedRasterScaleAttemptedScaleChangeThreshold;
4038 } 4052 }
4039 4053
4040 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { 4054 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() {
4041 fixed_raster_scale_attempted_scale_change_history_.set(0); 4055 fixed_raster_scale_attempted_scale_change_history_.set(0);
4042 } 4056 }
4043 4057
4044 } // namespace cc 4058 } // namespace cc
OLDNEW
« no previous file with comments | « cc/proto/layer_tree_settings.proto ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698