Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/ViewportDescription.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/ViewportDescription.cpp b/third_party/WebKit/Source/core/dom/ViewportDescription.cpp |
| index 0deda17a3f8a508f73704deaf15a6edef9d5c089..9b2bb1be5f3cb1ff2d48bc2548b35188e297e01d 100644 |
| --- a/third_party/WebKit/Source/core/dom/ViewportDescription.cpp |
| +++ b/third_party/WebKit/Source/core/dom/ViewportDescription.cpp |
| @@ -201,7 +201,7 @@ PageScaleConstraints ViewportDescription::resolve( |
| initialViewportSize.width(); |
| } |
| - // Resolve initial-scale value. |
| + // 9. Resolve initial-scale value. |
|
rune
2016/10/31 14:45:03
The numbering used to correspond with the numberin
bokan
2016/10/31 14:47:55
In that case, since the numbers no longer correspo
|
| if (resultZoom == ViewportDescription::ValueAuto) { |
| if (resultWidth != ViewportDescription::ValueAuto && resultWidth > 0) |
| resultZoom = initialViewportSize.width() / resultWidth; |
| @@ -212,6 +212,12 @@ PageScaleConstraints ViewportDescription::resolve( |
| } |
| } |
| + // 10. Reconstrain zoom value to the [min-zoom, max-zoom] range. It will reset |
| + // below, if it is ValueAuto. |
| + resultZoom = compareIgnoringAuto( |
| + resultMinZoom, compareIgnoringAuto(resultMaxZoom, resultZoom, std::min), |
| + std::max); |
|
rune
2016/10/31 14:45:03
This can be moved inside the block above, right?
|
| + |
| // If user-scalable = no, lock the min/max scale to the computed initial |
| // scale. |
| if (!resultUserZoom) |