| Index: cc/trees/layer_tree_host_impl_unittest.cc
|
| diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
|
| index 176e8b340e6b8123caffcd216fe5ed885cc7aa22..1068901f3ceabc3edbe76bda3551805a31ce1178 100644
|
| --- a/cc/trees/layer_tree_host_impl_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_impl_unittest.cc
|
| @@ -3070,7 +3070,7 @@ class LayerTreeHostImplTestScrollbarOpacity : public LayerTreeHostImplTest {
|
|
|
| if (expecting_animations) {
|
| host_impl_->ScrollbarAnimationControllerForElementId(scroll->element_id())
|
| - ->DidMouseMove(gfx::PointF(0, 90));
|
| + ->DidMouseMove(gfx::PointF(0, 90), false);
|
| } else {
|
| EXPECT_EQ(nullptr, host_impl_->ScrollbarAnimationControllerForElementId(
|
| scroll->element_id()));
|
| @@ -3175,7 +3175,7 @@ TEST_F(LayerTreeHostImplTest, ScrollbarVisibilityChangeCausesRedrawAndCommit) {
|
| // in task. Execute it to fade in the scrollbars.
|
| {
|
| animation_task_ = base::Closure();
|
| - scrollbar_controller->DidMouseMove(gfx::PointF(90, 0));
|
| + scrollbar_controller->DidMouseMove(gfx::PointF(90, 0), false);
|
| ASSERT_FALSE(animation_task_.Equals(base::Closure()));
|
| ASSERT_FALSE(animation_task_.IsCancelled());
|
| }
|
| @@ -3423,20 +3423,20 @@ void LayerTreeHostImplTest::SetupMouseMoveAtWithDeviceScale(
|
| SingleScrollbarAnimationControllerThinning::
|
| kMouseMoveDistanceToTriggerExpand;
|
|
|
| - host_impl_->MouseMoveAt(
|
| - gfx::Point(15 + kMouseMoveDistanceToTriggerFadeIn, 1));
|
| + host_impl_->MouseMoveAt(gfx::Point(15 + kMouseMoveDistanceToTriggerFadeIn, 1),
|
| + false);
|
| EXPECT_FALSE(scrollbar_animation_controller->MouseIsNearScrollbar(VERTICAL));
|
| EXPECT_FALSE(
|
| scrollbar_animation_controller->MouseIsNearScrollbarThumb(VERTICAL));
|
|
|
| host_impl_->MouseMoveAt(
|
| - gfx::Point(15 + kMouseMoveDistanceToTriggerExpand - 1, 10));
|
| + gfx::Point(15 + kMouseMoveDistanceToTriggerExpand - 1, 10), false);
|
| EXPECT_TRUE(scrollbar_animation_controller->MouseIsNearScrollbar(VERTICAL));
|
| EXPECT_TRUE(
|
| scrollbar_animation_controller->MouseIsNearScrollbarThumb(VERTICAL));
|
|
|
| host_impl_->MouseMoveAt(
|
| - gfx::Point(15 + kMouseMoveDistanceToTriggerFadeIn, 100));
|
| + gfx::Point(15 + kMouseMoveDistanceToTriggerFadeIn, 100), false);
|
| EXPECT_FALSE(scrollbar_animation_controller->MouseIsNearScrollbar(VERTICAL));
|
| EXPECT_FALSE(
|
| scrollbar_animation_controller->MouseIsNearScrollbarThumb(VERTICAL));
|
| @@ -3444,13 +3444,13 @@ void LayerTreeHostImplTest::SetupMouseMoveAtWithDeviceScale(
|
| did_request_redraw_ = false;
|
| EXPECT_FALSE(
|
| scrollbar_animation_controller->MouseIsOverScrollbarThumb(VERTICAL));
|
| - host_impl_->MouseMoveAt(gfx::Point(10, 10));
|
| + host_impl_->MouseMoveAt(gfx::Point(10, 10), false);
|
| EXPECT_TRUE(
|
| scrollbar_animation_controller->MouseIsOverScrollbarThumb(VERTICAL));
|
| - host_impl_->MouseMoveAt(gfx::Point(10, 0));
|
| + host_impl_->MouseMoveAt(gfx::Point(10, 0), false);
|
| EXPECT_TRUE(
|
| scrollbar_animation_controller->MouseIsOverScrollbarThumb(VERTICAL));
|
| - host_impl_->MouseMoveAt(gfx::Point(150, 120));
|
| + host_impl_->MouseMoveAt(gfx::Point(150, 120), false);
|
| EXPECT_FALSE(
|
| scrollbar_animation_controller->MouseIsOverScrollbarThumb(VERTICAL));
|
| }
|
| @@ -12263,8 +12263,8 @@ void LayerTreeHostImplTest::SetupMouseMoveAtTestScrollbarStates(
|
|
|
| // Mouse moves close to the scrollbar, goes over the scrollbar, and
|
| // moves back to where it was.
|
| - host_impl_->MouseMoveAt(
|
| - gfx::Point(15 + kMouseMoveDistanceToTriggerFadeIn, 0));
|
| + host_impl_->MouseMoveAt(gfx::Point(15 + kMouseMoveDistanceToTriggerFadeIn, 0),
|
| + false);
|
| EXPECT_FALSE(
|
| scrollbar_1_animation_controller->MouseIsNearScrollbar(VERTICAL));
|
| EXPECT_FALSE(
|
| @@ -12272,47 +12272,47 @@ void LayerTreeHostImplTest::SetupMouseMoveAtTestScrollbarStates(
|
| EXPECT_FALSE(
|
| scrollbar_1_animation_controller->MouseIsOverScrollbarThumb(VERTICAL));
|
|
|
| - host_impl_->MouseMoveAt(
|
| - gfx::Point(15 + kMouseMoveDistanceToTriggerExpand, 0));
|
| + host_impl_->MouseMoveAt(gfx::Point(15 + kMouseMoveDistanceToTriggerExpand, 0),
|
| + false);
|
| EXPECT_TRUE(scrollbar_1_animation_controller->MouseIsNearScrollbar(VERTICAL));
|
| EXPECT_FALSE(
|
| scrollbar_1_animation_controller->MouseIsNearScrollbarThumb(VERTICAL));
|
| EXPECT_FALSE(
|
| scrollbar_1_animation_controller->MouseIsOverScrollbarThumb(VERTICAL));
|
|
|
| - host_impl_->MouseMoveAt(
|
| - gfx::Point(14 + kMouseMoveDistanceToTriggerExpand, 0));
|
| + host_impl_->MouseMoveAt(gfx::Point(14 + kMouseMoveDistanceToTriggerExpand, 0),
|
| + false);
|
| EXPECT_TRUE(scrollbar_1_animation_controller->MouseIsNearScrollbar(VERTICAL));
|
| EXPECT_TRUE(
|
| scrollbar_1_animation_controller->MouseIsNearScrollbarThumb(VERTICAL));
|
| EXPECT_FALSE(
|
| scrollbar_1_animation_controller->MouseIsOverScrollbarThumb(VERTICAL));
|
|
|
| - host_impl_->MouseMoveAt(gfx::Point(10, 0));
|
| + host_impl_->MouseMoveAt(gfx::Point(10, 0), false);
|
| EXPECT_TRUE(scrollbar_1_animation_controller->MouseIsNearScrollbar(VERTICAL));
|
| EXPECT_TRUE(
|
| scrollbar_1_animation_controller->MouseIsNearScrollbarThumb(VERTICAL));
|
| EXPECT_TRUE(
|
| scrollbar_1_animation_controller->MouseIsOverScrollbarThumb(VERTICAL));
|
|
|
| - host_impl_->MouseMoveAt(
|
| - gfx::Point(14 + kMouseMoveDistanceToTriggerExpand, 0));
|
| + host_impl_->MouseMoveAt(gfx::Point(14 + kMouseMoveDistanceToTriggerExpand, 0),
|
| + false);
|
| EXPECT_TRUE(scrollbar_1_animation_controller->MouseIsNearScrollbar(VERTICAL));
|
| EXPECT_TRUE(
|
| scrollbar_1_animation_controller->MouseIsNearScrollbarThumb(VERTICAL));
|
| EXPECT_FALSE(
|
| scrollbar_1_animation_controller->MouseIsOverScrollbarThumb(VERTICAL));
|
|
|
| - host_impl_->MouseMoveAt(
|
| - gfx::Point(15 + kMouseMoveDistanceToTriggerExpand, 0));
|
| + host_impl_->MouseMoveAt(gfx::Point(15 + kMouseMoveDistanceToTriggerExpand, 0),
|
| + false);
|
| EXPECT_TRUE(scrollbar_1_animation_controller->MouseIsNearScrollbar(VERTICAL));
|
| EXPECT_FALSE(
|
| scrollbar_1_animation_controller->MouseIsNearScrollbarThumb(VERTICAL));
|
| EXPECT_FALSE(
|
| scrollbar_1_animation_controller->MouseIsOverScrollbarThumb(VERTICAL));
|
|
|
| - host_impl_->MouseMoveAt(
|
| - gfx::Point(15 + kMouseMoveDistanceToTriggerFadeIn, 0));
|
| + host_impl_->MouseMoveAt(gfx::Point(15 + kMouseMoveDistanceToTriggerFadeIn, 0),
|
| + false);
|
| EXPECT_FALSE(
|
| scrollbar_1_animation_controller->MouseIsNearScrollbar(VERTICAL));
|
| EXPECT_FALSE(
|
| @@ -12361,7 +12361,7 @@ void LayerTreeHostImplTest::SetupMouseMoveAtTestScrollbarStates(
|
|
|
| // Mouse goes over scrollbar_2, moves close to scrollbar_2, moves close to
|
| // scrollbar_1, goes over scrollbar_1.
|
| - host_impl_->MouseMoveAt(gfx::Point(60, 60));
|
| + host_impl_->MouseMoveAt(gfx::Point(60, 60), false);
|
| EXPECT_FALSE(
|
| scrollbar_1_animation_controller->MouseIsNearScrollbar(VERTICAL));
|
| EXPECT_FALSE(
|
| @@ -12375,7 +12375,7 @@ void LayerTreeHostImplTest::SetupMouseMoveAtTestScrollbarStates(
|
| scrollbar_2_animation_controller->MouseIsOverScrollbarThumb(VERTICAL));
|
|
|
| host_impl_->MouseMoveAt(
|
| - gfx::Point(64 + kMouseMoveDistanceToTriggerExpand, 50));
|
| + gfx::Point(64 + kMouseMoveDistanceToTriggerExpand, 50), false);
|
| EXPECT_FALSE(
|
| scrollbar_1_animation_controller->MouseIsNearScrollbar(VERTICAL));
|
| EXPECT_FALSE(
|
| @@ -12387,8 +12387,8 @@ void LayerTreeHostImplTest::SetupMouseMoveAtTestScrollbarStates(
|
| scrollbar_2_animation_controller->MouseIsNearScrollbarThumb(VERTICAL));
|
| EXPECT_FALSE(
|
| scrollbar_2_animation_controller->MouseIsOverScrollbarThumb(VERTICAL));
|
| - host_impl_->MouseMoveAt(
|
| - gfx::Point(14 + kMouseMoveDistanceToTriggerExpand, 0));
|
| + host_impl_->MouseMoveAt(gfx::Point(14 + kMouseMoveDistanceToTriggerExpand, 0),
|
| + false);
|
| EXPECT_TRUE(scrollbar_1_animation_controller->MouseIsNearScrollbar(VERTICAL));
|
| EXPECT_TRUE(
|
| scrollbar_1_animation_controller->MouseIsNearScrollbarThumb(VERTICAL));
|
| @@ -12400,7 +12400,7 @@ void LayerTreeHostImplTest::SetupMouseMoveAtTestScrollbarStates(
|
| scrollbar_2_animation_controller->MouseIsNearScrollbarThumb(VERTICAL));
|
| EXPECT_FALSE(
|
| scrollbar_2_animation_controller->MouseIsOverScrollbarThumb(VERTICAL));
|
| - host_impl_->MouseMoveAt(gfx::Point(10, 0));
|
| + host_impl_->MouseMoveAt(gfx::Point(10, 0), false);
|
| EXPECT_TRUE(scrollbar_1_animation_controller->MouseIsNearScrollbar(VERTICAL));
|
| EXPECT_TRUE(
|
| scrollbar_1_animation_controller->MouseIsNearScrollbarThumb(VERTICAL));
|
| @@ -12419,14 +12419,14 @@ void LayerTreeHostImplTest::SetupMouseMoveAtTestScrollbarStates(
|
| animation_task_ = base::Closure();
|
|
|
| host_impl_->MouseDown();
|
| - host_impl_->MouseMoveAt(gfx::Point(60, 50));
|
| + host_impl_->MouseMoveAt(gfx::Point(60, 50), false);
|
| host_impl_->MouseUp();
|
|
|
| EXPECT_FALSE(animation_task_.Equals(base::Closure()));
|
|
|
| // Near scrollbar_1, then mouse down and up, should not post an event to fade
|
| // out scrollbar_1.
|
| - host_impl_->MouseMoveAt(gfx::Point(40, 150));
|
| + host_impl_->MouseMoveAt(gfx::Point(40, 150), false);
|
| animation_task_ = base::Closure();
|
|
|
| host_impl_->MouseDown();
|
| @@ -12435,7 +12435,7 @@ void LayerTreeHostImplTest::SetupMouseMoveAtTestScrollbarStates(
|
|
|
| // Near scrollbar_1, then mouse down and unregister
|
| // scrollbar_2_animation_controller, then mouse up should not cause crash.
|
| - host_impl_->MouseMoveAt(gfx::Point(40, 150));
|
| + host_impl_->MouseMoveAt(gfx::Point(40, 150), false);
|
| host_impl_->MouseDown();
|
| host_impl_->UnregisterScrollbarAnimationController(root_scroll->element_id());
|
| host_impl_->MouseUp();
|
|
|