[Webkit-unassigned] [Bug 108141] FeatureObserver: Input types are counted unexpectedly by Modernizr

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 28 19:22:24 PST 2013


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





--- Comment #1 from Kent Tamura <tkent at chromium.org>  2013-01-28 19:24:22 PST ---
Modernizr's code follows.  It appends input elements to document.body, and attaches renderers.  Probably we should count "attached && visibility!=hidden"?

    function A() {
        e.inputtypes = function(a) {
            for (var d = 0, e, f, h, i = a.length; d < i; d++)
                k.setAttribute("type", f = a[d]),
                e = k.type !== "text",
                e && (k.value = l,
                      k.style.cssText = "position:absolute;visibility:hidden;",
                      /^range$/.test(f) && k.style.WebkitAppearance !== c ? (g.appendChild(k), h = b.defaultView, e = h.getComputedStyle && h.getComputedStyle(k, null).WebkitAppearance !== "textfield" && k.offsetHeight !== 0, g.removeChild(k)) : /^(search|tel)$/.test(f) || (/^(url|email)$/.test(f) ? e = k.checkValidity && k.checkValidity() === !1 : e = k.value != l)),
                o[a[d]] = !!e;
            return o
        }("search tel url email datetime date month week time datetime-local number range color".split(" "))
    }

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