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

Unified Diff: chrome/views/hwnd_view.cc

Issue 13235: Cleanup adding BoundsInWidget to View to convert callers... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years 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/views/hwnd_view.cc
===================================================================
--- chrome/views/hwnd_view.cc (revision 6273)
+++ chrome/views/hwnd_view.cc (working copy)
@@ -70,8 +70,7 @@
// children of the Widget that hosts our View hierarchy) they need to be
// positioned in the coordinate system of the Widget, not the current
// view.
- gfx::Point top_left;
- ConvertPointToWidget(this, &top_left);
+ gfx::Rect widget_bounds = BoundsInWidget();
gfx::Rect vis_bounds = GetVisibleBounds();
bool visible = !vis_bounds.IsEmpty();
@@ -110,15 +109,15 @@
// In a fast resize, we move the window and clip it with SetWindowRgn.
CRect rect;
GetWindowRect(hwnd_, &rect);
- ::SetWindowPos(hwnd_, 0, top_left.x(), top_left.y(), rect.Width(),
- rect.Height(), swp_flags);
+ ::SetWindowPos(hwnd_, 0, widget_bounds.x(), widget_bounds.y(),
+ rect.Width(), rect.Height(), swp_flags);
HRGN clip_region = CreateRectRgn(0, 0, width(), height());
SetWindowRgn(hwnd_, clip_region, FALSE);
installed_clip_ = true;
} else {
- ::SetWindowPos(hwnd_, 0, top_left.x(), top_left.y(), width(), height(),
- swp_flags);
+ ::SetWindowPos(hwnd_, 0, widget_bounds.x(), widget_bounds.y(), width(),
+ height(), swp_flags);
}
} else if (::IsWindowVisible(hwnd_)) {
// The window is currently visible, but its clipped by another view. Hide

Powered by Google App Engine
This is Rietveld 408576698