Commit 4ab66959 authored by Ahmed Fakhry's avatar Ahmed Fakhry Committed by Commit Bot

Prevent a zero-sized browser contents

Allowing a browser window to be resized such that
the contents view's size is 0x0 caused the contents
view's window to become invisble and stop it from
being able to accept events.

Instead we use a minimum size of 1x1 for the contents.

BUG=847179

Change-Id: I7790d5e2e4862fce8bb19a5c7d3134b45c6a0c63
Reviewed-on: https://chromium-review.googlesource.com/1141344Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575907}
parent b7be7335
...@@ -187,6 +187,12 @@ gfx::Size BrowserViewLayout::GetMinimumSize() { ...@@ -187,6 +187,12 @@ gfx::Size BrowserViewLayout::GetMinimumSize() {
// TODO: Adjust the minimum height for the find bar. // TODO: Adjust the minimum height for the find bar.
gfx::Size contents_size(contents_container_->GetMinimumSize()); gfx::Size contents_size(contents_container_->GetMinimumSize());
// Prevent having a 0x0 sized-contents as this can allow the window to be
// resized down such that it's invisible and can no longer accept events.
// Use a very small 1x1 size to allow the user and the web contents to be able
// to resize the window as small as possible without introducing bugs.
// https://crbug.com/847179.
contents_size.SetToMax(gfx::Size(1, 1));
int min_height = delegate_->GetTopInsetInBrowserView(false) + int min_height = delegate_->GetTopInsetInBrowserView(false) +
tabstrip_size.height() + toolbar_size.height() + tabstrip_size.height() + toolbar_size.height() +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment