[webkit-dev] the why of viewport tag

Kenneth Rohde Christiansen kenneth.christiansen at gmail.com
Mon May 7 07:17:18 PDT 2012

Hi there,

I am pretty sure this is a result of history. Desktop browsers never
had support for the viewport meta tag, which was added initially on
iOS for the sake of giving mobile developers more control on how
contents should be laid out, possible due to vastly different viewport
size, web apps etc. The use case for something like this hasn't really
been big on the desktop, though it could still be useful. As a matter
of fact the Qt port supports this out of the box and we even have a
setting to set the default layout viewport when no viewport meta tag
is present:

Here is our documentation:

    \qmlproperty int WebViewExperimental::preferredMinimumContentsWidth
    \brief Minimum contents width when not overriden by the page itself.

    Unless the page defines how contents should be laid out, using e.g.
    the viewport meta tag, it is laid out given the width of the viewport
    (in CSS units).

    This setting can be used to enforce a minimum width when the page
    does not define a width itself. This is useful for laying out pages
    designed for big screens, commonly knows as desktop pages, on small

    The default value is 0, but the value of 980 is recommented for small
    screens as it provides a good trade off between legitable pages and
    non-broken content.

With the default value of 0, desktop pages will lay out as always
(given the current viewport).


On Mon, May 7, 2012 at 4:07 PM, Robert Kroeger <rjkroege at chromium.org> wrote:
> Hi all,
> Some of the Chromium developers had a discussion recently about whether or
> not it was desirable for Chromium to always support the viewport tag even on
> the desktop. This prompted us to observe that desktop Safari does not
> support the viewport tag while mobile Safari does. Is anybody willing to
> comment on why this choice was made?
> Rob.
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Kenneth Rohde Christiansen
Senior Engineer
Nokia Mobile Phones, Browser / WebKit team
Phone  +45 4093 0598 / E-mail kenneth at webkit.org

http://codeposts.blogspot.com ﹆﹆﹆

More information about the webkit-dev mailing list