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

Unified Diff: cc/layers/layer_impl.cc

Issue 1639363002: Move have_wheel_event_handlers to WebLayerTreeView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 57b62f880ed30c978e7f608cab61187810e7be72..ce9df702bb89b85f5673da2c585e9e8d7af1322a 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -60,7 +60,6 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl,
scroll_clip_layer_id_(Layer::INVALID_ID),
main_thread_scrolling_reasons_(
MainThreadScrollingReason::kNotScrollingOnMain),
- have_wheel_event_handlers_(false),
have_scroll_event_handlers_(false),
scroll_blocks_on_(SCROLL_BLOCKS_ON_NONE),
user_scrollable_horizontal_(true),
@@ -563,7 +562,7 @@ InputHandler::ScrollStatus LayerImpl::TryScroll(
}
if ((type == InputHandler::WHEEL || type == InputHandler::ANIMATED_WHEEL) &&
- have_wheel_event_handlers() &&
+ layer_tree_impl_->have_wheel_event_handlers() &&
effective_block_mode & SCROLL_BLOCKS_ON_WHEEL_EVENT) {
TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed WheelEventHandlers");
scroll_status.thread = InputHandler::SCROLL_ON_MAIN_THREAD;
@@ -622,7 +621,6 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
layer->SetBackgroundFilters(background_filters());
layer->SetMasksToBounds(masks_to_bounds_);
layer->set_main_thread_scrolling_reasons(main_thread_scrolling_reasons_);
- layer->SetHaveWheelEventHandlers(have_wheel_event_handlers_);
layer->SetHaveScrollEventHandlers(have_scroll_event_handlers_);
layer->SetScrollBlocksOn(scroll_blocks_on_);
layer->SetNonFastScrollableRegion(non_fast_scrollable_region_);
@@ -773,8 +771,6 @@ base::DictionaryValue* LayerImpl::LayerTreeAsJson() const {
if (scrollable())
result->SetBoolean("Scrollable", true);
- if (have_wheel_event_handlers_)
- result->SetBoolean("WheelHandler", have_wheel_event_handlers_);
if (have_scroll_event_handlers_)
result->SetBoolean("ScrollHandler", have_scroll_event_handlers_);
if (!touch_event_handler_region_.IsEmpty()) {
@@ -1742,13 +1738,6 @@ void LayerImpl::AsValueInto(base::trace_event::TracedValue* state) const {
touch_event_handler_region_.AsValueInto(state);
state->EndArray();
}
- if (have_wheel_event_handlers_) {
- gfx::Rect wheel_rect(bounds());
- Region wheel_region(wheel_rect);
- state->BeginArray("wheel_event_handler_region");
- wheel_region.AsValueInto(state);
- state->EndArray();
- }
if (have_scroll_event_handlers_) {
gfx::Rect scroll_rect(bounds());
Region scroll_region(scroll_rect);

Powered by Google App Engine
This is Rietveld 408576698