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

Unified Diff: ui/views/controls/link.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/link.h ('k') | ui/views/view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/link.cc
diff --git a/ui/views/controls/link.cc b/ui/views/controls/link.cc
index ec76a2d09090da97d778e6415d202b504ab00d76..f4b8de67b3da28dcf184d9e56c832258dd7259fd 100644
--- a/ui/views/controls/link.cc
+++ b/ui/views/controls/link.cc
@@ -54,10 +54,10 @@ gfx::NativeCursor Link::GetCursor(const MouseEvent& event) {
#endif
}
-bool Link::HitTest(const gfx::Point& l) const {
+bool Link::HitTestRect(const gfx::Rect& rect) const {
// We need to allow clicks on the link. So we override the implementation in
// Label and use the default implementation of View.
- return View::HitTest(l);
+ return View::HitTestRect(rect);
}
bool Link::OnMousePressed(const MouseEvent& event) {
@@ -71,7 +71,7 @@ bool Link::OnMousePressed(const MouseEvent& event) {
bool Link::OnMouseDragged(const MouseEvent& event) {
SetPressed(enabled() &&
(event.IsLeftMouseButton() || event.IsMiddleMouseButton()) &&
- HitTest(event.location()));
+ HitTestPoint(event.location()));
return true;
}
@@ -81,7 +81,7 @@ void Link::OnMouseReleased(const MouseEvent& event) {
OnMouseCaptureLost();
if (enabled() &&
(event.IsLeftMouseButton() || event.IsMiddleMouseButton()) &&
- HitTest(event.location())) {
+ HitTestPoint(event.location())) {
// Focus the link on click.
RequestFocus();
« no previous file with comments | « ui/views/controls/link.h ('k') | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698