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

Unified Diff: chrome/browser/views/frame/browser_view.cc

Issue 18019: Pixel perfection on tabstrip for non-Aero frame. This gets both ends of the ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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
« no previous file with comments | « chrome/browser/views/frame/browser_frame.h ('k') | chrome/browser/views/frame/opaque_non_client_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/browser_view.cc
===================================================================
--- chrome/browser/views/frame/browser_view.cc (revision 7872)
+++ chrome/browser/views/frame/browser_view.cc (working copy)
@@ -769,15 +769,13 @@
}
gfx::Rect window_rect = frame_->GetWindowBoundsForClientBounds(*bounds);
- window_rect.set_origin(gfx::Point(bounds->x(), bounds->y()));
+ window_rect.set_origin(bounds->origin());
// When we are given x/y coordinates of 0 on a created popup window,
// assume none were given by the window.open() command.
if (window_rect.x() == 0 && window_rect.y() == 0) {
- gfx::Point origin = GetNormalBounds().origin();
- origin.set_x(origin.x() + kWindowTilePixels);
- origin.set_y(origin.y() + kWindowTilePixels);
- window_rect.set_origin(origin);
+ window_rect.set_origin(GetNormalBounds().origin());
+ window_rect.Offset(kWindowTilePixels, kWindowTilePixels);
}
*bounds = window_rect;
@@ -1036,6 +1034,9 @@
int BrowserView::LayoutTabStrip() {
if (IsTabStripVisible()) {
gfx::Rect tabstrip_bounds = frame_->GetBoundsForTabStrip(tabstrip_);
+ gfx::Point tabstrip_origin = tabstrip_bounds.origin();
+ ConvertPointToView(GetParent(), this, &tabstrip_origin);
+ tabstrip_bounds.set_origin(tabstrip_origin);
tabstrip_->SetBounds(tabstrip_bounds.x(), tabstrip_bounds.y(),
tabstrip_bounds.width(), tabstrip_bounds.height());
return tabstrip_bounds.bottom();
« no previous file with comments | « chrome/browser/views/frame/browser_frame.h ('k') | chrome/browser/views/frame/opaque_non_client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698