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

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

Issue 2105523002: Don't set shownRatio in main thread top controls on animated state change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improved test a bit Created 4 years, 5 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
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 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after
1824 page()->frameHost().visualViewport().setSize(m_size); 1824 page()->frameHost().visualViewport().setSize(m_size);
1825 1825
1826 if (mainFrameImpl()->frameView()) { 1826 if (mainFrameImpl()->frameView()) {
1827 if (!mainFrameImpl()->frameView()->needsLayout()) 1827 if (!mainFrameImpl()->frameView()->needsLayout())
1828 postLayoutResize(mainFrameImpl()); 1828 postLayoutResize(mainFrameImpl());
1829 } 1829 }
1830 } 1830 }
1831 1831
1832 void WebViewImpl::updateTopControlsState(WebTopControlsState constraint, WebTopC ontrolsState current, bool animate) 1832 void WebViewImpl::updateTopControlsState(WebTopControlsState constraint, WebTopC ontrolsState current, bool animate)
1833 { 1833 {
1834 topControls().updateConstraints(constraint); 1834 topControls().updateConstraintsAndState(constraint, current, animate);
1835
1835 if (m_layerTreeView) 1836 if (m_layerTreeView)
1836 m_layerTreeView->updateTopControlsState(constraint, current, animate); 1837 m_layerTreeView->updateTopControlsState(constraint, current, animate);
1837 } 1838 }
1838 1839
1839 void WebViewImpl::didUpdateTopControls() 1840 void WebViewImpl::didUpdateTopControls()
1840 { 1841 {
1841 if (m_layerTreeView) { 1842 if (m_layerTreeView) {
1842 m_layerTreeView->setTopControlsShownRatio(topControls().shownRatio()); 1843 m_layerTreeView->setTopControlsShownRatio(topControls().shownRatio());
1843 m_layerTreeView->setTopControlsHeight(topControls().height(), topControl s().shrinkViewport()); 1844 m_layerTreeView->setTopControlsHeight(topControls().height(), topControl s().shrinkViewport());
1844 } 1845 }
(...skipping 2678 matching lines...) Expand 10 before | Expand all | Expand 10 after
4523 { 4524 {
4524 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4525 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4525 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4526 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4526 if (!page()) 4527 if (!page())
4527 return 1; 4528 return 1;
4528 4529
4529 return page()->deviceScaleFactor(); 4530 return page()->deviceScaleFactor();
4530 } 4531 }
4531 4532
4532 } // namespace blink 4533 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/TopControls.cpp ('k') | third_party/WebKit/Source/web/tests/TopControlsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698