Commit 6204dbcf authored by erg@chromium.org's avatar erg@chromium.org

Revert "Remove override of View::HitTestRect() from ImageView"

This patch reverts r272117, which broke the prelight state on toolbar
buttons.

BUG=376478,374325
TBR=sadrul@chromium.org
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/296703012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272315 0039d316-1c4b-4281-b951-d872f2087c98
parent 55c993be
......@@ -205,10 +205,11 @@ bool ImageView::GetTooltipText(const gfx::Point& p,
return true;
}
bool ImageView::CanAcceptEvent(const ui::Event& event) {
return interactive_ && View::CanAcceptEvent(event);
bool ImageView::HitTestRect(const gfx::Rect& rect) const {
return interactive_ ? View::HitTestRect(rect) : false;
}
void ImageView::OnPaintImage(gfx::Canvas* canvas) {
last_paint_scale_ = canvas->image_scale();
last_painted_bitmap_pixels_ = NULL;
......
......@@ -87,9 +87,7 @@ class VIEWS_EXPORT ImageView : public View {
virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
virtual bool GetTooltipText(const gfx::Point& p,
base::string16* tooltip) const OVERRIDE;
// ui::EventTarget:
virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE;
virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE;
private:
void OnPaintImage(gfx::Canvas* canvas);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment