Index: ui/views/controls/link.cc |
diff --git a/ui/views/controls/link.cc b/ui/views/controls/link.cc |
index 84ff1de5eebdbb317658fb15fd62b16ba14b6c00..e4d5f5105138bf9269263d48f6f694c3b5ca92c9 100644 |
--- a/ui/views/controls/link.cc |
+++ b/ui/views/controls/link.cc |
@@ -51,12 +51,6 @@ gfx::NativeCursor Link::GetCursor(const ui::MouseEvent& event) { |
return GetNativeHandCursor(); |
} |
-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::HitTestRect(rect); |
-} |
- |
bool Link::OnMousePressed(const ui::MouseEvent& event) { |
if (!enabled() || |
(!event.IsLeftMouseButton() && !event.IsMiddleMouseButton())) |
@@ -172,6 +166,12 @@ void Link::SetEnabledColor(SkColor color) { |
Label::SetEnabledColor(requested_enabled_color_); |
} |
+bool Link::CanAcceptEvent(const ui::Event& event) { |
+ // Links need to be able to accept events (e.g., clicking) even though |
+ // in general Labels do not. |
+ return View::CanAcceptEvent(event); |
+} |
+ |
void Link::SetPressedColor(SkColor color) { |
requested_pressed_color_ = color; |
if (pressed_) |