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

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

Issue 939303006: Conditionally propagate top controls update to layer tree view. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 } 1710 }
1711 1711
1712 void WebViewImpl::setTopControlsHeight(float height, bool topControlsShrinkLayou tSize) 1712 void WebViewImpl::setTopControlsHeight(float height, bool topControlsShrinkLayou tSize)
1713 { 1713 {
1714 topControls().setHeight(height, topControlsShrinkLayoutSize); 1714 topControls().setHeight(height, topControlsShrinkLayoutSize);
1715 } 1715 }
1716 1716
1717 void WebViewImpl::updateTopControlsState(WebTopControlsState constraint, WebTopC ontrolsState current, bool animate) 1717 void WebViewImpl::updateTopControlsState(WebTopControlsState constraint, WebTopC ontrolsState current, bool animate)
1718 { 1718 {
1719 topControls().updateConstraints(constraint); 1719 topControls().updateConstraints(constraint);
1720 m_layerTreeView->updateTopControlsState(constraint, current, animate); 1720 if (m_layerTreeView)
1721 m_layerTreeView->updateTopControlsState(constraint, current, animate);
1721 } 1722 }
1722 1723
1723 void WebViewImpl::didUpdateTopControls() 1724 void WebViewImpl::didUpdateTopControls()
1724 { 1725 {
1725 if (m_layerTreeView) { 1726 if (m_layerTreeView) {
1726 m_layerTreeView->setTopControlsShownRatio(topControls().shownRatio()); 1727 m_layerTreeView->setTopControlsShownRatio(topControls().shownRatio());
1727 m_layerTreeView->setTopControlsHeight(topControls().height(), topControl s().shrinkViewport()); 1728 m_layerTreeView->setTopControlsHeight(topControls().height(), topControl s().shrinkViewport());
1728 } 1729 }
1729 1730
1730 WebLocalFrameImpl* mainFrame = mainFrameImpl(); 1731 WebLocalFrameImpl* mainFrame = mainFrameImpl();
(...skipping 2888 matching lines...) Expand 10 before | Expand all | Expand 10 after
4619 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4620 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4620 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4621 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4621 } 4622 }
4622 4623
4623 void WebViewImpl::forceNextWebGLContextCreationToFail() 4624 void WebViewImpl::forceNextWebGLContextCreationToFail()
4624 { 4625 {
4625 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4626 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4626 } 4627 }
4627 4628
4628 } // namespace blink 4629 } // 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