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 3281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3292 newPageScaleFactor = m_pageScaleConstraintsSet.finalConstraints().initia
lScale; | 3292 newPageScaleFactor = m_pageScaleConstraintsSet.finalConstraints().initia
lScale; |
3293 m_pageScaleConstraintsSet.setNeedsReset(false); | 3293 m_pageScaleConstraintsSet.setNeedsReset(false); |
3294 } | 3294 } |
3295 setPageScaleFactor(newPageScaleFactor); | 3295 setPageScaleFactor(newPageScaleFactor); |
3296 | 3296 |
3297 updateLayerTreeViewport(); | 3297 updateLayerTreeViewport(); |
3298 } | 3298 } |
3299 | 3299 |
3300 void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription
& description) | 3300 void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription
& description) |
3301 { | 3301 { |
| 3302 // If we're not reading the viewport meta tag, allow GPU rasterization. |
| 3303 if (!settingsImpl()->viewportMetaEnabled()) { |
| 3304 m_matchesHeuristicsForGpuRasterization = true; |
| 3305 if (m_layerTreeView) |
| 3306 m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuri
sticsForGpuRasterization); |
| 3307 } |
| 3308 |
3302 if (!settings()->viewportEnabled() || !page() || (!m_size.width && !m_size.h
eight) || !page()->mainFrame()->isLocalFrame()) | 3309 if (!settings()->viewportEnabled() || !page() || (!m_size.width && !m_size.h
eight) || !page()->mainFrame()->isLocalFrame()) |
3303 return; | 3310 return; |
3304 | 3311 |
3305 Document* document = page()->deprecatedLocalMainFrame()->document(); | 3312 Document* document = page()->deprecatedLocalMainFrame()->document(); |
3306 | 3313 |
3307 m_matchesHeuristicsForGpuRasterization = description.matchesHeuristicsForGpu
Rasterization(); | 3314 m_matchesHeuristicsForGpuRasterization = description.matchesHeuristicsForGpu
Rasterization(); |
3308 if (m_layerTreeView) | 3315 if (m_layerTreeView) |
3309 m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristic
sForGpuRasterization); | 3316 m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristic
sForGpuRasterization); |
3310 | 3317 |
3311 Length defaultMinWidth = document->viewportDefaultMinWidth(); | 3318 Length defaultMinWidth = document->viewportDefaultMinWidth(); |
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4466 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4473 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4467 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4474 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4468 } | 4475 } |
4469 | 4476 |
4470 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4477 void WebViewImpl::forceNextWebGLContextCreationToFail() |
4471 { | 4478 { |
4472 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4479 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
4473 } | 4480 } |
4474 | 4481 |
4475 } // namespace blink | 4482 } // namespace blink |
OLD | NEW |