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

Side by Side Diff: content/browser/web_contents/web_contents_view_gtk.cc

Issue 11308083: Fix the html select tag showing up at the wrong position. This was a regression from r166446. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix win_rel Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/web_contents_view_gtk.h" 5 #include "content/browser/web_contents/web_contents_view_gtk.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 // Renderer target DnD. 142 // Renderer target DnD.
143 drag_dest_.reset(new WebDragDestGtk(web_contents_, content_view)); 143 drag_dest_.reset(new WebDragDestGtk(web_contents_, content_view));
144 144
145 if (delegate_.get()) 145 if (delegate_.get())
146 drag_dest_->set_delegate(delegate_->GetDragDestDelegate()); 146 drag_dest_->set_delegate(delegate_->GetDragDestDelegate());
147 147
148 return view; 148 return view;
149 } 149 }
150 150
151 void WebContentsViewGtk::SetView(RenderWidgetHostView* view) {
152 gfx::NativeView content_view = view->GetNativeView();
153 drag_dest_.reset(new WebDragDestGtk(web_contents_, content_view));
154 if (delegate_.get())
155 drag_dest_->set_delegate(delegate_->GetDragDestDelegate());
156 }
157
151 gfx::NativeView WebContentsViewGtk::GetNativeView() const { 158 gfx::NativeView WebContentsViewGtk::GetNativeView() const {
152 if (delegate_.get()) 159 if (delegate_.get())
153 return delegate_->GetNativeView(); 160 return delegate_->GetNativeView();
154 161
155 return expanded_.get(); 162 return expanded_.get();
156 } 163 }
157 164
158 gfx::NativeView WebContentsViewGtk::GetContentNativeView() const { 165 gfx::NativeView WebContentsViewGtk::GetContentNativeView() const {
159 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); 166 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView();
160 if (!rwhv) 167 if (!rwhv)
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 // We manually tell our RWHV to resize the renderer content. This avoids 386 // We manually tell our RWHV to resize the renderer content. This avoids
380 // spurious resizes from GTK+. 387 // spurious resizes from GTK+.
381 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); 388 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView();
382 if (rwhv) 389 if (rwhv)
383 rwhv->SetSize(size); 390 rwhv->SetSize(size);
384 if (web_contents_->GetInterstitialPage()) 391 if (web_contents_->GetInterstitialPage())
385 web_contents_->GetInterstitialPage()->SetSize(size); 392 web_contents_->GetInterstitialPage()->SetSize(size);
386 } 393 }
387 394
388 } // namespace content 395 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_gtk.h ('k') | content/browser/web_contents/web_contents_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698