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

Unified Diff: chrome/browser/ui/views/infobars/infobar_container_view.cc

Issue 1767363002: [md] Give each infobar its own layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: true intersection Created 4 years, 9 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
Index: chrome/browser/ui/views/infobars/infobar_container_view.cc
diff --git a/chrome/browser/ui/views/infobars/infobar_container_view.cc b/chrome/browser/ui/views/infobars/infobar_container_view.cc
index 450d69f52c0eafff5892eb3d168fe1627f06021c..d2f1fab0d7df556be99a9f4b86078b168a3a4756 100644
--- a/chrome/browser/ui/views/infobars/infobar_container_view.cc
+++ b/chrome/browser/ui/views/infobars/infobar_container_view.cc
@@ -18,8 +18,6 @@ InfoBarContainerView::InfoBarContainerView(Delegate* delegate)
: infobars::InfoBarContainer(delegate) {
set_id(VIEW_ID_INFO_BAR_CONTAINER);
SetEventTargeter(make_scoped_ptr(new views::ViewTargeter(this)));
- SetPaintToLayer(true);
- layer()->SetFillsBoundsOpaquely(false);
}
InfoBarContainerView::~InfoBarContainerView() {
@@ -71,7 +69,8 @@ void InfoBarContainerView::PlatformSpecificRemoveInfoBar(
bool InfoBarContainerView::DoesIntersectRect(const View* target,
const gfx::Rect& rect) const {
DCHECK_EQ(this, target);
- // Don't handle events on the vertical overlap portion of the view (the
- // vertical space occupied by the arrow).
- return rect.bottom() >= GetVerticalOverlap(nullptr);
+ // Only events that intersect the portion below the arrow are interesting.
+ gfx::Rect non_arrow_bounds = GetLocalBounds();
+ non_arrow_bounds.Inset(0, GetVerticalOverlap(nullptr), 0, 0);
+ return rect.Intersects(non_arrow_bounds);
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/infobars/infobar_view.h » ('j') | chrome/browser/ui/views/infobars/infobar_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698