Summary: | FeatureObserver: Input types are counted unexpectedly in a page with Modernizr | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kent Tamura <tkent> | ||||||
Component: | Forms | Assignee: | Kent Tamura <tkent> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | buildbot, haraken, mifenton, ojan.autocc, rniwa, spottabathini, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Kent Tamura
2013-01-28 18:06:10 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(" ")) } Created attachment 185145 [details]
Patch
Comment on attachment 185145 [details]
Patch
Makes sense to me.
Comment on attachment 185145 [details] Patch Attachment 185145 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://queues.webkit.org/results/16183019 Created attachment 185176 [details]
Patch for landing
Include NodeRenderStyle.h
Comment on attachment 185176 [details] Patch for landing Clearing flags on attachment: 185176 Committed r141086: <http://trac.webkit.org/changeset/141086> All reviewed patches have been landed. Closing bug. |