--- a/addon-sdk/source/lib/sdk/system/child_process/subprocess.js
+++ b/addon-sdk/source/lib/sdk/system/child_process/subprocess.js
@@ -1,9 +1,9 @@
-// -*- coding: utf-8 -*-
+// -*- coding: utf-8; indent-tabs-mode: nil -*-
// vim: et:ts=4:sw=4:sts=4:ft=javascript
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "MPL"); you may not use this file
* except in compliance with the MPL. You may obtain a copy of
* the MPL at http://www.mozilla.org/MPL/
--- a/b2g/chrome/content/identity.js
+++ b/b2g/chrome/content/identity.js
@@ -1,9 +1,9 @@
-/* -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- /
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
// This JS shim contains the callbacks to fire DOMRequest events for
// navigator.pay API within the payment processor's scope.
--- a/b2g/chrome/content/payment.js
+++ b/b2g/chrome/content/payment.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- /
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
// This JS shim contains the callbacks to fire DOMRequest events for
// navigator.pay API within the payment processor's scope.
--- a/b2g/chrome/content/settings.js
+++ b/b2g/chrome/content/settings.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- /
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict;"
const Cc = Components.classes;
--- a/b2g/chrome/content/shell.js
+++ b/b2g/chrome/content/shell.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- /
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
Cu.import('resource://gre/modules/ContactService.jsm');
Cu.import('resource://gre/modules/SettingsChangeNotifier.jsm');
Cu.import('resource://gre/modules/DataStoreChangeNotifier.jsm');
--- a/b2g/components/FilePicker.js
+++ b/b2g/components/FilePicker.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* No magic constructor behaviour, as is de rigeur for XPCOM.
* If you must perform some initialization, and it could possibly fail (even
* due to an out-of-memory condition), you should use an Init method, which
--- a/b2g/components/HelperAppDialog.js
+++ b/b2g/components/HelperAppDialog.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
--- a/b2g/components/OMAContentHandler.js
+++ b/b2g/components/OMAContentHandler.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
"use strict";
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
--- a/b2g/components/ProcessGlobal.js
+++ b/b2g/components/ProcessGlobal.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- /
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
'use strict';
/**
--- a/b2g/components/RecoveryService.js
+++ b/b2g/components/RecoveryService.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
--- a/b2g/components/UpdatePrompt.js
+++ b/b2g/components/UpdatePrompt.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
* vim: sw=2 ts=8 et :
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
const Cc = Components.classes;
const Ci = Components.interfaces;
--- a/b2g/confvars.sh
+++ b/b2g/confvars.sh
@@ -21,16 +21,17 @@ MOZ_SAFE_BROWSING=
MOZ_SERVICES_COMMON=1
MOZ_SERVICES_METRICS=1
MOZ_CAPTIVEDETECT=1
MOZ_WEBSMS_BACKEND=1
MOZ_DISABLE_CRYPTOLEGACY=1
MOZ_APP_STATIC_INI=1
NSS_NO_LIBPKIX=1
+NSS_DISABLE_DBM=1
MOZ_NO_EV_CERTS=1
MOZ_DISABLE_EXPORT_JS=1
if test "$OS_TARGET" = "Android"; then
MOZ_CAPTURE=1
MOZ_RAW=1
MOZ_AUDIO_CHANNEL_MANAGER=1
fi
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -592,17 +592,17 @@
; GNOME hooks
#ifdef MOZ_ENABLE_GNOME_COMPONENT
@BINPATH@/components/@DLL_PREFIX@mozgnome@DLL_SUFFIX@
#endif
; ANGLE on Win32
#ifdef XP_WIN32
-#ifndef HAVE_64BIT_OS
+#ifndef HAVE_64BIT_BUILD
@BINPATH@/libEGL.dll
@BINPATH@/libGLESv2.dll
#endif
#endif
; [Browser Chrome Files]
@BINPATH@/chrome/browser@JAREXT@
@BINPATH@/chrome/browser.manifest
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1,9 +1,9 @@
-# -*- Mode: JavaScript; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
// XXX Toolkit-specific preferences should be moved into toolkit.js
#filter substitution
@@ -213,17 +213,17 @@ pref("app.update.showInstalledUI", false
// to newer versions of installed addons that resolve them.
// 1 = suppress prompting for incompatibilities only if there are VersionInfo
// updates available to installed addons that resolve them, not newer
// versions.
pref("app.update.incompatible.mode", 0);
// Whether or not to attempt using the service for updates.
#ifdef MOZ_MAINTENANCE_SERVICE
-#ifndef HAVE_64BIT_OS
+#ifndef HAVE_64BIT_BUILD
pref("app.update.service.enabled", true);
#endif
#endif
// Symmetric (can be overridden by individual extensions) update preferences.
// e.g.
// extensions.{GUID}.update.enabled
// extensions.{GUID}.update.url
--- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js
@@ -1,9 +1,9 @@
-# -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
const gXPInstallObserver = {
_findChildShell: function (aDocShell, aSoughtShell)
{
if (aDocShell == aSoughtShell)
--- a/browser/base/content/browser-customization.js
+++ b/browser/base/content/browser-customization.js
@@ -1,9 +1,9 @@
-# -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/**
* Customization handler prepares this browser window for entering and exiting
* customization mode by handling customizationstarting and customizationending
* events.
--- a/browser/base/content/browser-feeds.js
+++ b/browser/base/content/browser-feeds.js
@@ -1,9 +1,9 @@
-# -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/**
* The Feed Handler object manages discovery of RSS/ATOM feeds in web pages
* and shows UI when they are discovered.
*/
--- a/browser/base/content/browser-fullScreen.js
+++ b/browser/base/content/browser-fullScreen.js
@@ -1,9 +1,9 @@
-# -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
var FullScreen = {
_XULNS: "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
get _fullScrToggler() {
delete this._fullScrToggler;
--- a/browser/base/content/browser-plugins.js
+++ b/browser/base/content/browser-plugins.js
@@ -1,9 +1,9 @@
-# -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
var gPluginHandler = {
PREF_NOTIFY_MISSING_FLASH: "plugins.notifyMissingFlash",
PREF_HIDE_MISSING_PLUGINS_NOTIFICATION: "plugins.hideMissingPluginsNotification",
PREF_SESSION_PERSIST_MINUTES: "plugin.sessionPermissionNow.intervalInMinutes",
--- a/browser/base/content/browser-webrtcUI.js
+++ b/browser/base/content/browser-webrtcUI.js
@@ -1,9 +1,9 @@
-# -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
let WebrtcIndicator = {
init: function () {
let temp = {};
Cu.import("resource:///modules/webrtcUI.jsm", temp);
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1,9 +1,9 @@
-# -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
let Ci = Components.interfaces;
let Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
--- a/browser/base/content/pageinfo/feeds.js
+++ b/browser/base/content/pageinfo/feeds.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
XPCOMUtils.defineLazyModuleGetter(this, "Feeds",
"resource:///modules/Feeds.jsm");
function initFeedTab()
--- a/browser/base/content/pageinfo/security.js
+++ b/browser/base/content/pageinfo/security.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var security = {
// Display the server certificate (static)
viewCert : function () {
var cert = security._cert;
--- a/browser/base/content/safeMode.js
+++ b/browser/base/content/safeMode.js
@@ -1,9 +1,9 @@
-/* -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let Cc = Components.classes;
let Ci = Components.interfaces;
let Cu = Components.utils;
--- a/browser/base/content/sanitize.js
+++ b/browser/base/content/sanitize.js
@@ -1,9 +1,9 @@
-# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+# -*- indent-tabs-mode: nil; js-indent-level: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
"resource://gre/modules/PlacesUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "FormHistory",
--- a/browser/base/content/sanitizeDialog.js
+++ b/browser/base/content/sanitizeDialog.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const Cc = Components.classes;
const Ci = Components.interfaces;
var gSanitizePromptDialog = {
--- a/browser/base/content/sync/setup.js
+++ b/browser/base/content/sync/setup.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const Ci = Components.interfaces;
const Cc = Components.classes;
const Cr = Components.results;
const Cu = Components.utils;
--- a/browser/base/content/test/general/browser_bug321000.js
+++ b/browser/base/content/test/general/browser_bug321000.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
* vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const kTestString = " hello hello \n world\nworld ";
var gTests = [
--- a/browser/base/content/test/general/browser_sanitizeDialog.js
+++ b/browser/base/content/test/general/browser_sanitizeDialog.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Tests the sanitize dialog (a.k.a. the clear recent history dialog).
* See bug 480169.
--- a/browser/base/content/test/general/browser_sanitizeDialog_treeView.js
+++ b/browser/base/content/test/general/browser_sanitizeDialog_treeView.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Tests the sanitize dialog (a.k.a. the clear recent history dialog).
* See bug 480169.
--- a/browser/base/content/test/general/browser_tabMatchesInAwesomebar_perwindowpb.js
+++ b/browser/base/content/test/general/browser_tabMatchesInAwesomebar_perwindowpb.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
* vim:set ts=2 sw=2 sts=2 et:
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const TEST_URL_BASES = [
"http://example.org/browser/browser/base/content/test/general/dummy_page.html#tabmatch",
"http://example.org/browser/browser/base/content/test/general/moz.png#tabmatch"
--- a/browser/base/content/test/general/domplate_test.js
+++ b/browser/base/content/test/general/domplate_test.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let doc;
let div;
let plate;
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -1,9 +1,9 @@
-# -*- Mode: javascript; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+# -*- indent-tabs-mode: nil; js-indent-level: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Services = object with smart getters for common XPCOM services
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
--- a/browser/base/content/web-panels.js
+++ b/browser/base/content/web-panels.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const NS_ERROR_MODULE_NETWORK = 2152398848;
const NS_NET_STATUS_READ_FROM = NS_ERROR_MODULE_NETWORK + 8;
const NS_NET_STATUS_WROTE_TO = NS_ERROR_MODULE_NETWORK + 9;
--- a/browser/components/downloads/content/downloads.js
+++ b/browser/components/downloads/content/downloads.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Handles the Downloads panel user interface for each browser window.
*
--- a/browser/components/downloads/content/indicator.js
+++ b/browser/components/downloads/content/indicator.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Handles the indicator that displays the progress of ongoing downloads, which
* is also used as the anchor for the downloads panel.
--- a/browser/components/downloads/src/DownloadsCommon.jsm
+++ b/browser/components/downloads/src/DownloadsCommon.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80 filetype=javascript: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
this.EXPORTED_SYMBOLS = [
--- a/browser/components/downloads/src/DownloadsLogger.jsm
+++ b/browser/components/downloads/src/DownloadsLogger.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: js2; js2-basic-offset: 2; indent-tabs-mode: nil; -*- */
+/* -*- js-indent-level: 2; indent-tabs-mode: nil -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* The contents of this file were copied almost entirely from
* toolkit/identity/LogUtils.jsm. Until we've got a more generalized logging
--- a/browser/components/downloads/src/DownloadsStartup.js
+++ b/browser/components/downloads/src/DownloadsStartup.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80 filetype=javascript: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* This component enables the JavaScript API for downloads at startup. This
* will eventually be removed when nsIDownloadManager will not be available
--- a/browser/components/downloads/src/DownloadsTaskbar.jsm
+++ b/browser/components/downloads/src/DownloadsTaskbar.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80 filetype=javascript: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Handles the download progress indicator in the taskbar.
*/
--- a/browser/components/downloads/src/DownloadsUI.js
+++ b/browser/components/downloads/src/DownloadsUI.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80 filetype=javascript: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* This component implements the nsIDownloadManagerUI interface and opens the
* Downloads view for the most recent browser window when requested.
--- a/browser/components/downloads/test/browser/browser_basic_functionality.js
+++ b/browser/components/downloads/test/browser/browser_basic_functionality.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Make sure the downloads panel can display items in the right order and
* contains the expected data.
*/
--- a/browser/components/downloads/test/browser/browser_first_download_panel.js
+++ b/browser/components/downloads/test/browser/browser_first_download_panel.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Make sure the downloads panel only opens automatically on the first
* download it notices. All subsequent downloads, even across sessions, should
* not open the panel automatically.
--- a/browser/components/downloads/test/browser/head.js
+++ b/browser/components/downloads/test/browser/head.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Provides infrastructure for automated download components tests.
*/
--- a/browser/components/downloads/test/unit/head.js
+++ b/browser/components/downloads/test/unit/head.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Provides infrastructure for automated download components tests.
*/
--- a/browser/components/downloads/test/unit/test_DownloadsCommon.js
+++ b/browser/components/downloads/test/unit/test_DownloadsCommon.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Tests for the functions located directly in the "DownloadsCommon" object.
*/
--- a/browser/components/feeds/content/subscribe.js
+++ b/browser/components/feeds/content/subscribe.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var SubscribeHandler = {
/**
* The nsIFeedWriter object that produces the UI
*/
--- a/browser/components/feeds/src/FeedConverter.js
+++ b/browser/components/feeds/src/FeedConverter.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/debug.js");
Components.utils.import("resource://gre/modules/Services.jsm");
--- a/browser/components/feeds/src/FeedWriter.js
+++ b/browser/components/feeds/src/FeedWriter.js
@@ -1,9 +1,9 @@
-# -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+# -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
--- a/browser/components/feeds/src/WebContentConverter.js
+++ b/browser/components/feeds/src/WebContentConverter.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
const Cc = Components.classes;
--- a/browser/components/loop/content/libs/l10n.js
+++ b/browser/components/loop/content/libs/l10n.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict';
// This is a modified version of l10n.js that the pdf.js extension uses.
// It uses an explicitly passed object for the strings/locale functionality,
// and does not automatically translate on DOMContentLoaded, but requires
// initialize to be called. This improves testability and helps to avoid race
--- a/browser/components/migration/src/ChromeProfileMigrator.js
+++ b/browser/components/migration/src/ChromeProfileMigrator.js
@@ -1,9 +1,9 @@
-/* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
* vim: sw=2 ts=2 sts=2 et */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Cc = Components.classes;
--- a/browser/components/migration/src/FirefoxProfileMigrator.js
+++ b/browser/components/migration/src/FirefoxProfileMigrator.js
@@ -1,9 +1,9 @@
-/* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
* vim: sw=2 ts=2 sts=2 et */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/*
--- a/browser/components/places/content/bookmarkProperties.js
+++ b/browser/components/places/content/bookmarkProperties.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* The panel is initialized based on data given in the js object passed
* as window.arguments[0]. The object must have the following fields set:
* @ action (String). Possible values:
--- a/browser/components/places/content/bookmarksPanel.js
+++ b/browser/components/places/content/bookmarksPanel.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
function init() {
document.getElementById("bookmarks-view").place =
"place:queryType=1&folder=" + window.top.PlacesUIUtils.allBookmarksFolderId;
}
--- a/browser/components/places/content/controller.js
+++ b/browser/components/places/content/controller.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
XPCOMUtils.defineLazyModuleGetter(this, "ForgetAboutSite",
"resource://gre/modules/ForgetAboutSite.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
"resource://gre/modules/NetUtil.jsm");
--- a/browser/components/places/content/history-panel.js
+++ b/browser/components/places/content/history-panel.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var gHistoryTree;
var gSearchBox;
var gHistoryGrouping = "";
var gSearching = false;
--- a/browser/components/places/content/moveBookmarks.js
+++ b/browser/components/places/content/moveBookmarks.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var gMoveBookmarksDialog = {
_nodes: null,
_foldersTree: null,
--- a/browser/components/places/content/places.js
+++ b/browser/components/places/content/places.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "MigrationUtils",
"resource:///modules/MigrationUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Task",
--- a/browser/components/places/content/sidebarUtils.js
+++ b/browser/components/places/content/sidebarUtils.js
@@ -1,9 +1,9 @@
-# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
var SidebarUtils = {
handleTreeClick: function SU_handleTreeClick(aTree, aEvent, aGutterSelect) {
// right-clicks are not handled here
if (aEvent.button == 2)
--- a/browser/components/places/src/PlacesProtocolHandler.js
+++ b/browser/components/places/src/PlacesProtocolHandler.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
* vim: sw=2 ts=2 sts=2 et
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const Cc = Components.classes;
const Ci = Components.interfaces;
--- a/browser/components/places/src/PlacesUIUtils.jsm
+++ b/browser/components/places/src/PlacesUIUtils.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
this.EXPORTED_SYMBOLS = ["PlacesUIUtils"];
var Ci = Components.interfaces;
var Cc = Components.classes;
--- a/browser/components/places/tests/browser/browser_0_library_left_pane_migration.js
+++ b/browser/components/places/tests/browser/browser_0_library_left_pane_migration.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Test we correctly migrate Library left pane to the latest version.
* Note: this test MUST be the first between browser chrome tests, or results
--- a/browser/components/places/tests/browser/browser_library_left_pane_commands.js
+++ b/browser/components/places/tests/browser/browser_library_left_pane_commands.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Test enabled commands in the left pane folder of the Library.
*/
--- a/browser/components/places/tests/browser/browser_library_left_pane_fixnames.js
+++ b/browser/components/places/tests/browser/browser_library_left_pane_fixnames.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Test we correctly fix broken Library left pane queries names.
*/
--- a/browser/components/places/tests/browser/browser_library_open_leak.js
+++ b/browser/components/places/tests/browser/browser_library_open_leak.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Bug 474831
* https://bugzilla.mozilla.org/show_bug.cgi?id=474831
--- a/browser/components/places/tests/browser/browser_library_panel_leak.js
+++ b/browser/components/places/tests/browser/browser_library_panel_leak.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Bug 433231 - Places Library leaks the nsGlobalWindow when closed with a
* history entry selected.
--- a/browser/components/places/tests/browser/browser_library_search.js
+++ b/browser/components/places/tests/browser/browser_library_search.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Bug 451151
* https://bugzilla.mozilla.org/show_bug.cgi?id=451151
--- a/browser/components/places/tests/browser/browser_sort_in_library.js
+++ b/browser/components/places/tests/browser/browser_sort_in_library.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Tests the following bugs:
*
--- a/browser/components/places/tests/unit/head_bookmarks.js
+++ b/browser/components/places/tests/unit/head_bookmarks.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const Ci = Components.interfaces;
const Cc = Components.classes;
const Cr = Components.results;
const Cu = Components.utils;
--- a/browser/components/places/tests/unit/test_421483.js
+++ b/browser/components/places/tests/unit/test_421483.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const SMART_BOOKMARKS_ANNO = "Places/SmartBookmark";
const SMART_BOOKMARKS_PREF = "browser.places.smartBookmarksVersion";
--- a/browser/components/places/tests/unit/test_browserGlue_bookmarkshtml.js
+++ b/browser/components/places/tests/unit/test_browserGlue_bookmarkshtml.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Tests that nsBrowserGlue correctly exports bookmarks.html at shutdown if
* browser.bookmarks.autoExportHTML is set to true.
--- a/browser/components/places/tests/unit/test_browserGlue_corrupt.js
+++ b/browser/components/places/tests/unit/test_browserGlue_corrupt.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Tests that nsBrowserGlue correctly restores bookmarks from a JSON backup if
* database is corrupt and one backup is available.
--- a/browser/components/places/tests/unit/test_browserGlue_corrupt_nobackup.js
+++ b/browser/components/places/tests/unit/test_browserGlue_corrupt_nobackup.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Tests that nsBrowserGlue correctly imports from bookmarks.html if database
* is corrupt but a JSON backup is not available.
--- a/browser/components/places/tests/unit/test_browserGlue_corrupt_nobackup_default.js
+++ b/browser/components/places/tests/unit/test_browserGlue_corrupt_nobackup_default.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Tests that nsBrowserGlue correctly restores default bookmarks if database is
* corrupt, nor a JSON backup nor bookmarks.html are available.
--- a/browser/components/places/tests/unit/test_browserGlue_restore.js
+++ b/browser/components/places/tests/unit/test_browserGlue_restore.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Tests that nsBrowserGlue correctly restores bookmarks from a JSON backup if
* database has been created and one backup is available.
--- a/browser/components/places/tests/unit/test_browserGlue_smartBookmarks.js
+++ b/browser/components/places/tests/unit/test_browserGlue_smartBookmarks.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Tests that nsBrowserGlue is correctly interpreting the preferences settable
* by the user or by other components.
--- a/browser/components/places/tests/unit/test_clearHistory_shutdown.js
+++ b/browser/components/places/tests/unit/test_clearHistory_shutdown.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Tests that requesting clear history at shutdown will really clear history.
*/
--- a/browser/components/places/tests/unit/test_leftpane_corruption_handling.js
+++ b/browser/components/places/tests/unit/test_leftpane_corruption_handling.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Tests that we build a working leftpane in various corruption situations.
*/
--- a/browser/components/preferences/advanced.js
+++ b/browser/components/preferences/advanced.js
@@ -1,9 +1,9 @@
-# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+# -*- indent-tabs-mode: nil; js-indent-level: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Load DownloadUtils module for convertByteUnits
Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
Components.utils.import("resource://gre/modules/ctypes.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
--- a/browser/components/preferences/connection.js
+++ b/browser/components/preferences/connection.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var gConnectionsDialog = {
beforeAccept: function ()
{
var proxyTypePref = document.getElementById("network.proxy.type");
--- a/browser/components/preferences/content.js
+++ b/browser/components/preferences/content.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var gContentPane = {
/**
* Initializes the fonts dropdowns displayed in this pane.
--- a/browser/components/preferences/cookies.js
+++ b/browser/components/preferences/cookies.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const nsICookie = Components.interfaces.nsICookie;
var gCookiesWindow = {
_cm : Components.classes["@mozilla.org/cookiemanager;1"]
--- a/browser/components/preferences/fonts.js
+++ b/browser/components/preferences/fonts.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// browser.display.languageList LOCK ALL when LOCKED
const kDefaultFontType = "font.default.%LANG%";
const kFontNameFmtSerif = "font.name.serif.%LANG%";
--- a/browser/components/preferences/languages.js
+++ b/browser/components/preferences/languages.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var gLanguagesDialog = {
_availableLanguagesList : [],
_acceptLanguages : { },
--- a/browser/components/preferences/main.js
+++ b/browser/components/preferences/main.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon",
"resource:///modules/DownloadsCommon.jsm");
--- a/browser/components/preferences/permissions.js
+++ b/browser/components/preferences/permissions.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
const nsICookiePermission = Components.interfaces.nsICookiePermission;
const NOTIFICATION_FLUSH_PERMISSIONS = "flush-pending-permissions";
--- a/browser/components/preferences/privacy.js
+++ b/browser/components/preferences/privacy.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
var gPrivacyPane = {
--- a/browser/components/preferences/sanitize.js
+++ b/browser/components/preferences/sanitize.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let gSanitizeDialog = Object.freeze({
onClearHistoryChanged: function () {
let downloadsPref = document.getElementById("privacy.clearOnShutdown.downloads");
let historyPref = document.getElementById("privacy.clearOnShutdown.history");
--- a/browser/components/preferences/security.js
+++ b/browser/components/preferences/security.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
var gSecurityPane = {
_pane: null,
--- a/browser/components/preferences/selectBookmark.js
+++ b/browser/components/preferences/selectBookmark.js
@@ -1,9 +1,9 @@
-//* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+//* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* SelectBookmarkDialog controls the user interface for the "Use Bookmark for
* Home Page" dialog.
*
--- a/browser/components/preferences/tabs.js
+++ b/browser/components/preferences/tabs.js
@@ -1,9 +1,9 @@
-# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+# -*- indent-tabs-mode: nil; js-indent-level: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
var gTabsPane = {
/*
* Preferences:
--- a/browser/components/preferences/translation.js
+++ b/browser/components/preferences/translation.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
--- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_DownloadLastDirWithCPS.js
+++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_DownloadLastDirWithCPS.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let gTests;
function test() {
waitForExplicitFinish();
requestLongerTimeout(2);
--- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadLastDir.js
+++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadLastDir.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
function test() {
waitForExplicitFinish();
let FileUtils =
--- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadLastDir_c.js
+++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadLastDir_c.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
function test() {
waitForExplicitFinish();
let FileUtils =
--- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadLastDir_toggle.js
+++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadLastDir_toggle.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
function test() {
waitForExplicitFinish();
let FileUtils =
--- a/browser/components/sidebar/nsSidebar.js
+++ b/browser/components/sidebar/nsSidebar.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
const DEBUG = false; /* set to false to suppress debug messages */
--- a/browser/components/test/browser_bug538331.js
+++ b/browser/components/test/browser_bug538331.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
const PREF_POSTUPDATE = "app.update.postupdate";
const PREF_MSTONE = "browser.startup.homepage_override.mstone";
const PREF_OVERRIDE_URL = "startup.homepage_override_url";
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -5,17 +5,17 @@
MOZ_APP_BASENAME=Firefox
MOZ_APP_VENDOR=Mozilla
MOZ_UPDATER=1
MOZ_PHOENIX=1
if test "$OS_ARCH" = "WINNT"; then
MOZ_MAINTENANCE_SERVICE=1
- if ! test "$HAVE_64BIT_OS"; then
+ if ! test "$HAVE_64BIT_BUILD"; then
MOZ_VERIFY_MAR_SIGNATURE=1
if test "$MOZ_UPDATE_CHANNEL" = "nightly" -o \
"$MOZ_UPDATE_CHANNEL" = "aurora" -o \
"$MOZ_UPDATE_CHANNEL" = "beta" -o \
"$MOZ_UPDATE_CHANNEL" = "release"; then
if ! test "$MOZ_DEBUG"; then
MOZ_STUB_INSTALLER=1
fi
--- a/browser/devtools/canvasdebugger/panel.js
+++ b/browser/devtools/canvasdebugger/panel.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Cc, Ci, Cu, Cr } = require("chrome");
const promise = Cu.import("resource://gre/modules/Promise.jsm", {}).Promise;
--- a/browser/devtools/debugger/debugger-controller.js
+++ b/browser/devtools/debugger/debugger-controller.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
--- a/browser/devtools/debugger/debugger-panes.js
+++ b/browser/devtools/debugger/debugger-panes.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
// Used to detect minification for automatic pretty printing
const SAMPLE_SIZE = 50; // no of lines
--- a/browser/devtools/debugger/debugger-toolbar.js
+++ b/browser/devtools/debugger/debugger-toolbar.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
// A time interval sufficient for the options popup panel to finish hiding
// itself.
--- a/browser/devtools/debugger/debugger-view.js
+++ b/browser/devtools/debugger/debugger-view.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const SOURCE_SYNTAX_HIGHLIGHT_MAX_FILE_SIZE = 1048576; // 1 MB in bytes
const SOURCE_URL_DEFAULT_MAX_LENGTH = 64; // chars
--- a/browser/devtools/debugger/panel.js
+++ b/browser/devtools/debugger/panel.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Cc, Ci, Cu, Cr } = require("chrome");
const { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
--- a/browser/devtools/debugger/test/browser_dbg_pretty-print-07.js
+++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-07.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; js-indent-level: 2; -*- */
+/* -*- js-indent-level: 2; indent-tabs-mode: nil -*- */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Test basic pretty printing functionality. Would be an xpcshell test, except
// for bug 921252.
let gTab, gDebuggee, gPanel, gClient, gThreadClient, gSource;
--- a/browser/devtools/debugger/test/browser_dbg_pretty-print-08.js
+++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-08.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; js-indent-level: 2; -*- */
+/* -*- js-indent-level: 2; indent-tabs-mode: nil -*- */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Test stepping through pretty printed sources.
let gTab, gDebuggee, gPanel, gClient, gThreadClient, gSource;
const TAB_URL = EXAMPLE_URL + "doc_pretty-print-2.html";
--- a/browser/devtools/debugger/test/browser_dbg_pretty-print-09.js
+++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-09.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; js-indent-level: 2; -*- */
+/* -*- js-indent-level: 2; indent-tabs-mode: nil -*- */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Test pretty printing source mapped sources.
var gDebuggee;
var gClient;
var gThreadClient;
--- a/browser/devtools/fontinspector/font-inspector.js
+++ b/browser/devtools/fontinspector/font-inspector.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
--- a/browser/devtools/framework/ToolboxProcess.jsm
+++ b/browser/devtools/framework/ToolboxProcess.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
--- a/browser/devtools/framework/connect/connect.js
+++ b/browser/devtools/framework/connect/connect.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Cu = Components.utils;
--- a/browser/devtools/framework/selection.js
+++ b/browser/devtools/framework/selection.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {Cu, Ci} = require("chrome");
--- a/browser/devtools/framework/sidebar.js
+++ b/browser/devtools/framework/sidebar.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const {Cu} = require("chrome");
Cu.import("resource://gre/modules/Services.jsm");
--- a/browser/devtools/inspector/breadcrumbs.js
+++ b/browser/devtools/inspector/breadcrumbs.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const {Cc, Cu, Ci} = require("chrome");
const PSEUDO_CLASSES = [":hover", ":active", ":focus"];
--- a/browser/devtools/inspector/inspector-panel.js
+++ b/browser/devtools/inspector/inspector-panel.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const {Cc, Ci, Cu, Cr} = require("chrome");
Cu.import("resource://gre/modules/Services.jsm");
--- a/browser/devtools/inspector/test/browser_inspector_bug_848731_reset_selection_on_delete.js
+++ b/browser/devtools/inspector/test/browser_inspector_bug_848731_reset_selection_on_delete.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Test that when nodes are being deleted in the page, the current selection
// and therefore the markup view, css rule view, computed view, font view,
// box model view, and breadcrumbs, reset accordingly to show the right node
--- a/browser/devtools/inspector/test/browser_inspector_bug_958456_highlight_comments.js
+++ b/browser/devtools/inspector/test/browser_inspector_bug_958456_highlight_comments.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Test that hovering over the markup-view's containers doesn't always show the
// highlighter, depending on the type of node hovered over.
--- a/browser/devtools/inspector/test/browser_inspector_highlighter.js
+++ b/browser/devtools/inspector/test/browser_inspector_highlighter.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
// Test that the highlighter is correctly displayed over a variety of elements
--- a/browser/devtools/inspector/test/browser_inspector_iframeTest.js
+++ b/browser/devtools/inspector/test/browser_inspector_iframeTest.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let doc;
let div1;
let div2;
--- a/browser/devtools/inspector/test/browser_inspector_initialization.js
+++ b/browser/devtools/inspector/test/browser_inspector_initialization.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let doc;
let salutation;
function createDocument()
--- a/browser/devtools/inspector/test/browser_inspector_navigation.js
+++ b/browser/devtools/inspector/test/browser_inspector_navigation.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
function test() {
let inspector, toolbox;
--- a/browser/devtools/inspector/test/browser_inspector_reload.js
+++ b/browser/devtools/inspector/test/browser_inspector_reload.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
function test() {
let inspector, toolbox;
--- a/browser/devtools/inspector/test/browser_inspector_scrolling.js
+++ b/browser/devtools/inspector/test/browser_inspector_scrolling.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let doc;
let div;
let iframe;
--- a/browser/devtools/inspector/test/browser_inspector_select_last_selected.js
+++ b/browser/devtools/inspector/test/browser_inspector_select_last_selected.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
function test() {
let inspector, toolbox;
let page1 = "http://mochi.test:8888/browser/browser/devtools/inspector/test/browser_inspector_select_last_selected.html";
--- a/browser/devtools/inspector/test/browser_inspector_tree_height.js
+++ b/browser/devtools/inspector/test/browser_inspector_tree_height.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let doc;
let salutation;
let closing;
--- a/browser/devtools/layoutview/view.js
+++ b/browser/devtools/layoutview/view.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Cu = Components.utils;
--- a/browser/devtools/markupview/markup-view.js
+++ b/browser/devtools/markupview/markup-view.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const {Cc, Cu, Ci} = require("chrome");
// Page size for pageup/pagedown
--- a/browser/devtools/netmonitor/netmonitor-controller.js
+++ b/browser/devtools/netmonitor/netmonitor-controller.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
--- a/browser/devtools/netmonitor/netmonitor-view.js
+++ b/browser/devtools/netmonitor/netmonitor-view.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const HTML_NS = "http://www.w3.org/1999/xhtml";
const EPSILON = 0.001;
--- a/browser/devtools/netmonitor/panel.js
+++ b/browser/devtools/netmonitor/panel.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Cc, Ci, Cu, Cr } = require("chrome");
const { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
old mode 100755
new mode 100644
--- a/browser/devtools/profiler/cleopatra/js/parserWorker.js
+++ b/browser/devtools/profiler/cleopatra/js/parserWorker.js
@@ -1,9 +1,9 @@
-/* -*- Mode: js2; indent-tabs-mode: nil; js2-basic-offset: 2; -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
importScripts("ProgressReporter.js");
--- a/browser/devtools/projecteditor/lib/editors.js
+++ b/browser/devtools/projecteditor/lib/editors.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { Cu } = require("chrome");
const { Class } = require("sdk/core/heritage");
const { EventTarget } = require("sdk/event/target");
--- a/browser/devtools/projecteditor/lib/helpers/event.js
+++ b/browser/devtools/projecteditor/lib/helpers/event.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* This file wraps EventEmitter objects to provide functions to forget
* all events bound on a certain object.
--- a/browser/devtools/projecteditor/lib/helpers/file-picker.js
+++ b/browser/devtools/projecteditor/lib/helpers/file-picker.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* This file contains helper functions for showing OS-specific
* file and folder pickers.
--- a/browser/devtools/projecteditor/lib/helpers/l10n.js
+++ b/browser/devtools/projecteditor/lib/helpers/l10n.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* This file contains helper functions for internationalizing projecteditor strings
*/
--- a/browser/devtools/projecteditor/lib/helpers/promise.js
+++ b/browser/devtools/projecteditor/lib/helpers/promise.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* This helper is a quick way to require() the Promise object from Promise.jsm.
*/
--- a/browser/devtools/projecteditor/lib/helpers/readdir.js
+++ b/browser/devtools/projecteditor/lib/helpers/readdir.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
importScripts("resource://gre/modules/osfile.jsm");
/**
--- a/browser/devtools/projecteditor/lib/plugins/app-manager/app-project-editor.js
+++ b/browser/devtools/projecteditor/lib/plugins/app-manager/app-project-editor.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { Cu } = require("chrome");
const { Class } = require("sdk/core/heritage");
const promise = require("projecteditor/helpers/promise");
--- a/browser/devtools/projecteditor/lib/plugins/core.js
+++ b/browser/devtools/projecteditor/lib/plugins/core.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// This is the core plugin API.
const { Class } = require("sdk/core/heritage");
--- a/browser/devtools/projecteditor/lib/plugins/delete/delete.js
+++ b/browser/devtools/projecteditor/lib/plugins/delete/delete.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { Class } = require("sdk/core/heritage");
const { registerPlugin, Plugin } = require("projecteditor/plugins/core");
const { confirm } = require("projecteditor/helpers/prompts");
--- a/browser/devtools/projecteditor/lib/plugins/dirty/dirty.js
+++ b/browser/devtools/projecteditor/lib/plugins/dirty/dirty.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { Class } = require("sdk/core/heritage");
const { registerPlugin, Plugin } = require("projecteditor/plugins/core");
const { emit } = require("sdk/event/core");
--- a/browser/devtools/projecteditor/lib/plugins/image-view/image-editor.js
+++ b/browser/devtools/projecteditor/lib/plugins/image-view/image-editor.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { Cu } = require("chrome");
const { Class } = require("sdk/core/heritage");
const promise = require("projecteditor/helpers/promise");
--- a/browser/devtools/projecteditor/lib/plugins/image-view/plugin.js
+++ b/browser/devtools/projecteditor/lib/plugins/image-view/plugin.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { Cu } = require("chrome");
const { Class } = require("sdk/core/heritage");
const promise = require("projecteditor/helpers/promise");
--- a/browser/devtools/projecteditor/lib/plugins/logging/logging.js
+++ b/browser/devtools/projecteditor/lib/plugins/logging/logging.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var { Class } = require("sdk/core/heritage");
var { registerPlugin, Plugin } = require("projecteditor/plugins/core");
--- a/browser/devtools/projecteditor/lib/plugins/new/new.js
+++ b/browser/devtools/projecteditor/lib/plugins/new/new.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { Class } = require("sdk/core/heritage");
const { registerPlugin, Plugin } = require("projecteditor/plugins/core");
const { getLocalizedString } = require("projecteditor/helpers/l10n");
--- a/browser/devtools/projecteditor/lib/plugins/save/save.js
+++ b/browser/devtools/projecteditor/lib/plugins/save/save.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { Class } = require("sdk/core/heritage");
const { registerPlugin, Plugin } = require("projecteditor/plugins/core");
const picker = require("projecteditor/helpers/file-picker");
--- a/browser/devtools/projecteditor/lib/plugins/status-bar/plugin.js
+++ b/browser/devtools/projecteditor/lib/plugins/status-bar/plugin.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { Cu } = require("chrome");
const { Class } = require("sdk/core/heritage");
const promise = require("projecteditor/helpers/promise");
--- a/browser/devtools/projecteditor/lib/project.js
+++ b/browser/devtools/projecteditor/lib/project.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { Cu } = require("chrome");
const { Class } = require("sdk/core/heritage");
const { EventTarget } = require("sdk/event/target");
--- a/browser/devtools/projecteditor/lib/projecteditor.js
+++ b/browser/devtools/projecteditor/lib/projecteditor.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { Cc, Ci, Cu } = require("chrome");
const { Class } = require("sdk/core/heritage");
const { Project } = require("projecteditor/project");
--- a/browser/devtools/projecteditor/lib/shells.js
+++ b/browser/devtools/projecteditor/lib/shells.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { Cu } = require("chrome");
const { Class } = require("sdk/core/heritage");
const { EventTarget } = require("sdk/event/target");
--- a/browser/devtools/projecteditor/lib/stores/base.js
+++ b/browser/devtools/projecteditor/lib/stores/base.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { Cc, Ci, Cu } = require("chrome");
const { Class } = require("sdk/core/heritage");
const { EventTarget } = require("sdk/event/target");
--- a/browser/devtools/projecteditor/lib/stores/local.js
+++ b/browser/devtools/projecteditor/lib/stores/local.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { Cc, Ci, Cu, ChromeWorker } = require("chrome");
const { Class } = require("sdk/core/heritage");
const { OS } = Cu.import("resource://gre/modules/osfile.jsm", {});
--- a/browser/devtools/projecteditor/lib/stores/resource.js
+++ b/browser/devtools/projecteditor/lib/stores/resource.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Cc, Ci, Cu } = require("chrome");
--- a/browser/devtools/projecteditor/lib/tree.js
+++ b/browser/devtools/projecteditor/lib/tree.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const { Cu } = require("chrome");
const { Class } = require("sdk/core/heritage");
const { emit } = require("sdk/event/core");
--- a/browser/devtools/responsivedesign/responsivedesign.jsm
+++ b/browser/devtools/responsivedesign/responsivedesign.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const Ci = Components.interfaces;
const Cu = Components.utils;
--- a/browser/devtools/scratchpad/scratchpad-panel.js
+++ b/browser/devtools/scratchpad/scratchpad-panel.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {Cu} = require("chrome");
const EventEmitter = require("devtools/toolkit/event-emitter");
--- a/browser/devtools/scratchpad/test/browser_scratchpad_pprint_error_goto_line.js
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_pprint_error_goto_line.js
@@ -1,9 +1,9 @@
-/* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
function test()
{
--- a/browser/devtools/scratchpad/test/browser_scratchpad_run_error_goto_line.js
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_run_error_goto_line.js
@@ -1,9 +1,9 @@
-/* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
function test()
{
--- a/browser/devtools/shadereditor/panel.js
+++ b/browser/devtools/shadereditor/panel.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Cc, Ci, Cu, Cr } = require("chrome");
const promise = Cu.import("resource://gre/modules/Promise.jsm", {}).Promise;
--- a/browser/devtools/shared/Curl.jsm
+++ b/browser/devtools/shared/Curl.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org>
--- a/browser/devtools/shared/Parser.jsm
+++ b/browser/devtools/shared/Parser.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Ci = Components.interfaces;
const Cu = Components.utils;
--- a/browser/devtools/shared/inplace-editor.js
+++ b/browser/devtools/shared/inplace-editor.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Basic use:
--- a/browser/devtools/shared/test/unit/test_undoStack.js
+++ b/browser/devtools/shared/test/unit/test_undoStack.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
const Cu = Components.utils;
let {Loader} = Cu.import("resource://gre/modules/commonjs/toolkit/loader.js", {});
let loader = new Loader.Loader({
--- a/browser/devtools/shared/undo.js
+++ b/browser/devtools/shared/undo.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* A simple undo stack manager.
*
--- a/browser/devtools/shared/widgets/BreadcrumbsWidget.jsm
+++ b/browser/devtools/shared/widgets/BreadcrumbsWidget.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Ci = Components.interfaces;
const Cu = Components.utils;
--- a/browser/devtools/shared/widgets/Chart.jsm
+++ b/browser/devtools/shared/widgets/Chart.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Ci = Components.interfaces;
const Cu = Components.utils;
--- a/browser/devtools/shared/widgets/FastListWidget.js
+++ b/browser/devtools/shared/widgets/FastListWidget.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const EventEmitter = require("devtools/toolkit/event-emitter");
const { Cu, Ci } = require("chrome");
--- a/browser/devtools/shared/widgets/SideMenuWidget.jsm
+++ b/browser/devtools/shared/widgets/SideMenuWidget.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Ci = Components.interfaces;
const Cu = Components.utils;
--- a/browser/devtools/shared/widgets/SimpleListWidget.jsm
+++ b/browser/devtools/shared/widgets/SimpleListWidget.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Ci = Components.interfaces;
const Cu = Components.utils;
--- a/browser/devtools/shared/widgets/TreeWidget.js
+++ b/browser/devtools/shared/widgets/TreeWidget.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Services = require("Services")
const HTML_NS = "http://www.w3.org/1999/xhtml";
--- a/browser/devtools/shared/widgets/VariablesView.jsm
+++ b/browser/devtools/shared/widgets/VariablesView.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Ci = Components.interfaces;
const Cu = Components.utils;
--- a/browser/devtools/shared/widgets/VariablesViewController.jsm
+++ b/browser/devtools/shared/widgets/VariablesViewController.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
--- a/browser/devtools/shared/widgets/ViewHelpers.jsm
+++ b/browser/devtools/shared/widgets/ViewHelpers.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Cc = Components.classes;
const Ci = Components.interfaces;
--- a/browser/devtools/sourceeditor/editor.js
+++ b/browser/devtools/sourceeditor/editor.js
@@ -1,9 +1,9 @@
-/* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
/* vim:set ts=2 sw=2 sts=2 et tw=80:
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Cu, Cc, Ci, components } = require("chrome");
--- a/browser/devtools/sourceeditor/test/browser_editor_goto_line.js
+++ b/browser/devtools/sourceeditor/test/browser_editor_goto_line.js
@@ -1,9 +1,9 @@
-/* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
function testJumpToLine (ed, inputLine, expectCursor) {
ed.jumpToLine();
--- a/browser/devtools/styleeditor/styleeditor-panel.js
+++ b/browser/devtools/styleeditor/styleeditor-panel.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const {Cc, Ci, Cu, Cr} = require("chrome");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
--- a/browser/devtools/styleeditor/utils.js
+++ b/browser/devtools/styleeditor/utils.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const {Cc, Ci, Cu, Cr} = require("chrome");
Cu.import("resource://gre/modules/Services.jsm");
--- a/browser/devtools/styleinspector/computed-view.js
+++ b/browser/devtools/styleinspector/computed-view.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const {Cc, Ci, Cu} = require("chrome");
const ToolDefinitions = require("main").Tools;
--- a/browser/devtools/styleinspector/css-parsing-utils.js
+++ b/browser/devtools/styleinspector/css-parsing-utils.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const cssTokenizer = require("devtools/sourceeditor/css-tokenizer");
--- a/browser/devtools/styleinspector/rule-view.js
+++ b/browser/devtools/styleinspector/rule-view.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {Cc, Ci, Cu} = require("chrome");
--- a/browser/devtools/styleinspector/style-inspector-overlays.js
+++ b/browser/devtools/styleinspector/style-inspector-overlays.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
// The style-inspector overlays are:
--- a/browser/devtools/styleinspector/style-inspector.js
+++ b/browser/devtools/styleinspector/style-inspector.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const {Cc, Cu, Ci} = require("chrome");
const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
--- a/browser/devtools/styleinspector/test/unit/test_parseDeclarations.js
+++ b/browser/devtools/styleinspector/test/unit/test_parseDeclarations.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
const Cu = Components.utils;
Cu.import("resource://gre/modules/devtools/Loader.jsm");
const {parseDeclarations} = devtools.require("devtools/styleinspector/css-parsing-utils");
--- a/browser/devtools/styleinspector/test/unit/test_parseSingleValue.js
+++ b/browser/devtools/styleinspector/test/unit/test_parseSingleValue.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
const Cu = Components.utils;
Cu.import("resource://gre/modules/devtools/Loader.jsm");
const {parseSingleValue} = devtools.require("devtools/styleinspector/css-parsing-utils");
--- a/browser/devtools/tilt/TiltWorkerCrafter.js
+++ b/browser/devtools/tilt/TiltWorkerCrafter.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/**
* Given the initialization data (sizes and information about
--- a/browser/devtools/tilt/TiltWorkerPicker.js
+++ b/browser/devtools/tilt/TiltWorkerPicker.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/**
* This worker handles picking, given a set of vertices and a ray (calculates
--- a/browser/devtools/tilt/tilt-gl.js
+++ b/browser/devtools/tilt/tilt-gl.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {Cc, Ci, Cu} = require("chrome");
--- a/browser/devtools/tilt/tilt-math.js
+++ b/browser/devtools/tilt/tilt-math.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {Cu} = require("chrome");
--- a/browser/devtools/tilt/tilt-utils.js
+++ b/browser/devtools/tilt/tilt-utils.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {Cc, Ci, Cu} = require("chrome");
--- a/browser/devtools/tilt/tilt-visualizer-style.js
+++ b/browser/devtools/tilt/tilt-visualizer-style.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript, tab-width: 2, indent-tabs-mode: nil, c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
let {TiltMath} = require("devtools/tilt/tilt-math");
let rgba = TiltMath.hex2rgba;
--- a/browser/devtools/tilt/tilt-visualizer.js
+++ b/browser/devtools/tilt/tilt-visualizer.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {Cu, Ci, ChromeWorker} = require("chrome");
--- a/browser/devtools/tilt/tilt.js
+++ b/browser/devtools/tilt/tilt.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {Cu} = require("chrome");
--- a/browser/devtools/webaudioeditor/panel.js
+++ b/browser/devtools/webaudioeditor/panel.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Cc, Ci, Cu, Cr } = require("chrome");
const EventEmitter = require("devtools/toolkit/event-emitter");
--- a/browser/devtools/webconsole/hudservice.js
+++ b/browser/devtools/webconsole/hudservice.js
@@ -1,9 +1,9 @@
-/* -*- js2-basic-offset: 2; indent-tabs-mode: nil; -*- */
+/* -*- js-indent-level: 2; indent-tabs-mode: nil -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {Cc, Ci, Cu} = require("chrome");
--- a/browser/devtools/webconsole/network-panel.js
+++ b/browser/devtools/webconsole/network-panel.js
@@ -1,9 +1,9 @@
-/* -*- js2-basic-offset: 2; indent-tabs-mode: nil; -*- */
+/* -*- js-indent-level: 2; indent-tabs-mode: nil -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {Cc, Ci, Cu} = require("chrome");
--- a/browser/devtools/webconsole/test/browser_console_variables_view_dom_nodes.js
+++ b/browser/devtools/webconsole/test/browser_console_variables_view_dom_nodes.js
@@ -1,9 +1,9 @@
-/* -*- js2-basic-offset: 2; indent-tabs-mode: nil; -*- */
+/* -*- js-indent-level: 2; indent-tabs-mode: nil -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
/* Test that ensures DOM nodes are rendered correctly in VariablesView. */
function test() {
--- a/browser/devtools/webconsole/test/browser_console_variables_view_dont_sort_non_sortable_classes_properties.js
+++ b/browser/devtools/webconsole/test/browser_console_variables_view_dont_sort_non_sortable_classes_properties.js
@@ -1,9 +1,9 @@
-/* -*- js2-basic-offset: 2; indent-tabs-mode: nil; -*- */
+/* -*- js-indent-level: 2; indent-tabs-mode: nil -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
/* Test case that ensures Array and other list types are not sorted in variables
* view.
*
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_804845_ctrl_key_nav.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_804845_ctrl_key_nav.js
@@ -1,9 +1,9 @@
-/* -*- Mode: js2; js2-basic-offset: 2; indent-tabs-mode: nil; -*- */
+/* -*- js-indent-level: 2; indent-tabs-mode: nil -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* ***** BEGIN LICENSE BLOCK *****
* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*
* Contributor(s):
* zmgmoz <zmgmoz@gmail.com>
*
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_817834_add_edited_input_to_history.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_817834_add_edited_input_to_history.js
@@ -1,9 +1,9 @@
-/* -*- Mode: js2; js2-basic-offset: 2; indent-tabs-mode: nil; -*- */
+/* -*- js-indent-level: 2; indent-tabs-mode: nil -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* ***** BEGIN LICENSE BLOCK *****
* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*
* Contributor(s):
* zmgmoz <zmgmoz@gmail.com>
*
--- a/browser/devtools/webconsole/webconsole.js
+++ b/browser/devtools/webconsole/webconsole.js
@@ -1,9 +1,9 @@
-/* -*- js2-basic-offset: 2; indent-tabs-mode: nil; -*- */
+/* -*- js-indent-level: 2; indent-tabs-mode: nil -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {Cc, Ci, Cu} = require("chrome");
--- a/browser/devtools/webide/webide-prefs.js
+++ b/browser/devtools/webide/webide-prefs.js
@@ -1,9 +1,9 @@
-# -*- Mode: JavaScript; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref("devtools.webide.showProjectEditor", true);
pref("devtools.webide.templatesURL", "http://code.cdn.mozilla.net/templates/list.json");
pref("devtools.webide.autoinstallADBHelper", true);
pref("devtools.webide.lastprojectlocation", "");
--- a/browser/extensions/pdfjs/content/PdfJsTelemetry.jsm
+++ b/browser/extensions/pdfjs/content/PdfJsTelemetry.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2013 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
--- a/browser/extensions/pdfjs/content/PdfRedirector.jsm
+++ b/browser/extensions/pdfjs/content/PdfRedirector.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
--- a/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
+++ b/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
--- a/browser/extensions/pdfjs/content/build/pdf.js
+++ b/browser/extensions/pdfjs/content/build/pdf.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
--- a/browser/extensions/pdfjs/content/build/pdf.worker.js
+++ b/browser/extensions/pdfjs/content/build/pdf.worker.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
--- a/browser/extensions/pdfjs/content/network.js
+++ b/browser/extensions/pdfjs/content/network.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
--- a/browser/extensions/pdfjs/content/web/debugger.js
+++ b/browser/extensions/pdfjs/content/web/debugger.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
--- a/browser/extensions/pdfjs/content/web/l10n.js
+++ b/browser/extensions/pdfjs/content/web/l10n.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* globals FirefoxCom */
'use strict';
// Small subset of the webL10n API by Fabien Cazenave for pdf.js extension.
(function(window) {
var gLanguage = '';
--- a/browser/extensions/pdfjs/content/web/viewer.js
+++ b/browser/extensions/pdfjs/content/web/viewer.js
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
--- a/browser/extensions/shumway/content/ShumwayStreamConverter.jsm
+++ b/browser/extensions/shumway/content/ShumwayStreamConverter.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: js; js-indent-level: 2; indent-tabs-mode: nil; tab-width: 2 -*- */
+/* -*- js-indent-level: 2; indent-tabs-mode: nil -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/*
* Copyright 2013 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
--- a/browser/extensions/shumway/content/ShumwayTelemetry.jsm
+++ b/browser/extensions/shumway/content/ShumwayTelemetry.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2013 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
--- a/browser/extensions/shumway/content/web/avm-sandbox.js
+++ b/browser/extensions/shumway/content/web/avm-sandbox.js
@@ -1,9 +1,9 @@
-/* -*- Mode: js; js-indent-level: 2; indent-tabs-mode: nil; tab-width: 2 -*- */
+/* -*- js-indent-level: 2; indent-tabs-mode: nil -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/*
* Copyright 2013 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
--- a/browser/extensions/shumway/content/web/preview.js
+++ b/browser/extensions/shumway/content/web/preview.js
@@ -1,9 +1,9 @@
-/* -*- Mode: js; js-indent-level: 2; indent-tabs-mode: nil; tab-width: 2 -*- */
+/* -*- js-indent-level: 2; indent-tabs-mode: nil -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/*
* Copyright 2013 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
--- a/browser/installer/windows/nsis/defines.nsi.in
+++ b/browser/installer/windows/nsis/defines.nsi.in
@@ -56,18 +56,18 @@
!if "@MOZ_UPDATE_CHANNEL@" == "beta"
!define BETA_UPDATE_CHANNEL
!endif
!define BaseURLStubPing "http://download-stats.mozilla.org/stub"
# ARCH is used when it is necessary to differentiate the x64 registry keys from
# the x86 registry keys (e.g. the uninstall registry key).
-#ifdef HAVE_64BIT_OS
-!define HAVE_64BIT_OS
+#ifdef HAVE_64BIT_BUILD
+!define HAVE_64BIT_BUILD
!define ARCH "x64"
!define MinSupportedVer "Microsoft Windows Vista x64"
#else
!define ARCH "x86"
!define MinSupportedVer "Microsoft Windows XP SP2"
#endif
#ifdef MOZ_MAINTENANCE_SERVICE
--- a/browser/installer/windows/nsis/installer.nsi
+++ b/browser/installer/windows/nsis/installer.nsi
@@ -121,17 +121,17 @@ VIAddVersionKey "OriginalFilename" "setu
!insertmacro InstallStartCleanupCommon
!insertmacro LeaveDirectoryCommon
!insertmacro LeaveOptionsCommon
!insertmacro OnEndCommon
!insertmacro PreDirectoryCommon
Name "${BrandFullName}"
OutFile "setup.exe"
-!ifdef HAVE_64BIT_OS
+!ifdef HAVE_64BIT_BUILD
InstallDir "$PROGRAMFILES64\${BrandFullName}\"
!else
InstallDir "$PROGRAMFILES32\${BrandFullName}\"
!endif
ShowInstDetails nevershow
################################################################################
# Modern User Interface - MUI
--- a/browser/installer/windows/nsis/stub.nsi
+++ b/browser/installer/windows/nsis/stub.nsi
@@ -264,17 +264,17 @@ VIAddVersionKey "FileDescription" "${Bra
VIAddVersionKey "OriginalFilename" "setup-stub.exe"
Name "$BrandFullName"
OutFile "setup-stub.exe"
icon "setup.ico"
XPStyle on
BrandingText " "
ChangeUI all "nsisui.exe"
-!ifdef HAVE_64BIT_OS
+!ifdef HAVE_64BIT_BUILD
InstallDir "$PROGRAMFILES64\${BrandFullName}\"
!else
InstallDir "$PROGRAMFILES32\${BrandFullName}\"
!endif
!ifdef ${AB_CD}_rtl
LoadLanguageFile "locale-rtl.nlf"
!else
@@ -305,17 +305,17 @@ Function .onInit
; This only effects LoadLibrary calls and not implicitly loaded DLLs.
System::Call 'kernel32::SetDllDirectoryW(w "")'
StrCpy $LANGUAGE 0
; This macro is used to set the brand name variables but the ini file method
; isn't supported for the stub installer.
${SetBrandNameVars} "$PLUGINSDIR\ignored.ini"
-!ifdef HAVE_64BIT_OS
+!ifdef HAVE_64BIT_BUILD
; Restrict x64 builds from being installed on x86 and pre Vista
${Unless} ${RunningX64}
${OrUnless} ${AtLeastWinVista}
MessageBox MB_OK|MB_ICONSTOP "$(WARN_MIN_SUPPORTED_OS_MSG)"
Quit
${EndUnless}
SetRegView 64
@@ -556,17 +556,17 @@ Function SendPing
; Get the seconds elapsed from the end of the pre-installation check phase
; to the completion of the installation phase.
${GetSecondsElapsed} "$EndPreInstallPhaseTickCount" "$EndInstallPhaseTickCount" $3
; Get the seconds elapsed from the end of the installation phase to the
; completion of all phases.
${GetSecondsElapsed} "$EndInstallPhaseTickCount" "$EndFinishPhaseTickCount" $4
-!ifdef HAVE_64BIT_OS
+!ifdef HAVE_64BIT_BUILD
StrCpy $R0 "1"
!else
StrCpy $R0 "0"
!endif
${If} ${RunningX64}
StrCpy $R1 "1"
${Else}
--- a/browser/installer/windows/nsis/uninstaller.nsi
+++ b/browser/installer/windows/nsis/uninstaller.nsi
@@ -123,17 +123,17 @@ VIAddVersionKey "OriginalFilename" "help
!insertmacro OnEndCommon
!insertmacro UninstallOnInitCommon
!insertmacro un.OnEndCommon
!insertmacro un.UninstallUnOnInitCommon
Name "${BrandFullName}"
OutFile "helper.exe"
-!ifdef HAVE_64BIT_OS
+!ifdef HAVE_64BIT_BUILD
InstallDir "$PROGRAMFILES64\${BrandFullName}\"
!else
InstallDir "$PROGRAMFILES32\${BrandFullName}\"
!endif
ShowUnInstDetails nevershow
################################################################################
# Modern User Interface - MUI
--- a/browser/metro/base/content/ContextCommands.js
+++ b/browser/metro/base/content/ContextCommands.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* context menu command handlers
*/
--- a/browser/metro/base/content/Site.js
+++ b/browser/metro/base/content/Site.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
'use strict';
/**
* dumb model class to provide default values for sites.
* link parameter/model object expected to have a .url property, and optionally .title
--- a/browser/metro/base/content/TopSites.js
+++ b/browser/metro/base/content/TopSites.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
'use strict';
/**
* singleton to provide data-level functionality to the views
*/
--- a/browser/metro/base/content/apzc.js
+++ b/browser/metro/base/content/apzc.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let Cc = Components.classes;
let Ci = Components.interfaces;
let Cu = Components.utils;
let Cr = Components.results;
--- a/browser/metro/base/content/bindings/browser.js
+++ b/browser/metro/base/content/bindings/browser.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let Cc = Components.classes;
let Ci = Components.interfaces;
let Cu = Components.utils;
--- a/browser/metro/base/content/browser-scripts.js
+++ b/browser/metro/base/content/browser-scripts.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
/*
--- a/browser/metro/base/content/browser-ui.js
+++ b/browser/metro/base/content/browser-ui.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
Cu.import("resource://gre/modules/devtools/dbg-server.jsm")
Cu.import("resource://gre/modules/WindowsPrefSync.jsm");
--- a/browser/metro/base/content/browser.js
+++ b/browser/metro/base/content/browser.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let Cc = Components.classes;
let Ci = Components.interfaces;
let Cu = Components.utils;
let Cr = Components.results;
--- a/browser/metro/base/content/console.js
+++ b/browser/metro/base/content/console.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let ConsolePanelView = {
_list: null,
_inited: false,
_evalTextbox: null,
--- a/browser/metro/base/content/contenthandlers/Content.js
+++ b/browser/metro/base/content/contenthandlers/Content.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// This stays here because otherwise it's hard to tell if there's a parsing error
dump("### Content.js loaded\n");
let Cc = Components.classes;
--- a/browser/metro/base/content/contenthandlers/FormHelper.js
+++ b/browser/metro/base/content/contenthandlers/FormHelper.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let Ci = Components.interfaces;
let Cc = Components.classes;
dump("### FormHelper.js loaded\n");
--- a/browser/metro/base/content/dbg-metro-actors.js
+++ b/browser/metro/base/content/dbg-metro-actors.js
@@ -1,9 +1,9 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const error = Components.utils.reportError;
/* Metrofx specific actors, modelled from the android fennec actors */
--- a/browser/metro/base/content/downloads.js
+++ b/browser/metro/base/content/downloads.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const URI_GENERIC_ICON_DOWNLOAD = "chrome://browser/skin/images/alert-downloads-30.png";
var MetroDownloadsView = {
/**
--- a/browser/metro/base/content/flyoutpanels/AboutFlyoutPanel.js
+++ b/browser/metro/base/content/flyoutpanels/AboutFlyoutPanel.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
'use strict';
Cu.import("resource://gre/modules/Services.jsm");
let gAppUpdater;
--- a/browser/metro/base/content/flyoutpanels/FlyoutPanelsUI.js
+++ b/browser/metro/base/content/flyoutpanels/FlyoutPanelsUI.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
'use strict';
let FlyoutPanelsUI = {
_isInitialized: false,
--- a/browser/metro/base/content/flyoutpanels/PrefsFlyoutPanel.js
+++ b/browser/metro/base/content/flyoutpanels/PrefsFlyoutPanel.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
'use strict';
Components.utils.import("resource://gre/modules/Services.jsm");
let PrefsFlyoutPanel = {
--- a/browser/metro/base/content/flyoutpanels/SearchFlyoutPanel.js
+++ b/browser/metro/base/content/flyoutpanels/SearchFlyoutPanel.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
Components.utils.import("resource://gre/modules/Services.jsm");
--- a/browser/metro/base/content/flyoutpanels/SyncFlyoutPanel.js
+++ b/browser/metro/base/content/flyoutpanels/SyncFlyoutPanel.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
Components.utils.import("resource://gre/modules/Services.jsm");
let SyncFlyoutPanel = {
--- a/browser/metro/base/content/helperui/FindHelperUI.js
+++ b/browser/metro/base/content/helperui/FindHelperUI.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* We don't support zooming yet, disable Animated zoom by clamping it to the default zoom. */
const kBrowserFindZoomLevelMin = 1;
const kBrowserFindZoomLevelMax = 1;
--- a/browser/metro/base/content/helperui/ItemPinHelper.js
+++ b/browser/metro/base/content/helperui/ItemPinHelper.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
function ItemPinHelper(aUnpinnedPrefName) {
this._prefKey = aUnpinnedPrefName;
--- a/browser/metro/base/content/input.js
+++ b/browser/metro/base/content/input.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; js2-strict-trailing-comma-warning: nil -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2; js2-strict-trailing-comma-warning: nil -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Geometry.jsm");
/*
* Drag scrolling related constants
--- a/browser/metro/base/content/sanitize.js
+++ b/browser/metro/base/content/sanitize.js
@@ -1,9 +1,9 @@
-// -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 4 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
XPCOMUtils.defineLazyModuleGetter(this, "LoadContextInfo",
"resource://gre/modules/LoadContextInfo.jsm");
function Sanitizer() {}
--- a/browser/metro/base/content/sanitizeUI.js
+++ b/browser/metro/base/content/sanitizeUI.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var SanitizeUI = {
_sanitizer: null,
--- a/browser/metro/base/content/startui/RemoteTabsView.js
+++ b/browser/metro/base/content/startui/RemoteTabsView.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Cu = Components.utils;
--- a/browser/metro/base/tests/mochitest/browser_apzc_basic.js
+++ b/browser/metro/base/tests/mochitest/browser_apzc_basic.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
function test() {
if (!isLandscapeMode()) {
todo(false, "browser_snapped_tests need landscape mode to run.");
--- a/browser/metro/base/tests/mochitest/browser_bookmarks.js
+++ b/browser/metro/base/tests/mochitest/browser_bookmarks.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
let gStartView = null;
--- a/browser/metro/base/tests/mochitest/browser_canonizeURL.js
+++ b/browser/metro/base/tests/mochitest/browser_canonizeURL.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
function test() {
let testcases = [
--- a/browser/metro/base/tests/mochitest/browser_colorUtils.js
+++ b/browser/metro/base/tests/mochitest/browser_colorUtils.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
function test() {
runTests();
--- a/browser/metro/base/tests/mochitest/browser_context_menu_tests.js
+++ b/browser/metro/base/tests/mochitest/browser_context_menu_tests.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
function debugClipFlavors(aClip)
{
--- a/browser/metro/base/tests/mochitest/browser_context_ui.js
+++ b/browser/metro/base/tests/mochitest/browser_context_ui.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
function test() {
runTests();
--- a/browser/metro/base/tests/mochitest/browser_crashprompt.js
+++ b/browser/metro/base/tests/mochitest/browser_crashprompt.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Ci = Components.interfaces;
const Cm = Components.manager;
--- a/browser/metro/base/tests/mochitest/browser_downloads.js
+++ b/browser/metro/base/tests/mochitest/browser_downloads.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
/**
* Provides infrastructure for automated download components tests.
--- a/browser/metro/base/tests/mochitest/browser_flyouts.js
+++ b/browser/metro/base/tests/mochitest/browser_flyouts.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
gTests.push({
desc: "about flyout hides navbar, clears navbar selection, doesn't leak",
--- a/browser/metro/base/tests/mochitest/browser_form_auto_complete.js
+++ b/browser/metro/base/tests/mochitest/browser_form_auto_complete.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
function clearFormHistory() {
FormHistory.update({ op : "remove" });
--- a/browser/metro/base/tests/mochitest/browser_form_selects.js
+++ b/browser/metro/base/tests/mochitest/browser_form_selects.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
function test() {
runTests();
--- a/browser/metro/base/tests/mochitest/browser_history.js
+++ b/browser/metro/base/tests/mochitest/browser_history.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
let gStartView = null;
--- a/browser/metro/base/tests/mochitest/browser_inputsource.js
+++ b/browser/metro/base/tests/mochitest/browser_inputsource.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/*=============================================================================
Test cases
--- a/browser/metro/base/tests/mochitest/browser_menu_hoverstate.js
+++ b/browser/metro/base/tests/mochitest/browser_menu_hoverstate.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
function test() {
if (!isLandscapeMode()) {
todo(false, "browser_snapped_tests need landscape mode to run.");
--- a/browser/metro/base/tests/mochitest/browser_prefs_ui.js
+++ b/browser/metro/base/tests/mochitest/browser_prefs_ui.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Ci = Components.interfaces;
const Cm = Components.manager;
--- a/browser/metro/base/tests/mochitest/browser_remotetabs.js
+++ b/browser/metro/base/tests/mochitest/browser_remotetabs.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
////////////////////////////////////////////////////////////////////////////////
//// Globals
--- a/browser/metro/base/tests/mochitest/browser_selection_basic.js
+++ b/browser/metro/base/tests/mochitest/browser_selection_basic.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
let gWindow = null;
var gFrame = null;
--- a/browser/metro/base/tests/mochitest/browser_selection_caretfocus.js
+++ b/browser/metro/base/tests/mochitest/browser_selection_caretfocus.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
let gWindow = null;
--- a/browser/metro/base/tests/mochitest/browser_selection_contenteditable.js
+++ b/browser/metro/base/tests/mochitest/browser_selection_contenteditable.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
let gWindow = null;
const kCommonWaitMs = 5000;
--- a/browser/metro/base/tests/mochitest/browser_selection_frame_content.js
+++ b/browser/metro/base/tests/mochitest/browser_selection_frame_content.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
let gWindow = null;
var gFrame = null;
--- a/browser/metro/base/tests/mochitest/browser_selection_frame_in_scrollable_container.js
+++ b/browser/metro/base/tests/mochitest/browser_selection_frame_in_scrollable_container.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
let gWindow = null;
var gFrame = null;
--- a/browser/metro/base/tests/mochitest/browser_selection_frame_inputs.js
+++ b/browser/metro/base/tests/mochitest/browser_selection_frame_inputs.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
let gWindow = null;
var gFrame = null;
--- a/browser/metro/base/tests/mochitest/browser_selection_frame_textarea.js
+++ b/browser/metro/base/tests/mochitest/browser_selection_frame_textarea.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
let gWindow = null;
var gFrame = null;
--- a/browser/metro/base/tests/mochitest/browser_selection_inputs.js
+++ b/browser/metro/base/tests/mochitest/browser_selection_inputs.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
let gWindow = null;
var gInput = null;
--- a/browser/metro/base/tests/mochitest/browser_selection_textarea.js
+++ b/browser/metro/base/tests/mochitest/browser_selection_textarea.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
let gWindow = null;
var gFrame = null;
--- a/browser/metro/base/tests/mochitest/browser_selection_urlbar.js
+++ b/browser/metro/base/tests/mochitest/browser_selection_urlbar.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
let gWindow = null;
var gFrame = null;
--- a/browser/metro/base/tests/mochitest/browser_snappedState.js
+++ b/browser/metro/base/tests/mochitest/browser_snappedState.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
var gStartDoc = null;
function test() {
--- a/browser/metro/base/tests/mochitest/browser_tabs.js
+++ b/browser/metro/base/tests/mochitest/browser_tabs.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
let mockTab = function(aName, aIsClosing) {
this.name = aName;
--- a/browser/metro/base/tests/mochitest/browser_tabs_container.js
+++ b/browser/metro/base/tests/mochitest/browser_tabs_container.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
function test() {
runTests();
--- a/browser/metro/base/tests/mochitest/browser_topsites.js
+++ b/browser/metro/base/tests/mochitest/browser_topsites.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
//////////////////////////////////////////////////////////////////////////
// Test helpers
--- a/browser/metro/base/tests/mochitest/browser_ui_telemetry.js
+++ b/browser/metro/base/tests/mochitest/browser_ui_telemetry.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
function test() {
runTests();
--- a/browser/metro/base/tests/mochitest/browser_urlbar.js
+++ b/browser/metro/base/tests/mochitest/browser_urlbar.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var gEdit = null;
--- a/browser/metro/base/tests/mochitest/browser_urlbar_highlightURLs.js
+++ b/browser/metro/base/tests/mochitest/browser_urlbar_highlightURLs.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
const kHighlightPref = "browser.urlbar.formatting.enabled";
var gHighlightPrefValue;
--- a/browser/metro/base/tests/mochitest/browser_urlbar_trimURLs.js
+++ b/browser/metro/base/tests/mochitest/browser_urlbar_trimURLs.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
const kTrimPref = "browser.urlbar.trimURLs";
var gTrimPrefValue;
--- a/browser/metro/base/tests/mochitest/head.js
+++ b/browser/metro/base/tests/mochitest/head.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/*=============================================================================
Globals
=============================================================================*/
XPCOMUtils.defineLazyModuleGetter(this, "Promise", "resource://gre/modules/Promise.jsm");
--- a/browser/metro/base/tests/mochitest/helpers/BookmarksHelper.js
+++ b/browser/metro/base/tests/mochitest/helpers/BookmarksHelper.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
var BookmarksTestHelper = {
_originalNavHistoryService: null,
_startView: null,
--- a/browser/metro/base/tests/mochitest/helpers/HistoryHelper.js
+++ b/browser/metro/base/tests/mochitest/helpers/HistoryHelper.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
var HistoryTestHelper = {
_originalNavHistoryService: null,
_startView: null,
--- a/browser/metro/base/tests/mochitest/helpers/ViewStateHelper.js
+++ b/browser/metro/base/tests/mochitest/helpers/ViewStateHelper.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const snappedSize = 330;
const portraitSize = 900;
--- a/browser/metro/base/tests/unit/test_util_populateFragmentFromString.js
+++ b/browser/metro/base/tests/unit/test_util_populateFragmentFromString.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
Components.utils.import("resource:///modules/ContentUtil.jsm");
let Util = ContentUtil;
--- a/browser/metro/components/AboutRedirector.js
+++ b/browser/metro/components/AboutRedirector.js
@@ -1,9 +1,9 @@
- // -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+ // -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const Cc = Components.classes;
const Ci = Components.interfaces;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
--- a/browser/metro/components/BrowserCLH.js
+++ b/browser/metro/components/BrowserCLH.js
@@ -1,9 +1,9 @@
-/* -*- Mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/* -*- js-indent-level: 4; indent-tabs-mode: nil -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
const nsIBrowserSearchService = Components.interfaces.nsIBrowserSearchService;
--- a/browser/metro/components/PromptService.js
+++ b/browser/metro/components/PromptService.js
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const Ci = Components.interfaces;
const Cc = Components.classes;
const Cr = Components.results;
const Cu = Components.utils;
--- a/browser/metro/modules/colorUtils.jsm
+++ b/browser/metro/modules/colorUtils.jsm
@@ -1,9 +1,9 @@
-// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
'use strict';
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/Promise.jsm");
const ColorAnalyzer = Components.classes["@mozilla.org/places/colorAnalyzer;1"]
--- a/browser/modules/WindowsJumpLists.jsm
+++ b/browser/modules/WindowsJumpLists.jsm
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
/**
--- a/build/autoconf/ffi.m4
+++ b/build/autoconf/ffi.m4
@@ -66,25 +66,25 @@ if test -z "$BUILDING_JS" -o -n "$JS_STA
ac_configure_args="$ac_configure_args \
CC=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh$flags\" \
CXX=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh$flags\""
;;
esac
fi
if test "$SOLARIS_SUNPRO_CC"; then
# Always use gcc for libffi on Solaris
- if test ! "$HAVE_64BIT_OS"; then
+ if test ! "$HAVE_64BIT_BUILD"; then
ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-m32 LD= LDFLAGS="
else
ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-m64 LD= LDFLAGS="
fi
fi
if test "$AIX_IBM_XLC"; then
# Always use gcc for libffi on IBM AIX5/AIX6
- if test ! "$HAVE_64BIT_OS"; then
+ if test ! "$HAVE_64BIT_BUILD"; then
ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-maix32"
else
ac_configure_args="$ac_configure_args CC=gcc CFLAGS=-maix64"
fi
fi
# Use a separate cache file for libffi, since it does things differently
# from our configure.
--- a/build/gyp.mozbuild
+++ b/build/gyp.mozbuild
@@ -54,17 +54,17 @@ gyp_vars = {
'include_pcm16b': 1,
}
os = CONFIG['OS_TARGET']
if os == 'WINNT':
gyp_vars.update(
MSVS_VERSION=CONFIG['_MSVS_VERSION'],
- MSVS_OS_BITS=64 if CONFIG['HAVE_64BIT_OS'] else 32,
+ MSVS_OS_BITS=64 if CONFIG['HAVE_64BIT_BUILD'] else 32,
)
elif os == 'Android':
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
gyp_vars['build_with_gonk'] = 1
gyp_vars['moz_widget_toolkit_gonk'] = 1
if int(CONFIG['ANDROID_VERSION']) >= 18:
gyp_vars['moz_webrtc_omx'] = 1
else:
--- a/build/pgo/profileserver.py
+++ b/build/pgo/profileserver.py
@@ -52,17 +52,17 @@ if __name__ == '__main__':
addons=[os.path.join(build.distdir, 'xpi-stage', 'quitter')],
locations=locations)
env = os.environ.copy()
env["MOZ_CRASHREPORTER_NO_REPORT"] = "1"
env["XPCOM_DEBUG_BREAK"] = "warn"
# For VC12, make sure we can find the right bitness of pgort120.dll
- if "VS120COMNTOOLS" in env and not substs["HAVE_64BIT_OS"]:
+ if "VS120COMNTOOLS" in env and not substs["HAVE_64BIT_BUILD"]:
vc12dir = os.path.abspath(os.path.join(env["VS120COMNTOOLS"],
"../../VC/bin"))
if os.path.exists(vc12dir):
env["PATH"] = vc12dir + ";" + env["PATH"]
jarlog = os.getenv("JARLOG_FILE")
if jarlog:
env["MOZ_JAR_LOG_FILE"] = os.path.abspath(jarlog)
--- a/chrome/test/unit/test_data_protocol_registration.js
+++ b/chrome/test/unit/test_data_protocol_registration.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
* vim: sw=2 ts=2 sts=2 tw=78 expandtab :
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let manifests = [
do_get_file("data/test_data_protocol_registration.manifest"),
];
--- a/chrome/test/unit/test_no_remote_registration.js
+++ b/chrome/test/unit/test_no_remote_registration.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
* vim: sw=2 ts=2 sts=2 tw=78 expandtab :
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let manifests = [
do_get_file("data/test_no_remote_registration.manifest"),
];
--- a/chrome/test/unit/test_resolve_uris.js
+++ b/chrome/test/unit/test_resolve_uris.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// head_crtestutils.js doesn't get included in the child by default
if (typeof registerManifests === "undefined") {
load("../unit/head_crtestutils.js");
}
--- a/client.mk
+++ b/client.mk
@@ -124,16 +124,17 @@ export FOUND_MOZCONFIG
MOZCONFIG_OUT_LINES := $(subst $(CR), ,$(subst $(NULL) $(NULL),||,$(MOZCONFIG_CONTENT)))
# Filter-out comments from those lines.
START_COMMENT = \#
MOZCONFIG_OUT_FILTERED := $(filter-out $(START_COMMENT)%,$(MOZCONFIG_OUT_LINES))
ifdef AUTOCLOBBER
export AUTOCLOBBER=1
endif
+export MOZ_PGO
ifdef MOZ_PARALLEL_BUILD
MOZ_MAKE_FLAGS := $(filter-out -j%,$(MOZ_MAKE_FLAGS))
MOZ_MAKE_FLAGS += -j$(MOZ_PARALLEL_BUILD)
endif
# Automatically add -jN to make flags if not defined. N defaults to number of cores.
ifeq (,$(findstring -j,$(MOZ_MAKE_FLAGS)))
--- a/config/config.mk
+++ b/config/config.mk
@@ -290,30 +290,30 @@ endif
else # ! MOZ_DEBUG
# MOZ_DEBUG_SYMBOLS generates debug symbols in separate PDB files.
# Used for generating an optimized build with debugging symbols.
# Used in the Windows nightlies to generate symbols for crash reporting.
ifdef MOZ_DEBUG_SYMBOLS
OS_CXXFLAGS += -UDEBUG -DNDEBUG
OS_CFLAGS += -UDEBUG -DNDEBUG
-ifdef HAVE_64BIT_OS
+ifdef HAVE_64BIT_BUILD
OS_LDFLAGS += -DEBUG -OPT:REF,ICF
else
OS_LDFLAGS += -DEBUG -OPT:REF
endif
endif
#
# Handle trace-malloc and DMD in optimized builds.
# No opt to give sane callstacks.
#
ifneq (,$(NS_TRACE_MALLOC)$(MOZ_DMD))
MOZ_OPTIMIZE_FLAGS=-Zi -Od -UDEBUG -DNDEBUG
-ifdef HAVE_64BIT_OS
+ifdef HAVE_64BIT_BUILD
OS_LDFLAGS = -DEBUG -OPT:REF,ICF
else
OS_LDFLAGS = -DEBUG -OPT:REF
endif
endif # NS_TRACE_MALLOC || MOZ_DMD
endif # MOZ_DEBUG
--- a/configure.in
+++ b/configure.in
@@ -1585,20 +1585,20 @@ if test "$COMPILE_ENVIRONMENT"; then
AC_LANG_SAVE
AC_LANG_C
AC_MSG_CHECKING(for 64-bit OS)
AC_TRY_COMPILE([$configure_static_assert_macros],
[CONFIGURE_STATIC_ASSERT(sizeof(void*) == 8)],
result="yes", result="no")
AC_MSG_RESULT("$result")
if test "$result" = "yes"; then
- AC_DEFINE(HAVE_64BIT_OS)
- HAVE_64BIT_OS=1
-fi
-AC_SUBST(HAVE_64BIT_OS)
+ AC_DEFINE(HAVE_64BIT_BUILD)
+ HAVE_64BIT_BUILD=1
+fi
+AC_SUBST(HAVE_64BIT_BUILD)
AC_LANG_RESTORE
fi # COMPILE_ENVIRONMENT
dnl ========================================================
dnl = Use profiling compile flags
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(profiling,
[ --enable-profiling Set compile flags necessary for using sampling profilers (e.g. shark, perf)],
@@ -1825,17 +1825,17 @@ MOZ_DOING_LTO(lto_is_enabled)
dnl ========================================================
dnl System overrides of the defaults for target
dnl ========================================================
case "$target" in
*-aix*)
AC_DEFINE(AIX)
if test ! "$GNU_CC"; then
- if test ! "$HAVE_64BIT_OS"; then
+ if test ! "$HAVE_64BIT_BUILD"; then
# Compiling with Visual Age C++ object model compat is the
# default. To compile with object model ibm, add
# AIX_OBJMODEL=ibm to .mozconfig.
if test "$AIX_OBJMODEL" = "ibm"; then
CXXFLAGS="$CXXFLAGS -qobjmodel=ibm"
else
AIX_OBJMODEL=compat
fi
@@ -1882,17 +1882,17 @@ case "$target" in
AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
;;
*-darwin*)
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
MOZ_OPTIMIZE_FLAGS="-O3"
# Statically disable jemalloc on 10.5 and 32-bit 10.6. See bug 702250.
- if test "$HAVE_64BIT_OS"; then
+ if test "$HAVE_64BIT_BUILD"; then
MOZ_MEMORY=1
fi
DLL_SUFFIX=".dylib"
DSO_LDOPTS=''
STRIP_FLAGS="$STRIP_FLAGS -x -S"
# Check whether we're targeting OS X or iOS
AC_CACHE_CHECK(for iOS target,
ac_cv_ios_target,
@@ -2226,17 +2226,17 @@ ia64*-hpux*)
case "$host_os" in
cygwin*|msvc*|mks*)
AC_MSG_ERROR([Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites.])
;;
esac
case "$target" in
i*86-*)
- if test "$HAVE_64BIT_OS"; then
+ if test "$HAVE_64BIT_BUILD"; then
AC_MSG_ERROR([You are targeting i386 but using the 64-bit compiler.])
fi
if test -n "$GNU_CC"; then
CFLAGS="$CFLAGS -mstackrealign -fno-keep-inline-dllexport"
CXXFLAGS="$CXXFLAGS -mstackrealign -fno-keep-inline-dllexport"
LDFLAGS="$LDFLAGS -Wl,--enable-stdcall-fixup -Wl,--large-address-aware"
else
@@ -3371,16 +3371,17 @@ if test "$ac_cv_i18n_lc_messages" = yes;
fi
AC_HAVE_FUNCS(localeconv)
fi # ! SKIP_COMPILER_CHECKS
TARGET_XPCOM_ABI=
if test -n "${CPU_ARCH}" -a -n "${TARGET_COMPILER_ABI}"; then
TARGET_XPCOM_ABI="${CPU_ARCH}-${TARGET_COMPILER_ABI}"
+ AC_DEFINE_UNQUOTED(TARGET_XPCOM_ABI, ["${TARGET_XPCOM_ABI}"])
fi
dnl Mozilla specific options
dnl ========================================================
dnl The macros used for command line options
dnl are defined in build/autoconf/altoptions.m4.
dnl If the compiler supports these attributes, define them as
@@ -6002,17 +6003,17 @@ if test -n "$MOZ_CRASHREPORTER"; then
if test "$OS_TARGET" = "Linux" -o "$OS_ARCH" = "SunOS" && \
test -z "$SKIP_LIBRARY_CHECKS"; then
PKG_CHECK_MODULES(MOZ_GTHREAD, gthread-2.0)
AC_SUBST(MOZ_GTHREAD_CFLAGS)
AC_SUBST(MOZ_GTHREAD_LIBS)
fi
if test "$OS_ARCH" = "WINNT"; then
- if test -z "$HAVE_64BIT_OS"; then
+ if test -z "$HAVE_64BIT_BUILD"; then
MOZ_CRASHREPORTER_INJECTOR=1
AC_DEFINE(MOZ_CRASHREPORTER_INJECTOR)
fi
fi
fi
MOZ_ARG_WITH_STRING(crashreporter-enable-percent,
[ --with-crashreporter-enable-percent=NN
@@ -6792,16 +6793,17 @@ fi
fi # COMPILE_ENVIRONMENT
AC_SUBST(MOZ_OPTIMIZE)
AC_SUBST(MOZ_FRAMEPTR_FLAGS)
AC_SUBST(MOZ_OPTIMIZE_FLAGS)
AC_SUBST(MOZ_OPTIMIZE_LDFLAGS)
AC_SUBST(MOZ_ALLOW_HEAP_EXECUTE_FLAGS)
AC_SUBST(MOZ_OPTIMIZE_SIZE_TWEAK)
+AC_SUBST(MOZ_PGO)
AC_SUBST(MOZ_PGO_OPTIMIZE_FLAGS)
dnl ========================================================
dnl = Enable any treating of compile warnings as errors
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(warnings-as-errors,
[ --enable-warnings-as-errors
Enable treating of warnings as errors],
@@ -9143,17 +9145,17 @@ if test -z "$MOZ_NATIVE_NSPR"; then
ac_configure_args="$ac_configure_args --disable-debug-rtl"
fi
fi
if test "$MOZ_OPTIMIZE" = "1"; then
ac_configure_args="$ac_configure_args --enable-optimize"
elif test -z "$MOZ_OPTIMIZE"; then
ac_configure_args="$ac_configure_args --disable-optimize"
fi
- if test -n "$HAVE_64BIT_OS"; then
+ if test -n "$HAVE_64BIT_BUILD"; then
ac_configure_args="$ac_configure_args --enable-64bit"
fi
if test -n "$USE_ARM_KUSER"; then
ac_configure_args="$ac_configure_args --with-arm-kuser"
fi
# A configure script generated by autoconf 2.68 does not allow the cached
# values of "precious" variables such as CFLAGS and LDFLAGS to differ from
# the values passed to the configure script. Since we modify CFLAGS and
--- a/content/base/public/Element.h
+++ b/content/base/public/Element.h
@@ -1187,31 +1187,32 @@ private:
// Data members
EventStates mState;
};
class DestinationInsertionPointList : public nsINodeList
{
public:
DestinationInsertionPointList(Element* aElement);
- virtual ~DestinationInsertionPointList();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(DestinationInsertionPointList)
// nsIDOMNodeList
NS_DECL_NSIDOMNODELIST
// nsINodeList
virtual nsIContent* Item(uint32_t aIndex);
virtual int32_t IndexOf(nsIContent* aContent);
virtual nsINode* GetParentObject() { return mParent; }
virtual uint32_t Length() const;
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
protected:
+ virtual ~DestinationInsertionPointList();
+
nsRefPtr<Element> mParent;
nsCOMArray<nsIContent> mDestinationPoints;
};
NS_DEFINE_STATIC_IID_ACCESSOR(Element, NS_ELEMENT_IID)
inline bool
Element::HasAttr(int32_t aNameSpaceID, nsIAtom* aName) const
--- a/content/base/public/FragmentOrElement.h
+++ b/content/base/public/FragmentOrElement.h
@@ -73,16 +73,18 @@ public:
}
virtual nsINode* GetParentObject() MOZ_OVERRIDE
{
return mNode;
}
private:
+ ~nsChildContentList() {}
+
// The node whose children make up the list (weak reference)
nsINode* mNode;
};
/**
* A tearoff class for FragmentOrElement to implement additional interfaces
*/
class nsNode3Tearoff : public nsIDOMXPathNSResolver
@@ -112,31 +114,31 @@ private:
class nsNodeWeakReference MOZ_FINAL : public nsIWeakReference
{
public:
nsNodeWeakReference(nsINode* aNode)
: mNode(aNode)
{
}
- ~nsNodeWeakReference();
-
// nsISupports
NS_DECL_ISUPPORTS
// nsIWeakReference
NS_DECL_NSIWEAKREFERENCE
virtual size_t SizeOfOnlyThis(mozilla::MallocSizeOf aMallocSizeOf) const;
void NoticeNodeDestruction()
{
mNode = nullptr;
}
private:
+ ~nsNodeWeakReference();
+
nsINode* mNode;
};
/**
* Tearoff to use for nodes to implement nsISupportsWeakReference
*/
class nsNodeSupportsWeakRefTearoff MOZ_FINAL : public nsISupportsWeakReference
{
@@ -150,16 +152,18 @@ public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
// nsISupportsWeakReference
NS_DECL_NSISUPPORTSWEAKREFERENCE
NS_DECL_CYCLE_COLLECTION_CLASS(nsNodeSupportsWeakRefTearoff)
private:
+ ~nsNodeSupportsWeakRefTearoff() {}
+
nsCOMPtr<nsINode> mNode;
};
/**
* A generic base class for DOM elements, implementing many nsIContent,
* nsIDOMNode and nsIDOMElement methods.
*/
namespace mozilla {
@@ -168,17 +172,16 @@ namespace dom {
class ShadowRoot;
class UndoManager;
class FragmentOrElement : public nsIContent
{
public:
FragmentOrElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
FragmentOrElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
- virtual ~FragmentOrElement();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_SIZEOF_EXCLUDING_THIS
// nsINode interface methods
virtual uint32_t GetChildCount() const MOZ_OVERRIDE;
virtual nsIContent *GetChildAt(uint32_t aIndex) const MOZ_OVERRIDE;
@@ -288,16 +291,18 @@ public:
static void MarkNodeChildren(nsINode* aNode);
static void InitCCCallbacks();
static void MarkUserData(void* aObject, nsIAtom* aKey, void* aChild,
void *aData);
static void MarkUserDataHandler(void* aObject, nsIAtom* aKey, void* aChild,
void* aData);
protected:
+ virtual ~FragmentOrElement();
+
/**
* Copy attributes and state to another element
* @param aDest the object to copy to
*/
nsresult CopyInnerTo(FragmentOrElement* aDest);
public:
// Because of a bug in MS C++ compiler nsDOMSlots must be declared public,
--- a/content/base/public/nsDOMFile.h
+++ b/content/base/public/nsDOMFile.h
@@ -180,16 +180,19 @@ public:
: nsDOMFileBase(aContentType, aLength)
{ }
nsDOMFile(const nsAString& aContentType, uint64_t aStart, uint64_t aLength)
: nsDOMFileBase(aContentType, aStart, aLength)
{ }
NS_DECL_THREADSAFE_ISUPPORTS
+
+protected:
+ ~nsDOMFile() {}
};
class nsDOMFileCC : public nsDOMFileBase
{
public:
nsDOMFileCC(const nsAString& aName, const nsAString& aContentType,
uint64_t aLength)
: nsDOMFileBase(aName, aContentType, aLength)
@@ -201,16 +204,19 @@ public:
nsDOMFileCC(const nsAString& aContentType, uint64_t aStart, uint64_t aLength)
: nsDOMFileBase(aContentType, aStart, aLength)
{ }
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsDOMFileCC, nsIDOMFile)
+
+protected:
+ ~nsDOMFileCC() {}
};
class nsDOMFileFile : public nsDOMFile
{
public:
// Create as a file
nsDOMFileFile(nsIFile *aFile)
: nsDOMFile(EmptyString(), EmptyString(), UINT64_MAX, UINT64_MAX),
@@ -302,16 +308,18 @@ public:
NS_IMETHOD GetLastModifiedDate(JSContext* cx, JS::MutableHandle<JS::Value> aLastModifiedDate) MOZ_OVERRIDE;
NS_IMETHOD GetMozLastModifiedDate(uint64_t* aLastModifiedDate) MOZ_OVERRIDE;
NS_IMETHOD GetMozFullPathInternal(nsAString& aFullPath) MOZ_OVERRIDE;
NS_IMETHOD GetInternalStream(nsIInputStream**) MOZ_OVERRIDE;
void SetPath(const nsAString& aFullPath);
protected:
+ ~nsDOMFileFile() {}
+
// Create slice
nsDOMFileFile(const nsDOMFileFile* aOther, uint64_t aStart, uint64_t aLength,
const nsAString& aContentType)
: nsDOMFile(aContentType, aOther->mStart + aStart, aLength),
mFile(aOther->mFile), mWholeFile(false),
mStoredFile(aOther->mStoredFile)
{
NS_ASSERTION(mFile, "must have file");
@@ -382,16 +390,18 @@ public:
NS_ASSERTION(mDataOwner && mDataOwner->mData, "must have data");
}
NS_IMETHOD GetInternalStream(nsIInputStream**) MOZ_OVERRIDE;
NS_IMETHOD_(bool) IsMemoryFile(void) MOZ_OVERRIDE;
protected:
+ ~nsDOMMemoryFile() {}
+
// Create slice
nsDOMMemoryFile(const nsDOMMemoryFile* aOther, uint64_t aStart,
uint64_t aLength, const nsAString& aContentType)
: nsDOMFile(aContentType, aOther->mStart + aStart, aLength),
mDataOwner(aOther->mDataOwner)
{
NS_ASSERTION(mDataOwner && mDataOwner->mData, "must have data");
mImmutable = aOther->mImmutable;
@@ -450,16 +460,18 @@ protected:
// Used when backed by a memory store
nsRefPtr<DataOwner> mDataOwner;
};
class nsDOMFileList MOZ_FINAL : public nsIDOMFileList,
public nsWrapperCache
{
+ ~nsDOMFileList() {}
+
public:
nsDOMFileList(nsISupports *aParent) : mParent(aParent)
{
SetIsDOMBinding();
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMFileList)
--- a/content/base/public/nsHostObjectProtocolHandler.h
+++ b/content/base/public/nsHostObjectProtocolHandler.h
@@ -26,17 +26,16 @@ namespace dom {
class MediaSource;
}
}
class nsHostObjectProtocolHandler : public nsIProtocolHandler
{
public:
nsHostObjectProtocolHandler();
- virtual ~nsHostObjectProtocolHandler() {}
NS_DECL_ISUPPORTS
// nsIProtocolHandler methods, except for GetScheme which is only defined
// in subclasses.
NS_IMETHOD GetDefaultPort(int32_t *aDefaultPort) MOZ_OVERRIDE;
NS_IMETHOD GetProtocolFlags(uint32_t *aProtocolFlags) MOZ_OVERRIDE;
NS_IMETHOD NewURI(const nsACString & aSpec, const char * aOriginCharset, nsIURI *aBaseURI, nsIURI * *_retval) MOZ_OVERRIDE;
NS_IMETHOD NewChannel(nsIURI *aURI, nsIChannel * *_retval) MOZ_OVERRIDE;
@@ -50,16 +49,19 @@ public:
static nsresult AddDataEntry(const nsACString& aScheme,
nsISupports* aObject,
nsIPrincipal* aPrincipal,
nsACString& aUri);
static void RemoveDataEntry(const nsACString& aUri);
static nsIPrincipal* GetDataEntryPrincipal(const nsACString& aUri);
static void Traverse(const nsACString& aUri, nsCycleCollectionTraversalCallback& aCallback);
+protected:
+ virtual ~nsHostObjectProtocolHandler() {}
+
private:
static void Init(void);
};
class nsBlobProtocolHandler : public nsHostObjectProtocolHandler
{
public:
NS_IMETHOD GetScheme(nsACString &result) MOZ_OVERRIDE;
--- a/content/base/public/nsReferencedElement.h
+++ b/content/base/public/nsReferencedElement.h
@@ -160,21 +160,22 @@ private:
DocumentLoadNotification(nsReferencedElement* aTarget,
const nsString& aRef) :
Notification(aTarget)
{
if (!mTarget->IsPersistent()) {
mRef = aRef;
}
}
- virtual ~DocumentLoadNotification() {}
NS_DECL_ISUPPORTS
NS_DECL_NSIOBSERVER
private:
+ virtual ~DocumentLoadNotification() {}
+
virtual void SetTo(Element* aTo) { }
nsString mRef;
};
friend class DocumentLoadNotification;
nsCOMPtr<nsIAtom> mWatchID;
nsCOMPtr<nsIDocument> mWatchDocument;
--- a/content/base/src/Attr.h
+++ b/content/base/src/Attr.h
@@ -25,22 +25,23 @@ namespace mozilla {
class EventChainPreVisitor;
namespace dom {
// Attribute helper class used to wrap up an attribute with a dom
// object that implements nsIDOMAttr and nsIDOMNode
class Attr MOZ_FINAL : public nsIAttribute,
public nsIDOMAttr
{
+ virtual ~Attr() {}
+
public:
Attr(nsDOMAttributeMap* aAttrMap,
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
const nsAString& aValue,
bool aNsAware);
- virtual ~Attr() {}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
// nsIDOMNode interface
NS_FORWARD_NSIDOMNODE_TO_NSINODE
virtual void GetTextContentInternal(nsAString& aTextContent) MOZ_OVERRIDE;
virtual void SetTextContentInternal(const nsAString& aTextContent,
ErrorResult& aError) MOZ_OVERRIDE;
--- a/content/base/src/DOMImplementation.h
+++ b/content/base/src/DOMImplementation.h
@@ -22,34 +22,34 @@ class nsIDOMDocument;
namespace mozilla {
namespace dom {
class DocumentType;
class DOMImplementation MOZ_FINAL : public nsIDOMDOMImplementation
, public nsWrapperCache
{
+ ~DOMImplementation()
+ {
+ }
+
public:
DOMImplementation(nsIDocument* aOwner,
nsIGlobalObject* aScriptObject,
nsIURI* aDocumentURI,
nsIURI* aBaseURI)
: mOwner(aOwner)
, mScriptObject(do_GetWeakReference(aScriptObject))
, mDocumentURI(aDocumentURI)
, mBaseURI(aBaseURI)
{
MOZ_ASSERT(aOwner);
SetIsDOMBinding();
}
- ~DOMImplementation()
- {
- }
-
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMImplementation)
nsIDocument* GetParentObject() const
{
return mOwner;
}
new file mode 100644
--- /dev/null
+++ b/content/base/src/DOMMatrix.cpp
@@ -0,0 +1,650 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "mozilla/dom/BindingUtils.h"
+#include "mozilla/dom/DOMMatrixBinding.h"
+#include "mozilla/dom/DOMPointBinding.h"
+#include "mozilla/dom/BindingDeclarations.h"
+#include "mozilla/dom/ToJSValue.h"
+
+#include "mozilla/dom/DOMPoint.h"
+#include "mozilla/dom/DOMMatrix.h"
+
+#include "SVGTransformListParser.h"
+#include "SVGTransform.h"
+
+#include "nsAutoPtr.h"
+#include <math.h>
+
+namespace mozilla {
+namespace dom {
+
+static const double radPerDegree = 2.0 * M_PI / 360.0;
+
+already_AddRefed<DOMMatrix>
+DOMMatrixReadOnly::Translate(double aTx,
+ double aTy,
+ double aTz) const
+{
+ nsRefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
+ retval->TranslateSelf(aTx, aTy, aTz);
+
+ return retval.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrixReadOnly::Scale(double aScale,
+ double aOriginX,
+ double aOriginY) const
+{
+ nsRefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
+ retval->ScaleSelf(aScale, aOriginX, aOriginY);
+
+ return retval.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrixReadOnly::Scale3d(double aScale,
+ double aOriginX,
+ double aOriginY,
+ double aOriginZ) const
+{
+ nsRefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
+ retval->Scale3dSelf(aScale, aOriginX, aOriginY, aOriginZ);
+
+ return retval.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrixReadOnly::ScaleNonUniform(double aScaleX,
+ double aScaleY,
+ double aScaleZ,
+ double aOriginX,
+ double aOriginY,
+ double aOriginZ) const
+{
+ nsRefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
+ retval->ScaleNonUniformSelf(aScaleX, aScaleY, aScaleZ, aOriginX, aOriginY, aOriginZ);
+
+ return retval.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrixReadOnly::Rotate(double aAngle,
+ double aOriginX ,
+ double aOriginY) const
+{
+ nsRefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
+ retval->RotateSelf(aAngle, aOriginX, aOriginY);
+
+ return retval.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrixReadOnly::RotateFromVector(double x,
+ double y) const
+{
+ nsRefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
+ retval->RotateFromVectorSelf(x, y);
+
+ return retval.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrixReadOnly::RotateAxisAngle(double aX,
+ double aY,
+ double aZ,
+ double aAngle) const
+{
+ nsRefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
+ retval->RotateAxisAngleSelf(aX, aY, aZ, aAngle);
+
+ return retval.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrixReadOnly::SkewX(double aSx) const
+{
+ nsRefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
+ retval->SkewXSelf(aSx);
+
+ return retval.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrixReadOnly::SkewY(double aSy) const
+{
+ nsRefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
+ retval->SkewYSelf(aSy);
+
+ return retval.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrixReadOnly::Multiply(const DOMMatrix& other) const
+{
+ nsRefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
+ retval->MultiplySelf(other);
+
+ return retval.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrixReadOnly::FlipX() const
+{
+ nsRefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
+ if (mMatrix3D) {
+ gfx::Matrix4x4 m;
+ m._11 = -1;
+ retval->mMatrix3D = new gfx::Matrix4x4(m * *mMatrix3D);
+ } else {
+ gfx::Matrix m;
+ m._11 = -1;
+ retval->mMatrix2D = new gfx::Matrix(mMatrix2D ? m * *mMatrix2D : m);
+ }
+
+ return retval.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrixReadOnly::FlipY() const
+{
+ nsRefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
+ if (mMatrix3D) {
+ gfx::Matrix4x4 m;
+ m._22 = -1;
+ retval->mMatrix3D = new gfx::Matrix4x4(m * *mMatrix3D);
+ } else {
+ gfx::Matrix m;
+ m._22 = -1;
+ retval->mMatrix2D = new gfx::Matrix(mMatrix2D ? m * *mMatrix2D : m);
+ }
+
+ return retval.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrixReadOnly::Inverse() const
+{
+ nsRefPtr<DOMMatrix> retval = new DOMMatrix(mParent, *this);
+ retval->InvertSelf();
+
+ return retval.forget();
+}
+
+bool
+DOMMatrixReadOnly::Is2D() const
+{
+ return !mMatrix3D;
+}
+
+bool
+DOMMatrixReadOnly::Identity() const
+{
+ if (mMatrix3D) {
+ return mMatrix3D->IsIdentity();
+ }
+
+ return mMatrix2D->IsIdentity();
+}
+
+already_AddRefed<DOMPoint>
+DOMMatrixReadOnly::TransformPoint(const DOMPointInit& point) const
+{
+ nsRefPtr<DOMPoint> retval = new DOMPoint(mParent);
+
+ if (mMatrix3D) {
+ gfx::Point4D transformedPoint;
+ transformedPoint.x = point.mX;
+ transformedPoint.y = point.mY;
+ transformedPoint.z = point.mZ;
+ transformedPoint.w = point.mW;
+
+ transformedPoint = *mMatrix3D * transformedPoint;
+
+ retval->SetX(transformedPoint.x);
+ retval->SetY(transformedPoint.y);
+ retval->SetZ(transformedPoint.z);
+ retval->SetW(transformedPoint.w);
+ } else if (point.mZ != 0 || point.mW != 1.0) {
+ gfx::Matrix4x4 tempMatrix(gfx::Matrix4x4::From2D(*mMatrix2D));
+
+ gfx::Point4D transformedPoint;
+ transformedPoint.x = point.mX;
+ transformedPoint.y = point.mY;
+ transformedPoint.z = point.mZ;
+ transformedPoint.w = point.mW;
+
+ transformedPoint = tempMatrix * transformedPoint;
+
+ retval->SetX(transformedPoint.x);
+ retval->SetY(transformedPoint.y);
+ retval->SetZ(transformedPoint.z);
+ retval->SetW(transformedPoint.w);
+ } else {
+ gfx::Point transformedPoint;
+ transformedPoint.x = point.mX;
+ transformedPoint.y = point.mY;
+
+ transformedPoint = *mMatrix2D * transformedPoint;
+
+ retval->SetX(transformedPoint.x);
+ retval->SetY(transformedPoint.y);
+ retval->SetZ(point.mZ);
+ retval->SetW(point.mW);
+ }
+ return retval.forget();
+}
+
+template <typename T> void GetDataFromMatrix(const DOMMatrixReadOnly* aMatrix, T* aData)
+{
+ aData[0] = static_cast<T>(aMatrix->M11());
+ aData[1] = static_cast<T>(aMatrix->M12());
+ aData[2] = static_cast<T>(aMatrix->M13());
+ aData[3] = static_cast<T>(aMatrix->M14());
+ aData[4] = static_cast<T>(aMatrix->M21());
+ aData[5] = static_cast<T>(aMatrix->M22());
+ aData[6] = static_cast<T>(aMatrix->M23());
+ aData[7] = static_cast<T>(aMatrix->M24());
+ aData[8] = static_cast<T>(aMatrix->M31());
+ aData[9] = static_cast<T>(aMatrix->M32());
+ aData[10] = static_cast<T>(aMatrix->M33());
+ aData[11] = static_cast<T>(aMatrix->M34());
+ aData[12] = static_cast<T>(aMatrix->M41());
+ aData[13] = static_cast<T>(aMatrix->M42());
+ aData[14] = static_cast<T>(aMatrix->M43());
+ aData[15] = static_cast<T>(aMatrix->M44());
+}
+
+void
+DOMMatrixReadOnly::ToFloat32Array(JSContext* aCx, JS::MutableHandle<JSObject*> aResult, ErrorResult& aRv) const
+{
+ nsAutoTArray<float, 16> arr;
+ arr.SetLength(16);
+ GetDataFromMatrix(this, arr.Elements());
+ JS::Rooted<JS::Value> value(aCx);
+ if (!ToJSValue(aCx, TypedArrayCreator<Float32Array>(arr), &value)) {
+ aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
+ return;
+ }
+ aResult.set(&value.toObject());
+}
+
+void
+DOMMatrixReadOnly::ToFloat64Array(JSContext* aCx, JS::MutableHandle<JSObject*> aResult, ErrorResult& aRv) const
+{
+ nsAutoTArray<double, 16> arr;
+ arr.SetLength(16);
+ GetDataFromMatrix(this, arr.Elements());
+ JS::Rooted<JS::Value> value(aCx);
+ if (!ToJSValue(aCx, TypedArrayCreator<Float64Array>(arr), &value)) {
+ aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
+ return;
+ }
+ aResult.set(&value.toObject());
+}
+
+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DOMMatrix, mParent)
+
+NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMMatrix, AddRef)
+NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMMatrix, Release)
+
+already_AddRefed<DOMMatrix>
+DOMMatrix::Constructor(const GlobalObject& aGlobal, ErrorResult& aRv)
+{
+ nsRefPtr<DOMMatrix> obj = new DOMMatrix(aGlobal.GetAsSupports());
+ return obj.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrix::Constructor(const GlobalObject& aGlobal, const nsAString& aTransformList, ErrorResult& aRv)
+{
+ nsRefPtr<DOMMatrix> obj = new DOMMatrix(aGlobal.GetAsSupports());
+
+ obj = obj->SetMatrixValue(aTransformList, aRv);
+ return obj.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrix::Constructor(const GlobalObject& aGlobal, const DOMMatrixReadOnly& aOther, ErrorResult& aRv)
+{
+ nsRefPtr<DOMMatrix> obj = new DOMMatrix(aGlobal.GetAsSupports(), aOther);
+ return obj.forget();
+}
+
+template <typename T> void SetDataInMatrix(DOMMatrix* aMatrix, const T* aData, int aLength, ErrorResult& aRv)
+{
+ if (aLength == 16) {
+ aMatrix->SetM11(aData[0]);
+ aMatrix->SetM12(aData[1]);
+ aMatrix->SetM13(aData[2]);
+ aMatrix->SetM14(aData[3]);
+ aMatrix->SetM21(aData[4]);
+ aMatrix->SetM22(aData[5]);
+ aMatrix->SetM23(aData[6]);
+ aMatrix->SetM24(aData[7]);
+ aMatrix->SetM31(aData[8]);
+ aMatrix->SetM32(aData[9]);
+ aMatrix->SetM33(aData[10]);
+ aMatrix->SetM34(aData[11]);
+ aMatrix->SetM41(aData[12]);
+ aMatrix->SetM42(aData[13]);
+ aMatrix->SetM43(aData[14]);
+ aMatrix->SetM44(aData[15]);
+ } else if (aLength == 6) {
+ aMatrix->SetA(aData[0]);
+ aMatrix->SetB(aData[1]);
+ aMatrix->SetC(aData[2]);
+ aMatrix->SetD(aData[3]);
+ aMatrix->SetE(aData[4]);
+ aMatrix->SetF(aData[5]);
+ } else {
+ aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
+ }
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrix::Constructor(const GlobalObject& aGlobal, const Float32Array& aArray32, ErrorResult& aRv)
+{
+ nsRefPtr<DOMMatrix> obj = new DOMMatrix(aGlobal.GetAsSupports());
+ aArray32.ComputeLengthAndData();
+ SetDataInMatrix(obj, aArray32.Data(), aArray32.Length(), aRv);
+
+ return obj.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrix::Constructor(const GlobalObject& aGlobal, const Float64Array& aArray64, ErrorResult& aRv)
+{
+ nsRefPtr<DOMMatrix> obj = new DOMMatrix(aGlobal.GetAsSupports());
+ aArray64.ComputeLengthAndData();
+ SetDataInMatrix(obj, aArray64.Data(), aArray64.Length(), aRv);
+
+ return obj.forget();
+}
+
+already_AddRefed<DOMMatrix>
+DOMMatrix::Constructor(const GlobalObject& aGlobal, const Sequence<double>& aNumberSequence, ErrorResult& aRv)
+{
+ nsRefPtr<DOMMatrix> obj = new DOMMatrix(aGlobal.GetAsSupports());
+ SetDataInMatrix(obj, aNumberSequence.Elements(), aNumberSequence.Length(), aRv);
+
+ return obj.forget();
+}
+
+void DOMMatrix::Ensure3DMatrix()
+{
+ if (!mMatrix3D) {
+ mMatrix3D = new gfx::Matrix4x4(gfx::Matrix4x4::From2D(*mMatrix2D));
+ mMatrix2D = nullptr;
+ }
+}
+
+DOMMatrix*
+DOMMatrix::MultiplySelf(const DOMMatrix& aOther)
+{
+ if (aOther.Identity()) {
+ return this;
+ }
+
+ if (aOther.Is2D()) {
+ if (mMatrix3D) {
+ *mMatrix3D = gfx::Matrix4x4::From2D(*aOther.mMatrix2D) * *mMatrix3D;
+ } else {
+ *mMatrix2D = *aOther.mMatrix2D * *mMatrix2D;
+ }
+ } else {
+ Ensure3DMatrix();
+ *mMatrix3D = *aOther.mMatrix3D * *mMatrix3D;
+ }
+
+ return this;
+}
+
+DOMMatrix*
+DOMMatrix::PreMultiplySelf(const DOMMatrix& aOther)
+{
+ if (aOther.Identity()) {
+ return this;
+ }
+
+ if (aOther.Is2D()) {
+ if (mMatrix3D) {
+ *mMatrix3D = *mMatrix3D * gfx::Matrix4x4::From2D(*aOther.mMatrix2D);
+ } else {
+ *mMatrix2D = *mMatrix2D * *aOther.mMatrix2D;
+ }
+ } else {
+ Ensure3DMatrix();
+ *mMatrix3D = *mMatrix3D * *aOther.mMatrix3D;
+ }
+
+ return this;
+}
+
+DOMMatrix*
+DOMMatrix::TranslateSelf(double aTx,
+ double aTy,
+ double aTz)
+{
+ if (aTx == 0 && aTy == 0 && aTz == 0) {
+ return this;
+ }
+
+ if (mMatrix3D || aTz != 0) {
+ Ensure3DMatrix();
+ mMatrix3D->Translate(aTx, aTy, aTz);
+ } else {
+ mMatrix2D->Translate(aTx, aTy);
+ }
+
+ return this;
+}
+
+DOMMatrix*
+DOMMatrix::ScaleSelf(double aScale, double aOriginX, double aOriginY)
+{
+ ScaleNonUniformSelf(aScale, aScale, 1.0, aOriginX, aOriginY, 0);
+
+ return this;
+}
+
+DOMMatrix*
+DOMMatrix::Scale3dSelf(double aScale, double aOriginX,
+ double aOriginY, double aOriginZ)
+{
+ ScaleNonUniformSelf(aScale, aScale, aScale, aOriginX, aOriginY, aOriginZ);
+
+ return this;
+}
+
+DOMMatrix*
+DOMMatrix::ScaleNonUniformSelf(double aScaleX,
+ double aScaleY,
+ double aScaleZ,
+ double aOriginX,
+ double aOriginY,
+ double aOriginZ)
+{
+ if (aScaleX == 1.0 && aScaleY == 1.0 && aScaleZ == 1.0) {
+ return this;
+ }
+
+ TranslateSelf(aOriginX, aOriginY, aOriginZ);
+
+ if (mMatrix3D || aScaleZ != 1.0 || aOriginZ != 0) {
+ Ensure3DMatrix();
+ gfx::Matrix4x4 m;
+ m._11 = aScaleX;
+ m._22 = aScaleY;
+ m._33 = aScaleZ;
+ *mMatrix3D = m * *mMatrix3D;
+ } else {
+ gfx::Matrix m;
+ m._11 = aScaleX;
+ m._22 = aScaleY;
+ *mMatrix2D = m * *mMatrix2D;
+ }
+
+ TranslateSelf(-aOriginX, -aOriginY, -aOriginZ);
+
+ return this;
+}
+
+DOMMatrix*
+DOMMatrix::RotateFromVectorSelf(double aX, double aY)
+{
+ if (aX == 0.0 || aY == 0.0) {
+ return this;
+ }
+
+ RotateSelf(atan2(aY, aX) / radPerDegree);
+
+ return this;
+}
+
+DOMMatrix*
+DOMMatrix::RotateSelf(double aAngle, double aOriginX, double aOriginY)
+{
+ if (fmod(aAngle, 360) == 0) {
+ return this;
+ }
+
+ TranslateSelf(aOriginX, aOriginY);
+
+ if (mMatrix3D) {
+ RotateAxisAngleSelf(0, 0, 1, aAngle);
+ } else {
+ *mMatrix2D = mMatrix2D->Rotate(aAngle * radPerDegree);
+ }
+
+ TranslateSelf(-aOriginX, -aOriginY);
+
+ return this;
+}
+
+DOMMatrix*
+DOMMatrix::RotateAxisAngleSelf(double aX, double aY,
+ double aZ, double aAngle)
+{
+ if (fmod(aAngle, 360) == 0) {
+ return this;
+ }
+
+ aAngle *= radPerDegree;
+ // sin(aAngle / 2) * cos(aAngle / 2)
+ double sc = sin(aAngle) / 2;
+ // pow(sin(aAngle / 2), 2)
+ double sq = (1 - cos(aAngle)) / 2;
+
+ Ensure3DMatrix();
+ gfx::Matrix4x4 m;
+ m._11 = 1 - 2 * (aY * aY + aZ * aZ) * sq;
+ m._12 = 2 * (aX * aY * sq + aZ * sc);
+ m._13 = 2 * (aX * aZ * sq - aY * sc);
+ m._21 = 2 * (aX * aY * sq - aZ * sc);
+ m._22 = 1 - 2 * (aX * aX + aZ * aZ) * sq;
+ m._23 = 2 * (aY * aZ * sq + aX * sc);
+ m._31 = 2 * (aX * aZ * sq + aY * sc);
+ m._32 = 2 * (aY * aZ * sq - aX * sc);
+ m._33 = 1 - 2 * (aX * aX + aY * aY) * sq;
+
+ *mMatrix3D = m * *mMatrix3D;
+
+ return this;
+}
+
+DOMMatrix*
+DOMMatrix::SkewXSelf(double aSx)
+{
+ if (fmod(aSx, 360) == 0) {
+ return this;
+ }
+
+ if (mMatrix3D) {
+ gfx::Matrix4x4 m;
+ m._21 = tan(aSx * radPerDegree);
+ *mMatrix3D = m * *mMatrix3D;
+ } else {
+ gfx::Matrix m;
+ m._21 = tan(aSx * radPerDegree);
+ *mMatrix2D = m * *mMatrix2D;
+ }
+
+ return this;
+}
+
+DOMMatrix*
+DOMMatrix::SkewYSelf(double aSy)
+{
+ if (fmod(aSy, 360) == 0) {
+ return this;
+ }
+
+ if (mMatrix3D) {
+ gfx::Matrix4x4 m;
+ m._12 = tan(aSy * radPerDegree);
+ *mMatrix3D = m * *mMatrix3D;
+ } else {
+ gfx::Matrix m;
+ m._12 = tan(aSy * radPerDegree);
+ *mMatrix2D = m * *mMatrix2D;
+ }
+
+ return this;
+}
+
+DOMMatrix*
+DOMMatrix::InvertSelf()
+{
+ if (mMatrix3D) {
+ if (!mMatrix3D->Invert()) {
+ mMatrix3D->SetNAN();
+ }
+ } else if (!mMatrix2D->Invert()) {
+ mMatrix2D = nullptr;
+
+ mMatrix3D = new gfx::Matrix4x4();
+ mMatrix3D->SetNAN();
+ }
+
+ return this;
+}
+
+DOMMatrix*
+DOMMatrix::SetMatrixValue(const nsAString& aTransformList, ErrorResult& aRv)
+{
+ SVGTransformListParser parser(aTransformList);
+ if (!parser.Parse()) {
+ aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR);
+ } else {
+ mMatrix3D = nullptr;
+ mMatrix2D = new gfx::Matrix();
+ gfxMatrix result;
+ const nsTArray<nsSVGTransform>& mItems = parser.GetTransformList();
+
+ for (uint32_t i = 0; i < mItems.Length(); ++i) {
+ result.PreMultiply(mItems[i].GetMatrix());
+ }
+
+ SetA(result._11);
+ SetB(result._12);
+ SetC(result._21);
+ SetD(result._22);
+ SetE(result._31);
+ SetF(result._32);
+ }
+
+ return this;
+}
+
+JSObject*
+DOMMatrix::WrapObject(JSContext* aCx)
+{
+ return DOMMatrixBinding::Wrap(aCx, this);
+}
+
+} // namespace dom
+} // namespace mozilla
new file mode 100644
--- /dev/null
+++ b/content/base/src/DOMMatrix.h
@@ -0,0 +1,256 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef MOZILLA_DOM_DOMMATRIX_H_
+#define MOZILLA_DOM_DOMMATRIX_H_
+
+#include "nsWrapperCache.h"
+#include "nsISupports.h"
+#include "nsCycleCollectionParticipant.h"
+#include "mozilla/Attributes.h"
+#include "mozilla/ErrorResult.h"
+#include "nsCOMPtr.h"
+#include "mozilla/dom/BindingDeclarations.h"
+#include "mozilla/dom/TypedArray.h"
+#include "mozilla/gfx/Matrix.h" // for Matrix4x4
+
+namespace mozilla {
+namespace dom {
+
+class GlobalObject;
+class DOMMatrix;
+
+class DOMMatrixReadOnly : public nsWrapperCache
+{
+public:
+ DOMMatrixReadOnly(nsISupports* aParent)
+ : mParent(aParent), mMatrix2D(new gfx::Matrix())
+ {
+ SetIsDOMBinding();
+ }
+
+ DOMMatrixReadOnly(nsISupports* aParent, const DOMMatrixReadOnly& other)
+ : mParent(aParent)
+ {
+ if (other.mMatrix2D) {
+ mMatrix2D = new gfx::Matrix(*other.mMatrix2D);
+ } else {
+ mMatrix3D = new gfx::Matrix4x4(*other.mMatrix3D);
+ }
+
+ SetIsDOMBinding();
+ }
+
+ ~DOMMatrixReadOnly()
+ {
+ }
+
+#define GetMatrixMember(entry2D, entry3D, default) \
+{ \
+ if (mMatrix3D) { \
+ return mMatrix3D->entry3D; \
+ } \
+ return mMatrix2D->entry2D; \
+}
+
+#define Get3DMatrixMember(entry3D, default) \
+{ \
+ if (mMatrix3D) { \
+ return mMatrix3D->entry3D; \
+ } \
+ return default; \
+}
+
+ double A() const GetMatrixMember(_11, _11, 1.0)
+ double B() const GetMatrixMember(_12, _12, 0)
+ double C() const GetMatrixMember(_21, _21, 0)
+ double D() const GetMatrixMember(_22, _22, 1.0)
+ double E() const GetMatrixMember(_31, _41, 0)
+ double F() const GetMatrixMember(_32, _42, 0)
+
+ double M11() const GetMatrixMember(_11, _11, 1.0)
+ double M12() const GetMatrixMember(_12, _12, 0)
+ double M13() const Get3DMatrixMember(_13, 0)
+ double M14() const Get3DMatrixMember(_14, 0)
+ double M21() const GetMatrixMember(_21, _21, 0)
+ double M22() const GetMatrixMember(_22, _22, 1.0)
+ double M23() const Get3DMatrixMember(_23, 0)
+ double M24() const Get3DMatrixMember(_24, 0)
+ double M31() const Get3DMatrixMember(_31, 0)
+ double M32() const Get3DMatrixMember(_32, 0)
+ double M33() const Get3DMatrixMember(_33, 1.0)
+ double M34() const Get3DMatrixMember(_34, 0)
+ double M41() const GetMatrixMember(_31, _41, 0)
+ double M42() const GetMatrixMember(_32, _42, 0)
+ double M43() const Get3DMatrixMember(_43, 0)
+ double M44() const Get3DMatrixMember(_44, 1.0)
+
+#undef GetMatrixMember
+#undef Get3DMatrixMember
+
+ already_AddRefed<DOMMatrix> Translate(double aTx,
+ double aTy,
+ double aTz = 0) const;
+ already_AddRefed<DOMMatrix> Scale(double aScale,
+ double aOriginX = 0,
+ double aOriginY = 0) const;
+ already_AddRefed<DOMMatrix> Scale3d(double aScale,
+ double aOriginX = 0,
+ double aOriginY = 0,
+ double aOriginZ = 0) const;
+ already_AddRefed<DOMMatrix> ScaleNonUniform(double aScaleX,
+ double aScaleY = 1.0,
+ double aScaleZ = 1.0,
+ double aOriginX = 0,
+ double aOriginY = 0,
+ double aOriginZ = 0) const;
+ already_AddRefed<DOMMatrix> Rotate(double aAngle,
+ double aOriginX = 0,
+ double aOriginY = 0) const;
+ already_AddRefed<DOMMatrix> RotateFromVector(double aX,
+ double aY) const;
+ already_AddRefed<DOMMatrix> RotateAxisAngle(double aX,
+ double aY,
+ double aZ,
+ double aAngle) const;
+ already_AddRefed<DOMMatrix> SkewX(double aSx) const;
+ already_AddRefed<DOMMatrix> SkewY(double aSy) const;
+ already_AddRefed<DOMMatrix> Multiply(const DOMMatrix& aOther) const;
+ already_AddRefed<DOMMatrix> FlipX() const;
+ already_AddRefed<DOMMatrix> FlipY() const;
+ already_AddRefed<DOMMatrix> Inverse() const;
+
+ bool Is2D() const;
+ bool Identity() const;
+ already_AddRefed<DOMPoint> TransformPoint(const DOMPointInit& aPoint) const;
+ void ToFloat32Array(JSContext* aCx,
+ JS::MutableHandle<JSObject*> aResult,
+ ErrorResult& aRv) const;
+ void ToFloat64Array(JSContext* aCx,
+ JS::MutableHandle<JSObject*> aResult,
+ ErrorResult& aRv) const;
+protected:
+ nsCOMPtr<nsISupports> mParent;
+ nsAutoPtr<gfx::Matrix> mMatrix2D;
+ nsAutoPtr<gfx::Matrix4x4> mMatrix3D;
+private:
+ DOMMatrixReadOnly() MOZ_DELETE;
+ DOMMatrixReadOnly(const DOMMatrixReadOnly&) MOZ_DELETE;
+ DOMMatrixReadOnly& operator=(const DOMMatrixReadOnly&) MOZ_DELETE;
+};
+
+class DOMMatrix MOZ_FINAL : public DOMMatrixReadOnly
+{
+public:
+ DOMMatrix(nsISupports* aParent)
+ : DOMMatrixReadOnly(aParent)
+ {}
+
+ DOMMatrix(nsISupports* aParent, const DOMMatrixReadOnly& other)
+ : DOMMatrixReadOnly(aParent, other)
+ {}
+
+ NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMMatrix)
+ NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMMatrix)
+
+ static already_AddRefed<DOMMatrix>
+ Constructor(const GlobalObject& aGlobal, ErrorResult& aRv);
+ static already_AddRefed<DOMMatrix>
+ Constructor(const GlobalObject& aGlobal, const nsAString& aTransformList, ErrorResult& aRv);
+ static already_AddRefed<DOMMatrix>
+ Constructor(const GlobalObject& aGlobal, const DOMMatrixReadOnly& aOther, ErrorResult& aRv);
+ static already_AddRefed<DOMMatrix>
+ Constructor(const GlobalObject& aGlobal, const Float32Array& aArray32, ErrorResult& aRv);
+ static already_AddRefed<DOMMatrix>
+ Constructor(const GlobalObject& aGlobal, const Float64Array& aArray64, ErrorResult& aRv);
+ static already_AddRefed<DOMMatrix>
+ Constructor(const GlobalObject& aGlobal, const Sequence<double>& aNumberSequence, ErrorResult& aRv);
+
+ nsISupports* GetParentObject() const { return mParent; }
+ virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
+
+#define Set2DMatrixMember(entry2D, entry3D) \
+{ \
+ if (mMatrix3D) { \
+ mMatrix3D->entry3D = v; \
+ } else { \
+ mMatrix2D->entry2D = v; \
+ } \
+}
+
+#define Set3DMatrixMember(entry3D, default) \
+{ \
+ if (mMatrix3D || (v != default)) { \
+ Ensure3DMatrix(); \
+ mMatrix3D->entry3D = v; \
+ } \
+}
+
+ void SetA(double v) Set2DMatrixMember(_11, _11)
+ void SetB(double v) Set2DMatrixMember(_12, _12)
+ void SetC(double v) Set2DMatrixMember(_21, _21)
+ void SetD(double v) Set2DMatrixMember(_22, _22)
+ void SetE(double v) Set2DMatrixMember(_31, _41)
+ void SetF(double v) Set2DMatrixMember(_32, _42)
+
+ void SetM11(double v) Set2DMatrixMember(_11, _11)
+ void SetM12(double v) Set2DMatrixMember(_12, _12)
+ void SetM13(double v) Set3DMatrixMember(_13, 0)
+ void SetM14(double v) Set3DMatrixMember(_14, 0)
+ void SetM21(double v) Set2DMatrixMember(_21, _21)
+ void SetM22(double v) Set2DMatrixMember(_22, _22)
+ void SetM23(double v) Set3DMatrixMember(_23, 0)
+ void SetM24(double v) Set3DMatrixMember(_24, 0)
+ void SetM31(double v) Set3DMatrixMember(_31, 0)
+ void SetM32(double v) Set3DMatrixMember(_32, 0)
+ void SetM33(double v) Set3DMatrixMember(_33, 1.0)
+ void SetM34(double v) Set3DMatrixMember(_34, 0)
+ void SetM41(double v) Set2DMatrixMember(_31, _41)
+ void SetM42(double v) Set2DMatrixMember(_32, _42)
+ void SetM43(double v) Set3DMatrixMember(_43, 0)
+ void SetM44(double v) Set3DMatrixMember(_44, 1.0)
+
+#undef Set2DMatrixMember
+#undef Set3DMatrixMember
+
+ DOMMatrix* MultiplySelf(const DOMMatrix& aOther);
+ DOMMatrix* PreMultiplySelf(const DOMMatrix& aOther);
+ DOMMatrix* TranslateSelf(double aTx,
+ double aTy,
+ double aTz = 0);
+ DOMMatrix* ScaleSelf(double aScale,
+ double aOriginX = 0,
+ double aOriginY = 0);
+ DOMMatrix* Scale3dSelf(double aScale,
+ double aOriginX = 0,
+ double aOriginY = 0,
+ double aOriginZ = 0);
+ DOMMatrix* ScaleNonUniformSelf(double aScaleX,
+ double aScaleY = 1,
+ double aScaleZ = 1,
+ double aOriginX = 0,
+ double aOriginY = 0,
+ double aOriginZ = 0);
+ DOMMatrix* RotateSelf(double aAngle,
+ double aOriginX = 0,
+ double aOriginY = 0);
+ DOMMatrix* RotateFromVectorSelf(double aX,
+ double aY);
+ DOMMatrix* RotateAxisAngleSelf(double aX,
+ double aY,
+ double aZ,
+ double aAngle);
+ DOMMatrix* SkewXSelf(double aSx);
+ DOMMatrix* SkewYSelf(double aSy);
+ DOMMatrix* InvertSelf();
+ DOMMatrix* SetMatrixValue(const nsAString& aTransformList, ErrorResult& aRv);
+private:
+ void Ensure3DMatrix();
+};
+
+}
+}
+
+#endif /*MOZILLA_DOM_DOMMATRIX_H_*/
--- a/content/base/src/DOMParser.h
+++ b/content/base/src/DOMParser.h
@@ -20,19 +20,21 @@ class nsIDocument;
namespace mozilla {
namespace dom {
class DOMParser MOZ_FINAL : public nsIDOMParser,
public nsSupportsWeakReference,
public nsWrapperCache
{
typedef mozilla::dom::GlobalObject GlobalObject;
+
+ virtual ~DOMParser();
+
public:
DOMParser();
- virtual ~DOMParser();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(DOMParser,
nsIDOMParser)
// nsIDOMParser
NS_DECL_NSIDOMPARSER
--- a/content/base/src/DOMPoint.h
+++ b/content/base/src/DOMPoint.h
@@ -41,16 +41,18 @@ public:
protected:
nsCOMPtr<nsISupports> mParent;
double mX, mY, mZ, mW;
};
class DOMPoint MOZ_FINAL : public DOMPointReadOnly
{
+ ~DOMPoint() {}
+
public:
DOMPoint(nsISupports* aParent, double aX = 0.0, double aY = 0.0,
double aZ = 0.0, double aW = 1.0)
: DOMPointReadOnly(aParent, aX, aY, aZ, aW)
{}
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMPoint)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMPoint)
--- a/content/base/src/DOMQuad.h
+++ b/content/base/src/DOMQuad.h
@@ -20,20 +20,21 @@ namespace mozilla {
namespace dom {
class DOMRectReadOnly;
class DOMPoint;
struct DOMPointInit;
class DOMQuad MOZ_FINAL : public nsWrapperCache
{
+ ~DOMQuad();
+
public:
DOMQuad(nsISupports* aParent, CSSPoint aPoints[4]);
DOMQuad(nsISupports* aParent);
- ~DOMQuad();
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMQuad)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMQuad)
nsISupports* GetParentObject() const { return mParent; }
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
static already_AddRefed<DOMQuad>
--- a/content/base/src/DOMRect.h
+++ b/content/base/src/DOMRect.h
@@ -21,22 +21,23 @@
struct nsRect;
namespace mozilla {
namespace dom {
class DOMRectReadOnly : public nsISupports
, public nsWrapperCache
{
+protected:
+ virtual ~DOMRectReadOnly() {}
+
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMRectReadOnly)
- virtual ~DOMRectReadOnly() {}
-
DOMRectReadOnly(nsISupports* aParent)
: mParent(aParent)
{
SetIsDOMBinding();
}
nsISupports* GetParentObject() const
{
@@ -141,16 +142,18 @@ public:
protected:
double mX, mY, mWidth, mHeight;
};
class DOMRectList MOZ_FINAL : public nsIDOMClientRectList,
public nsWrapperCache
{
+ ~DOMRectList() {}
+
public:
DOMRectList(nsISupports *aParent) : mParent(aParent)
{
SetIsDOMBinding();
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMRectList)
--- a/content/base/src/DOMStringList.h
+++ b/content/base/src/DOMStringList.h
@@ -12,22 +12,24 @@
#include "nsString.h"
namespace mozilla {
namespace dom {
class DOMStringList : public nsISupports,
public nsWrapperCache
{
+protected:
+ virtual ~DOMStringList();
+
public:
DOMStringList()
{
SetIsDOMBinding();
}
- virtual ~DOMStringList();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMStringList)
virtual JSObject* WrapObject(JSContext* aCx);
nsISupports* GetParentObject()
{
return nullptr;
--- a/content/base/src/EventSource.cpp
+++ b/content/base/src/EventSource.cpp
@@ -513,16 +513,17 @@ public:
mEventSource->mErrorLoadOnRedirect = true;
mEventSource->DispatchFailConnection();
}
return NS_OK;
}
private:
+ ~AsyncVerifyRedirectCallbackFwr() {}
nsRefPtr<EventSource> mEventSource;
};
NS_IMPL_CYCLE_COLLECTION(AsyncVerifyRedirectCallbackFwr, mEventSource)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AsyncVerifyRedirectCallbackFwr)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_ENTRY(nsIAsyncVerifyRedirectCallback)
--- a/content/base/src/ImportManager.h
+++ b/content/base/src/ImportManager.h
@@ -83,16 +83,18 @@ public:
bool IsStopped() { return mStopped; }
bool IsBlocking() { return mBlockingScripts; }
already_AddRefed<nsIDocument> GetImport()
{
return mReady ? nsCOMPtr<nsIDocument>(mDocument).forget() : nullptr;
}
private:
+ ~ImportLoader() {}
+
// If a new referrer LinkElement was added, let's
// see if we are already finished and if so fire
// the right event.
void DispatchEventIfFinished(nsINode* aNode);
// Dispatch event for a single referrer LinkElement.
void DispatchErrorEvent(nsINode* aNode);
void DispatchLoadEvent(nsINode* aNode);
@@ -124,16 +126,19 @@ private:
bool mReady;
bool mStopped;
bool mBlockingScripts;
};
class ImportManager MOZ_FINAL : public nsISupports
{
typedef nsRefPtrHashtable<nsURIHashKey, ImportLoader> ImportMap;
+
+ ~ImportManager() {}
+
public:
ImportManager() {}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(ImportManager)
already_AddRefed<ImportLoader> Get(nsIURI* aURI, nsINode* aNode,
nsIDocument* aOriginDocument);
--- a/content/base/src/NodeIterator.h
+++ b/content/base/src/NodeIterator.h
@@ -110,11 +110,18 @@ private:
already_AddRefed<nsINode>
NextOrPrevNode(NodePointer::MoveToMethodType aMove, ErrorResult& aResult);
NodePointer mPointer;
NodePointer mWorkingPointer;
};
} // namespace dom
+
+template<>
+struct HasDangerousPublicDestructor<dom::NodeIterator>
+{
+ static const bool value = true;
+};
+
} // namespace mozilla
#endif // mozilla_dom_NodeIterator_h
--- a/content/base/src/ResponsiveImageSelector.h
+++ b/content/base/src/ResponsiveImageSelector.h
@@ -15,30 +15,32 @@ namespace dom {
class ResponsiveImageCandidate;
class ResponsiveImageSelector : public nsISupports
{
public:
NS_DECL_ISUPPORTS
ResponsiveImageSelector(nsIContent *aContent);
- virtual ~ResponsiveImageSelector();
// Given a srcset string, parse and replace current candidates (does not
// replace default source)
bool SetCandidatesFromSourceSet(const nsAString & aSrcSet);
// Set the default source, treated as the least-precedence 1.0 density source.
nsresult SetDefaultSource(const nsAString & aSpec);
void SetDefaultSource(nsIURI *aURL);
// Get the URL for the selected best candidate
already_AddRefed<nsIURI> GetSelectedImageURL();
double GetSelectedImageDensity();
+protected:
+ virtual ~ResponsiveImageSelector();
+
private:
// Append a candidate unless its selector is duplicated by a higher priority
// candidate
void AppendCandidateIfUnique(const ResponsiveImageCandidate &aCandidate);
// Append a default candidate with this URL. Does not check if the array
// already contains one, use SetDefaultSource instead.
void AppendDefaultCandidate(nsIURI *aURL);
--- a/content/base/src/StyleSheetList.h
+++ b/content/base/src/StyleSheetList.h
@@ -19,31 +19,33 @@ namespace dom {
class StyleSheetList : public nsIDOMStyleSheetList
, public nsWrapperCache
{
public:
StyleSheetList()
{
SetIsDOMBinding();
}
- virtual ~StyleSheetList() {}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(StyleSheetList)
NS_DECL_NSIDOMSTYLESHEETLIST
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE MOZ_FINAL;
virtual nsINode* GetParentObject() const = 0;
virtual uint32_t Length() = 0;
virtual CSSStyleSheet* IndexedGetter(uint32_t aIndex, bool& aFound) = 0;
CSSStyleSheet* Item(uint32_t aIndex)
{
bool dummy = false;
return IndexedGetter(aIndex, dummy);
}
+
+protected:
+ virtual ~StyleSheetList() {}
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_StyleSheetList_h
--- a/content/base/src/ThirdPartyUtil.h
+++ b/content/base/src/ThirdPartyUtil.h
@@ -19,16 +19,18 @@ class ThirdPartyUtil MOZ_FINAL : public
{
public:
NS_DECL_ISUPPORTS
NS_DECL_MOZITHIRDPARTYUTIL
nsresult Init();
private:
+ ~ThirdPartyUtil() {}
+
nsresult IsThirdPartyInternal(const nsCString& aFirstDomain,
nsIURI* aSecondURI, bool* aResult);
static already_AddRefed<nsIURI> GetURIFromWindow(nsIDOMWindow* aWin);
nsCOMPtr<nsIEffectiveTLDService> mTLDService;
};
#endif
--- a/content/base/src/TreeWalker.h
+++ b/content/base/src/TreeWalker.h
@@ -20,24 +20,25 @@
class nsINode;
class nsIDOMNode;
namespace mozilla {
namespace dom {
class TreeWalker MOZ_FINAL : public nsIDOMTreeWalker, public nsTraversal
{
+ virtual ~TreeWalker();
+
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_NSIDOMTREEWALKER
TreeWalker(nsINode *aRoot,
uint32_t aWhatToShow,
const NodeFilterHolder &aFilter);
- virtual ~TreeWalker();
NS_DECL_CYCLE_COLLECTION_CLASS(TreeWalker)
// WebIDL API
nsINode* Root() const
{
return mRoot;
}
--- a/content/base/src/moz.build
+++ b/content/base/src/moz.build
@@ -60,16 +60,17 @@ EXPORTS.mozilla += [
]
EXPORTS.mozilla.dom += [
'Attr.h',
'Comment.h',
'DocumentFragment.h',
'DocumentType.h',
'DOMImplementation.h',
+ 'DOMMatrix.h',
'DOMParser.h',
'DOMPoint.h',
'DOMQuad.h',
'DOMRect.h',
'DOMStringList.h',
'EventSource.h',
'ImportManager.h',
'Link.h',
@@ -84,16 +85,17 @@ EXPORTS.mozilla.dom += [
UNIFIED_SOURCES += [
'Attr.cpp',
'ChildIterator.cpp',
'Comment.cpp',
'DirectionalityUtils.cpp',
'DocumentFragment.cpp',
'DocumentType.cpp',
'DOMImplementation.cpp',
+ 'DOMMatrix.cpp',
'DOMParser.cpp',
'DOMPoint.cpp',
'DOMQuad.cpp',
'DOMRect.cpp',
'DOMStringList.cpp',
'Element.cpp',
'EventSource.cpp',
'FileIOObject.cpp',
--- a/content/base/src/nsCCUncollectableMarker.h
+++ b/content/base/src/nsCCUncollectableMarker.h
@@ -33,17 +33,17 @@ class nsCCUncollectableMarker MOZ_FINAL
{
return InGeneration(aGeneration) && !aCb.WantAllTraces();
}
static uint32_t sGeneration;
private:
nsCCUncollectableMarker() {}
-
+ ~nsCCUncollectableMarker() {}
};
namespace mozilla {
namespace dom {
void TraceBlackJS(JSTracer* aTrc, uint32_t aGCNumber, bool aIsShutdownGC);
}
}
--- a/content/base/src/nsCSPContext.h
+++ b/content/base/src/nsCSPContext.h
@@ -25,19 +25,21 @@
class nsCSPContext : public nsIContentSecurityPolicy
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSICONTENTSECURITYPOLICY
NS_DECL_NSISERIALIZABLE
+ protected:
+ virtual ~nsCSPContext();
+
public:
nsCSPContext();
- virtual ~nsCSPContext();
nsresult SendReports(nsISupports* aBlockedContentSource,
nsIURI* aOriginalURI,
nsAString& aViolatedDirective,
uint32_t aViolatedPolicyIndex,
nsAString& aSourceFile,
nsAString& aScriptSample,
uint32_t aLineNum);
@@ -71,28 +73,32 @@ class CSPViolationReportListener : publi
{
public:
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_ISUPPORTS
public:
CSPViolationReportListener();
+
+ protected:
virtual ~CSPViolationReportListener();
};
// The POST of the violation report (if it happens) should not follow
// redirects, per the spec. hence, we implement an nsIChannelEventSink
// with an object so we can tell XHR to abort if a redirect happens.
class CSPReportRedirectSink MOZ_FINAL : public nsIChannelEventSink,
public nsIInterfaceRequestor
{
public:
NS_DECL_NSICHANNELEVENTSINK
NS_DECL_NSIINTERFACEREQUESTOR
NS_DECL_ISUPPORTS
public:
CSPReportRedirectSink();
+
+ protected:
virtual ~CSPReportRedirectSink();
};
#endif /* nsCSPContext_h___ */
--- a/content/base/src/nsCSPService.h
+++ b/content/base/src/nsCSPService.h
@@ -20,16 +20,19 @@ class CSPService : public nsIContentPoli
public nsIChannelEventSink
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSICONTENTPOLICY
NS_DECL_NSICHANNELEVENTSINK
CSPService();
- virtual ~CSPService();
static bool sCSPEnabled;
static bool sNewBackendEnabled;
+
+protected:
+ virtual ~CSPService();
+
private:
// Maps origins to app status.
nsDataHashtable<nsCStringHashKey, uint16_t> mAppStatusCache;
};
#endif /* nsCSPService_h___ */
--- a/content/base/src/nsChannelPolicy.h
+++ b/content/base/src/nsChannelPolicy.h
@@ -16,19 +16,20 @@
class nsChannelPolicy : public nsIChannelPolicy
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSICHANNELPOLICY
nsChannelPolicy();
+
+protected:
virtual ~nsChannelPolicy();
-protected:
/* Represents the type of content being loaded in the channel per
* nsIContentPolicy, e.g. TYPE_IMAGE, TYPE_SCRIPT
*/
unsigned long mLoadType;
/* pointer to a Content Security Policy object if available */
nsCOMPtr<nsISupports> mCSP;
};
--- a/content/base/src/nsContentAreaDragDrop.h
+++ b/content/base/src/nsContentAreaDragDrop.h
@@ -63,21 +63,21 @@ public:
nsIContent** aDragNode);
};
// this is used to save images to disk lazily when the image data is asked for
// during the drop instead of when it is added to the drag data transfer. This
// ensures that the image data is only created when an image drop is allowed.
class nsContentAreaDragDropDataProvider : public nsIFlavorDataProvider
{
+ virtual ~nsContentAreaDragDropDataProvider() {}
+
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIFLAVORDATAPROVIDER
- virtual ~nsContentAreaDragDropDataProvider() {}
-
nsresult SaveURIToFile(nsAString& inSourceURIString,
nsIFile* inDestFile, bool isPrivate);
};
#endif /* nsContentAreaDragDrop_h__ */
--- a/content/base/src/nsContentIterator.cpp
+++ b/content/base/src/nsContentIterator.cpp
@@ -78,17 +78,16 @@ NodeIsInTraversalRange(nsINode* aNode, b
*/
class nsContentIterator : public nsIContentIterator
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(nsContentIterator)
explicit nsContentIterator(bool aPre);
- virtual ~nsContentIterator();
// nsIContentIterator interface methods ------------------------------
virtual nsresult Init(nsINode* aRoot);
virtual nsresult Init(nsIDOMRange* aRange);
virtual void First();
@@ -101,16 +100,17 @@ public:
virtual nsINode* GetCurrentNode();
virtual bool IsDone();
virtual nsresult PositionAt(nsINode* aCurNode);
protected:
+ virtual ~nsContentIterator();
// Recursively get the deepest first/last child of aRoot. This will return
// aRoot itself if it has no children.
nsINode* GetDeepFirstChild(nsINode* aRoot,
nsTArray<int32_t>* aIndexes = nullptr);
nsIContent* GetDeepFirstChild(nsIContent* aRoot,
nsTArray<int32_t>* aIndexes = nullptr);
nsINode* GetDeepLastChild(nsINode* aRoot,
--- a/content/base/src/nsContentList.h
+++ b/content/base/src/nsContentList.h
@@ -37,17 +37,16 @@ class Element;
class nsBaseContentList : public nsINodeList
{
public:
nsBaseContentList()
{
SetIsDOMBinding();
}
- virtual ~nsBaseContentList();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
// nsIDOMNodeList
NS_DECL_NSIDOMNODELIST
// nsINodeList
virtual int32_t IndexOf(nsIContent* aContent) MOZ_OVERRIDE;
@@ -95,16 +94,18 @@ public:
virtual JSObject* WrapObject(JSContext *cx)
MOZ_OVERRIDE = 0;
void SetCapacity(uint32_t aCapacity)
{
mElements.SetCapacity(aCapacity);
}
protected:
+ virtual ~nsBaseContentList();
+
/**
* To be called from non-destructor locations (e.g. unlink) that want to
* remove from caches. Cacheable subclasses should override.
*/
virtual void RemoveFromCaches()
{
}
--- a/content/base/src/nsContentPolicy.h
+++ b/content/base/src/nsContentPolicy.h
@@ -16,17 +16,20 @@
class nsContentPolicy : public nsIContentPolicy
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSICONTENTPOLICY
nsContentPolicy();
+
+ protected:
virtual ~nsContentPolicy();
+
private:
//Array of policies
nsCategoryCache<nsIContentPolicy> mPolicies;
//Helper type for CheckPolicy
typedef
NS_STDCALL_FUNCPROTO(nsresult, CPMethod, nsIContentPolicy,
ShouldProcess,
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -323,16 +323,18 @@ static NS_DEFINE_CID(kParserServiceCID,
static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
static PLDHashTable sEventListenerManagersHash;
class DOMEventListenerManagersHashReporter MOZ_FINAL : public nsIMemoryReporter
{
MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf)
+ ~DOMEventListenerManagersHashReporter() {}
+
public:
NS_DECL_ISUPPORTS
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
nsISupports* aData, bool aAnonymize)
{
// We don't measure the |EventListenerManager| objects pointed to by the
// entries because those references are non-owning.
@@ -387,16 +389,18 @@ EventListenerManagerHashClearEntry(PLDHa
// Let the EventListenerManagerMapEntry clean itself up...
lm->~EventListenerManagerMapEntry();
}
class SameOriginChecker MOZ_FINAL : public nsIChannelEventSink,
public nsIInterfaceRequestor
{
+ ~SameOriginChecker() {}
+
NS_DECL_ISUPPORTS
NS_DECL_NSICHANNELEVENTSINK
NS_DECL_NSIINTERFACEREQUESTOR
};
class CharsetDetectionObserver MOZ_FINAL : public nsICharsetDetectionObserver
{
public:
--- a/content/base/src/nsCrossSiteListenerProxy.cpp
+++ b/content/base/src/nsCrossSiteListenerProxy.cpp
@@ -916,16 +916,18 @@ public:
NS_DECL_ISUPPORTS
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSIINTERFACEREQUESTOR
NS_DECL_NSICHANNELEVENTSINK
private:
+ ~nsCORSPreflightListener() {}
+
void AddResultToCache(nsIRequest* aRequest);
nsCOMPtr<nsIChannel> mOuterChannel;
nsCOMPtr<nsIStreamListener> mOuterListener;
nsCOMPtr<nsISupports> mOuterContext;
nsCOMPtr<nsIPrincipal> mReferrerPrincipal;
nsCString mRequestMethod;
bool mWithCredentials;
--- a/content/base/src/nsCrossSiteListenerProxy.h
+++ b/content/base/src/nsCrossSiteListenerProxy.h
@@ -57,16 +57,18 @@ public:
// Must be called at startup.
static void Startup();
static void Shutdown();
nsresult Init(nsIChannel* aChannel, bool aAllowDataURI = false);
private:
+ ~nsCORSListenerProxy() {}
+
nsresult UpdateChannel(nsIChannel* aChannel, bool aAllowDataURI = false);
nsresult CheckRequestApproved(nsIRequest* aRequest);
nsCOMPtr<nsIStreamListener> mOuterListener;
// The principal that originally kicked off the request
nsCOMPtr<nsIPrincipal> mRequestingPrincipal;
// The principal to use for our Origin header ("source origin" in spec terms).
// This can get changed during redirects, unlike mRequestingPrincipal.
--- a/content/base/src/nsDOMAttributeMap.h
+++ b/content/base/src/nsDOMAttributeMap.h
@@ -85,17 +85,16 @@ class nsDOMAttributeMap : public nsIDOMM
, public nsWrapperCache
{
public:
typedef mozilla::dom::Attr Attr;
typedef mozilla::dom::Element Element;
typedef mozilla::ErrorResult ErrorResult;
nsDOMAttributeMap(Element *aContent);
- virtual ~nsDOMAttributeMap();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(nsDOMAttributeMap)
// nsIDOMMozNamedAttrMap interface
NS_DECL_NSIDOMMOZNAMEDATTRMAP
void DropReference();
@@ -172,16 +171,19 @@ public:
void GetSupportedNames(unsigned, nsTArray<nsString>& aNames)
{
// No supported names we want to show up in iteration.
}
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
+protected:
+ virtual ~nsDOMAttributeMap();
+
private:
nsCOMPtr<Element> mContent;
/**
* Cache of Attrs.
*/
AttrCache mAttributeCache;
--- a/content/base/src/nsDOMFile.cpp
+++ b/content/base/src/nsDOMFile.cpp
@@ -62,16 +62,18 @@ public:
NS_FORWARD_NSIINPUTSTREAM(mStream->)
NS_FORWARD_NSISEEKABLESTREAM(mSeekableStream->)
// This is optional. We use a conditional QI to keep it from being called
// if the underlying stream doesn't support it.
NS_FORWARD_NSIIPCSERIALIZABLEINPUTSTREAM(mSerializableInputStream->)
private:
+ ~DataOwnerAdapter() {}
+
DataOwnerAdapter(DataOwner* aDataOwner,
nsIInputStream* aStream)
: mDataOwner(aDataOwner), mStream(aStream),
mSeekableStream(do_QueryInterface(aStream)),
mSerializableInputStream(do_QueryInterface(aStream))
{
NS_ASSERTION(mSeekableStream, "Somebody gave us the wrong stream!");
}
@@ -633,16 +635,18 @@ nsDOMMemoryFile::DataOwner::sDataOwners;
/* static */ bool
nsDOMMemoryFile::DataOwner::sMemoryReporterRegistered;
MOZ_DEFINE_MALLOC_SIZE_OF(DOMMemoryFileDataOwnerMallocSizeOf)
class nsDOMMemoryFileDataOwnerMemoryReporter MOZ_FINAL
: public nsIMemoryReporter
{
+ ~nsDOMMemoryFileDataOwnerMemoryReporter() {}
+
public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_IMETHOD CollectReports(nsIMemoryReporterCallback *aCallback,
nsISupports *aClosure, bool aAnonymize)
{
typedef nsDOMMemoryFile::DataOwner DataOwner;
--- a/content/base/src/nsDOMMutationObserver.h
+++ b/content/base/src/nsDOMMutationObserver.h
@@ -26,23 +26,24 @@
#include "nsIDocument.h"
class nsDOMMutationObserver;
using mozilla::dom::MutationObservingInfo;
class nsDOMMutationRecord : public nsISupports,
public nsWrapperCache
{
+ virtual ~nsDOMMutationRecord() {}
+
public:
nsDOMMutationRecord(nsIAtom* aType, nsISupports* aOwner)
: mType(aType), mAttrNamespace(NullString()), mPrevValue(NullString()), mOwner(aOwner)
{
SetIsDOMBinding();
}
- virtual ~nsDOMMutationRecord() {}
nsISupports* GetParentObject() const
{
return mOwner;
}
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
{
@@ -264,29 +265,30 @@ private:
bool mAllAttributes;
bool mAttributeOldValue;
nsCOMArray<nsIAtom> mAttributeFilter;
};
class nsMutationReceiver : public nsMutationReceiverBase
{
+protected:
+ virtual ~nsMutationReceiver() { Disconnect(false); }
+
public:
nsMutationReceiver(nsINode* aTarget, nsDOMMutationObserver* aObserver);
nsMutationReceiver(nsINode* aRegisterTarget, nsMutationReceiverBase* aParent)
: nsMutationReceiverBase(aRegisterTarget, aParent)
{
NS_ASSERTION(!static_cast<nsMutationReceiver*>(aParent)->GetParent(),
"Shouldn't create deep observer hierarchies!");
aParent->AddClone(this);
}
- virtual ~nsMutationReceiver() { Disconnect(false); }
-
nsMutationReceiver* GetParent()
{
return static_cast<nsMutationReceiver*>(mParent.get());
}
void RemoveClones()
{
for (int32_t i = 0; i < mTransientReceivers.Count(); ++i) {
@@ -342,17 +344,16 @@ class nsDOMMutationObserver : public nsI
public:
nsDOMMutationObserver(already_AddRefed<nsPIDOMWindow>&& aOwner,
mozilla::dom::MutationCallback& aCb)
: mOwner(aOwner), mLastPendingMutation(nullptr), mPendingMutationCount(0),
mCallback(&aCb), mWaitingForRun(false), mId(++sCount)
{
SetIsDOMBinding();
}
- virtual ~nsDOMMutationObserver();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMMutationObserver)
NS_DECLARE_STATIC_IID_ACCESSOR(NS_DOM_MUTATION_OBSERVER_IID)
static already_AddRefed<nsDOMMutationObserver>
Constructor(const mozilla::dom::GlobalObject& aGlobal,
mozilla::dom::MutationCallback& aCb,
mozilla::ErrorResult& aRv);
@@ -412,16 +413,18 @@ public:
}
}
static void EnterMutationHandling();
static void LeaveMutationHandling();
static void Shutdown();
protected:
+ virtual ~nsDOMMutationObserver();
+
friend class nsMutationReceiver;
friend class nsAutoMutationBatch;
nsMutationReceiver* GetReceiverFor(nsINode* aNode, bool aMayCreate);
void RemoveReceiver(nsMutationReceiver* aReceiver);
already_AddRefed<nsIVariant> TakeRecords();
void GetAllSubtreeObserversFor(nsINode* aNode,
--- a/content/base/src/nsDOMSerializer.h
+++ b/content/base/src/nsDOMSerializer.h
@@ -14,17 +14,16 @@
class nsINode;
class nsDOMSerializer MOZ_FINAL : public nsIDOMSerializer,
public nsWrapperCache
{
public:
nsDOMSerializer();
- virtual ~nsDOMSerializer();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMSerializer)
// nsIDOMSerializer
NS_DECL_NSIDOMSERIALIZER
// WebIDL API
@@ -50,16 +49,18 @@ public:
}
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
{
return mozilla::dom::XMLSerializerBinding::Wrap(aCx, this);
}
private:
+ virtual ~nsDOMSerializer();
+
nsDOMSerializer(nsISupports* aOwner) : mOwner(aOwner)
{
MOZ_ASSERT(aOwner);
SetIsDOMBinding();
}
nsCOMPtr<nsISupports> mOwner;
};
--- a/content/base/src/nsDataDocumentContentPolicy.h
+++ b/content/base/src/nsDataDocumentContentPolicy.h
@@ -19,20 +19,21 @@
"@mozilla.org/data-document-content-policy;1"
#include "nsIContentPolicy.h"
#include "mozilla/Attributes.h"
class nsDataDocumentContentPolicy MOZ_FINAL : public nsIContentPolicy
{
+ ~nsDataDocumentContentPolicy()
+ {}
+
public:
NS_DECL_ISUPPORTS
NS_DECL_NSICONTENTPOLICY
nsDataDocumentContentPolicy()
{}
- ~nsDataDocumentContentPolicy()
- {}
};
#endif /* nsDataDocumentContentPolicy_h__ */
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -5555,17 +5555,18 @@ nsDocument::RegisterUnresolvedElement(El
return NS_OK;
}
namespace {
class ProcessStackRunner MOZ_FINAL : public nsIRunnable
{
- public:
+ ~ProcessStackRunner() {}
+public:
ProcessStackRunner(bool aIsBaseQueue = false)
: mIsBaseQueue(aIsBaseQueue)
{
}
NS_DECL_ISUPPORTS
NS_IMETHOD Run() MOZ_OVERRIDE
{
nsDocument::ProcessTopElementQueue(mIsBaseQueue);
@@ -9325,16 +9326,17 @@ nsDocument::GetDocumentState()
namespace {
/**
* Stub for LoadSheet(), since all we want is to get the sheet into
* the CSSLoader's style cache
*/
class StubCSSLoaderObserver MOZ_FINAL : public nsICSSLoaderObserver {
+ ~StubCSSLoaderObserver() {}
public:
NS_IMETHOD
StyleSheetLoaded(CSSStyleSheet*, bool, nsresult)
{
return NS_OK;
}
NS_DECL_ISUPPORTS
};
--- a/content/base/src/nsDocument.h
+++ b/content/base/src/nsDocument.h
@@ -389,19 +389,20 @@ class Registry : public nsISupports
{
public:
friend class ::nsDocument;
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Registry)
Registry();
+
+protected:
virtual ~Registry();
-protected:
typedef nsClassHashtable<mozilla::dom::CustomElementHashKey,
mozilla::dom::CustomElementDefinition>
DefinitionMap;
typedef nsClassHashtable<mozilla::dom::CustomElementHashKey,
nsTArray<nsRefPtr<mozilla::dom::Element>>>
CandidateMap;
// Hashtable for custom element definitions in web components.
@@ -533,16 +534,18 @@ public:
// Show all our viewers
void ShowViewers();
protected:
class PendingLoad : public ExternalResourceLoad,
public nsIStreamListener
{
+ ~PendingLoad() {}
+
public:
PendingLoad(nsDocument* aDisplayDocument) :
mDisplayDocument(aDisplayDocument)
{}
NS_DECL_ISUPPORTS
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSIREQUESTOBSERVER
@@ -564,16 +567,17 @@ protected:
nsRefPtr<nsDocument> mDisplayDocument;
nsCOMPtr<nsIStreamListener> mTargetListener;
nsCOMPtr<nsIURI> mURI;
};
friend class PendingLoad;
class LoadgroupCallbacks MOZ_FINAL : public nsIInterfaceRequestor
{
+ ~LoadgroupCallbacks() {}
public:
LoadgroupCallbacks(nsIInterfaceRequestor* aOtherCallbacks)
: mCallbacks(aOtherCallbacks)
{}
NS_DECL_ISUPPORTS
NS_DECL_NSIINTERFACEREQUESTOR
private:
// The only reason it's safe to hold a strong ref here without leaking is
@@ -586,16 +590,17 @@ protected:
// getInterface back on us, but other than that each one should only
// implement one interface.
// XXXbz I wish we could just derive the _allcaps thing from _i
#define DECL_SHIM(_i, _allcaps) \
class _i##Shim MOZ_FINAL : public nsIInterfaceRequestor, \
public _i \
{ \
+ ~_i##Shim() {} \
public: \
_i##Shim(nsIInterfaceRequestor* aIfreq, _i* aRealPtr) \
: mIfReq(aIfreq), mRealPtr(aRealPtr) \
{ \
NS_ASSERTION(mIfReq, "Expected non-null here"); \
NS_ASSERTION(mRealPtr, "Expected non-null here"); \
} \
NS_DECL_ISUPPORTS \
--- a/content/base/src/nsDocumentEncoder.cpp
+++ b/content/base/src/nsDocumentEncoder.cpp
@@ -61,23 +61,24 @@ enum nsRangeIterationDirection {
kDirectionOut = -1,
kDirectionIn = 1
};
class nsDocumentEncoder : public nsIDocumentEncoder
{
public:
nsDocumentEncoder();
- virtual ~nsDocumentEncoder();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(nsDocumentEncoder)
NS_DECL_NSIDOCUMENTENCODER
protected:
+ virtual ~nsDocumentEncoder();
+
void Initialize(bool aClearCachedSerializer = true);
nsresult SerializeNodeStart(nsINode* aNode, int32_t aStartOffset,
int32_t aEndOffset, nsAString& aStr,
nsINode* aOriginalNode = nullptr);
nsresult SerializeToStringRecursive(nsINode* aNode,
nsAString& aStr,
bool aDontSerializeRoot,
uint32_t aMaxLength = 0);
--- a/content/base/src/nsFormData.h
+++ b/content/base/src/nsFormData.h
@@ -26,16 +26,18 @@ class GlobalObject;
} // namespace dom
} // namespace mozilla
class nsFormData : public nsIDOMFormData,
public nsIXHRSendable,
public nsFormSubmission,
public nsWrapperCache
{
+ ~nsFormData() {}
+
public:
nsFormData(nsISupports* aOwner = nullptr);
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsFormData,
nsIDOMFormData)
NS_DECL_NSIDOMFORMDATA
--- a/content/base/src/nsFrameLoader.h
+++ b/content/base/src/nsFrameLoader.h
@@ -132,16 +132,18 @@ public:
nsSize mViewportSize;
nsSize mContentSize;
float mParentScaleX;
float mParentScaleY;
nsFrameLoader* mFrameLoader; // WEAK
private:
+ ~nsContentView() {}
+
nsresult Update(const ViewConfig& aConfig);
ViewID mScrollId;
bool mIsRoot;
ViewConfig mConfig;
};
@@ -153,19 +155,19 @@ class nsFrameLoader MOZ_FINAL : public n
friend class AutoResetInShow;
typedef mozilla::dom::PBrowserParent PBrowserParent;
typedef mozilla::dom::TabParent TabParent;
typedef mozilla::layout::RenderFrameParent RenderFrameParent;
protected:
nsFrameLoader(mozilla::dom::Element* aOwner, bool aNetworkCreated);
-public:
~nsFrameLoader();
+public:
bool AsyncScrollEnabled() const
{
return !!(mRenderMode & RENDER_MODE_ASYNC_SCROLL);
}
static nsFrameLoader* Create(mozilla::dom::Element* aOwner,
bool aNetworkCreated);
--- a/content/base/src/nsFrameMessageManager.cpp
+++ b/content/base/src/nsFrameMessageManager.cpp
@@ -1204,16 +1204,18 @@ struct MessageManagerReferentCount
} // anonymous namespace
namespace mozilla {
namespace dom {
class MessageManagerReporter MOZ_FINAL : public nsIMemoryReporter
{
+ ~MessageManagerReporter() {}
+
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIMEMORYREPORTER
static const size_t kSuspectReferentCount = 300;
protected:
void CountReferents(nsFrameMessageManager* aMessageManager,
MessageManagerReferentCount* aReferentCount);
--- a/content/base/src/nsFrameMessageManager.h
+++ b/content/base/src/nsFrameMessageManager.h
@@ -179,16 +179,17 @@ public:
if (mParentManager && (mCallback || IsBroadcaster())) {
mParentManager->AddChildManager(this);
}
if (mOwnsCallback) {
mOwnedCallback = aCallback;
}
}
+private:
~nsFrameMessageManager()
{
for (int32_t i = mChildManagers.Count(); i > 0; --i) {
static_cast<nsFrameMessageManager*>(mChildManagers[i - 1])->
Disconnect(false);
}
if (mIsProcessManager) {
if (this == sParentProcessManager) {
@@ -200,16 +201,17 @@ public:
sPendingSameProcessAsyncMessages = nullptr;
}
if (this == sSameProcessParentManager) {
sSameProcessParentManager = nullptr;
}
}
}
+public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsFrameMessageManager,
nsIContentFrameMessageManager)
NS_DECL_NSIMESSAGELISTENERMANAGER
NS_DECL_NSIMESSAGESENDER
NS_DECL_NSIMESSAGEBROADCASTER
NS_DECL_NSISYNCMESSAGESENDER
NS_DECL_NSICONTENTFRAMEMESSAGEMANAGER
@@ -405,16 +407,18 @@ protected:
nsCOMPtr<nsIXPConnectJSObjectHolder> mGlobal;
nsCOMPtr<nsIPrincipal> mPrincipal;
static nsDataHashtable<nsStringHashKey, nsFrameScriptObjectExecutorHolder*>* sCachedScripts;
static nsScriptCacheCleaner* sScriptCacheCleaner;
};
class nsScriptCacheCleaner MOZ_FINAL : public nsIObserver
{
+ ~nsScriptCacheCleaner() {}
+
NS_DECL_ISUPPORTS
nsScriptCacheCleaner()
{
nsCOMPtr<nsIObserverService> obsSvc = mozilla::services::GetObserverService();
if (obsSvc)
obsSvc->AddObserver(this, "xpcom-shutdown", false);
}
--- a/content/base/src/nsGenericDOMDataNode.h
+++ b/content/base/src/nsGenericDOMDataNode.h
@@ -61,17 +61,16 @@ class nsGenericDOMDataNode : public nsIC
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_SIZEOF_EXCLUDING_THIS
nsGenericDOMDataNode(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
nsGenericDOMDataNode(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
- virtual ~nsGenericDOMDataNode();
virtual void GetNodeValueInternal(nsAString& aNodeValue) MOZ_OVERRIDE;
virtual void SetNodeValueInternal(const nsAString& aNodeValue,
mozilla::ErrorResult& aError) MOZ_OVERRIDE;
// Implementation for nsIDOMCharacterData
nsresult GetData(nsAString& aData) const;
nsresult SetData(const nsAString& aData);
@@ -220,16 +219,18 @@ public:
#ifdef DEBUG
void ToCString(nsAString& aBuf, int32_t aOffset, int32_t aLen) const;
#endif
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(nsGenericDOMDataNode)
protected:
+ virtual ~nsGenericDOMDataNode();
+
virtual mozilla::dom::Element* GetNameSpaceElement()
{
nsINode *parent = GetParentNode();
return parent && parent->IsElement() ? parent->AsElement() : nullptr;
}
/**
--- a/content/base/src/nsHostObjectProtocolHandler.cpp
+++ b/content/base/src/nsHostObjectProtocolHandler.cpp
@@ -28,16 +28,18 @@ struct DataInfo
static nsClassHashtable<nsCStringHashKey, DataInfo>* gDataTable;
// Memory reporting for the hash table.
namespace mozilla {
class HostObjectURLsReporter MOZ_FINAL : public nsIMemoryReporter
{
+ ~HostObjectURLsReporter() {}
+
public:
NS_DECL_ISUPPORTS
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
nsISupports* aData, bool aAnonymize)
{
return MOZ_COLLECT_REPORT(
"host-object-urls", KIND_OTHER, UNITS_COUNT,
@@ -127,16 +129,18 @@ class BlobURLsReporter MOZ_FINAL : publi
}
rv = frame->GetCaller(getter_AddRefs(frame));
NS_ENSURE_SUCCESS_VOID(rv);
}
}
private:
+ ~BlobURLsReporter() {}
+
struct EnumArg {
nsIHandleReportCallback* mCallback;
nsISupports* mData;
bool mAnonymize;
nsDataHashtable<nsPtrHashKey<nsIDOMBlob>, uint32_t> mRefCounts;
};
// Determine number of URLs per blob, to handle the case where it's > 1.
--- a/content/base/src/nsMixedContentBlocker.h
+++ b/content/base/src/nsMixedContentBlocker.h
@@ -21,19 +21,20 @@ enum MixedContentTypes {
// "Display" content, such as images, audio, video, and <a ping>
eMixedDisplay
};
#include "nsIContentPolicy.h"
class nsMixedContentBlocker : public nsIContentPolicy
{
+ virtual ~nsMixedContentBlocker();
+
public:
NS_DECL_ISUPPORTS
NS_DECL_NSICONTENTPOLICY
nsMixedContentBlocker();
- virtual ~nsMixedContentBlocker();
static bool sBlockMixedScript;
static bool sBlockMixedDisplay;
};
#endif /* nsMixedContentBlocker_h___ */
--- a/content/base/src/nsNoDataProtocolContentPolicy.h
+++ b/content/base/src/nsNoDataProtocolContentPolicy.h
@@ -19,20 +19,21 @@
"@mozilla.org/no-data-protocol-content-policy;1"
#include "nsIContentPolicy.h"
#include "mozilla/Attributes.h"
class nsNoDataProtocolContentPolicy MOZ_FINAL : public nsIContentPolicy
{
+ ~nsNoDataProtocolContentPolicy()
+ {}
+
public:
NS_DECL_ISUPPORTS
NS_DECL_NSICONTENTPOLICY
nsNoDataProtocolContentPolicy()
{}
- ~nsNoDataProtocolContentPolicy()
- {}
};
#endif /* nsNoDataProtocolContentPolicy_h__ */
--- a/content/base/src/nsNodeInfoManager.h
+++ b/content/base/src/nsNodeInfoManager.h
@@ -29,19 +29,21 @@ template<class T> struct already_AddRefe
namespace mozilla {
namespace dom {
class NodeInfo;
}
}
class nsNodeInfoManager MOZ_FINAL
{
+private:
+ ~nsNodeInfoManager();
+
public:
nsNodeInfoManager();
- ~nsNodeInfoManager();
NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(nsNodeInfoManager)
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(nsNodeInfoManager)
/**
* Initialize the nodeinfo manager with a document.
*/
--- a/content/base/src/nsObjectLoadingContent.cpp
+++ b/content/base/src/nsObjectLoadingContent.cpp
@@ -1154,16 +1154,17 @@ public:
NS_FORWARD_NSIREQUESTOBSERVER (static_cast<nsObjectLoadingContent *>
(mContent.get())->)
ObjectInterfaceRequestorShim(nsIObjectLoadingContent* aContent)
: mContent(aContent)
{}
protected:
+ ~ObjectInterfaceRequestorShim() {}
nsCOMPtr<nsIObjectLoadingContent> mContent;
};
NS_IMPL_CYCLE_COLLECTION(ObjectInterfaceRequestorShim, mContent)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ObjectInterfaceRequestorShim)
NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
NS_INTERFACE_MAP_ENTRY(nsIChannelEventSink)
@@ -3515,16 +3516,20 @@ nsObjectLoadingContent::GetOwnPropertyNa
nsObjectLoadingContent::SetupProtoChainRunner::SetupProtoChainRunner(
nsIScriptContext* scriptContext,
nsObjectLoadingContent* aContent)
: mContext(scriptContext)
, mContent(aContent)
{
}
+nsObjectLoadingContent::SetupProtoChainRunner::~SetupProtoChainRunner()
+{
+}
+
NS_IMETHODIMP
nsObjectLoadingContent::SetupProtoChainRunner::Run()
{
// XXXbz Does it really matter what JSContext we use here? Seems
// like we could just always use the safe context....
nsCxPusher pusher;
JSContext* cx = mContext ? mContext->GetNativeContext()
: nsContentUtils::GetSafeJSContext();
--- a/content/base/src/nsObjectLoadingContent.h
+++ b/content/base/src/nsObjectLoadingContent.h
@@ -468,16 +468,17 @@ class nsObjectLoadingContent : public ns
* Gets the frame that's associated with this content node.
* Does not flush.
*/
nsObjectFrame* GetExistingFrame();
// Helper class for SetupProtoChain
class SetupProtoChainRunner MOZ_FINAL : public nsIRunnable
{
+ ~SetupProtoChainRunner();
public:
NS_DECL_ISUPPORTS
SetupProtoChainRunner(nsIScriptContext* scriptContext,
nsObjectLoadingContent* aContent);
NS_IMETHOD Run() MOZ_OVERRIDE;
--- a/content/base/src/nsPlainTextSerializer.h
+++ b/content/base/src/nsPlainTextSerializer.h
@@ -29,17 +29,16 @@ namespace dom {
class Element;
} // namespace dom
} // namespace mozilla
class nsPlainTextSerializer : public nsIContentSerializer
{
public:
nsPlainTextSerializer();
- virtual ~nsPlainTextSerializer();
NS_DECL_ISUPPORTS
// nsIContentSerializer
NS_IMETHOD Init(uint32_t flags, uint32_t aWrapColumn,
const char* aCharSet, bool aIsCopying,
bool aIsWholeDocument) MOZ_OVERRIDE;
@@ -62,16 +61,18 @@ public:
NS_IMETHOD AppendElementEnd(mozilla::dom::Element* aElement,
nsAString& aStr) MOZ_OVERRIDE;
NS_IMETHOD Flush(nsAString& aStr) MOZ_OVERRIDE;
NS_IMETHOD AppendDocumentStart(nsIDocument *aDocument,
nsAString& aStr) MOZ_OVERRIDE;
protected:
+ virtual ~nsPlainTextSerializer();
+
nsresult GetAttributeValue(nsIAtom* aName, nsString& aValueRet);
void AddToLine(const char16_t* aStringToAdd, int32_t aLength);
void EndLine(bool softlinebreak, bool aBreakBySpace = false);
void EnsureVerticalSpace(int32_t noOfRows);
void FlushLine();
void OutputQuotesAndIndent(bool stripTrailingSpaces=false);
void Output(nsString& aString);
void Write(const nsAString& aString);
--- a/content/base/src/nsRange.h
+++ b/content/base/src/nsRange.h
@@ -33,16 +33,18 @@ class DOMRectList;
class nsRange MOZ_FINAL : public nsIDOMRange,
public nsStubMutationObserver,
public nsWrapperCache
{
typedef mozilla::ErrorResult ErrorResult;
typedef mozilla::dom::DOMRect DOMRect;
typedef mozilla::dom::DOMRectList DOMRectList;
+ virtual ~nsRange();
+
public:
nsRange(nsINode* aNode)
: mRoot(nullptr)
, mStartOffset(0)
, mEndOffset(0)
, mIsPositioned(false)
, mIsDetached(false)
, mMaySpanAnonymousSubtrees(false)
@@ -54,17 +56,16 @@ public:
, mAssertNextInsertOrAppendIndex(-1)
, mAssertNextInsertOrAppendNode(nullptr)
#endif
{
SetIsDOMBinding();
MOZ_ASSERT(aNode, "range isn't in a document!");
mOwner = aNode->OwnerDoc();
}
- virtual ~nsRange();
static nsresult CreateRange(nsIDOMNode* aStartParent, int32_t aStartOffset,
nsIDOMNode* aEndParent, int32_t aEndOffset,
nsRange** aRange);
static nsresult CreateRange(nsIDOMNode* aStartParent, int32_t aStartOffset,
nsIDOMNode* aEndParent, int32_t aEndOffset,
nsIDOMRange** aRange);
static nsresult CreateRange(nsINode* aStartParent, int32_t aStartOffset,
--- a/content/base/src/nsScriptLoader.cpp
+++ b/content/base/src/nsScriptLoader.cpp
@@ -64,37 +64,37 @@ static PRLogModuleInfo* gCspPRLog;
using namespace mozilla;
using namespace mozilla::dom;
//////////////////////////////////////////////////////////////
// Per-request data structure
//////////////////////////////////////////////////////////////
class nsScriptLoadRequest MOZ_FINAL : public nsISupports {
+ ~nsScriptLoadRequest()
+ {
+ js_free(mScriptTextBuf);
+ }
+
public:
nsScriptLoadRequest(nsIScriptElement* aElement,
uint32_t aVersion,
CORSMode aCORSMode)
: mElement(aElement),
mLoading(true),
mIsInline(true),
mHasSourceMapURL(false),
mScriptTextBuf(nullptr),
mScriptTextLength(0),
mJSVersion(aVersion),
mLineNo(1),
mCORSMode(aCORSMode)
{
}
- ~nsScriptLoadRequest()
- {
- js_free(mScriptTextBuf);
- }
-
NS_DECL_THREADSAFE_ISUPPORTS
void FireScriptAvailable(nsresult aResult)
{
mElement->ScriptAvailable(aResult, mElement, mIsInline, mURI, mLineNo);
}
void FireScriptEvaluated(nsresult aResult)
{
--- a/content/base/src/nsScriptLoader.h
+++ b/content/base/src/nsScriptLoader.h
@@ -50,17 +50,16 @@ class nsScriptLoader : public nsIStreamL
nsScriptLoader* mScriptLoader;
};
friend class nsScriptRequestProcessor;
friend class AutoCurrentScriptUpdater;
public:
nsScriptLoader(nsIDocument* aDocument);
- virtual ~nsScriptLoader();
NS_DECL_ISUPPORTS
NS_DECL_NSISTREAMLOADEROBSERVER
/**
* The loader maintains a weak reference to the document with
* which it is initialized. This call forces the reference to
* be dropped.
@@ -240,16 +239,18 @@ public:
/**
* Process a request that was deferred so that the script could be compiled
* off thread.
*/
nsresult ProcessOffThreadRequest(nsScriptLoadRequest *aRequest,
void **aOffThreadToken);
private:
+ virtual ~nsScriptLoader();
+
/**
* Unblocks the creator parser of the parser-blocking scripts.
*/
void UnblockParser(nsScriptLoadRequest* aParserBlockingRequest);
/**
* Asynchronously resumes the creator parser of the parser-blocking scripts.
*/
--- a/content/base/src/nsSyncLoadService.cpp
+++ b/content/base/src/nsSyncLoadService.cpp
@@ -32,46 +32,48 @@
class nsSyncLoader : public nsIStreamListener,
public nsIChannelEventSink,
public nsIInterfaceRequestor,
public nsSupportsWeakReference
{
public:
nsSyncLoader() : mLoading(false) {}
- virtual ~nsSyncLoader();
NS_DECL_ISUPPORTS
nsresult LoadDocument(nsIChannel* aChannel, nsIPrincipal *aLoaderPrincipal,
bool aChannelIsSync, bool aForceToXML,
nsIDOMDocument** aResult);
NS_FORWARD_NSISTREAMLISTENER(mListener->)
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSICHANNELEVENTSINK
NS_DECL_NSIINTERFACEREQUESTOR
private:
+ virtual ~nsSyncLoader();
+
nsresult PushAsyncStream(nsIStreamListener* aListener);
nsresult PushSyncStream(nsIStreamListener* aListener);
nsCOMPtr<nsIChannel> mChannel;
nsCOMPtr<nsIStreamListener> mListener;
bool mLoading;
nsresult mAsyncLoadStatus;
};
class nsForceXMLListener : public nsIStreamListener
{
+ virtual ~nsForceXMLListener();
+
public:
nsForceXMLListener(nsIStreamListener* aListener);
- virtual ~nsForceXMLListener();
NS_DECL_ISUPPORTS
NS_FORWARD_NSISTREAMLISTENER(mListener->)
NS_DECL_NSIREQUESTOBSERVER
private:
nsCOMPtr<nsIStreamListener> mListener;
};
--- a/content/base/src/nsXMLContentSerializer.h
+++ b/content/base/src/nsXMLContentSerializer.h
@@ -24,17 +24,16 @@
class nsIAtom;
class nsIDOMNode;
class nsINode;
class nsXMLContentSerializer : public nsIContentSerializer {
public:
nsXMLContentSerializer();
- virtual ~nsXMLContentSerializer();
NS_DECL_ISUPPORTS
NS_IMETHOD Init(uint32_t flags, uint32_t aWrapColumn,
const char* aCharSet, bool aIsCopying,
bool aRewriteEncodingDeclaration) MOZ_OVERRIDE;
NS_IMETHOD AppendText(nsIContent* aText, int32_t aStartOffset,
@@ -63,16 +62,17 @@ class nsXMLContentSerializer : public ns
nsAString& aStr) MOZ_OVERRIDE;
NS_IMETHOD Flush(nsAString& aStr) MOZ_OVERRIDE { return NS_OK; }
NS_IMETHOD AppendDocumentStart(nsIDocument *aDocument,
nsAString& aStr) MOZ_OVERRIDE;
protected:
+ virtual ~nsXMLContentSerializer();
/**
* Appends a char16_t character and increments the column position
*/
void AppendToString(const char16_t aChar,
nsAString& aOutputStr);
/**
--- a/content/base/src/nsXMLHttpRequest.cpp
+++ b/content/base/src/nsXMLHttpRequest.cpp
@@ -178,16 +178,18 @@ static void AddLoadFlags(nsIRequest *req
class XMLHttpRequestAuthPrompt : public nsIAuthPrompt
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIAUTHPROMPT
XMLHttpRequestAuthPrompt();
+
+protected:
virtual ~XMLHttpRequestAuthPrompt();
};
NS_IMPL_ISUPPORTS(XMLHttpRequestAuthPrompt, nsIAuthPrompt)
XMLHttpRequestAuthPrompt::XMLHttpRequestAuthPrompt()
{
MOZ_COUNT_CTOR(XMLHttpRequestAuthPrompt);
@@ -3431,16 +3433,18 @@ public:
NS_IMETHOD OnRedirectVerifyCallback(nsresult result)
{
mXHR->OnRedirectVerifyCallback(result);
return NS_OK;
}
private:
+ ~AsyncVerifyRedirectCallbackForwarder() {}
+
nsRefPtr<nsXMLHttpRequest> mXHR;
};
NS_IMPL_CYCLE_COLLECTION(AsyncVerifyRedirectCallbackForwarder, mXHR)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AsyncVerifyRedirectCallbackForwarder)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_ENTRY(nsIAsyncVerifyRedirectCallback)
--- a/content/base/src/nsXMLHttpRequest.h
+++ b/content/base/src/nsXMLHttpRequest.h
@@ -607,19 +607,20 @@ protected:
// used to implement getAllResponseHeaders()
class nsHeaderVisitor : public nsIHttpHeaderVisitor {
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIHTTPHEADERVISITOR
nsHeaderVisitor(nsXMLHttpRequest* aXMLHttpRequest, nsIHttpChannel* aHttpChannel)
: mXHR(aXMLHttpRequest), mHttpChannel(aHttpChannel) {}
- virtual ~nsHeaderVisitor() {}
const nsACString &Headers() { return mHeaders; }
private:
+ virtual ~nsHeaderVisitor() {}
+
nsCString mHeaders;
nsXMLHttpRequest* mXHR;
nsCOMPtr<nsIHttpChannel> mHttpChannel;
};
// The bytes of our response body. Only used for DEFAULT, ARRAYBUFFER and
// BLOB responseTypes
nsCString mResponseBody;
@@ -789,22 +790,24 @@ class nsXMLHttpRequestXPCOMifier MOZ_FIN
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsXMLHttpRequestXPCOMifier,
nsIStreamListener)
nsXMLHttpRequestXPCOMifier(nsXMLHttpRequest* aXHR) :
mXHR(aXHR)
{
}
+private:
~nsXMLHttpRequestXPCOMifier() {
if (mXHR) {
mXHR->mXPCOMifier = nullptr;
}
}
+public:
NS_FORWARD_NSISTREAMLISTENER(mXHR->)
NS_FORWARD_NSIREQUESTOBSERVER(mXHR->)
NS_FORWARD_NSICHANNELEVENTSINK(mXHR->)
NS_FORWARD_NSIPROGRESSEVENTSINK(mXHR->)
NS_FORWARD_NSITIMERCALLBACK(mXHR->)
NS_DECL_NSIINTERFACEREQUESTOR
@@ -822,14 +825,15 @@ public:
if (xhr) {
static_cast<nsXMLHttpRequest*>(xhr.get())->ChangeStateToDone();
}
mXHR = nullptr;
return NS_OK;
}
nsXHRParseEndListener(nsIXMLHttpRequest* aXHR)
: mXHR(do_GetWeakReference(aXHR)) {}
+private:
virtual ~nsXHRParseEndListener() {}
-private:
+
nsWeakPtr mXHR;
};
#endif
--- a/content/base/test/unit/head_utilities.js
+++ b/content/base/test/unit/head_utilities.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://testing-common/httpd.js");
const nsIDocumentEncoder = Components.interfaces.nsIDocumentEncoder;
const replacementChar = Components.interfaces.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER;
--- a/content/base/test/unit/test_xmlserializer.js
+++ b/content/base/test/unit/test_xmlserializer.js
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
function xmlEncode(aFile, aFlags, aCharset) {
if(aFlags == undefined) aFlags = 0;
if(aCharset == undefined) aCharset = "UTF-8";
--- a/content/html/content/src/HTMLBodyElement.h
+++ b/content/html/content/src/HTMLBodyElement.h
@@ -13,19 +13,20 @@
namespace mozilla {
namespace dom {
class OnBeforeUnloadEventHandlerNonNull;
class HTMLBodyElement;
class BodyRule: public nsIStyleRule
{
+ virtual ~BodyRule();
+
public:
BodyRule(HTMLBodyElement* aPart);
- virtual ~BodyRule();
NS_DECL_ISUPPORTS
// nsIStyleRule interface
virtual void MapRuleInfoInto(nsRuleData* aRuleData) MOZ_OVERRIDE;
#ifdef DEBUG
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
#endif
--- a/content/html/content/src/HTMLContentElement.h
+++ b/content/html/content/src/HTMLContentElement.h
@@ -91,31 +91,31 @@ protected:
bool mValidSelector;
bool mIsInsertionPoint;
};
class DistributedContentList : public nsINodeList
{
public:
DistributedContentList(HTMLContentElement* aHostElement);
- virtual ~DistributedContentList();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(DistributedContentList)
// nsIDOMNodeList
NS_DECL_NSIDOMNODELIST
// nsINodeList
virtual nsIContent* Item(uint32_t aIndex);
virtual int32_t IndexOf(nsIContent* aContent);
virtual nsINode* GetParentObject() { return mParent; }
virtual uint32_t Length() const;
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
protected:
+ virtual ~DistributedContentList();
nsRefPtr<HTMLContentElement> mParent;
nsCOMArray<nsIContent> mDistributedNodes;
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_HTMLContentElement_h__
--- a/content/html/content/src/HTMLFormControlsCollection.h
+++ b/content/html/content/src/HTMLFormControlsCollection.h
@@ -23,17 +23,16 @@ class HTMLImageElement;
class OwningNodeListOrElement;
template<typename> struct Nullable;
class HTMLFormControlsCollection : public nsIHTMLCollection
, public nsWrapperCache
{
public:
HTMLFormControlsCollection(HTMLFormElement* aForm);
- virtual ~HTMLFormControlsCollection();
void DropFormReference();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
// nsIDOMHTMLCollection interface
NS_DECL_NSIDOMHTMLCOLLECTION
@@ -78,16 +77,17 @@ public:
* @return NS_OK or NS_ERROR_OUT_OF_MEMORY.
*/
nsresult GetSortedControls(nsTArray<nsGenericHTMLFormElement*>& aControls) const;
// nsWrapperCache
using nsWrapperCache::GetWrapperPreserveColor;
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
protected:
+ virtual ~HTMLFormControlsCollection();
virtual JSObject* GetWrapperPreserveColorInternal() MOZ_OVERRIDE
{
return nsWrapperCache::GetWrapperPreserveColor();
}
public:
static bool ShouldBeInElements(nsIFormControl* aFormControl);
--- a/content/html/content/src/HTMLInputElement.cpp
+++ b/content/html/content/src/HTMLInputElement.cpp
@@ -247,16 +247,18 @@ class HTMLInputElementState MOZ_FINAL :
HTMLInputElementState()
: mValue()
, mChecked(false)
, mCheckedSet(false)
{};
protected:
+ ~HTMLInputElementState() {}
+
nsString mValue;
nsTArray<nsCOMPtr<nsIDOMFile> > mFiles;
bool mChecked;
bool mCheckedSet;
};
NS_DEFINE_STATIC_IID_ACCESSOR(HTMLInputElementState, NS_INPUT_ELEMENT_STATE_IID)
@@ -325,16 +327,18 @@ namespace {
* This enumerator does not walk the directory tree breadth-first, but it also
* is not guaranteed to walk it depth-first either (since it uses
* nsIFile::GetDirectoryEntries, which is not guaranteed to group a directory's
* subdirectories at the beginning of the list that it returns).
*/
class DirPickerRecursiveFileEnumerator MOZ_FINAL
: public nsISimpleEnumerator
{
+ ~DirPickerRecursiveFileEnumerator() {}
+
public:
NS_DECL_ISUPPORTS
DirPickerRecursiveFileEnumerator(nsIFile* aTopDir)
: mTopDir(aTopDir)
{
MOZ_ASSERT(!NS_IsMainThread(), "This class blocks on I/O!");
@@ -701,16 +705,18 @@ HTMLInputElement::nsFilePickerShownCallb
}
NS_IMPL_ISUPPORTS(HTMLInputElement::nsFilePickerShownCallback,
nsIFilePickerShownCallback)
class nsColorPickerShownCallback MOZ_FINAL
: public nsIColorPickerShownCallback
{
+ ~nsColorPickerShownCallback() {}
+
public:
nsColorPickerShownCallback(HTMLInputElement* aInput,
nsIColorPicker* aColorPicker)
: mInput(aInput)
, mColorPicker(aColorPicker)
, mValueChanged(false)
{}
--- a/content/html/content/src/HTMLInputElement.h
+++ b/content/html/content/src/HTMLInputElement.h
@@ -35,16 +35,19 @@ class EventChainPostVisitor;
class EventChainPreVisitor;
namespace dom {
class Date;
class DirPickerFileListBuilderTask;
class UploadLastDir MOZ_FINAL : public nsIObserver, public nsSupportsWeakReference {
+
+ ~UploadLastDir() {}
+
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIOBSERVER
/**
* Fetch the last used directory for this location from the content
* pref service, and display the file picker opened in that directory.
*
@@ -61,25 +64,25 @@ public:
* content pref service, if it is available
* @param aURI URI of the current page
* @param aDir Parent directory of the file(s)/directory chosen by the user
*/
nsresult StoreLastUsedDirectory(nsIDocument* aDoc, nsIFile* aDir);
class ContentPrefCallback MOZ_FINAL : public nsIContentPrefCallback2
{
- public:
+ virtual ~ContentPrefCallback()
+ { }
+
+ public:
ContentPrefCallback(nsIFilePicker* aFilePicker, nsIFilePickerShownCallback* aFpCallback)
: mFilePicker(aFilePicker)
, mFpCallback(aFpCallback)
{ }
- virtual ~ContentPrefCallback()
- { }
-
NS_DECL_ISUPPORTS
NS_DECL_NSICONTENTPREFCALLBACK2
nsCOMPtr<nsIFilePicker> mFilePicker;
nsCOMPtr<nsIFilePickerShownCallback> mFpCallback;
nsCOMPtr<nsIContentPref> mResult;
};
};
@@ -1359,22 +1362,22 @@ private:
// mapping, which can be different accross OS, user's personal configuration, ...)
// For now, only mask filters are considered to be "trusted".
bool mIsTrusted;
};
class nsFilePickerShownCallback
: public nsIFilePickerShownCallback
{
+ virtual ~nsFilePickerShownCallback()
+ { }
+
public:
nsFilePickerShownCallback(HTMLInputElement* aInput,
nsIFilePicker* aFilePicker);
- virtual ~nsFilePickerShownCallback()
- { }
-
NS_DECL_ISUPPORTS
NS_IMETHOD Done(int16_t aResult) MOZ_OVERRIDE;
private:
nsCOMPtr<nsIFilePicker> mFilePicker;
nsRefPtr<HTMLInputElement> mInput;
};
--- a/content/html/content/src/HTMLMediaElement.cpp
+++ b/content/html/content/src/HTMLMediaElement.cpp
@@ -237,16 +237,18 @@ public:
* to an nsIChannel, which holds a reference to this listener.
* We break the reference cycle in OnStartRequest by clearing mElement.
*/
class HTMLMediaElement::MediaLoadListener MOZ_FINAL : public nsIStreamListener,
public nsIChannelEventSink,
public nsIInterfaceRequestor,
public nsIObserver
{
+ ~MediaLoadListener() {}
+
NS_DECL_ISUPPORTS
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSICHANNELEVENTSINK
NS_DECL_NSIOBSERVER
NS_DECL_NSIINTERFACEREQUESTOR
public:
--- a/content/html/content/src/HTMLOptionsCollection.h
+++ b/content/html/content/src/HTMLOptionsCollection.h
@@ -31,24 +31,25 @@ class HTMLSelectElement;
*/
class HTMLOptionsCollection : public nsIHTMLCollection
, public nsIDOMHTMLOptionsCollection
, public nsWrapperCache
{
typedef HTMLOptionElementOrHTMLOptGroupElement HTMLOptionOrOptGroupElement;
public:
HTMLOptionsCollection(HTMLSelectElement* aSelect);
- virtual ~HTMLOptionsCollection();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
// nsWrapperCache
using nsWrapperCache::GetWrapperPreserveColor;
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
protected:
+ virtual ~HTMLOptionsCollection();
+
virtual JSObject* GetWrapperPreserveColorInternal() MOZ_OVERRIDE
{
return nsWrapperCache::GetWrapperPreserveColor();
}
public:
// nsIDOMHTMLOptionsCollection interface
NS_DECL_NSIDOMHTMLOPTIONSCOLLECTION
--- a/content/html/content/src/HTMLPropertiesCollection.h
+++ b/content/html/content/src/HTMLPropertiesCollection.h
@@ -49,22 +49,23 @@ protected:
class HTMLPropertiesCollection : public nsIHTMLCollection,
public nsStubMutationObserver,
public nsWrapperCache
{
friend class PropertyNodeList;
friend class PropertyStringList;
public:
HTMLPropertiesCollection(nsGenericHTMLElement* aRoot);
- virtual ~HTMLPropertiesCollection();
// nsWrapperCache
using nsWrapperCache::GetWrapperPreserveColor;
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
protected:
+ virtual ~HTMLPropertiesCollection();
+
virtual JSObject* GetWrapperPreserveColorInternal() MOZ_OVERRIDE
{
return nsWrapperCache::GetWrapperPreserveColor();
}
public:
virtual Element* GetElementAt(uint32_t aIndex);
@@ -146,17 +147,16 @@ protected:
};
class PropertyNodeList : public nsINodeList,
public nsStubMutationObserver
{
public:
PropertyNodeList(HTMLPropertiesCollection* aCollection,
nsIContent* aRoot, const nsAString& aName);
- virtual ~PropertyNodeList();
virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
void SetDocument(nsIDocument* aDocument);
void GetValues(JSContext* aCx, nsTArray<JS::Value >& aResult,
ErrorResult& aError);
@@ -185,16 +185,18 @@ public:
void Clear()
{
mElements.Clear();
}
void SetDirty() { mIsDirty = true; }
protected:
+ virtual ~PropertyNodeList();
+
// Make sure this list is up to date, in case the DOM has been mutated.
void EnsureFresh();
// the the name that this list corresponds to
nsString mName;
// the document mParent is in, if any
nsCOMPtr<nsIDocument> mDoc;
--- a/content/html/content/src/HTMLSelectElement.h
+++ b/content/html/content/src/HTMLSelectElement.h
@@ -45,20 +45,16 @@ class HTMLSelectElement;
* The restore state used by select
*/
class SelectState : public nsISupports
{
public:
SelectState()
{
}
- virtual ~SelectState()
- {
- }
-
NS_DECLARE_STATIC_IID_ACCESSOR(NS_SELECT_STATE_IID)
NS_DECL_ISUPPORTS
void PutOption(int32_t aIndex, const nsAString& aValue)
{
// If the option is empty, store the index. If not, store the value.
if (aValue.IsEmpty()) {
mIndices.Put(aIndex);
@@ -68,16 +64,20 @@ public:
}
bool ContainsOption(int32_t aIndex, const nsAString& aValue)
{
return mValues.Contains(aValue) || mIndices.Contains(aIndex);
}
private:
+ virtual ~SelectState()
+ {
+ }
+
nsCheapSet<nsStringHashKey> mValues;
nsCheapSet<nsUint32HashKey> mIndices;
};
NS_DEFINE_STATIC_IID_ACCESSOR(SelectState, NS_SELECT_STATE_IID)
class MOZ_STACK_CLASS SafeOptionListMutation
{
--- a/content/html/content/src/HTMLTableElement.cpp
+++ b/content/html/content/src/HTMLTableElement.cpp
@@ -24,17 +24,16 @@ namespace dom {
* This class provides a late-bound collection of rows in a table.
* mParent is NOT ref-counted to avoid circular references
*/
class TableRowsCollection : public nsIHTMLCollection,
public nsWrapperCache
{
public:
TableRowsCollection(HTMLTableElement *aParent);
- virtual ~TableRowsCollection();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_NSIDOMHTMLCOLLECTION
virtual Element* GetElementAt(uint32_t aIndex);
virtual nsINode* GetParentObject()
{
return mParent;
@@ -48,16 +47,18 @@ public:
NS_IMETHOD ParentDestroyed();
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TableRowsCollection)
// nsWrapperCache
using nsWrapperCache::GetWrapperPreserveColor;
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
protected:
+ virtual ~TableRowsCollection();
+
virtual JSObject* GetWrapperPreserveColorInternal() MOZ_OVERRIDE
{
return nsWrapperCache::GetWrapperPreserveColor();
}
// Those rows that are not in table sections
HTMLTableElement* mParent;
nsRefPtr<nsContentList> mOrphanRows;
--- a/content/html/content/src/MediaError.h
+++ b/content/html/content/src/MediaError.h
@@ -14,16 +14,18 @@
#include "mozilla/Attributes.h"
namespace mozilla {
namespace dom {
class MediaError MOZ_FINAL : public nsIDOMMediaError,
public nsWrapperCache
{
+ ~MediaError() {}
+
public:
MediaError(HTMLMediaElement* aParent, uint16_t aCode);
// nsISupports
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MediaError)
// nsIDOMMediaError
--- a/content/html/content/src/TextTrackManager.cpp
+++ b/content/html/content/src/TextTrackManager.cpp
@@ -105,16 +105,20 @@ TextTrackManager::TextTrackManager(HTMLM
if (!sParserWrapper) {
nsCOMPtr<nsIWebVTTParserWrapper> parserWrapper =
do_CreateInstance(NS_WEBVTTPARSERWRAPPER_CONTRACTID);
sParserWrapper = parserWrapper;
ClearOnShutdown(&sParserWrapper);
}
}
+TextTrackManager::~TextTrackManager()
+{
+}
+
TextTrackList*
TextTrackManager::TextTracks() const
{
return mTextTracks;
}
already_AddRefed<TextTrack>
TextTrackManager::AddTextTrack(TextTrackKind aKind, const nsAString& aLabel,
--- a/content/html/content/src/TextTrackManager.h
+++ b/content/html/content/src/TextTrackManager.h
@@ -30,16 +30,18 @@ public:
bool LessThan(TextTrack* aOne, TextTrack* aTwo) const;
};
class TextTrack;
class TextTrackCue;
class TextTrackManager MOZ_FINAL : public nsIDOMEventListener
{
+ ~TextTrackManager();
+
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(TextTrackManager)
NS_DECL_NSIDOMEVENTLISTENER
TextTrackManager(HTMLMediaElement *aMediaElement);
--- a/content/html/content/src/TimeRanges.h
+++ b/content/html/content/src/TimeRanges.h
@@ -12,16 +12,28 @@
#include "nsTArray.h"
#include "nsWrapperCache.h"
#include "mozilla/ErrorResult.h"
#include "nsAutoPtr.h"
namespace mozilla {
namespace dom {
+class TimeRanges;
+
+}
+
+template<>
+struct HasDangerousPublicDestructor<dom::TimeRanges>
+{
+ static const bool value = true;
+};
+
+namespace dom {
+
// Implements media TimeRanges:
// http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#timeranges
class TimeRanges MOZ_FINAL : public nsIDOMTimeRanges
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIDOMTIMERANGES
--- a/content/html/content/src/UndoManager.cpp
+++ b/content/html/content/src/UndoManager.cpp
@@ -105,16 +105,18 @@ class UndoAttrChanged : public UndoTxn {
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(UndoAttrChanged)
NS_IMETHOD RedoTransaction();
NS_IMETHOD UndoTransaction();
nsresult Init();
UndoAttrChanged(mozilla::dom::Element* aElement, int32_t aNameSpaceID,
nsIAtom* aAttribute, int32_t aModType);
protected:
+ ~UndoAttrChanged() {}
+
nsresult SaveRedoState();
nsCOMPtr<nsIContent> mElement;
int32_t mNameSpaceID;
nsCOMPtr<nsIAtom> mAttrAtom;
int32_t mModType;
nsString mRedoValue;
nsString mUndoValue;
};
@@ -213,16 +215,18 @@ struct UndoCharacterChangedData {
class UndoTextChanged : public UndoTxn {
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(UndoTextChanged)
NS_IMETHOD RedoTransaction();
NS_IMETHOD UndoTransaction();
UndoTextChanged(nsIContent* aContent,
CharacterDataChangeInfo* aChange);
protected:
+ ~UndoTextChanged() {}
+
void SaveRedoState();
nsCOMPtr<nsIContent> mContent;
UndoCharacterChangedData mChange;
nsString mRedoValue;
nsString mUndoValue;
};
NS_IMPL_CYCLE_COLLECTION(UndoTextChanged, mContent)
@@ -325,16 +329,17 @@ UndoTextChanged::SaveRedoState()
class UndoContentAppend : public UndoTxn {
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(UndoContentAppend)
nsresult Init(int32_t aFirstIndex);
NS_IMETHOD RedoTransaction();
NS_IMETHOD UndoTransaction();
UndoContentAppend(nsIContent* aContent);
protected:
+ ~UndoContentAppend() {}
nsCOMPtr<nsIContent> mContent;
nsCOMArray<nsIContent> mChildren;
};
NS_IMPL_CYCLE_COLLECTION(UndoContentAppend, mContent, mChildren)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(UndoContentAppend)
NS_INTERFACE_MAP_ENTRY(nsITransaction)
@@ -395,16 +400,17 @@ UndoContentAppend::UndoTransaction()
class UndoContentInsert : public UndoTxn {
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(UndoContentInsert)
NS_IMETHOD UndoTransaction();
NS_IMETHOD RedoTransaction();
UndoContentInsert(nsIContent* aContent, nsIContent* aChild,
int32_t aInsertIndex);
protected:
+ ~UndoContentInsert() {}
nsCOMPtr<nsIContent> mContent;
nsCOMPtr<nsIContent> mChild;
nsCOMPtr<nsIContent> mNextNode;
};
NS_IMPL_CYCLE_COLLECTION(UndoContentInsert, mContent, mChild, mNextNode)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(UndoContentInsert)
@@ -483,16 +489,17 @@ class UndoContentRemove : public UndoTxn
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(UndoContentRemove)
NS_IMETHOD UndoTransaction();
NS_IMETHOD RedoTransaction();
nsresult Init(int32_t aInsertIndex);
UndoContentRemove(nsIContent* aContent, nsIContent* aChild,
int32_t aInsertIndex);
protected:
+ ~UndoContentRemove() {}
nsCOMPtr<nsIContent> mContent;
nsCOMPtr<nsIContent> mChild;
nsCOMPtr<nsIContent> mNextNode;
};
NS_IMPL_CYCLE_COLLECTION(UndoContentRemove, mContent, mChild, mNextNode)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(UndoContentRemove)
@@ -728,16 +735,17 @@ class FunctionCallTxn : public UndoTxn {
// Flags
static const uint32_t CALL_ON_REDO = 1;
static const uint32_t CALL_ON_UNDO = 2;
NS_IMETHOD RedoTransaction();
NS_IMETHOD UndoTransaction();
FunctionCallTxn(DOMTransaction* aTransaction, uint32_t aFlags);
protected:
+ ~FunctionCallTxn() {}
/**
* Call a function member on the transaction object with the
* specified function name.
*/
nsRefPtr<DOMTransaction> mTransaction;
uint32_t mFlags;
};
--- a/content/html/content/src/ValidityState.h
+++ b/content/html/content/src/ValidityState.h
@@ -12,16 +12,18 @@
#include "js/TypeDecls.h"
namespace mozilla {
namespace dom {
class ValidityState MOZ_FINAL : public nsIDOMValidityState,
public nsWrapperCache
{
+ ~ValidityState() {}
+
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(ValidityState)
NS_DECL_NSIDOMVALIDITYSTATE
friend class ::nsIConstraintValidation;
nsIConstraintValidation* GetParentObject() const {
--- a/content/html/content/src/nsGenericHTMLElement.cpp
+++ b/content/html/content/src/nsGenericHTMLElement.cpp
@@ -161,27 +161,27 @@ private:
// NOTE: nsGenericHTMLFormElement is saved as a nsGenericHTMLElement
// because AddRef/Release are ambiguous with nsGenericHTMLFormElement
// and Focus() is declared (and defined) in nsGenericHTMLElement class.
nsRefPtr<nsGenericHTMLElement> mElement;
};
class nsGenericHTMLElementTearoff : public nsIDOMElementCSSInlineStyle
{
+ virtual ~nsGenericHTMLElementTearoff()
+ {
+ }
+
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
nsGenericHTMLElementTearoff(nsGenericHTMLElement *aElement)
: mElement(aElement)
{
}
- virtual ~nsGenericHTMLElementTearoff()
- {
- }
-
NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle)
{
NS_ADDREF(*aStyle = mElement->Style());
return NS_OK;
}
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsGenericHTMLElementTearoff,
nsIDOMElementCSSInlineStyle)
--- a/content/html/content/src/nsRadioVisitor.h
+++ b/content/html/content/src/nsRadioVisitor.h
@@ -12,19 +12,21 @@
class nsIFormControl;
/**
* nsRadioVisitor is the base class implementing nsIRadioVisitor and inherited
* by all radio visitors.
*/
class nsRadioVisitor : public nsIRadioVisitor
{
+protected:
+ virtual ~nsRadioVisitor() { }
+
public:
nsRadioVisitor() { }
- virtual ~nsRadioVisitor() { }
NS_DECL_ISUPPORTS
virtual bool Visit(nsIFormControl* aRadio) MOZ_OVERRIDE = 0;
};
/**
* The following declarations are radio visitors inheriting from nsRadioVisitor.
--- a/content/html/content/src/nsTextEditorState.cpp
+++ b/content/html/content/src/nsTextEditorState.cpp
@@ -186,28 +186,30 @@ public:
: mTextEditorState(aTextEditorState) {}
NS_DECL_ISUPPORTS
NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
private:
+ ~nsAnonDivObserver() {}
nsTextEditorState* mTextEditorState;
};
class nsTextInputSelectionImpl MOZ_FINAL : public nsSupportsWeakReference
, public nsISelectionController
{
+ ~nsTextInputSelectionImpl(){}
+
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsTextInputSelectionImpl, nsISelectionController)
nsTextInputSelectionImpl(nsFrameSelection *aSel, nsIPresShell *aShell, nsIContent *aLimiter);
- ~nsTextInputSelectionImpl(){}
void SetScrollableFrame(nsIScrollableFrame *aScrollableFrame);
nsFrameSelection* GetConstFrameSelection()
{ return mFrameSelection; }
//NSISELECTIONCONTROLLER INTERFACES
NS_IMETHOD SetDisplaySelection(int16_t toggle);
NS_IMETHOD GetDisplaySelection(int16_t *_retval);
@@ -647,19 +649,16 @@ class nsTextInputListener : public nsISe
public nsIDOMEventListener,
public nsIEditorObserver,
public nsSupportsWeakReference
{
public:
/** the default constructor
*/
explicit nsTextInputListener(nsITextControlElement* aTxtCtrlElement);
- /** the default destructor. virtual due to the possibility of derivation.
- */
- virtual ~nsTextInputListener();
/** SetEditor gives an address to the editor that will be accessed
* @param aEditor the editor this listener calls for editing operations
*/
void SetFrame(nsTextControlFrame *aFrame){mFrame = aFrame;}
void SettingValue(bool aValue) { mSettingValue = aValue; }
void SetValueChanged(bool aSetValueChanged) { mSetValueChanged = aSetValueChanged; }
@@ -668,16 +667,19 @@ public:
NS_DECL_NSISELECTIONLISTENER
NS_DECL_NSIDOMEVENTLISTENER
NS_DECL_NSIEDITOROBSERVER
protected:
+ /** the default destructor. virtual due to the possibility of derivation.
+ */
+ virtual ~nsTextInputListener();
nsresult UpdateTextInputCommands(const nsAString& commandsToUpdate);
protected:
nsIFrame* mFrame;
nsITextControlElement* const mTxtCtrlElement;
--- a/content/html/document/src/HTMLAllCollection.h
+++ b/content/html/document/src/HTMLAllCollection.h
@@ -27,19 +27,20 @@ class ErrorResult;
namespace dom {
class OwningNodeOrHTMLCollection;
template<typename> struct Nullable;
class HTMLAllCollection MOZ_FINAL : public nsISupports
, public nsWrapperCache
{
+ ~HTMLAllCollection();
+
public:
HTMLAllCollection(nsHTMLDocument* aDocument);
- ~HTMLAllCollection();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(HTMLAllCollection)
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
nsINode* GetParentObject() const;
uint32_t Length();
--- a/content/html/document/src/MediaDocument.h
+++ b/content/html/document/src/MediaDocument.h
@@ -75,19 +75,21 @@ protected:
private:
enum {eWithNoInfo, eWithFile, eWithDim, eWithDimAndFile};
bool mDocumentElementInserted;
};
class MediaDocumentStreamListener: public nsIStreamListener
{
+protected:
+ virtual ~MediaDocumentStreamListener();
+
public:
MediaDocumentStreamListener(MediaDocument *aDocument);
- virtual ~MediaDocumentStreamListener();
void SetStreamListener(nsIStreamListener *aListener);
NS_DECL_ISUPPORTS
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSISTREAMLISTENER
--- a/content/media/AudioSegment.h
+++ b/content/media/AudioSegment.h
@@ -126,16 +126,18 @@ struct AudioChunk {
mBuffer = nullptr;
mChannelData.Clear();
mDuration = aDuration;
mVolume = 1.0f;
mBufferFormat = AUDIO_FORMAT_SILENCE;
}
int ChannelCount() const { return mChannelData.Length(); }
+ bool IsMuted() const { return mVolume == 0.0f; }
+
size_t SizeOfExcludingThisIfUnshared(MallocSizeOf aMallocSizeOf) const
{
return SizeOfExcludingThis(aMallocSizeOf, true);
}
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf, bool aUnshared) const
{
size_t amount = 0;
--- a/content/media/webaudio/AudioDestinationNode.cpp
+++ b/content/media/webaudio/AudioDestinationNode.cpp
@@ -169,32 +169,72 @@ private:
InputChannels mInputChannels;
// An index representing the next offset in mInputChannels to be written to.
uint32_t mWriteIndex;
// How many frames the OfflineAudioContext intends to produce.
uint32_t mLength;
float mSampleRate;
};
+class InputMutedRunnable : public nsRunnable
+{
+public:
+ InputMutedRunnable(AudioNodeStream* aStream,
+ bool aInputMuted)
+ : mStream(aStream)
+ , mInputMuted(aInputMuted)
+ {
+ }
+
+ NS_IMETHOD Run()
+ {
+ MOZ_ASSERT(NS_IsMainThread());
+ nsRefPtr<AudioNode> node = mStream->Engine()->NodeMainThread();
+
+ if (node) {
+ nsRefPtr<AudioDestinationNode> destinationNode =
+ static_cast<AudioDestinationNode*>(node.get());
+ destinationNode->InputMuted(mInputMuted);
+ }
+ return NS_OK;
+ }
+
+private:
+ nsRefPtr<AudioNodeStream> mStream;
+ bool mInputMuted;
+};
+
class DestinationNodeEngine : public AudioNodeEngine
{
public:
explicit DestinationNodeEngine(AudioDestinationNode* aNode)
: AudioNodeEngine(aNode)
, mVolume(1.0f)
+ , mLastInputMuted(true)
{
+ MOZ_ASSERT(aNode);
}
virtual void ProcessBlock(AudioNodeStream* aStream,
const AudioChunk& aInput,
AudioChunk* aOutput,
bool* aFinished) MOZ_OVERRIDE
{
*aOutput = aInput;
aOutput->mVolume *= mVolume;
+
+ bool newInputMuted = aInput.IsNull() || aInput.IsMuted();
+ if (newInputMuted != mLastInputMuted) {
+ mLastInputMuted = newInputMuted;
+
+ nsRefPtr<InputMutedRunnable> runnable =
+ new InputMutedRunnable(aStream, newInputMuted);
+ aStream->Graph()->
+ DispatchToMainThreadAfterStreamStateUpdate(runnable.forget());
+ }
}
virtual void SetDoubleParameter(uint32_t aIndex, double aParam) MOZ_OVERRIDE
{
if (aIndex == VOLUME) {
mVolume = aParam;
}
}
@@ -205,16 +245,17 @@ public:
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE
{
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}
private:
float mVolume;
+ bool mLastInputMuted;
};
static bool UseAudioChannelService()
{
return Preferences::GetBool("media.useAudioChannelService");
}
NS_IMPL_CYCLE_COLLECTION_INHERITED(AudioDestinationNode, AudioNode,
@@ -530,22 +571,16 @@ AudioDestinationNode::CreateAudioChannel
this);
nsCOMPtr<nsIDocShell> docshell = do_GetInterface(GetOwner());
if (docshell) {
bool isActive = false;
docshell->GetIsActive(&isActive);
mAudioChannelAgent->SetVisibilityState(isActive);
}
-
- int32_t state = 0;
- mAudioChannelAgent->StartPlaying(&state);
- mAudioChannelAgentPlaying =
- state == AudioChannelState::AUDIO_CHANNEL_STATE_NORMAL;
- SetCanPlay(mAudioChannelAgentPlaying);
}
<