RESOLVED FIXED 108141
FeatureObserver: Input types are counted unexpectedly in a page with Modernizr
https://bugs.webkit.org/show_bug.cgi?id=108141
Summary FeatureObserver: Input types are counted unexpectedly in a page with Modernizr
Kent Tamura
Reported 2013-01-28 18:06:10 PST
http://modernizr.com/docs/#inputtypes If the Input Types feature of Modernizr is loaded, FeatureObserver detects that all of the types are used. It's not information which we want.
Attachments
Patch (28.26 KB, patch)
2013-01-28 21:09 PST, Kent Tamura
no flags
Patch for landing (28.46 KB, patch)
2013-01-28 23:48 PST, Kent Tamura
no flags
Kent Tamura
Comment 1 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(" ")) }
Kent Tamura
Comment 2 2013-01-28 21:09:03 PST
Kentaro Hara
Comment 3 2013-01-28 21:22:51 PST
Comment on attachment 185145 [details] Patch Makes sense to me.
Build Bot
Comment 4 2013-01-28 23:20:18 PST
Comment on attachment 185145 [details] Patch Attachment 185145 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://queues.webkit.org/results/16183019
Kent Tamura
Comment 5 2013-01-28 23:48:57 PST
Created attachment 185176 [details] Patch for landing Include NodeRenderStyle.h
WebKit Review Bot
Comment 6 2013-01-29 02:02:56 PST
Comment on attachment 185176 [details] Patch for landing Clearing flags on attachment: 185176 Committed r141086: <http://trac.webkit.org/changeset/141086>
WebKit Review Bot
Comment 7 2013-01-29 02:03:01 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.