Bug 1613985 - Use default for equivalent-to-default constructors/destructors in widget. r=jmathies

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Simon Giesecke 2020-03-16 10:56:57 +00:00
parent ec26b3fc27
commit cb0734d274
58 changed files with 79 additions and 86 deletions

View file

@ -1067,7 +1067,7 @@ class WidgetGUIEvent : public WidgetEvent {
EventClassID aEventClassID) EventClassID aEventClassID)
: WidgetEvent(aIsTrusted, aMessage, aEventClassID), mWidget(aWidget) {} : WidgetEvent(aIsTrusted, aMessage, aEventClassID), mWidget(aWidget) {}
WidgetGUIEvent() {} WidgetGUIEvent() = default;
public: public:
virtual WidgetGUIEvent* AsGUIEvent() override { return this; } virtual WidgetGUIEvent* AsGUIEvent() override { return this; }

View file

@ -13,7 +13,7 @@ namespace widget {
CompositorWidget::CompositorWidget(const layers::CompositorOptions& aOptions) CompositorWidget::CompositorWidget(const layers::CompositorOptions& aOptions)
: mOptions(aOptions) {} : mOptions(aOptions) {}
CompositorWidget::~CompositorWidget() {} CompositorWidget::~CompositorWidget() = default;
already_AddRefed<gfx::DrawTarget> CompositorWidget::StartRemoteDrawing() { already_AddRefed<gfx::DrawTarget> CompositorWidget::StartRemoteDrawing() {
return nullptr; return nullptr;

View file

@ -46,7 +46,7 @@ class GetRectText : public nsAutoCString {
AppendInt(aRect.Height()); AppendInt(aRect.Height());
AppendLiteral(" }"); AppendLiteral(" }");
} }
virtual ~GetRectText() {} virtual ~GetRectText() = default;
}; };
class GetWritingModeName : public nsAutoCString { class GetWritingModeName : public nsAutoCString {
@ -62,7 +62,7 @@ class GetWritingModeName : public nsAutoCString {
} }
AssignLiteral("Vertical (RTL)"); AssignLiteral("Vertical (RTL)");
} }
virtual ~GetWritingModeName() {} virtual ~GetWritingModeName() = default;
}; };
class GetEscapedUTF8String final : public NS_ConvertUTF16toUTF8 { class GetEscapedUTF8String final : public NS_ConvertUTF16toUTF8 {

View file

@ -47,10 +47,10 @@ bool GfxInfoBase::sShutdownOccurred;
// Observes for shutdown so that the child GfxDriverInfo list is freed. // Observes for shutdown so that the child GfxDriverInfo list is freed.
class ShutdownObserver : public nsIObserver { class ShutdownObserver : public nsIObserver {
virtual ~ShutdownObserver() {} virtual ~ShutdownObserver() = default;
public: public:
ShutdownObserver() {} ShutdownObserver() = default;
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
@ -629,7 +629,7 @@ GfxInfoBase::Observe(nsISupports* aSubject, const char* aTopic,
GfxInfoBase::GfxInfoBase() : mScreenPixels(INT64_MAX), mMutex("GfxInfoBase") {} GfxInfoBase::GfxInfoBase() : mScreenPixels(INT64_MAX), mMutex("GfxInfoBase") {}
GfxInfoBase::~GfxInfoBase() {} GfxInfoBase::~GfxInfoBase() = default;
nsresult GfxInfoBase::Init() { nsresult GfxInfoBase::Init() {
InitGfxDriverInfoShutdownObserver(); InitGfxDriverInfoShutdownObserver();

View file

@ -61,7 +61,7 @@ class GfxInfo final : public GfxInfoBase {
#endif #endif
protected: protected:
~GfxInfo() {} ~GfxInfo() = default;
virtual nsresult GetFeatureStatusImpl( virtual nsresult GetFeatureStatusImpl(
int32_t aFeature, int32_t* aStatus, nsAString& aSuggestedDriverVersion, int32_t aFeature, int32_t* aStatus, nsAString& aSuggestedDriverVersion,

View file

@ -20,7 +20,7 @@ namespace mozilla {
using namespace dom; using namespace dom;
InputData::~InputData() {} InputData::~InputData() = default;
InputData::InputData(InputType aInputType) InputData::InputData(InputType aInputType)
: mInputType(aInputType), : mInputType(aInputType),

View file

@ -28,7 +28,7 @@ class WidgetPointerEventHolder final {
NS_INLINE_DECL_REFCOUNTING(WidgetPointerEventHolder) NS_INLINE_DECL_REFCOUNTING(WidgetPointerEventHolder)
private: private:
virtual ~WidgetPointerEventHolder() {} virtual ~WidgetPointerEventHolder() = default;
}; };
/****************************************************************************** /******************************************************************************
@ -62,14 +62,7 @@ class WidgetPointerHelper {
tangentialPressure(aTangentialPressure), tangentialPressure(aTangentialPressure),
convertToPointer(true) {} convertToPointer(true) {}
explicit WidgetPointerHelper(const WidgetPointerHelper& aHelper) explicit WidgetPointerHelper(const WidgetPointerHelper& aHelper) = default;
: pointerId(aHelper.pointerId),
tiltX(aHelper.tiltX),
tiltY(aHelper.tiltY),
twist(aHelper.twist),
tangentialPressure(aHelper.tangentialPressure),
convertToPointer(aHelper.convertToPointer),
mCoalescedWidgetEvents(aHelper.mCoalescedWidgetEvents) {}
void AssignPointerHelperData(const WidgetPointerHelper& aEvent, void AssignPointerHelperData(const WidgetPointerHelper& aEvent,
bool aCopyCoalescedEvents = false) { bool aCopyCoalescedEvents = false) {

View file

@ -15,7 +15,7 @@ NS_IMPL_ISUPPORTS(PuppetBidiKeyboard, nsIBidiKeyboard)
PuppetBidiKeyboard::PuppetBidiKeyboard() PuppetBidiKeyboard::PuppetBidiKeyboard()
: nsIBidiKeyboard(), mIsLangRTL(false), mHaveBidiKeyboards(false) {} : nsIBidiKeyboard(), mIsLangRTL(false), mHaveBidiKeyboards(false) {}
PuppetBidiKeyboard::~PuppetBidiKeyboard() {} PuppetBidiKeyboard::~PuppetBidiKeyboard() = default;
NS_IMETHODIMP NS_IMETHODIMP
PuppetBidiKeyboard::Reset() { return NS_OK; } PuppetBidiKeyboard::Reset() { return NS_OK; }

View file

@ -1185,7 +1185,7 @@ void PuppetWidget::StartAsyncScrollbarDrag(
PuppetScreen::PuppetScreen(void* nativeScreen) {} PuppetScreen::PuppetScreen(void* nativeScreen) {}
PuppetScreen::~PuppetScreen() {} PuppetScreen::~PuppetScreen() = default;
static ScreenConfiguration ScreenConfig() { static ScreenConfiguration ScreenConfig() {
ScreenConfiguration config; ScreenConfiguration config;
@ -1230,7 +1230,7 @@ PuppetScreenManager::PuppetScreenManager() {
mOneScreen = new PuppetScreen(nullptr); mOneScreen = new PuppetScreen(nullptr);
} }
PuppetScreenManager::~PuppetScreenManager() {} PuppetScreenManager::~PuppetScreenManager() = default;
NS_IMETHODIMP NS_IMETHODIMP
PuppetScreenManager::GetPrimaryScreen(nsIScreen** outScreen) { PuppetScreenManager::GetPrimaryScreen(nsIScreen** outScreen) {

View file

@ -35,7 +35,7 @@ class Screen final : public nsIScreen {
mozilla::dom::ScreenDetails ToScreenDetails(); mozilla::dom::ScreenDetails ToScreenDetails();
private: private:
virtual ~Screen() {} virtual ~Screen() = default;
LayoutDeviceIntRect mRect; LayoutDeviceIntRect mRect;
LayoutDeviceIntRect mAvailRect; LayoutDeviceIntRect mAvailRect;

View file

@ -23,9 +23,9 @@ namespace mozilla::widget {
NS_IMPL_ISUPPORTS(ScreenManager, nsIScreenManager) NS_IMPL_ISUPPORTS(ScreenManager, nsIScreenManager)
ScreenManager::ScreenManager() {} ScreenManager::ScreenManager() = default;
ScreenManager::~ScreenManager() {} ScreenManager::~ScreenManager() = default;
static StaticRefPtr<ScreenManager> sSingleton; static StaticRefPtr<ScreenManager> sSingleton;

View file

@ -28,7 +28,7 @@ class ScreenManager final : public nsIScreenManager {
public: public:
class Helper { class Helper {
public: public:
virtual ~Helper() {} virtual ~Helper() = default;
}; };
public: public:

View file

@ -32,7 +32,7 @@ class PuppetWidget;
*/ */
class TextEventDispatcher final { class TextEventDispatcher final {
~TextEventDispatcher() {} ~TextEventDispatcher() = default;
NS_INLINE_DECL_REFCOUNTING(TextEventDispatcher) NS_INLINE_DECL_REFCOUNTING(TextEventDispatcher)

View file

@ -184,7 +184,7 @@ struct TextRange {
class TextRangeArray final : public AutoTArray<TextRange, 10> { class TextRangeArray final : public AutoTArray<TextRange, 10> {
friend class WidgetCompositionEvent; friend class WidgetCompositionEvent;
~TextRangeArray() {} ~TextRangeArray() = default;
NS_INLINE_DECL_REFCOUNTING(TextRangeArray) NS_INLINE_DECL_REFCOUNTING(TextRangeArray)

View file

@ -27,8 +27,8 @@ class VsyncObserver {
virtual bool NotifyVsync(const VsyncEvent& aVsync) = 0; virtual bool NotifyVsync(const VsyncEvent& aVsync) = 0;
protected: protected:
VsyncObserver() {} VsyncObserver() = default;
virtual ~VsyncObserver() {} virtual ~VsyncObserver() = default;
}; // VsyncObserver }; // VsyncObserver
// Used to dispatch vsync events in the parent process to compositors. // Used to dispatch vsync events in the parent process to compositors.

View file

@ -16,7 +16,7 @@ namespace widget {
// A class for drawing to double-buffered windows. // A class for drawing to double-buffered windows.
class WindowSurface { class WindowSurface {
public: public:
virtual ~WindowSurface() {} virtual ~WindowSurface() = default;
// Locks a region of the window for drawing, returning a draw target // Locks a region of the window for drawing, returning a draw target
// capturing the bounds of the provided region. // capturing the bounds of the provided region.

View file

@ -19,7 +19,7 @@ CompositorWidgetChild::CompositorWidgetChild(
MOZ_ASSERT(!gfxPlatform::IsHeadless()); MOZ_ASSERT(!gfxPlatform::IsHeadless());
} }
CompositorWidgetChild::~CompositorWidgetChild() {} CompositorWidgetChild::~CompositorWidgetChild() = default;
bool CompositorWidgetChild::Initialize() { return true; } bool CompositorWidgetChild::Initialize() { return true; }

View file

@ -18,7 +18,7 @@ CompositorWidgetParent::CompositorWidgetParent(
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_GPU); MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_GPU);
} }
CompositorWidgetParent::~CompositorWidgetParent() {} CompositorWidgetParent::~CompositorWidgetParent() = default;
void CompositorWidgetParent::ObserveVsync(VsyncObserver* aObserver) { void CompositorWidgetParent::ObserveVsync(VsyncObserver* aObserver) {
if (aObserver) { if (aObserver) {

View file

@ -131,7 +131,7 @@ class GetWritingModeName : public nsAutoCString {
} }
AssignLiteral("Vertical (RTL)"); AssignLiteral("Vertical (RTL)");
} }
virtual ~GetWritingModeName() {} virtual ~GetWritingModeName() = default;
}; };
class GetTextRangeStyleText final : public nsAutoCString { class GetTextRangeStyleText final : public nsAutoCString {
@ -201,7 +201,7 @@ class GetTextRangeStyleText final : public nsAutoCString {
AppendPrintf("{ R=0x%02X, G=0x%02X, B=0x%02X, A=0x%02X }", NS_GET_R(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)); NS_GET_G(aColor), NS_GET_B(aColor), NS_GET_A(aColor));
} }
virtual ~GetTextRangeStyleText(){}; virtual ~GetTextRangeStyleText() = default;
}; };
const static bool kUseSimpleContextDefault = false; const static bool kUseSimpleContextDefault = false;

View file

@ -444,7 +444,7 @@ WindowBackBufferDMABuf::WindowBackBufferDMABuf(
(void*)this, aWidth, aHeight)); (void*)this, aWidth, aHeight));
} }
WindowBackBufferDMABuf::~WindowBackBufferDMABuf() {} WindowBackBufferDMABuf::~WindowBackBufferDMABuf() = default;
already_AddRefed<gfx::DrawTarget> WindowBackBufferDMABuf::Lock() { already_AddRefed<gfx::DrawTarget> WindowBackBufferDMABuf::Lock() {
LOGWAYLAND( LOGWAYLAND(

View file

@ -81,7 +81,7 @@ class WindowBackBuffer {
WindowBackBuffer(WindowSurfaceWayland* aWindowSurfaceWayland) WindowBackBuffer(WindowSurfaceWayland* aWindowSurfaceWayland)
: mWindowSurfaceWayland(aWindowSurfaceWayland){}; : mWindowSurfaceWayland(aWindowSurfaceWayland){};
virtual ~WindowBackBuffer(){}; virtual ~WindowBackBuffer() = default;
protected: protected:
WindowSurfaceWayland* mWindowSurfaceWayland; WindowSurfaceWayland* mWindowSurfaceWayland;

View file

@ -20,9 +20,9 @@ using namespace mozilla;
NS_IMPL_ISUPPORTS(nsApplicationChooser, nsIApplicationChooser) NS_IMPL_ISUPPORTS(nsApplicationChooser, nsIApplicationChooser)
nsApplicationChooser::nsApplicationChooser() {} nsApplicationChooser::nsApplicationChooser() = default;
nsApplicationChooser::~nsApplicationChooser() {} nsApplicationChooser::~nsApplicationChooser() = default;
NS_IMETHODIMP NS_IMETHODIMP
nsApplicationChooser::Init(mozIDOMWindowProxy* aParent, nsApplicationChooser::Init(mozIDOMWindowProxy* aParent,

View file

@ -29,7 +29,7 @@ nsBidiKeyboard::Reset() {
return NS_OK; return NS_OK;
} }
nsBidiKeyboard::~nsBidiKeyboard() {} nsBidiKeyboard::~nsBidiKeyboard() = default;
NS_IMETHODIMP NS_IMETHODIMP
nsBidiKeyboard::IsLangRTL(bool* aIsRTL) { nsBidiKeyboard::IsLangRTL(bool* aIsRTL) {

View file

@ -74,7 +74,7 @@ int GetGeckoClipboardType(GtkClipboard* aGtkClipboard) {
return -1; // THAT AIN'T NO CLIPBOARD I EVER HEARD OF return -1; // THAT AIN'T NO CLIPBOARD I EVER HEARD OF
} }
nsClipboard::nsClipboard() {} nsClipboard::nsClipboard() = default;
nsClipboard::~nsClipboard() { nsClipboard::~nsClipboard() {
// We have to clear clipboard before gdk_display_close() call. // We have to clear clipboard before gdk_display_close() call.

View file

@ -38,7 +38,7 @@ class nsRetrievalContext {
virtual bool HasSelectionSupport(void) = 0; virtual bool HasSelectionSupport(void) = 0;
virtual ~nsRetrievalContext(){}; virtual ~nsRetrievalContext() = default;
}; };
class nsClipboard : public nsIClipboard, public nsIObserver { class nsClipboard : public nsIClipboard, public nsIObserver {

View file

@ -29,7 +29,7 @@ class DataOffer {
char* GetData(wl_display* aDisplay, const char* aMimeType, char* GetData(wl_display* aDisplay, const char* aMimeType,
uint32_t* aContentLength); uint32_t* aContentLength);
virtual ~DataOffer(){}; virtual ~DataOffer() = default;
private: private:
virtual bool RequestDataTransfer(const char* aMimeType, int fd) = 0; virtual bool RequestDataTransfer(const char* aMimeType, int fd) = 0;
@ -98,7 +98,7 @@ class nsWaylandDragContext : public nsISupports {
char* GetData(const char* aMimeType, uint32_t* aContentLength); char* GetData(const char* aMimeType, uint32_t* aContentLength);
private: private:
virtual ~nsWaylandDragContext(){}; virtual ~nsWaylandDragContext() = default;
nsAutoPtr<WaylandDataOffer> mDataOffer; nsAutoPtr<WaylandDataOffer> mDataOffer;
wl_display* mDisplay; wl_display* mDisplay;

View file

@ -24,10 +24,10 @@ class nsColorPicker final : public nsIColorPicker {
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_DECL_NSICOLORPICKER NS_DECL_NSICOLORPICKER
nsColorPicker(){}; nsColorPicker() = default;
private: private:
~nsColorPicker(){}; ~nsColorPicker() = default;
static nsString ToHexString(int n); static nsString ToHexString(int n);

View file

@ -71,7 +71,7 @@ class GlobalPrinters {
void GetDefaultPrinterName(nsAString& aDefaultPrinterName); void GetDefaultPrinterName(nsAString& aDefaultPrinterName);
protected: protected:
GlobalPrinters() {} GlobalPrinters() = default;
static GlobalPrinters mGlobalPrinters; static GlobalPrinters mGlobalPrinters;
static nsTArray<nsString>* mGlobalPrinterList; static nsTArray<nsString>* mGlobalPrinterList;
@ -370,7 +370,7 @@ NS_IMETHODIMP nsDeviceContextSpecGTK::EndDocument() {
} }
// Printer Enumerator // Printer Enumerator
nsPrinterEnumeratorGTK::nsPrinterEnumeratorGTK() {} nsPrinterEnumeratorGTK::nsPrinterEnumeratorGTK() = default;
NS_IMPL_ISUPPORTS(nsPrinterEnumeratorGTK, nsIPrinterEnumerator) NS_IMPL_ISUPPORTS(nsPrinterEnumeratorGTK, nsIPrinterEnumerator)

View file

@ -62,7 +62,7 @@ class nsDeviceContextSpecGTK : public nsIDeviceContextSpec {
// Printer Enumerator // Printer Enumerator
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
class nsPrinterEnumeratorGTK final : public nsIPrinterEnumerator { class nsPrinterEnumeratorGTK final : public nsIPrinterEnumerator {
~nsPrinterEnumeratorGTK() {} ~nsPrinterEnumeratorGTK() = default;
public: public:
nsPrinterEnumeratorGTK(); nsPrinterEnumeratorGTK();

View file

@ -166,7 +166,7 @@ nsFilePicker::nsFilePicker()
giovfs->ShouldUseFlatpakPortal(&mUseNativeFileChooser); giovfs->ShouldUseFlatpakPortal(&mUseNativeFileChooser);
} }
nsFilePicker::~nsFilePicker() {} nsFilePicker::~nsFilePicker() = default;
void ReadMultipleFiles(gpointer filename, gpointer array) { void ReadMultipleFiles(gpointer filename, gpointer array) {
nsCOMPtr<nsIFile> localfile; nsCOMPtr<nsIFile> localfile;

View file

@ -33,7 +33,7 @@ class nsImageToPixbuf final : public nsIImageToPixbuf {
int32_t aWidth, int32_t aHeight); int32_t aWidth, int32_t aHeight);
private: private:
~nsImageToPixbuf() {} ~nsImageToPixbuf() = default;
}; };
// fc2389b8-c650-4093-9e42-b05e5f0685b7 // fc2389b8-c650-4093-9e42-b05e5f0685b7

View file

@ -63,7 +63,7 @@ extern mozilla::LazyLogModule gWidgetLog;
nsLookAndFeel::nsLookAndFeel() = default; nsLookAndFeel::nsLookAndFeel() = default;
nsLookAndFeel::~nsLookAndFeel() {} nsLookAndFeel::~nsLookAndFeel() = default;
// Modifies color |*aDest| as if a pattern of color |aSource| was painted with // Modifies color |*aDest| as if a pattern of color |aSource| was painted with
// CAIRO_OPERATOR_OVER to a surface with color |*aDest|. // CAIRO_OPERATOR_OVER to a surface with color |*aDest|.

View file

@ -112,7 +112,7 @@ nsNativeThemeGTK::nsNativeThemeGTK() {
ThemeChanged(); ThemeChanged();
} }
nsNativeThemeGTK::~nsNativeThemeGTK() {} nsNativeThemeGTK::~nsNativeThemeGTK() = default;
NS_IMETHODIMP NS_IMETHODIMP
nsNativeThemeGTK::Observe(nsISupports* aSubject, const char* aTopic, nsNativeThemeGTK::Observe(nsISupports* aSubject, const char* aTopic,

View file

@ -485,9 +485,9 @@ GtkWidget* nsPrintDialogWidgetGTK::ConstructHeaderFooterDropdown(
NS_IMPL_ISUPPORTS(nsPrintDialogServiceGTK, nsIPrintDialogService) NS_IMPL_ISUPPORTS(nsPrintDialogServiceGTK, nsIPrintDialogService)
nsPrintDialogServiceGTK::nsPrintDialogServiceGTK() {} nsPrintDialogServiceGTK::nsPrintDialogServiceGTK() = default;
nsPrintDialogServiceGTK::~nsPrintDialogServiceGTK() {} nsPrintDialogServiceGTK::~nsPrintDialogServiceGTK() = default;
NS_IMETHODIMP NS_IMETHODIMP
nsPrintDialogServiceGTK::Init() { return NS_OK; } nsPrintDialogServiceGTK::Init() { return NS_OK; }

View file

@ -17,7 +17,7 @@ class PrintData;
class nsPrintSettingsServiceGTK final : public nsPrintSettingsService { class nsPrintSettingsServiceGTK final : public nsPrintSettingsService {
public: public:
nsPrintSettingsServiceGTK() {} nsPrintSettingsServiceGTK() = default;
NS_IMETHODIMP SerializeToPrintData( NS_IMETHODIMP SerializeToPrintData(
nsIPrintSettings* aSettings, nsIPrintSettings* aSettings,

View file

@ -144,7 +144,7 @@ NS_IMPL_ISUPPORTS(nsSound, nsISound, nsIStreamLoaderObserver)
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
nsSound::nsSound() { mInited = false; } nsSound::nsSound() { mInited = false; }
nsSound::~nsSound() {} nsSound::~nsSound() = default;
NS_IMETHODIMP NS_IMETHODIMP
nsSound::Init() { nsSound::Init() {

View file

@ -21,7 +21,7 @@ class HeadlessClipboard final : public nsIClipboard {
HeadlessClipboard(); HeadlessClipboard();
protected: protected:
~HeadlessClipboard() {} ~HeadlessClipboard() = default;
private: private:
UniquePtr<HeadlessClipboardData> mClipboard; UniquePtr<HeadlessClipboardData> mClipboard;

View file

@ -15,9 +15,9 @@ namespace widget {
static const char16_t UNICODE_BULLET = 0x2022; static const char16_t UNICODE_BULLET = 0x2022;
HeadlessLookAndFeel::HeadlessLookAndFeel() {} HeadlessLookAndFeel::HeadlessLookAndFeel() = default;
HeadlessLookAndFeel::~HeadlessLookAndFeel() {} HeadlessLookAndFeel::~HeadlessLookAndFeel() = default;
nsresult HeadlessLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) { nsresult HeadlessLookAndFeel::NativeGetColor(ColorID aID, nscolor& aColor) {
// For headless mode, we use GetStandinForNativeColor for everything we can, // For headless mode, we use GetStandinForNativeColor for everything we can,

View file

@ -15,7 +15,7 @@ namespace widget {
class HeadlessScreenHelper final : public ScreenManager::Helper { class HeadlessScreenHelper final : public ScreenManager::Helper {
public: public:
HeadlessScreenHelper(); HeadlessScreenHelper();
~HeadlessScreenHelper() override{}; ~HeadlessScreenHelper() override = default;
private: private:
static LayoutDeviceIntRect GetScreenRect(); static LayoutDeviceIntRect GetScreenRect();

View file

@ -11,9 +11,9 @@ namespace widget {
NS_IMPL_ISUPPORTS(HeadlessSound, nsISound, nsIStreamLoaderObserver) NS_IMPL_ISUPPORTS(HeadlessSound, nsISound, nsIStreamLoaderObserver)
HeadlessSound::HeadlessSound() {} HeadlessSound::HeadlessSound() = default;
HeadlessSound::~HeadlessSound() {} HeadlessSound::~HeadlessSound() = default;
NS_IMETHODIMP NS_IMETHODIMP
HeadlessSound::Init() { return NS_OK; } HeadlessSound::Init() { return NS_OK; }

View file

@ -52,7 +52,7 @@ class HeadlessThemeGTK final : private nsNativeTheme, public nsITheme {
virtual bool ThemeNeedsComboboxDropmarker() override; virtual bool ThemeNeedsComboboxDropmarker() override;
protected: protected:
virtual ~HeadlessThemeGTK() {} virtual ~HeadlessThemeGTK() = default;
}; };
} // namespace widget } // namespace widget

View file

@ -35,7 +35,7 @@ nsBaseAppShell::nsBaseAppShell()
mBlockNativeEvent(false), mBlockNativeEvent(false),
mProcessedGeckoEvents(false) {} mProcessedGeckoEvents(false) {}
nsBaseAppShell::~nsBaseAppShell() {} nsBaseAppShell::~nsBaseAppShell() = default;
nsresult nsBaseAppShell::Init() { nsresult nsBaseAppShell::Init() {
// Configure ourselves as an observer for the current thread: // Configure ourselves as an observer for the current thread:

View file

@ -144,7 +144,7 @@ class nsBaseFilePickerEnumerator : public nsSimpleEnumerator {
nsBaseFilePicker::nsBaseFilePicker() nsBaseFilePicker::nsBaseFilePicker()
: mAddToRecentDocs(true), mMode(nsIFilePicker::modeOpen) {} : mAddToRecentDocs(true), mMode(nsIFilePicker::modeOpen) {}
nsBaseFilePicker::~nsBaseFilePicker() {} nsBaseFilePicker::~nsBaseFilePicker() = default;
NS_IMETHODIMP nsBaseFilePicker::Init(mozIDOMWindowProxy* aParent, NS_IMETHODIMP nsBaseFilePicker::Init(mozIDOMWindowProxy* aParent,
const nsAString& aTitle, int16_t aMode) { const nsAString& aTitle, int16_t aMode) {

View file

@ -11,9 +11,9 @@
NS_IMPL_ISUPPORTS(nsBaseScreen, nsIScreen) NS_IMPL_ISUPPORTS(nsBaseScreen, nsIScreen)
nsBaseScreen::nsBaseScreen() {} nsBaseScreen::nsBaseScreen() = default;
nsBaseScreen::~nsBaseScreen() {} nsBaseScreen::~nsBaseScreen() = default;
NS_IMETHODIMP NS_IMETHODIMP
nsBaseScreen::GetRectDisplayPix(int32_t* outLeft, int32_t* outTop, nsBaseScreen::GetRectDisplayPix(int32_t* outLeft, int32_t* outTop,

View file

@ -3159,7 +3159,7 @@ static void debug_SetCachedBoolPref(const char* aPrefName, bool aValue) {
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
class Debug_PrefObserver final : public nsIObserver { class Debug_PrefObserver final : public nsIObserver {
~Debug_PrefObserver() {} ~Debug_PrefObserver() = default;
public: public:
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS

View file

@ -23,7 +23,7 @@ NS_IMPL_ISUPPORTS(nsClipboardHelper, nsIClipboardHelper)
* nsClipboardHelper ctor / dtor * nsClipboardHelper ctor / dtor
*****************************************************************************/ *****************************************************************************/
nsClipboardHelper::nsClipboardHelper() {} nsClipboardHelper::nsClipboardHelper() = default;
nsClipboardHelper::~nsClipboardHelper() { nsClipboardHelper::~nsClipboardHelper() {
// no members, nothing to destroy // no members, nothing to destroy

View file

@ -40,7 +40,7 @@ class nsClipboardProxy final : public nsIClipboardProxy {
const ClipboardCapabilities& aClipboardCaps) override; const ClipboardCapabilities& aClipboardCaps) override;
private: private:
~nsClipboardProxy() {} ~nsClipboardProxy() = default;
ClipboardCapabilities mClipboardCaps; ClipboardCapabilities mClipboardCaps;
}; };

View file

@ -16,14 +16,14 @@ class nsColorPickerProxy final : public nsIColorPicker,
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_DECL_NSICOLORPICKER NS_DECL_NSICOLORPICKER
nsColorPickerProxy() {} nsColorPickerProxy() = default;
virtual mozilla::ipc::IPCResult RecvUpdate(const nsString& aColor) override; virtual mozilla::ipc::IPCResult RecvUpdate(const nsString& aColor) override;
virtual mozilla::ipc::IPCResult Recv__delete__( virtual mozilla::ipc::IPCResult Recv__delete__(
const nsString& aColor) override; const nsString& aColor) override;
private: private:
~nsColorPickerProxy() {} ~nsColorPickerProxy() = default;
nsCOMPtr<nsIColorPickerShownCallback> mCallback; nsCOMPtr<nsIColorPickerShownCallback> mCallback;
nsString mTitle; nsString mTitle;

View file

@ -53,7 +53,7 @@ class nsDeviceContextSpecProxy final : public nsIDeviceContextSpec {
NS_IMETHOD EndPage() final; NS_IMETHOD EndPage() final;
private: private:
~nsDeviceContextSpecProxy() {} ~nsDeviceContextSpecProxy() = default;
nsCOMPtr<nsIPrintSettings> mPrintSettings; nsCOMPtr<nsIPrintSettings> mPrintSettings;
nsCOMPtr<nsIPrintSession> mPrintSession; nsCOMPtr<nsIPrintSession> mPrintSession;

View file

@ -21,9 +21,9 @@ using mozilla::gfx::SourceSurface;
using mozilla::gfx::SurfaceFormat; using mozilla::gfx::SurfaceFormat;
using mozilla::ipc::Shmem; using mozilla::ipc::Shmem;
nsDragServiceProxy::nsDragServiceProxy() {} nsDragServiceProxy::nsDragServiceProxy() = default;
nsDragServiceProxy::~nsDragServiceProxy() {} nsDragServiceProxy::~nsDragServiceProxy() = default;
nsresult nsDragServiceProxy::InvokeDragSessionImpl( nsresult nsDragServiceProxy::InvokeDragSessionImpl(
nsIArray* aArrayTransferables, const Maybe<CSSIntRegion>& aRegion, nsIArray* aArrayTransferables, const Maybe<CSSIntRegion>& aRegion,

View file

@ -20,7 +20,7 @@ NS_IMPL_ISUPPORTS(nsFilePickerProxy, nsIFilePicker)
nsFilePickerProxy::nsFilePickerProxy() nsFilePickerProxy::nsFilePickerProxy()
: mSelectedType(0), mCapture(captureNone), mIPCActive(false) {} : mSelectedType(0), mCapture(captureNone), mIPCActive(false) {}
nsFilePickerProxy::~nsFilePickerProxy() {} nsFilePickerProxy::~nsFilePickerProxy() = default;
NS_IMETHODIMP NS_IMETHODIMP
nsFilePickerProxy::Init(mozIDOMWindowProxy* aParent, const nsAString& aTitle, nsFilePickerProxy::Init(mozIDOMWindowProxy* aParent, const nsAString& aTitle,

View file

@ -16,9 +16,9 @@
#include "nsIDocumentEncoder.h" #include "nsIDocumentEncoder.h"
#include "nsContentUtils.h" #include "nsContentUtils.h"
nsHTMLFormatConverter::nsHTMLFormatConverter() {} nsHTMLFormatConverter::nsHTMLFormatConverter() = default;
nsHTMLFormatConverter::~nsHTMLFormatConverter() {} nsHTMLFormatConverter::~nsHTMLFormatConverter() = default;
NS_IMPL_ISUPPORTS(nsHTMLFormatConverter, nsIFormatConverter) NS_IMPL_ISUPPORTS(nsHTMLFormatConverter, nsIFormatConverter)

View file

@ -30,7 +30,7 @@ class IdleListener {
IdleListener(nsIObserver* obs, uint32_t reqIT, bool aIsIdle = false) IdleListener(nsIObserver* obs, uint32_t reqIT, bool aIsIdle = false)
: observer(obs), reqIdleTime(reqIT), isIdle(aIsIdle) {} : observer(obs), reqIdleTime(reqIT), isIdle(aIsIdle) {}
~IdleListener() {} ~IdleListener() = default;
}; };
// This one will be declared later. // This one will be declared later.

View file

@ -32,7 +32,7 @@ class EventStates;
class nsNativeTheme : public nsITimerCallback, public nsINamed { class nsNativeTheme : public nsITimerCallback, public nsINamed {
protected: protected:
virtual ~nsNativeTheme() {} virtual ~nsNativeTheme() = default;
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_DECL_NSITIMERCALLBACK NS_DECL_NSITIMERCALLBACK

View file

@ -16,10 +16,10 @@ typedef mozilla::layout::RemotePrintJobChild RemotePrintJobChild;
NS_IMPL_ISUPPORTS(nsPrintSession, nsIPrintSession, nsISupportsWeakReference) NS_IMPL_ISUPPORTS(nsPrintSession, nsIPrintSession, nsISupportsWeakReference)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
nsPrintSession::nsPrintSession() {} nsPrintSession::nsPrintSession() = default;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
nsPrintSession::~nsPrintSession() {} nsPrintSession::~nsPrintSession() = default;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
nsresult nsPrintSession::Init() { return NS_OK; } nsresult nsPrintSession::Init() { return NS_OK; }

View file

@ -58,7 +58,7 @@ nsPrintSettings::nsPrintSettings()
nsPrintSettings::nsPrintSettings(const nsPrintSettings& aPS) { *this = aPS; } nsPrintSettings::nsPrintSettings(const nsPrintSettings& aPS) { *this = aPS; }
nsPrintSettings::~nsPrintSettings() {} nsPrintSettings::~nsPrintSettings() = default;
NS_IMETHODIMP nsPrintSettings::GetPrintSession( NS_IMETHODIMP nsPrintSettings::GetPrintSession(
nsIPrintSession** aPrintSession) { nsIPrintSession** aPrintSession) {

View file

@ -23,7 +23,7 @@ class nsPrintSettingsService : public nsIPrintSettingsService {
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_DECL_NSIPRINTSETTINGSSERVICE NS_DECL_NSIPRINTSETTINGSSERVICE
nsPrintSettingsService() {} nsPrintSettingsService() = default;
/** /**
* method Init * method Init
@ -39,7 +39,7 @@ class nsPrintSettingsService : public nsIPrintSettingsService {
nsPrintSettingsService& operator=(const nsPrintSettingsService& x) = delete; nsPrintSettingsService& operator=(const nsPrintSettingsService& x) = delete;
protected: protected:
virtual ~nsPrintSettingsService() {} virtual ~nsPrintSettingsService() = default;
void ReadBitFieldPref(const char* aPrefId, int32_t anOption); void ReadBitFieldPref(const char* aPrefId, int32_t anOption);
void WriteBitFieldPref(const char* aPrefId, int32_t anOption); void WriteBitFieldPref(const char* aPrefId, int32_t anOption);

View file

@ -187,7 +187,7 @@ nsTransferable::nsTransferable()
// Transferable destructor // Transferable destructor
// //
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
nsTransferable::~nsTransferable() {} nsTransferable::~nsTransferable() = default;
NS_IMETHODIMP NS_IMETHODIMP
nsTransferable::Init(nsILoadContext* aContext) { nsTransferable::Init(nsILoadContext* aContext) {