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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2841943002: Overlay scrollbars expand only when mouse is near thumb (Closed)
Patch Set: weiliangc comment addressed Created 3 years, 8 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 335dda0216a4f3ddee967e6341a1cf2f21b99d4b..b8d25afce74bc79b87f99037202737c75b5e928c 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -3393,21 +3393,6 @@ InputHandler::ScrollStatus LayerTreeHostImpl::FlingScrollBegin() {
return scroll_status;
}
-float LayerTreeHostImpl::DeviceSpaceDistanceToLayer(
- const gfx::PointF& device_viewport_point,
- LayerImpl* layer_impl) {
- if (!layer_impl)
- return std::numeric_limits<float>::max();
-
- gfx::Rect layer_impl_bounds(layer_impl->bounds());
-
- gfx::RectF device_viewport_layer_impl_bounds = MathUtil::MapClippedRect(
- layer_impl->ScreenSpaceTransform(), gfx::RectF(layer_impl_bounds));
-
- return device_viewport_layer_impl_bounds.ManhattanDistanceToPoint(
- device_viewport_point);
-}
-
void LayerTreeHostImpl::MouseDown() {
ScrollbarAnimationController* animation_controller =
ScrollbarAnimationControllerForElementId(
@@ -3475,12 +3460,7 @@ void LayerTreeHostImpl::MouseMoveAt(const gfx::Point& viewport_point) {
if (!new_animation_controller)
return;
- for (auto* scrollbar : active_tree_->ScrollbarsFor(scroll_element_id)) {
- new_animation_controller->DidMouseMoveNear(
- scrollbar->orientation(),
- DeviceSpaceDistanceToLayer(device_viewport_point, scrollbar) /
- active_tree_->device_scale_factor());
- }
+ new_animation_controller->DidMouseMove(device_viewport_point);
}
void LayerTreeHostImpl::MouseLeave() {
« no previous file with comments | « cc/trees/layer_tree_host_impl.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