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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_gtk.cc

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: Created 10 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/browser/renderer_host/render_widget_host_view_gtk.cc
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
index aa43529c2f93762263070a8e73ea0c8ff3cd5a95..37457eec3d2c410dbb2fee263295bb82be01bb30 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -567,6 +567,23 @@ void RenderWidgetHostViewGtk::SetSize(const gfx::Size& size) {
}
}
+void RenderWidgetHostViewGtk::SetMove(const gfx::Point& origin) {
+ // This is called when webkit has sent us a Move message.
+ if (IsPopup()) {
+ // We're a popup, honor the size request.
+ gtk_window_move(GTK_WINDOW(gtk_widget_get_parent(view_.get())),
+ origin.x(), origin.y());
Ilya Sherman 2010/12/22 01:16:35 nit: This should be indented to line up with "GTK"
honten.org 2010/12/22 01:29:41 Sorry, I cannot understand what you mean. But I un
Ilya Sherman 2010/12/22 01:39:58 This should be formatted like so: gtk_window_move
honten.org 2010/12/22 01:41:27 Got it, On 2010/12/22 01:39:58, Ilya Sherman wrot
+ } else {
+#if defined(TOOLKIT_VIEWS)
+ // TOOLKIT_VIEWS' resize logic flow matches windows. so we go ahead and
+ // size the widget. In GTK+, the size of the widget is determined by its
+ // children.
+ gtk_window_move(GTK_WINDOW(gtk_widget_get_parent(view_.get())),
+ origin.x(), origin.y());
+#endif
+ }
+}
+
gfx::NativeView RenderWidgetHostViewGtk::GetNativeView() {
return view_.get();
}

Powered by Google App Engine
This is Rietveld 408576698