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

Unified Diff: chrome/browser/ui/views/toolbar_view.cc

Issue 11270042: Add non-member non-mutating methods for common gfx::Rect operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 2 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/toolbar_view.cc
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index a8826e31031ce6d7dd45d546e9a7126e9ab35d03..51beff21a6a408fb5635abf2ba125894c017d2eb 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -444,8 +444,8 @@ void ToolbarView::LayoutForSearch() {
// Note that parent of |location_bar_container_| i.e. BrowserView can't clip
// its children, else it loses the 3D shadows.
gfx::Rect parent_rect = location_bar_container_->parent()->GetLocalBounds();
- gfx::Rect intersect_rect = parent_rect;
- intersect_rect.Intersect(location_container_bounds);
+ gfx::Rect intersect_rect =
+ gfx::IntersectRects(parent_rect, location_container_bounds);
// If the two bounds don't intersect, set bounds of |location_bar_container_|
// to 0.
location_bar_container_->SetBoundsRect(intersect_rect);
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc ('k') | content/browser/renderer_host/backing_store_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698