At the moment, autofocus is virtual because we can't have a generic |AcceptAutofocus| (or any name) in nsGenericHTMLFormElement because we can't know if the element is an input/button element. With bug 563668, we could know that so removing this virtual function.
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #446628 - Flags: review?(bzbarsky)
Attachment #446628 - Flags: review?(bzbarsky) → review?(Olli.Pettay)
Hmm, I wonder if the patch makes the situation any better. IIRC I complained about the virtual method because of performance, and the new patch uses a virtual method too.
(In reply to comment #2) > Hmm, I wonder if the patch makes the situation any better. > IIRC I complained about the virtual method because of performance, > and the new patch uses a virtual method too. Indeed. If you think the patch isn't needed, feel free to cancel the review. We could also consider having |AcceptAutofocus| in |nsGenericHTMLFormElement| is better than having it redefined when it should return PR_TRUE. I've no string opinion about it this...
Depends on: 641409
Summary: Make |AcceptAutofocus| non-virtual → Move |AcceptAutofocus| to nsIFormControl
I know it doesn't solve the virtual and perf issue you were pointing but I don't see how to solve it and I think this is at least trying to make things consistent with what bug 641409 is doing.
Summary: Move |AcceptAutofocus| to nsIFormControl → Move nsGenericHTMLFormElement::AcceptAutofocus to nsIFormControl
Comment on attachment 519066 [details] [diff] [review] Patch v2 Update IID.
Attachment #519066 - Flags: review?(Olli.Pettay) → review+
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Whiteboard: [needs review]
Target Milestone: --- → mozilla2.2
You need to log in before you can comment on or make changes to this bug.