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

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

Issue 1162623007: Removed redundant rect methods on FrameView (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | « Source/web/WebRemoteFrameImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | 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 1811 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 if (pinchViewport.visibleRect().isEmpty()) 1822 if (pinchViewport.visibleRect().isEmpty())
1823 return; 1823 return;
1824 1824
1825 pinchViewport.setTopControlsAdjustment(topControlsViewportAdjustment); 1825 pinchViewport.setTopControlsAdjustment(topControlsViewportAdjustment);
1826 1826
1827 // On ChromeOS the pinch viewport can change size independent of the layout viewport due to the 1827 // On ChromeOS the pinch viewport can change size independent of the layout viewport due to the
1828 // on screen keyboard so we should only set the FrameView adjustment on Andr oid. 1828 // on screen keyboard so we should only set the FrameView adjustment on Andr oid.
1829 if (settings() && settings()->mainFrameResizesAreOrientationChanges()) { 1829 if (settings() && settings()->mainFrameResizesAreOrientationChanges()) {
1830 // Shrink the FrameView by the amount that will maintain the aspect-rati o with the PinchViewport. 1830 // Shrink the FrameView by the amount that will maintain the aspect-rati o with the PinchViewport.
1831 float aspectRatio = pinchViewport.visibleRect().width() / pinchViewport. visibleRect().height(); 1831 float aspectRatio = pinchViewport.visibleRect().width() / pinchViewport. visibleRect().height();
1832 float newHeight = view->unscaledVisibleContentSize(ExcludeScrollbars).wi dth() / aspectRatio; 1832 float newHeight = view->visibleContentSize(ExcludeScrollbars).width() / aspectRatio;
1833 float adjustment = newHeight - view->unscaledVisibleContentSize(ExcludeS crollbars).height(); 1833 float adjustment = newHeight - view->visibleContentSize(ExcludeScrollbar s).height();
1834 view->setTopControlsViewportAdjustment(adjustment); 1834 view->setTopControlsViewportAdjustment(adjustment);
1835 } 1835 }
1836 } 1836 }
1837 1837
1838 TopControls& WebViewImpl::topControls() 1838 TopControls& WebViewImpl::topControls()
1839 { 1839 {
1840 return page()->frameHost().topControls(); 1840 return page()->frameHost().topControls();
1841 } 1841 }
1842 1842
1843 void WebViewImpl::resizeViewWhileAnchored(FrameView* view) 1843 void WebViewImpl::resizeViewWhileAnchored(FrameView* view)
(...skipping 2697 matching lines...) Expand 10 before | Expand all | Expand 10 after
4541 { 4541 {
4542 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4542 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4543 } 4543 }
4544 4544
4545 void WebViewImpl::forceNextDrawingBufferCreationToFail() 4545 void WebViewImpl::forceNextDrawingBufferCreationToFail()
4546 { 4546 {
4547 DrawingBuffer::forceNextDrawingBufferCreationToFail(); 4547 DrawingBuffer::forceNextDrawingBufferCreationToFail();
4548 } 4548 }
4549 4549
4550 } // namespace blink 4550 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebRemoteFrameImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698