Closed Bug 563669 Opened 10 years ago Closed 9 years ago

Move nsGenericHTMLFormElement::AcceptAutofocus to nsIFormControl

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla5

People

(Reporter: mounir, Assigned: mounir)

References

Details

Attachments

(1 file, 1 obsolete file)

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.
Attached patch Patch v1 (obsolete) — Splinter Review
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...
Attachment #446628 - Flags: review?(Olli.Pettay)
Depends on: 641409
Summary: Make |AcceptAutofocus| non-virtual → Move |AcceptAutofocus| to nsIFormControl
Attached patch Patch v2Splinter Review
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.
Attachment #446628 - Attachment is obsolete: true
Attachment #519066 - Flags: review?(Olli.Pettay)
Whiteboard: [needs review]
Summary: Move |AcceptAutofocus| to nsIFormControl → Move nsGenericHTMLFormElement::AcceptAutofocus to nsIFormControl
Blocks: 640946
Comment on attachment 519066 [details] [diff] [review]
Patch v2

Update IID.
Attachment #519066 - Flags: review?(Olli.Pettay) → review+
Pushed:
http://hg.mozilla.org/mozilla-central/rev/ab37132aaed4
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: in-testsuite-
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.