Bug 1398445 - Remove window._content. r=mystor r?qdot
MozReview-Commit-ID: 13KovslzGnM
--- a/dom/base/nsDeprecatedOperationList.h
+++ b/dom/base/nsDeprecatedOperationList.h
@@ -29,17 +29,16 @@ DEPRECATED_OPERATION(LenientThis)
DEPRECATED_OPERATION(GetPreventDefault)
DEPRECATED_OPERATION(GetSetUserData)
DEPRECATED_OPERATION(MozGetAsFile)
DEPRECATED_OPERATION(UseOfCaptureEvents)
DEPRECATED_OPERATION(UseOfReleaseEvents)
DEPRECATED_OPERATION(UseOfDOM3LoadMethod)
DEPRECATED_OPERATION(ChromeUseOfDOM3LoadMethod)
DEPRECATED_OPERATION(ShowModalDialog)
-DEPRECATED_OPERATION(Window_Content)
DEPRECATED_OPERATION(SyncXMLHttpRequest)
DEPRECATED_OPERATION(Window_Cc_ontrollers)
DEPRECATED_OPERATION(ImportXULIntoContent)
DEPRECATED_OPERATION(PannerNodeDoppler)
DEPRECATED_OPERATION(NavigatorGetUserMedia)
DEPRECATED_OPERATION(WebrtcDeprecatedPrefix)
DEPRECATED_OPERATION(RTCPeerConnectionGetStreams)
DEPRECATED_OPERATION(AppCache)
--- a/dom/base/nsGlobalWindow.h
+++ b/dom/base/nsGlobalWindow.h
@@ -1229,27 +1229,16 @@ public:
{
MOZ_ASSERT(IsOuterWindow());
mozilla::IgnoredErrorResult ignored;
nsCOMPtr<nsPIDOMWindowOuter> win =
GetContentInternal(ignored, mozilla::dom::CallerType::System);
return win.forget();
}
- void Get_content(JSContext* aCx,
- JS::MutableHandle<JSObject*> aRetval,
- mozilla::dom::SystemCallerGuarantee aCallerType,
- mozilla::ErrorResult& aError)
- {
- if (mDoc) {
- mDoc->WarnOnceAbout(nsIDocument::eWindow_Content);
- }
- GetContent(aCx, aRetval, aCallerType, aError);
- }
-
already_AddRefed<mozilla::dom::Promise>
CreateImageBitmap(JSContext* aCx,
const mozilla::dom::ImageBitmapSource& aImage,
mozilla::ErrorResult& aRv);
already_AddRefed<mozilla::dom::Promise>
CreateImageBitmap(JSContext* aCx,
const mozilla::dom::ImageBitmapSource& aImage,
--- a/dom/locales/en-US/chrome/dom/dom.properties
+++ b/dom/locales/en-US/chrome/dom/dom.properties
@@ -176,18 +176,16 @@ MozGetAsFileWarning=The non-standard moz
# LOCALIZATION NOTE: Do not translate "captureEvents()" or "addEventListener()"
UseOfCaptureEventsWarning=Use of captureEvents() is deprecated. To upgrade your code, use the DOM 2 addEventListener() method. For more help http://developer.mozilla.org/en/docs/DOM:element.addEventListener
# LOCALIZATION NOTE: Do not translate "releaseEvents()" or "removeEventListener()"
UseOfReleaseEventsWarning=Use of releaseEvents() is deprecated. To upgrade your code, use the DOM 2 removeEventListener() method. For more help http://developer.mozilla.org/en/docs/DOM:element.removeEventListener
# LOCALIZATION NOTE: Do not translate "document.load()" or "XMLHttpRequest"
UseOfDOM3LoadMethodWarning=Use of document.load() is deprecated. To upgrade your code, use the DOM XMLHttpRequest object. For more help https://developer.mozilla.org/en/XMLHttpRequest
# LOCALIZATION NOTE: Do not translate "window.showModalDialog()" or "window.open()"
ShowModalDialogWarning=Use of window.showModalDialog() is deprecated. Use window.open() instead. For more help https://developer.mozilla.org/en-US/docs/Web/API/Window.open
-# LOCALIZATION NOTE: Do not translate "window._content" or "window.content"
-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/
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 "window.controllers/Controllers"
Window_Cc_ontrollersWarning=window.controllers/Controllers is deprecated. Do not use it for UA detection.
ImportXULIntoContentWarning=Importing XUL nodes into a content document is deprecated. This functionality may be removed soon.
XMLDocumentLoadPrincipalMismatch=Use of document.load forbidden on Documents that come from other Windows. Only the Window in which a Document was created is allowed to call .load on that Document. Preferably, use XMLHttpRequest instead.
# LOCALIZATION NOTE: Do not translate "IndexedDB".
--- a/dom/tests/browser/browser.ini
+++ b/dom/tests/browser/browser.ini
@@ -50,17 +50,16 @@ support-files =
run-if = e10s
[browser_largeAllocation_win32.js]
skip-if = !e10s || os != "win" || processor != "x86" # Large-Allocation requires e10s
[browser_largeAllocation_non_win32.js]
skip-if = !e10s || (os == "win" && processor == "x86") # Large-Allocation requires e10s
[browser_localStorage_e10s.js]
skip-if = !e10s # This is a test of e10s functionality.
[browser_localStorage_privatestorageevent.js]
-[browser_test__content.js]
[browser_test_focus_after_modal_state.js]
support-files =
focus_after_prompt.html
[browser_test_new_window_from_content.js]
tags = openwindow
skip-if = toolkit == 'android' || (os == "linux" && debug) # see bug 1261495 for Linux debug time outs
support-files =
test_new_window_from_content_child.html
deleted file mode 100644
--- a/dom/tests/browser/browser_test__content.js
+++ /dev/null
@@ -1,4 +0,0 @@
-function test() {
- is(window._content, window.content,
- "_content needs to work, since extensions use it");
-}
--- a/dom/webidl/Window.webidl
+++ b/dom/webidl/Window.webidl
@@ -333,18 +333,16 @@ partial interface Window {
*/
[Throws, ChromeOnly, UnsafeInPrerendering] WindowProxy? openDialog(optional DOMString url = "",
optional DOMString name = "",
optional DOMString options = "",
any... extraArguments);
[ChromeOnly, Replaceable, Throws, NeedsCallerType] readonly attribute object? content;
- [ChromeOnly, Throws, NeedsCallerType] readonly attribute object? __content;
-
[Throws, ChromeOnly] any getInterface(IID iid);
/**
* Same as nsIDOMWindow.windowRoot, useful for event listener targeting.
*/
[ChromeOnly, Throws]
readonly attribute WindowRoot? windowRoot;
};
--- a/toolkit/components/addoncompat/RemoteAddonsParent.jsm
+++ b/toolkit/components/addoncompat/RemoteAddonsParent.jsm
@@ -1012,20 +1012,17 @@ TabBrowserElementInterposition.methods.r
NotificationTracker.remove(["web-progress", addon]);
return target.removeTabsProgressListener(wrapProgressListener("tabs", listener));
};
var ChromeWindowInterposition = new Interposition("ChromeWindowInterposition",
EventTargetInterposition);
-// _content is for older add-ons like pinboard and all-in-one gestures
-// that should be using content instead.
-ChromeWindowInterposition.getters.content =
-ChromeWindowInterposition.getters._content = function(addon, target) {
+ChromeWindowInterposition.getters.content = function(addon, target) {
CompatWarning.warn("Direct access to chromeWindow.content will no longer work in the chrome process.",
addon, CompatWarning.warnings.content);
let browser = target.gBrowser.selectedBrowser;
if (!browser.contentWindowAsCPOW) {
return makeDummyContentWindow(browser);
}
return browser.contentWindowAsCPOW;