Skip to content

Commit

Permalink
Bug 1613985 - Use default for equivalent-to-default constructors/dest…
Browse files Browse the repository at this point in the history
…ructors in dom/html. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D63171

--HG--
extra : moz-landing-system : lando
  • Loading branch information
sigiesec committed Feb 20, 2020
1 parent 04523a9 commit 1ed2ba9
Show file tree
Hide file tree
Showing 79 changed files with 92 additions and 90 deletions.
2 changes: 1 addition & 1 deletion dom/html/HTMLAllCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ HTMLAllCollection::HTMLAllCollection(mozilla::dom::Document* aDocument)
MOZ_ASSERT(mDocument);
}

HTMLAllCollection::~HTMLAllCollection() {}
HTMLAllCollection::~HTMLAllCollection() = default;

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(HTMLAllCollection, mDocument, mCollection,
mNamedMap)
Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLAnchorElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ASSERT_NODE_FLAGS_SPACE(ELEMENT_TYPE_SPECIFIC_BITS_OFFSET + 2);
const DOMTokenListSupportedToken HTMLAnchorElement::sSupportedRelValues[] = {
"noreferrer", "noopener", nullptr};

HTMLAnchorElement::~HTMLAnchorElement() {}
HTMLAnchorElement::~HTMLAnchorElement() = default;

