| Index: Source/core/dom/ViewportArguments.cpp
|
| diff --git a/Source/core/dom/ViewportArguments.cpp b/Source/core/dom/ViewportArguments.cpp
|
| index 0a2708dd1f07b1b02f760d61f5acb4d501683393..d32836aaa10cd6f8adc73dd426b9d0f7400236f3 100644
|
| --- a/Source/core/dom/ViewportArguments.cpp
|
| +++ b/Source/core/dom/ViewportArguments.cpp
|
| @@ -29,6 +29,8 @@
|
| #include "core/dom/ViewportArguments.h"
|
|
|
| #include "core/dom/Document.h"
|
| +#include "core/page/Page.h"
|
| +#include "core/page/Settings.h"
|
| #include "wtf/text/WTFString.h"
|
|
|
| using namespace std;
|
| @@ -297,6 +299,13 @@ static float findSizeValue(const String& keyString, const String& valueString, D
|
| if (value < 0)
|
| return ViewportArguments::ValueAuto;
|
|
|
| + if (!static_cast<int>(value) && document->page() && document->page()->settings().viewportMetaZeroValuesQuirk()) {
|
| + if (keyString == "width")
|
| + return ViewportArguments::ValueDeviceWidth;
|
| + if (keyString == "height")
|
| + return ViewportArguments::ValueDeviceHeight;
|
| + }
|
| +
|
| return value;
|
| }
|
|
|
| @@ -325,6 +334,9 @@ static float findScaleValue(const String& keyString, const String& valueString,
|
| if (value > 10.0)
|
| reportViewportWarning(document, MaximumScaleTooLargeError, String(), String());
|
|
|
| + if (!static_cast<int>(value) && document->page() && document->page()->settings().viewportMetaZeroValuesQuirk() && (keyString == "minimum-scale" || keyString == "maximum-scale"))
|
| + return ViewportArguments::ValueAuto;
|
| +
|
| return value;
|
| }
|
|
|
|
|