Closed Bug 1412437 Opened 2 years ago Closed 2 years ago

Remove nsIDOMHTMLTextAreaElement

Categories

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

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: qdot, Assigned: qdot)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Continuing post-addon-deprecation XPCOM interface cleanup
Attachment #8923992 - Flags: review?(bzbarsky)
Comment on attachment 8923992 [details]
Bug 1412437 - Remove nsIDOMHTMLTextAreaElement

https://reviewboard.mozilla.org/r/195178/#review200246

r=me.  Thank you for doing this!

::: dom/html/HTMLTextAreaElement.h:305
(Diff revision 1)
>  
>    // Override SetCustomValidity so we update our state properly when it's called
>    // via bindings.
>    void SetCustomValidity(const nsAString& aError);
>  
>    // XPCOM Select is fine

Hmm.  But we're losing exceptions select() throws, right?  Do we have callers that do something useful with non-NS_OK return values here?

More to the point does Select() ever return non-NS_OK?  If not, followup to make it return void?

::: layout/forms/nsTextControlFrame.cpp:1167
(Diff revision 1)
>  
>  
>  nsresult
>  nsTextControlFrame::GetText(nsString& aText)
>  {
>    nsresult rv = NS_OK;

rv is now always NS_OK.  Followup bug to make this function return void, maybe?

::: layout/generic/nsGfxScrollFrame.cpp:4506
(Diff revision 1)
>    // The anonymous <div> used by <inputs> never gets scrollbars.
>    nsITextControlFrame* textFrame = do_QueryFrame(parent);
>    if (textFrame) {
>      // Make sure we are not a text area.
> -    nsCOMPtr<nsIDOMHTMLTextAreaElement> textAreaElement(do_QueryInterface(parent->GetContent()));
> +    HTMLTextAreaElement* textAreaElement =
> +      HTMLTextAreaElement::FromContentOrNull(parent->GetContent());

I don't think parent->GetContent() can be null here, since parent is an nsITextControlFrame.
Attachment #8923992 - Flags: review?(bzbarsky) → review+
Comment on attachment 8923992 [details]
Bug 1412437 - Remove nsIDOMHTMLTextAreaElement

https://reviewboard.mozilla.org/r/195178/#review200246

> Hmm.  But we're losing exceptions select() throws, right?  Do we have callers that do something useful with non-NS_OK return values here?
> 
> More to the point does Select() ever return non-NS_OK?  If not, followup to make it return void?

Yeah it never does anything with its nsresult, so just treating this as a nit and switched it to void.
Pushed by kmachulis@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/83a7ad25941e
Remove nsIDOMHTMLTextAreaElement r=bz
https://hg.mozilla.org/mozilla-central/rev/ea6ff35e8226
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.