Deprecate the inputType function on HTMLInputElement
Created attachment 67988 [details] Patch
Comment on attachment 67988 [details] Patch > + dprecatedNumberOfTypes for the same reason. Changed all code to use Typo (dprecatedNumberOfTypes) r=me
Why? The only explanation I could find was deep inside ChangeLog ("since it should not be used outside this class"), but even that seems mysterious.
(In reply to comment #3) > Why? Darin may have more reasons, but personally I like it because it prevents the mistake of checking e.g "inputType() == TEXT" when you actually want isTextField().
Comment on attachment 67988 [details] Patch Right, I was not aware of that ongoing refactoring effort, thanks Kent. I admit to jumping the gun on this review, as I was not aware of all the circumstances, resetting r? so someone else can have a look. (For the record, it still LGTM.)
This is a straightforward patch, and I think Andreas’s review should be sufficient, but as the author I guess I’m biased. So lets wait for someone else to review?
There are multiple reasons for this, and I could put some in the change log. The primary reason is that we want to be free to add more input types without having to revise switch statements outside the class. And we’d like to change the class to be based on an input type object rather than an input type number. There is almost no code that depends on this numeric value and we can get that down to nothing pretty easily. But yes, another reason is that people tend to special-case TEXT when it is not correct to do so. Generally speaking a list of types at a call site often can become wrong later when someone adds a new type.
Comment on attachment 67988 [details] Patch You are right, this is straightforward. Thanks for explaining the reasons.
Committed r67903: <http://trac.webkit.org/changeset/67903>
http://trac.webkit.org/changeset/67904 might have broken GTK Linux 64-bit Debug The following changes are on the blame list: http://trac.webkit.org/changeset/67904 http://trac.webkit.org/changeset/67903
(In reply to comment #10) > http://trac.webkit.org/changeset/67904 might have broken GTK Linux 64-bit Debug > The following changes are on the blame list: > http://trac.webkit.org/changeset/67904 > http://trac.webkit.org/changeset/67903 See bug 46169