| Index: Source/web/PageScaleConstraintsSet.cpp
|
| diff --git a/Source/web/PageScaleConstraintsSet.cpp b/Source/web/PageScaleConstraintsSet.cpp
|
| index 15f6e824d27c58167a67bcd1e952c71d0b2dc37d..ad8ae66014eb68561c987b2534798adbb7650968 100644
|
| --- a/Source/web/PageScaleConstraintsSet.cpp
|
| +++ b/Source/web/PageScaleConstraintsSet.cpp
|
| @@ -129,9 +129,9 @@ static float getLayoutWidthForNonWideViewport(const FloatSize& deviceSize, float
|
| return initialScale == -1 ? deviceSize.width() : deviceSize.width() / initialScale;
|
| }
|
|
|
| -void PageScaleConstraintsSet::adjustForAndroidWebViewQuirks(const ViewportDescription& description, IntSize viewSize, int layoutFallbackWidth, float deviceScaleFactor, bool supportTargetDensityDPI, bool wideViewportQuirkEnabled, bool useWideViewport, bool loadWithOverviewMode)
|
| +void PageScaleConstraintsSet::adjustForAndroidWebViewQuirks(const ViewportDescription& description, IntSize viewSize, int layoutFallbackWidth, float deviceScaleFactor, bool supportTargetDensityDPI, bool wideViewportQuirkEnabled, bool useWideViewport, bool loadWithOverviewMode, bool clobberUserAgentInitialScaleQuirk)
|
| {
|
| - if (!supportTargetDensityDPI && !wideViewportQuirkEnabled && loadWithOverviewMode)
|
| + if (!supportTargetDensityDPI && !wideViewportQuirkEnabled && loadWithOverviewMode && !clobberUserAgentInitialScaleQuirk)
|
| return;
|
|
|
| const float oldInitialScale = m_pageDefinedConstraints.initialScale;
|
| @@ -160,6 +160,11 @@ void PageScaleConstraintsSet::adjustForAndroidWebViewQuirks(const ViewportDescri
|
| adjustedLayoutSizeWidth /= targetDensityDPIFactor;
|
| }
|
|
|
| + if (clobberUserAgentInitialScaleQuirk && m_userAgentConstraints.initialScale * deviceScaleFactor <= 1.0f) {
|
| + if (!description.maxWidth.isFixed() || (description.maxWidth.isAuto() && oldInitialScale == 1.0f))
|
| + m_userAgentConstraints.initialScale = -1;
|
| + }
|
| +
|
| if (wideViewportQuirkEnabled) {
|
| if (useWideViewport && (description.maxWidth.isAuto() || description.maxWidth.type() == ExtendToZoom) && description.zoom != 1.0f) {
|
| adjustedLayoutSizeWidth = layoutFallbackWidth;
|
|
|