Bug 1613985 - Use default for equivalent-to-default constructors/destructors in widget. r=jmathies
authorSimon Giesecke <sgiesecke@mozilla.com>
Mon, 16 Mar 2020 10:56:57 +0000
changeset 518949 087e9f9efed07fad4c0d8af05464e6a9b580c0ea
parent 518948 1fe5ae0c876896abf2f7b711b491aafa7463b25b
child 518950 e4d136fe97331f4f66b78ecb8f725948a7b7e845
push id37220
push useraiakab@mozilla.com
push dateTue, 17 Mar 2020 05:13:41 +0000
treeherdermozilla-central@17adc9cb1db9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmathies
bugs1613985
milestone76.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1613985 - Use default for equivalent-to-default constructors/destructors in widget. r=jmathies Differential Revision: https://phabricator.services.mozilla.com/D66012
widget/BasicEvents.h
widget/CompositorWidget.cpp
widget/ContentCache.cpp
widget/GfxInfoBase.cpp
widget/GfxInfoX11.h
widget/InputData.cpp
widget/MouseEvents.h
widget/PuppetBidiKeyboard.cpp
widget/PuppetWidget.cpp
widget/Screen.h
widget/ScreenManager.cpp
widget/ScreenManager.h
widget/TextEventDispatcher.h
widget/TextRange.h
widget/VsyncDispatcher.h
widget/WindowSurface.h
widget/gtk/CompositorWidgetChild.cpp
widget/gtk/CompositorWidgetParent.cpp
widget/gtk/IMContextWrapper.cpp
widget/gtk/WindowSurfaceWayland.cpp
widget/gtk/WindowSurfaceWayland.h
widget/gtk/nsApplicationChooser.cpp
widget/gtk/nsBidiKeyboard.cpp
widget/gtk/nsClipboard.cpp
widget/gtk/nsClipboard.h
widget/gtk/nsClipboardWayland.h
widget/gtk/nsColorPicker.h
widget/gtk/nsDeviceContextSpecG.cpp
widget/gtk/nsDeviceContextSpecG.h
widget/gtk/nsFilePicker.cpp
widget/gtk/nsImageToPixbuf.h
widget/gtk/nsLookAndFeel.cpp
widget/gtk/nsNativeThemeGTK.cpp
widget/gtk/nsPrintDialogGTK.cpp
widget/gtk/nsPrintSettingsServiceGTK.h
widget/gtk/nsSound.cpp
widget/headless/HeadlessClipboard.h
widget/headless/HeadlessLookAndFeelGTK.cpp
widget/headless/HeadlessScreenHelper.h
widget/headless/HeadlessSound.cpp
widget/headless/HeadlessThemeGTK.h
widget/nsBaseAppShell.cpp
widget/nsBaseFilePicker.cpp
widget/nsBaseScreen.cpp
widget/nsBaseWidget.cpp
widget/nsClipboardHelper.cpp
widget/nsClipboardProxy.h
widget/nsColorPickerProxy.h
widget/nsDeviceContextSpecProxy.h
widget/nsDragServiceProxy.cpp
widget/nsFilePickerProxy.cpp
widget/nsHTMLFormatConverter.cpp
widget/nsIdleService.h
widget/nsNativeTheme.h
widget/nsPrintSession.cpp
widget/nsPrintSettingsImpl.cpp
widget/nsPrintSettingsService.h
widget/nsTransferable.cpp
--- a/widget/BasicEvents.h
+++ b/widget/BasicEvents.h
@@ -1062,17 +1062,17 @@ class NativeEventData final {
  ******************************************************************************/
 
 class WidgetGUIEvent : public WidgetEvent {
  protected:
   WidgetGUIEvent(bool aIsTrusted, EventMessage aMessage, nsIWidget* aWidget,
                  EventClassID aEventClassID)
       : WidgetEvent(aIsTrusted, aMessage, aEventClassID), mWidget(aWidget) {}
 
-  WidgetGUIEvent() {}
+  WidgetGUIEvent() = default;
 
  public:
   virtual WidgetGUIEvent* AsGUIEvent() override { return this; }
 
   WidgetGUIEvent(bool aIsTrusted, EventMessage aMessage, nsIWidget* aWidget)
       : WidgetEvent(aIsTrusted, aMessage, eGUIEventClass), mWidget(aWidget) {}
 
   virtual WidgetEvent* Duplicate() const override {
--- a/widget/CompositorWidget.cpp
+++ b/widget/CompositorWidget.cpp
@@ -8,17 +8,17 @@
 #include "VsyncDispatcher.h"
 
 namespace mozilla {
 namespace widget {
 
 CompositorWidget::CompositorWidget(const layers::CompositorOptions& aOptions)
     : mOptions(aOptions) {}
 
-CompositorWidget::~CompositorWidget() {}
+CompositorWidget::~CompositorWidget() = default;
 
 already_AddRefed<gfx::DrawTarget> CompositorWidget::StartRemoteDrawing() {
   return nullptr;
 }
 
 void CompositorWidget::CleanupRemoteDrawing() { mLastBackBuffer = nullptr; }
 
 already_AddRefed<gfx::DrawTarget> CompositorWidget::GetBackBufferDrawTarget(
--- a/widget/ContentCache.cpp
+++ b/widget/ContentCache.cpp
@@ -41,33 +41,33 @@ class GetRectText : public nsAutoCString
     AppendLiteral(", y=");
     AppendInt(aRect.Y());
     AppendLiteral(", width=");
     AppendInt(aRect.Width());
     AppendLiteral(", height=");
     AppendInt(aRect.Height());
     AppendLiteral(" }");
   }
-  virtual ~GetRectText() {}
+  virtual ~GetRectText() = default;
 };
 
 class GetWritingModeName : public nsAutoCString {
  public:
   explicit GetWritingModeName(const WritingMode& aWritingMode) {
     if (!aWritingMode.IsVertical()) {
       AssignLiteral("Horizontal");
       return;
     }
     if (aWritingMode.IsVerticalLR()) {
       AssignLiteral("Vertical (LTR)");
       return;
     }
     AssignLiteral("Vertical (RTL)");
   }
-  virtual ~GetWritingModeName() {}
+  virtual ~GetWritingModeName() = default;
 };
 
 class GetEscapedUTF8String final : public NS_ConvertUTF16toUTF8 {
  public:
   explicit GetEscapedUTF8String(const nsAString& aString)
       : NS_ConvertUTF16toUTF8(aString) {
     Escape();
   }
--- a/widget/GfxInfoBase.cpp
+++ b/widget/GfxInfoBase.cpp
@@ -42,20 +42,20 @@ using mozilla::MutexAutoLock;
 
 nsTArray<GfxDriverInfo>* GfxInfoBase::sDriverInfo;
 nsTArray<dom::GfxInfoFeatureStatus>* GfxInfoBase::sFeatureStatus;
 bool GfxInfoBase::sDriverInfoObserverInitialized;
 bool GfxInfoBase::sShutdownOccurred;
 
 // Observes for shutdown so that the child GfxDriverInfo list is freed.
 class ShutdownObserver : public nsIObserver {
-  virtual ~ShutdownObserver() {}
+  virtual ~ShutdownObserver() = default;
 
  public:
-  ShutdownObserver() {}
+  ShutdownObserver() = default;
 
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD Observe(nsISupports* subject, const char* aTopic,
                      const char16_t* aData) override {
     MOZ_ASSERT(strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID) == 0);
 
     delete GfxInfoBase::sDriverInfo;
@@ -624,17 +624,17 @@ GfxInfoBase::Observe(nsISupports* aSubje
     EvaluateDownloadedBlacklist(driverInfo);
   }
 
   return NS_OK;
 }
 
 GfxInfoBase::GfxInfoBase() : mScreenPixels(INT64_MAX), mMutex("GfxInfoBase") {}
 
-GfxInfoBase::~GfxInfoBase() {}
+GfxInfoBase::~GfxInfoBase() = default;
 
 nsresult GfxInfoBase::Init() {
   InitGfxDriverInfoShutdownObserver();
 
   nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
   if (os) {
     os->AddObserver(this, "blocklist-data-gfxItems", true);
   }
--- a/widget/GfxInfoX11.h
+++ b/widget/GfxInfoX11.h
@@ -56,17 +56,17 @@ class GfxInfo final : public GfxInfoBase
   NS_IMETHOD_(void) GetData() override;
 
 #ifdef DEBUG
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIGFXINFODEBUG
 #endif
 
  protected:
-  ~GfxInfo() {}
+  ~GfxInfo() = default;
 
   virtual nsresult GetFeatureStatusImpl(
       int32_t aFeature, int32_t* aStatus, nsAString& aSuggestedDriverVersion,
       const nsTArray<GfxDriverInfo>& aDriverInfo, nsACString& aFailureId,
       OperatingSystem* aOS = nullptr) override;
   virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo() override;
 
   virtual bool DoesWindowProtocolMatch(
--- a/widget/InputData.cpp
+++ b/widget/InputData.cpp
@@ -15,17 +15,17 @@
 #include "mozilla/MouseEvents.h"
 #include "mozilla/TouchEvents.h"
 #include "UnitTransforms.h"
 
 namespace mozilla {
 
 using namespace dom;
 
-InputData::~InputData() {}
+InputData::~InputData() = default;
 
 InputData::InputData(InputType aInputType)
     : mInputType(aInputType),
       mTime(0),
       mFocusSequenceNumber(0),
       mLayersId{0},
       modifiers(0) {}
 
--- a/widget/MouseEvents.h
+++ b/widget/MouseEvents.h
@@ -23,17 +23,17 @@ class PBrowserBridgeParent;
 
 class WidgetPointerEvent;
 class WidgetPointerEventHolder final {
  public:
   nsTArray<WidgetPointerEvent> mEvents;
   NS_INLINE_DECL_REFCOUNTING(WidgetPointerEventHolder)
 
  private:
-  virtual ~WidgetPointerEventHolder() {}
+  virtual ~WidgetPointerEventHolder() = default;
 };
 
 /******************************************************************************
  * mozilla::WidgetPointerHelper
  ******************************************************************************/
 
 class WidgetPointerHelper {
  public:
@@ -57,24 +57,17 @@ class WidgetPointerHelper {
                       uint32_t aTwist = 0, float aTangentialPressure = 0)
       : pointerId(aPointerId),
         tiltX(aTiltX),
         tiltY(aTiltY),
         twist(aTwist),
         tangentialPressure(aTangentialPressure),
         convertToPointer(true) {}
 
-  explicit WidgetPointerHelper(const WidgetPointerHelper& aHelper)
-      : pointerId(aHelper.pointerId),
-        tiltX(aHelper.tiltX),
-        tiltY(aHelper.tiltY),
-        twist(aHelper.twist),
-        tangentialPressure(aHelper.tangentialPressure),
-        convertToPointer(aHelper.convertToPointer),
-        mCoalescedWidgetEvents(aHelper.mCoalescedWidgetEvents) {}
+  explicit WidgetPointerHelper(const WidgetPointerHelper& aHelper) = default;
 
   void AssignPointerHelperData(const WidgetPointerHelper& aEvent,
                                bool aCopyCoalescedEvents = false) {
     pointerId = aEvent.pointerId;
     tiltX = aEvent.tiltX;
     tiltY = aEvent.tiltY;
     twist = aEvent.twist;
     tangentialPressure = aEvent.tangentialPressure;
--- a/widget/PuppetBidiKeyboard.cpp
+++ b/widget/PuppetBidiKeyboard.cpp
@@ -10,17 +10,17 @@
 
 using namespace mozilla::widget;
 
 NS_IMPL_ISUPPORTS(PuppetBidiKeyboard, nsIBidiKeyboard)
 
 PuppetBidiKeyboard::PuppetBidiKeyboard()
     : nsIBidiKeyboard(), mIsLangRTL(false), mHaveBidiKeyboards(false) {}
 
-PuppetBidiKeyboard::~PuppetBidiKeyboard() {}
+PuppetBidiKeyboard::~PuppetBidiKeyboard() = default;
 
 NS_IMETHODIMP
 PuppetBidiKeyboard::Reset() { return NS_OK; }
 
 NS_IMETHODIMP
 PuppetBidiKeyboard::IsLangRTL(bool* aIsRTL) {
   *aIsRTL = mIsLangRTL;
   return NS_OK;
--- a/widget/PuppetWidget.cpp
+++ b/widget/PuppetWidget.cpp
@@ -1180,17 +1180,17 @@ uint32_t PuppetWidget::GetMaxTouchPoints
 
 void PuppetWidget::StartAsyncScrollbarDrag(
     const AsyncDragMetrics& aDragMetrics) {
   mBrowserChild->StartScrollbarDrag(aDragMetrics);
 }
 
 PuppetScreen::PuppetScreen(void* nativeScreen) {}
 
-PuppetScreen::~PuppetScreen() {}
+PuppetScreen::~PuppetScreen() = default;
 
 static ScreenConfiguration ScreenConfig() {
   ScreenConfiguration config;
   hal::GetCurrentScreenConfiguration(&config);
   return config;
 }
 
 nsIntSize PuppetWidget::GetScreenDimensions() {
@@ -1225,17 +1225,17 @@ PuppetScreen::GetColorDepth(int32_t* aCo
 }
 
 NS_IMPL_ISUPPORTS(PuppetScreenManager, nsIScreenManager)
 
 PuppetScreenManager::PuppetScreenManager() {
   mOneScreen = new PuppetScreen(nullptr);
 }
 
-PuppetScreenManager::~PuppetScreenManager() {}
+PuppetScreenManager::~PuppetScreenManager() = default;
 
 NS_IMETHODIMP
 PuppetScreenManager::GetPrimaryScreen(nsIScreen** outScreen) {
   NS_IF_ADDREF(*outScreen = mOneScreen.get());
   return NS_OK;
 }
 
 NS_IMETHODIMP
--- a/widget/Screen.h
+++ b/widget/Screen.h
@@ -30,17 +30,17 @@ class Screen final : public nsIScreen {
          DesktopToLayoutDeviceScale aContentsScale,
          CSSToLayoutDeviceScale aDefaultCssScale, float dpi);
   explicit Screen(const mozilla::dom::ScreenDetails& aScreenDetails);
   Screen(const Screen& aOther);
 
   mozilla::dom::ScreenDetails ToScreenDetails();
 
  private:
-  virtual ~Screen() {}
+  virtual ~Screen() = default;
 
   LayoutDeviceIntRect mRect;
   LayoutDeviceIntRect mAvailRect;
   DesktopIntRect mRectDisplayPix;
   DesktopIntRect mAvailRectDisplayPix;
   uint32_t mPixelDepth;
   uint32_t mColorDepth;
   DesktopToLayoutDeviceScale mContentsScale;
--- a/widget/ScreenManager.cpp
+++ b/widget/ScreenManager.cpp
@@ -18,19 +18,19 @@
 #endif /* MOZ_WAYLAND */
 
 static mozilla::LazyLogModule sScreenLog("WidgetScreen");
 
 namespace mozilla::widget {
 
 NS_IMPL_ISUPPORTS(ScreenManager, nsIScreenManager)
 
-ScreenManager::ScreenManager() {}
+ScreenManager::ScreenManager() = default;
 
-ScreenManager::~ScreenManager() {}
+ScreenManager::~ScreenManager() = default;
 
 static StaticRefPtr<ScreenManager> sSingleton;
 
 ScreenManager& ScreenManager::GetSingleton() {
   if (!sSingleton) {
     sSingleton = new ScreenManager();
     ClearOnShutdown(&sSingleton);
   }
--- a/widget/ScreenManager.h
+++ b/widget/ScreenManager.h
@@ -23,17 +23,17 @@ class ScreenDetails;
 
 namespace mozilla {
 namespace widget {
 
 class ScreenManager final : public nsIScreenManager {
  public:
   class Helper {
    public:
-    virtual ~Helper() {}
+    virtual ~Helper() = default;
   };
 
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSISCREENMANAGER
 
   static ScreenManager& GetSingleton();
   static already_AddRefed<ScreenManager> GetAddRefedSingleton();
--- a/widget/TextEventDispatcher.h
+++ b/widget/TextEventDispatcher.h
@@ -27,17 +27,17 @@ class PuppetWidget;
  * WidgetCompositionEvent and WidgetKeyboardEvent.  This manages the behavior
  * of them for conforming to DOM Level 3 Events.
  * An instance of this class is created by nsIWidget instance and owned by it.
  * This is typically created only by the top level widgets because only they
  * handle IME.
  */
 
 class TextEventDispatcher final {
-  ~TextEventDispatcher() {}
+  ~TextEventDispatcher() = default;
 
   NS_INLINE_DECL_REFCOUNTING(TextEventDispatcher)
 
  public:
   explicit TextEventDispatcher(nsIWidget* aWidget);
 
   /**
    * Initializes the instance for IME or automated test.  Either IME or tests
--- a/widget/TextRange.h
+++ b/widget/TextRange.h
@@ -179,17 +179,17 @@ struct TextRange {
 };
 
 /******************************************************************************
  * mozilla::TextRangeArray
  ******************************************************************************/
 class TextRangeArray final : public AutoTArray<TextRange, 10> {
   friend class WidgetCompositionEvent;
 
-  ~TextRangeArray() {}
+  ~TextRangeArray() = default;
 
   NS_INLINE_DECL_REFCOUNTING(TextRangeArray)
 
   const TextRange* GetTargetClause() const {
     for (uint32_t i = 0; i < Length(); ++i) {
       const TextRange& range = ElementAt(i);
       if (range.mRangeType == TextRangeType::eSelectedRawClause ||
           range.mRangeType == TextRangeType::eSelectedClause) {
--- a/widget/VsyncDispatcher.h
+++ b/widget/VsyncDispatcher.h
@@ -22,18 +22,18 @@ class VsyncObserver {
   // The method called when a vsync occurs. Return true if some work was done.
   // In general, this vsync notification will occur on the hardware vsync
   // thread from VsyncSource. But it might also be called on PVsync ipc thread
   // if this notification is cross process. Thus all observer should check the
   // thread model before handling the real task.
   virtual bool NotifyVsync(const VsyncEvent& aVsync) = 0;
 
  protected:
-  VsyncObserver() {}
-  virtual ~VsyncObserver() {}
+  VsyncObserver() = default;
+  virtual ~VsyncObserver() = default;
 };  // VsyncObserver
 
 // Used to dispatch vsync events in the parent process to compositors.
 //
 // When the compositor is in-process, CompositorWidgets own a
 // CompositorVsyncDispatcher, and directly attach the compositor's observer
 // to it.
 //
--- a/widget/WindowSurface.h
+++ b/widget/WindowSurface.h
@@ -11,17 +11,17 @@
 #include "Units.h"
 
 namespace mozilla {
 namespace widget {
 
 // A class for drawing to double-buffered windows.
 class WindowSurface {
  public:
-  virtual ~WindowSurface() {}
+  virtual ~WindowSurface() = default;
 
   // Locks a region of the window for drawing, returning a draw target
   // capturing the bounds of the provided region.
   // Implementations must permit invocation from any thread.
   virtual already_AddRefed<gfx::DrawTarget> Lock(
       const LayoutDeviceIntRegion& aRegion) = 0;
 
   // Swaps the provided invalid region from the back buffer to the window.
--- a/widget/gtk/CompositorWidgetChild.cpp
+++ b/widget/gtk/CompositorWidgetChild.cpp
@@ -14,17 +14,17 @@ CompositorWidgetChild::CompositorWidgetC
     RefPtr<CompositorVsyncDispatcher> aVsyncDispatcher,
     RefPtr<CompositorWidgetVsyncObserver> aVsyncObserver,
     const CompositorWidgetInitData&)
     : mVsyncDispatcher(aVsyncDispatcher), mVsyncObserver(aVsyncObserver) {
   MOZ_ASSERT(XRE_IsParentProcess());
   MOZ_ASSERT(!gfxPlatform::IsHeadless());
 }
 
-CompositorWidgetChild::~CompositorWidgetChild() {}
+CompositorWidgetChild::~CompositorWidgetChild() = default;
 
 bool CompositorWidgetChild::Initialize() { return true; }
 
 mozilla::ipc::IPCResult CompositorWidgetChild::RecvObserveVsync() {
   mVsyncDispatcher->SetCompositorVsyncObserver(mVsyncObserver);
   return IPC_OK();
 }
 
--- a/widget/gtk/CompositorWidgetParent.cpp
+++ b/widget/gtk/CompositorWidgetParent.cpp
@@ -13,17 +13,17 @@ namespace widget {
 CompositorWidgetParent::CompositorWidgetParent(
     const CompositorWidgetInitData& aInitData,
     const layers::CompositorOptions& aOptions)
     : GtkCompositorWidget(aInitData.get_GtkCompositorWidgetInitData(),
                           aOptions) {
   MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_GPU);
 }
 
-CompositorWidgetParent::~CompositorWidgetParent() {}
+CompositorWidgetParent::~CompositorWidgetParent() = default;
 
 void CompositorWidgetParent::ObserveVsync(VsyncObserver* aObserver) {
   if (aObserver) {
     Unused << SendObserveVsync();
   } else {
     Unused << SendUnobserveVsync();
   }
   mVsyncObserver = aObserver;
--- a/widget/gtk/IMContextWrapper.cpp
+++ b/widget/gtk/IMContextWrapper.cpp
@@ -126,17 +126,17 @@ class GetWritingModeName : public nsAuto
       return;
     }
     if (aWritingMode.IsVerticalLR()) {
       AssignLiteral("Vertical (LTR)");
       return;
     }
     AssignLiteral("Vertical (RTL)");
   }
-  virtual ~GetWritingModeName() {}
+  virtual ~GetWritingModeName() = default;
 };
 
 class GetTextRangeStyleText final : public nsAutoCString {
  public:
   explicit GetTextRangeStyleText(const TextRangeStyle& aStyle) {
     if (!aStyle.IsDefined()) {
       AssignLiteral("{ IsDefined()=false }");
       return;
@@ -196,17 +196,17 @@ class GetTextRangeStyleText final : publ
                      static_cast<TextRangeStyle::LineStyleType>(aLineStyle));
         break;
     }
   }
   void AppendColor(nscolor aColor) {
     AppendPrintf("{ R=0x%02X, G=0x%02X, B=0x%02X, A=0x%02X }", NS_GET_R(aColor),
                  NS_GET_G(aColor), NS_GET_B(aColor), NS_GET_A(aColor));
   }
-  virtual ~GetTextRangeStyleText(){};
+  virtual ~GetTextRangeStyleText() = default;
 };
 
 const static bool kUseSimpleContextDefault = false;
 
 /******************************************************************************
  * SelectionStyleProvider
  *
  * IME (e.g., fcitx, ~4.2.8.3) may look up selection colors of widget, which
--- a/widget/gtk/WindowSurfaceWayland.cpp
+++ b/widget/gtk/WindowSurfaceWayland.cpp
@@ -439,17 +439,17 @@ WindowBackBufferDMABuf::WindowBackBuffer
   mDMAbufSurface = WaylandDMABufSurfaceRGBA::CreateDMABufSurface(
       aWidth, aHeight, DMABUF_ALPHA | DMABUF_CREATE_WL_BUFFER);
   LOGWAYLAND(
       ("WindowBackBufferDMABuf::WindowBackBufferDMABuf [%p] Created DMABuf "
        "buffer [%d x %d]\n",
        (void*)this, aWidth, aHeight));
 }
 
-WindowBackBufferDMABuf::~WindowBackBufferDMABuf() {}
+WindowBackBufferDMABuf::~WindowBackBufferDMABuf() = default;
 
 already_AddRefed<gfx::DrawTarget> WindowBackBufferDMABuf::Lock() {
   LOGWAYLAND(
       ("WindowBackBufferDMABuf::Lock [%p] [%d x %d] wl_buffer %p ID %d\n",
        (void*)this, GetWidth(), GetHeight(), (void*)GetWlBuffer(),
        GetWlBuffer() ? wl_proxy_get_id((struct wl_proxy*)GetWlBuffer()) : -1));
 
   uint32_t stride;
--- a/widget/gtk/WindowSurfaceWayland.h
+++ b/widget/gtk/WindowSurfaceWayland.h
@@ -76,17 +76,17 @@ class WindowBackBuffer {
   }
 
   static gfx::SurfaceFormat GetSurfaceFormat() { return mFormat; }
 
   nsWaylandDisplay* GetWaylandDisplay();
 
   WindowBackBuffer(WindowSurfaceWayland* aWindowSurfaceWayland)
       : mWindowSurfaceWayland(aWindowSurfaceWayland){};
-  virtual ~WindowBackBuffer(){};
+  virtual ~WindowBackBuffer() = default;
 
  protected:
   WindowSurfaceWayland* mWindowSurfaceWayland;
 
  private:
   static gfx::SurfaceFormat mFormat;
 };
 
--- a/widget/gtk/nsApplicationChooser.cpp
+++ b/widget/gtk/nsApplicationChooser.cpp
@@ -15,19 +15,19 @@
 #include "nsComponentManagerUtils.h"
 #include "nsGtkUtils.h"
 #include "nsPIDOMWindow.h"
 
 using namespace mozilla;
 
 NS_IMPL_ISUPPORTS(nsApplicationChooser, nsIApplicationChooser)
 
-nsApplicationChooser::nsApplicationChooser() {}
+nsApplicationChooser::nsApplicationChooser() = default;
 
-nsApplicationChooser::~nsApplicationChooser() {}
+nsApplicationChooser::~nsApplicationChooser() = default;
 
 NS_IMETHODIMP
 nsApplicationChooser::Init(mozIDOMWindowProxy* aParent,
                            const nsACString& aTitle) {
   NS_ENSURE_TRUE(aParent, NS_ERROR_FAILURE);
   auto* parent = nsPIDOMWindowOuter::From(aParent);
   mParentWidget = widget::WidgetUtils::DOMWindowToWidget(parent);
   mWindowTitle.Assign(aTitle);
--- a/widget/gtk/nsBidiKeyboard.cpp
+++ b/widget/gtk/nsBidiKeyboard.cpp
@@ -24,17 +24,17 @@ nsBidiKeyboard::Reset() {
   GdkDisplay* display = gdk_display_get_default();
   if (!display) return NS_OK;
 
   GdkKeymap* keymap = gdk_keymap_get_for_display(display);
   mHaveBidiKeyboards = keymap && gdk_keymap_have_bidi_layouts(keymap);
   return NS_OK;
 }
 
-nsBidiKeyboard::~nsBidiKeyboard() {}
+nsBidiKeyboard::~nsBidiKeyboard() = default;
 
 NS_IMETHODIMP
 nsBidiKeyboard::IsLangRTL(bool* aIsRTL) {
   if (!mHaveBidiKeyboards) return NS_ERROR_FAILURE;
 
   *aIsRTL = (gdk_keymap_get_direction(gdk_keymap_get_default()) ==
              PANGO_DIRECTION_RTL);
 
--- a/widget/gtk/nsClipboard.cpp
+++ b/widget/gtk/nsClipboard.cpp
@@ -69,17 +69,17 @@ int GetGeckoClipboardType(GtkClipboard* 
   if (aGtkClipboard == gtk_clipboard_get(GDK_SELECTION_PRIMARY))
     return nsClipboard::kSelectionClipboard;
   else if (aGtkClipboard == gtk_clipboard_get(GDK_SELECTION_CLIPBOARD))
     return nsClipboard::kGlobalClipboard;
   else
     return -1;  // THAT AIN'T NO CLIPBOARD I EVER HEARD OF
 }
 
-nsClipboard::nsClipboard() {}
+nsClipboard::nsClipboard() = default;
 
 nsClipboard::~nsClipboard() {
   // We have to clear clipboard before gdk_display_close() call.
   // See bug 531580 for details.
   if (mGlobalTransferable) {
     gtk_clipboard_clear(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD));
   }
   if (mSelectionTransferable) {
--- a/widget/gtk/nsClipboard.h
+++ b/widget/gtk/nsClipboard.h
@@ -33,17 +33,17 @@ class nsRetrievalContext {
   virtual void ReleaseClipboardData(const char* aClipboardData) = 0;
 
   // Get data mime types which can be obtained from clipboard.
   // The returned array has to be released by g_free().
   virtual GdkAtom* GetTargets(int32_t aWhichClipboard, int* aTargetNum) = 0;
 
   virtual bool HasSelectionSupport(void) = 0;
 
-  virtual ~nsRetrievalContext(){};
+  virtual ~nsRetrievalContext() = default;
 };
 
 class nsClipboard : public nsIClipboard, public nsIObserver {
  public:
   nsClipboard();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
--- a/widget/gtk/nsClipboardWayland.h
+++ b/widget/gtk/nsClipboardWayland.h
@@ -24,17 +24,17 @@ class DataOffer {
   void AddMIMEType(const char* aMimeType);
 
   GdkAtom* GetTargets(int* aTargetNum);
   bool HasTarget(const char* aMimeType);
 
   char* GetData(wl_display* aDisplay, const char* aMimeType,
                 uint32_t* aContentLength);
 
-  virtual ~DataOffer(){};
+  virtual ~DataOffer() = default;
 
  private:
   virtual bool RequestDataTransfer(const char* aMimeType, int fd) = 0;
 
  protected:
   nsTArray<GdkAtom> mTargetMIMETypes;
 };
 
@@ -93,17 +93,17 @@ class nsWaylandDragContext : public nsIS
   void SetDragStatus(GdkDragAction aPreferredAction);
   GdkDragAction GetAvailableDragActions();
 
   GtkWidget* GetWidget() { return mGtkWidget; }
   GList* GetTargets();
   char* GetData(const char* aMimeType, uint32_t* aContentLength);
 
  private:
-  virtual ~nsWaylandDragContext(){};
+  virtual ~nsWaylandDragContext() = default;
 
   nsAutoPtr<WaylandDataOffer> mDataOffer;
   wl_display* mDisplay;
   uint32_t mTime;
   GtkWidget* mGtkWidget;
   nscoord mX, mY;
 };
 
--- a/widget/gtk/nsColorPicker.h
+++ b/widget/gtk/nsColorPicker.h
@@ -19,20 +19,20 @@
 
 class nsIWidget;
 
 class nsColorPicker final : public nsIColorPicker {
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICOLORPICKER
 
-  nsColorPicker(){};
+  nsColorPicker() = default;
 
  private:
-  ~nsColorPicker(){};
+  ~nsColorPicker() = default;
 
   static nsString ToHexString(int n);
 
   static void OnResponse(GtkWidget* dialog, gint response_id,
                          gpointer user_data);
   static void OnDestroy(GtkWidget* dialog, gpointer user_data);
 
 #if defined(ACTIVATE_GTK3_COLOR_PICKER) && GTK_CHECK_VERSION(3, 4, 0)
--- a/widget/gtk/nsDeviceContextSpecG.cpp
+++ b/widget/gtk/nsDeviceContextSpecG.cpp
@@ -66,17 +66,17 @@ class GlobalPrinters {
     return mGlobalPrinterList ? mGlobalPrinterList->Length() : 0;
   }
   nsString* GetStringAt(int32_t aInx) {
     return &mGlobalPrinterList->ElementAt(aInx);
   }
   void GetDefaultPrinterName(nsAString& aDefaultPrinterName);
 
  protected:
-  GlobalPrinters() {}
+  GlobalPrinters() = default;
 
   static GlobalPrinters mGlobalPrinters;
   static nsTArray<nsString>* mGlobalPrinterList;
 };
 
 //---------------
 // static members
 GlobalPrinters GlobalPrinters::mGlobalPrinters;
@@ -365,17 +365,17 @@ NS_IMETHODIMP nsDeviceContextSpecGTK::En
                             targetPath.get());
       }
     }
   }
   return NS_OK;
 }
 
 //  Printer Enumerator
-nsPrinterEnumeratorGTK::nsPrinterEnumeratorGTK() {}
+nsPrinterEnumeratorGTK::nsPrinterEnumeratorGTK() = default;
 
 NS_IMPL_ISUPPORTS(nsPrinterEnumeratorGTK, nsIPrinterEnumerator)
 
 NS_IMETHODIMP nsPrinterEnumeratorGTK::GetPrinterNameList(
     nsIStringEnumerator** aPrinterNameList) {
   NS_ENSURE_ARG_POINTER(aPrinterNameList);
   *aPrinterNameList = nullptr;
 
--- a/widget/gtk/nsDeviceContextSpecG.h
+++ b/widget/gtk/nsDeviceContextSpecG.h
@@ -57,17 +57,17 @@ class nsDeviceContextSpecGTK : public ns
   void StartPrintJob();
   static gboolean PrinterEnumerator(GtkPrinter* aPrinter, gpointer aData);
 };
 
 //-------------------------------------------------------------------------
 // Printer Enumerator
 //-------------------------------------------------------------------------
 class nsPrinterEnumeratorGTK final : public nsIPrinterEnumerator {
-  ~nsPrinterEnumeratorGTK() {}
+  ~nsPrinterEnumeratorGTK() = default;
 
  public:
   nsPrinterEnumeratorGTK();
   NS_DECL_ISUPPORTS
   NS_DECL_NSIPRINTERENUMERATOR
 };
 
 #endif /* !nsDeviceContextSpecGTK_h___ */
--- a/widget/gtk/nsFilePicker.cpp
+++ b/widget/gtk/nsFilePicker.cpp
@@ -161,17 +161,17 @@ nsFilePicker::nsFilePicker()
       ,
       mFileChooserDelegate(nullptr)
 #endif
 {
   nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
   giovfs->ShouldUseFlatpakPortal(&mUseNativeFileChooser);
 }
 
-nsFilePicker::~nsFilePicker() {}
+nsFilePicker::~nsFilePicker() = default;
 
 void ReadMultipleFiles(gpointer filename, gpointer array) {
   nsCOMPtr<nsIFile> localfile;
   nsresult rv =
       NS_NewNativeLocalFile(nsDependentCString(static_cast<char*>(filename)),
                             false, getter_AddRefs(localfile));
   if (NS_SUCCEEDED(rv)) {
     nsCOMArray<nsIFile>& files = *static_cast<nsCOMArray<nsIFile>*>(array);
--- a/widget/gtk/nsImageToPixbuf.h
+++ b/widget/gtk/nsImageToPixbuf.h
@@ -28,17 +28,17 @@ class nsImageToPixbuf final : public nsI
    * The return value of all these, if not null, should be
    * released as needed by the caller using g_object_unref.
    */
   static GdkPixbuf* ImageToPixbuf(imgIContainer* aImage);
   static GdkPixbuf* SourceSurfaceToPixbuf(SourceSurface* aSurface,
                                           int32_t aWidth, int32_t aHeight);
 
  private:
-  ~nsImageToPixbuf() {}
+  ~nsImageToPixbuf() = default;
 };
 
 // fc2389b8-c650-4093-9e42-b05e5f0685b7
 #define NS_IMAGE_TO_PIXBUF_CID                       \
   {                                                  \
     0xfc2389b8, 0xc650, 0x4093, {                    \
       0x9e, 0x42, 0xb0, 0x5e, 0x5f, 0x06, 0x85, 0xb7 \
     }                                                \
--- a/widget/gtk/nsLookAndFeel.cpp
+++ b/widget/gtk/nsLookAndFeel.cpp
@@ -58,17 +58,17 @@ extern mozilla::LazyLogModule gWidgetLog
                     (int)((c).blue * 255), (int)((c).alpha * 255)))
 
 #if !GTK_CHECK_VERSION(3, 12, 0)
 #  define GTK_STATE_FLAG_LINK (static_cast<GtkStateFlags>(1 << 9))
 #endif
 
 nsLookAndFeel::nsLookAndFeel() = default;
 
-nsLookAndFeel::~nsLookAndFeel() {}
+nsLookAndFeel::~nsLookAndFeel() = default;
 
 // Modifies color |*aDest| as if a pattern of color |aSource| was painted with
 // CAIRO_OPERATOR_OVER to a surface with color |*aDest|.
 static void ApplyColorOver(const GdkRGBA& aSource, GdkRGBA* aDest) {
   gdouble sourceCoef = aSource.alpha;
   gdouble destCoef = aDest->alpha * (1.0 - sourceCoef);
   gdouble resultAlpha = sourceCoef + destCoef;
   if (resultAlpha != 0.0) {  // don't divide by zero
--- a/widget/gtk/nsNativeThemeGTK.cpp
+++ b/widget/gtk/nsNativeThemeGTK.cpp
@@ -107,17 +107,17 @@ nsNativeThemeGTK::nsNativeThemeGTK() {
   // We have to call moz_gtk_shutdown before the event loop stops running.
   nsCOMPtr<nsIObserverService> obsServ =
       mozilla::services::GetObserverService();
   obsServ->AddObserver(this, "xpcom-shutdown", false);
 
   ThemeChanged();
 }
 
-nsNativeThemeGTK::~nsNativeThemeGTK() {}
+nsNativeThemeGTK::~nsNativeThemeGTK() = default;
 
 NS_IMETHODIMP
 nsNativeThemeGTK::Observe(nsISupports* aSubject, const char* aTopic,
                           const char16_t* aData) {
   if (!nsCRT::strcmp(aTopic, "xpcom-shutdown")) {
     moz_gtk_shutdown();
   } else {
     MOZ_ASSERT_UNREACHABLE("unexpected topic");
--- a/widget/gtk/nsPrintDialogGTK.cpp
+++ b/widget/gtk/nsPrintDialogGTK.cpp
@@ -480,19 +480,19 @@ GtkWidget* nsPrintDialogWidgetGTK::Const
   }
 
   g_signal_connect(dropdown, "changed", (GCallback)ShowCustomDialog, dialog);
   return dropdown;
 }
 
 NS_IMPL_ISUPPORTS(nsPrintDialogServiceGTK, nsIPrintDialogService)
 
-nsPrintDialogServiceGTK::nsPrintDialogServiceGTK() {}
+nsPrintDialogServiceGTK::nsPrintDialogServiceGTK() = default;
 
-nsPrintDialogServiceGTK::~nsPrintDialogServiceGTK() {}
+nsPrintDialogServiceGTK::~nsPrintDialogServiceGTK() = default;
 
 NS_IMETHODIMP
 nsPrintDialogServiceGTK::Init() { return NS_OK; }
 
 // Used to obtain window handle. The portal use this handle
 // to ensure that print dialog is modal.
 typedef void (*WindowHandleExported)(GtkWindow* window, const char* handle,
                                      gpointer user_data);
--- a/widget/gtk/nsPrintSettingsServiceGTK.h
+++ b/widget/gtk/nsPrintSettingsServiceGTK.h
@@ -12,17 +12,17 @@
 namespace mozilla {
 namespace embedding {
 class PrintData;
 }  // namespace embedding
 }  // namespace mozilla
 
 class nsPrintSettingsServiceGTK final : public nsPrintSettingsService {
  public:
-  nsPrintSettingsServiceGTK() {}
+  nsPrintSettingsServiceGTK() = default;
 
   NS_IMETHODIMP SerializeToPrintData(
       nsIPrintSettings* aSettings,
       mozilla::embedding::PrintData* data) override;
 
   NS_IMETHODIMP DeserializeToPrintSettings(
       const mozilla::embedding::PrintData& data,
       nsIPrintSettings* settings) override;
--- a/widget/gtk/nsSound.cpp
+++ b/widget/gtk/nsSound.cpp
@@ -139,17 +139,17 @@ static void ca_finish_cb(ca_context* c, 
   }
 }
 
 NS_IMPL_ISUPPORTS(nsSound, nsISound, nsIStreamLoaderObserver)
 
 ////////////////////////////////////////////////////////////////////////
 nsSound::nsSound() { mInited = false; }
 
-nsSound::~nsSound() {}
+nsSound::~nsSound() = default;
 
 NS_IMETHODIMP
 nsSound::Init() {
   // This function is designed so that no library is compulsory, and
   // one library missing doesn't cause the other(s) to not be used.
   if (mInited) return NS_OK;
 
   mInited = true;
--- a/widget/headless/HeadlessClipboard.h
+++ b/widget/headless/HeadlessClipboard.h
@@ -16,17 +16,17 @@ namespace widget {
 class HeadlessClipboard final : public nsIClipboard {
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICLIPBOARD
 
   HeadlessClipboard();
 
  protected:
-  ~HeadlessClipboard() {}
+  ~HeadlessClipboard() = default;
 
  private:
   UniquePtr<HeadlessClipboardData> mClipboard;
 };
 
 }  // namespace widget
 }  // namespace mozilla
 
--- a/widget/headless/HeadlessLookAndFeelGTK.cpp
+++ b/widget/headless/HeadlessLookAndFeelGTK.cpp
@@ -10,19 +10,19 @@
 
 using mozilla::LookAndFeel;
 
 namespace mozilla {
 namespace widget {
 
 static const char16_t UNICODE_BULLET = 0x2022;
 
-HeadlessLookAndFeel::HeadlessLookAndFeel() {}
+HeadlessLookAndFeel::HeadlessLookAndFeel() = default;
 
-HeadlessLookAndFeel::~HeadlessLookAndFeel() {}
+HeadlessLookAndFeel::~HeadlessLookAndFeel() = default;
 
 nsresult HeadlessLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) {
   // For headless mode, we use GetStandinForNativeColor for everything we can,
   // and hardcoded values for everything else.
 
   nsresult res = NS_OK;
 
   switch (aID) {
--- a/widget/headless/HeadlessScreenHelper.h
+++ b/widget/headless/HeadlessScreenHelper.h
@@ -10,17 +10,17 @@
 #include "mozilla/widget/ScreenManager.h"
 
 namespace mozilla {
 namespace widget {
 
 class HeadlessScreenHelper final : public ScreenManager::Helper {
  public:
   HeadlessScreenHelper();
-  ~HeadlessScreenHelper() override{};
+  ~HeadlessScreenHelper() override = default;
 
  private:
   static LayoutDeviceIntRect GetScreenRect();
 };
 
 }  // namespace widget
 }  // namespace mozilla
 
--- a/widget/headless/HeadlessSound.cpp
+++ b/widget/headless/HeadlessSound.cpp
@@ -6,19 +6,19 @@
 
 #include "HeadlessSound.h"
 
 namespace mozilla {
 namespace widget {
 
 NS_IMPL_ISUPPORTS(HeadlessSound, nsISound, nsIStreamLoaderObserver)
 
-HeadlessSound::HeadlessSound() {}
+HeadlessSound::HeadlessSound() = default;
 
-HeadlessSound::~HeadlessSound() {}
+HeadlessSound::~HeadlessSound() = default;
 
 NS_IMETHODIMP
 HeadlessSound::Init() { return NS_OK; }
 
 NS_IMETHODIMP HeadlessSound::OnStreamComplete(nsIStreamLoader* aLoader,
                                               nsISupports* context,
                                               nsresult aStatus,
                                               uint32_t dataLen,
--- a/widget/headless/HeadlessThemeGTK.h
+++ b/widget/headless/HeadlessThemeGTK.h
@@ -47,15 +47,15 @@ class HeadlessThemeGTK final : private n
   NS_IMETHOD_(bool) WidgetIsContainer(StyleAppearance aAppearance) override;
 
   NS_IMETHOD_(bool)
   ThemeDrawsFocusForWidget(StyleAppearance aAppearance) override;
 
   virtual bool ThemeNeedsComboboxDropmarker() override;
 
  protected:
-  virtual ~HeadlessThemeGTK() {}
+  virtual ~HeadlessThemeGTK() = default;
 };
 
 }  // namespace widget
 }  // namespace mozilla
 
 #endif  // mozilla_widget_HeadlessThemeGTK_h
--- a/widget/nsBaseAppShell.cpp
+++ b/widget/nsBaseAppShell.cpp
@@ -30,17 +30,17 @@ nsBaseAppShell::nsBaseAppShell()
       mSwitchTime(0),
       mLastNativeEventTime(0),
       mEventloopNestingState(eEventloopNone),
       mRunning(false),
       mExiting(false),
       mBlockNativeEvent(false),
       mProcessedGeckoEvents(false) {}
 
-nsBaseAppShell::~nsBaseAppShell() {}
+nsBaseAppShell::~nsBaseAppShell() = default;
 
 nsresult nsBaseAppShell::Init() {
   // Configure ourselves as an observer for the current thread:
 
   if (XRE_UseNativeEventProcessing()) {
     nsCOMPtr<nsIThreadInternal> threadInt =
         do_QueryInterface(NS_GetCurrentThread());
     NS_ENSURE_STATE(threadInt);
--- a/widget/nsBaseFilePicker.cpp
+++ b/widget/nsBaseFilePicker.cpp
@@ -139,17 +139,17 @@ class nsBaseFilePickerEnumerator : publi
   nsCOMPtr<nsISimpleEnumerator> mIterator;
   nsCOMPtr<nsPIDOMWindowInner> mParent;
   int16_t mMode;
 };
 
 nsBaseFilePicker::nsBaseFilePicker()
     : mAddToRecentDocs(true), mMode(nsIFilePicker::modeOpen) {}
 
-nsBaseFilePicker::~nsBaseFilePicker() {}
+nsBaseFilePicker::~nsBaseFilePicker() = default;
 
 NS_IMETHODIMP nsBaseFilePicker::Init(mozIDOMWindowProxy* aParent,
                                      const nsAString& aTitle, int16_t aMode) {
   MOZ_ASSERT(aParent,
              "Null parent passed to filepicker, no file "
              "picker for you!");
 
   mParent = nsPIDOMWindowOuter::From(aParent);
--- a/widget/nsBaseScreen.cpp
+++ b/widget/nsBaseScreen.cpp
@@ -6,19 +6,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #define MOZ_FATAL_ASSERTIONS_FOR_THREAD_SAFETY
 
 #include "nsBaseScreen.h"
 
 NS_IMPL_ISUPPORTS(nsBaseScreen, nsIScreen)
 
-nsBaseScreen::nsBaseScreen() {}
+nsBaseScreen::nsBaseScreen() = default;
 
-nsBaseScreen::~nsBaseScreen() {}
+nsBaseScreen::~nsBaseScreen() = default;
 
 NS_IMETHODIMP
 nsBaseScreen::GetRectDisplayPix(int32_t* outLeft, int32_t* outTop,
                                 int32_t* outWidth, int32_t* outHeight) {
   return GetRect(outLeft, outTop, outWidth, outHeight);
 }
 
 NS_IMETHODIMP
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -3154,17 +3154,17 @@ static void debug_SetCachedBoolPref(cons
     }
   }
 
   NS_ASSERTION(false, "cmon, this code is not reached dude.");
 }
 
 //////////////////////////////////////////////////////////////
 class Debug_PrefObserver final : public nsIObserver {
-  ~Debug_PrefObserver() {}
+  ~Debug_PrefObserver() = default;
 
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
 };
 
 NS_IMPL_ISUPPORTS(Debug_PrefObserver, nsIObserver)
 
--- a/widget/nsClipboardHelper.cpp
+++ b/widget/nsClipboardHelper.cpp
@@ -18,17 +18,17 @@
 #include "nsReadableUtils.h"
 
 NS_IMPL_ISUPPORTS(nsClipboardHelper, nsIClipboardHelper)
 
 /*****************************************************************************
  * nsClipboardHelper ctor / dtor
  *****************************************************************************/
 
-nsClipboardHelper::nsClipboardHelper() {}
+nsClipboardHelper::nsClipboardHelper() = default;
 
 nsClipboardHelper::~nsClipboardHelper() {
   // no members, nothing to destroy
 }
 
 /*****************************************************************************
  * nsIClipboardHelper methods
  *****************************************************************************/
--- a/widget/nsClipboardProxy.h
+++ b/widget/nsClipboardProxy.h
@@ -35,14 +35,14 @@ class nsClipboardProxy final : public ns
   NS_DECL_NSICLIPBOARD
 
   nsClipboardProxy();
 
   virtual void SetCapabilities(
       const ClipboardCapabilities& aClipboardCaps) override;
 
  private:
-  ~nsClipboardProxy() {}
+  ~nsClipboardProxy() = default;
 
   ClipboardCapabilities mClipboardCaps;
 };
 
 #endif
--- a/widget/nsColorPickerProxy.h
+++ b/widget/nsColorPickerProxy.h
@@ -11,23 +11,23 @@
 #include "mozilla/dom/PColorPickerChild.h"
 
 class nsColorPickerProxy final : public nsIColorPicker,
                                  public mozilla::dom::PColorPickerChild {
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICOLORPICKER
 
-  nsColorPickerProxy() {}
+  nsColorPickerProxy() = default;
 
   virtual mozilla::ipc::IPCResult RecvUpdate(const nsString& aColor) override;
   virtual mozilla::ipc::IPCResult Recv__delete__(
       const nsString& aColor) override;
 
  private:
-  ~nsColorPickerProxy() {}
+  ~nsColorPickerProxy() = default;
 
   nsCOMPtr<nsIColorPickerShownCallback> mCallback;
   nsString mTitle;
   nsString mInitialColor;
 };
 
 #endif  // nsColorPickerProxy_h
--- a/widget/nsDeviceContextSpecProxy.h
+++ b/widget/nsDeviceContextSpecProxy.h
@@ -48,17 +48,17 @@ class nsDeviceContextSpecProxy final : p
 
   NS_IMETHOD AbortDocument() final;
 
   NS_IMETHOD BeginPage() final;
 
   NS_IMETHOD EndPage() final;
 
  private:
-  ~nsDeviceContextSpecProxy() {}
+  ~nsDeviceContextSpecProxy() = default;
 
   nsCOMPtr<nsIPrintSettings> mPrintSettings;
   nsCOMPtr<nsIPrintSession> mPrintSession;
   nsCOMPtr<nsIDeviceContextSpec> mRealDeviceContextSpec;
   RefPtr<mozilla::layout::RemotePrintJobChild> mRemotePrintJob;
   RefPtr<mozilla::layout::DrawEventRecorderPRFileDesc> mRecorder;
 };
 
--- a/widget/nsDragServiceProxy.cpp
+++ b/widget/nsDragServiceProxy.cpp
@@ -16,19 +16,19 @@ using mozilla::CSSIntRegion;
 using mozilla::LayoutDeviceIntRect;
 using mozilla::Maybe;
 using mozilla::dom::BrowserChild;
 using mozilla::gfx::DataSourceSurface;
 using mozilla::gfx::SourceSurface;
 using mozilla::gfx::SurfaceFormat;
 using mozilla::ipc::Shmem;
 
-nsDragServiceProxy::nsDragServiceProxy() {}
+nsDragServiceProxy::nsDragServiceProxy() = default;
 
-nsDragServiceProxy::~nsDragServiceProxy() {}
+nsDragServiceProxy::~nsDragServiceProxy() = default;
 
 nsresult nsDragServiceProxy::InvokeDragSessionImpl(
     nsIArray* aArrayTransferables, const Maybe<CSSIntRegion>& aRegion,
     uint32_t aActionType) {
   NS_ENSURE_STATE(mSourceDocument->GetDocShell());
   BrowserChild* child = BrowserChild::GetFrom(mSourceDocument->GetDocShell());
   NS_ENSURE_STATE(child);
   nsTArray<mozilla::dom::IPCDataTransfer> dataTransfers;
--- a/widget/nsFilePickerProxy.cpp
+++ b/widget/nsFilePickerProxy.cpp
@@ -15,17 +15,17 @@
 
 using namespace mozilla::dom;
 
 NS_IMPL_ISUPPORTS(nsFilePickerProxy, nsIFilePicker)
 
 nsFilePickerProxy::nsFilePickerProxy()
     : mSelectedType(0), mCapture(captureNone), mIPCActive(false) {}
 
-nsFilePickerProxy::~nsFilePickerProxy() {}
+nsFilePickerProxy::~nsFilePickerProxy() = default;
 
 NS_IMETHODIMP
 nsFilePickerProxy::Init(mozIDOMWindowProxy* aParent, const nsAString& aTitle,
                         int16_t aMode) {
   BrowserChild* browserChild = BrowserChild::GetFrom(aParent);
   if (!browserChild) {
     return NS_ERROR_FAILURE;
   }
--- a/widget/nsHTMLFormatConverter.cpp
+++ b/widget/nsHTMLFormatConverter.cpp
@@ -11,19 +11,19 @@
 #include "nsXPCOM.h"
 #include "nsISupportsPrimitives.h"
 
 // HTML convertor stuff
 #include "nsPrimitiveHelpers.h"
 #include "nsIDocumentEncoder.h"
 #include "nsContentUtils.h"
 
-nsHTMLFormatConverter::nsHTMLFormatConverter() {}
+nsHTMLFormatConverter::nsHTMLFormatConverter() = default;
 
-nsHTMLFormatConverter::~nsHTMLFormatConverter() {}
+nsHTMLFormatConverter::~nsHTMLFormatConverter() = default;
 
 NS_IMPL_ISUPPORTS(nsHTMLFormatConverter, nsIFormatConverter)
 
 //
 // GetInputDataFlavors
 //
 // Creates a new list and returns the list of all the flavors this converter
 // knows how to import. In this case, it's just HTML.
--- a/widget/nsIdleService.h
+++ b/widget/nsIdleService.h
@@ -25,17 +25,17 @@
 class IdleListener {
  public:
   nsCOMPtr<nsIObserver> observer;
   uint32_t reqIdleTime;
   bool isIdle;
 
   IdleListener(nsIObserver* obs, uint32_t reqIT, bool aIsIdle = false)
       : observer(obs), reqIdleTime(reqIT), isIdle(aIsIdle) {}
-  ~IdleListener() {}
+  ~IdleListener() = default;
 };
 
 // This one will be declared later.
 class nsIdleService;
 
 /**
  * Class to handle the daily idle timer.
  */
--- a/widget/nsNativeTheme.h
+++ b/widget/nsNativeTheme.h
@@ -27,17 +27,17 @@ class nsPresContext;
 namespace mozilla {
 class ComputedStyle;
 enum class StyleAppearance : uint8_t;
 class EventStates;
 }  // namespace mozilla
 
 class nsNativeTheme : public nsITimerCallback, public nsINamed {
  protected:
-  virtual ~nsNativeTheme() {}
+  virtual ~nsNativeTheme() = default;
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSITIMERCALLBACK
   NS_DECL_NSINAMED
 
   enum ScrollbarButtonType {
     eScrollbarButton_UpTop = 0,
     eScrollbarButton_Down = 1 << 0,
--- a/widget/nsPrintSession.cpp
+++ b/widget/nsPrintSession.cpp
@@ -11,20 +11,20 @@ typedef mozilla::layout::RemotePrintJobC
 
 //*****************************************************************************
 //***    nsPrintSession
 //*****************************************************************************
 
 NS_IMPL_ISUPPORTS(nsPrintSession, nsIPrintSession, nsISupportsWeakReference)
 
 //-----------------------------------------------------------------------------
-nsPrintSession::nsPrintSession() {}
+nsPrintSession::nsPrintSession() = default;
 
 //-----------------------------------------------------------------------------
-nsPrintSession::~nsPrintSession() {}
+nsPrintSession::~nsPrintSession() = default;
 
 //-----------------------------------------------------------------------------
 nsresult nsPrintSession::Init() { return NS_OK; }
 
 RemotePrintJobChild* nsPrintSession::GetRemotePrintJob() {
   return mRemotePrintJob;
 }
 
--- a/widget/nsPrintSettingsImpl.cpp
+++ b/widget/nsPrintSettingsImpl.cpp
@@ -53,17 +53,17 @@ nsPrintSettings::nsPrintSettings()
 
   mFooterStrs[0].AssignLiteral(
       "&PT");  // Use &P (Page Num Only) or &PT (Page Num of Page Total)
   mFooterStrs[2].AssignLiteral("&D");
 }
 
 nsPrintSettings::nsPrintSettings(const nsPrintSettings& aPS) { *this = aPS; }
 
-nsPrintSettings::~nsPrintSettings() {}
+nsPrintSettings::~nsPrintSettings() = default;
 
 NS_IMETHODIMP nsPrintSettings::GetPrintSession(
     nsIPrintSession** aPrintSession) {
   NS_ENSURE_ARG_POINTER(aPrintSession);
   *aPrintSession = nullptr;
 
   nsCOMPtr<nsIPrintSession> session = do_QueryReferent(mSession);
   if (!session) return NS_ERROR_NOT_INITIALIZED;
--- a/widget/nsPrintSettingsService.h
+++ b/widget/nsPrintSettingsService.h
@@ -18,33 +18,33 @@
  * Class nsPrintSettingsService.  Base class for the platform specific widget
  * subclasses to inherit from.
  */
 class nsPrintSettingsService : public nsIPrintSettingsService {
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIPRINTSETTINGSSERVICE
 
-  nsPrintSettingsService() {}
+  nsPrintSettingsService() = default;
 
   /**
    * method Init
    *  Initializes member variables. Every consumer that does manual
    *  creation (instead of do_CreateInstance) needs to call this method
    *  immediately after instantiation.
    */
   virtual nsresult Init();
 
  private:
   // Copying is not supported.
   nsPrintSettingsService(const nsPrintSettingsService& x) = delete;
   nsPrintSettingsService& operator=(const nsPrintSettingsService& x) = delete;
 
  protected:
-  virtual ~nsPrintSettingsService() {}
+  virtual ~nsPrintSettingsService() = default;
 
   void ReadBitFieldPref(const char* aPrefId, int32_t anOption);
   void WriteBitFieldPref(const char* aPrefId, int32_t anOption);
   void ReadJustification(const char* aPrefId, int16_t& aJust,
                          int16_t aInitValue);
   void WriteJustification(const char* aPrefId, int16_t aJust);
   void ReadInchesToTwipsPref(const char* aPrefId, int32_t& aTwips,
                              const char* aMarginPref);
--- a/widget/nsTransferable.cpp
+++ b/widget/nsTransferable.cpp
@@ -182,17 +182,17 @@ nsTransferable::nsTransferable()
 {
 }
 
 //-------------------------------------------------------------------------
 //
 // Transferable destructor
 //
 //-------------------------------------------------------------------------
-nsTransferable::~nsTransferable() {}
+nsTransferable::~nsTransferable() = default;
 
 NS_IMETHODIMP
 nsTransferable::Init(nsILoadContext* aContext) {
   MOZ_ASSERT(!mInitialized);
 
   if (aContext) {
     mPrivateData = aContext->UsePrivateBrowsing();
   }