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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_mac.mm

Issue 6024008: Consider the popup window position when the window shows upward. This patch depends on WebKit patch. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Try mac and win. Created 9 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
Index: chrome/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
index f8322ab0da9fab34d007b9c243e56b483b2b2919..f6f4ca430b383c116d9f14e8fcbb48dc0071097a 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
@@ -619,6 +619,21 @@ void RenderWidgetHostViewMac::SetSize(const gfx::Size& size) {
[(BaseView*)[cocoa_view_ superview] flipRectToNSRect:rect]];
}
+void RenderWidgetHostViewMac::MoveTo(const gfx::Point& point) {
+ if (is_hidden_)
+ return;
+
+ // Do conversions to upper-left origin, as "move to" means keep the
+ // upper-left corner pinned.
Avi (use Gerrit) 2011/01/25 22:52:07 You can't really say "pinned" here as that implies
+ DCHECK([[cocoa_view_ superview] isKindOfClass:[BaseView class]]);
+ gfx::Rect rect =
+ [(BaseView*)[cocoa_view_ superview] flipNSRectToRect:[cocoa_view_ frame]];
+ rect.set_x(point.x());
+ rect.set_y(point.y());
+ [cocoa_view_ setFrame:
+ [(BaseView*)[cocoa_view_ superview] flipRectToNSRect:rect]];
+}
+
gfx::NativeView RenderWidgetHostViewMac::GetNativeView() {
return native_view();
}

Powered by Google App Engine
This is Rietveld 408576698