diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-15 00:52:44 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-15 00:52:44 +0000 |
commit | 6db87803de31ac4412088b17748284977ea4a468 (patch) | |
tree | 5002db28b40f74a85d9f15d8f97ee8ea197e2aea /chrome/browser/tab_contents/web_contents_view.h | |
parent | d02f41640fbc99ad55084a6b232285c3a44a9c1f (diff) | |
download | chromium_src-6db87803de31ac4412088b17748284977ea4a468.zip chromium_src-6db87803de31ac4412088b17748284977ea4a468.tar.gz chromium_src-6db87803de31ac4412088b17748284977ea4a468.tar.bz2 |
Fix missing backing store in Linux.
Issue: In the renderer host, the RenderWidgetHostView gets created before the ViewMsg_New gets sent. In the Linux code, gtk packing of the RenderWidgetHostView will cause a configure-event to happen, which leads to ViewHost_Resize getting sent before the ViewMsg_New gets sent. This eventually leads to the backing store never getting created. See the bug report for details.
Fix:
Add a SetChildSize() method to WebContentsView.
Windows and Mac keep their current flow of just calling SetSize() on the child.
Linux defers packing from the RenderWidgetHostView creation to the SetChildSize() call.
BUG=9830
Review URL: http://codereview.chromium.org/67044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13725 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/web_contents_view.h')
-rw-r--r-- | chrome/browser/tab_contents/web_contents_view.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/web_contents_view.h b/chrome/browser/tab_contents/web_contents_view.h index ef20996..6f57690 100644 --- a/chrome/browser/tab_contents/web_contents_view.h +++ b/chrome/browser/tab_contents/web_contents_view.h @@ -35,7 +35,7 @@ class WaitableEvent; // that should be the same for all platforms. class WebContentsView : public RenderViewHostDelegate::View { public: - WebContentsView(WebContents* web_contents); + explicit WebContentsView(WebContents* web_contents); virtual ~WebContentsView() {} // Creates the appropriate type of WebContentsView for the current system. @@ -124,6 +124,10 @@ class WebContentsView : public RenderViewHostDelegate::View { // invoked, SetInitialFocus is invoked. virtual void RestoreFocus() = 0; + // Sets children's size. May involve packing them in order to get the + // toolkit to send them resize events. + virtual void SetChildSize(RenderWidgetHostView* rwh_view) = 0; + protected: WebContentsView() {} // Abstract interface. |