[Webkit-unassigned] [Bug 53705] New: Viewport parsing no longer accepts "1.0; " as valid.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 3 12:28:36 PST 2011


           Summary: Viewport parsing no longer accepts "1.0;" as valid.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: joepeck at webkit.org
                CC: kenneth at webkit.org

The new ViewportArguments implementation looks nice and clean, but it has a few changes
which would cause compatibility problems.

The new implementation landed in r67376:

It follows the "css-viewport" spec:

I think it incorrectly follows the parsing algorithm for numeric values:

>     If a prefix of property-value can be converted to a number using strtod,
>     the value will be that number. The remainder of the string is ignored.

In the case where the value is "1.0;" String::toFloat will return 1.0, but will indicate
an error. The old code would have used "1.0", but the new code ignores the fact
that a valid prefix was given, reports an error, and returns 0.0.

This affects sites like Wikipedia, which incorrectly use ";" as separators in their
viewport meta tag (they should use commas). Example of the current Wikipedia
meta tag is:

> <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list