| 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 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1763 m_page.clear(); | 1763 m_page.clear(); |
| 1764 } | 1764 } |
| 1765 | 1765 |
| 1766 // Reset the delegate to prevent notifications being sent as we're being | 1766 // Reset the delegate to prevent notifications being sent as we're being |
| 1767 // deleted. | 1767 // deleted. |
| 1768 m_client = nullptr; | 1768 m_client = nullptr; |
| 1769 | 1769 |
| 1770 deref(); // Balances ref() acquired in WebView::create | 1770 deref(); // Balances ref() acquired in WebView::create |
| 1771 } | 1771 } |
| 1772 | 1772 |
| 1773 void WebViewImpl::willStartLiveResize() | |
| 1774 { | |
| 1775 if (mainFrameImpl() && mainFrameImpl()->frameView()) | |
| 1776 mainFrameImpl()->frameView()->willStartLiveResize(); | |
| 1777 } | |
| 1778 | |
| 1779 WebSize WebViewImpl::size() | 1773 WebSize WebViewImpl::size() |
| 1780 { | 1774 { |
| 1781 return m_size; | 1775 return m_size; |
| 1782 } | 1776 } |
| 1783 | 1777 |
| 1784 void WebViewImpl::resizeVisualViewport(const WebSize& newSize) | 1778 void WebViewImpl::resizeVisualViewport(const WebSize& newSize) |
| 1785 { | 1779 { |
| 1786 page()->frameHost().visualViewport().setSize(newSize); | 1780 page()->frameHost().visualViewport().setSize(newSize); |
| 1787 page()->frameHost().visualViewport().clampToBoundaries(); | 1781 page()->frameHost().visualViewport().clampToBoundaries(); |
| 1788 } | 1782 } |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1900 if (isRotation) { | 1894 if (isRotation) { |
| 1901 RotationViewportAnchor anchor(*view, visualViewport, viewportAnchorCoord
s, pageScaleConstraintsSet()); | 1895 RotationViewportAnchor anchor(*view, visualViewport, viewportAnchorCoord
s, pageScaleConstraintsSet()); |
| 1902 resizeViewWhileAnchored(view); | 1896 resizeViewWhileAnchored(view); |
| 1903 } else { | 1897 } else { |
| 1904 ResizeViewportAnchor anchor(*view, visualViewport); | 1898 ResizeViewportAnchor anchor(*view, visualViewport); |
| 1905 resizeViewWhileAnchored(view); | 1899 resizeViewWhileAnchored(view); |
| 1906 } | 1900 } |
| 1907 sendResizeEventAndRepaint(); | 1901 sendResizeEventAndRepaint(); |
| 1908 } | 1902 } |
| 1909 | 1903 |
| 1910 void WebViewImpl::willEndLiveResize() | |
| 1911 { | |
| 1912 if (mainFrameImpl() && mainFrameImpl()->frameView()) | |
| 1913 mainFrameImpl()->frameView()->willEndLiveResize(); | |
| 1914 } | |
| 1915 | |
| 1916 void WebViewImpl::didEnterFullScreen() | 1904 void WebViewImpl::didEnterFullScreen() |
| 1917 { | 1905 { |
| 1918 m_fullscreenController->didEnterFullScreen(); | 1906 m_fullscreenController->didEnterFullScreen(); |
| 1919 } | 1907 } |
| 1920 | 1908 |
| 1921 void WebViewImpl::didExitFullScreen() | 1909 void WebViewImpl::didExitFullScreen() |
| 1922 { | 1910 { |
| 1923 m_fullscreenController->didExitFullScreen(); | 1911 m_fullscreenController->didExitFullScreen(); |
| 1924 } | 1912 } |
| 1925 | 1913 |
| (...skipping 2661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4587 { | 4575 { |
| 4588 // 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 |
| 4589 // 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. |
| 4590 if (!page()) | 4578 if (!page()) |
| 4591 return 1; | 4579 return 1; |
| 4592 | 4580 |
| 4593 return page()->deviceScaleFactor(); | 4581 return page()->deviceScaleFactor(); |
| 4594 } | 4582 } |
| 4595 | 4583 |
| 4596 } // namespace blink | 4584 } // namespace blink |
| OLD | NEW |