Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2656633003: Changing URL bar constraints only calls performResize on Hidden <-> Both (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after
1791 } 1791 }
1792 1792
1793 void WebViewImpl::updateBrowserControlsState(WebBrowserControlsState constraint, 1793 void WebViewImpl::updateBrowserControlsState(WebBrowserControlsState constraint,
1794 WebBrowserControlsState current, 1794 WebBrowserControlsState current,
1795 bool animate) { 1795 bool animate) {
1796 WebBrowserControlsState oldPermittedState = 1796 WebBrowserControlsState oldPermittedState =
1797 browserControls().permittedState(); 1797 browserControls().permittedState();
1798 1798
1799 browserControls().updateConstraintsAndState(constraint, current, animate); 1799 browserControls().updateConstraintsAndState(constraint, current, animate);
1800 1800
1801 // If the controls are going from a locked to an unlocked state, or 1801 // If the controls are going from a locked hidden to unlocked state, or vice
1802 // vice-versa, then we need to force a recompute of the ICB size since that 1802 // versa, the ICB size needs to change but we can't rely on getting a
1803 // depends on the permitted browser controls state. 1803 // WebViewImpl::resize since the top controls shown state may not have
1804 if (oldPermittedState != constraint && 1804 // changed.
1805 (oldPermittedState == WebBrowserControlsBoth || 1805 if ((oldPermittedState == WebBrowserControlsHidden &&
1806 constraint == WebBrowserControlsBoth)) { 1806 constraint == WebBrowserControlsBoth) ||
1807 (oldPermittedState == WebBrowserControlsBoth &&
1808 constraint == WebBrowserControlsHidden)) {
1807 performResize(); 1809 performResize();
1808 } 1810 }
1809 1811
1810 if (m_layerTreeView) 1812 if (m_layerTreeView)
1811 m_layerTreeView->updateBrowserControlsState(constraint, current, animate); 1813 m_layerTreeView->updateBrowserControlsState(constraint, current, animate);
1812 } 1814 }
1813 1815
1814 void WebViewImpl::didUpdateBrowserControls() { 1816 void WebViewImpl::didUpdateBrowserControls() {
1815 if (m_layerTreeView) { 1817 if (m_layerTreeView) {
1816 m_layerTreeView->setBrowserControlsShownRatio( 1818 m_layerTreeView->setBrowserControlsShownRatio(
(...skipping 2369 matching lines...) Expand 10 before | Expand all | Expand 10 after
4186 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) 4188 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame())
4187 return nullptr; 4189 return nullptr;
4188 return focusedFrame; 4190 return focusedFrame;
4189 } 4191 }
4190 4192
4191 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { 4193 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const {
4192 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4194 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4193 } 4195 }
4194 4196
4195 } // namespace blink 4197 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698