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

Unified Diff: ui/views/controls/button/menu_button.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/controls/button/custom_button.cc ('k') | ui/views/controls/label.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/menu_button.cc
diff --git a/ui/views/controls/button/menu_button.cc b/ui/views/controls/button/menu_button.cc
index 3395b420ff373bbc4982e535ef6e6fafd5e560bf..e8f6bcbf0344c01daed23e8936a4e4c1e355e534 100644
--- a/ui/views/controls/button/menu_button.cc
+++ b/ui/views/controls/button/menu_button.cc
@@ -181,7 +181,8 @@ bool MenuButton::OnMousePressed(const MouseEvent& event) {
if (state() != BS_DISABLED) {
// If we're draggable (GetDragOperations returns a non-zero value), then
// don't pop on press, instead wait for release.
- if (event.IsOnlyLeftMouseButton() && HitTest(event.location()) &&
+ if (event.IsOnlyLeftMouseButton() &&
+ HitTestPoint(event.location()) &&
GetDragOperations(event.location()) == ui::DragDropTypes::DRAG_NONE) {
TimeDelta delta = Time::Now() - menu_closed_time_;
int64 delta_in_milliseconds = delta.InMilliseconds();
@@ -200,7 +201,7 @@ void MenuButton::OnMouseReleased(const MouseEvent& event) {
// triggerable and there's a context menu).
if (GetDragOperations(event.location()) != ui::DragDropTypes::DRAG_NONE &&
state() != BS_DISABLED && !InDrag() && event.IsOnlyLeftMouseButton() &&
- HitTest(event.location())) {
+ HitTestPoint(event.location())) {
Activate();
} else {
TextButton::OnMouseReleased(event);
« no previous file with comments | « ui/views/controls/button/custom_button.cc ('k') | ui/views/controls/label.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698