Chromium Code Reviews| Index: Source/core/page/PageScaleConstraintsSet.cpp |
| diff --git a/Source/core/page/PageScaleConstraintsSet.cpp b/Source/core/page/PageScaleConstraintsSet.cpp |
| index a5df3e1550f4d867b59bc540180127f51e668d75..a2159b4fa3f6d7aa1bd7649944882f787b6d37d8 100644 |
| --- a/Source/core/page/PageScaleConstraintsSet.cpp |
| +++ b/Source/core/page/PageScaleConstraintsSet.cpp |
| @@ -111,7 +111,9 @@ static float computeDeprecatedTargetDensityDPIFactor(const ViewportArguments& ar |
| targetDPI = 240.0f; |
| else if (arguments.deprecatedTargetDensityDPI != ViewportArguments::ValueAuto) |
| targetDPI = arguments.deprecatedTargetDensityDPI; |
| - return targetDPI > 0 ? (deviceScaleFactor * 120.0f) / targetDPI : 1.0f; |
| + // Since the return value is multiplied by deviceScaleFactor and deviceScaleFactor is displayDPI / 160.0 the below expands to: |
|
aelias_OOO_until_Jul13
2013/08/08 18:34:37
I suggest deleting this comment, I find it more di
mkosiba (inactive)
2013/08/09 09:35:25
Done.
|
| + // (160.0f / targetDPI) * (displayDPI / 160.0f) which is the same as displayDPI / targetDPI, which is what we want to determine. |
| + return targetDPI > 0 ? 160.0f / targetDPI : 1.0f; |
| } |
| static float getLayoutWidthForNonWideViewport(const FloatSize& deviceSize, float initialScale) |