diff --git a/content/base/public/nsDeprecatedOperationList.h b/content/base/public/nsDeprecatedOperationList.h index 92f361f5110a..2d7f673fce56 100644 --- a/content/base/public/nsDeprecatedOperationList.h +++ b/content/base/public/nsDeprecatedOperationList.h @@ -30,4 +30,3 @@ DEPRECATED_OPERATION(PrefixedVisibilityAPI) DEPRECATED_OPERATION(NodeIteratorDetach) DEPRECATED_OPERATION(MozAudioData) DEPRECATED_OPERATION(LenientThis) -DEPRECATED_OPERATION(GetPreventDefault) diff --git a/content/events/src/nsDOMEvent.cpp b/content/events/src/nsDOMEvent.cpp index 1c819e3d2ca3..4ffc32485f2d 100644 --- a/content/events/src/nsDOMEvent.cpp +++ b/content/events/src/nsDOMEvent.cpp @@ -1220,17 +1220,6 @@ const char* nsDOMEvent::GetEventName(uint32_t aEventType) return nullptr; } -bool -nsDOMEvent::GetPreventDefault() const -{ - if (mOwner) { - if (nsIDocument* doc = mOwner->GetExtantDoc()) { - doc->WarnOnceAbout(nsIDocument::eGetPreventDefault); - } - } - return DefaultPrevented(); -} - NS_IMETHODIMP nsDOMEvent::GetPreventDefault(bool* aReturn) { diff --git a/content/events/src/nsDOMEvent.h b/content/events/src/nsDOMEvent.h index c525dfa0e17b..26b51b268019 100644 --- a/content/events/src/nsDOMEvent.h +++ b/content/events/src/nsDOMEvent.h @@ -189,7 +189,10 @@ public: mozilla::dom::EventTarget* GetOriginalTarget() const; mozilla::dom::EventTarget* GetExplicitOriginalTarget() const; - bool GetPreventDefault() const; + bool GetPreventDefault() const + { + return DefaultPrevented(); + } protected: diff --git a/dom/locales/en-US/chrome/dom/dom.properties b/dom/locales/en-US/chrome/dom/dom.properties index 3409fe84a745..0329f36f51ed 100644 --- a/dom/locales/en-US/chrome/dom/dom.properties +++ b/dom/locales/en-US/chrome/dom/dom.properties @@ -130,5 +130,3 @@ MozAudioDataWarning=The Mozilla Audio Data API is deprecated. Please use the We LenientThisWarning=Ignoring get or set of property that has [LenientThis] because the "this" object is incorrect. # LOCALIZATION NOTE: Do not translate "nsIDOMWindowUtils", "getWindowWithOuterId", or "nsIWindowMediator" GetWindowWithOuterIdWarning=Use of nsIDOMWindowUtils.getOuterWindowWithId() is deprecated. Instead, use the nsIWindowMediator method of the same name. -# LOCALIZATION NOTE: Do not translate "getPreventDefault" or "defaultPrevented". -GetPreventDefaultWarning=Use of getPreventDefault() is deprecated. Use defaultPrevented instead.