Closed Bug 803011 Opened 12 years ago Closed 12 years ago

Unnecessary nsTextEditorState instance is created?

Categories

(Core :: Layout: Form Controls, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: masayuki, Unassigned)

References

Details

The construct of nsHTMLInputElement makes an instance of nsTextEditorState() always. http://mxr.mozilla.org/mozilla-central/source/content/html/content/src/nsHTMLInputElement.cpp#559 Looks like this is made for checkbox or radio buttons. Shouldn't we check IsSingleLineTextControl(false)?
When creating an HTMLInputElement, it's always of type 'text'. If it is created from the parser, the parser will then change the type if needed. If it is created from script, the caller will be able to use .type = '';. In both cases, HandleTypeChange() will do what should be done.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Oh, thanks. But I think that we should add comment about that there.
You need to log in before you can comment on or make changes to this bug.