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

Unified Diff: ui/views/controls/button/button_dropdown.cc

Issue 10827198: Change View::HitTest to View::HitTestRect (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed errors reported by trybots Created 8 years, 4 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 | « ui/views/accessibility/native_view_accessibility_win.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/button_dropdown.cc
diff --git a/ui/views/controls/button/button_dropdown.cc b/ui/views/controls/button/button_dropdown.cc
index 236eca47a2e163c42ef75484f9d8da63c4caed88..e4c665dadb68338a41c9d7ff03bffcfa507127c9 100644
--- a/ui/views/controls/button/button_dropdown.cc
+++ b/ui/views/controls/button/button_dropdown.cc
@@ -59,7 +59,7 @@ bool ButtonDropDown::IsMenuShowing() const {
bool ButtonDropDown::OnMousePressed(const MouseEvent& event) {
if (enabled() && ShouldShowMenu() &&
- IsTriggerableEvent(event) && HitTest(event.location())) {
+ IsTriggerableEvent(event) && HitTestPoint(event.location())) {
// Store the y pos of the mouse coordinates so we can use them later to
// determine if the user dragged the mouse down (which should pop up the
// drag down menu immediately, instead of waiting for the timer)
@@ -93,14 +93,15 @@ bool ButtonDropDown::OnMouseDragged(const MouseEvent& event) {
void ButtonDropDown::OnMouseReleased(const MouseEvent& event) {
if (IsTriggerableEvent(event) ||
- (event.IsRightMouseButton() && !HitTest(event.location()))) {
+ (event.IsRightMouseButton() && !HitTestPoint(event.location()))) {
ImageButton::OnMouseReleased(event);
}
if (IsTriggerableEvent(event))
show_menu_factory_.InvalidateWeakPtrs();
- if (enabled() && event.IsRightMouseButton() && HitTest(event.location())) {
+ if (enabled() && event.IsRightMouseButton() &&
+ HitTestPoint(event.location())) {
show_menu_factory_.InvalidateWeakPtrs();
ShowDropDownMenu();
}
« no previous file with comments | « ui/views/accessibility/native_view_accessibility_win.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698