| 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 3061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3072 | 3072 |
| 3073 double WebViewImpl::setZoomLevel(double zoomLevel) | 3073 double WebViewImpl::setZoomLevel(double zoomLevel) |
| 3074 { | 3074 { |
| 3075 if (zoomLevel < m_minimumZoomLevel) | 3075 if (zoomLevel < m_minimumZoomLevel) |
| 3076 m_zoomLevel = m_minimumZoomLevel; | 3076 m_zoomLevel = m_minimumZoomLevel; |
| 3077 else if (zoomLevel > m_maximumZoomLevel) | 3077 else if (zoomLevel > m_maximumZoomLevel) |
| 3078 m_zoomLevel = m_maximumZoomLevel; | 3078 m_zoomLevel = m_maximumZoomLevel; |
| 3079 else | 3079 else |
| 3080 m_zoomLevel = zoomLevel; | 3080 m_zoomLevel = zoomLevel; |
| 3081 | 3081 |
| 3082 // TODO(nasko): Setting zoom level needs to be refactored to support |
| 3083 // out-of-process iframes. See https://crbug.com/528407. |
| 3084 if (mainFrame()->isWebRemoteFrame()) |
| 3085 return m_zoomLevel; |
| 3086 |
| 3082 LocalFrame* frame = mainFrameImpl()->frame(); | 3087 LocalFrame* frame = mainFrameImpl()->frame(); |
| 3083 if (!WebLocalFrameImpl::pluginContainerFromFrame(frame)) { | 3088 if (!WebLocalFrameImpl::pluginContainerFromFrame(frame)) { |
| 3084 float zoomFactor = m_zoomFactorOverride ? m_zoomFactorOverride : static_
cast<float>(zoomLevelToZoomFactor(m_zoomLevel)); | 3089 float zoomFactor = m_zoomFactorOverride ? m_zoomFactorOverride : static_
cast<float>(zoomLevelToZoomFactor(m_zoomLevel)); |
| 3085 zoomFactor *= m_zoomFactorForDeviceScaleFactor; | 3090 zoomFactor *= m_zoomFactorForDeviceScaleFactor; |
| 3086 frame->setPageZoomFactor(zoomFactor); | 3091 frame->setPageZoomFactor(zoomFactor); |
| 3087 } | 3092 } |
| 3088 | 3093 |
| 3089 return m_zoomLevel; | 3094 return m_zoomLevel; |
| 3090 } | 3095 } |
| 3091 | 3096 |
| (...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4616 void WebViewImpl::detachPaintArtifactCompositor() | 4621 void WebViewImpl::detachPaintArtifactCompositor() |
| 4617 { | 4622 { |
| 4618 if (!m_layerTreeView) | 4623 if (!m_layerTreeView) |
| 4619 return; | 4624 return; |
| 4620 | 4625 |
| 4621 m_layerTreeView->setDeferCommits(true); | 4626 m_layerTreeView->setDeferCommits(true); |
| 4622 m_layerTreeView->clearRootLayer(); | 4627 m_layerTreeView->clearRootLayer(); |
| 4623 } | 4628 } |
| 4624 | 4629 |
| 4625 } // namespace blink | 4630 } // namespace blink |
| OLD | NEW |