Closed Bug 1406525 Opened 8 years ago Closed 8 years ago

Remove nsIDOMHTMLLinkElement

Categories

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

enhancement
Not set
normal

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 #8916148 - Flags: review?(bzbarsky)
Comment on attachment 8916148 [details] Bug 1406525 - Remove nsIDOMHTMLLinkElement; https://reviewboard.mozilla.org/r/187394/#review192474 There are two comm-central uses of `instanceof Components.interfaces.nsIDOMHTMLLinkElement`. Please file a bug on them to switch to getClassName(). r=me with the nit below. ::: dom/webbrowserpersist/WebBrowserPersistLocalDocument.cpp:538 (Diff revision 1) > - nsCOMPtr<nsIDOMHTMLLinkElement> nodeAsLink = do_QueryInterface(aNode); > - if (nodeAsLink) { > + if (content->IsHTMLElement(nsGkAtoms::link)) { > + RefPtr<dom::HTMLLinkElement> nodeAsLink = dom::HTMLLinkElement::FromContent(content); You can combine these as: if (auto nodeAsLink = dom::HTMLLinkElement::FromContent(content)) { and then you only check the tagname once.
Attachment #8916148 - Flags: review?(bzbarsky) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: