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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 1697483003: Properly scale the coordinate for TouchSelection when use-zoom-for-dsf mode is on. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index a4d3e4782aa46f56826a4f9c751cc99182cb0b77..8dfae9e1f93015c865f7989fb11fcc54199e757f 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -1809,12 +1809,11 @@ static ViewportSelectionBound ComputeViewportSelectionBound(
void LayerTreeImpl::GetViewportSelection(ViewportSelection* selection) {
DCHECK(selection);
-
selection->start = ComputeViewportSelectionBound(
selection_.start,
selection_.start.layer_id ? LayerById(selection_.start.layer_id) : NULL,
- device_scale_factor(), property_trees_.transform_tree,
- property_trees_.clip_tree);
+ device_scale_factor() * painted_device_scale_factor(),
+ property_trees_.transform_tree, property_trees_.clip_tree);
selection->is_editable = selection_.is_editable;
selection->is_empty_text_form_control = selection_.is_empty_text_form_control;
if (selection->start.type == SELECTION_BOUND_CENTER ||
@@ -1824,8 +1823,8 @@ void LayerTreeImpl::GetViewportSelection(ViewportSelection* selection) {
selection->end = ComputeViewportSelectionBound(
selection_.end,
selection_.end.layer_id ? LayerById(selection_.end.layer_id) : NULL,
- device_scale_factor(), property_trees_.transform_tree,
- property_trees_.clip_tree);
+ device_scale_factor() * painted_device_scale_factor(),
+ property_trees_.transform_tree, property_trees_.clip_tree);
}
}

Powered by Google App Engine
This is Rietveld 408576698