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

Unified Diff: content/browser/web_contents/touch_editable_impl_aura_browsertest.cc

Issue 769393002: Minor visual improvements to text selection UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing the failing test Created 6 years 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 | « no previous file | ui/views/touchui/touch_selection_controller_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
diff --git a/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc b/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
index b67aa5501bb6eee2e3d6f091b0b80ba160c94fcb..9dee499b994fb8087386783b59ad2c98a66d8d89 100644
--- a/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
+++ b/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
@@ -204,8 +204,12 @@ IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest,
touch_editable->Reset();
ui::SelectionBound anchor, focus;
touch_editable->GetSelectionEndPoints(&anchor, &focus);
+ // The distance by which a handle image is offset from the bottom of the
+ // selection/text baseline.
+ const int kSelectionHandleVerticalVisualOffset = 2;
int handle_grab_x = bounds.x() + anchor.edge_bottom_rounded().x();
- int handle_grab_y = bounds.y() + anchor.edge_bottom_rounded().y() + 1;
+ int handle_grab_y = bounds.y() + anchor.edge_bottom_rounded().y() +
+ kSelectionHandleVerticalVisualOffset + 1;
generator.GestureScrollSequence(
gfx::Point(handle_grab_x, handle_grab_y),
gfx::Point(handle_grab_x + 20, handle_grab_y),
« no previous file with comments | « no previous file | ui/views/touchui/touch_selection_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698