Chromium Code Reviews| Index: Source/web/PageScaleConstraintsSet.cpp |
| diff --git a/Source/web/PageScaleConstraintsSet.cpp b/Source/web/PageScaleConstraintsSet.cpp |
| index b361be9ce18b7a5e6c70349c10fb53d7b7f8dae8..adb0ad41a26c51e62c1c471545da7e3553ee739b 100644 |
| --- a/Source/web/PageScaleConstraintsSet.cpp |
| +++ b/Source/web/PageScaleConstraintsSet.cpp |
| @@ -182,4 +182,13 @@ void PageScaleConstraintsSet::adjustForAndroidWebViewQuirks(const ViewportDescri |
| } |
| } |
| +void PageScaleConstraintsSet::applyDeviceScaleAdjustment(const ViewportDescription& viewportDescription, float deviceScaleAdjustment, float minimumWidth) |
| +{ |
| + // If possible, reduce the layout width instead of applying text autosizing. |
| + // But don't reduce below the minimum fallback width and don't reduce if explicitly specified by the page author. |
| + float width = m_pageDefinedConstraints.layoutSize.width(); |
| + if (width > minimumWidth && !viewportDescription.isSpecifiedByAuthor() && deviceScaleAdjustment > 1.0f) |
|
aelias_OOO_until_Jul13
2013/11/07 02:05:25
Can we delete the condition "deviceScaleAdjustment
skobes
2013/11/07 17:55:27
Done.
|
| + m_pageDefinedConstraints.layoutSize.setWidth(std::max(minimumWidth, width / deviceScaleAdjustment)); |
| +} |
| + |
| } // namespace WebCore |