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 3773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3784 | 3784 |
3785 if (m_client) { | 3785 if (m_client) { |
3786 if (m_layerTreeView) { | 3786 if (m_layerTreeView) { |
3787 updateLayerTreeViewport(); | 3787 updateLayerTreeViewport(); |
3788 } else { | 3788 } else { |
3789 WebRect damagedRect(0, 0, m_size.width, m_size.height); | 3789 WebRect damagedRect(0, 0, m_size.width, m_size.height); |
3790 m_client->didInvalidateRect(damagedRect); | 3790 m_client->didInvalidateRect(damagedRect); |
3791 } | 3791 } |
3792 } | 3792 } |
3793 updatePageOverlays(); | 3793 updatePageOverlays(); |
3794 m_devToolsEmulator->viewportChanged(); | |
3795 } | 3794 } |
3796 | 3795 |
3797 void WebViewImpl::configureAutoResizeMode() | 3796 void WebViewImpl::configureAutoResizeMode() |
3798 { | 3797 { |
3799 if (!mainFrameImpl() || !mainFrameImpl()->frame() || !mainFrameImpl()->frame
()->view()) | 3798 if (!mainFrameImpl() || !mainFrameImpl()->frame() || !mainFrameImpl()->frame
()->view()) |
3800 return; | 3799 return; |
3801 | 3800 |
3802 if (m_shouldAutoResize) | 3801 if (m_shouldAutoResize) |
3803 mainFrameImpl()->frame()->view()->enableAutoSizeMode(m_minAutoSize, m_ma
xAutoSize); | 3802 mainFrameImpl()->frame()->view()->enableAutoSizeMode(m_minAutoSize, m_ma
xAutoSize); |
3804 else | 3803 else |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4140 | 4139 |
4141 void WebViewImpl::didChangeContentsSize() | 4140 void WebViewImpl::didChangeContentsSize() |
4142 { | 4141 { |
4143 pageScaleConstraintsSet().didChangeContentsSize(contentsSize(), pageScaleFac
tor()); | 4142 pageScaleConstraintsSet().didChangeContentsSize(contentsSize(), pageScaleFac
tor()); |
4144 } | 4143 } |
4145 | 4144 |
4146 void WebViewImpl::pageScaleFactorChanged() | 4145 void WebViewImpl::pageScaleFactorChanged() |
4147 { | 4146 { |
4148 pageScaleConstraintsSet().setNeedsReset(false); | 4147 pageScaleConstraintsSet().setNeedsReset(false); |
4149 updateLayerTreeViewport(); | 4148 updateLayerTreeViewport(); |
4150 m_devToolsEmulator->viewportChanged(); | |
4151 m_client->pageScaleFactorChanged(); | 4149 m_client->pageScaleFactorChanged(); |
4152 } | 4150 } |
4153 | 4151 |
4154 bool WebViewImpl::useExternalPopupMenus() | 4152 bool WebViewImpl::useExternalPopupMenus() |
4155 { | 4153 { |
4156 return shouldUseExternalPopupMenus; | 4154 return shouldUseExternalPopupMenus; |
4157 } | 4155 } |
4158 | 4156 |
4159 void WebViewImpl::startDragging(LocalFrame* frame, | 4157 void WebViewImpl::startDragging(LocalFrame* frame, |
4160 const WebDragData& dragData, | 4158 const WebDragData& dragData, |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4633 { | 4631 { |
4634 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4632 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
4635 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4633 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
4636 if (!page()) | 4634 if (!page()) |
4637 return 1; | 4635 return 1; |
4638 | 4636 |
4639 return page()->deviceScaleFactor(); | 4637 return page()->deviceScaleFactor(); |
4640 } | 4638 } |
4641 | 4639 |
4642 } // namespace blink | 4640 } // namespace blink |
OLD | NEW |