mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-02 12:32:55 +00:00
Bug 980134 - Hide DataContainerEvent from content. r=smaug
This commit is contained in:
parent
81349dba22
commit
e65d66c52e
@ -39,3 +39,4 @@ DEPRECATED_OPERATION(UseOfDOM3LoadMethod)
|
||||
DEPRECATED_OPERATION(ShowModalDialog)
|
||||
DEPRECATED_OPERATION(Window_Content)
|
||||
DEPRECATED_OPERATION(SyncXMLHttpRequest)
|
||||
DEPRECATED_OPERATION(DataContainerEvent)
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "mozilla/dom/DataContainerEvent.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIXPConnect.h"
|
||||
|
||||
namespace mozilla {
|
||||
@ -15,6 +16,11 @@ DataContainerEvent::DataContainerEvent(EventTarget* aOwner,
|
||||
WidgetEvent* aEvent)
|
||||
: Event(aOwner, aPresContext, aEvent)
|
||||
{
|
||||
if (mOwner) {
|
||||
if (nsIDocument* doc = mOwner->GetExtantDoc()) {
|
||||
doc->WarnOnceAbout(nsIDocument::eDataContainerEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(DataContainerEvent)
|
||||
|
@ -9,6 +9,7 @@ support-files =
|
||||
|
||||
[test_bug336682.js]
|
||||
[test_bug336682_2.xul]
|
||||
[test_bug368835.html]
|
||||
[test_bug415498.xul]
|
||||
[test_bug586961.xul]
|
||||
[test_bug591249.xul]
|
||||
|
@ -6,9 +6,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=368835
|
||||
<head>
|
||||
<title>Test for Bug 368835</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
<link rel="stylesheet" type="text/css" href="http://mochi.test:8888/tests/SimpleTest/test.css" />
|
||||
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="http://mochi.test:8888/tests/SimpleTest/SimpleTest.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@ -89,11 +89,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=368835
|
||||
document.body.addEventListener("dataContainerEvent",
|
||||
dataContainerEventHandler, true);
|
||||
document.body.dispatchEvent(event);
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(doTest);
|
||||
addLoadEvent(SimpleTest.finish);
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
|
@ -146,3 +146,5 @@ Window_ContentWarning=window._content is deprecated. Please use window.content
|
||||
# LOCALIZATION NOTE: Do not translate "XMLHttpRequest"
|
||||
SyncXMLHttpRequestWarning=Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help http://xhr.spec.whatwg.org/
|
||||
ImplicitMetaViewportTagFallback=No meta-viewport tag found. Please explicitly specify one to prevent unexpected behavioural changes in future versions. For more help https://developer.mozilla.org/en/docs/Mozilla/Mobile/Viewport_meta_tag
|
||||
# LOCALIZATION NOTE: Do not translate "DataContainerEvent" or "CustomEvent"
|
||||
DataContainerEventWarning=Use of DataContainerEvent is deprecated. Use CustomEvent instead.
|
||||
|
@ -255,8 +255,6 @@ var interfaceNamesInGlobalScope =
|
||||
"CustomEvent",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"DataChannel",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"DataContainerEvent",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "DataErrorEvent", b2g: true, pref: "dom.mobileconnection.enabled"},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
interface nsIVariant;
|
||||
|
||||
[ChromeOnly]
|
||||
interface DataContainerEvent : Event {
|
||||
/**
|
||||
* Return the data associated with the given key.
|
||||
|
@ -145,3 +145,5 @@ ShowModalDialogWarning=Use of window.showModalDialog() is deprecated. Use window
|
||||
Window_ContentWarning=window._content is deprecated. Please use window.content instead.
|
||||
# LOCALIZATION NOTE: Do not translate "XMLHttpRequest"
|
||||
SyncXMLHttpRequestWarning=Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help http://xhr.spec.whatwg.org/
|
||||
# LOCALIZATION NOTE: Do not translate "DataContainerEvent" or "CustomEvent"
|
||||
DataContainerEventWarning=Use of DataContainerEvent is deprecated. Use CustomEvent instead.
|
||||
|
Loading…
x
Reference in New Issue
Block a user