DOM/Web Forms 2.0: Difference between revisions

Line 154: Line 154:
* Accessibility
* Accessibility


== New input types ==
== HTMLInputElement ==
 
=== Redesign nsHTMLInputElement.cpp? ===
 
<html:input> already has ten different types of input supported.  WF2 adds fourteen more.  The DOM for HTMLInputElement as defined for WF2 includes 41 properties and 10 methods, all of which must be physically exist (even if they are meaningless, as attributes such as pattern would be for checkbox inputs).
 
nsHTMLInputElement.cpp is already the second-largest HTML element file in content/html/content/src (behind nsGenericHTMLElement.cpp).  With the added complexity of WF2, nsHTMLInputElement threatens to become unmanageable.
 
It may be time to consider breaking up the functionality of nsHTMLInputElement into various separate controls and/or files, extending the base class of nsHTMLInputElement.  This would include probably the new input types of WF2 and possibly even the HTML 4 input types.
 
<pre>
&lt;WeirdAl&gt;oh, but bz did raise the point of "what happens when the type attribute changes" :(
* WeirdAl forgot that
&lt;smaug&gt; there could be a simple "typeless" base inputelement
&lt;WeirdAl&gt; that's sort of what I was thinking
&lt;smaug&gt; which owns the current typeobject
&lt;WeirdAl&gt; that's not a bad idea :)
&lt;roc&gt; what's the advantage of that?
&lt;smaug&gt; adding extensions should be easier
&lt;roc&gt; I guess it means that per-type state could be stored more easily
</pre>
=== &lt;html:input type='number'&gt; ===
=== &lt;html:input type='number'&gt; ===
* Implementation: [https://bugzilla.mozilla.org/show_bug.cgi?id=344616 bug 344616]
* Implementation: [https://bugzilla.mozilla.org/show_bug.cgi?id=344616 bug 344616]
Line 164: Line 184:
* Accessibility
* Accessibility


=== &lt;html:input type='uri'&gt; ===
=== &lt;html:input type='url'&gt; ===
* Contributor: Alex Vincent
* Contributor: Alex Vincent
* Implementation: [https://bugzilla.mozilla.org/show_bug.cgi?id=344615 bug 344615]
* Implementation: [https://bugzilla.mozilla.org/show_bug.cgi?id=344615 bug 344615]
Confirmed users
146

edits