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 3239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3250 setPageScaleFactor(newPageScaleFactor); | 3250 setPageScaleFactor(newPageScaleFactor); |
3251 | 3251 |
3252 updateLayerTreeViewport(); | 3252 updateLayerTreeViewport(); |
3253 | 3253 |
3254 // Relayout immediately to avoid violating the rule that needsLayout() | 3254 // Relayout immediately to avoid violating the rule that needsLayout() |
3255 // isn't set at the end of a layout. | 3255 // isn't set at the end of a layout. |
3256 if (view->needsLayout()) | 3256 if (view->needsLayout()) |
3257 view->layout(); | 3257 view->layout(); |
3258 } | 3258 } |
3259 | 3259 |
3260 void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription & description) | 3260 void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription & description) |
ajuma
2014/12/17 19:38:38
Does this always get called on pages that don't ha
hendrikw
2014/12/17 20:20:01
AFAICT, yes. the callers WebViewImpl::performResi
ajuma
2014/12/17 20:36:16
Ok. Note that when we do have a viewport, this get
| |
3261 { | 3261 { |
3262 if (!settings()->viewportEnabled() || !page() || (!m_size.width && !m_size.h eight) || !page()->mainFrame()->isLocalFrame()) | 3262 if (!settings()->viewportEnabled() || !page() || (!m_size.width && !m_size.h eight) || !page()->mainFrame()->isLocalFrame()) { |
3263 // If we're not reading the viewport meta tag, allow GPU rasterization. | |
3264 if (!settings()->viewportMetaEnabled()) { | |
ajuma
2014/12/17 19:38:38
Use settingsImpl instead of settings, and then you
hendrikw
2014/12/17 20:20:01
Awesome, wasn't aware of that!
| |
3265 m_matchesHeuristicsForGpuRasterization = true; | |
3266 if (m_layerTreeView) | |
3267 m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesH euristicsForGpuRasterization); | |
3268 } | |
3263 return; | 3269 return; |
3264 | 3270 } |
3265 Document* document = page()->deprecatedLocalMainFrame()->document(); | 3271 Document* document = page()->deprecatedLocalMainFrame()->document(); |
3266 | 3272 |
3267 m_matchesHeuristicsForGpuRasterization = description.maxWidth == Length(Devi ceWidth); | 3273 m_matchesHeuristicsForGpuRasterization = description.maxWidth == Length(Devi ceWidth); |
3268 if (m_layerTreeView) | 3274 if (m_layerTreeView) |
3269 m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristic sForGpuRasterization); | 3275 m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristic sForGpuRasterization); |
3270 | 3276 |
3271 Length defaultMinWidth = document->viewportDefaultMinWidth(); | 3277 Length defaultMinWidth = document->viewportDefaultMinWidth(); |
3272 if (defaultMinWidth.isAuto()) | 3278 if (defaultMinWidth.isAuto()) |
3273 defaultMinWidth = Length(ExtendToZoom); | 3279 defaultMinWidth = Length(ExtendToZoom); |
3274 | 3280 |
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4520 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4526 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4521 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); | 4527 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); |
4522 } | 4528 } |
4523 | 4529 |
4524 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4530 void WebViewImpl::forceNextWebGLContextCreationToFail() |
4525 { | 4531 { |
4526 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4532 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
4527 } | 4533 } |
4528 | 4534 |
4529 } // namespace blink | 4535 } // namespace blink |
OLD | NEW |