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

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

Issue 640063002: Hide scrollbars when their dimensions are not scrollable. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 4283 matching lines...) Expand 10 before | Expand all | Expand 10 after
4294 m_doubleTapZoomPending = false; 4294 m_doubleTapZoomPending = false;
4295 } 4295 }
4296 } 4296 }
4297 4297
4298 void WebViewImpl::updateLayerTreeViewport() 4298 void WebViewImpl::updateLayerTreeViewport()
4299 { 4299 {
4300 if (!page() || !m_layerTreeView) 4300 if (!page() || !m_layerTreeView)
4301 return; 4301 return;
4302 4302
4303 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS caleFactor(), maximumPageScaleFactor()); 4303 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS caleFactor(), maximumPageScaleFactor());
4304
4305 if (pinchVirtualViewportEnabled())
4306 page()->frameHost().pinchViewport().adjustScrollbarExistence();
4304 } 4307 }
4305 4308
4306 void WebViewImpl::updateLayerTreeBackgroundColor() 4309 void WebViewImpl::updateLayerTreeBackgroundColor()
4307 { 4310 {
4308 if (!m_layerTreeView) 4311 if (!m_layerTreeView)
4309 return; 4312 return;
4310 4313
4311 m_layerTreeView->setBackgroundColor(alphaChannel(m_backgroundColorOverride) ? m_backgroundColorOverride : backgroundColor()); 4314 m_layerTreeView->setBackgroundColor(alphaChannel(m_backgroundColorOverride) ? m_backgroundColorOverride : backgroundColor());
4312 } 4315 }
4313 4316
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
4443 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4446 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4444 4447
4445 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4448 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4446 return false; 4449 return false;
4447 4450
4448 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4451 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4449 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4452 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4450 } 4453 }
4451 4454
4452 } // namespace blink 4455 } // namespace blink
OLDNEW
« Source/core/frame/PinchViewport.cpp ('K') | « Source/core/frame/PinchViewport.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698