| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |