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

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

Issue 911083002: Carry out a resize even if no layout has been performed. (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 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 performResize(); 1815 performResize();
1816 } 1816 }
1817 1817
1818 m_fullscreenController->updateSize(); 1818 m_fullscreenController->updateSize();
1819 1819
1820 if (settings()->viewportEnabled()) { 1820 if (settings()->viewportEnabled()) {
1821 PinchViewport& pinchViewport = page()->frameHost().pinchViewport(); 1821 PinchViewport& pinchViewport = page()->frameHost().pinchViewport();
1822 FloatPoint viewportOffsetBeforeResize = pinchViewport.visibleRectInDocum ent().location(); 1822 FloatPoint viewportOffsetBeforeResize = pinchViewport.visibleRectInDocum ent().location();
1823 1823
1824 // Relayout immediately to recalculate the minimum scale limit. 1824 // Relayout immediately to recalculate the minimum scale limit.
1825 if (view->needsLayout()) 1825 if (view->needsLayout() || (page()->settings().forceZeroLayoutHeight() & & pinchVirtualViewportEnabled()))
hush (inactive) 2015/02/10 18:21:04 I think the initial purpose for forceZeroLayoutHei
aelias_OOO_until_Jul13 2015/02/10 21:16:57 No, the initial purpose is to avoid weird layout i
1826 view->layout(); 1826 view->layout();
1827 1827
1828 if (shouldAnchorAndRescaleViewport) { 1828 if (shouldAnchorAndRescaleViewport) {
1829 float newPageScaleFactor = oldPageScaleFactor / oldMinimumPageScaleF actor * minimumPageScaleFactor(); 1829 float newPageScaleFactor = oldPageScaleFactor / oldMinimumPageScaleF actor * minimumPageScaleFactor();
1830 newPageScaleFactor = clampPageScaleFactorToLimits(newPageScaleFactor ); 1830 newPageScaleFactor = clampPageScaleFactorToLimits(newPageScaleFactor );
1831 1831
1832 FloatSize pinchViewportSize = FloatSize(newSize); 1832 FloatSize pinchViewportSize = FloatSize(newSize);
1833 pinchViewportSize.scale(1 / newPageScaleFactor); 1833 pinchViewportSize.scale(1 / newPageScaleFactor);
1834 1834
1835 IntPoint mainFrameOrigin; 1835 IntPoint mainFrameOrigin;
(...skipping 2788 matching lines...) Expand 10 before | Expand all | Expand 10 after
4624 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4624 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4625 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4625 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4626 } 4626 }
4627 4627
4628 void WebViewImpl::forceNextWebGLContextCreationToFail() 4628 void WebViewImpl::forceNextWebGLContextCreationToFail()
4629 { 4629 {
4630 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4630 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4631 } 4631 }
4632 4632
4633 } // namespace blink 4633 } // 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