| Index: chrome/browser/ui/panels/panel.cc
|
| diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
|
| index b8a2790deb6e5792aa232db996e3ab54c1c76e2d..ac995394bfeebeb01ec39b4da3c441bad5c0c070 100644
|
| --- a/chrome/browser/ui/panels/panel.cc
|
| +++ b/chrome/browser/ui/panels/panel.cc
|
| @@ -506,9 +506,17 @@ void Panel::OnContentsAutoResized(const gfx::Size& new_content_size) {
|
| if (!panel_strip_)
|
| return;
|
|
|
| - panel_strip_->ResizePanelWindow(
|
| - this,
|
| - native_panel_->WindowSizeFromContentSize(new_content_size));
|
| + gfx::Size new_window_size =
|
| + native_panel_->WindowSizeFromContentSize(new_content_size);
|
| +
|
| + // Ignore content auto resizes until window frame size is known.
|
| + // This reduces extra resizes when panel is first shown.
|
| + // After window frame size is known, it will trigger another content
|
| + // auto resize.
|
| + if (new_content_size == new_window_size)
|
| + return;
|
| +
|
| + panel_strip_->ResizePanelWindow(this, new_window_size);
|
| }
|
|
|
| void Panel::OnWindowResizedByMouse(const gfx::Rect& new_bounds) {
|
|
|