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

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

Issue 1418493003: Let LayerTreeHostImpl::ScrollAnimated scroll the outer viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile error for realz Created 5 years, 2 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/input_handler.h ('k') | cc/trees/layer_tree_host_impl.h » ('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 "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/numerics/safe_conversions.h" 8 #include "base/numerics/safe_conversions.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 return InputHandler::SCROLL_ON_MAIN_THREAD; 519 return InputHandler::SCROLL_ON_MAIN_THREAD;
520 } 520 }
521 } 521 }
522 522
523 if (have_scroll_event_handlers() && 523 if (have_scroll_event_handlers() &&
524 effective_block_mode & SCROLL_BLOCKS_ON_SCROLL_EVENT) { 524 effective_block_mode & SCROLL_BLOCKS_ON_SCROLL_EVENT) {
525 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed ScrollEventHandlers"); 525 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed ScrollEventHandlers");
526 return InputHandler::SCROLL_ON_MAIN_THREAD; 526 return InputHandler::SCROLL_ON_MAIN_THREAD;
527 } 527 }
528 528
529 if (type == InputHandler::WHEEL && have_wheel_event_handlers() && 529 if ((type == InputHandler::WHEEL || type == InputHandler::ANIMATED_WHEEL) &&
530 have_wheel_event_handlers() &&
530 effective_block_mode & SCROLL_BLOCKS_ON_WHEEL_EVENT) { 531 effective_block_mode & SCROLL_BLOCKS_ON_WHEEL_EVENT) {
531 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed WheelEventHandlers"); 532 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed WheelEventHandlers");
532 return InputHandler::SCROLL_ON_MAIN_THREAD; 533 return InputHandler::SCROLL_ON_MAIN_THREAD;
533 } 534 }
534 535
535 if (!scrollable()) { 536 if (!scrollable()) {
536 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Ignored not scrollable"); 537 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Ignored not scrollable");
537 return InputHandler::SCROLL_IGNORED; 538 return InputHandler::SCROLL_IGNORED;
538 } 539 }
539 540
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 } 1798 }
1798 1799
1799 // TODO(enne): the transform needs to come from property trees instead of 1800 // TODO(enne): the transform needs to come from property trees instead of
1800 // draw properties. 1801 // draw properties.
1801 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( 1802 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents(
1802 draw_properties().target_space_transform, default_scale); 1803 draw_properties().target_space_transform, default_scale);
1803 return std::max(transform_scales.x(), transform_scales.y()); 1804 return std::max(transform_scales.x(), transform_scales.y());
1804 } 1805 }
1805 1806
1806 } // namespace cc 1807 } // namespace cc
OLDNEW
« no previous file with comments | « cc/input/input_handler.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698