| 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 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1786 page()->frameHost().visualViewport().setSize(newSize); | 1786 page()->frameHost().visualViewport().setSize(newSize); |
| 1787 page()->frameHost().visualViewport().clampToBoundaries(); | 1787 page()->frameHost().visualViewport().clampToBoundaries(); |
| 1788 } | 1788 } |
| 1789 | 1789 |
| 1790 void WebViewImpl::performResize() | 1790 void WebViewImpl::performResize() |
| 1791 { | 1791 { |
| 1792 // We'll keep the initial containing block size from changing when the top | 1792 // We'll keep the initial containing block size from changing when the top |
| 1793 // controls hide so that the ICB will always be the same size as the | 1793 // controls hide so that the ICB will always be the same size as the |
| 1794 // viewport with the top controls shown. | 1794 // viewport with the top controls shown. |
| 1795 IntSize ICBSize = m_size; | 1795 IntSize ICBSize = m_size; |
| 1796 if (!topControls().shrinkViewport()) | 1796 if (RuntimeEnabledFeatures::inertTopControlsEnabled() && !topControls().shri
nkViewport()) |
| 1797 ICBSize.expand(0, -topControls().height()); | 1797 ICBSize.expand(0, -topControls().height()); |
| 1798 | 1798 |
| 1799 pageScaleConstraintsSet().didChangeInitialContainingBlockSize(ICBSize); | 1799 pageScaleConstraintsSet().didChangeInitialContainingBlockSize(ICBSize); |
| 1800 | 1800 |
| 1801 updatePageDefinedViewportConstraints(mainFrameImpl()->frame()->document()->v
iewportDescription()); | 1801 updatePageDefinedViewportConstraints(mainFrameImpl()->frame()->document()->v
iewportDescription()); |
| 1802 updateMainFrameLayoutSize(); | 1802 updateMainFrameLayoutSize(); |
| 1803 | 1803 |
| 1804 page()->frameHost().visualViewport().setSize(m_size); | 1804 page()->frameHost().visualViewport().setSize(m_size); |
| 1805 | 1805 |
| 1806 if (mainFrameImpl()->frameView()) { | 1806 if (mainFrameImpl()->frameView()) { |
| (...skipping 2768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4575 { | 4575 { |
| 4576 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4576 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
| 4577 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4577 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4578 if (!page()) | 4578 if (!page()) |
| 4579 return 1; | 4579 return 1; |
| 4580 | 4580 |
| 4581 return page()->deviceScaleFactor(); | 4581 return page()->deviceScaleFactor(); |
| 4582 } | 4582 } |
| 4583 | 4583 |
| 4584 } // namespace blink | 4584 } // namespace blink |
| OLD | NEW |