| 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 2951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2962 return; | 2962 return; |
| 2963 | 2963 |
| 2964 ViewportDescription adjustedDescription = description; | 2964 ViewportDescription adjustedDescription = description; |
| 2965 if (settingsImpl()->viewportMetaLayoutSizeQuirk() && adjustedDescription.typ
e == ViewportDescription::ViewportMeta) { | 2965 if (settingsImpl()->viewportMetaLayoutSizeQuirk() && adjustedDescription.typ
e == ViewportDescription::ViewportMeta) { |
| 2966 if (adjustedDescription.maxWidth.type() == ExtendToZoom) | 2966 if (adjustedDescription.maxWidth.type() == ExtendToZoom) |
| 2967 adjustedDescription.maxWidth = Length(); // auto | 2967 adjustedDescription.maxWidth = Length(); // auto |
| 2968 adjustedDescription.minWidth = adjustedDescription.maxWidth; | 2968 adjustedDescription.minWidth = adjustedDescription.maxWidth; |
| 2969 adjustedDescription.minHeight = adjustedDescription.maxHeight; | 2969 adjustedDescription.minHeight = adjustedDescription.maxHeight; |
| 2970 } | 2970 } |
| 2971 m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedDescription,
m_size); | 2971 m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedDescription,
m_size); |
| 2972 m_pageScaleConstraintsSet.adjustForAndroidWebViewQuirks(adjustedDescription,
m_size, page()->settings().layoutFallbackWidth(), deviceScaleFactor(), settings
Impl()->supportDeprecatedTargetDensityDPI(), page()->settings().wideViewportQuir
kEnabled(), page()->settings().useWideViewport(), page()->settings().loadWithOve
rviewMode()); | 2972 m_pageScaleConstraintsSet.adjustForAndroidWebViewQuirks(adjustedDescription,
m_size, page()->settings().layoutFallbackWidth(), deviceScaleFactor(), settings
Impl()->supportDeprecatedTargetDensityDPI(), page()->settings().wideViewportQuir
kEnabled(), page()->settings().useWideViewport(), page()->settings().loadWithOve
rviewMode(), settingsImpl()->viewportMetaNonUserScalableQuirk()); |
| 2973 | 2973 |
| 2974 updateMainFrameLayoutSize(); | 2974 updateMainFrameLayoutSize(); |
| 2975 } | 2975 } |
| 2976 | 2976 |
| 2977 void WebViewImpl::updateMainFrameLayoutSize() | 2977 void WebViewImpl::updateMainFrameLayoutSize() |
| 2978 { | 2978 { |
| 2979 if (m_fixedLayoutSizeLock || !mainFrameImpl()) | 2979 if (m_fixedLayoutSizeLock || !mainFrameImpl()) |
| 2980 return; | 2980 return; |
| 2981 | 2981 |
| 2982 FrameView* view = mainFrameImpl()->frameView(); | 2982 FrameView* view = mainFrameImpl()->frameView(); |
| (...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4125 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4125 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4126 | 4126 |
| 4127 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4127 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4128 return false; | 4128 return false; |
| 4129 | 4129 |
| 4130 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4130 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4131 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4131 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4132 } | 4132 } |
| 4133 | 4133 |
| 4134 } // namespace WebKit | 4134 } // namespace WebKit |
| OLD | NEW |