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

Side by Side Diff: cc/layers/layer_impl.cc

Issue 1686833002: Add knowledge about blocking and passive event listeners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 4 years, 10 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/input/event_listener_properties.h ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/layer_impl.h" 5 #include "cc/layers/layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 MainThreadScrollingReason::kNonFastScrollableRegion; 538 MainThreadScrollingReason::kNonFastScrollableRegion;
539 return scroll_status; 539 return scroll_status;
540 } 540 }
541 } 541 }
542 542
543 if (type == InputHandler::WHEEL || type == InputHandler::ANIMATED_WHEEL) { 543 if (type == InputHandler::WHEEL || type == InputHandler::ANIMATED_WHEEL) {
544 EventListenerProperties event_properties = 544 EventListenerProperties event_properties =
545 layer_tree_impl_->event_listener_properties( 545 layer_tree_impl_->event_listener_properties(
546 EventListenerClass::kMouseWheel); 546 EventListenerClass::kMouseWheel);
547 if (event_properties == EventListenerProperties::kBlocking || 547 if (event_properties == EventListenerProperties::kBlocking ||
548 event_properties == EventListenerProperties::kBlockingAndPassive ||
548 (!layer_tree_impl_->settings().use_mouse_wheel_gestures && 549 (!layer_tree_impl_->settings().use_mouse_wheel_gestures &&
549 event_properties == EventListenerProperties::kPassive)) { 550 event_properties == EventListenerProperties::kPassive)) {
550 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed WheelEventHandlers"); 551 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed WheelEventHandlers");
551 scroll_status.thread = InputHandler::SCROLL_ON_MAIN_THREAD; 552 scroll_status.thread = InputHandler::SCROLL_ON_MAIN_THREAD;
552 scroll_status.main_thread_scrolling_reasons = 553 scroll_status.main_thread_scrolling_reasons =
553 MainThreadScrollingReason::kEventHandlers; 554 MainThreadScrollingReason::kEventHandlers;
554 return scroll_status; 555 return scroll_status;
555 } 556 }
556 } 557 }
557 558
(...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 .layer_transforms_should_scale_layer_contents) { 1903 .layer_transforms_should_scale_layer_contents) {
1903 return default_scale; 1904 return default_scale;
1904 } 1905 }
1905 1906
1906 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( 1907 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents(
1907 DrawTransform(), default_scale); 1908 DrawTransform(), default_scale);
1908 return std::max(transform_scales.x(), transform_scales.y()); 1909 return std::max(transform_scales.x(), transform_scales.y());
1909 } 1910 }
1910 1911
1911 } // namespace cc 1912 } // namespace cc
OLDNEW
« no previous file with comments | « cc/input/event_listener_properties.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698