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

Issue 94003003: Make extensions icons easier to target with gestures (Closed)

Created:
7 years ago by tdanderson
Modified:
7 years ago
Reviewers:
sadrul, sky
CC:
chromium-reviews, tfarina
Visibility:
Public.

Description

Make extensions icons easier to target with gestures The bounds of a BrowserActionView and the bounds of its child view |button_| have the following properties: - Both share a common center point. - The bounds of |button_| are square, but the bounds of BAV are not. - The bounds of |button_| are contained within the bounds of BAV. - Both are small enough to be easily covered by a finger. This is a flaw in rect-based targeting making it difficult to correctly target |button_| with a tap gesture. To obtain the desired behavior, use the distance between the center of the touch and the center of the view (instead of the center line of the view) to break ties among rect-based targeting candidates. The use of the distance to center line was to avoid biases against wide or tall views. But this is not necessary because any view which can have at least 60% of its area covered by a touch cannot be sufficiently wide or tall enough to benefit from such a metric. BUG=328182 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=241955

Patch Set 1 #

Total comments: 2

Patch Set 2 : Revised patch #

Patch Set 3 : Revised patch #

Patch Set 4 : More test coverage added #

Patch Set 5 : remove newline #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -69 lines) Patch
M ui/views/rect_based_targeting_utils.h View 1 1 chunk +3 lines, -5 lines 0 comments Download
M ui/views/rect_based_targeting_utils.cc View 1 2 chunks +2 lines, -27 lines 0 comments Download
M ui/views/rect_based_targeting_utils_unittest.cc View 1 2 chunks +8 lines, -15 lines 0 comments Download
M ui/views/view.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/view.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M ui/views/view_unittest.cc View 1 2 3 4 8 chunks +84 lines, -18 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
tdanderson
Sadrul, can you please have a first look over this patch and suggest the best ...
7 years ago (2013-12-16 03:17:52 UTC) #1
sadrul
https://codereview.chromium.org/94003003/diff/1/chrome/browser/ui/views/toolbar/browser_action_view.cc File chrome/browser/ui/views/toolbar/browser_action_view.cc (right): https://codereview.chromium.org/94003003/diff/1/chrome/browser/ui/views/toolbar/browser_action_view.cc#newcode113 chrome/browser/ui/views/toolbar/browser_action_view.cc:113: return button_->GetEventHandlerForRect(rect_in_child_coords); What does this return if |rect_in_child_coords| is ...
7 years ago (2013-12-17 04:21:20 UTC) #2
tdanderson
Sadrul, please see my comments below. https://codereview.chromium.org/94003003/diff/1/chrome/browser/ui/views/toolbar/browser_action_view.cc File chrome/browser/ui/views/toolbar/browser_action_view.cc (right): https://codereview.chromium.org/94003003/diff/1/chrome/browser/ui/views/toolbar/browser_action_view.cc#newcode113 chrome/browser/ui/views/toolbar/browser_action_view.cc:113: return button_->GetEventHandlerForRect(rect_in_child_coords); On ...
7 years ago (2013-12-17 20:07:27 UTC) #3
tdanderson
Scott, can you please take a look (and suggest the preferred way to add test ...
7 years ago (2013-12-18 18:35:01 UTC) #4
sky
I think you're working around a flaw in the logic of View and not fixing ...
7 years ago (2013-12-18 21:57:46 UTC) #5
tdanderson
On 2013/12/18 21:57:46, sky wrote: > I think you're working around a flaw in the ...
7 years ago (2013-12-19 00:53:23 UTC) #6
sky
This seems fine to me. Do you have test coverage of the case BAV and ...
7 years ago (2013-12-19 16:28:26 UTC) #7
tdanderson
On 2013/12/19 16:28:26, sky wrote: > This seems fine to me. Do you have test ...
7 years ago (2013-12-19 18:44:32 UTC) #8
sky
LGTM
7 years ago (2013-12-19 20:52:01 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdanderson@chromium.org/94003003/80001
7 years ago (2013-12-19 20:56:34 UTC) #10
commit-bot: I haz the power
7 years ago (2013-12-19 22:44:12 UTC) #11
Message was sent while issue was closed.
Change committed as 241955

Powered by Google App Engine
This is Rietveld 408576698