mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 726933 - Add a deprecation warning to getPreventDefault. r=smaug
This commit is contained in:
parent
dfdb68d68a
commit
18fd56d251
@ -30,3 +30,4 @@ DEPRECATED_OPERATION(PrefixedVisibilityAPI)
|
||||
DEPRECATED_OPERATION(NodeIteratorDetach)
|
||||
DEPRECATED_OPERATION(MozAudioData)
|
||||
DEPRECATED_OPERATION(LenientThis)
|
||||
DEPRECATED_OPERATION(GetPreventDefault)
|
||||
|
@ -1220,6 +1220,17 @@ 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)
|
||||
{
|
||||
|
@ -189,10 +189,7 @@ public:
|
||||
mozilla::dom::EventTarget* GetOriginalTarget() const;
|
||||
mozilla::dom::EventTarget* GetExplicitOriginalTarget() const;
|
||||
|
||||
bool GetPreventDefault() const
|
||||
{
|
||||
return DefaultPrevented();
|
||||
}
|
||||
bool GetPreventDefault() const;
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -130,3 +130,5 @@ 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.
|
||||
|
Loading…
Reference in New Issue
Block a user