Currently we are clamping values like width and height following the rules for META tags (1px - 10000px) which are not valid for @viewport. http://dev.w3.org/csswg/css-device-adapt/#translation-into-atviewport-descriptors
Created attachment 175784 [details] Patch
Comment on attachment 175784 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=175784&action=review > Source/WebCore/dom/ViewportArguments.cpp:186 > + } else { > + // Clamp values to a valid range, but not for @viewport since is > + // not mandated by the specification. > + resultWidth = clampLengthValue(resultWidth); > + resultHeight = clampLengthValue(resultHeight); > + resultZoom = clampScaleValue(resultZoom); > + resultMinZoom = clampScaleValue(resultMinZoom); > + resultMaxZoom = clampScaleValue(resultMaxZoom); > } I think an if would be nicer, we probably dont want to clam implicit viewport either if (type != ViewportArguments::CSSDeviceAdaptation && type != ViewportArguments::Implicit) or maybe the other way around. Make it explicit what we are clamping. > Source/WebCore/dom/ViewportArguments.cpp:240 > + } else { > + // Extend width and height to fill the visual viewport for the resolved initial-scale. > + resultWidth = max<float>(resultWidth, initialViewportSize.width() / result.initialScale); > + resultHeight = max<float>(resultHeight, initialViewportSize.height() / result.initialScale); > + } I think this should probably only happen for viewport meta, not the old legacy meta tags which dont support scale anyway
Created attachment 176001 [details] Patch
Comment on attachment 176001 [details] Patch Clearing flags on attachment: 176001 Committed r135728: <http://trac.webkit.org/changeset/135728>
All reviewed patches have been landed. Closing bug.