| Index: third_party/WebKit/Source/web/WebViewImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| index ab8025e66cc5816381fc962a8e66a62a0439bf61..72c1838a4e0a0c3089efe1bc05e2282724c0a6c4 100644
|
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| @@ -1798,12 +1798,14 @@ void WebViewImpl::updateBrowserControlsState(WebBrowserControlsState constraint,
|
|
|
| browserControls().updateConstraintsAndState(constraint, current, animate);
|
|
|
| - // If the controls are going from a locked to an unlocked state, or
|
| - // vice-versa, then we need to force a recompute of the ICB size since that
|
| - // depends on the permitted browser controls state.
|
| - if (oldPermittedState != constraint &&
|
| - (oldPermittedState == WebBrowserControlsBoth ||
|
| - constraint == WebBrowserControlsBoth)) {
|
| + // If the controls are going from a locked hidden to unlocked state, or vice
|
| + // versa, the ICB size needs to change but we can't rely on getting a
|
| + // WebViewImpl::resize since the top controls shown state may not have
|
| + // changed.
|
| + if ((oldPermittedState == WebBrowserControlsHidden &&
|
| + constraint == WebBrowserControlsBoth) ||
|
| + (oldPermittedState == WebBrowserControlsBoth &&
|
| + constraint == WebBrowserControlsHidden)) {
|
| performResize();
|
| }
|
|
|
|
|