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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 3 13:06:53 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=53705





--- Comment #3 from Joseph Pecoraro <joepeck at webkit.org>  2011-02-03 13:06:54 PST ---
My suggestion would be to change:

    bool ok;
    float value = valueString.toFloat(&ok);
    if (!ok) {
        reportViewportWarning(document, UnrecognizedViewportArgumentError, keyString);
        return float(0.0);
    }


To something like:

    bool ok;
    float value = valueString.toFloat(&ok);
    if (!ok) {

        // Completely non-numeric. Warn and return.
        if (!isNumeric(valueString[0]) || (valueString[0] == '-' && !isNumeric(valueString[1])) {
            reportViewportWarning => unrecognized value
            return float(0.0);
        }

        // Warn about a semi-numeric value.
        reportViewportWarning => truncated value
    }

Would you agree with those changes?

-- 
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