views: Override Label::HitTest with the default View::HitTest for Link.
BUG='Remove' link in the bookmark bubble doesn't work TEST=manually Review URL: http://codereview.chromium.org/7248064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91475 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@ -108,6 +108,12 @@ gfx::NativeCursor Link::GetCursor(const MouseEvent& event) {
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Link::HitTest(const gfx::Point& l) 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);
|
||||
}
|
||||
|
||||
bool Link::OnMousePressed(const MouseEvent& event) {
|
||||
if (!IsEnabled() ||
|
||||
(!event.IsLeftMouseButton() && !event.IsMiddleMouseButton()))
|
||||
|
@ -35,6 +35,7 @@ class Link : public Label {
|
||||
virtual void OnEnabledChanged() OVERRIDE;
|
||||
virtual std::string GetClassName() const OVERRIDE;
|
||||
virtual gfx::NativeCursor GetCursor(const MouseEvent& event) OVERRIDE;
|
||||
virtual bool HitTest(const gfx::Point& l) const OVERRIDE;
|
||||
virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE;
|
||||
virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE;
|
||||
virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE;
|
||||
|
Reference in New Issue
Block a user