Commit c8199c95 authored by David Bokan's avatar David Bokan Committed by Commit Bot

[ScrollUnification] Correct LTHI test expectations

This CL makes it so that all tests in layer_tree_host_impl_unittest.cc
pass when the scroll unification flag is turned on. A followup
mechanical CL adds parameterized test suites to ensure it stays that
way.

The main changes here are that under unification, cases where
ScrollBegin would previously cause a scroll to be routed to the main
thread are now handled on the impl thread. In cases where the hit test
was unreliable or had a non-fast scrollable region, the return now
requests a main thread hit test. For simple main thread scrolling
reasons, a hit test isn't necessary.

Also made some minor updates to a few tests to ensure they're running
under the most realistic scenario by making sure they setup the viewport
correctly.

Bug: 1086625
Change-Id: I20fbd4c431c583e0a63241e91a3adaeb298bed0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222262
Commit-Queue: David Bokan <bokan@chromium.org>
Reviewed-by: default avatarXida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774012}
parent 581803f8
...@@ -155,6 +155,7 @@ ScrollNode& CreateScrollNodeInternal(LayerType* layer, ...@@ -155,6 +155,7 @@ ScrollNode& CreateScrollNodeInternal(LayerType* layer,
node->scrollable = !scroll_container_bounds.IsEmpty(); node->scrollable = !scroll_container_bounds.IsEmpty();
node->user_scrollable_horizontal = true; node->user_scrollable_horizontal = true;
node->user_scrollable_vertical = true; node->user_scrollable_vertical = true;
node->is_composited = true;
DCHECK(layer->has_transform_node()); DCHECK(layer->has_transform_node());
node->transform_id = layer->transform_tree_index(); node->transform_id = layer->transform_tree_index();
......
...@@ -1027,7 +1027,7 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandler, ...@@ -1027,7 +1027,7 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandler,
// |viewport_point|. If no layer is hit, this falls back to the inner // |viewport_point|. If no layer is hit, this falls back to the inner
// viewport scroll node. Returns: // viewport scroll node. Returns:
// - If |hit_test_sucessful| is false, hit testing has failed and the // - If |hit_test_sucessful| is false, hit testing has failed and the
// compositor cannot determine the corerct scroll node (e.g. see comments in // compositor cannot determine the correct scroll node (e.g. see comments in
// IsInitialScrollHitTestReliable). |scroll_node| is always nullptr in this // IsInitialScrollHitTestReliable). |scroll_node| is always nullptr in this
// case. // case.
// - If |hit_test_successful| is true, returns the ScrollNode to use in // - If |hit_test_successful| is true, returns the ScrollNode to use in
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment