| 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 3240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3251 view->layout(); | 3251 view->layout(); |
| 3252 } | 3252 } |
| 3253 | 3253 |
| 3254 void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription
& description) | 3254 void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription
& description) |
| 3255 { | 3255 { |
| 3256 if (!settings()->viewportEnabled() || !page() || (!m_size.width && !m_size.h
eight) || !page()->mainFrame()->isLocalFrame()) | 3256 if (!settings()->viewportEnabled() || !page() || (!m_size.width && !m_size.h
eight) || !page()->mainFrame()->isLocalFrame()) |
| 3257 return; | 3257 return; |
| 3258 | 3258 |
| 3259 Document* document = page()->deprecatedLocalMainFrame()->document(); | 3259 Document* document = page()->deprecatedLocalMainFrame()->document(); |
| 3260 | 3260 |
| 3261 m_matchesHeuristicsForGpuRasterization = description.maxWidth == Length(Devi
ceWidth) | 3261 m_matchesHeuristicsForGpuRasterization = description.maxWidth == Length(Devi
ceWidth); |
| 3262 && description.minZoom == 1.0 | |
| 3263 && description.minZoomIsExplicit; | |
| 3264 if (m_layerTreeView) | 3262 if (m_layerTreeView) |
| 3265 m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristic
sForGpuRasterization); | 3263 m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristic
sForGpuRasterization); |
| 3266 | 3264 |
| 3267 Length defaultMinWidth = document->viewportDefaultMinWidth(); | 3265 Length defaultMinWidth = document->viewportDefaultMinWidth(); |
| 3268 if (defaultMinWidth.isAuto()) | 3266 if (defaultMinWidth.isAuto()) |
| 3269 defaultMinWidth = Length(ExtendToZoom); | 3267 defaultMinWidth = Length(ExtendToZoom); |
| 3270 | 3268 |
| 3271 ViewportDescription adjustedDescription = description; | 3269 ViewportDescription adjustedDescription = description; |
| 3272 if (settingsImpl()->viewportMetaLayoutSizeQuirk() && adjustedDescription.typ
e == ViewportDescription::ViewportMeta) { | 3270 if (settingsImpl()->viewportMetaLayoutSizeQuirk() && adjustedDescription.typ
e == ViewportDescription::ViewportMeta) { |
| 3273 const int legacyWidthSnappingMagicNumber = 320; | 3271 const int legacyWidthSnappingMagicNumber = 320; |
| (...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4478 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4476 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4479 | 4477 |
| 4480 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4478 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4481 return false; | 4479 return false; |
| 4482 | 4480 |
| 4483 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4481 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4484 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4482 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4485 } | 4483 } |
| 4486 | 4484 |
| 4487 } // namespace blink | 4485 } // namespace blink |
| OLD | NEW |