bool HTMLAnchorElement::IsInteractiveHTMLContent(bool aIgnoreTabindex) const {
return HasAttr(kNameSpaceID_None, nsGkAtoms::href) ||
Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLAreaElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ HTMLAreaElement::HTMLAreaElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: nsGenericHTMLElement(std::move(aNodeInfo)), Link(this) {}

HTMLAreaElement::~HTMLAreaElement() {}
HTMLAreaElement::~HTMLAreaElement() = default;

NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(HTMLAreaElement,
nsGenericHTMLElement, Link)
Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLBRElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ HTMLBRElement::HTMLBRElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: nsGenericHTMLElement(std::move(aNodeInfo)) {}

HTMLBRElement::~HTMLBRElement() {}
HTMLBRElement::~HTMLBRElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLBRElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLBodyElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace dom {

//----------------------------------------------------------------------

HTMLBodyElement::~HTMLBodyElement() {}
HTMLBodyElement::~HTMLBodyElement() = default;

JSObject* HTMLBodyElement::WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLButtonElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ HTMLButtonElement::HTMLButtonElement(
AddStatesSilently(NS_EVENT_STATE_ENABLED);
}

HTMLButtonElement::~HTMLButtonElement() {}
HTMLButtonElement::~HTMLButtonElement() = default;

// nsISupports

Expand Down
4 changes: 2 additions & 2 deletions dom/html/HTMLCanvasElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ HTMLCanvasPrintState::HTMLCanvasPrintState(
mContext(aContext),
mCallback(aCallback) {}

HTMLCanvasPrintState::~HTMLCanvasPrintState() {}
HTMLCanvasPrintState::~HTMLCanvasPrintState() = default;

/* virtual */
JSObject* HTMLCanvasPrintState::WrapObject(JSContext* aCx,
Expand Down Expand Up @@ -647,7 +647,7 @@ class CanvasCaptureTrackSource : public MediaStreamTrackSource {
void Enable() override {}

private:
virtual ~CanvasCaptureTrackSource() {}
virtual ~CanvasCaptureTrackSource() = default;

RefPtr<CanvasCaptureMediaStream> mCaptureStream;
};
Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLCanvasElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class FrameCaptureListener : public SupportsWeakPtr<FrameCaptureListener> {
const TimeStamp& aTime) = 0;

protected:
virtual ~FrameCaptureListener() {}
virtual ~FrameCaptureListener() = default;

bool mFrameCaptureRequested;
};
Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLDataElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ HTMLDataElement::HTMLDataElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: nsGenericHTMLElement(std::move(aNodeInfo)) {}

HTMLDataElement::~HTMLDataElement() {}
HTMLDataElement::~HTMLDataElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLDataElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLDataListElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(DataList)
namespace mozilla {
namespace dom {

HTMLDataListElement::~HTMLDataListElement() {}
HTMLDataListElement::~HTMLDataListElement() = default;

JSObject* HTMLDataListElement::WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLDetailsElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Details)
namespace mozilla {
namespace dom {

HTMLDetailsElement::~HTMLDetailsElement() {}
HTMLDetailsElement::~HTMLDetailsElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLDetailsElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLDialogElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ nsGenericHTMLElement* NS_NewHTMLDialogElement(
namespace mozilla {
namespace dom {

HTMLDialogElement::~HTMLDialogElement() {}
HTMLDialogElement::~HTMLDialogElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLDialogElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLDivElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Div)
namespace mozilla {
namespace dom {

HTMLDivElement::~HTMLDivElement() {}
HTMLDivElement::~HTMLDivElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLDivElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ HTMLElement::HTMLElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
}
}

HTMLElement::~HTMLElement() {}
HTMLElement::~HTMLElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLFontElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Font)
namespace mozilla {
namespace dom {

HTMLFontElement::~HTMLFontElement() {}
HTMLFontElement::~HTMLFontElement() = default;

JSObject* HTMLFontElement::WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLFormSubmission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ EncodingFormSubmission::EncodingFormSubmission(
}
}

EncodingFormSubmission::~EncodingFormSubmission() {}
EncodingFormSubmission::~EncodingFormSubmission() = default;

// i18n helper routines
nsresult EncodingFormSubmission::EncodeVal(const nsAString& aStr,
Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLFrameElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ HTMLFrameElement::HTMLFrameElement(
FromParser aFromParser)
: nsGenericHTMLFrameElement(std::move(aNodeInfo), aFromParser) {}

HTMLFrameElement::~HTMLFrameElement() {}
HTMLFrameElement::~HTMLFrameElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLFrameElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLFrameSetElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(FrameSet)
namespace mozilla {
namespace dom {

HTMLFrameSetElement::~HTMLFrameSetElement() {}
HTMLFrameSetElement::~HTMLFrameSetElement() = default;

JSObject* HTMLFrameSetElement::WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLHRElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ HTMLHRElement::HTMLHRElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: nsGenericHTMLElement(std::move(aNodeInfo)) {}

HTMLHRElement::~HTMLHRElement() {}
HTMLHRElement::~HTMLHRElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLHRElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLHeadingElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Heading)
namespace mozilla {
namespace dom {

HTMLHeadingElement::~HTMLHeadingElement() {}
HTMLHeadingElement::~HTMLHeadingElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLHeadingElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLIFrameElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ HTMLIFrameElement::HTMLIFrameElement(
mFeaturePolicy->SetDefaultOrigin(origin);
}

HTMLIFrameElement::~HTMLIFrameElement() {}
HTMLIFrameElement::~HTMLIFrameElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLIFrameElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLImageElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class ImageLoadTask final : public MicroTaskRunnable {
bool AlwaysLoad() { return mAlwaysLoad; }

private:
~ImageLoadTask() {}
~ImageLoadTask() = default;
RefPtr<HTMLImageElement> mElement;
nsCOMPtr<Document> mDocument;
bool mAlwaysLoad;
Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLInputElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ NS_IMPL_ISUPPORTS(HTMLInputElement::nsFilePickerShownCallback,
nsIFilePickerShownCallback)

class nsColorPickerShownCallback final : public nsIColorPickerShownCallback {
~nsColorPickerShownCallback() {}
~nsColorPickerShownCallback() = default;

public:
nsColorPickerShownCallback(HTMLInputElement* aInput,
Expand Down
6 changes: 3 additions & 3 deletions dom/html/HTMLInputElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class GetFilesHelper;
* page is being viewed in private browsing.
*/
class UploadLastDir final : public nsIObserver, public nsSupportsWeakReference {
~UploadLastDir() {}
~UploadLastDir() = default;

public:
NS_DECL_ISUPPORTS
Expand All @@ -100,7 +100,7 @@ class UploadLastDir final : public nsIObserver, public nsSupportsWeakReference {
nsresult StoreLastUsedDirectory(Document* aDoc, nsIFile* aDir);

class ContentPrefCallback final : public nsIContentPrefCallback2 {
virtual ~ContentPrefCallback() {}
virtual ~ContentPrefCallback() = default;

public:
ContentPrefCallback(nsIFilePicker* aFilePicker,
Expand Down Expand Up @@ -1642,7 +1642,7 @@ class HTMLInputElement final : public TextControlElement,
};

class nsFilePickerShownCallback : public nsIFilePickerShownCallback {
virtual ~nsFilePickerShownCallback() {}
virtual ~nsFilePickerShownCallback() = default;

public:
nsFilePickerShownCallback(HTMLInputElement* aInput,
Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLLIElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(LI)
namespace mozilla {
namespace dom {

HTMLLIElement::~HTMLLIElement() {}
HTMLLIElement::~HTMLLIElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLLIElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLLabelElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Label)
namespace mozilla {
namespace dom {

HTMLLabelElement::~HTMLLabelElement() {}
HTMLLabelElement::~HTMLLabelElement() = default;

JSObject* HTMLLabelElement::WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLLegendElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Legend)
namespace mozilla {
namespace dom {

HTMLLegendElement::~HTMLLegendElement() {}
HTMLLegendElement::~HTMLLegendElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLLegendElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLLinkElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ HTMLLinkElement::HTMLLinkElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: nsGenericHTMLElement(std::move(aNodeInfo)), Link(this) {}

HTMLLinkElement::~HTMLLinkElement() {}
HTMLLinkElement::~HTMLLinkElement() = default;

NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLLinkElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLMapElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class HTMLMapElement final : public nsGenericHTMLElement {
JS::Handle<JSObject*> aGivenProto) override;

protected:
~HTMLMapElement() {}
~HTMLMapElement() = default;

RefPtr<nsContentList> mAreas;
};
Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLMarqueeElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Marquee)
namespace mozilla {
namespace dom {

HTMLMarqueeElement::~HTMLMarqueeElement() {}
HTMLMarqueeElement::~HTMLMarqueeElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLMarqueeElement)

Expand Down
4 changes: 2 additions & 2 deletions dom/html/HTMLMediaElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ class nsMediaEvent : public Runnable {
: Runnable(aName),
mElement(aElement),
mLoadID(mElement->GetCurrentLoadID()) {}
~nsMediaEvent() {}
~nsMediaEvent() = default;

NS_IMETHOD Run() override = 0;

Expand Down Expand Up @@ -1133,7 +1133,7 @@ class HTMLMediaElement::MediaLoadListener final
public nsIInterfaceRequestor,
public nsIObserver,
public nsIThreadRetargetableStreamListener {
~MediaLoadListener() {}
~MediaLoadListener() = default;

NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIREQUESTOBSERVER
Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLMenuElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ HTMLMenuElement::HTMLMenuElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: nsGenericHTMLElement(std::move(aNodeInfo)), mType(MENU_TYPE_TOOLBAR) {}

HTMLMenuElement::~HTMLMenuElement() {}
HTMLMenuElement::~HTMLMenuElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLMenuElement)

Expand Down
8 changes: 4 additions & 4 deletions dom/html/HTMLMenuItemElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ static const nsAttrValue::EnumTable* kMenuItemDefaultType =
// A base class inherited by all radio visitors.
class Visitor {
public:
Visitor() {}
virtual ~Visitor() {}
Visitor() = default;
virtual ~Visitor() = default;

/**
* Visit a node in the tree. This is meant to be called on all radios in a
Expand Down Expand Up @@ -108,7 +108,7 @@ class GetCheckedDirtyVisitor : public Visitor {
// Set checked dirty to true on all radios in the group.
class SetCheckedDirtyVisitor : public Visitor {
public:
SetCheckedDirtyVisitor() {}
SetCheckedDirtyVisitor() = default;
virtual bool Visit(HTMLMenuItemElement* aMenuItem) override {
aMenuItem->SetCheckedDirty();
return true;
Expand Down Expand Up @@ -153,7 +153,7 @@ HTMLMenuItemElement::HTMLMenuItemElement(
mParserCreating = aFromParser;
}

HTMLMenuItemElement::~HTMLMenuItemElement() {}
HTMLMenuItemElement::~HTMLMenuItemElement() = default;

// NS_IMPL_ELEMENT_CLONE(HTMLMenuItemElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLMetaElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ HTMLMetaElement::HTMLMetaElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: nsGenericHTMLElement(std::move(aNodeInfo)) {}

HTMLMetaElement::~HTMLMetaElement() {}
HTMLMetaElement::~HTMLMetaElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLMetaElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLMeterElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ HTMLMeterElement::HTMLMeterElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: nsGenericHTMLElement(std::move(aNodeInfo)) {}

HTMLMeterElement::~HTMLMeterElement() {}
HTMLMeterElement::~HTMLMeterElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLMeterElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLModElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ HTMLModElement::HTMLModElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: nsGenericHTMLElement(std::move(aNodeInfo)) {}

HTMLModElement::~HTMLModElement() {}
HTMLModElement::~HTMLModElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLModElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLOptGroupElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ HTMLOptGroupElement::HTMLOptGroupElement(
AddStatesSilently(NS_EVENT_STATE_ENABLED);
}

HTMLOptGroupElement::~HTMLOptGroupElement() {}
HTMLOptGroupElement::~HTMLOptGroupElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLOptGroupElement)

Expand Down
2 changes: 1 addition & 1 deletion dom/html/HTMLOptionElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ HTMLOptionElement::HTMLOptionElement(
AddStatesSilently(NS_EVENT_STATE_ENABLED);
}

HTMLOptionElement::~HTMLOptionElement() {}
HTMLOptionElement::~HTMLOptionElement() = default;

NS_IMPL_ELEMENT_CLONE(HTMLOptionElement)

Expand Down
Loading

0 comments on commit 1ed2ba9

Please sign in to comment.