Closed Bug 1351860 Opened 2 years ago Closed 2 years ago

Move mType from HTMLInputElement to nsIFormControl and make GetType non-virtual inlined

Categories

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

50 Branch
enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: smaug, Assigned: smaug)

References

Details

Attachments

(2 files, 1 obsolete file)

.
Attached patch patchSplinter Review
Attachment #8852905 - Flags: review?(jjong)
Jessica, perhaps you could review this. I changed the method name too, so that it is clear that it isn't the same as GetType(nsAString&) in HTMLInputElement, and one doesn't need to do static_casts or anything like that.
Comment on attachment 8852905 [details] [diff] [review]
patch

Review of attachment 8852905 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me, thanks.

::: dom/html/nsGenericHTMLElement.h
@@ +1208,5 @@
>                                   public nsIFormControl
>  {
>  public:
> +  explicit nsGenericHTMLFormElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
> +                                    uint8_t aType);

Is the explicit keyword still needed?

@@ +1369,5 @@
>  class nsGenericHTMLFormElementWithState : public nsGenericHTMLFormElement
>  {
>  public:
> +  explicit nsGenericHTMLFormElementWithState(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
> +                                             uint8_t aType);

Ditto.
Attachment #8852905 - Flags: review?(jjong) → review+
probably not
Attached patch without explicit (obsolete) — Splinter Review
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a220553b86db
Move mType from HTMLInputElement to nsIFormControl and make GetType non-virtual inlined, r=jessica
oops, this is breaking something. I must have missed some case.
Backing out.
Keywords: leave-open
silly me, I had left mType member variable to HTMLButtonElement.h
Attachment #8853454 - Attachment is obsolete: true
Keywords: leave-open
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a6626b90f643
Move mType from HTMLInputElement to nsIFormControl and make GetType non-virtual inlined, r=jessica
https://hg.mozilla.org/mozilla-central/rev/a6626b90f643
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.