зеркало из https://github.com/mozilla/gecko-dev.git
merge mozilla-inbound to mozilla-central a=merge
This commit is contained in:
Коммит
07ed19e582
|
@ -39,6 +39,7 @@
|
||||||
#include "nsIWebBrowserChrome.h"
|
#include "nsIWebBrowserChrome.h"
|
||||||
#include "nsReadableUtils.h"
|
#include "nsReadableUtils.h"
|
||||||
#include "nsFocusManager.h"
|
#include "nsFocusManager.h"
|
||||||
|
#include "nsGlobalWindow.h"
|
||||||
|
|
||||||
#ifdef MOZ_XUL
|
#ifdef MOZ_XUL
|
||||||
#include "nsIXULDocument.h"
|
#include "nsIXULDocument.h"
|
||||||
|
@ -482,10 +483,9 @@ RootAccessible::RelationByType(RelationType aType)
|
||||||
if (!mDocumentNode || aType != RelationType::EMBEDS)
|
if (!mDocumentNode || aType != RelationType::EMBEDS)
|
||||||
return DocAccessibleWrap::RelationByType(aType);
|
return DocAccessibleWrap::RelationByType(aType);
|
||||||
|
|
||||||
nsIDOMWindow* rootWindow = mDocumentNode->GetWindow();
|
nsPIDOMWindow* rootWindow = mDocumentNode->GetWindow();
|
||||||
if (rootWindow) {
|
if (rootWindow) {
|
||||||
nsCOMPtr<nsIDOMWindow> contentWindow;
|
nsCOMPtr<nsIDOMWindow> contentWindow = nsGlobalWindow::Cast(rootWindow)->GetContent();
|
||||||
rootWindow->GetContent(getter_AddRefs(contentWindow));
|
|
||||||
if (contentWindow) {
|
if (contentWindow) {
|
||||||
nsCOMPtr<nsIDOMDocument> contentDOMDocument;
|
nsCOMPtr<nsIDOMDocument> contentDOMDocument;
|
||||||
contentWindow->GetDocument(getter_AddRefs(contentDOMDocument));
|
contentWindow->GetDocument(getter_AddRefs(contentDOMDocument));
|
||||||
|
|
|
@ -20,7 +20,7 @@ MailtoProtocolHandler.prototype = {
|
||||||
Ci.nsIProtocolHandler.URI_NOAUTH |
|
Ci.nsIProtocolHandler.URI_NOAUTH |
|
||||||
Ci.nsIProtocolHandler.URI_LOADABLE_BY_ANYONE |
|
Ci.nsIProtocolHandler.URI_LOADABLE_BY_ANYONE |
|
||||||
Ci.nsIProtocolHandler.URI_DOES_NOT_RETURN_DATA,
|
Ci.nsIProtocolHandler.URI_DOES_NOT_RETURN_DATA,
|
||||||
allowPort: function() false,
|
allowPort: () => false,
|
||||||
|
|
||||||
newURI: function Proto_newURI(aSpec, aOriginCharset) {
|
newURI: function Proto_newURI(aSpec, aOriginCharset) {
|
||||||
let uri = Cc["@mozilla.org/network/simple-uri;1"].createInstance(Ci.nsIURI);
|
let uri = Cc["@mozilla.org/network/simple-uri;1"].createInstance(Ci.nsIURI);
|
||||||
|
|
|
@ -62,13 +62,13 @@ function hookScreen(window) {
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.defineProperty(screen, 'width', {
|
Object.defineProperty(screen, 'width', {
|
||||||
get: function () GlobalSimulatorScreen.width
|
get: () => GlobalSimulatorScreen.width
|
||||||
});
|
});
|
||||||
Object.defineProperty(screen, 'height', {
|
Object.defineProperty(screen, 'height', {
|
||||||
get: function () GlobalSimulatorScreen.height
|
get: () => GlobalSimulatorScreen.height
|
||||||
});
|
});
|
||||||
Object.defineProperty(screen, 'mozOrientation', {
|
Object.defineProperty(screen, 'mozOrientation', {
|
||||||
get: function () GlobalSimulatorScreen.mozOrientation
|
get: () => GlobalSimulatorScreen.mozOrientation
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ SmsProtocolHandler.prototype = {
|
||||||
Ci.nsIProtocolHandler.URI_NOAUTH |
|
Ci.nsIProtocolHandler.URI_NOAUTH |
|
||||||
Ci.nsIProtocolHandler.URI_LOADABLE_BY_ANYONE |
|
Ci.nsIProtocolHandler.URI_LOADABLE_BY_ANYONE |
|
||||||
Ci.nsIProtocolHandler.URI_DOES_NOT_RETURN_DATA,
|
Ci.nsIProtocolHandler.URI_DOES_NOT_RETURN_DATA,
|
||||||
allowPort: function() false,
|
allowPort: () => false,
|
||||||
|
|
||||||
newURI: function Proto_newURI(aSpec, aOriginCharset) {
|
newURI: function Proto_newURI(aSpec, aOriginCharset) {
|
||||||
let uri = Cc["@mozilla.org/network/simple-uri;1"].createInstance(Ci.nsIURI);
|
let uri = Cc["@mozilla.org/network/simple-uri;1"].createInstance(Ci.nsIURI);
|
||||||
|
|
|
@ -28,7 +28,7 @@ TelProtocolHandler.prototype = {
|
||||||
Ci.nsIProtocolHandler.URI_NOAUTH |
|
Ci.nsIProtocolHandler.URI_NOAUTH |
|
||||||
Ci.nsIProtocolHandler.URI_LOADABLE_BY_ANYONE |
|
Ci.nsIProtocolHandler.URI_LOADABLE_BY_ANYONE |
|
||||||
Ci.nsIProtocolHandler.URI_DOES_NOT_RETURN_DATA,
|
Ci.nsIProtocolHandler.URI_DOES_NOT_RETURN_DATA,
|
||||||
allowPort: function() false,
|
allowPort: () => false,
|
||||||
|
|
||||||
newURI: function Proto_newURI(aSpec, aOriginCharset) {
|
newURI: function Proto_newURI(aSpec, aOriginCharset) {
|
||||||
let uri = Cc["@mozilla.org/network/simple-uri;1"].createInstance(Ci.nsIURI);
|
let uri = Cc["@mozilla.org/network/simple-uri;1"].createInstance(Ci.nsIURI);
|
||||||
|
|
|
@ -185,6 +185,7 @@
|
||||||
@RESPATH@/components/dom.xpt
|
@RESPATH@/components/dom.xpt
|
||||||
@RESPATH@/components/dom_activities.xpt
|
@RESPATH@/components/dom_activities.xpt
|
||||||
@RESPATH@/components/dom_apps.xpt
|
@RESPATH@/components/dom_apps.xpt
|
||||||
|
@RESPATH@/components/dom_newapps.xpt
|
||||||
@RESPATH@/components/dom_audiochannel.xpt
|
@RESPATH@/components/dom_audiochannel.xpt
|
||||||
@RESPATH@/components/dom_base.xpt
|
@RESPATH@/components/dom_base.xpt
|
||||||
@RESPATH@/components/dom_system.xpt
|
@RESPATH@/components/dom_system.xpt
|
||||||
|
@ -729,6 +730,10 @@
|
||||||
@RESPATH@/components/@DLL_PREFIX@mozgnome@DLL_SUFFIX@
|
@RESPATH@/components/@DLL_PREFIX@mozgnome@DLL_SUFFIX@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
; Signed Packaged Content
|
||||||
|
@RESPATH@/components/InstallPackagedWebapp.manifest
|
||||||
|
@RESPATH@/components/InstallPackagedWebapp.js
|
||||||
|
|
||||||
; ANGLE on Win32
|
; ANGLE on Win32
|
||||||
#ifdef XP_WIN32
|
#ifdef XP_WIN32
|
||||||
#ifndef HAVE_64BIT_BUILD
|
#ifndef HAVE_64BIT_BUILD
|
||||||
|
|
|
@ -57,7 +57,7 @@ $(DIST)/branding:
|
||||||
|
|
||||||
libs::
|
libs::
|
||||||
@if test -f '$(LOCALE_SRCDIR)/existing-profile-defaults.js'; then \
|
@if test -f '$(LOCALE_SRCDIR)/existing-profile-defaults.js'; then \
|
||||||
$(PYTHON) -m mozbuild.action.preprocessor $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
|
$(PYTHON) -m mozbuild.action.preprocessor $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(MOZ_DEBUG_DEFINES) \
|
||||||
$(LOCALE_SRCDIR)/existing-profile-defaults.js -o $(FINAL_TARGET)/defaults/existing-profile-defaults.js; \
|
$(LOCALE_SRCDIR)/existing-profile-defaults.js -o $(FINAL_TARGET)/defaults/existing-profile-defaults.js; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,10 @@ const { EventEmitter } = Cu.import("resource://gre/modules/devtools/shared/event
|
||||||
// have trailing newlines. And note that registerLogHandler actually registers
|
// have trailing newlines. And note that registerLogHandler actually registers
|
||||||
// an error handler, despite its name.
|
// an error handler, despite its name.
|
||||||
Subprocess.registerLogHandler(
|
Subprocess.registerLogHandler(
|
||||||
function(s) console.error("subprocess: " + s.trim())
|
s => console.error("subprocess: " + s.trim())
|
||||||
);
|
);
|
||||||
Subprocess.registerDebugHandler(
|
Subprocess.registerDebugHandler(
|
||||||
function(s) console.debug("subprocess: " + s.trim())
|
s => console.debug("subprocess: " + s.trim())
|
||||||
);
|
);
|
||||||
|
|
||||||
function SimulatorProcess(options) {
|
function SimulatorProcess(options) {
|
||||||
|
@ -38,7 +38,9 @@ function SimulatorProcess(options) {
|
||||||
SimulatorProcess.prototype = {
|
SimulatorProcess.prototype = {
|
||||||
|
|
||||||
// check if b2g is running
|
// check if b2g is running
|
||||||
get isRunning() !!this.process,
|
get isRunning() {
|
||||||
|
return !!this.process;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start the process and connect the debugger client.
|
* Start the process and connect the debugger client.
|
||||||
|
|
|
@ -54,7 +54,7 @@ var gGestureSupport = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a preference object with some defaults
|
// Create a preference object with some defaults
|
||||||
let def = function(aThreshold, aLatched)
|
let def = (aThreshold, aLatched) =>
|
||||||
({ threshold: aThreshold, latched: !!aLatched });
|
({ threshold: aThreshold, latched: !!aLatched });
|
||||||
|
|
||||||
switch (aEvent.type) {
|
switch (aEvent.type) {
|
||||||
|
|
|
@ -533,12 +533,10 @@ var LoopUI;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.PlacesUtils.promiseFaviconLinkUrl(pageURI).then(uri => {
|
this.PlacesUtils.promiseFaviconLinkUrl(pageURI).then(uri => {
|
||||||
uri = this.PlacesUtils.getImageURLForResolution(window, uri.spec);
|
|
||||||
|
|
||||||
// We XHR the favicon to get a File object, which we can pass to the FileReader
|
// We XHR the favicon to get a File object, which we can pass to the FileReader
|
||||||
// object. The FileReader turns the File object into a data-uri.
|
// object. The FileReader turns the File object into a data-uri.
|
||||||
let xhr = new XMLHttpRequest();
|
let xhr = new XMLHttpRequest();
|
||||||
xhr.open("get", uri, true);
|
xhr.open("get", uri.spec, true);
|
||||||
xhr.responseType = "blob";
|
xhr.responseType = "blob";
|
||||||
xhr.overrideMimeType("image/x-icon");
|
xhr.overrideMimeType("image/x-icon");
|
||||||
xhr.onload = () => {
|
xhr.onload = () => {
|
||||||
|
|
|
@ -30,7 +30,7 @@ var StarUI = {
|
||||||
get _blockedCommands() {
|
get _blockedCommands() {
|
||||||
delete this._blockedCommands;
|
delete this._blockedCommands;
|
||||||
return this._blockedCommands =
|
return this._blockedCommands =
|
||||||
["cmd_close", "cmd_closeWindow"].map(function (id) this._element(id), this);
|
["cmd_close", "cmd_closeWindow"].map(id => this._element(id));
|
||||||
},
|
},
|
||||||
|
|
||||||
_blockCommands: function SU__blockCommands() {
|
_blockCommands: function SU__blockCommands() {
|
||||||
|
@ -1498,7 +1498,7 @@ var BookmarkingUI = {
|
||||||
// calls back. For such an edge case, retain all unique entries from both
|
// calls back. For such an edge case, retain all unique entries from both
|
||||||
// arrays.
|
// arrays.
|
||||||
this._itemIds = this._itemIds.filter(
|
this._itemIds = this._itemIds.filter(
|
||||||
function (id) aItemIds.indexOf(id) == -1
|
id => aItemIds.indexOf(id) == -1
|
||||||
).concat(aItemIds);
|
).concat(aItemIds);
|
||||||
|
|
||||||
this._updateStar();
|
this._updateStar();
|
||||||
|
|
|
@ -253,7 +253,7 @@ var gSyncUI = {
|
||||||
doSync() {
|
doSync() {
|
||||||
this._needsSetup().then(needsSetup => {
|
this._needsSetup().then(needsSetup => {
|
||||||
if (!needsSetup) {
|
if (!needsSetup) {
|
||||||
setTimeout(function () Weave.Service.errorHandler.syncAndReportErrors(), 0);
|
setTimeout(() => Weave.Service.errorHandler.syncAndReportErrors(), 0);
|
||||||
}
|
}
|
||||||
Services.obs.notifyObservers(null, "cloudsync:user-sync", null);
|
Services.obs.notifyObservers(null, "cloudsync:user-sync", null);
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
|
|
@ -225,7 +225,7 @@ var TabView = {
|
||||||
self._SSWindowStateReadyListener = null;
|
self._SSWindowStateReadyListener = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
self._initFrameCallbacks.forEach(function (cb) cb());
|
self._initFrameCallbacks.forEach(cb => cb());
|
||||||
self._initFrameCallbacks = [];
|
self._initFrameCallbacks = [];
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
|
|
|
@ -3270,7 +3270,7 @@ function FillInHTMLTooltip(tipElement)
|
||||||
}
|
}
|
||||||
|
|
||||||
var browserDragAndDrop = {
|
var browserDragAndDrop = {
|
||||||
canDropLink: function (aEvent) Services.droppedLinkHandler.canDropLink(aEvent, true),
|
canDropLink: aEvent => Services.droppedLinkHandler.canDropLink(aEvent, true),
|
||||||
|
|
||||||
dragOver: function (aEvent)
|
dragOver: function (aEvent)
|
||||||
{
|
{
|
||||||
|
@ -3418,7 +3418,7 @@ const BrowserSearch = {
|
||||||
|
|
||||||
// Check to see whether we've already added an engine with this title
|
// Check to see whether we've already added an engine with this title
|
||||||
if (browser.engines) {
|
if (browser.engines) {
|
||||||
if (browser.engines.some(function (e) e.title == engine.title))
|
if (browser.engines.some(e => e.title == engine.title))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3785,7 +3785,6 @@ function FillHistoryMenu(aParent) {
|
||||||
PlacesUtils.favicons.getFaviconURLForPage(entryURI, function (aURI) {
|
PlacesUtils.favicons.getFaviconURLForPage(entryURI, function (aURI) {
|
||||||
if (aURI) {
|
if (aURI) {
|
||||||
let iconURL = PlacesUtils.favicons.getFaviconLinkForIcon(aURI).spec;
|
let iconURL = PlacesUtils.favicons.getFaviconLinkForIcon(aURI).spec;
|
||||||
iconURL = PlacesUtils.getImageURLForResolution(window, iconURL);
|
|
||||||
item.style.listStyleImage = "url(" + iconURL + ")";
|
item.style.listStyleImage = "url(" + iconURL + ")";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -4521,7 +4520,9 @@ var LinkTargetDisplay = {
|
||||||
DELAY_HIDE: 250,
|
DELAY_HIDE: 250,
|
||||||
_timer: 0,
|
_timer: 0,
|
||||||
|
|
||||||
get _isVisible () XULBrowserWindow.statusTextField.label != "",
|
get _isVisible () {
|
||||||
|
return XULBrowserWindow.statusTextField.label != "";
|
||||||
|
},
|
||||||
|
|
||||||
update: function () {
|
update: function () {
|
||||||
clearTimeout(this._timer);
|
clearTimeout(this._timer);
|
||||||
|
@ -4918,7 +4919,7 @@ nsBrowserAccess.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
isTabContentWindow: function (aWindow) {
|
isTabContentWindow: function (aWindow) {
|
||||||
return gBrowser.browsers.some(function (browser) browser.contentWindow == aWindow);
|
return gBrowser.browsers.some(browser => browser.contentWindow == aWindow);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5149,9 +5150,9 @@ var TabsInTitlebar = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_update: function (aForce=false) {
|
_update: function (aForce=false) {
|
||||||
function $(id) document.getElementById(id);
|
let $ = id => document.getElementById(id);
|
||||||
function rect(ele) ele.getBoundingClientRect();
|
let rect = ele => ele.getBoundingClientRect();
|
||||||
function verticalMargins(cstyle) parseFloat(cstyle.marginBottom) + parseFloat(cstyle.marginTop);
|
let verticalMargins = cstyle => parseFloat(cstyle.marginBottom) + parseFloat(cstyle.marginTop);
|
||||||
|
|
||||||
if (!this._initialized || window.fullScreen)
|
if (!this._initialized || window.fullScreen)
|
||||||
return;
|
return;
|
||||||
|
@ -7359,8 +7360,12 @@ function getTabModalPromptBox(aWindow) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* DEPRECATED */
|
/* DEPRECATED */
|
||||||
function getBrowser() gBrowser;
|
function getBrowser() {
|
||||||
function getNavToolbox() gNavToolbox;
|
return gBrowser;
|
||||||
|
}
|
||||||
|
function getNavToolbox() {
|
||||||
|
return gNavToolbox;
|
||||||
|
}
|
||||||
|
|
||||||
var gPrivateBrowsingUI = {
|
var gPrivateBrowsingUI = {
|
||||||
init: function PBUI_init() {
|
init: function PBUI_init() {
|
||||||
|
|
|
@ -128,7 +128,9 @@ chatBrowserAccess.prototype = {
|
||||||
return browser ? browser.QueryInterface(Ci.nsIFrameLoaderOwner) : null;
|
return browser ? browser.QueryInterface(Ci.nsIFrameLoaderOwner) : null;
|
||||||
},
|
},
|
||||||
|
|
||||||
isTabContentWindow: function (aWindow) this.contentWindow == aWindow,
|
isTabContentWindow: function (aWindow) {
|
||||||
|
return this.contentWindow == aWindow;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -673,12 +673,10 @@ ContentSearchUIController.prototype = {
|
||||||
return row;
|
return row;
|
||||||
},
|
},
|
||||||
|
|
||||||
// Converts favicon array buffer into data URI of the right size and dpi.
|
// Converts favicon array buffer into a data URI.
|
||||||
_getFaviconURIFromBuffer: function (buffer) {
|
_getFaviconURIFromBuffer: function (buffer) {
|
||||||
let blob = new Blob([buffer]);
|
let blob = new Blob([buffer]);
|
||||||
let dpiSize = Math.round(16 * window.devicePixelRatio);
|
return URL.createObjectURL(blob);
|
||||||
let sizeStr = dpiSize + "," + dpiSize;
|
|
||||||
return URL.createObjectURL(blob) + "#-moz-resolution=" + sizeStr;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Adds "@2x" to the name of the given PNG url for "retina" screens.
|
// Adds "@2x" to the name of the given PNG url for "retina" screens.
|
||||||
|
|
|
@ -435,8 +435,8 @@ Sanitizer.prototype = {
|
||||||
|
|
||||||
let count = 0;
|
let count = 0;
|
||||||
let countDone = {
|
let countDone = {
|
||||||
handleResult : function(aResult) count = aResult,
|
handleResult : aResult => count = aResult,
|
||||||
handleError : function(aError) Components.utils.reportError(aError),
|
handleError : aError => Components.utils.reportError(aError),
|
||||||
handleCompletion :
|
handleCompletion :
|
||||||
function(aReason) { aCallback("formdata", aReason == 0 && count > 0, aArg); }
|
function(aReason) { aCallback("formdata", aReason == 0 && count > 0, aArg); }
|
||||||
};
|
};
|
||||||
|
|
|
@ -51,7 +51,9 @@ var gSyncSetup = {
|
||||||
server: false
|
server: false
|
||||||
},
|
},
|
||||||
|
|
||||||
get _remoteSites() [Weave.Service.serverURL, RECAPTCHA_DOMAIN],
|
get _remoteSites() {
|
||||||
|
return [Weave.Service.serverURL, RECAPTCHA_DOMAIN];
|
||||||
|
},
|
||||||
|
|
||||||
get _usingMainServers() {
|
get _usingMainServers() {
|
||||||
if (this._settingUpNew)
|
if (this._settingUpNew)
|
||||||
|
@ -79,7 +81,7 @@ var gSyncSetup = {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
addRem(true);
|
addRem(true);
|
||||||
window.addEventListener("unload", function() addRem(false), false);
|
window.addEventListener("unload", () => addRem(false), false);
|
||||||
|
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
// Force Service to be loaded so that engines are registered.
|
// Force Service to be loaded so that engines are registered.
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
<getter><![CDATA[
|
<getter><![CDATA[
|
||||||
if (!this._visibleTabs)
|
if (!this._visibleTabs)
|
||||||
this._visibleTabs = Array.filter(this.tabs,
|
this._visibleTabs = Array.filter(this.tabs,
|
||||||
function (tab) !tab.hidden && !tab.closing);
|
tab => !tab.hidden && !tab.closing);
|
||||||
return this._visibleTabs;
|
return this._visibleTabs;
|
||||||
]]></getter>
|
]]></getter>
|
||||||
</property>
|
</property>
|
||||||
|
@ -904,9 +904,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
let sizedIconUrl = browser.mIconURL || "";
|
let sizedIconUrl = browser.mIconURL || "";
|
||||||
if (sizedIconUrl) {
|
|
||||||
sizedIconUrl = this.PlacesUtils.getImageURLForResolution(window, sizedIconUrl);
|
|
||||||
}
|
|
||||||
if (sizedIconUrl != aTab.getAttribute("image")) {
|
if (sizedIconUrl != aTab.getAttribute("image")) {
|
||||||
if (sizedIconUrl)
|
if (sizedIconUrl)
|
||||||
aTab.setAttribute("image", sizedIconUrl);
|
aTab.setAttribute("image", sizedIconUrl);
|
||||||
|
@ -2702,7 +2699,7 @@
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
this.mProgressListeners =
|
this.mProgressListeners =
|
||||||
this.mProgressListeners.filter(function (l) l != aListener);
|
this.mProgressListeners.filter(l => l != aListener);
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
|
@ -2719,7 +2716,7 @@
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
this.mTabsProgressListeners =
|
this.mTabsProgressListeners =
|
||||||
this.mTabsProgressListeners.filter(function (l) l != aListener);
|
this.mTabsProgressListeners.filter(l => l != aListener);
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
|
@ -2833,7 +2830,7 @@
|
||||||
<getter>
|
<getter>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
return this._browsers ||
|
return this._browsers ||
|
||||||
(this._browsers = Array.map(this.tabs, function (tab) tab.linkedBrowser));
|
(this._browsers = Array.map(this.tabs, tab => tab.linkedBrowser));
|
||||||
]]>
|
]]>
|
||||||
</getter>
|
</getter>
|
||||||
</property>
|
</property>
|
||||||
|
@ -5522,7 +5519,9 @@
|
||||||
// positioned relative to the corner of the new window created upon
|
// positioned relative to the corner of the new window created upon
|
||||||
// dragend such that the mouse appears to have the same position
|
// dragend such that the mouse appears to have the same position
|
||||||
// relative to the corner of the dragged tab.
|
// relative to the corner of the dragged tab.
|
||||||
function clientX(ele) ele.getBoundingClientRect().left;
|
function clientX(ele) {
|
||||||
|
return ele.getBoundingClientRect().left;
|
||||||
|
}
|
||||||
let tabOffsetX = clientX(tab) - clientX(this);
|
let tabOffsetX = clientX(tab) - clientX(this);
|
||||||
tab._dragData = {
|
tab._dragData = {
|
||||||
offsetX: event.screenX - window.screenX - tabOffsetX,
|
offsetX: event.screenX - window.screenX - tabOffsetX,
|
||||||
|
|
|
@ -37,8 +37,7 @@ add_task(function* () {
|
||||||
|
|
||||||
let result = gURLBar.popup.richlistbox.children[0];
|
let result = gURLBar.popup.richlistbox.children[0];
|
||||||
ok(result.hasAttribute("image"), "Result should have an image attribute");
|
ok(result.hasAttribute("image"), "Result should have an image attribute");
|
||||||
// Image attribute gets a suffix (-moz-resolution) added in the value.
|
ok(result.getAttribute("image") === engine.iconURI.spec,
|
||||||
ok(result.getAttribute("image").startsWith(engine.iconURI.spec),
|
|
||||||
"Image attribute should have the search engine's icon");
|
"Image attribute should have the search engine's icon");
|
||||||
|
|
||||||
EventUtils.synthesizeKey("VK_RETURN" , { });
|
EventUtils.synthesizeKey("VK_RETURN" , { });
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
var expected = ["TabOpen", "onStateChange", "onLocationChange", "onLinkIconAvailable"];
|
var expected = ["TabOpen", "onStateChange", "onLocationChange", "onLinkIconAvailable"];
|
||||||
var actual = [];
|
var actual = [];
|
||||||
var tabIndex = -1;
|
var tabIndex = -1;
|
||||||
this.__defineGetter__("tab", function () gBrowser.tabs[tabIndex]);
|
this.__defineGetter__("tab", () => gBrowser.tabs[tabIndex]);
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
|
|
|
@ -38,7 +38,7 @@ function test() {
|
||||||
gBrowser.removeTab(tabs.pop());
|
gBrowser.removeTab(tabs.pop());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
texts.forEach(function(aText) addTabWithText(aText));
|
texts.forEach(aText => addTabWithText(aText));
|
||||||
|
|
||||||
// Set up the first tab
|
// Set up the first tab
|
||||||
gBrowser.selectedTab = tabs[0];
|
gBrowser.selectedTab = tabs[0];
|
||||||
|
|
|
@ -6,7 +6,9 @@ function test() {
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
|
|
||||||
function testState(aPinned) {
|
function testState(aPinned) {
|
||||||
function elemAttr(id, attr) document.getElementById(id).getAttribute(attr);
|
function elemAttr(id, attr) {
|
||||||
|
return document.getElementById(id).getAttribute(attr);
|
||||||
|
}
|
||||||
|
|
||||||
if (aPinned) {
|
if (aPinned) {
|
||||||
is(elemAttr("key_close", "disabled"), "true",
|
is(elemAttr("key_close", "disabled"), "true",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
function numClosedTabs()
|
function numClosedTabs() {
|
||||||
SessionStore.getClosedTabCount(window);
|
return SessionStore.getClosedTabCount(window);
|
||||||
|
}
|
||||||
|
|
||||||
function isUndoCloseEnabled() {
|
function isUndoCloseEnabled() {
|
||||||
updateTabContextMenu();
|
updateTabContextMenu();
|
||||||
|
|
|
@ -21,7 +21,7 @@ function test() {
|
||||||
tab.linkedBrowser.removeEventListener("load", arguments.callee, true);
|
tab.linkedBrowser.removeEventListener("load", arguments.callee, true);
|
||||||
|
|
||||||
if (BookmarkingUI.status == BookmarkingUI.STATUS_UPDATING) {
|
if (BookmarkingUI.status == BookmarkingUI.STATUS_UPDATING) {
|
||||||
waitForCondition(function() BookmarkingUI.status != BookmarkingUI.STATUS_UPDATING, finishTest, "BookmarkingUI was updating for too long");
|
waitForCondition(() => BookmarkingUI.status != BookmarkingUI.STATUS_UPDATING, finishTest, "BookmarkingUI was updating for too long");
|
||||||
} else {
|
} else {
|
||||||
finishTest();
|
finishTest();
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ function testNavigation() {
|
||||||
|
|
||||||
function waitForNextTurn() {
|
function waitForNextTurn() {
|
||||||
let deferred = Promise.defer();
|
let deferred = Promise.defer();
|
||||||
setTimeout(function () deferred.resolve(), 0);
|
setTimeout(() => deferred.resolve(), 0);
|
||||||
return deferred.promise;
|
return deferred.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ function test() {
|
||||||
// execute should only be called when need, like when you are opening
|
// execute should only be called when need, like when you are opening
|
||||||
// web pages on the test. If calling executeSoon() is not necesary, then
|
// web pages on the test. If calling executeSoon() is not necesary, then
|
||||||
// call whenNewWindowLoaded() instead of testOnWindow() on your test.
|
// call whenNewWindowLoaded() instead of testOnWindow() on your test.
|
||||||
executeSoon(function() aCallback(aWin));
|
executeSoon(() => aCallback(aWin));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ function test() {
|
||||||
|
|
||||||
function testOnWindow(aIsPrivate, aCallback) {
|
function testOnWindow(aIsPrivate, aCallback) {
|
||||||
whenNewWindowLoaded({private: aIsPrivate}, function(win) {
|
whenNewWindowLoaded({private: aIsPrivate}, function(win) {
|
||||||
executeSoon(function() aCallback(win));
|
executeSoon(() => aCallback(win));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ function MixedTest1A() {
|
||||||
gIdentityHandler.disableMixedContentProtection();
|
gIdentityHandler.disableMixedContentProtection();
|
||||||
}
|
}
|
||||||
function MixedTest1B() {
|
function MixedTest1B() {
|
||||||
waitForCondition(function() content.document.getElementById('p1').innerHTML == "hello", MixedTest1C, "Waited too long for mixed script to run in Test 1");
|
waitForCondition(() => content.document.getElementById('p1').innerHTML == "hello", MixedTest1C, "Waited too long for mixed script to run in Test 1");
|
||||||
}
|
}
|
||||||
function MixedTest1C() {
|
function MixedTest1C() {
|
||||||
ok(content.document.getElementById('p1').innerHTML == "hello","Mixed script didn't load in Test 1");
|
ok(content.document.getElementById('p1').innerHTML == "hello","Mixed script didn't load in Test 1");
|
||||||
|
@ -89,10 +89,10 @@ function MixedTest3A() {
|
||||||
gIdentityHandler.disableMixedContentProtection();
|
gIdentityHandler.disableMixedContentProtection();
|
||||||
}
|
}
|
||||||
function MixedTest3B() {
|
function MixedTest3B() {
|
||||||
waitForCondition(function() content.document.getElementById('p1').innerHTML == "hello", MixedTest3C, "Waited too long for mixed script to run in Test 3");
|
waitForCondition(() => content.document.getElementById('p1').innerHTML == "hello", MixedTest3C, "Waited too long for mixed script to run in Test 3");
|
||||||
}
|
}
|
||||||
function MixedTest3C() {
|
function MixedTest3C() {
|
||||||
waitForCondition(function() content.document.getElementById('p2').innerHTML == "bye", MixedTest3D, "Waited too long for mixed image to load in Test 3");
|
waitForCondition(() => content.document.getElementById('p2').innerHTML == "bye", MixedTest3D, "Waited too long for mixed image to load in Test 3");
|
||||||
}
|
}
|
||||||
function MixedTest3D() {
|
function MixedTest3D() {
|
||||||
ok(content.document.getElementById('p1').innerHTML == "hello","Mixed script didn't load in Test 3");
|
ok(content.document.getElementById('p1').innerHTML == "hello","Mixed script didn't load in Test 3");
|
||||||
|
@ -118,7 +118,7 @@ function MixedTest4A() {
|
||||||
gIdentityHandler.disableMixedContentProtection();
|
gIdentityHandler.disableMixedContentProtection();
|
||||||
}
|
}
|
||||||
function MixedTest4B() {
|
function MixedTest4B() {
|
||||||
waitForCondition(function() content.document.location == gHttpTestRoot + "file_bug822367_4B.html", MixedTest4C, "Waited too long for mixed script to run in Test 4");
|
waitForCondition(() => content.document.location == gHttpTestRoot + "file_bug822367_4B.html", MixedTest4C, "Waited too long for mixed script to run in Test 4");
|
||||||
}
|
}
|
||||||
function MixedTest4C() {
|
function MixedTest4C() {
|
||||||
ok(content.document.location == gHttpTestRoot + "file_bug822367_4B.html", "Location didn't change in test 4");
|
ok(content.document.location == gHttpTestRoot + "file_bug822367_4B.html", "Location didn't change in test 4");
|
||||||
|
@ -126,7 +126,7 @@ function MixedTest4C() {
|
||||||
assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
|
assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
|
||||||
|
|
||||||
let {gIdentityHandler} = gTestBrowser.ownerGlobal;
|
let {gIdentityHandler} = gTestBrowser.ownerGlobal;
|
||||||
waitForCondition(function() content.document.getElementById('p1').innerHTML == "", MixedTest4D, "Mixed script loaded in test 4 after location change!");
|
waitForCondition(() => content.document.getElementById('p1').innerHTML == "", MixedTest4D, "Mixed script loaded in test 4 after location change!");
|
||||||
}
|
}
|
||||||
function MixedTest4D() {
|
function MixedTest4D() {
|
||||||
ok(content.document.getElementById('p1').innerHTML == "","p1.innerHTML changed; mixed script loaded after location change in Test 4");
|
ok(content.document.getElementById('p1').innerHTML == "","p1.innerHTML changed; mixed script loaded after location change in Test 4");
|
||||||
|
@ -150,7 +150,7 @@ function MixedTest5A() {
|
||||||
gIdentityHandler.disableMixedContentProtection();
|
gIdentityHandler.disableMixedContentProtection();
|
||||||
}
|
}
|
||||||
function MixedTest5B() {
|
function MixedTest5B() {
|
||||||
waitForCondition(function() content.document.getElementById('p1').innerHTML == "hello", MixedTest5C, "Waited too long for mixed script to run in Test 5");
|
waitForCondition(() => content.document.getElementById('p1').innerHTML == "hello", MixedTest5C, "Waited too long for mixed script to run in Test 5");
|
||||||
}
|
}
|
||||||
function MixedTest5C() {
|
function MixedTest5C() {
|
||||||
ok(content.document.getElementById('p1').innerHTML == "hello","Mixed script didn't load in Test 5");
|
ok(content.document.getElementById('p1').innerHTML == "hello","Mixed script didn't load in Test 5");
|
||||||
|
|
|
@ -60,7 +60,7 @@ function test1A() {
|
||||||
function test1B() {
|
function test1B() {
|
||||||
var expected = "Mixed Content Blocker disabled";
|
var expected = "Mixed Content Blocker disabled";
|
||||||
waitForCondition(
|
waitForCondition(
|
||||||
function() content.document.getElementById('mctestdiv').innerHTML == expected,
|
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||||
test1C, "Error: Waited too long for mixed script to run in Test 1B");
|
test1C, "Error: Waited too long for mixed script to run in Test 1B");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ function test2A() {
|
||||||
function test2B() {
|
function test2B() {
|
||||||
var expected = "Mixed Content Blocker disabled";
|
var expected = "Mixed Content Blocker disabled";
|
||||||
waitForCondition(
|
waitForCondition(
|
||||||
function() content.document.getElementById('mctestdiv').innerHTML == expected,
|
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||||
test2C, "Error: Waited too long for mixed script to run in Test 2B");
|
test2C, "Error: Waited too long for mixed script to run in Test 2B");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ function checkPopUpNotification() {
|
||||||
function reloadedTabAfterDisablingMCB() {
|
function reloadedTabAfterDisablingMCB() {
|
||||||
var expected = "Mixed Content Blocker disabled";
|
var expected = "Mixed Content Blocker disabled";
|
||||||
waitForCondition(
|
waitForCondition(
|
||||||
function() gTestWin.content.document.getElementById('mctestdiv').innerHTML == expected,
|
() => gTestWin.content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||||
makeSureMCBisDisabled, "Error: Waited too long for mixed script to run in " + curTestName + "!");
|
makeSureMCBisDisabled, "Error: Waited too long for mixed script to run in " + curTestName + "!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -218,7 +218,7 @@ var gClickHandler = {
|
||||||
|
|
||||||
if (gInvokedMethods.length != gCurrentTest.expectedInvokedMethods.length) {
|
if (gInvokedMethods.length != gCurrentTest.expectedInvokedMethods.length) {
|
||||||
ok(false, "Wrong number of invoked methods");
|
ok(false, "Wrong number of invoked methods");
|
||||||
gInvokedMethods.forEach(function (method) info(method + " was invoked"));
|
gInvokedMethods.forEach(method => info(method + " was invoked"));
|
||||||
}
|
}
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
|
@ -90,14 +90,17 @@ function test() {
|
||||||
|
|
||||||
/* private utility functions */
|
/* private utility functions */
|
||||||
|
|
||||||
function pressCtrlTab(aShiftKey)
|
function pressCtrlTab(aShiftKey) {
|
||||||
EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true, shiftKey: !!aShiftKey });
|
EventUtils.synthesizeKey("VK_TAB", { ctrlKey: true, shiftKey: !!aShiftKey });
|
||||||
|
}
|
||||||
|
|
||||||
function releaseCtrl()
|
function releaseCtrl() {
|
||||||
EventUtils.synthesizeKey("VK_CONTROL", { type: "keyup" });
|
EventUtils.synthesizeKey("VK_CONTROL", { type: "keyup" });
|
||||||
|
}
|
||||||
|
|
||||||
function isOpen()
|
function isOpen() {
|
||||||
ctrlTab.isOpen;
|
return ctrlTab.isOpen;
|
||||||
|
}
|
||||||
|
|
||||||
function checkTabs(aTabs) {
|
function checkTabs(aTabs) {
|
||||||
var tabs = gBrowser.tabs.length;
|
var tabs = gBrowser.tabs.length;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
var browser;
|
var browser;
|
||||||
|
|
||||||
function doc() browser.contentDocument;
|
function doc() {
|
||||||
|
return browser.contentDocument;
|
||||||
|
}
|
||||||
|
|
||||||
function setHandlerFunc(aResultFunc) {
|
function setHandlerFunc(aResultFunc) {
|
||||||
gBrowser.addEventListener("DOMLinkAdded", function (event) {
|
gBrowser.addEventListener("DOMLinkAdded", function (event) {
|
||||||
|
|
|
@ -283,7 +283,7 @@ function test_emitLatchedEvents(eventPrefix, initialDelta, cmd)
|
||||||
for (let dir in cmd)
|
for (let dir in cmd)
|
||||||
cmd[dir].callCount = expect[dir] = 0;
|
cmd[dir].callCount = expect[dir] = 0;
|
||||||
|
|
||||||
let check = function(aDir, aMsg) ok(cmd[aDir].callCount == expect[aDir], aMsg);
|
let check = (aDir, aMsg) => ok(cmd[aDir].callCount == expect[aDir], aMsg);
|
||||||
let checkBoth = function(aNum, aInc, aDec) {
|
let checkBoth = function(aNum, aInc, aDec) {
|
||||||
let prefix = "Step " + aNum + ": ";
|
let prefix = "Step " + aNum + ": ";
|
||||||
check("inc", prefix + aInc);
|
check("inc", prefix + aInc);
|
||||||
|
|
|
@ -24,12 +24,16 @@ function test() {
|
||||||
gBrowser.removeTab(testTab, {animate: true});
|
gBrowser.removeTab(testTab, {animate: true});
|
||||||
|
|
||||||
// Make sure the tab gets removed at the end of the animation by polling
|
// Make sure the tab gets removed at the end of the animation by polling
|
||||||
(function checkRemoved() setTimeout(function() {
|
(function checkRemoved() {
|
||||||
if (gBrowser.tabs.length != 1)
|
return setTimeout(function() {
|
||||||
return checkRemoved();
|
if (gBrowser.tabs.length != 1) {
|
||||||
|
checkRemoved();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
is(numVisBeforeHide, 1, "animated remove has in 1 tab left");
|
is(numVisBeforeHide, 1, "animated remove has in 1 tab left");
|
||||||
is(numVisAfterHide, 1, "hiding a removing tab is also has 1 tab");
|
is(numVisAfterHide, 1, "hiding a removing tab is also has 1 tab");
|
||||||
finish();
|
finish();
|
||||||
}, 50))();
|
}, 50);
|
||||||
|
})();
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ function checkUIForTest1() {
|
||||||
|
|
||||||
var expected = "script blocked";
|
var expected = "script blocked";
|
||||||
waitForCondition(
|
waitForCondition(
|
||||||
function() content.document.getElementById('mctestdiv').innerHTML == expected,
|
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||||
test2, "Error: Waited too long for status in Test 1!",
|
test2, "Error: Waited too long for status in Test 1!",
|
||||||
"OK: Expected result in innerHTML for Test1!");
|
"OK: Expected result in innerHTML for Test1!");
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ function checkUIForTest2() {
|
||||||
|
|
||||||
var expected = "script executed";
|
var expected = "script executed";
|
||||||
waitForCondition(
|
waitForCondition(
|
||||||
function() content.document.getElementById('mctestdiv').innerHTML == expected,
|
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||||
test3, "Error: Waited too long for status in Test 2!",
|
test3, "Error: Waited too long for status in Test 2!",
|
||||||
"OK: Expected result in innerHTML for Test2!");
|
"OK: Expected result in innerHTML for Test2!");
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ function checkLoadEventForTest3() {
|
||||||
|
|
||||||
var expected = "image blocked"
|
var expected = "image blocked"
|
||||||
waitForCondition(
|
waitForCondition(
|
||||||
function() content.document.getElementById('mctestdiv').innerHTML == expected,
|
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||||
test4, "Error: Waited too long for status in Test 3!",
|
test4, "Error: Waited too long for status in Test 3!",
|
||||||
"OK: Expected result in innerHTML for Test3!");
|
"OK: Expected result in innerHTML for Test3!");
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,7 @@ function checkLoadEventForTest4() {
|
||||||
|
|
||||||
var expected = "image loaded"
|
var expected = "image loaded"
|
||||||
waitForCondition(
|
waitForCondition(
|
||||||
function() content.document.getElementById('mctestdiv').innerHTML == expected,
|
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||||
test5, "Error: Waited too long for status in Test 4!",
|
test5, "Error: Waited too long for status in Test 4!",
|
||||||
"OK: Expected result in innerHTML for Test4!");
|
"OK: Expected result in innerHTML for Test4!");
|
||||||
}
|
}
|
||||||
|
@ -191,7 +191,7 @@ function checkLoadEventForTest5() {
|
||||||
|
|
||||||
var expected = "image loaded"
|
var expected = "image loaded"
|
||||||
waitForCondition(
|
waitForCondition(
|
||||||
function() content.document.getElementById('mctestdiv').innerHTML == expected,
|
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||||
test6, "Error: Waited too long for status in Test 5!",
|
test6, "Error: Waited too long for status in Test 5!",
|
||||||
"OK: Expected result in innerHTML for Test5!");
|
"OK: Expected result in innerHTML for Test5!");
|
||||||
// Go back online
|
// Go back online
|
||||||
|
@ -216,7 +216,7 @@ function checkLoadEventForTest6() {
|
||||||
|
|
||||||
var expected = "image blocked"
|
var expected = "image blocked"
|
||||||
waitForCondition(
|
waitForCondition(
|
||||||
function() content.document.getElementById('mctestdiv').innerHTML == expected,
|
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||||
test7, "Error: Waited too long for status in Test 6!",
|
test7, "Error: Waited too long for status in Test 6!",
|
||||||
"OK: Expected result in innerHTML for Test6!");
|
"OK: Expected result in innerHTML for Test6!");
|
||||||
// Go back online
|
// Go back online
|
||||||
|
@ -236,7 +236,7 @@ function checkLoadEventForTest7() {
|
||||||
|
|
||||||
var expected = "image loaded"
|
var expected = "image loaded"
|
||||||
waitForCondition(
|
waitForCondition(
|
||||||
function() content.document.getElementById('mctestdiv').innerHTML == expected,
|
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||||
test8, "Error: Waited too long for status in Test 7!",
|
test8, "Error: Waited too long for status in Test 7!",
|
||||||
"OK: Expected result in innerHTML for Test7!");
|
"OK: Expected result in innerHTML for Test7!");
|
||||||
}
|
}
|
||||||
|
@ -259,7 +259,7 @@ function checkLoadEventForTest8() {
|
||||||
|
|
||||||
var expected = "image loaded"
|
var expected = "image loaded"
|
||||||
waitForCondition(
|
waitForCondition(
|
||||||
function() content.document.getElementById('mctestdiv').innerHTML == expected,
|
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||||
test9, "Error: Waited too long for status in Test 8!",
|
test9, "Error: Waited too long for status in Test 8!",
|
||||||
"OK: Expected result in innerHTML for Test8!");
|
"OK: Expected result in innerHTML for Test8!");
|
||||||
// Go back online
|
// Go back online
|
||||||
|
@ -284,7 +284,7 @@ function checkLoadEventForTest9() {
|
||||||
|
|
||||||
var expected = "image blocked"
|
var expected = "image blocked"
|
||||||
waitForCondition(
|
waitForCondition(
|
||||||
function() content.document.getElementById('mctestdiv').innerHTML == expected,
|
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||||
cleanUpAfterTests, "Error: Waited too long for status in Test 9!",
|
cleanUpAfterTests, "Error: Waited too long for status in Test 9!",
|
||||||
"OK: Expected result in innerHTML for Test9!");
|
"OK: Expected result in innerHTML for Test9!");
|
||||||
// Go back online
|
// Go back online
|
||||||
|
|
|
@ -69,7 +69,7 @@ function test1A() {
|
||||||
var expected = "Verifying MCB does not trigger warning/error for an http page ";
|
var expected = "Verifying MCB does not trigger warning/error for an http page ";
|
||||||
expected += "with https css that includes http image";
|
expected += "with https css that includes http image";
|
||||||
waitForCondition(
|
waitForCondition(
|
||||||
function() content.document.getElementById('testDiv').innerHTML == expected,
|
() => content.document.getElementById('testDiv').innerHTML == expected,
|
||||||
test1B, "Error: Waited too long for status in Test 1!",
|
test1B, "Error: Waited too long for status in Test 1!",
|
||||||
"OK: Expected result in innerHTML!");
|
"OK: Expected result in innerHTML!");
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ function test2A() {
|
||||||
var expected = "Verifying MCB does not trigger warning/error for an http page ";
|
var expected = "Verifying MCB does not trigger warning/error for an http page ";
|
||||||
expected += "with https css that includes http font";
|
expected += "with https css that includes http font";
|
||||||
waitForCondition(
|
waitForCondition(
|
||||||
function() content.document.getElementById('testDiv').innerHTML == expected,
|
() => content.document.getElementById('testDiv').innerHTML == expected,
|
||||||
test2B, "Error: Waited too long for status in Test 2!",
|
test2B, "Error: Waited too long for status in Test 2!",
|
||||||
"OK: Expected result in innerHTML!");
|
"OK: Expected result in innerHTML!");
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ function test3() {
|
||||||
var expected = "Verifying MCB does not trigger warning/error for an http page "
|
var expected = "Verifying MCB does not trigger warning/error for an http page "
|
||||||
expected += "with https css that imports another http css which includes http font";
|
expected += "with https css that imports another http css which includes http font";
|
||||||
waitForCondition(
|
waitForCondition(
|
||||||
function() content.document.getElementById('testDiv').innerHTML == expected,
|
() => content.document.getElementById('testDiv').innerHTML == expected,
|
||||||
cleanUpAfterTests, "Error: Waited too long for status in Test 3!",
|
cleanUpAfterTests, "Error: Waited too long for status in Test 3!",
|
||||||
"OK: Expected result in innerHTML!");
|
"OK: Expected result in innerHTML!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,16 +3,16 @@ var scrollbox = tabstrip._scrollbox;
|
||||||
var originalSmoothScroll = tabstrip.smoothScroll;
|
var originalSmoothScroll = tabstrip.smoothScroll;
|
||||||
var tabs = gBrowser.tabs;
|
var tabs = gBrowser.tabs;
|
||||||
|
|
||||||
function rect(ele) ele.getBoundingClientRect();
|
let rect = ele => ele.getBoundingClientRect();
|
||||||
function width(ele) rect(ele).width;
|
let width = ele => rect(ele).width;
|
||||||
function left(ele) rect(ele).left;
|
let left = ele => rect(ele).left;
|
||||||
function right(ele) rect(ele).right;
|
let right = ele => rect(ele).right;
|
||||||
function isLeft(ele, msg) is(left(ele) + tabstrip._tabMarginLeft, left(scrollbox), msg);
|
let isLeft = (ele, msg) => is(left(ele) + tabstrip._tabMarginLeft, left(scrollbox), msg);
|
||||||
function isRight(ele, msg) is(right(ele) - tabstrip._tabMarginRight, right(scrollbox), msg);
|
let isRight = (ele, msg) => is(right(ele) - tabstrip._tabMarginRight, right(scrollbox), msg);
|
||||||
function elementFromPoint(x) tabstrip._elementFromPoint(x);
|
let elementFromPoint = x => tabstrip._elementFromPoint(x);
|
||||||
function nextLeftElement() elementFromPoint(left(scrollbox) - 1);
|
let nextLeftElement = () => elementFromPoint(left(scrollbox) - 1);
|
||||||
function nextRightElement() elementFromPoint(right(scrollbox) + 1);
|
let nextRightElement = () => elementFromPoint(right(scrollbox) + 1);
|
||||||
function firstScrollable() tabs[gBrowser._numPinnedTabs];
|
let firstScrollable = () => tabs[gBrowser._numPinnedTabs];
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
requestLongerTimeout(2);
|
requestLongerTimeout(2);
|
||||||
|
|
|
@ -32,7 +32,7 @@ function checkPageStyleMenu() {
|
||||||
" with rel=\"" + rel + "\"" +
|
" with rel=\"" + rel + "\"" +
|
||||||
(media ? " and media=\"" + media + "\"" : "");
|
(media ? " and media=\"" + media + "\"" : "");
|
||||||
|
|
||||||
var item = items.filter(function (item) item.getAttribute("label") == title);
|
var item = items.filter(item => item.getAttribute("label") == title);
|
||||||
var found = item.length == 1;
|
var found = item.length == 1;
|
||||||
var checked = found && (item[0].getAttribute("checked") == "true");
|
var checked = found && (item[0].getAttribute("checked") == "true");
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
var tabs;
|
var tabs;
|
||||||
|
|
||||||
function index(tab) Array.indexOf(gBrowser.tabs, tab);
|
function index(tab) {
|
||||||
|
return Array.indexOf(gBrowser.tabs, tab);
|
||||||
|
}
|
||||||
|
|
||||||
function indexTest(tab, expectedIndex, msg) {
|
function indexTest(tab, expectedIndex, msg) {
|
||||||
var diag = "tab " + tab + " should be at index " + expectedIndex;
|
var diag = "tab " + tab + " should be at index " + expectedIndex;
|
||||||
|
|
|
@ -59,7 +59,7 @@ function countEntries(name, message, check) {
|
||||||
obj.fieldname = name;
|
obj.fieldname = name;
|
||||||
|
|
||||||
let count;
|
let count;
|
||||||
FormHistory.count(obj, { handleResult: function (result) count = result,
|
FormHistory.count(obj, { handleResult: result => count = result,
|
||||||
handleError: function (error) {
|
handleError: function (error) {
|
||||||
do_throw("Error occurred searching form history: " + error);
|
do_throw("Error occurred searching form history: " + error);
|
||||||
deferred.reject(error)
|
deferred.reject(error)
|
||||||
|
@ -472,9 +472,9 @@ function setupHistory() {
|
||||||
addPlace(makeURI("http://before-today.com/"), "Before Today", lastYear.getTime() * 1000);
|
addPlace(makeURI("http://before-today.com/"), "Before Today", lastYear.getTime() * 1000);
|
||||||
|
|
||||||
PlacesUtils.asyncHistory.updatePlaces(places, {
|
PlacesUtils.asyncHistory.updatePlaces(places, {
|
||||||
handleError: function () ok(false, "Unexpected error in adding visit."),
|
handleError: () => ok(false, "Unexpected error in adding visit."),
|
||||||
handleResult: function () { },
|
handleResult: () => { },
|
||||||
handleCompletion: function () deferred.resolve()
|
handleCompletion: () => deferred.resolve()
|
||||||
});
|
});
|
||||||
|
|
||||||
return deferred.promise;
|
return deferred.promise;
|
||||||
|
@ -486,7 +486,7 @@ function setupFormHistory() {
|
||||||
let deferred = Promise.defer();
|
let deferred = Promise.defer();
|
||||||
|
|
||||||
let results = [];
|
let results = [];
|
||||||
FormHistory.search(terms, params, { handleResult: function (result) results.push(result),
|
FormHistory.search(terms, params, { handleResult: result => results.push(result),
|
||||||
handleError: function (error) {
|
handleError: function (error) {
|
||||||
do_throw("Error occurred searching form history: " + error);
|
do_throw("Error occurred searching form history: " + error);
|
||||||
deferred.reject(error);
|
deferred.reject(error);
|
||||||
|
|
|
@ -977,7 +977,7 @@ function formNameExists(name)
|
||||||
|
|
||||||
let count = 0;
|
let count = 0;
|
||||||
FormHistory.count({ fieldname: name },
|
FormHistory.count({ fieldname: name },
|
||||||
{ handleResult: function (result) count = result,
|
{ handleResult: result => count = result,
|
||||||
handleError: function (error) {
|
handleError: function (error) {
|
||||||
do_throw("Error occurred searching form history: " + error);
|
do_throw("Error occurred searching form history: " + error);
|
||||||
deferred.reject(error);
|
deferred.reject(error);
|
||||||
|
|
|
@ -80,7 +80,7 @@ function triggerSave(aWindow, aCallback) {
|
||||||
ok(downloadSuccess, "Link should have been downloaded successfully");
|
ok(downloadSuccess, "Link should have been downloaded successfully");
|
||||||
aWindow.close();
|
aWindow.close();
|
||||||
|
|
||||||
executeSoon(function() aCallback());
|
executeSoon(() => aCallback());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ function test() {
|
||||||
// execute should only be called when need, like when you are opening
|
// execute should only be called when need, like when you are opening
|
||||||
// web pages on the test. If calling executeSoon() is not necesary, then
|
// web pages on the test. If calling executeSoon() is not necesary, then
|
||||||
// call whenNewWindowLoaded() instead of testOnWindow() on your test.
|
// call whenNewWindowLoaded() instead of testOnWindow() on your test.
|
||||||
executeSoon(function() aCallback(aWin));
|
executeSoon(() => aCallback(aWin));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -221,7 +221,7 @@ function checkAutocompleteResults(aExpected, aCallback)
|
||||||
},
|
},
|
||||||
setSelectedIndex: function() {},
|
setSelectedIndex: function() {},
|
||||||
get searchCount() { return this.searches.length; },
|
get searchCount() { return this.searches.length; },
|
||||||
getSearchAt: function(aIndex) this.searches[aIndex],
|
getSearchAt: function(aIndex) { return this.searches[aIndex]; },
|
||||||
QueryInterface: XPCOMUtils.generateQI([
|
QueryInterface: XPCOMUtils.generateQI([
|
||||||
Ci.nsIAutoCompleteInput,
|
Ci.nsIAutoCompleteInput,
|
||||||
Ci.nsIAutoCompletePopup,
|
Ci.nsIAutoCompletePopup,
|
||||||
|
|
|
@ -12,7 +12,7 @@ function test() {
|
||||||
// execute should only be called when need, like when you are opening
|
// execute should only be called when need, like when you are opening
|
||||||
// web pages on the test. If calling executeSoon() is not necesary, then
|
// web pages on the test. If calling executeSoon() is not necesary, then
|
||||||
// call whenNewWindowLoaded() instead of testOnWindow() on your test.
|
// call whenNewWindowLoaded() instead of testOnWindow() on your test.
|
||||||
executeSoon(function() aCallback(aWin));
|
executeSoon(() => aCallback(aWin));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -206,7 +206,7 @@ add_task(function*() {
|
||||||
is(focused, "Focus is button2", "focusedElement in second browser after focus in unfocused tab");
|
is(focused, "Focus is button2", "focusedElement in second browser after focus in unfocused tab");
|
||||||
|
|
||||||
// When focus is in the tab bar, it should be retained there
|
// When focus is in the tab bar, it should be retained there
|
||||||
yield expectFocusShift(function () gBrowser.selectedTab.focus(),
|
yield expectFocusShift(() => gBrowser.selectedTab.focus(),
|
||||||
"main-window", "tab2", true,
|
"main-window", "tab2", true,
|
||||||
"focusing tab element");
|
"focusing tab element");
|
||||||
yield* expectFocusShiftAfterTabSwitch(tab1, "main-window", "tab1", true,
|
yield* expectFocusShiftAfterTabSwitch(tab1, "main-window", "tab1", true,
|
||||||
|
@ -233,7 +233,7 @@ add_task(function*() {
|
||||||
yield switchWaiter;
|
yield switchWaiter;
|
||||||
}
|
}
|
||||||
|
|
||||||
yield expectFocusShift(function () gBrowser.selectedTab.blur(),
|
yield expectFocusShift(() => gBrowser.selectedTab.blur(),
|
||||||
"main-window", null, true,
|
"main-window", null, true,
|
||||||
"blurring tab element");
|
"blurring tab element");
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ add_task(function*() {
|
||||||
// not clear what would be the focus in the browser
|
// not clear what would be the focus in the browser
|
||||||
focusElementInChild("button1", "focus");
|
focusElementInChild("button1", "focus");
|
||||||
|
|
||||||
yield expectFocusShift(function () gURLBar.focus(),
|
yield expectFocusShift(() => gURLBar.focus(),
|
||||||
"main-window", "urlbar", true,
|
"main-window", "urlbar", true,
|
||||||
"focusedWindow after url field focused");
|
"focusedWindow after url field focused");
|
||||||
focused = yield getFocusedElementForBrowser(browser1, true);
|
focused = yield getFocusedElementForBrowser(browser1, true);
|
||||||
|
@ -249,7 +249,7 @@ add_task(function*() {
|
||||||
focused = yield getFocusedElementForBrowser(browser2, true);
|
focused = yield getFocusedElementForBrowser(browser2, true);
|
||||||
is(focused, "Focus is button2", "focusedElement after url field focused, second browser");
|
is(focused, "Focus is button2", "focusedElement after url field focused, second browser");
|
||||||
|
|
||||||
yield expectFocusShift(function () gURLBar.blur(),
|
yield expectFocusShift(() => gURLBar.blur(),
|
||||||
"main-window", null, true,
|
"main-window", null, true,
|
||||||
"blurring url field");
|
"blurring url field");
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ add_task(function*() {
|
||||||
is(fm.getFocusedElementForWindow(window, false, focusedWindow), browser1, "focusedElement after blur in focused tab, parent");
|
is(fm.getFocusedElementForWindow(window, false, focusedWindow), browser1, "focusedElement after blur in focused tab, parent");
|
||||||
|
|
||||||
// blurring an non-focused url field should have no effect
|
// blurring an non-focused url field should have no effect
|
||||||
yield expectFocusShift(function () gURLBar.blur(),
|
yield expectFocusShift(() => gURLBar.blur(),
|
||||||
"window1", null, false,
|
"window1", null, false,
|
||||||
"after blur in unfocused url field");
|
"after blur in unfocused url field");
|
||||||
|
|
||||||
|
@ -289,7 +289,7 @@ add_task(function*() {
|
||||||
|
|
||||||
// clearing focus on the chrome window should switch the focus to the
|
// clearing focus on the chrome window should switch the focus to the
|
||||||
// chrome window
|
// chrome window
|
||||||
yield expectFocusShift(function () fm.clearFocus(window),
|
yield expectFocusShift(() => fm.clearFocus(window),
|
||||||
"main-window", null, true,
|
"main-window", null, true,
|
||||||
"after switch to chrome with no focused element");
|
"after switch to chrome with no focused element");
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@ add_task(function*() {
|
||||||
_browser_tabfocus_test_lastfocus = "urlbar";
|
_browser_tabfocus_test_lastfocus = "urlbar";
|
||||||
_browser_tabfocus_test_lastfocuswindow = "main-window";
|
_browser_tabfocus_test_lastfocuswindow = "main-window";
|
||||||
|
|
||||||
yield expectFocusShift(function () EventUtils.synthesizeKey("VK_F6", { }),
|
yield expectFocusShift(() => EventUtils.synthesizeKey("VK_F6", { }),
|
||||||
"window1", "html1",
|
"window1", "html1",
|
||||||
true, "switch document forward with f6");
|
true, "switch document forward with f6");
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ if (Services.appinfo.OS == "WINNT" || Services.appinfo.OS == "Darwin") {
|
||||||
// TabsInTitlebar._update causes a reflow on OS X and Windows trying to do calculations
|
// TabsInTitlebar._update causes a reflow on OS X and Windows trying to do calculations
|
||||||
// since layout info is already dirty. This doesn't seem to happen before
|
// since layout info is already dirty. This doesn't seem to happen before
|
||||||
// MozAfterPaint on Linux.
|
// MozAfterPaint on Linux.
|
||||||
EXPECTED_REFLOWS.push("rect@chrome://browser/content/browser.js|" +
|
EXPECTED_REFLOWS.push("TabsInTitlebar._update/rect@chrome://browser/content/browser.js|" +
|
||||||
"TabsInTitlebar._update@chrome://browser/content/browser.js|" +
|
"TabsInTitlebar._update@chrome://browser/content/browser.js|" +
|
||||||
"updateAppearance@chrome://browser/content/browser.js|" +
|
"updateAppearance@chrome://browser/content/browser.js|" +
|
||||||
"handleEvent@chrome://browser/content/tabbrowser.xml|");
|
"handleEvent@chrome://browser/content/tabbrowser.xml|");
|
||||||
|
|
|
@ -46,7 +46,7 @@ function promiseAddFakeVisits() {
|
||||||
};
|
};
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
PlacesUtils.asyncHistory.updatePlaces(place, {
|
PlacesUtils.asyncHistory.updatePlaces(place, {
|
||||||
handleError: function () reject(new Error("Couldn't add visit")),
|
handleError: () => reject(new Error("Couldn't add visit")),
|
||||||
handleResult: function () {},
|
handleResult: function () {},
|
||||||
handleCompletion: function () {
|
handleCompletion: function () {
|
||||||
NewTabUtils.links.populateCache(function () {
|
NewTabUtils.links.populateCache(function () {
|
||||||
|
|
|
@ -310,7 +310,7 @@ function fillHistory(aLinks, aCallback = TestRunner.next) {
|
||||||
};
|
};
|
||||||
|
|
||||||
PlacesUtils.asyncHistory.updatePlaces(place, {
|
PlacesUtils.asyncHistory.updatePlaces(place, {
|
||||||
handleError: function () ok(false, "couldn't add visit to history"),
|
handleError: () => ok(false, "couldn't add visit to history"),
|
||||||
handleResult: function () {},
|
handleResult: function () {},
|
||||||
handleCompletion: function () {
|
handleCompletion: function () {
|
||||||
if (--numLinks == 0 && aCallback)
|
if (--numLinks == 0 && aCallback)
|
||||||
|
|
|
@ -68,7 +68,7 @@ add_task(function* () {
|
||||||
yield promise;
|
yield promise;
|
||||||
|
|
||||||
// Simulate clicking the "Allow Always" button.
|
// Simulate clicking the "Allow Always" button.
|
||||||
let condition = function() !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed &&
|
let condition = () => !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed &&
|
||||||
PopupNotifications.panel.firstChild;
|
PopupNotifications.panel.firstChild;
|
||||||
yield promiseForCondition(condition);
|
yield promiseForCondition(condition);
|
||||||
PopupNotifications.panel.firstChild._primaryButton.click();
|
PopupNotifications.panel.firstChild._primaryButton.click();
|
||||||
|
@ -185,7 +185,7 @@ add_task(function* () {
|
||||||
yield promise;
|
yield promise;
|
||||||
|
|
||||||
// Simulate clicking the "Allow Always" button.
|
// Simulate clicking the "Allow Always" button.
|
||||||
let condition = function() !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed &&
|
let condition = () => !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed &&
|
||||||
PopupNotifications.panel.firstChild;
|
PopupNotifications.panel.firstChild;
|
||||||
yield promiseForCondition(condition);
|
yield promiseForCondition(condition);
|
||||||
PopupNotifications.panel.firstChild._primaryButton.click();
|
PopupNotifications.panel.firstChild._primaryButton.click();
|
||||||
|
@ -243,7 +243,7 @@ add_task(function* () {
|
||||||
yield promise;
|
yield promise;
|
||||||
|
|
||||||
// Simulate clicking the "Allow Always" button.
|
// Simulate clicking the "Allow Always" button.
|
||||||
let condition = function() !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed &&
|
let condition = () => !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed &&
|
||||||
PopupNotifications.panel.firstChild;
|
PopupNotifications.panel.firstChild;
|
||||||
yield promiseForCondition(condition);
|
yield promiseForCondition(condition);
|
||||||
PopupNotifications.panel.firstChild._primaryButton.click();
|
PopupNotifications.panel.firstChild._primaryButton.click();
|
||||||
|
|
|
@ -83,7 +83,7 @@ add_task(function* () {
|
||||||
utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
|
utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
let condition = function() !PopupNotifications.getNotification("click-to-play-plugins", gNewWindow.gBrowser.selectedBrowser).dismissed && gNewWindow.PopupNotifications.panel.firstChild;
|
let condition = () => !PopupNotifications.getNotification("click-to-play-plugins", gNewWindow.gBrowser.selectedBrowser).dismissed && gNewWindow.PopupNotifications.panel.firstChild;
|
||||||
yield promiseForCondition(condition);
|
yield promiseForCondition(condition);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ add_task(function* () {
|
||||||
pluginInfo = yield promiseForPluginInfo("plugin");
|
pluginInfo = yield promiseForPluginInfo("plugin");
|
||||||
ok(!pluginInfo.activated, "1b plugin should not be activated");
|
ok(!pluginInfo.activated, "1b plugin should not be activated");
|
||||||
|
|
||||||
let condition = function() !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed &&
|
let condition = () => !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed &&
|
||||||
PopupNotifications.panel.firstChild;
|
PopupNotifications.panel.firstChild;
|
||||||
yield promiseForCondition(condition);
|
yield promiseForCondition(condition);
|
||||||
PopupNotifications.panel.firstChild._primaryButton.click();
|
PopupNotifications.panel.firstChild._primaryButton.click();
|
||||||
|
|
|
@ -239,7 +239,7 @@ add_task(function* () {
|
||||||
utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
|
utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
let condition = function() !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed;
|
let condition = () => !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed;
|
||||||
yield promiseForCondition(condition);
|
yield promiseForCondition(condition);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ add_task(function* () {
|
||||||
utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
|
utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
let condition = function() !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed;
|
let condition = () => !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed;
|
||||||
yield promiseForCondition(condition);
|
yield promiseForCondition(condition);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ add_task(function* () {
|
||||||
utils.sendMouseEvent("mouseup", 50, 50, 0, 1, 0, false, 0, 0);
|
utils.sendMouseEvent("mouseup", 50, 50, 0, 1, 0, false, 0, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
let condition = function() !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed &&
|
let condition = () => !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed &&
|
||||||
PopupNotifications.panel.firstChild;
|
PopupNotifications.panel.firstChild;
|
||||||
yield promiseForCondition(condition);
|
yield promiseForCondition(condition);
|
||||||
PopupNotifications.panel.firstChild._primaryButton.click();
|
PopupNotifications.panel.firstChild._primaryButton.click();
|
||||||
|
@ -379,7 +379,7 @@ add_task(function* () {
|
||||||
utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
|
utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
let condition = function() !notification.dismissed && !!PopupNotifications.panel.firstChild;
|
let condition = () => !notification.dismissed && !!PopupNotifications.panel.firstChild;
|
||||||
yield promiseForCondition(condition);
|
yield promiseForCondition(condition);
|
||||||
PopupNotifications.panel.firstChild._primaryButton.click();
|
PopupNotifications.panel.firstChild._primaryButton.click();
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ add_task(function* () {
|
||||||
let pluginInfo = yield promiseForPluginInfo("pluginone");
|
let pluginInfo = yield promiseForPluginInfo("pluginone");
|
||||||
ok(!pluginInfo.activated, "Test 8, test plugin should be activated");
|
ok(!pluginInfo.activated, "Test 8, test plugin should be activated");
|
||||||
|
|
||||||
let condition = function() !notification.dismissed &&
|
let condition = () => !notification.dismissed &&
|
||||||
PopupNotifications.panel.firstChild;
|
PopupNotifications.panel.firstChild;
|
||||||
yield promiseForCondition(condition);
|
yield promiseForCondition(condition);
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ function test2a() {
|
||||||
promiseShown.then(() => {
|
promiseShown.then(() => {
|
||||||
PopupNotifications.panel.firstChild._secondaryButton.click();
|
PopupNotifications.panel.firstChild._secondaryButton.click();
|
||||||
|
|
||||||
let condition = function() objLoadingContent.activated;
|
let condition = () => objLoadingContent.activated;
|
||||||
waitForCondition(condition, test2b, "Test 2a, Waited too long for plugin to activate");
|
waitForCondition(condition, test2b, "Test 2a, Waited too long for plugin to activate");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ function test3a() {
|
||||||
promiseShown.then(() => {
|
promiseShown.then(() => {
|
||||||
PopupNotifications.panel.firstChild._secondaryButton.click();
|
PopupNotifications.panel.firstChild._secondaryButton.click();
|
||||||
|
|
||||||
let condition = function() objLoadingContent.activated;
|
let condition = () => objLoadingContent.activated;
|
||||||
waitForCondition(condition, test3b, "Test 3a, Waited too long for plugin to activate");
|
waitForCondition(condition, test3b, "Test 3a, Waited too long for plugin to activate");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,12 +253,12 @@ var tests = {
|
||||||
let port1 = openChat(Social.providers[1], function() {
|
let port1 = openChat(Social.providers[1], function() {
|
||||||
let port2 = openChat(Social.providers[2], function() {
|
let port2 = openChat(Social.providers[2], function() {
|
||||||
let chats = document.getElementById("pinnedchats");
|
let chats = document.getElementById("pinnedchats");
|
||||||
waitForCondition(function() chats.children.length == Social.providers.length,
|
waitForCondition(() => chats.children.length == Social.providers.length,
|
||||||
function() {
|
function() {
|
||||||
ok(true, "one chat window per provider opened");
|
ok(true, "one chat window per provider opened");
|
||||||
// test logout of a single provider
|
// test logout of a single provider
|
||||||
port2.postMessage({topic: "test-logout"});
|
port2.postMessage({topic: "test-logout"});
|
||||||
waitForCondition(function() chats.children.length == Social.providers.length - 1,
|
waitForCondition(() => chats.children.length == Social.providers.length - 1,
|
||||||
function() {
|
function() {
|
||||||
Task.spawn(closeAllChats).then(next);
|
Task.spawn(closeAllChats).then(next);
|
||||||
},
|
},
|
||||||
|
@ -288,7 +288,7 @@ var tests = {
|
||||||
ok(true, "got a chat window opened");
|
ok(true, "got a chat window opened");
|
||||||
if (opened) {
|
if (opened) {
|
||||||
port.postMessage({topic: "test-logout"});
|
port.postMessage({topic: "test-logout"});
|
||||||
waitForCondition(function() document.getElementById("pinnedchats").firstChild == null,
|
waitForCondition(() => document.getElementById("pinnedchats").firstChild == null,
|
||||||
function() {
|
function() {
|
||||||
next();
|
next();
|
||||||
},
|
},
|
||||||
|
|
|
@ -35,7 +35,7 @@ function openChatViaWorkerMessage(port, data, callback) {
|
||||||
let chatbar = getChatBar();
|
let chatbar = getChatBar();
|
||||||
let numExpected = chatbar.childElementCount + 1;
|
let numExpected = chatbar.childElementCount + 1;
|
||||||
port.postMessage({topic: "test-worker-chat", data: data});
|
port.postMessage({topic: "test-worker-chat", data: data});
|
||||||
waitForCondition(function() chatbar.childElementCount == numExpected,
|
waitForCondition(() => chatbar.childElementCount == numExpected,
|
||||||
function() {
|
function() {
|
||||||
// so the child has been added, but we don't know if it
|
// so the child has been added, but we don't know if it
|
||||||
// has been intialized - re-request it and the callback
|
// has been intialized - re-request it and the callback
|
||||||
|
@ -107,7 +107,7 @@ function test() {
|
||||||
// tab.linkedBrowser.contentWindow.focus()
|
// tab.linkedBrowser.contentWindow.focus()
|
||||||
// but instead we must do:
|
// but instead we must do:
|
||||||
tab.linkedBrowser.contentDocument.getElementById("theinput").focus();
|
tab.linkedBrowser.contentDocument.getElementById("theinput").focus();
|
||||||
waitForCondition(function() isTabFocused(), cb, "tab should have focus");
|
waitForCondition(() => isTabFocused(), cb, "tab should have focus");
|
||||||
}
|
}
|
||||||
let postSubTest = function(cb) {
|
let postSubTest = function(cb) {
|
||||||
Task.spawn(closeAllChats).then(cb);
|
Task.spawn(closeAllChats).then(cb);
|
||||||
|
@ -144,7 +144,7 @@ var tests = {
|
||||||
ok(isTabFocused(), "tab should still be focused");
|
ok(isTabFocused(), "tab should still be focused");
|
||||||
// re-request the same chat via user event.
|
// re-request the same chat via user event.
|
||||||
openChatViaUser();
|
openChatViaUser();
|
||||||
waitForCondition(function() isChatFocused(chatbar.selectedChat),
|
waitForCondition(() => isChatFocused(chatbar.selectedChat),
|
||||||
function() {
|
function() {
|
||||||
is(chatbar.childElementCount, 1, "still exactly 1 chat open");
|
is(chatbar.childElementCount, 1, "still exactly 1 chat open");
|
||||||
is(chatbar.selectedChat, chatbar.firstElementChild, "chat should be selected");
|
is(chatbar.selectedChat, chatbar.firstElementChild, "chat should be selected");
|
||||||
|
@ -162,7 +162,7 @@ var tests = {
|
||||||
let chatbar = getChatBar();
|
let chatbar = getChatBar();
|
||||||
openChatViaUser();
|
openChatViaUser();
|
||||||
ok(chatbar.firstElementChild, "chat opened");
|
ok(chatbar.firstElementChild, "chat opened");
|
||||||
waitForCondition(function() isChatFocused(chatbar.selectedChat),
|
waitForCondition(() => isChatFocused(chatbar.selectedChat),
|
||||||
function() {
|
function() {
|
||||||
is(chatbar.selectedChat, chatbar.firstElementChild, "chat is selected");
|
is(chatbar.selectedChat, chatbar.firstElementChild, "chat is selected");
|
||||||
next();
|
next();
|
||||||
|
|
|
@ -134,7 +134,7 @@ var tests = {
|
||||||
function() { // the "load" callback.
|
function() { // the "load" callback.
|
||||||
todo_is(panelCallbackCount, 0, "Bug 833207 - should be no callback when error page loads.");
|
todo_is(panelCallbackCount, 0, "Bug 833207 - should be no callback when error page loads.");
|
||||||
let chat = getChatBar().selectedChat;
|
let chat = getChatBar().selectedChat;
|
||||||
waitForCondition(function() chat.content != null && chat.contentDocument.documentURI.indexOf("about:socialerror?mode=tryAgainOnly")==0,
|
waitForCondition(() => chat.content != null && chat.contentDocument.documentURI.indexOf("about:socialerror?mode=tryAgainOnly")==0,
|
||||||
function() {
|
function() {
|
||||||
chat.close();
|
chat.close();
|
||||||
next();
|
next();
|
||||||
|
@ -162,14 +162,14 @@ var tests = {
|
||||||
chat.swapWindows().then(
|
chat.swapWindows().then(
|
||||||
chat => {
|
chat => {
|
||||||
ok(!!chat.content, "we have chat content 1");
|
ok(!!chat.content, "we have chat content 1");
|
||||||
waitForCondition(function() chat.content != null && chat.contentDocument.readyState == "complete",
|
waitForCondition(() => chat.content != null && chat.contentDocument.readyState == "complete",
|
||||||
function() {
|
function() {
|
||||||
// now go offline and reload the chat - about:socialerror should be loaded.
|
// now go offline and reload the chat - about:socialerror should be loaded.
|
||||||
goOffline().then(function() {
|
goOffline().then(function() {
|
||||||
ok(!!chat.content, "we have chat content 2");
|
ok(!!chat.content, "we have chat content 2");
|
||||||
chat.contentDocument.location.reload();
|
chat.contentDocument.location.reload();
|
||||||
info("chat reload called");
|
info("chat reload called");
|
||||||
waitForCondition(function() chat.contentDocument.documentURI.indexOf("about:socialerror?mode=tryAgainOnly")==0,
|
waitForCondition(() => chat.contentDocument.documentURI.indexOf("about:socialerror?mode=tryAgainOnly")==0,
|
||||||
function() {
|
function() {
|
||||||
chat.close();
|
chat.close();
|
||||||
next();
|
next();
|
||||||
|
|
|
@ -157,7 +157,7 @@ var tests = {
|
||||||
EventUtils.synthesizeMouseAtCenter(btn, {});
|
EventUtils.synthesizeMouseAtCenter(btn, {});
|
||||||
// wait for the button to be marked, click to open panel
|
// wait for the button to be marked, click to open panel
|
||||||
is(btn.panel.state, "closed", "panel should not be visible yet");
|
is(btn.panel.state, "closed", "panel should not be visible yet");
|
||||||
waitForCondition(function() btn.isMarked, function() {
|
waitForCondition(() => btn.isMarked, function() {
|
||||||
EventUtils.synthesizeMouseAtCenter(btn, {});
|
EventUtils.synthesizeMouseAtCenter(btn, {});
|
||||||
}, "button is marked");
|
}, "button is marked");
|
||||||
break;
|
break;
|
||||||
|
@ -174,7 +174,7 @@ var tests = {
|
||||||
} else {
|
} else {
|
||||||
// page should no longer be marked
|
// page should no longer be marked
|
||||||
port.close();
|
port.close();
|
||||||
waitForCondition(function() !btn.isMarked, function() {
|
waitForCondition(() => !btn.isMarked, function() {
|
||||||
// cleanup after the page has been unmarked
|
// cleanup after the page has been unmarked
|
||||||
ensureBrowserTabClosed(tab).then(() => {
|
ensureBrowserTabClosed(tab).then(() => {
|
||||||
ok(btn.disabled, "button is disabled");
|
ok(btn.disabled, "button is disabled");
|
||||||
|
@ -245,7 +245,7 @@ var tests = {
|
||||||
ok(true, "test-init-done received");
|
ok(true, "test-init-done received");
|
||||||
ok(provider.profile.userName, "profile was set by test worker");
|
ok(provider.profile.userName, "profile was set by test worker");
|
||||||
port.postMessage({topic: "test-logout"});
|
port.postMessage({topic: "test-logout"});
|
||||||
waitForCondition(function() !provider.profile.userName,
|
waitForCondition(() => !provider.profile.userName,
|
||||||
function() {
|
function() {
|
||||||
// when the provider has not indicated to us that a user is
|
// when the provider has not indicated to us that a user is
|
||||||
// logged in, the first click opens the page.
|
// logged in, the first click opens the page.
|
||||||
|
@ -268,7 +268,7 @@ var tests = {
|
||||||
} else {
|
} else {
|
||||||
// page should no longer be marked
|
// page should no longer be marked
|
||||||
port.close();
|
port.close();
|
||||||
waitForCondition(function() !btn.isMarked, function() {
|
waitForCondition(() => !btn.isMarked, function() {
|
||||||
// cleanup after the page has been unmarked
|
// cleanup after the page has been unmarked
|
||||||
ensureBrowserTabClosed(tab).then(() => {
|
ensureBrowserTabClosed(tab).then(() => {
|
||||||
ok(btn.disabled, "button is disabled");
|
ok(btn.disabled, "button is disabled");
|
||||||
|
|
|
@ -52,7 +52,7 @@ var tests = {
|
||||||
oneWorkerTest(p);
|
oneWorkerTest(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
waitForCondition(function() messageReceived == Social.providers.length,
|
waitForCondition(() => messageReceived == Social.providers.length,
|
||||||
next, "received messages from all workers",
|
next, "received messages from all workers",
|
||||||
/* increase timeout because shutting down a child process is slow */ 60);
|
/* increase timeout because shutting down a child process is slow */ 60);
|
||||||
},
|
},
|
||||||
|
|
|
@ -96,7 +96,7 @@ var tests = {
|
||||||
SocialService.addProvider(manifest, function() {
|
SocialService.addProvider(manifest, function() {
|
||||||
SocialService.addProvider(manifest2, function (provider) {
|
SocialService.addProvider(manifest2, function (provider) {
|
||||||
SocialSidebar.show();
|
SocialSidebar.show();
|
||||||
waitForCondition(function() SocialSidebar.opened,
|
waitForCondition(() => SocialSidebar.opened,
|
||||||
function() {
|
function() {
|
||||||
ok(SocialSidebar.opened, "first window sidebar is open");
|
ok(SocialSidebar.opened, "first window sidebar is open");
|
||||||
openWindowAndWaitForInit(window, function(w1) {
|
openWindowAndWaitForInit(window, function(w1) {
|
||||||
|
@ -140,7 +140,7 @@ var tests = {
|
||||||
SocialService.addProvider(manifest, function() {
|
SocialService.addProvider(manifest, function() {
|
||||||
openWindowAndWaitForInit(window, function(w1) {
|
openWindowAndWaitForInit(window, function(w1) {
|
||||||
w1.SocialSidebar.show();
|
w1.SocialSidebar.show();
|
||||||
waitForCondition(function() w1.SocialSidebar.opened,
|
waitForCondition(() => w1.SocialSidebar.opened,
|
||||||
function() {
|
function() {
|
||||||
ok(Services.prefs.prefHasUserValue("social.sidebar.provider"), "global state set");
|
ok(Services.prefs.prefHasUserValue("social.sidebar.provider"), "global state set");
|
||||||
ok(!SocialSidebar.opened, "1. main sidebar is still closed");
|
ok(!SocialSidebar.opened, "1. main sidebar is still closed");
|
||||||
|
|
|
@ -154,7 +154,7 @@ function runSocialTestWithProvider(manifest, callback, finishcallback) {
|
||||||
registerCleanupFunction(function () {
|
registerCleanupFunction(function () {
|
||||||
finishSocialTest(true);
|
finishSocialTest(true);
|
||||||
});
|
});
|
||||||
waitForCondition(function() provider.enabled,
|
waitForCondition(() => provider.enabled,
|
||||||
function() {
|
function() {
|
||||||
info("provider has been enabled");
|
info("provider has been enabled");
|
||||||
callback(finishSocialTest);
|
callback(finishSocialTest);
|
||||||
|
@ -589,7 +589,7 @@ function resizeAndCheckWidths(first, second, third, checks, cb) {
|
||||||
checkPopup();
|
checkPopup();
|
||||||
ok(sizedOk, count+": window resized correctly");
|
ok(sizedOk, count+": window resized correctly");
|
||||||
function collapsedObserver(r, m) {
|
function collapsedObserver(r, m) {
|
||||||
if ([first, second, third].filter(function(item) !item.collapsed).length == numExpectedVisible) {
|
if ([first, second, third].filter(item => !item.collapsed).length == numExpectedVisible) {
|
||||||
if (m) {
|
if (m) {
|
||||||
m.disconnect();
|
m.disconnect();
|
||||||
}
|
}
|
||||||
|
|
|
@ -603,7 +603,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
// are hard to read when encoded
|
// are hard to read when encoded
|
||||||
if (!uri.schemeIs("javascript") && !uri.schemeIs("data")) {
|
if (!uri.schemeIs("javascript") && !uri.schemeIs("data")) {
|
||||||
// Parentheses are known to confuse third-party applications (bug 458565).
|
// Parentheses are known to confuse third-party applications (bug 458565).
|
||||||
selectedVal = uri.spec.replace(/[()]/g, function (c) escape(c));
|
selectedVal = uri.spec.replace(/[()]/g, c => escape(c));
|
||||||
}
|
}
|
||||||
|
|
||||||
return selectedVal;
|
return selectedVal;
|
||||||
|
|
|
@ -214,7 +214,7 @@ const CustomizableWidgets = [
|
||||||
onHistoryVisit(uri, aEvent, item);
|
onHistoryVisit(uri, aEvent, item);
|
||||||
});
|
});
|
||||||
if (icon) {
|
if (icon) {
|
||||||
let iconURL = PlacesUtils.getImageURLForResolution(win, "moz-anno:favicon:" + icon);
|
let iconURL = "moz-anno:favicon:" + icon;
|
||||||
item.setAttribute("image", iconURL);
|
item.setAttribute("image", iconURL);
|
||||||
}
|
}
|
||||||
fragment.appendChild(item);
|
fragment.appendChild(item);
|
||||||
|
|
|
@ -388,8 +388,7 @@ PlacesViewBase.prototype = {
|
||||||
|
|
||||||
let icon = aPlacesNode.icon;
|
let icon = aPlacesNode.icon;
|
||||||
if (icon)
|
if (icon)
|
||||||
element.setAttribute("image",
|
element.setAttribute("image", icon);
|
||||||
PlacesUtils.getImageURLForResolution(window, icon));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
element._placesNode = aPlacesNode;
|
element._placesNode = aPlacesNode;
|
||||||
|
@ -527,8 +526,7 @@ PlacesViewBase.prototype = {
|
||||||
if (!icon)
|
if (!icon)
|
||||||
elt.removeAttribute("image");
|
elt.removeAttribute("image");
|
||||||
else if (icon != elt.getAttribute("image"))
|
else if (icon != elt.getAttribute("image"))
|
||||||
elt.setAttribute("image",
|
elt.setAttribute("image", icon);
|
||||||
PlacesUtils.getImageURLForResolution(window, icon));
|
|
||||||
},
|
},
|
||||||
|
|
||||||
nodeAnnotationChanged:
|
nodeAnnotationChanged:
|
||||||
|
@ -1058,8 +1056,7 @@ PlacesToolbar.prototype = {
|
||||||
button.setAttribute("label", aChild.title || "");
|
button.setAttribute("label", aChild.title || "");
|
||||||
let icon = aChild.icon;
|
let icon = aChild.icon;
|
||||||
if (icon)
|
if (icon)
|
||||||
button.setAttribute("image",
|
button.setAttribute("image", icon);
|
||||||
PlacesUtils.getImageURLForResolution(window, icon));
|
|
||||||
|
|
||||||
if (PlacesUtils.containerTypes.indexOf(type) != -1) {
|
if (PlacesUtils.containerTypes.indexOf(type) != -1) {
|
||||||
button.setAttribute("type", "menu");
|
button.setAttribute("type", "menu");
|
||||||
|
@ -1886,8 +1883,7 @@ PlacesPanelMenuView.prototype = {
|
||||||
button.setAttribute("label", aChild.title || "");
|
button.setAttribute("label", aChild.title || "");
|
||||||
let icon = aChild.icon;
|
let icon = aChild.icon;
|
||||||
if (icon)
|
if (icon)
|
||||||
button.setAttribute("image",
|
button.setAttribute("image", icon);
|
||||||
PlacesUtils.getImageURLForResolution(window, icon));
|
|
||||||
|
|
||||||
if (PlacesUtils.containerTypes.indexOf(type) != -1) {
|
if (PlacesUtils.containerTypes.indexOf(type) != -1) {
|
||||||
button.setAttribute("container", "true");
|
button.setAttribute("container", "true");
|
||||||
|
|
|
@ -1414,9 +1414,6 @@ PlacesTreeView.prototype = {
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
let node = this._getNodeForRow(aRow);
|
let node = this._getNodeForRow(aRow);
|
||||||
if (PlacesUtils.nodeIsURI(node) && node.icon)
|
|
||||||
return PlacesUtils.getImageURLForResolution(window, node.icon);
|
|
||||||
|
|
||||||
return node.icon;
|
return node.icon;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
|
Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
|
||||||
Components.utils.import("resource://gre/modules/LoadContextInfo.jsm");
|
Components.utils.import("resource://gre/modules/LoadContextInfo.jsm");
|
||||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
Components.utils.import("resource://gre/modules/BrowserUtils.jsm");
|
|
||||||
|
|
||||||
var gAdvancedPane = {
|
var gAdvancedPane = {
|
||||||
_inited: false,
|
_inited: false,
|
||||||
|
@ -572,7 +571,7 @@ var gAdvancedPane = {
|
||||||
var list = document.getElementById("offlineAppsList");
|
var list = document.getElementById("offlineAppsList");
|
||||||
var item = list.selectedItem;
|
var item = list.selectedItem;
|
||||||
var origin = item.getAttribute("origin");
|
var origin = item.getAttribute("origin");
|
||||||
var principal = BrowserUtils.principalFromOrigin(origin);
|
var principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(origin);
|
||||||
|
|
||||||
var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||||
.getService(Components.interfaces.nsIPromptService);
|
.getService(Components.interfaces.nsIPromptService);
|
||||||
|
|
|
@ -116,8 +116,7 @@ var gSearchPane = {
|
||||||
let item = list.appendItem(e.name);
|
let item = list.appendItem(e.name);
|
||||||
item.setAttribute("class", "menuitem-iconic searchengine-menuitem menuitem-with-favicon");
|
item.setAttribute("class", "menuitem-iconic searchengine-menuitem menuitem-with-favicon");
|
||||||
if (e.iconURI) {
|
if (e.iconURI) {
|
||||||
let uri = PlacesUtils.getImageURLForResolution(window, e.iconURI.spec);
|
item.setAttribute("image", e.iconURI.spec);
|
||||||
item.setAttribute("image", uri);
|
|
||||||
}
|
}
|
||||||
item.engine = e;
|
item.engine = e;
|
||||||
if (e.name == currentEngine)
|
if (e.name == currentEngine)
|
||||||
|
@ -488,8 +487,7 @@ EngineView.prototype = {
|
||||||
|
|
||||||
getImageSrc: function(index, column) {
|
getImageSrc: function(index, column) {
|
||||||
if (column.id == "engineName" && this._engineStore.engines[index].iconURI) {
|
if (column.id == "engineName" && this._engineStore.engines[index].iconURI) {
|
||||||
let uri = this._engineStore.engines[index].iconURI.spec;
|
return this._engineStore.engines[index].iconURI.spec;
|
||||||
return PlacesUtils.getImageURLForResolution(window, uri);
|
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
},
|
},
|
||||||
|
|
|
@ -9,7 +9,6 @@ const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
||||||
|
|
||||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
Cu.import("resource://gre/modules/Services.jsm");
|
Cu.import("resource://gre/modules/Services.jsm");
|
||||||
Cu.import("resource://gre/modules/BrowserUtils.jsm");
|
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(this, "gLangBundle", () =>
|
XPCOMUtils.defineLazyGetter(this, "gLangBundle", () =>
|
||||||
Services.strings.createBundle("chrome://global/locale/languageNames.properties"));
|
Services.strings.createBundle("chrome://global/locale/languageNames.properties"));
|
||||||
|
@ -214,7 +213,7 @@ var gTranslationExceptions = {
|
||||||
onSiteDeleted: function() {
|
onSiteDeleted: function() {
|
||||||
let removedSites = this._siteTree.getSelectedItems();
|
let removedSites = this._siteTree.getSelectedItems();
|
||||||
for (let origin of removedSites) {
|
for (let origin of removedSites) {
|
||||||
let principal = BrowserUtils.principalFromOrigin(origin);
|
let principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(origin);
|
||||||
Services.perms.removeFromPrincipal(principal, kPermissionType);
|
Services.perms.removeFromPrincipal(principal, kPermissionType);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -227,7 +226,7 @@ var gTranslationExceptions = {
|
||||||
this._siteTree.boxObject.rowCountChanged(0, -removedSites.length);
|
this._siteTree.boxObject.rowCountChanged(0, -removedSites.length);
|
||||||
|
|
||||||
for (let origin of removedSites) {
|
for (let origin of removedSites) {
|
||||||
let principal = BrowserUtils.principalFromOrigin(origin);
|
let principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(origin);
|
||||||
Services.perms.removeFromPrincipal(principal, kPermissionType);
|
Services.perms.removeFromPrincipal(principal, kPermissionType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -265,9 +265,6 @@
|
||||||
<parameter name="element"/>
|
<parameter name="element"/>
|
||||||
<parameter name="uri"/>
|
<parameter name="uri"/>
|
||||||
<body><![CDATA[
|
<body><![CDATA[
|
||||||
if (uri) {
|
|
||||||
uri = this.PlacesUtils.getImageURLForResolution(window, uri);
|
|
||||||
}
|
|
||||||
element.setAttribute("src", uri);
|
element.setAttribute("src", uri);
|
||||||
]]></body>
|
]]></body>
|
||||||
</method>
|
</method>
|
||||||
|
@ -1091,8 +1088,7 @@
|
||||||
let currentEngine = Services.search.currentEngine;
|
let currentEngine = Services.search.currentEngine;
|
||||||
let uri = currentEngine.iconURI;
|
let uri = currentEngine.iconURI;
|
||||||
if (uri) {
|
if (uri) {
|
||||||
uri = uri.spec;
|
this.setAttribute("src", uri.spec);
|
||||||
this.setAttribute("src", PlacesUtils.getImageURLForResolution(window, uri));
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// If the default has just been changed to a provider without icon,
|
// If the default has just been changed to a provider without icon,
|
||||||
|
@ -1254,8 +1250,7 @@
|
||||||
button.setAttribute("tooltiptext", engine.uri);
|
button.setAttribute("tooltiptext", engine.uri);
|
||||||
button.setAttribute("uri", engine.uri);
|
button.setAttribute("uri", engine.uri);
|
||||||
if (engine.icon) {
|
if (engine.icon) {
|
||||||
let uri = PlacesUtils.getImageURLForResolution(window, engine.icon);
|
button.setAttribute("image", engine.icon);
|
||||||
button.setAttribute("image", uri);
|
|
||||||
}
|
}
|
||||||
button.setAttribute("title", engine.title);
|
button.setAttribute("title", engine.title);
|
||||||
addEngineList.appendChild(button);
|
addEngineList.appendChild(button);
|
||||||
|
@ -1328,7 +1323,7 @@
|
||||||
button.id = "searchbar-engine-one-off-item-" + engine.name.replace(/ /g, '-');
|
button.id = "searchbar-engine-one-off-item-" + engine.name.replace(/ /g, '-');
|
||||||
let uri = "chrome://browser/skin/search-engine-placeholder.png";
|
let uri = "chrome://browser/skin/search-engine-placeholder.png";
|
||||||
if (engine.iconURI) {
|
if (engine.iconURI) {
|
||||||
uri = PlacesUtils.getImageURLForResolution(window, engine.iconURI.spec);
|
uri = engine.iconURI.spec;
|
||||||
}
|
}
|
||||||
button.setAttribute("image", uri);
|
button.setAttribute("image", uri);
|
||||||
button.setAttribute("class", "searchbar-engine-one-off-item");
|
button.setAttribute("class", "searchbar-engine-one-off-item");
|
||||||
|
|
|
@ -169,7 +169,7 @@ this.RecentlyClosedTabsAndWindowsMenuUtils = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function setImage(aWindow, aItem, aElement) {
|
function setImage(aWindow, aItem, aElement) {
|
||||||
let iconURL = PlacesUtils.getImageURLForResolution(aWindow, aItem.image);
|
let iconURL = aItem.image;
|
||||||
// don't initiate a connection just to fetch a favicon (see bug 467828)
|
// don't initiate a connection just to fetch a favicon (see bug 467828)
|
||||||
if (/^https?:/.test(iconURL))
|
if (/^https?:/.test(iconURL))
|
||||||
iconURL = "moz-anno:favicon:" + iconURL;
|
iconURL = "moz-anno:favicon:" + iconURL;
|
||||||
|
|
|
@ -9,7 +9,6 @@ this.EXPORTED_SYMBOLS = ["SessionStorage"];
|
||||||
const Cu = Components.utils;
|
const Cu = Components.utils;
|
||||||
const Ci = Components.interfaces;
|
const Ci = Components.interfaces;
|
||||||
|
|
||||||
Cu.import("resource://gre/modules/BrowserUtils.jsm");
|
|
||||||
Cu.import("resource://gre/modules/Services.jsm");
|
Cu.import("resource://gre/modules/Services.jsm");
|
||||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
|
|
||||||
|
@ -105,7 +104,7 @@ var SessionStorageInternal = {
|
||||||
restore: function (aDocShell, aStorageData) {
|
restore: function (aDocShell, aStorageData) {
|
||||||
for (let origin of Object.keys(aStorageData)) {
|
for (let origin of Object.keys(aStorageData)) {
|
||||||
let data = aStorageData[origin];
|
let data = aStorageData[origin];
|
||||||
let principal = BrowserUtils.principalFromOrigin(origin);
|
let principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(origin);
|
||||||
let storageManager = aDocShell.QueryInterface(Ci.nsIDOMStorageManager);
|
let storageManager = aDocShell.QueryInterface(Ci.nsIDOMStorageManager);
|
||||||
let window = aDocShell.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindow);
|
let window = aDocShell.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindow);
|
||||||
|
|
||||||
|
|
|
@ -91,10 +91,6 @@ var FavIcons = {
|
||||||
tabImage = this._favIconService.getFaviconLinkForIcon(tabImageURI).spec;
|
tabImage = this._favIconService.getFaviconLinkForIcon(tabImageURI).spec;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tabImage) {
|
|
||||||
tabImage = PlacesUtils.getImageURLForResolution(window, tabImage);
|
|
||||||
}
|
|
||||||
|
|
||||||
callback(tabImage);
|
callback(tabImage);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -107,8 +103,7 @@ var FavIcons = {
|
||||||
let {currentURI} = tab.linkedBrowser;
|
let {currentURI} = tab.linkedBrowser;
|
||||||
this._favIconService.getFaviconURLForPage(currentURI, function (uri) {
|
this._favIconService.getFaviconURLForPage(currentURI, function (uri) {
|
||||||
if (uri) {
|
if (uri) {
|
||||||
let icon = PlacesUtils.getImageURLForResolution(window,
|
let icon = this._favIconService.getFaviconLinkForIcon(uri).spec;
|
||||||
this._favIconService.getFaviconLinkForIcon(uri).spec);
|
|
||||||
callback(icon);
|
callback(icon);
|
||||||
} else {
|
} else {
|
||||||
callback(this.defaultFavicon);
|
callback(this.defaultFavicon);
|
||||||
|
|
|
@ -2223,7 +2223,7 @@ this.Experiments.PreviousExperimentProvider = function (experiments) {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.Experiments.PreviousExperimentProvider.prototype = Object.freeze({
|
this.Experiments.PreviousExperimentProvider.prototype = Object.freeze({
|
||||||
get name() "PreviousExperimentProvider",
|
name: "PreviousExperimentProvider",
|
||||||
|
|
||||||
startup: function () {
|
startup: function () {
|
||||||
this._log.trace("startup()");
|
this._log.trace("startup()");
|
||||||
|
|
|
@ -18,34 +18,34 @@ var Utilities = {
|
||||||
get bookmarks() {
|
get bookmarks() {
|
||||||
let bookmarks = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
|
let bookmarks = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
|
||||||
getService(Ci.nsINavBookmarksService);
|
getService(Ci.nsINavBookmarksService);
|
||||||
this.__defineGetter__("bookmarks", function() bookmarks);
|
this.__defineGetter__("bookmarks", () => bookmarks);
|
||||||
return this.bookmarks;
|
return this.bookmarks;
|
||||||
},
|
},
|
||||||
|
|
||||||
get bookmarksObserver() {
|
get bookmarksObserver() {
|
||||||
let bookmarksObserver = new BookmarksObserver();
|
let bookmarksObserver = new BookmarksObserver();
|
||||||
this.__defineGetter__("bookmarksObserver", function() bookmarksObserver);
|
this.__defineGetter__("bookmarksObserver", () => bookmarksObserver);
|
||||||
return this.bookmarksObserver;
|
return this.bookmarksObserver;
|
||||||
},
|
},
|
||||||
|
|
||||||
get annotations() {
|
get annotations() {
|
||||||
let annotations = Cc["@mozilla.org/browser/annotation-service;1"].
|
let annotations = Cc["@mozilla.org/browser/annotation-service;1"].
|
||||||
getService(Ci.nsIAnnotationService);
|
getService(Ci.nsIAnnotationService);
|
||||||
this.__defineGetter__("annotations", function() annotations);
|
this.__defineGetter__("annotations", () => annotations);
|
||||||
return this.annotations;
|
return this.annotations;
|
||||||
},
|
},
|
||||||
|
|
||||||
get history() {
|
get history() {
|
||||||
let history = Cc["@mozilla.org/browser/nav-history-service;1"].
|
let history = Cc["@mozilla.org/browser/nav-history-service;1"].
|
||||||
getService(Ci.nsINavHistoryService);
|
getService(Ci.nsINavHistoryService);
|
||||||
this.__defineGetter__("history", function() history);
|
this.__defineGetter__("history", () => history);
|
||||||
return this.history;
|
return this.history;
|
||||||
},
|
},
|
||||||
|
|
||||||
get windowMediator() {
|
get windowMediator() {
|
||||||
let windowMediator = Cc["@mozilla.org/appshell/window-mediator;1"].
|
let windowMediator = Cc["@mozilla.org/appshell/window-mediator;1"].
|
||||||
getService(Ci.nsIWindowMediator);
|
getService(Ci.nsIWindowMediator);
|
||||||
this.__defineGetter__("windowMediator", function() windowMediator);
|
this.__defineGetter__("windowMediator", () => windowMediator);
|
||||||
return this.windowMediator;
|
return this.windowMediator;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -136,10 +136,10 @@ function test() {
|
||||||
|
|
||||||
// test names array - NOTE: "bookmarkProperties/description" is an annotation too
|
// test names array - NOTE: "bookmarkProperties/description" is an annotation too
|
||||||
var names = testBookmark.annotations.names;
|
var names = testBookmark.annotations.names;
|
||||||
ok(names.some(function (f) f == "bookmarkProperties/description"), "Checking for description annotation");
|
ok(names.some(f => f == "bookmarkProperties/description"), "Checking for description annotation");
|
||||||
ok(names.some(function (f) f == "testing/bookmark/string"), "Checking for string test annotation");
|
ok(names.some(f => f == "testing/bookmark/string"), "Checking for string test annotation");
|
||||||
ok(names.some(function (f) f == "testing/bookmark/int"), "Checking for int test annotation");
|
ok(names.some(f => f == "testing/bookmark/int"), "Checking for int test annotation");
|
||||||
ok(names.some(function (f) f == "testing/bookmark/double"), "Checking for double test annotation");
|
ok(names.some(f => f == "testing/bookmark/double"), "Checking for double test annotation");
|
||||||
|
|
||||||
// test adding a separator
|
// test adding a separator
|
||||||
var testSeparator = testFolder.addSeparator();
|
var testSeparator = testFolder.addSeparator();
|
||||||
|
|
|
@ -85,10 +85,10 @@ function test() {
|
||||||
onPageBLoadComplete();
|
onPageBLoadComplete();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLocationChange: function () 0,
|
onLocationChange: () => 0,
|
||||||
onProgressChange: function () 0,
|
onProgressChange: () => 0,
|
||||||
onStatusChange: function () 0,
|
onStatusChange: () => 0,
|
||||||
onSecurityChange: function () 0
|
onSecurityChange: () => 0
|
||||||
});
|
});
|
||||||
|
|
||||||
// test loading new content with a frame into a tab
|
// test loading new content with a frame into a tab
|
||||||
|
|
|
@ -193,6 +193,7 @@
|
||||||
@RESPATH@/components/dom_messages.xpt
|
@RESPATH@/components/dom_messages.xpt
|
||||||
#endif
|
#endif
|
||||||
@RESPATH@/components/dom_apps.xpt
|
@RESPATH@/components/dom_apps.xpt
|
||||||
|
@RESPATH@/components/dom_newapps.xpt
|
||||||
@RESPATH@/components/dom_base.xpt
|
@RESPATH@/components/dom_base.xpt
|
||||||
@RESPATH@/components/dom_system.xpt
|
@RESPATH@/components/dom_system.xpt
|
||||||
#ifdef MOZ_B2G_BT
|
#ifdef MOZ_B2G_BT
|
||||||
|
@ -638,6 +639,10 @@
|
||||||
@RESPATH@/components/PrivateBrowsing.manifest
|
@RESPATH@/components/PrivateBrowsing.manifest
|
||||||
@RESPATH@/components/PrivateBrowsingTrackingProtectionWhitelist.js
|
@RESPATH@/components/PrivateBrowsingTrackingProtectionWhitelist.js
|
||||||
|
|
||||||
|
; Signed Packaged Content
|
||||||
|
@RESPATH@/components/InstallPackagedWebapp.manifest
|
||||||
|
@RESPATH@/components/InstallPackagedWebapp.js
|
||||||
|
|
||||||
; ANGLE GLES-on-D3D rendering library
|
; ANGLE GLES-on-D3D rendering library
|
||||||
#ifdef MOZ_ANGLE_RENDERER
|
#ifdef MOZ_ANGLE_RENDERER
|
||||||
@BINPATH@/libEGL.dll
|
@BINPATH@/libEGL.dll
|
||||||
|
|
|
@ -152,9 +152,7 @@
|
||||||
locale/browser/syncQuota.properties (%chrome/browser/syncQuota.properties)
|
locale/browser/syncQuota.properties (%chrome/browser/syncQuota.properties)
|
||||||
#endif
|
#endif
|
||||||
% resource search-plugins chrome://browser/locale/searchplugins/
|
% resource search-plugins chrome://browser/locale/searchplugins/
|
||||||
# little trick to make the test below work
|
#if BUILD_FASTER
|
||||||
#define en_US en-US
|
|
||||||
#if AB_CD == en_US
|
|
||||||
locale/browser/searchplugins/list.txt (%searchplugins/list.txt)
|
locale/browser/searchplugins/list.txt (%searchplugins/list.txt)
|
||||||
locale/browser/searchplugins/ (%searchplugins/*.xml)
|
locale/browser/searchplugins/ (%searchplugins/*.xml)
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -713,18 +713,24 @@ this.BrowserUITelemetry = {
|
||||||
/**
|
/**
|
||||||
* Default bucket name, when no other bucket is active.
|
* Default bucket name, when no other bucket is active.
|
||||||
*/
|
*/
|
||||||
get BUCKET_DEFAULT() BUCKET_DEFAULT,
|
get BUCKET_DEFAULT() {
|
||||||
|
return BUCKET_DEFAULT;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bucket prefix, for named buckets.
|
* Bucket prefix, for named buckets.
|
||||||
*/
|
*/
|
||||||
get BUCKET_PREFIX() BUCKET_PREFIX,
|
get BUCKET_PREFIX() {
|
||||||
|
return BUCKET_PREFIX;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Standard separator to use between different parts of a bucket name, such
|
* Standard separator to use between different parts of a bucket name, such
|
||||||
* as primary name and the time step string.
|
* as primary name and the time step string.
|
||||||
*/
|
*/
|
||||||
get BUCKET_SEPARATOR() BUCKET_SEPARATOR,
|
get BUCKET_SEPARATOR() {
|
||||||
|
return BUCKET_SEPARATOR;
|
||||||
|
},
|
||||||
|
|
||||||
get currentBucket() {
|
get currentBucket() {
|
||||||
return this._bucket;
|
return this._bucket;
|
||||||
|
|
|
@ -144,7 +144,7 @@ this.ContentLinkHandler = {
|
||||||
/^about:blocked\?/,
|
/^about:blocked\?/,
|
||||||
/^about:certerror\?/,
|
/^about:certerror\?/,
|
||||||
/^about:home$/,
|
/^about:home$/,
|
||||||
].some(function (re) re.test(targetDoc.documentURI));
|
].some(re => re.test(targetDoc.documentURI));
|
||||||
|
|
||||||
if (!isAllowedPage || !uri.schemeIs("chrome")) {
|
if (!isAllowedPage || !uri.schemeIs("chrome")) {
|
||||||
var ssm = Services.scriptSecurityManager;
|
var ssm = Services.scriptSecurityManager;
|
||||||
|
|
|
@ -159,12 +159,14 @@ var DirectoryLinksProvider = {
|
||||||
*/
|
*/
|
||||||
_newTabHasInadjacentSite: false,
|
_newTabHasInadjacentSite: false,
|
||||||
|
|
||||||
get _observedPrefs() Object.freeze({
|
get _observedPrefs() {
|
||||||
enhanced: PREF_NEWTAB_ENHANCED,
|
return Object.freeze({
|
||||||
linksURL: PREF_DIRECTORY_SOURCE,
|
enhanced: PREF_NEWTAB_ENHANCED,
|
||||||
matchOSLocale: PREF_MATCH_OS_LOCALE,
|
linksURL: PREF_DIRECTORY_SOURCE,
|
||||||
prefSelectedLocale: PREF_SELECTED_LOCALE,
|
matchOSLocale: PREF_MATCH_OS_LOCALE,
|
||||||
}),
|
prefSelectedLocale: PREF_SELECTED_LOCALE,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
get _linksURL() {
|
get _linksURL() {
|
||||||
if (!this.__linksURL) {
|
if (!this.__linksURL) {
|
||||||
|
|
|
@ -213,7 +213,7 @@ this.Social = {
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
PlacesUtils.asyncHistory.updatePlaces(place, {
|
PlacesUtils.asyncHistory.updatePlaces(place, {
|
||||||
handleError: function () Cu.reportError("couldn't update history for socialmark annotation"),
|
handleError: () => Cu.reportError("couldn't update history for socialmark annotation"),
|
||||||
handleResult: function () {},
|
handleResult: function () {},
|
||||||
handleCompletion: function () {
|
handleCompletion: function () {
|
||||||
promiseSetAnnotation(aURI, providerList).then(function() {
|
promiseSetAnnotation(aURI, providerList).then(function() {
|
||||||
|
|
|
@ -31,7 +31,7 @@ const Windows8WindowFrameColor = {
|
||||||
// Zero-pad the number just to make sure that it is 8 digits.
|
// Zero-pad the number just to make sure that it is 8 digits.
|
||||||
customizationColorHex = ("00000000" + customizationColorHex).substr(-8);
|
customizationColorHex = ("00000000" + customizationColorHex).substr(-8);
|
||||||
let customizationColorArray = customizationColorHex.match(/../g);
|
let customizationColorArray = customizationColorHex.match(/../g);
|
||||||
let [unused, fgR, fgG, fgB] = customizationColorArray.map(function(val) parseInt(val, 16));
|
let [unused, fgR, fgG, fgB] = customizationColorArray.map(val => parseInt(val, 16));
|
||||||
let colorizationColorBalance = Registry.readRegKey(HKCU, dwmKey,
|
let colorizationColorBalance = Registry.readRegKey(HKCU, dwmKey,
|
||||||
"ColorizationColorBalance") || 78;
|
"ColorizationColorBalance") || 78;
|
||||||
// Window frame base color when Color Intensity is at 0, see bug 1004576.
|
// Window frame base color when Color Intensity is at 0, see bug 1004576.
|
||||||
|
|
|
@ -102,8 +102,8 @@ var tasksCfg = [
|
||||||
*/
|
*/
|
||||||
// Open new tab
|
// Open new tab
|
||||||
{
|
{
|
||||||
get title() _getString("taskbar.tasks.newTab.label"),
|
get title() { return _getString("taskbar.tasks.newTab.label"); },
|
||||||
get description() _getString("taskbar.tasks.newTab.description"),
|
get description() { return _getString("taskbar.tasks.newTab.description"); },
|
||||||
args: "-new-tab about:blank",
|
args: "-new-tab about:blank",
|
||||||
iconIndex: 3, // New window icon
|
iconIndex: 3, // New window icon
|
||||||
open: true,
|
open: true,
|
||||||
|
@ -114,8 +114,8 @@ var tasksCfg = [
|
||||||
|
|
||||||
// Open new window
|
// Open new window
|
||||||
{
|
{
|
||||||
get title() _getString("taskbar.tasks.newWindow.label"),
|
get title() { return _getString("taskbar.tasks.newWindow.label"); },
|
||||||
get description() _getString("taskbar.tasks.newWindow.description"),
|
get description() { return _getString("taskbar.tasks.newWindow.description"); },
|
||||||
args: "-browser",
|
args: "-browser",
|
||||||
iconIndex: 2, // New tab icon
|
iconIndex: 2, // New tab icon
|
||||||
open: true,
|
open: true,
|
||||||
|
@ -125,8 +125,8 @@ var tasksCfg = [
|
||||||
|
|
||||||
// Open new private window
|
// Open new private window
|
||||||
{
|
{
|
||||||
get title() _getString("taskbar.tasks.newPrivateWindow.label"),
|
get title() { return _getString("taskbar.tasks.newPrivateWindow.label"); },
|
||||||
get description() _getString("taskbar.tasks.newPrivateWindow.description"),
|
get description() { return _getString("taskbar.tasks.newPrivateWindow.description"); },
|
||||||
args: "-private-window",
|
args: "-private-window",
|
||||||
iconIndex: 4, // Private browsing mode icon
|
iconIndex: 4, // Private browsing mode icon
|
||||||
open: true,
|
open: true,
|
||||||
|
|
|
@ -315,8 +315,7 @@ PreviewController.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
drawPreview: function (ctx) {
|
drawPreview: function (ctx) {
|
||||||
let self = this;
|
this.win.tabbrowser.previewTab(this.tab, () => this.previewTabCallback(ctx));
|
||||||
this.win.tabbrowser.previewTab(this.tab, function () self.previewTabCallback(ctx));
|
|
||||||
|
|
||||||
// We must avoid having the frame drawn around the window. See bug 520807
|
// We must avoid having the frame drawn around the window. See bug 520807
|
||||||
return false;
|
return false;
|
||||||
|
@ -749,7 +748,7 @@ this.AeroPeek = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(AeroPeek, "cacheTimer", function ()
|
XPCOMUtils.defineLazyGetter(AeroPeek, "cacheTimer", () =>
|
||||||
Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer)
|
Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -106,14 +106,17 @@ function test() {
|
||||||
is(nPreviews, aPreviews, msg || "Got expected number of previews");
|
is(nPreviews, aPreviews, msg || "Got expected number of previews");
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPreviewForTab(tab)
|
function getPreviewForTab(tab) {
|
||||||
window.gTaskbarTabGroup.previewFromTab(tab);
|
return window.gTaskbarTabGroup.previewFromTab(tab);
|
||||||
|
}
|
||||||
|
|
||||||
function checkSelectedTab()
|
function checkSelectedTab() {
|
||||||
getPreviewForTab(gBrowser.selectedTab).active;
|
return getPreviewForTab(gBrowser.selectedTab).active;
|
||||||
|
}
|
||||||
|
|
||||||
function isTabSelected(idx)
|
function isTabSelected(idx) {
|
||||||
gBrowser.tabs[idx].selected;
|
return gBrowser.tabs[idx].selected;
|
||||||
|
}
|
||||||
|
|
||||||
function createThumbnailSurface(p) {
|
function createThumbnailSurface(p) {
|
||||||
let thumbnailWidth = 200,
|
let thumbnailWidth = 200,
|
||||||
|
|
|
@ -1637,11 +1637,19 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
|
||||||
}
|
}
|
||||||
|
|
||||||
.alltabs-endimage[muted] {
|
.alltabs-endimage[muted] {
|
||||||
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-muted);
|
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-menu-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.alltabs-endimage[soundplaying] {
|
.alltabs-endimage[soundplaying] {
|
||||||
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio);
|
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
menuitem:hover > hbox > .alltabs-endimage[muted] {
|
||||||
|
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-menu-muted-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
menuitem:hover > hbox > .alltabs-endimage[soundplaying] {
|
||||||
|
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-menu-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sidebar */
|
/* Sidebar */
|
||||||
|
|
|
@ -2959,11 +2959,19 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||||
}
|
}
|
||||||
|
|
||||||
.alltabs-endimage[muted] {
|
.alltabs-endimage[muted] {
|
||||||
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-muted);
|
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-menu-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.alltabs-endimage[soundplaying] {
|
.alltabs-endimage[soundplaying] {
|
||||||
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio);
|
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
menuitem:hover > hbox > .alltabs-endimage[muted] {
|
||||||
|
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-menu-muted-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
menuitem:hover > hbox > .alltabs-endimage[soundplaying] {
|
||||||
|
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-menu-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Bookmarks toolbar */
|
/* Bookmarks toolbar */
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
skin/classic/browser/social/gear_clicked.png (../shared/social/gear_clicked.png)
|
skin/classic/browser/social/gear_clicked.png (../shared/social/gear_clicked.png)
|
||||||
skin/classic/browser/tabbrowser/crashed.svg (../shared/tabbrowser/crashed.svg)
|
skin/classic/browser/tabbrowser/crashed.svg (../shared/tabbrowser/crashed.svg)
|
||||||
skin/classic/browser/tabbrowser/pendingpaint.png (../shared/tabbrowser/pendingpaint.png)
|
skin/classic/browser/tabbrowser/pendingpaint.png (../shared/tabbrowser/pendingpaint.png)
|
||||||
skin/classic/browser/tabbrowser/tab-audio.svg (../shared/tabbrowser/tab-audio.svg)
|
* skin/classic/browser/tabbrowser/tab-audio.svg (../shared/tabbrowser/tab-audio.svg)
|
||||||
skin/classic/browser/tabbrowser/tab-audio-small.svg (../shared/tabbrowser/tab-audio-small.svg)
|
skin/classic/browser/tabbrowser/tab-audio-small.svg (../shared/tabbrowser/tab-audio-small.svg)
|
||||||
skin/classic/browser/tabbrowser/tab-overflow-indicator.png (../shared/tabbrowser/tab-overflow-indicator.png)
|
skin/classic/browser/tabbrowser/tab-overflow-indicator.png (../shared/tabbrowser/tab-overflow-indicator.png)
|
||||||
skin/classic/browser/theme-switcher-icon.png (../shared/theme-switcher-icon.png)
|
skin/classic/browser/theme-switcher-icon.png (../shared/theme-switcher-icon.png)
|
||||||
|
|
|
@ -35,6 +35,17 @@
|
||||||
fill-opacity: .5;
|
fill-opacity: .5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon.menu {
|
||||||
|
fill: MenuText;
|
||||||
|
}
|
||||||
|
.icon.menu.hover {
|
||||||
|
#ifdef XP_MACOSX
|
||||||
|
fill: -moz-mac-menutextselect;
|
||||||
|
#else
|
||||||
|
fill: -moz-menuhovertext;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
.icon.backgroundTab,
|
.icon.backgroundTab,
|
||||||
.icon.backgroundTab.hover,
|
.icon.backgroundTab.hover,
|
||||||
.icon.backgroundTab.pressed {
|
.icon.backgroundTab.pressed {
|
||||||
|
@ -84,4 +95,9 @@
|
||||||
<path d="M12.5,3.4L9,6.3V2L5.2,5H4C2.9,5,2,5.9,2,7v2c0,0.9,0.6,1.6,1.4,1.9l-1.9,1.5l1,1.2l11-9L12.5,3.4z M9,14v-4l-2.5,2L9,14z"/>
|
<path d="M12.5,3.4L9,6.3V2L5.2,5H4C2.9,5,2,5.9,2,7v2c0,0.9,0.6,1.6,1.4,1.9l-1.9,1.5l1,1.2l11-9L12.5,3.4z M9,14v-4l-2.5,2L9,14z"/>
|
||||||
</g>
|
</g>
|
||||||
|
|
||||||
|
<path id="tab-audio-menu" class="icon menu" d="M4,5C2.9,5,2,5.9,2,7v2c0,1.1,0.9,2,2,2h1.2L9,14V2L5.2,5H4z M11,8c0-0.6-0.4-1-1-1v2C10.6,9,11,8.6,11,8z M13,8 c0-1.4-1-2.6-2.3-2.9L10.4,6C11.3,6.2,12,7,12,8s-0.7,1.8-1.6,2l0.4,0.9C12,10.6,13,9.4,13,8z M11.4,3.2l-0.4,0.9 C12.8,4.6,14,6.2,14,8s-1.2,3.4-2.9,3.8l0.4,0.9C13.5,12.2,15,10.3,15,8S13.5,3.8,11.4,3.2z"/>
|
||||||
|
<path id="tab-audio-menu-muted" class="icon menu" d="M12.5,3.4L9,6.3V2L5.2,5H4C2.9,5,2,5.9,2,7v2c0,0.9,0.6,1.6,1.4,1.9l-1.9,1.5l1,1.2l11-9L12.5,3.4z M9,14v-4l-2.5,2L9,14z"/>
|
||||||
|
<path id="tab-audio-menu-hover" class="icon menu hover" d="M4,5C2.9,5,2,5.9,2,7v2c0,1.1,0.9,2,2,2h1.2L9,14V2L5.2,5H4z M11,8c0-0.6-0.4-1-1-1v2C10.6,9,11,8.6,11,8z M13,8 c0-1.4-1-2.6-2.3-2.9L10.4,6C11.3,6.2,12,7,12,8s-0.7,1.8-1.6,2l0.4,0.9C12,10.6,13,9.4,13,8z M11.4,3.2l-0.4,0.9 C12.8,4.6,14,6.2,14,8s-1.2,3.4-2.9,3.8l0.4,0.9C13.5,12.2,15,10.3,15,8S13.5,3.8,11.4,3.2z"/>
|
||||||
|
<path id="tab-audio-menu-muted-hover" class="icon menu hover" d="M12.5,3.4L9,6.3V2L5.2,5H4C2.9,5,2,5.9,2,7v2c0,0.9,0.6,1.6,1.4,1.9l-1.9,1.5l1,1.2l11-9L12.5,3.4z M9,14v-4l-2.5,2L9,14z"/>
|
||||||
|
|
||||||
</svg>
|
</svg>
|
||||||
|
|
До Ширина: | Высота: | Размер: 8.7 KiB После Ширина: | Высота: | Размер: 9.9 KiB |
|
@ -2195,11 +2195,19 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
|
||||||
}
|
}
|
||||||
|
|
||||||
.alltabs-endimage[muted] {
|
.alltabs-endimage[muted] {
|
||||||
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-muted);
|
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-menu-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.alltabs-endimage[soundplaying] {
|
.alltabs-endimage[soundplaying] {
|
||||||
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio);
|
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
menuitem:hover > hbox > .alltabs-endimage[muted] {
|
||||||
|
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-menu-muted-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
menuitem:hover > hbox > .alltabs-endimage[soundplaying] {
|
||||||
|
list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-menu-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
toolbarbutton.chevron {
|
toolbarbutton.chevron {
|
||||||
|
|
|
@ -137,8 +137,6 @@ MOZ_ARG_WITH_STRING(debug-label,
|
||||||
MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_${option}"
|
MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_${option}"
|
||||||
done])
|
done])
|
||||||
|
|
||||||
MOZ_DEBUG_DISABLE_DEFS="-DNDEBUG -DTRIMMED"
|
|
||||||
|
|
||||||
if test -n "$MOZ_DEBUG"; then
|
if test -n "$MOZ_DEBUG"; then
|
||||||
AC_MSG_CHECKING([for valid debug flags])
|
AC_MSG_CHECKING([for valid debug flags])
|
||||||
_SAVE_CFLAGS=$CFLAGS
|
_SAVE_CFLAGS=$CFLAGS
|
||||||
|
@ -152,8 +150,14 @@ if test -n "$MOZ_DEBUG"; then
|
||||||
AC_MSG_ERROR([These compiler flags are invalid: $MOZ_DEBUG_FLAGS])
|
AC_MSG_ERROR([These compiler flags are invalid: $MOZ_DEBUG_FLAGS])
|
||||||
fi
|
fi
|
||||||
CFLAGS=$_SAVE_CFLAGS
|
CFLAGS=$_SAVE_CFLAGS
|
||||||
|
|
||||||
|
MOZ_DEBUG_DEFINES="$MOZ_DEBUG_ENABLE_DEFS"
|
||||||
|
else
|
||||||
|
MOZ_DEBUG_DEFINES="-DNDEBUG -DTRIMMED"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_SUBST(MOZ_DEBUG_DEFINES)
|
||||||
|
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
dnl = Enable generation of debug symbols
|
dnl = Enable generation of debug symbols
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
|
|
|
@ -46,6 +46,9 @@ export HOST_LDFLAGS="-g"
|
||||||
ac_add_options --target=x86_64-apple-darwin
|
ac_add_options --target=x86_64-apple-darwin
|
||||||
ac_add_options --with-macos-private-frameworks=$CROSS_PRIVATE_FRAMEWORKS
|
ac_add_options --with-macos-private-frameworks=$CROSS_PRIVATE_FRAMEWORKS
|
||||||
|
|
||||||
|
# Enable static analysis checks by default on OSX cross builds.
|
||||||
|
ac_add_options --enable-clang-plugin
|
||||||
|
|
||||||
. "$topsrcdir/build/mozconfig.cache"
|
. "$topsrcdir/build/mozconfig.cache"
|
||||||
|
|
||||||
export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE=/builds/crash-stats-api.token
|
export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE=/builds/crash-stats-api.token
|
||||||
|
|
|
@ -53,8 +53,6 @@ bool OriginAttributes::CopyFromLoadContext(nsILoadContext* aLoadContext)
|
||||||
void
|
void
|
||||||
OriginAttributes::CreateSuffix(nsACString& aStr) const
|
OriginAttributes::CreateSuffix(nsACString& aStr) const
|
||||||
{
|
{
|
||||||
MOZ_RELEASE_ASSERT(mAppId != nsIScriptSecurityManager::UNKNOWN_APP_ID);
|
|
||||||
|
|
||||||
UniquePtr<URLParams> params(new URLParams());
|
UniquePtr<URLParams> params(new URLParams());
|
||||||
nsAutoString value;
|
nsAutoString value;
|
||||||
|
|
||||||
|
@ -127,10 +125,6 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mOriginAttributes->mAppId == nsIScriptSecurityManager::UNKNOWN_APP_ID) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,14 +216,6 @@ BasePrincipal::GetOrigin(nsACString& aOrigin)
|
||||||
nsresult rv = GetOriginInternal(aOrigin);
|
nsresult rv = GetOriginInternal(aOrigin);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
// OriginAttributes::CreateSuffix asserts against UNKNOWN_APP_ID. It's trivial
|
|
||||||
// to trigger this getter from script on such a principal, so we handle it
|
|
||||||
// here at the API entry point.
|
|
||||||
if (mOriginAttributes.mAppId == nsIScriptSecurityManager::UNKNOWN_APP_ID) {
|
|
||||||
NS_WARNING("Refusing to provide canonical origin string to principal with UNKNOWN_APP_ID");
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsAutoCString suffix;
|
nsAutoCString suffix;
|
||||||
mOriginAttributes.CreateSuffix(suffix);
|
mOriginAttributes.CreateSuffix(suffix);
|
||||||
aOrigin.Append(suffix);
|
aOrigin.Append(suffix);
|
||||||
|
@ -325,8 +311,6 @@ BasePrincipal::GetIsNullPrincipal(bool* aIsNullPrincipal)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
BasePrincipal::GetJarPrefix(nsACString& aJarPrefix)
|
BasePrincipal::GetJarPrefix(nsACString& aJarPrefix)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(AppId() != nsIScriptSecurityManager::UNKNOWN_APP_ID);
|
|
||||||
|
|
||||||
mozilla::GetJarPrefix(mOriginAttributes.mAppId, mOriginAttributes.mInBrowser, aJarPrefix);
|
mozilla::GetJarPrefix(mOriginAttributes.mAppId, mOriginAttributes.mInBrowser, aJarPrefix);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -426,6 +410,28 @@ BasePrincipal::CreateCodebasePrincipal(nsIURI* aURI, OriginAttributes& aAttrs)
|
||||||
return codebase.forget();
|
return codebase.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
already_AddRefed<BasePrincipal>
|
||||||
|
BasePrincipal::CreateCodebasePrincipal(const nsACString& aOrigin)
|
||||||
|
{
|
||||||
|
MOZ_ASSERT(!StringBeginsWith(aOrigin, NS_LITERAL_CSTRING("[")),
|
||||||
|
"CreateCodebasePrincipal does not support System and Expanded principals");
|
||||||
|
|
||||||
|
MOZ_ASSERT(!StringBeginsWith(aOrigin, NS_LITERAL_CSTRING(NS_NULLPRINCIPAL_SCHEME ":")),
|
||||||
|
"CreateCodebasePrincipal does not support nsNullPrincipal");
|
||||||
|
|
||||||
|
nsAutoCString originNoSuffix;
|
||||||
|
mozilla::OriginAttributes attrs;
|
||||||
|
if (!attrs.PopulateFromOrigin(aOrigin, originNoSuffix)) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsCOMPtr<nsIURI> uri;
|
||||||
|
nsresult rv = NS_NewURI(getter_AddRefs(uri), originNoSuffix);
|
||||||
|
NS_ENSURE_SUCCESS(rv, nullptr);
|
||||||
|
|
||||||
|
return BasePrincipal::CreateCodebasePrincipal(uri, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
BasePrincipal::AddonAllowsLoad(nsIURI* aURI)
|
BasePrincipal::AddonAllowsLoad(nsIURI* aURI)
|
||||||
{
|
{
|
||||||
|
|
|
@ -160,6 +160,7 @@ public:
|
||||||
|
|
||||||
static BasePrincipal* Cast(nsIPrincipal* aPrin) { return static_cast<BasePrincipal*>(aPrin); }
|
static BasePrincipal* Cast(nsIPrincipal* aPrin) { return static_cast<BasePrincipal*>(aPrin); }
|
||||||
static already_AddRefed<BasePrincipal> CreateCodebasePrincipal(nsIURI* aURI, OriginAttributes& aAttrs);
|
static already_AddRefed<BasePrincipal> CreateCodebasePrincipal(nsIURI* aURI, OriginAttributes& aAttrs);
|
||||||
|
static already_AddRefed<BasePrincipal> CreateCodebasePrincipal(const nsACString& aOrigin);
|
||||||
|
|
||||||
const OriginAttributes& OriginAttributesRef() { return mOriginAttributes; }
|
const OriginAttributes& OriginAttributesRef() { return mOriginAttributes; }
|
||||||
uint32_t AppId() const { return mOriginAttributes.mAppId; }
|
uint32_t AppId() const { return mOriginAttributes.mAppId; }
|
||||||
|
|
|
@ -26,7 +26,7 @@ class DomainPolicyClone;
|
||||||
[ptr] native JSObjectPtr(JSObject);
|
[ptr] native JSObjectPtr(JSObject);
|
||||||
[ptr] native DomainPolicyClonePtr(mozilla::dom::DomainPolicyClone);
|
[ptr] native DomainPolicyClonePtr(mozilla::dom::DomainPolicyClone);
|
||||||
|
|
||||||
[scriptable, uuid(6e8a4d1e-d9c6-4d86-bf53-d73f58f36148)]
|
[scriptable, uuid(b7ae2310-576e-11e5-a837-0800200c9a66)]
|
||||||
interface nsIScriptSecurityManager : nsISupports
|
interface nsIScriptSecurityManager : nsISupports
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -197,6 +197,13 @@ interface nsIScriptSecurityManager : nsISupports
|
||||||
[implicit_jscontext]
|
[implicit_jscontext]
|
||||||
nsIPrincipal createCodebasePrincipal(in nsIURI uri, in jsval originAttributes);
|
nsIPrincipal createCodebasePrincipal(in nsIURI uri, in jsval originAttributes);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a principal whose origin is the one we pass in.
|
||||||
|
* See nsIPrincipal.idl for a description of origin attributes, and
|
||||||
|
* ChromeUtils.webidl for a list of origin attributes and their defaults.
|
||||||
|
*/
|
||||||
|
nsIPrincipal createCodebasePrincipalFromOrigin(in ACString origin);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a unique nonce principal with |originAttributes|.
|
* Returns a unique nonce principal with |originAttributes|.
|
||||||
* See nsIPrincipal.idl for a description of origin attributes, and
|
* See nsIPrincipal.idl for a description of origin attributes, and
|
||||||
|
|
|
@ -57,7 +57,6 @@ nsresult
|
||||||
nsNullPrincipal::Init(const OriginAttributes& aOriginAttributes)
|
nsNullPrincipal::Init(const OriginAttributes& aOriginAttributes)
|
||||||
{
|
{
|
||||||
mOriginAttributes = aOriginAttributes;
|
mOriginAttributes = aOriginAttributes;
|
||||||
MOZ_ASSERT(AppId() != nsIScriptSecurityManager::UNKNOWN_APP_ID);
|
|
||||||
|
|
||||||
mURI = nsNullPrincipalURI::Create();
|
mURI = nsNullPrincipalURI::Create();
|
||||||
NS_ENSURE_TRUE(mURI, NS_ERROR_NOT_AVAILABLE);
|
NS_ENSURE_TRUE(mURI, NS_ERROR_NOT_AVAILABLE);
|
||||||
|
@ -173,9 +172,6 @@ nsNullPrincipal::Read(nsIObjectInputStream* aStream)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsNullPrincipal::Write(nsIObjectOutputStream* aStream)
|
nsNullPrincipal::Write(nsIObjectOutputStream* aStream)
|
||||||
{
|
{
|
||||||
NS_ENSURE_TRUE(mOriginAttributes.mAppId != nsIScriptSecurityManager::UNKNOWN_APP_ID,
|
|
||||||
NS_ERROR_INVALID_ARG);
|
|
||||||
|
|
||||||
nsAutoCString suffix;
|
nsAutoCString suffix;
|
||||||
OriginAttributesRef().CreateSuffix(suffix);
|
OriginAttributesRef().CreateSuffix(suffix);
|
||||||
|
|
||||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче