| 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 2997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3008 if (view->needsLayout()) | 3008 if (view->needsLayout()) |
| 3009 view->layout(); | 3009 view->layout(); |
| 3010 } | 3010 } |
| 3011 | 3011 |
| 3012 void WebViewImpl::updatePageDefinedPageScaleConstraints(const ViewportArguments&
arguments) | 3012 void WebViewImpl::updatePageDefinedPageScaleConstraints(const ViewportArguments&
arguments) |
| 3013 { | 3013 { |
| 3014 if (!settings()->viewportEnabled() || !isFixedLayoutModeEnabled() || !page()
|| !m_size.width || !m_size.height) | 3014 if (!settings()->viewportEnabled() || !isFixedLayoutModeEnabled() || !page()
|| !m_size.width || !m_size.height) |
| 3015 return; | 3015 return; |
| 3016 | 3016 |
| 3017 ViewportArguments adjustedArguments = arguments; | 3017 ViewportArguments adjustedArguments = arguments; |
| 3018 if (settingsImpl()->viewportMetaLayoutSizeQuirk() && adjustedArguments.type
== ViewportArguments::ViewportMeta) | 3018 if (settingsImpl()->viewportMetaLayoutSizeAndZeroValuesQuirk() && adjustedAr
guments.type == ViewportArguments::ViewportMeta) |
| 3019 adjustedArguments.type = ViewportArguments::ViewportMetaLayoutSizeQuirk; | 3019 adjustedArguments.type = ViewportArguments::ViewportMetaLayoutSizeAndZer
oValuesQuirk; |
| 3020 m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedArguments, m_
size, page()->settings().layoutFallbackWidth()); | 3020 m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedArguments, m_
size, page()->settings().layoutFallbackWidth()); |
| 3021 | 3021 |
| 3022 if (settingsImpl()->supportDeprecatedTargetDensityDPI()) | 3022 if (settingsImpl()->supportDeprecatedTargetDensityDPI()) |
| 3023 m_pageScaleConstraintsSet.adjustPageDefinedConstraintsForAndroidWebView(
adjustedArguments, m_size, page()->settings().layoutFallbackWidth(), deviceScale
Factor(), page()->settings().useWideViewport(), page()->settings().loadWithOverv
iewMode()); | 3023 m_pageScaleConstraintsSet.adjustPageDefinedConstraintsForAndroidWebView(
adjustedArguments, m_size, page()->settings().layoutFallbackWidth(), deviceScale
Factor(), page()->settings().useWideViewport(), page()->settings().loadWithOverv
iewMode()); |
| 3024 | 3024 |
| 3025 WebSize layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedCon
straints().layoutSize); | 3025 WebSize layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedCon
straints().layoutSize); |
| 3026 | 3026 |
| 3027 if (page()->settings().textAutosizingEnabled() && page()->mainFrame() && lay
outSize.width != fixedLayoutSize().width) | 3027 if (page()->settings().textAutosizingEnabled() && page()->mainFrame() && lay
outSize.width != fixedLayoutSize().width) |
| 3028 page()->mainFrame()->document()->textAutosizer()->recalculateMultipliers
(); | 3028 page()->mainFrame()->document()->textAutosizer()->recalculateMultipliers
(); |
| 3029 | 3029 |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4127 } | 4127 } |
| 4128 | 4128 |
| 4129 bool WebViewImpl::shouldDisableDesktopWorkarounds() | 4129 bool WebViewImpl::shouldDisableDesktopWorkarounds() |
| 4130 { | 4130 { |
| 4131 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport
Arguments(); | 4131 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport
Arguments(); |
| 4132 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.
userZoom | 4132 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.
userZoom |
| 4133 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp
ortArguments::ValueAuto); | 4133 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp
ortArguments::ValueAuto); |
| 4134 } | 4134 } |
| 4135 | 4135 |
| 4136 } // namespace WebKit | 4136 } // namespace WebKit |
| OLD | NEW |