--- a/browser/base/content/aboutRobots.xhtml
+++ b/browser/base/content/aboutRobots.xhtml
@@ -24,17 +24,17 @@
<head>
<title>&robots.pagetitle;</title>
<link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all" />
<link rel="icon" type="image/png" id="favicon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAACGFjVEwAAAASAAAAAJNtBPIAAAAaZmNUTAAAAAAAAAAQAAAAEAAAAAAAAAAALuAD6AABhIDeugAAALhJREFUOI2Nk8sNxCAMRDlGohauXFOMpfTiAlxICqAELltHLqlgctg1InzMRhpFAc%2BLGWTnmoeZYamt78zXdZmaQtQMADlnU0OIAlbmJUBEcO4bRKQY2rUXIPmAGnDuG%2FBx3%2FfvOPVaDUg%2BoAPUf1PArIMCSD5glMEsUGaG%2BkyAFWIBaCsKuA%2BHGCNijLgP133XgOEtaPFMy2vUolEGJoCIzBmoRUR9%2B7rxj16DZaW%2FmgtmxnJ8V3oAnApQwNS5zpcAAAAaZmNUTAAAAAEAAAAQAAAAEAAAAAAAAAAAAB4D6AIB52fclgAAACpmZEFUAAAAAjiNY2AYBVhBc3Pzf2LEcGreqcbwH1kDNjHauWAUjAJyAADymxf9WF%2Bu8QAAABpmY1RMAAAAAwAAABAAAAAQAAAAAAAAAAAAHgPoAgEK8Q9%2FAAAAFmZkQVQAAAAEOI1jYBgFo2AUjAIIAAAEEAAB0xIn4wAAABpmY1RMAAAABQAAABAAAAAQAAAAAAAAAAAAHgPoAgHnO30FAAAAQGZkQVQAAAAGOI1jYBieYKcaw39ixHCC%2F6cwFWMTw2rz%2F1MM%2F6Vu%2Ff%2F%2F%2FxTD%2F51qEIwuRjsXILuEGLFRMApgAADhNCsVfozYcAAAABpmY1RMAAAABwAAABAAAAAQAAAAAAAAAAAAHgPoAgEKra7sAAAAFmZkQVQAAAAIOI1jYBgFo2AUjAIIAAAEEAABM9s3hAAAABpmY1RMAAAACQAAABAAAAAQAAAAAAAAAAAAHgPoAgHn3p%2BwAAAAKmZkQVQAAAAKOI1jYBgFWEFzc%2FN%2FYsRwat6pxvAfWQM2Mdq5YBSMAnIAAPKbF%2F1BhPl6AAAAGmZjVEwAAAALAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAQpITFkAAAAWZmRBVAAAAAw4jWNgGAWjYBSMAggAAAQQAAHaszpmAAAAGmZjVEwAAAANAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAeeCPiMAAABAZmRBVAAAAA44jWNgGJ5gpxrDf2LEcIL%2FpzAVYxPDavP%2FUwz%2FpW79%2F%2F%2F%2FFMP%2FnWoQjC5GOxcgu4QYsVEwCmAAAOE0KxUmBL0KAAAAGmZjVEwAAAAPAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAQoU7coAAAAWZmRBVAAAABA4jWNgGAWjYBSMAggAAAQQAAEpOBELAAAAGmZjVEwAAAARAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAeYVWtoAAAAqZmRBVAAAABI4jWNgGAVYQXNz839ixHBq3qnG8B9ZAzYx2rlgFIwCcgAA8psX%2FWvpAecAAAAaZmNUTAAAABMAAAAQAAAAEAAAAAAAAAAAAB4D6AIBC4OJMwAAABZmZEFUAAAAFDiNY2AYBaNgFIwCCAAABBAAAcBQHOkAAAAaZmNUTAAAABUAAAAQAAAAEAAAAAAAAAAAAB4D6AIB5kn7SQAAAEBmZEFUAAAAFjiNY2AYnmCnGsN%2FYsRwgv%2BnMBVjE8Nq8%2F9TDP%2Blbv3%2F%2F%2F8Uw%2F%2BdahCMLkY7FyC7hBixUTAKYAAA4TQrFc%2BcEoQAAAAaZmNUTAAAABcAAAAQAAAAEAAAAAAAAAAAAB4D6AIBC98ooAAAABZmZEFUAAAAGDiNY2AYBaNgFIwCCAAABBAAASCZDI4AAAAaZmNUTAAAABkAAAAQAAAAEAAAAAAAAAAAAB4D6AIB5qwZ%2FAAAACpmZEFUAAAAGjiNY2AYBVhBc3Pzf2LEcGreqcbwH1kDNjHauWAUjAJyAADymxf9cjJWbAAAABpmY1RMAAAAGwAAABAAAAAQAAAAAAAAAAAAHgPoAgELOsoVAAAAFmZkQVQAAAAcOI1jYBgFo2AUjAIIAAAEEAAByfEBbAAAABpmY1RMAAAAHQAAABAAAAAQAAAAAAAAAAAAHgPoAgHm8LhvAAAAQGZkQVQAAAAeOI1jYBieYKcaw39ixHCC%2F6cwFWMTw2rz%2F1MM%2F6Vu%2Ff%2F%2F%2FxTD%2F51qEIwuRjsXILuEGLFRMApgAADhNCsVlxR3%2FgAAABpmY1RMAAAAHwAAABAAAAAQAAAAAAAAAAAAHgPoAgELZmuGAAAAFmZkQVQAAAAgOI1jYBgFo2AUjAIIAAAEEAABHP5cFQAAABpmY1RMAAAAIQAAABAAAAAQAAAAAAAAAAAAHgPoAgHlgtAOAAAAKmZkQVQAAAAiOI1jYBgFWEFzc%2FN%2FYsRwat6pxvAfWQM2Mdq5YBSMAnIAAPKbF%2F0%2FMvDdAAAAAElFTkSuQmCC"/>
<script type="application/javascript"><![CDATA[
var buttonClicked = false;
function robotButton() {
- var button = document.getElementById('errorTryAgain');
+ var button = document.getElementById("errorTryAgain");
if (buttonClicked) {
button.style.visibility = "hidden";
} else {
var newLabel = button.getAttribute("label2");
button.textContent = newLabel;
buttonClicked = true;
}
}
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -4581,19 +4581,19 @@
return;
if (this.AppConstants.platform == "macosx") {
if (!aEvent.metaKey)
return;
var offset = 1;
switch (aEvent.charCode) {
- case '}'.charCodeAt(0):
+ case "}".charCodeAt(0):
offset = -1;
- case '{'.charCodeAt(0):
+ case "{".charCodeAt(0):
if (window.getComputedStyle(this, null).direction == "ltr")
offset *= -1;
this.tabContainer.advanceSelectedTab(offset, true);
aEvent.preventDefault();
}
}
]]></body>
</method>
@@ -6334,17 +6334,17 @@
* In both cases, it is most likely that the close button area has
* been accidentally clicked, therefore we do not close the tab.
*
* We don't want to ignore processing of more than one click event,
* though, since the user might actually be repeatedly clicking to
* close many tabs at once.
*/
let target = event.originalTarget;
- if (target.classList.contains('tab-close-button')) {
+ if (target.classList.contains("tab-close-button")) {
// We preemptively set this to allow the closing-multiple-tabs-
// in-a-row case.
if (this._blockDblClick) {
target._ignoredCloseButtonClicks = true;
} else if (event.detail > 1 && !target._ignoredCloseButtonClicks) {
target._ignoredCloseButtonClicks = true;
event.stopPropagation();
return;
@@ -6480,17 +6480,17 @@
canvas.mozOpaque = true;
}
canvas.width = 160 * scale;
canvas.height = 90 * scale;
let toDrag = canvas;
let dragImageOffset = -16;
if (gMultiProcessBrowser) {
- var context = canvas.getContext('2d');
+ var context = canvas.getContext("2d");
context.fillStyle = "white";
context.fillRect(0, 0, canvas.width, canvas.height);
let captureListener;
let platform = this.tabbrowser.AppConstants.platform;
// On Windows and Mac we can update the drag image during a drag
// using updateDragImage. On Linux, we can use a panel.
if (platform == "win" || platform == "macosx") {
@@ -7151,32 +7151,32 @@
<handler event="mouseout"><![CDATA[
let anonid = event.originalTarget.getAttribute("anonid");
if (anonid == "close-button")
this.mOverCloseButton = false;
this._mouseleave();
]]></handler>
<handler event="dragstart" phase="capturing">
- this.style.MozUserFocus = '';
+ this.style.MozUserFocus = "";
</handler>
<handler event="mousedown" phase="capturing">
<![CDATA[
if (this.selected) {
- this.style.MozUserFocus = 'ignore';
+ this.style.MozUserFocus = "ignore";
this.clientTop; // just using this to flush style updates
} else if (this.mOverCloseButton ||
this._overPlayingIcon) {
// Prevent tabbox.xml from selecting the tab.
event.stopPropagation();
}
]]>
</handler>
<handler event="mouseup">
- this.style.MozUserFocus = '';
+ this.style.MozUserFocus = "";
</handler>
<handler event="click">
<![CDATA[
if (event.button != 0) {
return;
}
if (this._overPlayingIcon) {
--- a/browser/base/content/test/general/browser_fxa_oauth_with_keys.html
+++ b/browser/base/content/test/general/browser_fxa_oauth_with_keys.html
@@ -15,17 +15,17 @@
message: {
command: "oauth_complete",
data: {
state: "state",
code: "code1",
closeWindow: "signin",
// Keys normally contain more information, but this is enough
// to keep Loop's tests happy.
- keys: { kAr: { k: 'kAr' }, kBr: { k: 'kBr' }},
+ keys: { kAr: { k: "kAr" }, kBr: { k: "kBr" }},
},
},
}),
});
window.dispatchEvent(event);
};
</script>
--- a/browser/base/content/test/general/browser_fxa_web_channel.html
+++ b/browser/base/content/test/general/browser_fxa_web_channel.html
@@ -50,20 +50,20 @@
var event = new window.CustomEvent("WebChannelMessageToChrome", {
detail: JSON.stringify({
id: webChannelId,
message: {
command: "fxaccounts:login",
data: {
authAt: Date.now(),
email: "testuser@testuser.com",
- keyFetchToken: 'key_fetch_token',
- sessionToken: 'session_token',
- uid: 'uid',
- unwrapBKey: 'unwrap_b_key',
+ keyFetchToken: "key_fetch_token",
+ sessionToken: "session_token",
+ uid: "uid",
+ unwrapBKey: "unwrap_b_key",
verified: true,
},
messageId: 1,
},
}),
});
window.dispatchEvent(event);
@@ -71,17 +71,17 @@
function test_can_link_account() {
window.addEventListener("WebChannelMessageToContent", function(e) {
// echo any responses from the browser back to the tests on the
// fxaccounts_webchannel_response_echo WebChannel. The tests are
// listening for events and do the appropriate checks.
var event = new window.CustomEvent("WebChannelMessageToChrome", {
detail: JSON.stringify({
- id: 'fxaccounts_webchannel_response_echo',
+ id: "fxaccounts_webchannel_response_echo",
message: e.detail.message,
})
});
window.dispatchEvent(event);
}, true);
var event = new window.CustomEvent("WebChannelMessageToChrome", {
@@ -102,34 +102,34 @@
function test_logout() {
var event = new window.CustomEvent("WebChannelMessageToChrome", {
detail: JSON.stringify({
id: webChannelId,
message: {
command: "fxaccounts:logout",
data: {
- uid: 'uid'
+ uid: "uid"
},
messageId: 3,
},
}),
});
window.dispatchEvent(event);
}
function test_delete() {
var event = new window.CustomEvent("WebChannelMessageToChrome", {
detail: JSON.stringify({
id: webChannelId,
message: {
command: "fxaccounts:delete",
data: {
- uid: 'uid'
+ uid: "uid"
},
messageId: 4,
},
}),
});
window.dispatchEvent(event);
}
--- a/browser/base/content/test/general/download_page.html
+++ b/browser/base/content/test/general/download_page.html
@@ -18,26 +18,26 @@ https://bugzilla.mozilla.org/show_bug.cg
<li><a href="video.ogg"
download="just some video" id="link3">Download "just some video"</a></li>
<li><a href="data:text/plain,test"
download="with-target.txt" id="link4">Download "with-target.txt"</a></li>
<li><a href="javascript:(1+2)+''"
download="javascript.txt" id="link5">Download "javascript.txt"</a></li>
</ul>
<script>
- var li = document.createElement('li');
- var a = document.createElement('a');
+ var li = document.createElement("li");
+ var a = document.createElement("a");
a.href = window.URL.createObjectURL(new Blob(["just text"]));
a.download = "test.blob";
a.id = "link6";
a.textContent = 'Download "test.blob"';
li.appendChild(a);
- document.getElementsByTagName('ul')[0].appendChild(li);
+ document.getElementsByTagName("ul")[0].appendChild(li);
window.addEventListener("beforeunload", function(evt) {
document.getElementById("unload-flag").textContent = "Fail";
});
</script>
<ul>
<li><a href="http://example.com/"
download="example.com" id="link7" target="_blank">Download "example.com"</a></li>
--- a/browser/base/content/test/general/file_bug822367_3.html
+++ b/browser/base/content/test/general/file_bug822367_3.html
@@ -4,17 +4,17 @@
Test 3 for Mixed Content Blocker User Override - Mixed Script and Display
https://bugzilla.mozilla.org/show_bug.cgi?id=822367
-->
<head>
<meta charset="utf-8">
<title>Test 3 for Bug 822367</title>
<script>
function foo() {
- var x = document.createElement('p');
+ var x = document.createElement("p");
x.setAttribute("id", "p2");
x.innerHTML = "bye";
document.getElementById("testContent").appendChild(x);
}
</script>
</head>
<body>
<div id="testContent">
--- a/browser/base/content/test/general/file_mixedContentFromOnunload.html
+++ b/browser/base/content/test/general/file_mixedContentFromOnunload.html
@@ -5,14 +5,14 @@ Test for https://bugzilla.mozilla.org/sh
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 947079</title>
</head>
<body>
<p>Test for Bug 947079</p>
<script>
- window.addEventListener('unload', function() {
- new Image().src = 'http://mochi.test:8888/tests/image/test/mochitest/blue.png';
+ window.addEventListener("unload", function() {
+ new Image().src = "http://mochi.test:8888/tests/image/test/mochitest/blue.png";
});
</script>
</body>
</html>
--- a/browser/base/content/test/plugins/plugin_syncRemoved.html
+++ b/browser/base/content/test/plugins/plugin_syncRemoved.html
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<body>
<script type="text/javascript">
// create an embed, insert it in the doc and immediately remove it
- var embed = document.createElement('embed');
+ var embed = document.createElement("embed");
embed.setAttribute("id", "test");
embed.setAttribute("type", "application/x-test");
embed.setAttribute("style", "width: 0px; height: 0px;");
document.body.appendChild(embed);
window.getComputedStyle(embed, null).top;
document.body.remove(embed);
</script>
--- a/browser/components/customizableui/content/toolbar.xml
+++ b/browser/components/customizableui/content/toolbar.xml
@@ -192,21 +192,21 @@
for (let node of overflowList.children) {
let realNode = node.localName == "toolbarpaletteitem" ? node.firstChild : node;
if (realNode.getAttribute("skipintoolbarset") != "true") {
currentWidgets.add(realNode.id);
}
}
}
let orderedPlacements = CustomizableUI.getWidgetIdsInArea(this.id);
- return orderedPlacements.filter((x) => currentWidgets.has(x)).join(',');
+ return orderedPlacements.filter((x) => currentWidgets.has(x)).join(",");
]]></getter>
<setter><![CDATA[
// Get list of new and old ids:
- let newVal = (val || '').split(',').filter(x => x);
+ let newVal = (val || "").split(",").filter(x => x);
let oldIds = CustomizableUI.getWidgetIdsInArea(this.id);
// Get a list of items only in the new list
let newIds = newVal.filter(id => oldIds.indexOf(id) == -1);
CustomizableUI.beginBatchUpdate();
try {
for (let newId of newIds) {
oldIds = CustomizableUI.getWidgetIdsInArea(this.id);
@@ -220,17 +220,17 @@
// If it's not in the old list, repeat:
} while (pos == -1 && nextId);
if (pos == -1) {
pos = null; // We didn't find anything, insert at the end
}
CustomizableUI.addWidgetToArea(newId, this.id, pos);
}
- let currentIds = this.currentSet.split(',');
+ let currentIds = this.currentSet.split(",");
let removedIds = currentIds.filter(id => newIds.indexOf(id) == -1 && newVal.indexOf(id) == -1);
for (let removedId of removedIds) {
CustomizableUI.removeWidgetFromArea(removedId);
}
} finally {
CustomizableUI.endBatchUpdate();
}
]]></setter>
@@ -436,17 +436,17 @@
// out if the user has customized things / we've been here before:
if (!this._whiteListed.has(node.id)) {
node.setAttribute("removable", "true");
}
children.push(node);
}
}
CustomizableUI.registerToolbarNode(this, children);
- let existingMigratedItems = (this.getAttribute("migratedset") || "").split(',');
+ let existingMigratedItems = (this.getAttribute("migratedset") || "").split(",");
for (let migratedItem of existingMigratedItems.filter((x) => !!x)) {
this._currentSetMigrated.add(migratedItem);
}
this.evictNodes();
// We can't easily use |this| or strong bindings for the observer fn here
// because that creates leaky circular references when the node goes away,
// and XBL destructors are unreliable.
let mutationObserver = new MutationObserver(function(mutations) {
@@ -567,34 +567,34 @@
</method>
<method name="getMigratedItems">
<body><![CDATA[
return [...this._currentSetMigrated];
]]></body>
</method>
<method name="_updateMigratedSet">
<body><![CDATA[
- let newMigratedItems = this.getMigratedItems().join(',');
+ let newMigratedItems = this.getMigratedItems().join(",");
if (this.getAttribute("migratedset") != newMigratedItems) {
this.setAttribute("migratedset", newMigratedItems);
this.ownerDocument.persist(this.id, "migratedset");
}
]]></body>
</method>
<property name="customizationTarget" readonly="true">
<getter><![CDATA[
return this;
]]></getter>
</property>
<property name="currentSet">
<getter><![CDATA[
return Array.from(this.children, node => node.id).join(",");
]]></getter>
<setter><![CDATA[
- let v = val.split(',');
+ let v = val.split(",");
let newButtons = v.filter(x => x && (!this._whiteListed.has(x) &&
!CustomizableUI.isSpecialWidget(x) &&
!this._currentSetMigrated.has(x)));
for (let newButton of newButtons) {
this._currentSetMigrated.add(newButton);
this.insertItem(newButton);
}
this._updateMigratedSet();
--- a/browser/components/originattributes/test/browser/window_redirect.html
+++ b/browser/components/originattributes/test/browser/window_redirect.html
@@ -1,12 +1,12 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta charset="utf8">
<title>Page creating a popup</title>
</head>
<body>
<script type="text/javascript">
- var w = window.open('test_firstParty_http_redirect_to_same_domain.html', "test");
+ var w = window.open("test_firstParty_http_redirect_to_same_domain.html", "test");
</script>
</body>
</html>
--- a/browser/components/places/content/menu.xml
+++ b/browser/components/places/content/menu.xml
@@ -404,17 +404,17 @@
dropPoint.folderElt.setAttribute("_moz-menuactive", true);
} else {
// We are not dragging over a folder.
// Clear out old _overFolder information.
this._overFolder.clear();
}
// Autoscroll the popup strip if we drag over the scroll buttons.
- let anonid = event.originalTarget.getAttribute('anonid');
+ let anonid = event.originalTarget.getAttribute("anonid");
let scrollDir = 0;
if (anonid == "scrollbutton-up") {
scrollDir = -1;
} else if (anonid == "scrollbutton-down") {
scrollDir = 1;
}
if (scrollDir != 0) {
this._scrollBox.scrollByIndex(scrollDir, false);
@@ -505,17 +505,17 @@
<children/>
</xul:arrowscrollbox>
</xul:box>
</xul:vbox>
</content>
<implementation>
<constructor><![CDATA[
- this.style.pointerEvents = 'none';
+ this.style.pointerEvents = "none";
]]></constructor>
<method name="adjustArrowPosition">
<body><![CDATA[
var arrow = document.getAnonymousElementByAttribute(this, "anonid", "arrow");
var anchor = this.anchorNode;
if (!anchor) {
arrow.hidden = true;
@@ -607,15 +607,15 @@
}
]]></handler>
<handler event="popuphiding" phase="target"><![CDATA[
this.setAttribute("animate", "cancel");
]]></handler>
<handler event="popuphidden" phase="target"><![CDATA[
this.removeAttribute("panelopen");
if (this.getAttribute("disablepointereventsfortransition") == "true") {
- this.style.pointerEvents = 'none';
+ this.style.pointerEvents = "none";
}
this.removeAttribute("animate");
]]></handler>
</handlers>
</binding>
</bindings>
--- a/browser/components/places/tests/browser/pageopeningwindow.html
+++ b/browser/components/places/tests/browser/pageopeningwindow.html
@@ -1,9 +1,9 @@
<meta charset="UTF-8">
Hi, I was opened via a <script>document.write(location.search ?
"popup call from the opened window... uh oh, that shouldn't happen!" :
"bookmarklet, and I will open a new window myself.")</script><br>
<script>
if (!location.search) {
- open(location.href + "?donotopen=true", '_blank');
+ open(location.href + "?donotopen=true", "_blank");
}
</script>
--- a/browser/components/translation/translation-infobar.xml
+++ b/browser/components/translation/translation-infobar.xml
@@ -151,17 +151,17 @@
oncommand="document.getBindingParent(this).closeCommand();"/>
</xul:hbox>
</content>
<implementation>
<property name="state"
onget="return this._getAnonElt('translationStates').selectedIndex;">
<setter>
<![CDATA[
- let deck = this._getAnonElt('translationStates');
+ let deck = this._getAnonElt("translationStates");
let activeElt = document.activeElement;
if (activeElt && deck.contains(activeElt))
activeElt.blur();
let stateName;
for (let name of ["OFFER", "TRANSLATING", "TRANSLATED", "ERROR"]) {
if (Translation["STATE_" + name] == val) {
@@ -219,17 +219,17 @@
if (aTranslation.state)
this.state = aTranslation.state;
// Show attribution for the preferred translator.
let engineIndex = Object.keys(Translation.supportedEngines)
.indexOf(Translation.translationEngine);
if (engineIndex != -1) {
- this._getAnonElt('translationEngine').selectedIndex = engineIndex;
+ this._getAnonElt("translationEngine").selectedIndex = engineIndex;
}
const kWelcomePref = "browser.translation.ui.welcomeMessageShown";
if (Services.prefs.prefHasUserValue(kWelcomePref) ||
this.translation.browser != gBrowser.selectedBrowser)
return;
this.addEventListener("transitionend", function onShown() {
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_11.html
+++ b/toolkit/components/passwordmgr/test/browser/subtst_notifications_11.html
@@ -4,17 +4,17 @@
<meta charset="utf-8">
<title>Subtest for Login Manager notifications - Popup Windows</title>
</head>
<body>
<h2>Subtest 11 (popup windows)</h2>
<script>
// Ignore the '?' and split on |
-[username, password, features, autoClose] = window.location.search.substring(1).split('|');
+[username, password, features, autoClose] = window.location.search.substring(1).split("|");
var url = "subtst_notifications_11_popup.html?" + username + "|" + password;
var popupWin = window.open(url, "subtst_11", features);
// Popup window will call this function on form submission.
function formSubmitted() {
if (autoClose)
popupWin.close();
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_11_popup.html
+++ b/toolkit/components/passwordmgr/test/browser/subtst_notifications_11_popup.html
@@ -10,17 +10,17 @@
<input id="user" name="user">
<input id="pass" name="pass" type="password">
<button type='submit'>Submit</button>
</form>
<script>
function submitForm() {
// Get the password from the query string (exclude '?').
- [username, password] = window.location.search.substring(1).split('|');
+ [username, password] = window.location.search.substring(1).split("|");
userField.value = username;
passField.value = password;
form.submit();
window.opener.formSubmitted();
}
window.onload = submitForm;
var form = document.getElementById("form");
--- a/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_3.html
+++ b/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_3.html
@@ -17,13 +17,13 @@
</form>
<script>
function submitForm() {
form.submit();
}
var form = document.getElementById("form");
-window.addEventListener('message', () => { submitForm(); });
+window.addEventListener("message", () => { submitForm(); });
</script>
</body>
</html>
--- a/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_4.html
+++ b/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_4.html
@@ -28,13 +28,13 @@ function submitForm() {
doKey("down");
doKey("return");
setTimeout(function() { form.submit(); }, 100);
}
var form = document.getElementById("form");
var userField = document.getElementById("user");
-window.addEventListener('message', () => { startAutocomplete(); });
+window.addEventListener("message", () => { startAutocomplete(); });
</script>
</body>
</html>
--- a/toolkit/components/passwordmgr/test/chrome/test_privbrowsing_perwindowpb.html
+++ b/toolkit/components/passwordmgr/test/chrome/test_privbrowsing_perwindowpb.html
@@ -219,18 +219,18 @@ function testOnWindow(aIsPrivate, aCallb
whenDelayedStartupFinished(win, function() {
win.addEventListener("DOMContentLoaded", function onInnerLoad() {
if (win.content.location.href != contentPage) {
win.gBrowser.loadURI(contentPage);
return;
}
win.removeEventListener("DOMContentLoaded", onInnerLoad, true);
- win.content.addEventListener('load', function innerLoad2() {
- win.content.removeEventListener('load', innerLoad2);
+ win.content.addEventListener("load", function innerLoad2() {
+ win.content.removeEventListener("load", innerLoad2);
testWindows.push(win);
SimpleTest.executeSoon(function() { aCallback(win); });
}, false, true);
}, true);
SimpleTest.executeSoon(function() { win.gBrowser.loadURI(contentPage); });
});
}, true);
}
--- a/toolkit/components/passwordmgr/test/mochitest/test_prompt_http.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_prompt_http.html
@@ -217,17 +217,17 @@ add_task(function* test_iframe() {
var tmpLogin = Cc["@mozilla.org/login-manager/loginInfo;1"].
createInstance(Ci.nsILoginInfo);
tmpLogin.init("http://mochi.test:8888", null, "mochitest3",
"mochiuser3", "mochipass3-old", "", "");
Services.logins.removeLogin(tmpLogin);
// Clear cached auth from this subtest, and avoid leaking due to bug 459620.
- var authMgr = Cc['@mozilla.org/network/http-auth-manager;1'].
+ var authMgr = Cc["@mozilla.org/network/http-auth-manager;1"].
getService(Ci.nsIHttpAuthManager);
authMgr.clearAll();
});
state = {
msg : "http://mochi.test:8888 is requesting your username and password. The site says: “mochitest3”",
title : "Authentication Required",
textValue : "",
--- a/toolkit/components/passwordmgr/test/test_master_password.html
+++ b/toolkit/components/passwordmgr/test/test_master_password.html
@@ -233,20 +233,20 @@ function checkTest4A() {
function checkTest4B_delay() {
// Testing a negative, wait a little to give the login manager a chance to
// (incorrectly) fill in the form. Note, we cannot use setTimeout()
// here because the modal window suspends all window timers. Instead we
// must use a chrome script to use nsITimer directly.
let chromeURL = SimpleTest.getTestFileURL("chrome_timeout.js");
let script = SpecialPowers.loadChromeScript(chromeURL);
- script.addMessageListener('ready', _ => {
- script.sendAsyncMessage('setTimeout', { delay: 500 });
+ script.addMessageListener("ready", _ => {
+ script.sendAsyncMessage("setTimeout", { delay: 500 });
});
- script.addMessageListener('timeout', checkTest4B);
+ script.addMessageListener("timeout", checkTest4B);
}
function checkTest4B() {
ok(true, "checkTest4B starting");
// iframe2 should load without having triggered a MP prompt (because one
// is already waiting)
// check contents of iframe2 fields
--- a/toolkit/components/passwordmgr/test/test_prompt_async.html
+++ b/toolkit/components/passwordmgr/test/test_prompt_async.html
@@ -7,17 +7,17 @@
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="prompt_common.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
SimpleTest.requestFlakyTimeout("untriaged");
- const { NetUtil } = SpecialPowers.Cu.import('resource://gre/modules/NetUtil.jsm');
+ const { NetUtil } = SpecialPowers.Cu.import("resource://gre/modules/NetUtil.jsm");
var prefs = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
prefs.setIntPref("network.auth.subresource-http-auth-allow", 2);
// Class monitoring number of open dialog windows
// It checks there is always open just a single dialog per application
function dialogMonitor() {
var observerService = SpecialPowers.Cc["@mozilla.org/observer-service;1"]
@@ -113,17 +113,17 @@
"user6name", "user6pass");
}
function finishTest() {
ok(true, "finishTest removing testing logins...");
for (i in logins)
pwmgr.removeLogin(logins[i]);
- var authMgr = SpecialPowers.Cc['@mozilla.org/network/http-auth-manager;1']
+ var authMgr = SpecialPowers.Cc["@mozilla.org/network/http-auth-manager;1"]
.getService(Ci.nsIHttpAuthManager);
authMgr.clearAll();
monitor.shutdown();
SimpleTest.finish();
}
var resolveCallback = SpecialPowers.wrapCallbackObject({
--- a/toolkit/components/passwordmgr/test/test_xhr.html
+++ b/toolkit/components/passwordmgr/test/test_xhr.html
@@ -181,17 +181,17 @@ function makeRequest(uri) {
request.send(null);
}
initLogins();
// clear plain HTTP auth sessions before the test, to allow
// running them more than once.
-var authMgr = SpecialPowers.Cc['@mozilla.org/network/http-auth-manager;1']
+var authMgr = SpecialPowers.Cc["@mozilla.org/network/http-auth-manager;1"]
.getService(SpecialPowers.Ci.nsIHttpAuthManager);
authMgr.clearAll();
// start the tests
testNum = 0;
doTest();
SimpleTest.waitForExplicitFinish();
--- a/toolkit/components/passwordmgr/test/test_xml_load.html
+++ b/toolkit/components/passwordmgr/test/test_xml_load.html
@@ -171,17 +171,17 @@ function makeRequest(uri) {
xmlDoc.load(uri);
}
initLogins();
// clear plain HTTP auth sessions before the test, to allow
// running them more than once.
-var authMgr = SpecialPowers.Cc['@mozilla.org/network/http-auth-manager;1']
+var authMgr = SpecialPowers.Cc["@mozilla.org/network/http-auth-manager;1"]
.getService(SpecialPowers.Ci.nsIHttpAuthManager);
authMgr.clearAll();
// start the tests
testNum = 0;
doTest();
SimpleTest.waitForExplicitFinish();
--- a/toolkit/components/places/tests/browser/399606-history.go-0.html
+++ b/toolkit/components/places/tests/browser/399606-history.go-0.html
@@ -1,11 +1,11 @@
<html>
<head>
<title>history.go(0)</title>
<script>
-setTimeout('history.go(0)', 1000);
+setTimeout("history.go(0)", 1000);
</script>
</head>
<body>
Testing history.go(0)
</body>
</html>
--- a/toolkit/components/places/tests/browser/399606-location.reload.html
+++ b/toolkit/components/places/tests/browser/399606-location.reload.html
@@ -1,11 +1,11 @@
<html>
<head>
<title>location.reload()</title>
<script>
-setTimeout('location.reload();', 100);
+setTimeout("location.reload();", 100);
</script>
</head>
<body>
Testing location.reload();
</body>
</html>
--- a/toolkit/components/places/tests/browser/399606-location.replace.html
+++ b/toolkit/components/places/tests/browser/399606-location.replace.html
@@ -1,11 +1,11 @@
<html>
<head>
<title>location.replace</title>
<script>
-setTimeout('location.replace(window.location.href)', 1000);
+setTimeout("location.replace(window.location.href)", 1000);
</script>
</head>
<body>
Testing location.replace
</body>
</html>
--- a/toolkit/components/places/tests/browser/399606-window.location.href.html
+++ b/toolkit/components/places/tests/browser/399606-window.location.href.html
@@ -1,11 +1,11 @@
<html>
<head>
<title>window.location.href</title>
<script>
-setTimeout('window.location.href = window.location.href', 1000);
+setTimeout("window.location.href = window.location.href", 1000);
</script>
</head>
<body>
Testing window.location.href
</body>
</html>
--- a/toolkit/components/places/tests/browser/399606-window.location.html
+++ b/toolkit/components/places/tests/browser/399606-window.location.html
@@ -1,11 +1,11 @@
<html>
<head>
<title>window.location</title>
<script>
-setTimeout('window.location = window.location', 1000);
+setTimeout("window.location = window.location", 1000);
</script>
</head>
<body>
Testing window.location
</body>
</html>
--- a/toolkit/components/printing/content/printPreviewBindings.xml
+++ b/toolkit/components/printing/content/printPreviewBindings.xml
@@ -285,25 +285,25 @@
return;
}
if (aValue == "Custom") {
aValue = this.promptForScaleValue(settings.scaling * 100.0);
if (aValue >= 10) {
aValue /= 100.0;
} else {
- if (this.mScaleCombobox.hasAttribute('lastValidInx')) {
- this.mScaleCombobox.selectedIndex = this.mScaleCombobox.getAttribute('lastValidInx');
+ if (this.mScaleCombobox.hasAttribute("lastValidInx")) {
+ this.mScaleCombobox.selectedIndex = this.mScaleCombobox.getAttribute("lastValidInx");
}
return;
}
}
this.setScaleCombobox(aValue);
- this.mScaleCombobox.setAttribute('lastValidInx', this.mScaleCombobox.selectedIndex);
+ this.mScaleCombobox.setAttribute("lastValidInx", this.mScaleCombobox.selectedIndex);
if (settings.scaling != aValue || settings.shrinkToFit) {
settings.shrinkToFit = false;
settings.scaling = aValue;
this.savePrintSettings(settings, settings.kInitSaveShrinkToFit | settings.kInitSaveScaling);
PrintUtils.printPreview();
}
]]>
--- a/toolkit/components/satchel/test/test_bug_511615.html
+++ b/toolkit/components/satchel/test/test_bug_511615.html
@@ -84,35 +84,35 @@ function doKeyUnprivileged(key) {
} else {
keycode = KeyEvent[keyName];
if (!keycode)
throw "invalid keyname in test";
charcode = 0;
alwaysval = keycode;
}
- let dnEvent = document.createEvent('KeyboardEvent');
- let prEvent = document.createEvent('KeyboardEvent');
- let upEvent = document.createEvent('KeyboardEvent');
+ let dnEvent = document.createEvent("KeyboardEvent");
+ let prEvent = document.createEvent("KeyboardEvent");
+ let upEvent = document.createEvent("KeyboardEvent");
/* eslint-disable no-multi-spaces */
dnEvent.initKeyEvent("keydown", true, true, null, false, false, false, false, alwaysval, 0);
prEvent.initKeyEvent("keypress", true, true, null, false, false, false, false, keycode, charcode);
upEvent.initKeyEvent("keyup", true, true, null, false, false, false, false, alwaysval, 0);
/* eslint-enable no-multi-spaces */
input.dispatchEvent(dnEvent);
input.dispatchEvent(prEvent);
input.dispatchEvent(upEvent);
}
function doClickWithMouseEventUnprivileged() {
- let dnEvent = document.createEvent('MouseEvent');
- let upEvent = document.createEvent('MouseEvent');
- let ckEvent = document.createEvent('MouseEvent');
+ let dnEvent = document.createEvent("MouseEvent");
+ let upEvent = document.createEvent("MouseEvent");
+ let ckEvent = document.createEvent("MouseEvent");
/* eslint-disable no-multi-spaces */
dnEvent.initMouseEvent("mousedown", true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
upEvent.initMouseEvent("mouseup", true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
ckEvent.initMouseEvent("mouseclick", true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
/* eslint-enable no-multi-spaces */
input.dispatchEvent(dnEvent);
--- a/toolkit/components/satchel/test/test_form_autocomplete_with_list.html
+++ b/toolkit/components/satchel/test/test_form_autocomplete_with_list.html
@@ -321,17 +321,17 @@ function runTest() {
// Test dynamic updates.
// For some reasons, when there is an update of the list, the selection is
// lost so we need to go down like if we were at the beginning of the list
// again.
case 200:
// Removing the second element while on the first then going down and
// push enter. Value should be one from the third suggesion.
doKey("down");
- var datalist = document.getElementById('suggest');
+ var datalist = document.getElementById("suggest");
var toRemove = datalist.children[1]
datalist.removeChild(toRemove);
SimpleTest.executeSoon(function() {
doKey("down");
doKey("down");
doKey("return");
checkForm("final");
@@ -343,70 +343,70 @@ function runTest() {
doKey("down");
});
break;
case 201:
// Adding an attribute after the first one while on the first then going
// down and push enter. Value should be the on from the new suggestion.
doKey("down");
- datalist = document.getElementById('suggest');
+ datalist = document.getElementById("suggest");
var added = new Option("Foo");
datalist.insertBefore(added, datalist.children[1]);
waitForMenuChange(4);
break;
case 202:
doKey("down");
doKey("down");
doKey("return");
checkForm("Foo");
// Remove the element.
- datalist = document.getElementById('suggest');
+ datalist = document.getElementById("suggest");
datalist.removeChild(datalist.children[1]);
waitForMenuChange(0);
break;
case 203:
// Change the first element value attribute.
restoreForm();
- datalist = document.getElementById('suggest');
+ datalist = document.getElementById("suggest");
prevValue = datalist.children[0].value;
datalist.children[0].value = "foo";
expectPopup();
break;
case 204:
doKey("down");
doKey("return");
checkForm("foo");
- datalist = document.getElementById('suggest');
+ datalist = document.getElementById("suggest");
datalist.children[0].value = prevValue;
waitForMenuChange(0);
break;
case 205:
// Change the textContent to update the value attribute.
restoreForm();
- datalist = document.getElementById('suggest');
- prevValue = datalist.children[0].getAttribute('value');
- datalist.children[0].removeAttribute('value');
+ datalist = document.getElementById("suggest");
+ prevValue = datalist.children[0].getAttribute("value");
+ datalist.children[0].removeAttribute("value");
datalist.children[0].textContent = "foobar";
expectPopup();
break;
case 206:
doKey("down");
doKey("return");
checkForm("foobar");
- datalist = document.getElementById('suggest');
- datalist.children[0].setAttribute('value', prevValue);
+ datalist = document.getElementById("suggest");
+ datalist.children[0].setAttribute("value", prevValue);
testNum = 299;
waitForMenuChange(0);
break;
// Tests for filtering (or not).
case 300:
// Filters with first letter of the word.
restoreForm();
@@ -437,27 +437,27 @@ function runTest() {
checkForm("final");
expectPopup();
restoreForm();
doKey("down");
break;
case 304:
// Filter is disabled with mozNoFilter.
- input.setAttribute('mozNoFilter', 'true');
+ input.setAttribute("mozNoFilter", "true");
synthesizeKey("f", {});
waitForMenuChange(3); // no change
break;
case 305:
// Continuation of test 304.
doKey("down");
doKey("return");
checkForm("Google");
- input.removeAttribute('mozNoFilter');
+ input.removeAttribute("mozNoFilter");
testNum = 399;
expectPopup();
restoreForm();
doKey("down");
break;
case 400:
// Check that the input event is fired.
--- a/toolkit/components/satchel/test/test_form_submission.html
+++ b/toolkit/components/satchel/test/test_form_submission.html
@@ -94,35 +94,35 @@
<form id="form14" onsubmit="return checkSubmit(14)">
<input type="text" name="test1">
<button type="submit">Submit</button>
</form>
<!-- input with sensitive data (16 digit credit card number) -->
<form id="form15" onsubmit="return checkSubmit(15)">
<script type="text/javascript">
- var form = document.getElementById('form15');
+ var form = document.getElementById("form15");
for (let i = 0; i != 10; i++) {
- let input = document.createElement('input');
- input.type = 'text';
- input.name = 'test' + (i + 1);
+ let input = document.createElement("input");
+ input.type = "text";
+ input.name = "test" + (i + 1);
form.appendChild(input);
}
</script>
<button type="submit">Submit</button>
</form>
<!-- input with sensitive data (15 digit credit card number) -->
<form id="form16" onsubmit="return checkSubmit(16)">
<script type="text/javascript">
- form = document.getElementById('form16');
+ form = document.getElementById("form16");
for (let i = 0; i != 10; i++) {
- let input = document.createElement('input');
- input.type = 'text';
- input.name = 'test' + (i + 1);
+ let input = document.createElement("input");
+ input.type = "text";
+ input.name = "test" + (i + 1);
form.appendChild(input);
}
</script>
<button type="submit">Submit</button>
</form>
<!-- input with sensitive data (9 digit credit card number) -->
<form id="form17" onsubmit="return checkSubmit(17)">
@@ -209,36 +209,36 @@
<input type="text" name="test6">
<button type="submit">Submit</button>
</form>
<!-- input that looks like sensitive data but doesn't
satisfy the requirements (Luhn check fails for 16 chars) -->
<form id="form107" onsubmit="return checkSubmit(107)">
<script type="text/javascript">
- form = document.getElementById('form107');
+ form = document.getElementById("form107");
for (let i = 0; i != 10; i++) {
- let input = document.createElement('input');
- input.type = 'text';
- input.name = 'test7_' + (i + 1);
+ let input = document.createElement("input");
+ input.type = "text";
+ input.name = "test7_" + (i + 1);
form.appendChild(input);
}
</script>
<button type="submit">Submit</button>
</form>
<!-- input that looks like sensitive data but doesn't
satisfy the requirements (Luhn check fails for 15 chars) -->
<form id="form108" onsubmit="return checkSubmit(108)">
<script type="text/javascript">
- form = document.getElementById('form108');
+ form = document.getElementById("form108");
for (let i = 0; i != 10; i++) {
- let input = document.createElement('input');
- input.type = 'text';
- input.name = 'test8_' + (i + 1);
+ let input = document.createElement("input");
+ input.type = "text";
+ input.name = "test8_" + (i + 1);
form.appendChild(input);
}
</script>
<button type="submit">Submit</button>
</form>
<!-- form data submitted through HTTPS, when browser.formfill.saveHttpsForms is true -->
<form id="form109" action="https://www.example.com/" onsubmit="return checkSubmit(109)">
--- a/toolkit/components/startup/tests/browser/beforeunload.html
+++ b/toolkit/components/startup/tests/browser/beforeunload.html
@@ -1,10 +1,10 @@
<html>
<script>
window.onbeforeunload = function(event) {
- event.returnValue = 'Test beforeunload handler';
+ event.returnValue = "Test beforeunload handler";
}
</script>
<body>
Test page
</body>
</html>
--- a/toolkit/components/windowcreator/test/test_bug293834.html
+++ b/toolkit/components/windowcreator/test/test_bug293834.html
@@ -28,33 +28,33 @@ var textboxes = ["a-text", "a-prefilled-
function fillform(doc) {
for (let i in textareas) {
doc.getElementById(textareas[i]).textContent += "form state";
}
for (let i in textboxes) {
doc.getElementById(textboxes[i]).value += "form state";
}
- doc.getElementById('a-checkbox').checked = true;
+ doc.getElementById("a-checkbox").checked = true;
doc.getElementById("radioa").checked = true;
doc.getElementById("aselect").selectedIndex = 0;
}
function checkform(doc) {
for (let i in textareas) {
var textContent = doc.getElementById(textareas[i]).textContent;
ok(/form\s+state/m.test(textContent),
"Modified textarea " + textareas[i] + " form state not preserved!");
}
for (let i in textboxes) {
var value = doc.getElementById(textboxes[i]).value;
ok(/form\s+state/m.test(value),
"Modified textbox " + textboxes[i] + " form state not preserved!");
}
- ok(doc.getElementById('a-checkbox').checked,
+ ok(doc.getElementById("a-checkbox").checked,
"Modified checkbox checked state not preserved!");
ok(doc.getElementById("radioa").checked,
"Modified radio checked state not preserved!");
ok(doc.getElementById("aselect").selectedIndex == 0,
"Modified select selected index not preserved");
}
const Cc = SpecialPowers.Cc;
@@ -113,24 +113,24 @@ function persistDocument(aDoc) {
aDoc.contentType,
encodingFlags, kWrapColumn);
return getFileContents(file);
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {
- var srcDoc = document.getElementById('source').contentDocument;
+ var srcDoc = document.getElementById("source").contentDocument;
fillform(srcDoc);
checkform(srcDoc);
var serializedString = persistDocument(srcDoc);
// We can't access file:/// URLs directly for security reasons,
// so we have to parse the serialized content string indirectly
- var targetDoc = document.getElementById('dest').contentDocument;
+ var targetDoc = document.getElementById("dest").contentDocument;
targetDoc.write(serializedString);
checkform(targetDoc);
SimpleTest.finish();
});
</script>
</pre>
</body>
--- a/toolkit/components/windowcreator/test/test_bug449141.html
+++ b/toolkit/components/windowcreator/test/test_bug449141.html
@@ -44,18 +44,18 @@ var progressListener = {
var videoFile = getTempDir();
videoFile.append(this.dirName);
dirExists = videoFile.exists();
videoFile.append("320x240.ogv");
videoExists = videoFile.exists();
this.folder.remove(true);
this.file.remove(false);
- ok(dirExists, 'Directory containing video file should be created');
- ok(videoExists, 'Video should be persisted with document');
+ ok(dirExists, "Directory containing video file should be created");
+ ok(videoExists, "Video should be persisted with document");
SimpleTest.finish();
}
}
};
function persistDocument(aDoc) {
const nsIWBP = Ci.nsIWebBrowserPersist;
const persistFlags =
@@ -87,15 +87,15 @@ function persistDocument(aDoc) {
folder,
aDoc.contentType,
encodingFlags, kWrapColumn);
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {
- var srcDoc = document.getElementById('source').contentDocument;
+ var srcDoc = document.getElementById("source").contentDocument;
persistDocument(srcDoc);
});
</script>
</pre>
</body>
</html>
--- a/toolkit/content/tests/chrome/test_about_networking.html
+++ b/toolkit/content/tests/chrome/test_about_networking.html
@@ -11,17 +11,17 @@ https://bugzilla.mozilla.org/show_bug.cg
<script type="application/javascript">
SimpleTest.waitForExplicitFinish();
function runTest() {
const Cc = Components.classes;
const Ci = Components.interfaces;
- var dashboard = Cc['@mozilla.org/network/dashboard;1']
+ var dashboard = Cc["@mozilla.org/network/dashboard;1"]
.getService(Ci.nsIDashboard);
dashboard.enableLogging = true;
var wsURI = "ws://mochi.test:8888/chrome/toolkit/content/tests/chrome/file_about_networking";
var websocket = new WebSocket(wsURI);
websocket.addEventListener("open", function() {
dashboard.requestWebsocketConnections(function(data) {
--- a/toolkit/content/tests/widgets/test_videocontrols.html
+++ b/toolkit/content/tests/widgets/test_videocontrols.html
@@ -64,22 +64,22 @@ const domUtil = SpecialPowers.Cc["@mozil
function getButtonByAttribute(aName, aValue) {
var kids = domUtil.getChildrenForNode(video, true);
var videocontrols = kids[1];
return SpecialPowers.wrap(document)
.getAnonymousElementByAttribute(videocontrols, aName, aValue);
}
function isMuteButtonMuted() {
- var muteButton = getButtonByAttribute('anonid', 'muteButton');
- return muteButton.getAttribute('muted') === 'true';
+ var muteButton = getButtonByAttribute("anonid", "muteButton");
+ return muteButton.getAttribute("muted") === "true";
}
function isVolumeSliderShowingCorrectVolume(expectedVolume) {
- var volumeControl = getButtonByAttribute('anonid', 'volumeControl');
+ var volumeControl = getButtonByAttribute("anonid", "volumeControl");
is(+volumeControl.value, expectedVolume * 100,
"volume slider should match expected volume");
}
function forceReframe() {
// Setting display then getting the bounding rect to force a frame
// reconstruction on the video element.
video.style.display = "block";
--- a/toolkit/content/widgets/autocomplete.xml
+++ b/toolkit/content/widgets/autocomplete.xml
@@ -131,21 +131,21 @@
onset="this.setAttribute('showimagecolumn', val); return val;"
onget="return this.getAttribute('showimagecolumn') == 'true';"/>
<property name="timeout"
onset="this.setAttribute('timeout', val); return val;">
<getter><![CDATA[
// For security reasons delay searches on pasted values.
if (this._valueIsPasted) {
- let t = parseInt(this.getAttribute('pastetimeout'));
+ let t = parseInt(this.getAttribute("pastetimeout"));
return isNaN(t) ? 1000 : t;
}
- let t = parseInt(this.getAttribute('timeout'));
+ let t = parseInt(this.getAttribute("timeout"));
return isNaN(t) ? 50 : t;
]]></getter>
</property>
<property name="searchParam"
onget="return this.getAttribute('autocompletesearchparam') || '';"
onset="this.setAttribute('autocompletesearchparam', val); return val;"/>
@@ -325,18 +325,18 @@
this.valueIsTyped = false;
this.inputField.value = val;
if (typeof this.formatValue == "function")
this.formatValue();
this.mIgnoreInput = false;
- var event = document.createEvent('Events');
- event.initEvent('ValueChange', true, true);
+ var event = document.createEvent("Events");
+ event.initEvent("ValueChange", true, true);
this.inputField.dispatchEvent(event);
return val;
]]></setter>
</property>
<property name="focused" readonly="true"
onget="return this.getAttribute('focused') == 'true';"/>
@@ -780,17 +780,17 @@
onget="return this.tree.currentIndex;">
<setter>
<![CDATA[
this.tree.view.selection.select(val);
if (this.tree.treeBoxObject.height > 0)
this.tree.treeBoxObject.ensureRowIsVisible(val < 0 ? 0 : val);
// Fire select event on xul:tree so that accessibility API
// support layer can fire appropriate accessibility events.
- var event = document.createEvent('Events');
+ var event = document.createEvent("Events");
event.initEvent("select", true, true);
this.tree.dispatchEvent(event);
return val;
]]></setter>
</property>
<method name="adjustHeight">
<body>
--- a/toolkit/content/widgets/browser.xml
+++ b/toolkit/content/widgets/browser.xml
@@ -135,17 +135,17 @@
var aReferrerPolicy = Components.interfaces.nsIHttpChannel.REFERRER_POLICY_UNSET;
// Check for loadURIWithFlags(uri, { ... });
var params = arguments[1];
if (params && typeof(params) == "object") {
aFlags = params.flags;
aReferrerURI = params.referrerURI;
- if ('referrerPolicy' in params) {
+ if ("referrerPolicy" in params) {
aReferrerPolicy = params.referrerPolicy;
}
aCharset = params.charset;
aPostData = params.postData;
}
this._wrapURIChangeCall(() =>
this.webNavigation.loadURIWithOptions(
@@ -561,17 +561,17 @@
<property name="hasContentOpener">
<getter><![CDATA[
return !!this.contentWindow.opener;
]]></getter>
</property>
<field name="mPrefs" readonly="true">
- Components.classes['@mozilla.org/preferences-service;1']
+ Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
</field>
<field name="_mStrBundle">null</field>
<property name="mStrBundle">
<getter>
<![CDATA[
@@ -1516,21 +1516,21 @@
} catch (ex) {
}
if (warn && !browseWithCaretOn) {
var checkValue = {value:false};
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
var buttonPressed = promptService.confirmEx(window,
- this.mStrBundle.GetStringFromName('browsewithcaret.checkWindowTitle'),
- this.mStrBundle.GetStringFromName('browsewithcaret.checkLabel'),
+ this.mStrBundle.GetStringFromName("browsewithcaret.checkWindowTitle"),
+ this.mStrBundle.GetStringFromName("browsewithcaret.checkLabel"),
// Make "No" the default:
promptService.STD_YES_NO_BUTTONS | promptService.BUTTON_POS_1_DEFAULT,
- null, null, null, this.mStrBundle.GetStringFromName('browsewithcaret.checkMsg'),
+ null, null, null, this.mStrBundle.GetStringFromName("browsewithcaret.checkMsg"),
checkValue);
if (buttonPressed != 0) {
if (checkValue.value) {
try {
this.mPrefs.setBoolPref(kPrefShortcutEnabled, false);
} catch (ex) {
}
}
--- a/toolkit/content/widgets/button.xml
+++ b/toolkit/content/widgets/button.xml
@@ -24,19 +24,19 @@
onset="this.setAttribute('group', val); return val;"/>
<property name="open" onget="return this.hasAttribute('open');">
<setter><![CDATA[
if (this.boxObject instanceof MenuBoxObject) {
this.boxObject.openMenu(val);
} else if (val) {
// Fall back to just setting the attribute
- this.setAttribute('open', 'true');
+ this.setAttribute("open", "true");
} else {
- this.removeAttribute('open');
+ this.removeAttribute("open");
}
return val;
]]></setter>
</property>
<property name="checked" onget="return this.hasAttribute('checked');">
<setter><![CDATA[
if (this.type == "checkbox") {
--- a/toolkit/content/widgets/checkbox.xml
+++ b/toolkit/content/widgets/checkbox.xml
@@ -25,24 +25,24 @@
</xul:hbox>
</content>
<implementation implements="nsIDOMXULCheckboxElement">
<method name="setChecked">
<parameter name="aValue"/>
<body>
<![CDATA[
- var change = (aValue != (this.getAttribute('checked') == 'true'));
+ var change = (aValue != (this.getAttribute("checked") == "true"));
if (aValue)
- this.setAttribute('checked', 'true');
+ this.setAttribute("checked", "true");
else
- this.removeAttribute('checked');
+ this.removeAttribute("checked");
if (change) {
- var event = document.createEvent('Events');
- event.initEvent('CheckboxStateChange', true, true);
+ var event = document.createEvent("Events");
+ event.initEvent("CheckboxStateChange", true, true);
this.dispatchEvent(event);
}
return aValue;
]]>
</body>
</method>
<!-- public implementation -->
--- a/toolkit/content/widgets/colorpicker.xml
+++ b/toolkit/content/widgets/colorpicker.xml
@@ -321,18 +321,18 @@
<method name="hoverCell">
<parameter name="aCell"/>
<body><![CDATA[
if (this.isColorCell(aCell)) {
this.resetHover();
aCell.setAttribute("hover", "true");
this.mHoverCell = aCell;
- var event = document.createEvent('Events');
- event.initEvent('DOMMenuItemActive', true, true);
+ var event = document.createEvent("Events");
+ event.initEvent("DOMMenuItemActive", true, true);
aCell.dispatchEvent(event);
}
]]></body>
</method>
<method name="selectHoverCell">
<body><![CDATA[
this.selectCell(this.mHoverCell);
@@ -396,30 +396,30 @@
this.selectCell(event.originalTarget);
this.hoverCell(this.mSelectedCell);
}
]]></handler>
<handler event="focus" phase="capturing">
<![CDATA[
- if (!mIsPopup && this.getAttribute('focused') != 'true') {
- this.setAttribute('focused', 'true');
+ if (!mIsPopup && this.getAttribute("focused") != "true") {
+ this.setAttribute("focused", "true");
document.addEventListener("keydown", this, true);
if (this.mSelectedCell)
this.hoverCell(this.mSelectedCell);
}
]]>
</handler>
<handler event="blur" phase="capturing">
<![CDATA[
- if (!mIsPopup && this.getAttribute('focused') == 'true') {
+ if (!mIsPopup && this.getAttribute("focused") == "true") {
document.removeEventListener("keydown", this, true);
- this.removeAttribute('focused');
+ this.removeAttribute("focused");
this.resetHover();
}
]]>
</handler>
</handlers>
</binding>
<binding id="colorpicker-button" display="xul:menu" role="xul:colorpicker"
--- a/toolkit/content/widgets/datetimebox.xml
+++ b/toolkit/content/widgets/datetimebox.xml
@@ -546,17 +546,17 @@
<![CDATA[
let value = this.mInputElement.value;
if (!value) {
this.clearInputFields(true);
return;
}
this.log("setFieldsFromInputValue: " + value);
- let [hour, minute, second] = value.split(':');
+ let [hour, minute, second] = value.split(":");
this.setFieldValue(this.mHourField, hour);
this.setFieldValue(this.mMinuteField, minute);
if (this.mHour12) {
this.mDayPeriodField.value = (hour >= this.mMaxHourInHour12) ?
this.mPMIndicator : this.mAMIndicator;
}
--- a/toolkit/content/widgets/filefield.xml
+++ b/toolkit/content/widgets/filefield.xml
@@ -18,17 +18,17 @@
<xul:hbox class="fileFieldContentBox" align="center" flex="1" xbl:inherits="disabled">
<xul:image class="fileFieldIcon" xbl:inherits="src=image,disabled"/>
<xul:textbox class="fileFieldLabel" xbl:inherits="value=label,disabled,accesskey,tabindex,aria-labelledby" flex="1" readonly="true"/>
</xul:hbox>
</content>
<implementation implements="nsIDOMXULLabeledControlElement">
<property name="label" onget="return this.getAttribute('label');">
<setter>
- this.setAttribute('label', val);
+ this.setAttribute("label", val);
var elt = document.getAnonymousElementByAttribute(this, "class", "fileFieldLabel");
return (elt.value = val);
</setter>
</property>
<field name="_file">null</field>
<property name="file" onget="return this._file">
<setter>
--- a/toolkit/content/widgets/general.xml
+++ b/toolkit/content/widgets/general.xml
@@ -31,23 +31,23 @@
onget="return this.getAttribute('crop');"/>
<property name="image" onset="this.setAttribute('image',val); return val;"
onget="return this.getAttribute('image');"/>
<property name="command" onset="this.setAttribute('command',val); return val;"
onget="return this.getAttribute('command');"/>
<property name="accessKey">
<getter>
<![CDATA[
- return this.labelElement ? this.labelElement.accessKey : this.getAttribute('accesskey');
+ return this.labelElement ? this.labelElement.accessKey : this.getAttribute("accesskey");
]]>
</getter>
<setter>
<![CDATA[
// Always store on the control
- this.setAttribute('accesskey', val);
+ this.setAttribute("accesskey", val);
// If there is a label, change the accesskey on the labelElement
// if it's also set there
if (this.labelElement) {
this.labelElement.accessKey = val;
}
return val;
]]>
</setter>
@@ -166,18 +166,18 @@
<implementation>
<property name="selectedIndex"
onget="return this.getAttribute('selectedIndex') || '0'">
<setter>
<![CDATA[
if (this.selectedIndex == val)
return val;
this.setAttribute("selectedIndex", val);
- var event = document.createEvent('Events');
- event.initEvent('select', true, true);
+ var event = document.createEvent("Events");
+ event.initEvent("select", true, true);
this.dispatchEvent(event);
return val;
]]>
</setter>
</property>
<property name="selectedPanel">
<getter>
--- a/toolkit/content/widgets/listbox.xml
+++ b/toolkit/content/widgets/listbox.xml
@@ -1028,21 +1028,21 @@
</children>
</content>
<implementation>
<property name="checked"
onget="return this.getAttribute('checked') == 'true';">
<setter><![CDATA[
if (val)
- this.setAttribute('checked', 'true');
+ this.setAttribute("checked", "true");
else
- this.removeAttribute('checked');
- var event = document.createEvent('Events');
- event.initEvent('CheckboxStateChange', true, true);
+ this.removeAttribute("checked");
+ var event = document.createEvent("Events");
+ event.initEvent("CheckboxStateChange", true, true);
this.dispatchEvent(event);
return val;
]]></setter>
</property>
</implementation>
<handlers>
<handler event="mousedown" button="0">
--- a/toolkit/content/widgets/menulist.xml
+++ b/toolkit/content/widgets/menulist.xml
@@ -75,22 +75,22 @@
this.setInitialSelection();
</constructor>
<method name="setInitialSelection">
<body>
<![CDATA[
var popup = this.menupopup;
if (popup) {
- var arr = popup.getElementsByAttribute('selected', 'true');
+ var arr = popup.getElementsByAttribute("selected", "true");
var editable = this.editable;
var value = this.value;
if (!arr.item(0) && value)
- arr = popup.getElementsByAttribute(editable ? 'label' : 'value', value);
+ arr = popup.getElementsByAttribute(editable ? "label" : "value", value);
if (arr.item(0))
this.selectedItem = arr[0];
else if (!editable)
this.selectedIndex = 0;
}
]]>
</body>
@@ -101,23 +101,23 @@
<![CDATA[
// if the new value is null, we still need to remove the old value
if (val == null)
return this.selectedItem = val;
var arr = null;
var popup = this.menupopup;
if (popup)
- arr = popup.getElementsByAttribute('value', val);
+ arr = popup.getElementsByAttribute("value", val);
if (arr && arr.item(0))
this.selectedItem = arr[0];
else {
this.selectedItem = null;
- this.setAttribute('value', val);
+ this.setAttribute("value", val);
}
return val;
]]>
</setter>
</property>
<property name="inputField" readonly="true" onget="return null;"/>
@@ -219,24 +219,24 @@
var oldval = this.mSelectedInternal;
if (oldval == val)
return val;
if (val && !this.contains(val))
return val;
if (oldval) {
- oldval.removeAttribute('selected');
+ oldval.removeAttribute("selected");
this.mAttributeObserver.disconnect();
}
this.mSelectedInternal = val;
let attributeFilter = ["value", "label", "image", "description"];
if (val) {
- val.setAttribute('selected', 'true');
+ val.setAttribute("selected", "true");
for (let attr of attributeFilter) {
if (val.hasAttribute(attr)) {
this.setAttribute(attr, val.getAttribute(attr));
} else {
this.removeAttribute(attr);
}
}
@@ -418,17 +418,17 @@
if (this.hasAttribute("disableautoselect"))
return;
// Find and select the menuitem that matches inputField's "value"
var arr = null;
var popup = this.menupopup;
if (popup)
- arr = popup.getElementsByAttribute('label', this.inputField.value);
+ arr = popup.getElementsByAttribute("label", this.inputField.value);
this.setSelectionInternal(arr ? arr.item(0) : null);
]]>
</body>
</method>
<method name="setSelectionInternal">
<parameter name="val"/>
@@ -436,22 +436,22 @@
<![CDATA[
// This is called internally to set selected item
// without triggering infinite loop
// when using selectedItem's setter
if (this.mSelectedInternal == val)
return val;
if (this.mSelectedInternal)
- this.mSelectedInternal.removeAttribute('selected');
+ this.mSelectedInternal.removeAttribute("selected");
this.mSelectedInternal = val;
if (val)
- val.setAttribute('selected', 'true');
+ val.setAttribute("selected", "true");
// Do NOT change the "value", which is owned by inputField
return val;
]]>
</body>
</method>
<property name="inputField" readonly="true">
@@ -466,18 +466,18 @@
onget="return this.inputField.value;"/>
<property name="value" onget="return this.inputField.value;">
<setter>
<![CDATA[
// Override menulist's value setter to refer to the inputField's value
// (Allows using "menulist.value" instead of "menulist.inputField.value")
this.inputField.value = val;
- this.setAttribute('value', val);
- this.setAttribute('label', val);
+ this.setAttribute("value", val);
+ this.setAttribute("label", val);
this._selectInputFieldValueInList();
return val;
]]>
</setter>
</property>
<property name="selectedItem">
<getter>
@@ -496,24 +496,24 @@
if (val && !this.contains(val))
return val;
// This doesn't touch inputField.value or "value" and "label" attributes
this.setSelectionInternal(val);
if (val) {
// Editable menulist uses "label" as its "value"
- var label = val.getAttribute('label');
+ var label = val.getAttribute("label");
this.inputField.value = label;
- this.setAttribute('value', label);
- this.setAttribute('label', label);
+ this.setAttribute("value", label);
+ this.setAttribute("label", label);
} else {
this.inputField.value = "";
- this.removeAttribute('value');
- this.removeAttribute('label');
+ this.removeAttribute("value");
+ this.removeAttribute("label");
}
var event = document.createEvent("Events");
event.initEvent("select", true, true);
this.dispatchEvent(event);
event = document.createEvent("Events");
event.initEvent("ValueChange", true, true);
@@ -545,23 +545,23 @@
this.inputField.select();
</body>
</method>
</implementation>
<handlers>
<handler event="focus" phase="capturing">
<![CDATA[
- this.setAttribute('focused', 'true');
+ this.setAttribute("focused", "true");
]]>
</handler>
<handler event="blur" phase="capturing">
<![CDATA[
- this.removeAttribute('focused');
+ this.removeAttribute("focused");
]]>
</handler>
<handler event="popupshowing">
<![CDATA[
// editable menulists elements aren't in the focus order,
// so when the popup opens we need to force the focus to the inputField
if (event.target.parentNode == this) {
--- a/toolkit/content/widgets/notification.xml
+++ b/toolkit/content/widgets/notification.xml
@@ -41,27 +41,27 @@
<field name="_closedNotification">null</field>
<field name="_blockingCanvas">null</field>
<field name="_animating">false</field>
<property name="notificationsHidden"
onget="return this.getAttribute('notificationshidden') == 'true';">
<setter>
if (val)
- this.setAttribute('notificationshidden', true);
- else this.removeAttribute('notificationshidden');
+ this.setAttribute("notificationshidden", true);
+ else this.removeAttribute("notificationshidden");
return val;
</setter>
</property>
<property name="allNotifications" readonly="true">
<getter>
<![CDATA[
var closedNotification = this._closedNotification;
- var notifications = this.getElementsByTagName('notification');
+ var notifications = this.getElementsByTagName("notification");
return Array.filter(notifications, n => n != closedNotification);
]]>
</getter>
</property>
<method name="getNotificationWithValue">
<parameter name="aValue"/>
<body>
--- a/toolkit/content/widgets/numberbox.xml
+++ b/toolkit/content/widgets/numberbox.xml
@@ -57,25 +57,25 @@
this._validateValue(val, false);
return val;
</setter>
</property>
<property name="wrapAround">
<getter>
<![CDATA[
- return (this.getAttribute('wraparound') == 'true')
+ return (this.getAttribute("wraparound") == "true")
]]>
</getter>
<setter>
<![CDATA[
if (val)
- this.setAttribute('wraparound', 'true');
+ this.setAttribute("wraparound", "true");
else
- this.removeAttribute('wraparound');
+ this.removeAttribute("wraparound");
this._enableDisableButtons();
return val;
]]>
</setter>
</property>
<property name="min">
<getter>
--- a/toolkit/content/widgets/preferences.xml
+++ b/toolkit/content/widgets/preferences.xml
@@ -174,17 +174,17 @@
<property name="preferences" onget="return this.parentNode"/>
<property name="name" onget="return this.getAttribute('name');">
<setter>
if (val == this.name)
return val;
this.preferences.rootBranchInternal
.removeObserver(this.name, this.preferences);
- this.setAttribute('name', val);
+ this.setAttribute("name", val);
this.preferences.rootBranchInternal
.addObserver(val, this.preferences, false);
return val;
</setter>
</property>
<property name="type" onget="return this.getAttribute('type');"
onset="this.setAttribute('type', val); return val;"/>
--- a/toolkit/content/widgets/progressmeter.xml
+++ b/toolkit/content/widgets/progressmeter.xml
@@ -34,18 +34,18 @@
var c = this.value;
if (p != c) {
var delta = p - c;
if (delta < 0)
delta = -delta;
if (delta > 3 || p == 0 || p == max) {
this.setAttribute("value", p);
// Fire DOM event so that accessible value change events occur
- var event = document.createEvent('Events');
- event.initEvent('ValueChange', true, true);
+ var event = document.createEvent("Events");
+ event.initEvent("ValueChange", true, true);
this.dispatchEvent(event);
}
}
return val;
]]></setter>
</property>
<property name="max"
--- a/toolkit/content/widgets/radio.xml
+++ b/toolkit/content/widgets/radio.xml
@@ -51,32 +51,32 @@
}
return val;
]]>
</setter>
</property>
<property name="disabled">
<getter>
<![CDATA[
- if (this.getAttribute('disabled') == 'true')
+ if (this.getAttribute("disabled") == "true")
return true;
var children = this._getRadioChildren();
for (var i = 0; i < children.length; ++i) {
if (!children[i].hidden && !children[i].collapsed && !children[i].disabled)
return false;
}
return true;
]]>
</getter>
<setter>
<![CDATA[
if (val)
- this.setAttribute('disabled', 'true');
+ this.setAttribute("disabled", "true");
else
- this.removeAttribute('disabled');
+ this.removeAttribute("disabled");
var children = this._getRadioChildren();
for (var i = 0; i < children.length; ++i) {
children[i].disabled = val;
}
return val;
]]>
</setter>
</property>
@@ -465,17 +465,17 @@
return;
}
}
]]>
</destructor>
<property name="selected" readonly="true">
<getter>
<![CDATA[
- return this.hasAttribute('selected');
+ return this.hasAttribute("selected");
]]>
</getter>
</property>
<property name="radioGroup" readonly="true" onget="return this.control"/>
<property name="control" readonly="true">
<getter>
<![CDATA[
const XUL_NS = "http://www.mozilla.org/keymaster/"
--- a/toolkit/content/widgets/scrollbox.xml
+++ b/toolkit/content/widgets/scrollbox.xml
@@ -64,17 +64,17 @@
<field name="_scrollButtonDown">
document.getAnonymousElementByAttribute(this, "anonid", "scrollbutton-down");
</field>
<field name="__prefBranch">null</field>
<property name="_prefBranch" readonly="true">
<getter><![CDATA[
if (this.__prefBranch === null) {
- this.__prefBranch = Components.classes['@mozilla.org/preferences-service;1']
+ this.__prefBranch = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
}
return this.__prefBranch;
]]></getter>
</property>
<field name="_scrollIncrement">null</field>
<property name="scrollIncrement" readonly="true">
--- a/toolkit/content/widgets/tabbox.xml
+++ b/toolkit/content/widgets/tabbox.xml
@@ -405,18 +405,18 @@
// This will cause an onselect event to fire for the tabpanel
// element.
this.tabbox.tabpanels.selectedPanel = linkedPanel;
}
if (!alreadySelected) {
// Fire an onselect event for the tabs element.
- var event = document.createEvent('Events');
- event.initEvent('select', true, true);
+ var event = document.createEvent("Events");
+ event.initEvent("select", true, true);
this.dispatchEvent(event);
}
}
return val;
]]>
</setter>
</property>
@@ -842,24 +842,24 @@
// through to mousedown behavior which sets focus on the current tab,
// Only a click on an already selected tab should focus the tab itself.
]]>
</handler>
<handler event="keydown" keycode="VK_LEFT" group="system" preventdefault="true">
<![CDATA[
var direction = window.getComputedStyle(this.parentNode, null).direction;
- this.parentNode.advanceSelectedTab(direction == 'ltr' ? -1 : 1, this.arrowKeysShouldWrap);
+ this.parentNode.advanceSelectedTab(direction == "ltr" ? -1 : 1, this.arrowKeysShouldWrap);
]]>
</handler>
<handler event="keydown" keycode="VK_RIGHT" group="system" preventdefault="true">
<![CDATA[
var direction = window.getComputedStyle(this.parentNode, null).direction;
- this.parentNode.advanceSelectedTab(direction == 'ltr' ? 1 : -1, this.arrowKeysShouldWrap);
+ this.parentNode.advanceSelectedTab(direction == "ltr" ? 1 : -1, this.arrowKeysShouldWrap);
]]>
</handler>
<handler event="keydown" keycode="VK_UP" group="system" preventdefault="true">
<![CDATA[
this.parentNode.advanceSelectedTab(-1, this.arrowKeysShouldWrap);
]]>
</handler>
--- a/toolkit/content/widgets/text.xml
+++ b/toolkit/content/widgets/text.xml
@@ -23,33 +23,33 @@
</implementation>
</binding>
<binding id="text-label" extends="chrome://global/content/bindings/text.xml#text-base">
<implementation implements="nsIDOMXULLabelElement">
<property name="accessKey">
<getter>
<![CDATA[
- var accessKey = this.getAttribute('accesskey');
+ var accessKey = this.getAttribute("accesskey");
return accessKey ? accessKey[0] : null;
]]>
</getter>
<setter>
<![CDATA[
- this.setAttribute('accesskey', val);
+ this.setAttribute("accesskey", val);
return val;
]]>
</setter>
</property>
<property name="control" onget="return getAttribute('control');">
<setter>
<![CDATA[
// After this gets set, the label will use the binding #label-control
- this.setAttribute('control', val);
+ this.setAttribute("control", val);
return val;
]]>
</setter>
</property>
</implementation>
</binding>
<binding id="label-control" extends="chrome://global/content/bindings/text.xml#text-label">
@@ -110,23 +110,23 @@
}
if (!this.mUnderlineAccesskey)
return;
var afterLabel = document.getAnonymousElementByAttribute(this, "anonid", "accessKeyParens");
afterLabel.textContent = "";
- var oldAccessKey = this.getElementsByAttribute('class', 'accesskey').item(0);
+ var oldAccessKey = this.getElementsByAttribute("class", "accesskey").item(0);
if (oldAccessKey) { // Clear old accesskey
this.mergeElement(oldAccessKey);
}
var oldHiddenSpan =
- this.getElementsByAttribute('class', 'hiddenColon').item(0);
+ this.getElementsByAttribute("class", "hiddenColon").item(0);
if (oldHiddenSpan) {
this.mergeElement(oldHiddenSpan);
}
var labelText = this.textContent;
if (!accessKey || !labelText || !control) {
return;
}
@@ -230,33 +230,33 @@
<field name="mAlwaysAppendAccessKey">false</field>
<property name="accessKey">
<getter>
<![CDATA[
var accessKey = null;
var labeledEl = this.labeledControlElement;
if (labeledEl) {
- accessKey = labeledEl.getAttribute('accesskey');
+ accessKey = labeledEl.getAttribute("accesskey");
}
if (!accessKey) {
- accessKey = this.getAttribute('accesskey');
+ accessKey = this.getAttribute("accesskey");
}
return accessKey ? accessKey[0] : null;
]]>
</getter>
<setter>
<![CDATA[
// If this label already has an accesskey attribute store it here as well
- if (this.hasAttribute('accesskey')) {
- this.setAttribute('accesskey', val);
+ if (this.hasAttribute("accesskey")) {
+ this.setAttribute("accesskey", val);
}
var control = this.labeledControlElement;
if (control) {
- control.setAttribute('accesskey', val);
+ control.setAttribute("accesskey", val);
}
this.formatAccessKey(false);
return val;
]]>
</setter>
</property>
<property name="labeledControlElement" readonly="true"
@@ -264,17 +264,17 @@
<property name="control" onget="return this.getAttribute('control');">
<setter>
<![CDATA[
var control = this.labeledControlElement;
if (control) {
control.labelElement = null; // No longer pointed to be this label
}
- this.setAttribute('control', val);
+ this.setAttribute("control", val);
this.formatAccessKey(false);
return val;
]]>
</setter>
</property>
</implementation>
--- a/toolkit/content/widgets/textbox.xml
+++ b/toolkit/content/widgets/textbox.xml
@@ -167,17 +167,17 @@
if (this.hasAttribute("emptytext"))
this.placeholder = this.getAttribute("emptytext");
]]></constructor>
<destructor>
<![CDATA[
var field = this.inputField;
if (field && field.value)
- this.boxObject.setProperty('value', field.value);
+ this.boxObject.setProperty("value", field.value);
this.mInputField = null;
]]>
</destructor>
</implementation>
<handlers>
<handler event="focus" phase="capturing">
--- a/toolkit/content/widgets/tree.xml
+++ b/toolkit/content/widgets/tree.xml
@@ -238,18 +238,18 @@
return false;
}
if (this.view.isContainerOpen(row) != openState) {
this.view.toggleOpenState(row);
if (row == this.currentIndex) {
// Only fire event when current row is expanded or collapsed
// because that's all the assistive technology really cares about.
- var event = document.createEvent('Events');
- event.initEvent('OpenStateChange', true, true);
+ var event = document.createEvent("Events");
+ event.initEvent("OpenStateChange", true, true);
this.dispatchEvent(event);
}
return true;
}
return false;
]]></body>
</method>
@@ -981,17 +981,17 @@
_moveToEdgeShift(this.view.rowCount - 1, event);
]]>
</handler>
<handler event="keypress">
<![CDATA[
if (this._editingColumn)
return;
- if (event.charCode == ' '.charCodeAt(0)) {
+ if (event.charCode == " ".charCodeAt(0)) {
var c = this.currentIndex;
if (!this.view.selection.isSelected(c) ||
(!this.view.selection.single && this._isAccelPressed(event))) {
this.view.selection.toggleSelect(c);
event.preventDefault();
}
} else if (!this.disableKeyNavigation && event.charCode > 0 &&
!event.altKey && !this._isAccelPressed(event) &&
--- a/toolkit/content/widgets/videocontrols.xml
+++ b/toolkit/content/widgets/videocontrols.xml
@@ -681,18 +681,18 @@
// play restrictions, and we don't want to display a debug message
// if that's the case.
return this.video.error != null ||
(this.video.networkState == this.video.NETWORK_NO_SOURCE &&
this.hasSources());
},
hasSources() {
- if (this.video.hasAttribute('src') &&
- this.video.getAttribute('src') !== "") {
+ if (this.video.hasAttribute("src") &&
+ this.video.getAttribute("src") !== "") {
return true;
}
for (var child = this.video.firstChild;
child !== null;
child = child.nextElementSibling) {
if (child instanceof HTMLSourceElement) {
return true;
}
@@ -1311,17 +1311,17 @@
case KeyEvent.DOM_VK_HOME:
keystroke += "home";
break;
case KeyEvent.DOM_VK_END:
keystroke += "end";
break;
}
- if (String.fromCharCode(event.charCode) == ' ') {
+ if (String.fromCharCode(event.charCode) == " ") {
keystroke += "space";
}
this.log("Got keystroke: " + keystroke);
var oldval, newval;
try {
switch (keystroke) {
--- a/toolkit/mozapps/extensions/content/extensions.xml
+++ b/toolkit/mozapps/extensions/content/extensions.xml
@@ -1163,17 +1163,17 @@
</method>
<method name="_updateDates">
<body><![CDATA[
function formatDate(aDate) {
const locale = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
.getService(Components.interfaces.nsIXULChromeRegistry)
.getSelectedLocale("global", true);
- const dtOptions = { year: 'numeric', month: 'long', day: 'numeric' };
+ const dtOptions = { year: "numeric", month: "long", day: "numeric" };
return aDate.toLocaleDateString(locale, dtOptions);
}
if (this.mAddon.updateDate)
this._dateUpdated.value = formatDate(this.mAddon.updateDate);
else
this._dateUpdated.value = this._dateUpdated.getAttribute("unknown");
]]></body>
@@ -1327,17 +1327,17 @@
this._stateMenulist.selectedItem = this._askToActivateMenuitem;
} else {
this._stateMenulist.selectedItem = this._alwaysActivateMenuitem;
}
let hasActivatePermission =
["ask_to_activate", "enable", "disable"].some(perm => this.hasPermission(perm));
this._stateMenulist.disabled = !hasActivatePermission;
this._stateMenulist.hidden = false;
- this._stateMenulist.classList.add('no-auto-hide');
+ this._stateMenulist.classList.add("no-auto-hide");
} else {
this._stateMenulist.hidden = true;
let enableTooltip = gViewController.commands["cmd_enableItem"]
.getTooltip(this.mAddon);
this._enableBtn.setAttribute("tooltiptext", enableTooltip);
if (this.hasPermission("enable")) {
this._enableBtn.hidden = false;
@@ -1745,18 +1745,18 @@
<handlers>
<handler event="click" button="0"><![CDATA[
switch (event.detail) {
case 1:
// Prevent double-click where the UI changes on the first click
this._lastClickTarget = event.originalTarget;
break;
case 2:
- if (event.originalTarget.localName != 'button' &&
- !event.originalTarget.classList.contains('text-link') &&
+ if (event.originalTarget.localName != "button" &&
+ !event.originalTarget.classList.contains("text-link") &&
event.originalTarget == this._lastClickTarget) {
this.showInDetailView();
}
break;
}
]]></handler>
</handlers>
</binding>
--- a/toolkit/mozapps/extensions/test/browser/webapi_addon_listener.html
+++ b/toolkit/mozapps/extensions/test/browser/webapi_addon_listener.html
@@ -17,14 +17,14 @@ let resultEl = document.getElementById("
"onInstalled",
"onUninstalling",
"onUninstalled",
"onOperationCancelled",
].forEach(event => {
navigator.mozAddonManager.addEventListener(event, data => {
let obj = {event, id: data.id, needsRestart: data.needsRestart};
events.push(JSON.stringify(obj));
- resultEl.textContent = events.join('\n');
+ resultEl.textContent = events.join("\n");
});
});
</script>
</body>
</html>
--- a/toolkit/mozapps/extensions/test/mochitest/test_bug887098.html
+++ b/toolkit/mozapps/extensions/test/mochitest/test_bug887098.html
@@ -11,25 +11,25 @@ https://bugzilla.mozilla.org/show_bug.cg
<script type="application/javascript">
/* exported loaded */
/** Test for Bug 887098 **/
SimpleTest.waitForExplicitFinish();
/* globals $,evalRef */
function loaded() {
- var iwin = $('ifr').contentWindow;
+ var iwin = $("ifr").contentWindow;
var href = SpecialPowers.wrap(iwin).location.href;
if (/file_empty/.test(href)) {
window.evalRef = iwin.eval;
window.installTriggerRef = iwin.InstallTrigger; // Force lazy instantiation.
// about: is privileged, so we need to be privileged to load it.
- SpecialPowers.wrap(iwin).location.href = 'about:';
+ SpecialPowers.wrap(iwin).location.href = "about:";
} else {
- is(href, 'about:', "Successfully navigated to about:");
+ is(href, "about:", "Successfully navigated to about:");
try {
evalRef('InstallTrigger.install({URL: "chrome://global/skin/global.css"});');
ok(false, "Should have thrown when trying to install restricted URI from InstallTrigger");
} catch (e) {
// XXXgijs this test broke because of the switch to webidl. I'm told
// it has to do with compartments and the fact that we eval in "about:".
// Tracking in bug 1007671
todo(/permission/.test(e), "We should throw a security exception. Got: " + e);
--- a/toolkit/xre/test/test_fpuhandler.html
+++ b/toolkit/xre/test/test_fpuhandler.html
@@ -18,17 +18,17 @@
z = x / y;
return z;
}
function runTest() {
ok(isNaN(doDiv(0.0, 0.0)), "Undefined division-by-zero doesn't crash");
try {
- document.getElementById('plugin1').enableFPExceptions();
+ document.getElementById("plugin1").enableFPExceptions();
} catch (e) {
ok(true, "No special code to set the FPU bit in the testplugin.");
SimpleTest.finish();
return;
}
ok(isNaN(doDiv(0.0, 0.0)), "Undefined division-by-zero doesn't crash again.");
SimpleTest.finish();