| Index: chrome/browser/ui/browser_tabrestore.cc
|
| diff --git a/chrome/browser/ui/browser_tabrestore.cc b/chrome/browser/ui/browser_tabrestore.cc
|
| index f939a74327c13c3394d662f3a9e7d44766a7017e..68af63dbe3b1494b2a80bdc0f7f7196406b04d81 100644
|
| --- a/chrome/browser/ui/browser_tabrestore.cc
|
| +++ b/chrome/browser/ui/browser_tabrestore.cc
|
| @@ -17,6 +17,7 @@
|
| #include "content/public/browser/session_storage_namespace.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/browser/web_contents_view.h"
|
| +#include "ui/gfx/layout_util.h"
|
|
|
| using content::WebContents;
|
| using content::NavigationController;
|
| @@ -113,14 +114,14 @@ content::WebContents* AddRestoredTab(
|
| if (select) {
|
| browser->window()->Activate();
|
| } else {
|
| - // We set the size of the view here, before WebKit does its initial
|
| - // layout. If we don't, the initial layout of background tabs will be
|
| - // performed with a view width of 0, which may cause script outputs and
|
| - // anchor link location calculations to be incorrect even after a new
|
| - // layout with proper view dimensions. TabStripModel::AddWebContents()
|
| - // contains similar logic.
|
| - web_contents->GetView()->SizeContents(
|
| - browser->window()->GetRestoredBounds().size());
|
| + // We set the size of the view here, before Blink does its initial layout.
|
| + // If we don't, the initial layout of background tabs will be performed
|
| + // with a view width of 0, which may cause script outputs and anchor link
|
| + // location calculations to be incorrect even after a new layout with
|
| + // proper view dimensions. TabStripModel::AddWebContents() contains similar
|
| + // logic.
|
| + gfx::ResizeWebContents(web_contents,
|
| + browser->window()->GetRestoredBounds().size());
|
| web_contents->WasHidden();
|
| }
|
| SessionService* session_service =
|
|
|