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

Issue 10827198: Change View::HitTest to View::HitTestRect (Closed)

Created:
8 years, 4 months ago by tdanderson
Modified:
8 years, 4 months ago
Reviewers:
sky
CC:
chromium-reviews, sadrul, yusukes+watch_chromium.org, ben+watch_chromium.org, tfarina, dcheng, oshima+watch_chromium.org, James Su, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, nkostylev+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Change View::HitTest to View::HitTestRect This change makes HitTest more general by allowing hit tests on rects. Hit testing on a point can be done by calling View::HitTestPoint, which calls View::HitTestRect with a rect of width and height 1. Since gesture events can now store a bounding box to represent the area of the gesture rather than just a single point, this change is needed for the implementation of gesture target fuzzing in views (https://chromiumcodereview.appspot.com/10790019/). BUG=129794 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=150954

Patch Set 1 #

Total comments: 29

Patch Set 2 : Revised patch with tests added #

Total comments: 2

Patch Set 3 : Final comments addressed #

Total comments: 2

Patch Set 4 : rect.ToRECT() used #

Patch Set 5 : Fixed errors reported by trybots #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -96 lines) Patch
M ash/launcher/launcher_button.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ash/launcher/launcher_button.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/input_method/candidate_window.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc View 1 2 2 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/avatar_menu_bubble_view.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/avatar_menu_button.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/avatar_menu_button.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/content_setting_bubble_contents.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/frame/browser_view_layout.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/frame/glass_browser_frame_view.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/frame/glass_browser_frame_view.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view.cc View 1 2 2 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/fullscreen_exit_bubble_views.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/chrome_to_mobile_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/content_setting_image_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/page_action_image_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/page_info_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/star_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/zoom_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/omnibox/inline_omnibox_popup_view.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/tabs/base_tab.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/tabs/tab_strip.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_unittest.cc View 1 2 3 4 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/toolbar_view.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/toolbar_view.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M ui/app_list/app_list_item_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/app_list/search_result_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/views/accessibility/native_view_accessibility_win.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/button/button_dropdown.cc View 1 2 chunks +4 lines, -3 lines 0 comments Download
M ui/views/controls/button/custom_button.cc View 1 5 chunks +5 lines, -5 lines 0 comments Download
M ui/views/controls/button/menu_button.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M ui/views/controls/label.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/label.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/link.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/link.cc View 1 3 chunks +4 lines, -4 lines 0 comments Download
M ui/views/view.h View 1 2 2 chunks +12 lines, -8 lines 0 comments Download
M ui/views/view.cc View 1 2 3 6 chunks +15 lines, -8 lines 0 comments Download
M ui/views/view_unittest.cc View 1 2 chunks +30 lines, -5 lines 0 comments Download
M ui/views/window/non_client_view.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/views/window/non_client_view.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
tdanderson
Please let me know your thoughts on this patch, especially my comment about an empty ...
8 years, 4 months ago (2012-08-07 16:18:28 UTC) #1
sky
https://chromiumcodereview.appspot.com/10827198/diff/1/chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc File chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc (right): https://chromiumcodereview.appspot.com/10827198/diff/1/chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc#newcode343 chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc:343: if (r.y() > tabstrip_bounds.bottom()) On 2012/08/07 16:18:28, tdanderson wrote: ...
8 years, 4 months ago (2012-08-07 20:11:43 UTC) #2
tdanderson
Please let me know what you think of patch set 2. https://chromiumcodereview.appspot.com/10827198/diff/1/chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc File chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc (right): ...
8 years, 4 months ago (2012-08-08 23:47:50 UTC) #3
sky
https://chromiumcodereview.appspot.com/10827198/diff/1/chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc File chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc (right): https://chromiumcodereview.appspot.com/10827198/diff/1/chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc#newcode349 chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc:349: gfx::Point browser_view_point(gfx::Point(r.x(), r.y())); On 2012/08/08 23:47:51, tdanderson wrote: > ...
8 years, 4 months ago (2012-08-09 00:30:14 UTC) #4
sky
This is the last of the comments I have. https://chromiumcodereview.appspot.com/10827198/diff/4002/ui/views/view.h File ui/views/view.h (right): https://chromiumcodereview.appspot.com/10827198/diff/4002/ui/views/view.h#newcode512 ui/views/view.h:512: ...
8 years, 4 months ago (2012-08-09 00:33:51 UTC) #5
tdanderson
I have addressed all of your comments, so this patch should be good to go. ...
8 years, 4 months ago (2012-08-09 16:16:46 UTC) #6
sky
https://chromiumcodereview.appspot.com/10827198/diff/11001/ui/views/view.cc File ui/views/view.cc (right): https://chromiumcodereview.appspot.com/10827198/diff/11001/ui/views/view.cc#newcode794 ui/views/view.cc:794: const RECT r(rect.x(), rect.y(), rect.width(), rect.height()); Use rect.ToRect() (especially ...
8 years, 4 months ago (2012-08-09 16:37:52 UTC) #7
tdanderson
https://chromiumcodereview.appspot.com/10827198/diff/11001/ui/views/view.cc File ui/views/view.cc (right): https://chromiumcodereview.appspot.com/10827198/diff/11001/ui/views/view.cc#newcode794 ui/views/view.cc:794: const RECT r(rect.x(), rect.y(), rect.width(), rect.height()); On 2012/08/09 16:37:53, ...
8 years, 4 months ago (2012-08-09 17:00:19 UTC) #8
sky
LGTM
8 years, 4 months ago (2012-08-09 18:31:57 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/10827198/44
8 years, 4 months ago (2012-08-09 18:35:16 UTC) #10
commit-bot: I haz the power
Try job failure for 10827198-44 (retry) on win for step "runhooks" (clobber build). It's a ...
8 years, 4 months ago (2012-08-09 18:57:41 UTC) #11
tdanderson
Patch set 5 renames HitTest to HitTestPoint where the trybots reported a failure. AFAICT these ...
8 years, 4 months ago (2012-08-09 21:01:27 UTC) #12
sky
SLGTM
8 years, 4 months ago (2012-08-09 21:43:22 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdanderson@chromium.org/10827198/2006
8 years, 4 months ago (2012-08-09 21:48:40 UTC) #14
commit-bot: I haz the power
8 years, 4 months ago (2012-08-10 00:43:26 UTC) #15
Change committed as 150954

Powered by Google App Engine
This is Rietveld 408576698