Merge mozilla-central to b2g-inbound

This commit is contained in:
Carsten "Tomcat" Book 2015-08-03 16:20:10 +02:00
commit 512c28bc4e
273 changed files with 3790 additions and 1543 deletions

View File

@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.
Bug 1186748 needed a CLOBBER again
Bug 1190180 - need clobber for backouts

View File

@ -47,11 +47,6 @@ LOCAL_INCLUDES += [
FINAL_LIBRARY = 'xul'
# The midl generated code include Windows headers which defines min and max
# macros which conflicts with std::min/max. Suppress the macros:
if CONFIG['OS_ARCH'] == 'WINNT':
DEFINES['NOMINMAX'] = True
FAIL_ON_WARNINGS = True
include('/ipc/chromium/chromium-config.mozbuild')

View File

@ -19,10 +19,6 @@ LOCAL_INCLUDES += [
'/accessible/xul',
]
# The midl generated code include Windows headers which defines min and max
# macros which conflicts with std::min/max. Suppress the macros:
DEFINES['NOMINMAX'] = True
FINAL_LIBRARY = 'xul'
FAIL_ON_WARNINGS = True

View File

@ -19,9 +19,4 @@ LOCAL_INCLUDES += [
FINAL_LIBRARY = 'xul'
# The midl generated code include Windows headers which defines min and max
# macros which conflicts with std::min/max. Suppress the macros:
if CONFIG['OS_ARCH'] == 'WINNT':
DEFINES['NOMINMAX'] = True
FAIL_ON_WARNINGS = True

View File

@ -7,14 +7,6 @@
"unpack": true
},
{
"size": 11179576,
"digest": "91567ce8e2bb8ab0ebc60c31e90731d88a1ea889fb71bcf55c735746a60fa7610b7e040ea3d8f727b6f692ae3ee703d6f3b30cdbd76fdf5617f77d9c38aa20ed",
"algorithm": "sha512",
"filename": "gtk3.tar.xz",
"setup": "setup.sh",
"unpack": true
},
{
"size": 167175,
"digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
"algorithm": "sha512",

View File

@ -7,14 +7,6 @@
"unpack": true
},
{
"size": 12057960,
"digest": "6105d6432943141cffb40020dc5ba3a793650bdeb3af9bd5e56d3796c5f03df9962a73e521646cd71fbfb5e266c1e74716ad722fb6055589dfb7d35175bca89e",
"algorithm": "sha512",
"filename": "gtk3.tar.xz",
"setup": "setup.sh",
"unpack": true
},
{
"size": 167175,
"digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
"algorithm": "sha512",

View File

@ -71,8 +71,8 @@ pref("extensions.hotfix.certs.2.sha1Fingerprint", "39:E7:2B:7A:5B:CF:37:78:F9:5D
// See the SCOPE constants in AddonManager.jsm for values to use here.
pref("extensions.autoDisableScopes", 15);
// Don't require signed add-ons by default
pref("xpinstall.signatures.required", false);
// Require signed add-ons by default
pref("xpinstall.signatures.required", true);
pref("xpinstall.signatures.devInfoURL", "https://wiki.mozilla.org/Addons/Extension_Signing");
// Dictionary download preference

View File

@ -7,13 +7,15 @@
%htmlDTD;
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
%brandDTD;
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
%globalDTD;
<!ENTITY % aboutAccountsDTD SYSTEM "chrome://browser/locale/aboutAccounts.dtd">
%aboutAccountsDTD;
<!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
%syncBrandDTD;
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml" dir="&locale.dir;">
<head>
<title>&syncBrand.fullName.label;</title>
<meta name="viewport" content="width=device-width"/>

View File

@ -5885,20 +5885,24 @@
<handlers>
<handler event="mouseover"><![CDATA[
let anonid = event.originalTarget.getAttribute("anonid");
let iconVisible = this.hasAttribute("soundplaying") ||
this.hasAttribute("muted");
if (anonid == "close-button")
this.mOverCloseButton = true;
else if ((anonid == "soundplaying-icon") ||
((anonid == "overlay-icon") && this.hasAttribute("soundplaying")))
((anonid == "overlay-icon") && iconVisible))
this._overPlayingIcon = true;
this._mouseenter();
]]></handler>
<handler event="mouseout"><![CDATA[
let anonid = event.originalTarget.getAttribute("anonid");
let iconVisible = this.hasAttribute("soundplaying") ||
this.hasAttribute("muted");
if (anonid == "close-button")
this.mOverCloseButton = false;
else if ((anonid == "soundplaying-icon") ||
((anonid == "overlay-icon") && this.hasAttribute("soundplaying")))
((anonid == "overlay-icon") && iconVisible))
this._overPlayingIcon = false;
this._mouseleave();
@ -5928,8 +5932,10 @@
}
let anonid = event.originalTarget.getAttribute("anonid");
let iconVisible = this.hasAttribute("soundplaying") ||
this.hasAttribute("muted");
if ((anonid == "soundplaying-icon") ||
((anonid == "overlay-icon") && this.hasAttribute("soundplaying"))) {
((anonid == "overlay-icon") && iconVisible)) {
this._toggleMuteAudio();
}
]]>

View File

@ -473,7 +473,6 @@ skip-if = buildapp == 'mulet'
[browser_zbug569342.js]
skip-if = e10s # Bug 1094240 - has findbar-related failures
[browser_registerProtocolHandler_notification.js]
skip-if = e10s # Bug 940206 - nsIWebContentHandlerRegistrar::registerProtocolHandler doesn't work in e10s
[browser_no_mcb_on_http_site.js]
[browser_bug1104165-switchtab-decodeuri.js]
[browser_bug1003461-switchtab-override.js]

View File

@ -87,11 +87,23 @@ function* test_playing_icon_on_tab(tab, browser, isPinned) {
yield test_tooltip(icon, "This tab is playing audio");
yield test_mute_tab(tab, icon, true);
yield ContentTask.spawn(browser, {}, function* () {
let audio = content.document.querySelector("audio");
audio.pause();
});
yield wait_for_tab_playing_event(tab, false);
ok(tab.hasAttribute("muted") &&
!tab.hasAttribute("soundplaying"), "Tab should still be muted but not playing");
yield test_tooltip(icon, "This tab has been muted");
yield test_mute_tab(tab, icon, false);
ok(!tab.hasAttribute("muted") &&
!tab.hasAttribute("soundplaying"), "Tab should not be be muted or playing");
}
function* test_on_browser(browser) {

View File

@ -967,8 +967,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
this.getAttribute("pageproxystate") != "valid")
return;
var urlString = content.location.href;
var title = content.document.title || urlString;
var urlString = gBrowser.selectedBrowser.currentURI.spec;
var title = gBrowser.selectedBrowser.contentTitle || urlString;
var htmlString = "<a href=\"" + urlString + "\">" + urlString + "</a>";
var dt = event.dataTransfer;

View File

@ -3,6 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
@ -132,6 +133,83 @@ ServiceInfo.prototype = {
}
};
const Utils = {
makeURI(aURL, aOriginCharset, aBaseURI) {
return Services.io.newURI(aURL, aOriginCharset, aBaseURI);
},
checkAndGetURI(aURIString, aContentWindow) {
try {
let baseURI = aContentWindow.document.baseURIObject;
var uri = this.makeURI(aURIString, null, baseURI);
} catch (ex) {
throw NS_ERROR_DOM_SYNTAX_ERR;
}
// For security reasons we reject non-http(s) urls (see bug 354316),
// we may need to revise this once we support more content types
// XXX this should be a "security exception" according to spec, but that
// isn't defined yet.
if (uri.scheme != "http" && uri.scheme != "https")
throw("Permission denied to add " + uri.spec + " as a content or protocol handler");
// We also reject handlers registered from a different host (see bug 402287)
// The pref allows us to test the feature
var pb = Services.prefs;
if ((!pb.prefHasUserValue(PREF_ALLOW_DIFFERENT_HOST) ||
!pb.getBoolPref(PREF_ALLOW_DIFFERENT_HOST)) &&
aContentWindow.location.hostname != uri.host)
throw("Permission denied to add " + uri.spec + " as a content or protocol handler");
// If the uri doesn't contain '%s', it won't be a good handler
if (uri.spec.indexOf("%s") < 0)
throw NS_ERROR_DOM_SYNTAX_ERR;
return uri;
},
// NB: Throws if aProtocol is not allowed.
checkProtocolHandlerAllowed(aProtocol, aURIString) {
// First, check to make sure this isn't already handled internally (we don't
// want to let them take over, say "chrome").
var handler = Services.io.getProtocolHandler(aProtocol);
if (!(handler instanceof Ci.nsIExternalProtocolHandler)) {
// This is handled internally, so we don't want them to register
// XXX this should be a "security exception" according to spec, but that
// isn't defined yet.
throw(`Permission denied to add ${aURIString} as a protocol handler`);
}
// check if it is in the black list
var pb = Services.prefs;
var allowed;
try {
allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol);
}
catch (e) {
allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default");
}
if (!allowed) {
// XXX this should be a "security exception" according to spec
throw(`Not allowed to register a protocol handler for ${aProtocol}`);
}
},
/**
* Mappings from known feed types to our internal content type.
*/
_mappings: {
"application/rss+xml": TYPE_MAYBE_FEED,
"application/atom+xml": TYPE_MAYBE_FEED,
},
resolveContentType(aContentType) {
if (aContentType in this._mappings)
return this._mappings[aContentType];
return aContentType;
}
};
function WebContentConverterRegistrar() {
this._contentTypes = { };
this._autoHandleContentTypes = { };
@ -139,9 +217,7 @@ function WebContentConverterRegistrar() {
WebContentConverterRegistrar.prototype = {
get stringBundle() {
var sb = Cc["@mozilla.org/intl/stringbundle;1"].
getService(Ci.nsIStringBundleService).
createBundle(STRING_BUNDLE_URI);
var sb = Services.strings.createBundle(STRING_BUNDLE_URI);
delete WebContentConverterRegistrar.prototype.stringBundle;
return WebContentConverterRegistrar.prototype.stringBundle = sb;
},
@ -159,7 +235,7 @@ WebContentConverterRegistrar.prototype = {
*/
getAutoHandler:
function WCCR_getAutoHandler(contentType) {
contentType = this._resolveContentType(contentType);
contentType = Utils.resolveContentType(contentType);
if (contentType in this._autoHandleContentTypes)
return this._autoHandleContentTypes[contentType];
return null;
@ -172,19 +248,17 @@ WebContentConverterRegistrar.prototype = {
function WCCR_setAutoHandler(contentType, handler) {
if (handler && !this._typeIsRegistered(contentType, handler.uri))
throw Cr.NS_ERROR_NOT_AVAILABLE;
contentType = this._resolveContentType(contentType);
contentType = Utils.resolveContentType(contentType);
this._setAutoHandler(contentType, handler);
var ps =
Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefService);
var ps = Services.prefs;
var autoBranch = ps.getBranch(PREF_CONTENTHANDLERS_AUTO);
if (handler)
autoBranch.setCharPref(contentType, handler.uri);
else if (autoBranch.prefHasUserValue(contentType))
autoBranch.clearUserPref(contentType);
ps.savePrefFile(null);
},
@ -218,7 +292,7 @@ WebContentConverterRegistrar.prototype = {
loadPreferredHandler:
function WCCR_loadPreferredHandler(request) {
var channel = request.QueryInterface(Ci.nsIChannel);
var contentType = this._resolveContentType(channel.contentType);
var contentType = Utils.resolveContentType(channel.contentType);
var handler = this.getAutoHandler(contentType);
if (handler) {
request.cancel(Cr.NS_ERROR_FAILURE);
@ -268,15 +342,7 @@ WebContentConverterRegistrar.prototype = {
this._contentTypes[contentType].filter(notURI);
}
},
/**
*
*/
_mappings: {
"application/rss+xml": TYPE_MAYBE_FEED,
"application/atom+xml": TYPE_MAYBE_FEED,
},
/**
* These are types for which there is a separate content converter aside
* from our built in generic one. We should not automatically register
@ -285,57 +351,6 @@ WebContentConverterRegistrar.prototype = {
_blockedTypes: {
"application/vnd.mozilla.maybe.feed": true,
},
/**
* Determines the "internal" content type based on the _mappings.
* @param contentType
* @returns The resolved contentType value.
*/
_resolveContentType:
function WCCR__resolveContentType(contentType) {
if (contentType in this._mappings)
return this._mappings[contentType];
return contentType;
},
_makeURI: function(aURL, aOriginCharset, aBaseURI) {
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
return ioService.newURI(aURL, aOriginCharset, aBaseURI);
},
_checkAndGetURI:
function WCCR_checkAndGetURI(aURIString, aContentWindow)
{
try {
let baseURI = aContentWindow.document.baseURIObject;
var uri = this._makeURI(aURIString, null, baseURI);
} catch (ex) {
// not supposed to throw according to spec
return;
}
// For security reasons we reject non-http(s) urls (see bug 354316),
// we may need to revise this once we support more content types
// XXX this should be a "security exception" according to spec, but that
// isn't defined yet.
if (uri.scheme != "http" && uri.scheme != "https")
throw("Permission denied to add " + uri.spec + " as a content or protocol handler");
// We also reject handlers registered from a different host (see bug 402287)
// The pref allows us to test the feature
var pb = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
if ((!pb.prefHasUserValue(PREF_ALLOW_DIFFERENT_HOST) ||
!pb.getBoolPref(PREF_ALLOW_DIFFERENT_HOST)) &&
aContentWindow.location.hostname != uri.host)
throw("Permission denied to add " + uri.spec + " as a content or protocol handler");
// If the uri doesn't contain '%s', it won't be a good handler
if (uri.spec.indexOf("%s") < 0)
throw NS_ERROR_DOM_SYNTAX_ERR;
return uri;
},
/**
* Determines if a web handler is already registered.
@ -366,52 +381,41 @@ WebContentConverterRegistrar.prototype = {
* See nsIWebContentHandlerRegistrar
*/
registerProtocolHandler:
function WCCR_registerProtocolHandler(aProtocol, aURIString, aTitle, aContentWindow) {
function WCCR_registerProtocolHandler(aProtocol, aURIString, aTitle, aBrowserOrWindow) {
LOG("registerProtocolHandler(" + aProtocol + "," + aURIString + "," + aTitle + ")");
var uri = this._checkAndGetURI(aURIString, aContentWindow);
var haveWindow = (aBrowserOrWindow instanceof Ci.nsIDOMWindow);
var uri;
if (haveWindow) {
uri = Utils.checkAndGetURI(aURIString, aBrowserOrWindow);
} else {
// aURIString must not be a relative URI.
uri = Utils.makeURI(aURIString, null);
}
// If the protocol handler is already registered, just return early.
if (this._protocolHandlerRegistered(aProtocol, uri.spec)) {
return;
}
var browserWindow = this._getBrowserWindowForContentWindow(aContentWindow);
if (PrivateBrowsingUtils.isWindowPrivate(browserWindow)) {
var browser;
if (haveWindow) {
let browserWindow =
this._getBrowserWindowForContentWindow(aBrowserOrWindow);
browser = this._getBrowserForContentWindow(browserWindow,
aBrowserOrWindow);
} else {
browser = aBrowserOrWindow;
}
if (PrivateBrowsingUtils.isBrowserPrivate(browser)) {
// Inside the private browsing mode, we don't want to alert the user to save
// a protocol handler. We log it to the error console so that web developers
// would have some way to tell what's going wrong.
Cc["@mozilla.org/consoleservice;1"].
getService(Ci.nsIConsoleService).
Services.console.
logStringMessage("Web page denied access to register a protocol handler inside private browsing mode");
return;
}
// First, check to make sure this isn't already handled internally (we don't
// want to let them take over, say "chrome").
var ios = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
var handler = ios.getProtocolHandler(aProtocol);
if (!(handler instanceof Ci.nsIExternalProtocolHandler)) {
// This is handled internally, so we don't want them to register
// XXX this should be a "security exception" according to spec, but that
// isn't defined yet.
throw("Permission denied to add " + aURIString + "as a protocol handler");
}
// check if it is in the black list
var pb = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
var allowed;
try {
allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol);
}
catch (e) {
allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default");
}
if (!allowed) {
// XXX this should be a "security exception" according to spec
throw("Not allowed to register a protocol handler for " + aProtocol);
}
Utils.checkProtocolHandlerAllowed(aProtocol, aURIString);
// Now Ask the user and provide the proper callback
var message = this._getFormattedString("addProtocolHandler",
@ -451,8 +455,7 @@ WebContentConverterRegistrar.prototype = {
hs.store(handlerInfo);
}
};
var browserElement = this._getBrowserForContentWindow(browserWindow, aContentWindow);
var notificationBox = browserWindow.gBrowser.getNotificationBox(browserElement);
var notificationBox = browser.getTabBrowser().getNotificationBox(browser);
notificationBox.appendNotification(message,
notificationValue,
notificationIcon,
@ -465,23 +468,34 @@ WebContentConverterRegistrar.prototype = {
* If a DOM window is provided, then the request came from content, so we
* prompt the user to confirm the registration.
*/
registerContentHandler:
function WCCR_registerContentHandler(aContentType, aURIString, aTitle, aContentWindow) {
registerContentHandler:
function WCCR_registerContentHandler(aContentType, aURIString, aTitle, aWindowOrBrowser) {
LOG("registerContentHandler(" + aContentType + "," + aURIString + "," + aTitle + ")");
// We only support feed types at present.
// XXX this should be a "security exception" according to spec, but that
// isn't defined yet.
var contentType = this._resolveContentType(aContentType);
var contentType = Utils.resolveContentType(aContentType);
if (contentType != TYPE_MAYBE_FEED)
return;
if (aContentWindow) {
var uri = this._checkAndGetURI(aURIString, aContentWindow);
var browserWindow = this._getBrowserWindowForContentWindow(aContentWindow);
var browserElement = this._getBrowserForContentWindow(browserWindow, aContentWindow);
var notificationBox = browserWindow.gBrowser.getNotificationBox(browserElement);
if (aWindowOrBrowser) {
var haveWindow = (aWindowOrBrowser instanceof Ci.nsIDOMWindow);
var uri;
var notificationBox;
if (haveWindow) {
uri = Utils.checkAndGetURI(aURIString, aWindowOrBrowser);
var browserWindow = this._getBrowserWindowForContentWindow(aWindowOrBrowser);
var browserElement = this._getBrowserForContentWindow(browserWindow, aWindowOrBrowser);
notificationBox = browserElement.getTabBrowser().getNotificationBox(browserElement);
} else {
// uri was vetted in the content process.
uri = Utils.makeURI(aURIString, null);
notificationBox = aWindowOrBrowser.getTabBrowser()
.getNotificationBox(aWindowOrBrowser);
}
this._appendFeedReaderNotification(uri, aTitle, notificationBox);
}
else
@ -612,9 +626,7 @@ WebContentConverterRegistrar.prototype = {
*/
_saveContentHandlerToPrefs:
function WCCR__saveContentHandlerToPrefs(contentType, uri, title) {
var ps =
Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefService);
var ps = Services.prefs;
var i = 0;
var typeBranch = null;
while (true) {
@ -694,8 +706,7 @@ WebContentConverterRegistrar.prototype = {
if (contentType == TYPE_MAYBE_FEED) {
// Make the new handler the last-selected reader in the preview page
// and make sure the preview page is shown the next time a feed is visited
var pb = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefService).getBranch(null);
var pb = Services.prefs.getBranch(null);
pb.setCharPref(PREF_SELECTED_READER, "web");
var supportsString =
@ -800,9 +811,7 @@ WebContentConverterRegistrar.prototype = {
* preferences.
*/
_init: function WCCR__init() {
var ps =
Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefService);
var ps = Services.prefs;
var kids = ps.getBranch(PREF_CONTENTHANDLERS_BRANCH)
.getChildList("");
@ -850,9 +859,7 @@ WebContentConverterRegistrar.prototype = {
* See nsIObserver
*/
observe: function WCCR_observe(subject, topic, data) {
var os =
Cc["@mozilla.org/observer-service;1"].
getService(Ci.nsIObserverService);
var os = Services.obs;
switch (topic) {
case "app-startup":
os.addObserver(this, "browser-ui-startup-complete", false);
@ -890,4 +897,71 @@ WebContentConverterRegistrar.prototype = {
}]
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([WebContentConverterRegistrar]);
function WebContentConverterRegistrarContent() {
}
WebContentConverterRegistrarContent.prototype = {
/**
* See nsIWebContentHandlerRegistrar
*/
registerContentHandler(aContentType, aURIString, aTitle, aBrowserOrWindow) {
// aBrowserOrWindow must be a window.
let messageManager = aBrowserOrWindow.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShell)
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsITabChild)
.messageManager;
let uri = Utils.checkAndGetURI(aURIString, aBrowserOrWindow);
if (Utils.resolveContentType(aContentType) != TYPE_MAYBE_FEED) {
return;
}
messageManager.sendAsyncMessage("WCCR:registerContentHandler",
{ contentType: aContentType,
uri: uri.spec,
title: aTitle });
},
registerProtocolHandler(aProtocol, aURIString, aTitle, aBrowserOrWindow) {
// aBrowserOrWindow must be a window.
let messageManager = aBrowserOrWindow.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShell)
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsITabChild)
.messageManager;
let uri = Utils.checkAndGetURI(aURIString, aBrowserOrWindow);
Utils.checkProtocolHandlerAllowed(aProtocol, aURIString);
messageManager.sendAsyncMessage("WCCR:registerProtocolHandler",
{ protocol: aProtocol,
uri: uri.spec,
title: aTitle });
},
/**
* See nsIFactory
*/
createInstance: function WCCR_createInstance(outer, iid) {
if (outer != null)
throw Cr.NS_ERROR_NO_AGGREGATION;
return this.QueryInterface(iid);
},
classID: WCCR_CLASSID,
/**
* See nsISupports
*/
QueryInterface: XPCOMUtils.generateQI(
[Ci.nsIWebContentHandlerRegistrar,
Ci.nsIFactory])
};
this.NSGetFactory =
(Services.appinfo.processType === Services.appinfo.PROCESS_TYPE_CONTENT) ?
XPCOMUtils.generateNSGetFactory([WebContentConverterRegistrarContent]) :
XPCOMUtils.generateNSGetFactory([WebContentConverterRegistrar]);

View File

@ -1,5 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || e10s
skip-if = buildapp == 'mulet' || buildapp == 'b2g'
support-files =
bug368464-data.xml
bug408328-data.xml
@ -10,6 +10,9 @@ support-files =
valid-unsniffable-feed.xml
[test_bug436801.html]
skip-if = e10s
[test_bug494328.html]
skip-if = e10s
[test_bug589543.html]
skip-if = e10s
[test_registerHandler.html]

View File

@ -39,45 +39,45 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=402788
ok(navigator.registerContentHandler, "navigator.registerContentHandler should be defined");
// testing a generic case
is(true, testRegisterHandler(true, "foo", "http://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler should work");
is(true, testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler should work");
is(testRegisterHandler(true, "foo", "http://mochi.test:8888/%s", "Foo handler"), true, "registering a foo protocol handler should work");
is(testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/%s", "Foo handler"), true, "registering a foo content handler should work");
// testing with wrong uris
is(false, testRegisterHandler(true, "foo", "http://mochi.test:8888/", "Foo handler"), "a protocol handler uri should contain %s");
is(false, testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/", "Foo handler"), "a content handler uri should contain %s");
is(testRegisterHandler(true, "foo", "http://mochi.test:8888/", "Foo handler"), false, "a protocol handler uri should contain %s");
is(testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/", "Foo handler"), false, "a content handler uri should contain %s");
// the spec explicitly allows relative urls to be passed
is(true, testRegisterHandler(true, "foo", "foo/%s", "Foo handler"), "a protocol handler uri should be valid");
is(true, testRegisterHandler(false, "application/rss+xml", "foo/%s", "Foo handler"), "a content handler uri should be valid");
is(testRegisterHandler(true, "foo", "foo/%s", "Foo handler"), true, "a protocol handler uri should be valid");
is(testRegisterHandler(false, "application/rss+xml", "foo/%s", "Foo handler"), true, "a content handler uri should be valid");
// we should only accept to register when the handler has the same host as the current page (bug 402287)
is(false, testRegisterHandler(true, "foo", "http://remotehost:8888/%s", "Foo handler"), "registering a foo protocol handler with a different host should not work");
is(false, testRegisterHandler(false, "application/rss+xml", "http://remotehost:8888/%s", "Foo handler"), "registering a foo content handler with a different host should not work");
is(testRegisterHandler(true, "foo", "http://remotehost:8888/%s", "Foo handler"), false, "registering a foo protocol handler with a different host should not work");
is(testRegisterHandler(false, "application/rss+xml", "http://remotehost:8888/%s", "Foo handler"), false, "registering a foo content handler with a different host should not work");
// restriction to http(s) for the uri of the handler (bug 401343)
// https should work (http already tested in the generic case)
is(true, testRegisterHandler(true, "foo", "https://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with https scheme should work");
is(true, testRegisterHandler(false, "application/rss+xml", "https://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with https scheme should work");
is(testRegisterHandler(true, "foo", "https://mochi.test:8888/%s", "Foo handler"), true, "registering a foo protocol handler with https scheme should work");
is(testRegisterHandler(false, "application/rss+xml", "https://mochi.test:8888/%s", "Foo handler"), true, "registering a foo content handler with https scheme should work");
// ftp should not work
is(false, testRegisterHandler(true, "foo", "ftp://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with ftp scheme should not work");
is(false, testRegisterHandler(false, "application/rss+xml", "ftp://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with ftp scheme should not work");
is(testRegisterHandler(true, "foo", "ftp://mochi.test:8888/%s", "Foo handler"), false, "registering a foo protocol handler with ftp scheme should not work");
is(testRegisterHandler(false, "application/rss+xml", "ftp://mochi.test:8888/%s", "Foo handler"), false, "registering a foo content handler with ftp scheme should not work");
// chrome should not work
is(false, testRegisterHandler(true, "foo", "chrome://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with chrome scheme should not work");
is(false, testRegisterHandler(false, "application/rss+xml", "chrome://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with chrome scheme should not work");
is(testRegisterHandler(true, "foo", "chrome://mochi.test:8888/%s", "Foo handler"), false, "registering a foo protocol handler with chrome scheme should not work");
is(testRegisterHandler(false, "application/rss+xml", "chrome://mochi.test:8888/%s", "Foo handler"), false, "registering a foo content handler with chrome scheme should not work");
// foo should not work
is(false, testRegisterHandler(true, "foo", "foo://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with foo scheme should not work");
is(false, testRegisterHandler(false, "application/rss+xml", "foo://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with foo scheme should not work");
is(testRegisterHandler(true, "foo", "foo://mochi.test:8888/%s", "Foo handler"), false, "registering a foo protocol handler with foo scheme should not work");
is(testRegisterHandler(false, "application/rss+xml", "foo://mochi.test:8888/%s", "Foo handler"), false, "registering a foo content handler with foo scheme should not work");
// for security reasons, protocol handlers should never be registered for some schemes (chrome, vbscript, ...) (bug 402788)
is(false, testRegisterHandler(true, "chrome", "http://mochi.test:8888/%s", "chrome handler"), "registering a chrome protocol handler should not work");
is(false, testRegisterHandler(true, "vbscript", "http://mochi.test:8888/%s", "vbscript handler"), "registering a vbscript protocol handler should not work");
is(false, testRegisterHandler(true, "javascript", "http://mochi.test:8888/%s", "javascript handler"), "registering a javascript protocol handler should not work");
is(false, testRegisterHandler(true, "moz-icon", "http://mochi.test:8888/%s", "moz-icon handler"), "registering a moz-icon protocol handler should not work");
is(testRegisterHandler(true, "chrome", "http://mochi.test:8888/%s", "chrome handler"), false, "registering a chrome protocol handler should not work");
is(testRegisterHandler(true, "vbscript", "http://mochi.test:8888/%s", "vbscript handler"), false, "registering a vbscript protocol handler should not work");
is(testRegisterHandler(true, "javascript", "http://mochi.test:8888/%s", "javascript handler"), false, "registering a javascript protocol handler should not work");
is(testRegisterHandler(true, "moz-icon", "http://mochi.test:8888/%s", "moz-icon handler"), false, "registering a moz-icon protocol handler should not work");
// for security reasons, content handlers should never be registered for some types (html, ...)
is(true, testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/%s", "Foo handler"), "registering rss content handlers should work");
is(true, testRegisterHandler(false, "application/atom+xml", "http://mochi.test:8888/%s", "Foo handler"), "registering atom content handlers should work");
todo(false, testRegisterHandler(false, "text/html", "http://mochi.test:8888/%s", "Foo handler"), "registering html content handlers should not work"); // bug 403798
is(testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/%s", "Foo handler"), true, "registering rss content handlers should work");
is(testRegisterHandler(false, "application/atom+xml", "http://mochi.test:8888/%s", "Foo handler"), true, "registering atom content handlers should work");
todo_is(testRegisterHandler(false, "text/html", "http://mochi.test:8888/%s", "Foo handler"), false, "registering html content handlers should not work"); // bug 403798
</script>
</pre>

View File

@ -102,8 +102,13 @@ describe("loop.conversationViews", function () {
sdkDriver: {}
});
var textChatStore = new loop.store.TextChatStore(dispatcher, {
sdkDriver: {}
});
loop.store.StoreMixin.register({
conversationStore: conversationStore
conversationStore: conversationStore,
textChatStore: textChatStore
});
});

View File

@ -227,9 +227,9 @@ describe("loop.shared.mixins", function() {
sandbox.stub(view, "getDOMNode").returns({
querySelector: function(classSelector) {
if (classSelector.includes("local")) {
if (classSelector.indexOf("local") > -1) {
return localElement;
} else if (classSelector.includes("screen")) {
} else if (classSelector.indexOf("screen") > -1) {
return screenShareElement;
}
return remoteElement;

View File

@ -94,6 +94,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "RemotePrompt",
XPCOMUtils.defineLazyModuleGetter(this, "ContentPrefServiceParent",
"resource://gre/modules/ContentPrefServiceParent.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Feeds",
"resource:///modules/Feeds.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "SelfSupportBackend",
"resource:///modules/SelfSupportBackend.jsm");
@ -762,6 +765,7 @@ BrowserGlue.prototype = {
ContentClick.init();
RemotePrompt.init();
Feeds.init();
ContentPrefServiceParent.init();
LoginManagerParent.init();

View File

@ -89,8 +89,8 @@
<vbox>
<hbox align="center">
<checkbox id="privacyDoNotTrackCheckbox"
label="&dntTrackingNotOkay3.label;"
accesskey="&dntTrackingNotOkay3.accesskey;"
label="&dntTrackingNotOkay4.label;"
accesskey="&dntTrackingNotOkay4.accesskey;"
preference="privacy.donottrackheader.enabled"/>
<label id="doNotTrackInfo"
class="text-link"
@ -103,8 +103,8 @@
<hbox align="center">
<checkbox id="trackingProtection"
preference="privacy.trackingprotection.enabled"
accesskey="&trackingProtection3.accesskey;"
label="&trackingProtection3.label;" />
accesskey="&trackingProtection4.accesskey;"
label="&trackingProtection4.label;" />
<label id="trackingProtectionLearnMore"
class="text-link"
value="&trackingProtectionLearnMore.label;"/>
@ -114,8 +114,8 @@
<hbox align="center">
<checkbox id="trackingProtectionPBM"
preference="privacy.trackingprotection.pbmode.enabled"
accesskey="&trackingProtectionPBM3.accesskey;"
label="&trackingProtectionPBM3.label;" />
accesskey="&trackingProtectionPBM4.accesskey;"
label="&trackingProtectionPBM4.label;" />
<label id="trackingProtectionPBMLearnMore"
class="text-link"
value="&trackingProtectionPBMLearnMore.label;"/>

View File

@ -96,8 +96,8 @@
<hbox align="center">
<checkbox id="trackingProtection"
preference="privacy.trackingprotection.enabled"
accesskey="&trackingProtection3.accesskey;"
label="&trackingProtection3.label;" />
accesskey="&trackingProtection4.accesskey;"
label="&trackingProtection4.label;" />
<image id="trackingProtectionImage"
src="chrome://browser/skin/bad-content-blocked-16.png"/>
</hbox>
@ -111,8 +111,8 @@
<vbox>
<hbox align="center">
<checkbox id="privacyDoNotTrackCheckbox"
label="&dntTrackingNotOkay3.label;"
accesskey="&dntTrackingNotOkay3.accesskey;"
label="&dntTrackingNotOkay4.label;"
accesskey="&dntTrackingNotOkay4.accesskey;"
preference="privacy.donottrackheader.enabled"/>
</hbox>
<hbox align="center"

View File

@ -38,7 +38,6 @@ support-files =
[browser_privatebrowsing_placestitle.js]
[browser_privatebrowsing_popupblocker.js]
[browser_privatebrowsing_protocolhandler.js]
skip-if = e10s # Bug 940206 - nsIWebContentHandlerRegistrar::registerProtocolHandler doesn't work in e10s
[browser_privatebrowsing_sidebar.js]
[browser_privatebrowsing_theming.js]
[browser_privatebrowsing_ui.js]

View File

@ -26,7 +26,6 @@ CFLAGS="$CFLAGS -Wno-attributes"
CPPFLAGS="$CPPFLAGS -Wno-attributes"
CXXFLAGS="$CXXFLAGS -Wno-attributes"
TOOLTOOL_DIR="$(dirname $topsrcdir)"
export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig
. $topsrcdir/build/unix/mozconfig.gtk

View File

@ -7,11 +7,10 @@
"unpack": true
},
{
"size": 11179576,
"digest": "91567ce8e2bb8ab0ebc60c31e90731d88a1ea889fb71bcf55c735746a60fa7610b7e040ea3d8f727b6f692ae3ee703d6f3b30cdbd76fdf5617f77d9c38aa20ed",
"size": 4079256,
"digest": "bb5238558bcf6db2ca395513c8dccaa15dd61b3c375598eb6a685356b0c1a2d9840e3bf81bc00242b872fd798541f53d723777c754412abf0e772b7cc284937c",
"algorithm": "sha512",
"filename": "gtk3.tar.xz",
"setup": "setup.sh",
"unpack": true
},
{

View File

@ -0,0 +1,16 @@
[
{
"size": 80458572,
"digest": "e5101f9dee1e462f6cbd3897ea57eede41d23981825c7b20d91d23ab461875d54d3dfc24999aa58a31e8b01f49fb3140e05ffe5af2957ef1d1afb89fd0dfe1ad",
"algorithm": "sha512",
"filename": "gcc.tar.xz",
"unpack": true
},
{
"size": 167175,
"digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
"algorithm": "sha512",
"filename": "sccache.tar.bz2",
"unpack": true
}
]

View File

@ -8,13 +8,5 @@
"algorithm": "sha512",
"filename": "clang.tar.bz2",
"unpack": true
},
{
"size": 12057960,
"digest": "6105d6432943141cffb40020dc5ba3a793650bdeb3af9bd5e56d3796c5f03df9962a73e521646cd71fbfb5e266c1e74716ad722fb6055589dfb7d35175bca89e",
"algorithm": "sha512",
"filename": "gtk3.tar.xz",
"setup": "setup.sh",
"unpack": true
}
]

View File

@ -7,11 +7,10 @@
"unpack": true
},
{
"size": 12057960,
"digest": "6105d6432943141cffb40020dc5ba3a793650bdeb3af9bd5e56d3796c5f03df9962a73e521646cd71fbfb5e266c1e74716ad722fb6055589dfb7d35175bca89e",
"size": 4431740,
"digest": "68fc56b0fb0cdba629b95683d6649ff76b00dccf97af90960c3d7716f6108b2162ffd5ffcd5c3a60a21b28674df688fe4dabc67345e2da35ec5abeae3d48c8e3",
"algorithm": "sha512",
"filename": "gtk3.tar.xz",
"setup": "setup.sh",
"unpack": true
},
{

View File

@ -10,11 +10,10 @@
"unpack": true
},
{
"size": 12057960,
"digest": "6105d6432943141cffb40020dc5ba3a793650bdeb3af9bd5e56d3796c5f03df9962a73e521646cd71fbfb5e266c1e74716ad722fb6055589dfb7d35175bca89e",
"size": 4431740,
"digest": "68fc56b0fb0cdba629b95683d6649ff76b00dccf97af90960c3d7716f6108b2162ffd5ffcd5c3a60a21b28674df688fe4dabc67345e2da35ec5abeae3d48c8e3",
"algorithm": "sha512",
"filename": "gtk3.tar.xz",
"setup": "setup.sh",
"unpack": true
}
]

View File

@ -0,0 +1,16 @@
[
{
"size": 80458572,
"digest": "e5101f9dee1e462f6cbd3897ea57eede41d23981825c7b20d91d23ab461875d54d3dfc24999aa58a31e8b01f49fb3140e05ffe5af2957ef1d1afb89fd0dfe1ad",
"algorithm": "sha512",
"filename": "gcc.tar.xz",
"unpack": true
},
{
"size": 167175,
"digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
"algorithm": "sha512",
"filename": "sccache.tar.bz2",
"unpack": true
}
]

View File

@ -102,7 +102,7 @@ MarkerDetails.prototype = {
* for the moment.
*/
_onClick: function (e) {
let data = findActionFromEvent(e.target);
let data = findActionFromEvent(e.target, this._parent);
if (!data) {
return;
}
@ -121,7 +121,7 @@ MarkerDetails.prototype = {
};
/**
* Take an element from an event `target`, and asend through
* Take an element from an event `target`, and ascend through
* the DOM, looking for an element with a `data-action` attribute. Return
* the parsed `data-action` value found, or null if none found before
* reaching the parent `container`.

View File

@ -4,14 +4,14 @@
<!ENTITY tracking.label "Tracking">
<!ENTITY dntTrackingNotOkay3.label "Request that sites not track you.">
<!ENTITY dntTrackingNotOkay3.accesskey "n">
<!ENTITY dntTrackingNotOkay4.label "Request that sites not track you">
<!ENTITY dntTrackingNotOkay4.accesskey "n">
<!ENTITY doNotTrackInfo.label "Learn More">
<!ENTITY trackingProtection3.label "Stop sites from tracking you.">
<!ENTITY trackingProtection3.accesskey "m">
<!ENTITY trackingProtection4.label "Stop sites from tracking you">
<!ENTITY trackingProtection4.accesskey "m">
<!ENTITY trackingProtectionLearnMore.label "Learn more">
<!ENTITY trackingProtectionPBM3.label "Stop sites from tracking you in Private Windows.">
<!ENTITY trackingProtectionPBM3.accesskey "y">
<!ENTITY trackingProtectionPBM4.label "Stop sites from tracking you in Private Windows">
<!ENTITY trackingProtectionPBM4.accesskey "y">
<!ENTITY trackingProtectionPBMLearnMore.label "Learn more">
<!ENTITY history.label "History">

View File

@ -12,9 +12,35 @@ Components.utils.import("resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "BrowserUtils",
"resource://gre/modules/BrowserUtils.jsm");
const Ci = Components.interfaces;
const { interfaces: Ci, classes: Cc } = Components;
this.Feeds = {
init() {
let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
mm.addMessageListener("WCCR:registerProtocolHandler", this);
},
receiveMessage(aMessage) {
switch (aMessage.name) {
case "WCCR:registerProtocolHandler": {
let data = aMessage.data;
let registrar = Cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"].
getService(Ci.nsIWebContentHandlerRegistrar);
registrar.registerProtocolHandler(data.protocol, data.uri, data.title,
aMessage.target);
break;
}
case "WCCR:registerContentHandler": {
let data = aMessage.data;
let registrar = Cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"].
getService(Ci.nsIWebContentHandlerRegistrar);
registrar.registerContentHandler(data.contentType, data.uri, data.title,
aMessage.target);
break;
}
}
},
/**
* isValidFeed: checks whether the given data represents a valid feed.

View File

@ -1,5 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../../shared/devtools/canvasdebugger.inc.css

View File

@ -1,5 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../../shared/devtools/debugger.inc.css

View File

@ -1,5 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../../shared/devtools/performance.inc.css

View File

@ -1,5 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../../shared/devtools/scratchpad.inc.css

View File

@ -1,5 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../../shared/devtools/shadereditor.inc.css

View File

@ -1,5 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../../shared/devtools/webaudioeditor.inc.css

View File

@ -335,19 +335,19 @@ browser.jar:
skin/classic/browser/devtools/breadcrumbs-scrollbutton.png (../shared/devtools/images/breadcrumbs-scrollbutton.png)
skin/classic/browser/devtools/breadcrumbs-scrollbutton@2x.png (../shared/devtools/images/breadcrumbs-scrollbutton@2x.png)
skin/classic/browser/devtools/animationinspector.css (../shared/devtools/animationinspector.css)
* skin/classic/browser/devtools/canvasdebugger.css (devtools/canvasdebugger.css)
* skin/classic/browser/devtools/debugger.css (devtools/debugger.css)
* skin/classic/browser/devtools/canvasdebugger.css (../shared/devtools/canvasdebugger.css)
skin/classic/browser/devtools/debugger.css (../shared/devtools/debugger.css)
skin/classic/browser/devtools/eyedropper.css (../shared/devtools/eyedropper.css)
* skin/classic/browser/devtools/netmonitor.css (devtools/netmonitor.css)
* skin/classic/browser/devtools/performance.css (devtools/performance.css)
skin/classic/browser/devtools/performance.css (../shared/devtools/performance.css)
skin/classic/browser/devtools/promisedebugger.css (../shared/devtools/promisedebugger.css)
skin/classic/browser/devtools/timeline-filter.svg (../shared/devtools/images/timeline-filter.svg)
* skin/classic/browser/devtools/scratchpad.css (devtools/scratchpad.css)
* skin/classic/browser/devtools/shadereditor.css (devtools/shadereditor.css)
* skin/classic/browser/devtools/scratchpad.css (../shared/devtools/scratchpad.css)
skin/classic/browser/devtools/shadereditor.css (../shared/devtools/shadereditor.css)
* skin/classic/browser/devtools/splitview.css (../shared/devtools/splitview.css)
skin/classic/browser/devtools/styleeditor.css (../shared/devtools/styleeditor.css)
skin/classic/browser/devtools/storage.css (../shared/devtools/storage.css)
* skin/classic/browser/devtools/webaudioeditor.css (devtools/webaudioeditor.css)
skin/classic/browser/devtools/webaudioeditor.css (../shared/devtools/webaudioeditor.css)
skin/classic/browser/devtools/magnifying-glass.png (../shared/devtools/images/magnifying-glass.png)
skin/classic/browser/devtools/magnifying-glass@2x.png (../shared/devtools/images/magnifying-glass@2x.png)
skin/classic/browser/devtools/magnifying-glass-light.png (../shared/devtools/images/magnifying-glass-light.png)

View File

@ -1,6 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../shared.inc
%include ../../shared/devtools/canvasdebugger.inc.css

View File

@ -1,6 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../shared.inc
%include ../../shared/devtools/debugger.inc.css

View File

@ -1,6 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../shared.inc
%include ../../shared/devtools/performance.inc.css

View File

@ -1,5 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../../shared/devtools/scratchpad.inc.css

View File

@ -1,6 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../shared.inc
%include ../../shared/devtools/shadereditor.inc.css

View File

@ -1,6 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../shared.inc
%include ../../shared/devtools/webaudioeditor.inc.css

View File

@ -437,19 +437,19 @@ browser.jar:
skin/classic/browser/devtools/breadcrumbs-scrollbutton.png (../shared/devtools/images/breadcrumbs-scrollbutton.png)
skin/classic/browser/devtools/breadcrumbs-scrollbutton@2x.png (../shared/devtools/images/breadcrumbs-scrollbutton@2x.png)
skin/classic/browser/devtools/animationinspector.css (../shared/devtools/animationinspector.css)
* skin/classic/browser/devtools/canvasdebugger.css (devtools/canvasdebugger.css)
* skin/classic/browser/devtools/debugger.css (devtools/debugger.css)
* skin/classic/browser/devtools/canvasdebugger.css (../shared/devtools/canvasdebugger.css)
skin/classic/browser/devtools/debugger.css (../shared/devtools/debugger.css)
skin/classic/browser/devtools/eyedropper.css (../shared/devtools/eyedropper.css)
* skin/classic/browser/devtools/netmonitor.css (devtools/netmonitor.css)
* skin/classic/browser/devtools/performance.css (devtools/performance.css)
skin/classic/browser/devtools/performance.css (../shared/devtools/performance.css)
skin/classic/browser/devtools/promisedebugger.css (../shared/devtools/promisedebugger.css)
skin/classic/browser/devtools/timeline-filter.svg (../shared/devtools/images/timeline-filter.svg)
* skin/classic/browser/devtools/scratchpad.css (devtools/scratchpad.css)
* skin/classic/browser/devtools/shadereditor.css (devtools/shadereditor.css)
* skin/classic/browser/devtools/scratchpad.css (../shared/devtools/scratchpad.css)
skin/classic/browser/devtools/shadereditor.css (../shared/devtools/shadereditor.css)
* skin/classic/browser/devtools/splitview.css (../shared/devtools/splitview.css)
skin/classic/browser/devtools/styleeditor.css (../shared/devtools/styleeditor.css)
skin/classic/browser/devtools/storage.css (../shared/devtools/storage.css)
* skin/classic/browser/devtools/webaudioeditor.css (devtools/webaudioeditor.css)
skin/classic/browser/devtools/webaudioeditor.css (../shared/devtools/webaudioeditor.css)
skin/classic/browser/devtools/magnifying-glass.png (../shared/devtools/images/magnifying-glass.png)
skin/classic/browser/devtools/magnifying-glass@2x.png (../shared/devtools/images/magnifying-glass@2x.png)
skin/classic/browser/devtools/magnifying-glass-light.png (../shared/devtools/images/magnifying-glass-light.png)

View File

@ -53,10 +53,12 @@
--url-and-searchbar-color: #fff;
--urlbar-dropmarker-url: url("chrome://browser/skin/devedition/urlbar-history-dropmarker.svg");
--urlbar-dropmarker-region: rect(0px, 11px, 14px, 0px);
--urlbar-dropmarker-active-region: rect(0px, 22px, 14px, 11px);
--urlbar-dropmarker-hover-region: rect(0, 22px, 14px, 11px);
--urlbar-dropmarker-active-region: rect(0px, 33px, 14px, 22px);
--urlbar-dropmarker-2x-url: url("chrome://browser/skin/devedition/urlbar-history-dropmarker.svg");
--urlbar-dropmarker-2x-region: rect(0px, 11px, 14px, 0px);
--urlbar-dropmarker-active-2x-region: rect(0px, 22px, 14px, 11px);
--urlbar-dropmarker-hover-2x-region: rect(0, 22px, 14px, 11px);
--urlbar-dropmarker-active-2x-region: rect(0px, 33px, 14px, 22px);
--search-button-image: url("chrome://browser/skin/devedition/search.svg#search-icon-inverted");
}

View File

@ -200,6 +200,7 @@ treecol {
#doNotTrackInfo,
#trackingProtectionPBMLearnMore,
#trackingProtectionLearnMore {
-moz-margin-start: 1.5em !important;
margin-top: 0;
}

View File

@ -101,20 +101,27 @@
list-style-image: url("chrome://browser/skin/tabbrowser/crashed.svg");
}
.tab-icon-overlay[soundplaying][pinned] {
.tab-icon-overlay[soundplaying][pinned],
.tab-icon-overlay[muted][pinned] {
display: -moz-box;
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio");
border-radius: 8px;
}
.tab-icon-overlay[soundplaying][pinned]:hover,
.tab-icon-overlay[muted][pinned]:hover {
background-color: white;
}
.tab-icon-overlay[soundplaying][pinned] {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio");
}
.tab-icon-overlay[soundplaying][pinned]:hover {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-hover");
background-color: white;
}
.tab-icon-overlay[soundplaying][pinned]:hover:active {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-pressed");
background-color: white;
}
.tab-icon-overlay[muted][pinned] {
@ -179,7 +186,7 @@
padding: 0;
}
.tab-icon-sound:not([soundplaying]),
.tab-icon-sound:not([soundplaying]):not([muted]),
.tab-icon-sound[pinned] {
display: none;
}
@ -414,6 +421,7 @@
.tab-background-middle,
.tabs-newtab-button,
.tab-icon-overlay[soundplaying],
.tab-icon-overlay[muted],
.tab-icon-sound,
.tab-close-button {
pointer-events: auto;

View File

@ -772,9 +772,9 @@ toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-ba
}
#nav-bar .toolbarbutton-1[type=panel] > .toolbarbutton-icon,
#nav-bar .toolbarbutton-1[type=panel] > .toolbarbutton-badge-container,
#nav-bar .toolbarbutton-1[type=menu]:not(#back-button):not(#forward-button):not(#feed-button):not(#PanelUI-menu-button) > .toolbarbutton-icon,
#nav-bar .toolbarbutton-1[type=menu]:not(#back-button):not(#forward-button):not(#feed-button):not(#PanelUI-menu-button) > .toolbarbutton-badge-container,
#nav-bar .toolbarbutton-1[type=panel] > .toolbarbutton-badge-stack,
#nav-bar .toolbarbutton-1[type=menu]:not(#PanelUI-menu-button):not(#back-button):not(#forward-button) > .toolbarbutton-icon,
#nav-bar .toolbarbutton-1[type=menu]:not(#PanelUI-menu-button) > .toolbarbutton-badge-stack,
#nav-bar .toolbarbutton-1[type=menu] > .toolbarbutton-text /* hack for add-ons that forcefully display the label */ {
-moz-padding-end: 17px;
}

View File

@ -1,5 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../../shared/devtools/canvasdebugger.inc.css

View File

@ -1,5 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../../shared/devtools/debugger.inc.css

View File

@ -1,5 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../../shared/devtools/performance.inc.css

View File

@ -1,5 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../../shared/devtools/scratchpad.inc.css

View File

@ -1,5 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../../shared/devtools/shadereditor.inc.css

View File

@ -1,5 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%include ../../shared/devtools/webaudioeditor.inc.css

View File

@ -451,18 +451,18 @@ browser.jar:
skin/classic/browser/devtools/breadcrumbs-scrollbutton@2x.png (../shared/devtools/images/breadcrumbs-scrollbutton@2x.png)
skin/classic/browser/devtools/animationinspector.css (../shared/devtools/animationinspector.css)
skin/classic/browser/devtools/eyedropper.css (../shared/devtools/eyedropper.css)
* skin/classic/browser/devtools/canvasdebugger.css (devtools/canvasdebugger.css)
* skin/classic/browser/devtools/debugger.css (devtools/debugger.css)
* skin/classic/browser/devtools/canvasdebugger.css (../shared/devtools/canvasdebugger.css)
skin/classic/browser/devtools/debugger.css (../shared/devtools/debugger.css)
* skin/classic/browser/devtools/netmonitor.css (devtools/netmonitor.css)
* skin/classic/browser/devtools/performance.css (devtools/performance.css)
skin/classic/browser/devtools/performance.css (../shared/devtools/performance.css)
skin/classic/browser/devtools/promisedebugger.css (../shared/devtools/promisedebugger.css)
skin/classic/browser/devtools/timeline-filter.svg (../shared/devtools/images/timeline-filter.svg)
* skin/classic/browser/devtools/scratchpad.css (devtools/scratchpad.css)
* skin/classic/browser/devtools/shadereditor.css (devtools/shadereditor.css)
* skin/classic/browser/devtools/scratchpad.css (../shared/devtools/scratchpad.css)
skin/classic/browser/devtools/shadereditor.css (../shared/devtools/shadereditor.css)
skin/classic/browser/devtools/storage.css (../shared/devtools/storage.css)
* skin/classic/browser/devtools/splitview.css (../shared/devtools/splitview.css)
skin/classic/browser/devtools/styleeditor.css (../shared/devtools/styleeditor.css)
* skin/classic/browser/devtools/webaudioeditor.css (devtools/webaudioeditor.css)
skin/classic/browser/devtools/webaudioeditor.css (../shared/devtools/webaudioeditor.css)
skin/classic/browser/devtools/magnifying-glass.png (../shared/devtools/images/magnifying-glass.png)
skin/classic/browser/devtools/magnifying-glass@2x.png (../shared/devtools/images/magnifying-glass@2x.png)
skin/classic/browser/devtools/magnifying-glass-light.png (../shared/devtools/images/magnifying-glass-light.png)

View File

@ -57,7 +57,7 @@ build() {
cd build/$name
eval ../../$name-$version/configure --disable-static $* $configure_args
make $make_flags
make install DESTDIR=$root_dir/gtk3
make install-strip DESTDIR=$root_dir/gtk3
find $root_dir/gtk3 -name \*.la -delete
cd ../..
}
@ -103,44 +103,5 @@ build gtk+
rm -rf $root_dir/gtk3/usr/local/share/gtk-doc
rm -rf $root_dir/gtk3/usr/local/share/locale
# mock build environment doesn't have fonts in /usr/share/fonts, but
# has some in /usr/share/X11/fonts. Add this directory to the
# fontconfig configuration without changing the gtk3 tooltool package.
cat << EOF > $root_dir/gtk3/usr/local/etc/fonts/local.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>/usr/share/X11/fonts</dir>
</fontconfig>
EOF
cat <<EOF > $root_dir/gtk3/setup.sh
#!/bin/sh
cd \$(dirname \$0)
# pango expects absolute paths in pango.modules, and TOOLTOOL_DIR may vary...
LD_LIBRARY_PATH=./usr/local/lib \
PANGO_SYSCONFDIR=./usr/local/etc \
PANGO_LIBDIR=./usr/local/lib \
./usr/local/bin/pango-querymodules > ./usr/local/etc/pango/pango.modules
# same with gdb-pixbuf and loaders.cache
LD_LIBRARY_PATH=./usr/local/lib \
GDK_PIXBUF_MODULE_FILE=./usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
GDK_PIXBUF_MODULEDIR=./usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders \
./usr/local/bin/gdk-pixbuf-query-loaders > ./usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
# The fontconfig version in the tooltool package has known uses of
# uninitialized memory when creating its cache, and while most users
# will already have an existing cache, running Firefox on automation
# will create it. Combined with valgrind, this generates irrelevant
# errors.
# So create the fontconfig cache beforehand.
./usr/local/bin/fc-cache
EOF
chmod +x $root_dir/gtk3/setup.sh
cd $cwd
tar -C $root_dir -Jcf gtk3.tar.xz gtk3

View File

@ -1,28 +1,48 @@
TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
# $TOOLTOOL_DIR/gtk3 comes from tooltool, when the tooltool manifest contains it.
if [ -d "$TOOLTOOL_DIR/gtk3" ]; then
# $topsrcdir/gtk3 comes from tooltool, when the tooltool manifest contains it.
if [ -d "$topsrcdir/gtk3" ]; then
if [ -z "$PKG_CONFIG_LIBDIR" ]; then
echo PKG_CONFIG_LIBDIR must be set >&2
exit 1
fi
export PKG_CONFIG_SYSROOT_DIR="$TOOLTOOL_DIR/gtk3"
export PKG_CONFIG_PATH="$TOOLTOOL_DIR/gtk3/usr/local/lib/pkgconfig"
export PATH="$TOOLTOOL_DIR/gtk3/usr/local/bin:${PATH}"
export PKG_CONFIG_SYSROOT_DIR="$topsrcdir/gtk3"
export PKG_CONFIG_PATH="$topsrcdir/gtk3/usr/local/lib/pkgconfig"
export PATH="$topsrcdir/gtk3/usr/local/bin:${PATH}"
# Ensure cairo, gdk-pixbuf, etc. are not taken from the system installed packages.
LDFLAGS="-L$TOOLTOOL_DIR/gtk3/usr/local/lib ${LDFLAGS}"
LDFLAGS="-L$topsrcdir/gtk3/usr/local/lib ${LDFLAGS}"
mk_add_options "export LD_LIBRARY_PATH=$topsrcdir/gtk3/usr/local/lib"
ac_add_options --enable-default-toolkit=cairo-gtk3
# Set things up to use Gtk+3 from the tooltool package
mk_add_options "export FONTCONFIG_PATH=$TOOLTOOL_DIR/gtk3/usr/local/etc/fonts"
mk_add_options "export PANGO_SYSCONFDIR=$TOOLTOOL_DIR/gtk3/usr/local/etc"
mk_add_options "export PANGO_LIBDIR=$TOOLTOOL_DIR/gtk3/usr/local/lib"
mk_add_options "export GDK_PIXBUF_MODULE_FILE=$TOOLTOOL_DIR/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
mk_add_options "export GDK_PIXBUF_MODULEDIR=$TOOLTOOL_DIR/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders"
mk_add_options "export LD_LIBRARY_PATH=$TOOLTOOL_DIR/gtk3/usr/local/lib"
mk_add_options "export FONTCONFIG_PATH=$topsrcdir/gtk3/usr/local/etc/fonts"
mk_add_options "export PANGO_SYSCONFDIR=$topsrcdir/gtk3/usr/local/etc"
mk_add_options "export PANGO_LIBDIR=$topsrcdir/gtk3/usr/local/lib"
mk_add_options "export GDK_PIXBUF_MODULE_FILE=$topsrcdir/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
mk_add_options "export GDK_PIXBUF_MODULEDIR=$topsrcdir/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders"
mk_add_options "export LD_LIBRARY_PATH=$topsrcdir/gtk3/usr/local/lib"
# pango expects absolute paths in pango.modules, and topsrcdir may vary...
LD_LIBRARY_PATH=$topsrcdir/gtk3/usr/local/lib \
PANGO_SYSCONFDIR=$topsrcdir/gtk3/usr/local/etc \
PANGO_LIBDIR=$topsrcdir/gtk3/usr/local/lib \
$topsrcdir/gtk3/usr/local/bin/pango-querymodules > $topsrcdir/gtk3/usr/local/etc/pango/pango.modules
# same with gdb-pixbuf and loaders.cache
LD_LIBRARY_PATH=$topsrcdir/gtk3/usr/local/lib \
GDK_PIXBUF_MODULE_FILE=$topsrcdir/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
GDK_PIXBUF_MODULEDIR=$topsrcdir/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders \
$topsrcdir/gtk3/usr/local/bin/gdk-pixbuf-query-loaders > $topsrcdir/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
# mock build environment doesn't have fonts in /usr/share/fonts, but
# has some in /usr/share/X11/fonts. Add this directory to the
# fontconfig configuration without changing the gtk3 tooltool package.
cat << EOF > $topsrcdir/gtk3/usr/local/etc/fonts/local.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>/usr/share/X11/fonts</dir>
</fontconfig>
EOF
# Until a tooltool with bug 1188571 landed is available everywhere
$TOOLTOOL_DIR/gtk3/setup.sh
else
ac_add_options --enable-default-toolkit=cairo-gtk2
fi

View File

@ -111,13 +111,6 @@ class MachCommands(MachCommandBase):
'--show-possibly-lost=no',
'--track-origins=yes',
'--trace-children=yes',
# The gstreamer plugin scanner can run as part of executing
# firefox, but is an external program. In some weird cases,
# valgrind finds errors while executing __libc_freeres when
# it runs, but those are not relevant, as it's related to
# executing third party code. So don't trace
# gst-plugin-scanner.
'--trace-children-skip=*/gst-plugin-scanner',
'-v', # Enable verbosity to get the list of used suppressions
]

View File

@ -25,7 +25,7 @@ else
_arch=32
fi
TOOLTOOL_MANIFEST=browser/config/tooltool-manifests/linux${_arch}/releng.manifest
TOOLTOOL_MANIFEST=browser/config/tooltool-manifests/linux${_arch}/valgrind.manifest
TOOLTOOL_SERVER=https://api.pub.build.mozilla.org/tooltool/
(cd $srcdir; python /builds/tooltool.py --url $TOOLTOOL_SERVER --overwrite -m $TOOLTOOL_MANIFEST fetch ${TOOLTOOL_CACHE:+ -c ${TOOLTOOL_CACHE}}) || exit 2

View File

@ -17,11 +17,6 @@
// Silence "warning: #include_next is a GCC extension"
#pragma GCC system_header
#ifdef _WIN32
// Suppress windef.h min and max macros - they make std::min/max not compile.
#define NOMINMAX 1
#endif
// mozalloc.h wants <new>; break the cycle by always explicitly
// including <new> here. NB: this is a tad sneaky. Sez the gcc docs:
//

View File

@ -12,9 +12,6 @@
# error "STL code can only be used with -fno-exceptions"
#endif
// Suppress windef.h min and max macros - they make std::min/max not compile.
#define NOMINMAX 1
// Code built with !_HAS_EXCEPTIONS calls std::_Throw(), but the win2k
// CRT doesn't export std::_Throw(). So we define it.
#ifndef mozilla_Throw_h

View File

@ -2332,6 +2332,8 @@ ia64*-hpux*)
AC_DEFINE(HW_THREADS)
AC_DEFINE(STDC_HEADERS)
AC_DEFINE(WIN32_LEAN_AND_MEAN)
dnl See http://support.microsoft.com/kb/143208 to use STL
AC_DEFINE(NOMINMAX)
TARGET_MD_ARCH=win32
_PLATFORM_DEFAULT_TOOLKIT='cairo-windows'
BIN_SUFFIX='.exe'

View File

@ -1134,12 +1134,14 @@ nsFocusManager::ActivateOrDeactivate(nsPIDOMWindow* aWindow, bool aActive)
aWindow->ActivateOrDeactivate(aActive);
// Send the activate event.
nsContentUtils::DispatchEventOnlyToChrome(aWindow->GetExtantDoc(),
aWindow,
aActive ?
NS_LITERAL_STRING("activate") :
NS_LITERAL_STRING("deactivate"),
true, true, nullptr);
if (aWindow->GetExtantDoc()) {
nsContentUtils::DispatchEventOnlyToChrome(aWindow->GetExtantDoc(),
aWindow,
aActive ?
NS_LITERAL_STRING("activate") :
NS_LITERAL_STRING("deactivate"),
true, true, nullptr);
}
// Look for any remote child frames, iterate over them and send the activation notification.
nsContentUtils::CallOnAllRemoteChildren(aWindow, ActivateOrDeactivateChild,

View File

@ -2694,136 +2694,128 @@ protected:
mozilla::dom::VisibilityState mVisibilityState;
// True if BIDI is enabled.
bool mBidiEnabled;
bool mBidiEnabled : 1;
// True if a MathML element has ever been owned by this document.
bool mMathMLEnabled;
bool mMathMLEnabled : 1;
// True if this document is the initial document for a window. This should
// basically be true only for documents that exist in newly-opened windows or
// documents created to satisfy a GetDocument() on a window when there's no
// document in it.
bool mIsInitialDocumentInWindow;
bool mIsInitialDocumentInWindow : 1;
// True if we're loaded as data and therefor has any dangerous stuff, such
// as scripts and plugins, disabled.
bool mLoadedAsData;
bool mLoadedAsData : 1;
// This flag is only set in XMLDocument, for e.g. documents used in XBL. We
// don't want animations to play in such documents, so we need to store the
// flag here so that we can check it in nsDocument::GetAnimationController.
bool mLoadedAsInteractiveData;
bool mLoadedAsInteractiveData : 1;
// If true, whoever is creating the document has gotten it to the
// point where it's safe to start layout on it.
bool mMayStartLayout;
bool mMayStartLayout : 1;
// True iff we've ever fired a DOMTitleChanged event for this document
bool mHaveFiredTitleChange;
bool mHaveFiredTitleChange : 1;
// True iff IsShowing() should be returning true
bool mIsShowing;
bool mIsShowing : 1;
// True iff the document "page" is not hidden (i.e. currently in the
// bfcache)
bool mVisible;
bool mVisible : 1;
// True if our content viewer has been removed from the docshell
// (it may still be displayed, but in zombie state). Form control data
// has been saved.
bool mRemovedFromDocShell;
bool mRemovedFromDocShell : 1;
// True iff DNS prefetch is allowed for this document. Note that if the
// document has no window, DNS prefetch won't be performed no matter what.
bool mAllowDNSPrefetch;
bool mAllowDNSPrefetch : 1;
// True when this document is a static clone of a normal document
bool mIsStaticDocument;
bool mIsStaticDocument : 1;
// True while this document is being cloned to a static document.
bool mCreatingStaticClone;
bool mCreatingStaticClone : 1;
// True iff the document is being unlinked or deleted.
bool mInUnlinkOrDeletion;
bool mInUnlinkOrDeletion : 1;
// True if document has ever had script handling object.
bool mHasHadScriptHandlingObject;
bool mHasHadScriptHandlingObject : 1;
// True if we're an SVG document being used as an image.
bool mIsBeingUsedAsImage;
bool mIsBeingUsedAsImage : 1;
// True is this document is synthetic : stand alone image, video, audio
// file, etc.
bool mIsSyntheticDocument;
bool mIsSyntheticDocument : 1;
// True if this document has links whose state needs updating
bool mHasLinksToUpdate;
bool mHasLinksToUpdate : 1;
// True if a layout flush might not be a no-op
bool mNeedLayoutFlush;
bool mNeedLayoutFlush : 1;
// True if a style flush might not be a no-op
bool mNeedStyleFlush;
bool mNeedStyleFlush : 1;
// True if a DOMMutationObserver is perhaps attached to a node in the document.
bool mMayHaveDOMMutationObservers;
bool mMayHaveDOMMutationObservers : 1;
// True if an nsIAnimationObserver is perhaps attached to a node in the document.
bool mMayHaveAnimationObservers;
bool mMayHaveAnimationObservers : 1;
// True if a document has loaded Mixed Active Script (see nsMixedContentBlocker.cpp)
bool mHasMixedActiveContentLoaded;
bool mHasMixedActiveContentLoaded : 1;
// True if a document has blocked Mixed Active Script (see nsMixedContentBlocker.cpp)
bool mHasMixedActiveContentBlocked;
bool mHasMixedActiveContentBlocked : 1;
// True if a document has loaded Mixed Display/Passive Content (see nsMixedContentBlocker.cpp)
bool mHasMixedDisplayContentLoaded;
bool mHasMixedDisplayContentLoaded : 1;
// True if a document has blocked Mixed Display/Passive Content (see nsMixedContentBlocker.cpp)
bool mHasMixedDisplayContentBlocked;
bool mHasMixedDisplayContentBlocked : 1;
// True if a document has blocked Tracking Content
bool mHasTrackingContentBlocked;
bool mHasTrackingContentBlocked : 1;
// True if a document has loaded Tracking Content
bool mHasTrackingContentLoaded;
bool mHasTrackingContentLoaded : 1;
// True if DisallowBFCaching has been called on this document.
bool mBFCacheDisallowed;
bool mBFCacheDisallowed : 1;
// If true, we have an input encoding. If this is false, then the
// document was created entirely in memory
bool mHaveInputEncoding;
bool mHaveInputEncoding : 1;
bool mHasHadDefaultView;
bool mHasHadDefaultView : 1;
// Whether style sheet change events will be dispatched for this document
bool mStyleSheetChangeEventsEnabled;
bool mStyleSheetChangeEventsEnabled : 1;
// Whether the document was created by a srcdoc iframe.
bool mIsSrcdocDocument;
bool mIsSrcdocDocument : 1;
// Records whether we've done a document.open. If this is true, it's possible
// for nodes from this document to have outdated wrappers in their wrapper
// caches.
bool mDidDocumentOpen;
#ifdef DEBUG
/**
* This is true while FlushPendingLinkUpdates executes. Calls to
* [Un]RegisterPendingLinkUpdate will assert when this is true.
*/
bool mIsLinkUpdateRegistrationsForbidden;
#endif
bool mDidDocumentOpen : 1;
// Is the current mFontFaceSet valid?
bool mFontFaceSetDirty;
bool mFontFaceSetDirty : 1;
// Has GetUserFontSet() been called?
bool mGetUserFontSetCalled;
bool mGetUserFontSetCalled : 1;
// Do we currently have an event posted to call FlushUserFontSet?
bool mPostedFlushUserFontSet;
bool mPostedFlushUserFontSet : 1;
enum Type {
eUnknown, // should never be used
@ -2834,17 +2826,25 @@ protected:
eXUL
};
uint8_t mType;
Type mType;
uint8_t mDefaultElementType;
enum {
enum Tri {
eTriUnset = 0,
eTriFalse,
eTriTrue
};
uint8_t mAllowXULXBL;
Tri mAllowXULXBL;
#ifdef DEBUG
/**
* This is true while FlushPendingLinkUpdates executes. Calls to
* [Un]RegisterPendingLinkUpdate will assert when this is true.
*/
bool mIsLinkUpdateRegistrationsForbidden;
#endif
// The document's script global object, the object from which the
// document can get its script context and scope. This is the

View File

@ -95,6 +95,24 @@ nsStructuredCloneContainer::InitFromBase64(const nsAString &aData,
return NS_OK;
}
nsresult
nsStructuredCloneContainer::DeserializeToJsval(JSContext* aCx,
JS::MutableHandle<JS::Value> aValue)
{
aValue.setNull();
JS::Rooted<JS::Value> jsStateObj(aCx);
bool hasTransferable = false;
bool success = JS_ReadStructuredClone(aCx, mData, mSize, mVersion,
&jsStateObj, nullptr, nullptr) &&
JS_StructuredCloneHasTransferables(mData, mSize,
&hasTransferable);
// We want to be sure that mData doesn't contain transferable objects
MOZ_ASSERT(!hasTransferable);
NS_ENSURE_STATE(success && !hasTransferable);
aValue.set(jsStateObj);
return NS_OK;
}
nsresult
nsStructuredCloneContainer::DeserializeToVariant(JSContext *aCx,
@ -106,14 +124,8 @@ nsStructuredCloneContainer::DeserializeToVariant(JSContext *aCx,
// Deserialize to a JS::Value.
JS::Rooted<JS::Value> jsStateObj(aCx);
bool hasTransferable = false;
bool success = JS_ReadStructuredClone(aCx, mData, mSize, mVersion,
&jsStateObj, nullptr, nullptr) &&
JS_StructuredCloneHasTransferables(mData, mSize,
&hasTransferable);
// We want to be sure that mData doesn't contain transferable objects
MOZ_ASSERT(!hasTransferable);
NS_ENSURE_STATE(success && !hasTransferable);
nsresult rv = DeserializeToJsval(aCx, &jsStateObj);
NS_ENSURE_SUCCESS(rv, rv);
// Now wrap the JS::Value as an nsIVariant.
nsCOMPtr<nsIVariant> varStateObj;

View File

@ -6,6 +6,7 @@ include protocol PBackground;
include protocol PBlob; // FIXME: bug 792908
include protocol PCache;
include protocol PCacheOp;
include protocol PCachePushStream;
include protocol PCacheStreamControl;
include protocol PFileDescriptorSet;

View File

@ -4,9 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# http://support.microsoft.com/kb/143208
DEFINES['NOMINMAX'] = True
GeckoCppUnitTests([
'TestWebGLElementArrayCache',
])

View File

@ -36,9 +36,6 @@ EXPORTS.mozilla.dom += [
'WebGLVertexArrayObject.h',
]
# http://support.microsoft.com/kb/143208
DEFINES['NOMINMAX'] = True
# Canvas 2D and common sources
UNIFIED_SOURCES += [
'CanvasImageCache.cpp',

View File

@ -499,29 +499,29 @@ interface nsIDOMWindowUtils : nsISupports {
* scroll.
* @param aOptions Set following flags.
*/
const unsigned long WHEEL_EVENT_CAUSED_BY_NO_LINE_OR_PAGE_DELTA_DEVICE = 0x0001;
// @deprecated Use WHEEL_EVENT_CAUSED_BY_NO_LINE_OR_PAGE_DELTA_DEVICE.
const unsigned long WHEEL_EVENT_CAUSED_BY_PIXEL_ONLY_DEVICE = 0x0001;
const unsigned long WHEEL_EVENT_CAUSED_BY_MOMENTUM = 0x0002;
const unsigned long WHEEL_EVENT_CUSTOMIZED_BY_USER_PREFS = 0x0004;
// If any of the following flags is specified this method will throw an
// exception in case the relevant overflowDelta has an unexpected value.
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_ZERO = 0x0010;
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_POSITIVE = 0x0020;
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_NEGATIVE = 0x0040;
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_ZERO = 0x0100;
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_POSITIVE = 0x0200;
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_NEGATIVE = 0x0400;
void sendWheelEvent(in float aX,
in float aY,
in double aDeltaX,
in double aDeltaY,
in double aDeltaZ,
in unsigned long aDeltaMode,
in long aModifiers,
in long aLineOrPageDeltaX,
in long aLineOrPageDeltaY,
in unsigned long aOptions);
const unsigned long WHEEL_EVENT_CAUSED_BY_NO_LINE_OR_PAGE_DELTA_DEVICE = 0x0001;
// @deprecated Use WHEEL_EVENT_CAUSED_BY_NO_LINE_OR_PAGE_DELTA_DEVICE.
const unsigned long WHEEL_EVENT_CAUSED_BY_PIXEL_ONLY_DEVICE = 0x0001;
const unsigned long WHEEL_EVENT_CAUSED_BY_MOMENTUM = 0x0002;
const unsigned long WHEEL_EVENT_CUSTOMIZED_BY_USER_PREFS = 0x0004;
// If any of the following flags is specified this method will throw an
// exception in case the relevant overflowDelta has an unexpected value.
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_ZERO = 0x0010;
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_POSITIVE = 0x0020;
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_NEGATIVE = 0x0040;
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_ZERO = 0x0100;
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_POSITIVE = 0x0200;
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_NEGATIVE = 0x0400;
void sendWheelEvent(in float aX,
in float aY,
in double aDeltaX,
in double aDeltaY,
in double aDeltaZ,
in unsigned long aDeltaMode,
in long aModifiers,
in long aLineOrPageDeltaX,
in long aLineOrPageDeltaY,
in unsigned long aOptions);
/**
* Synthesize a key event to the window. The event types supported are:
@ -1359,16 +1359,16 @@ interface nsIDOMWindowUtils : nsISupports {
/**
* Returns a handle which represents current recording start position.
*/
void startFrameTimeRecording([retval] out unsigned long startIndex);
void startFrameTimeRecording([retval] out unsigned long startIndex);
/**
* Returns number of recorded frames since startIndex was issued,
* and allocates+populates 2 arraye with the recorded data.
* - Allocation is infallible. Should be released even if size is 0.
*/
void stopFrameTimeRecording(in unsigned long startIndex,
[optional] out unsigned long frameCount,
[retval, array, size_is(frameCount)] out float frameIntervals);
void stopFrameTimeRecording(in unsigned long startIndex,
[optional] out unsigned long frameCount,
[retval, array, size_is(frameCount)] out float frameIntervals);
/**
* Signals that we're begining to tab switch. This is used by painting code to
@ -1697,7 +1697,7 @@ interface nsIDOMWindowUtils : nsISupports {
* After calling the method, the window for which this DOMWindowUtils
* was created can be closed using scripts.
*/
void allowScriptsToClose();
void allowScriptsToClose();
/**
* Is the parent window's main widget visible? If it isn't, we probably
@ -1710,109 +1710,109 @@ interface nsIDOMWindowUtils : nsISupports {
*/
readonly attribute boolean isParentWindowMainWidgetVisible;
/**
* In certain cases the event handling of nodes, form controls in practice,
* may be disabled. Such cases are for example the existence of disabled
* attribute or -moz-user-input: none/disabled.
*/
boolean isNodeDisabledForEvents(in nsIDOMNode aNode);
/**
* In certain cases the event handling of nodes, form controls in practice,
* may be disabled. Such cases are for example the existence of disabled
* attribute or -moz-user-input: none/disabled.
*/
boolean isNodeDisabledForEvents(in nsIDOMNode aNode);
/**
* Setting paintFlashing to true will flash newly painted area.
*/
attribute boolean paintFlashing;
/**
* Setting paintFlashing to true will flash newly painted area.
*/
attribute boolean paintFlashing;
/**
* Add a "synchronous section", in the form of an nsIRunnable run once the
* event loop has reached a "stable state". |runnable| must not cause any
* queued events to be processed (i.e. must not spin the event loop).
* We've reached a stable state when the currently executing task/event has
* finished, see:
* http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#synchronous-section
* In practice this runs aRunnable once the currently executing event
* finishes. If called multiple times per task/event, all the runnables will
* be executed, in the order in which runInStableState() was called.
*
* XXX - This can wreak havoc if you're not using this for very simple
* purposes, eg testing or setting a flag.
*/
void runInStableState(in nsIRunnable runnable);
/**
* Add a "synchronous section", in the form of an nsIRunnable run once the
* event loop has reached a "stable state". |runnable| must not cause any
* queued events to be processed (i.e. must not spin the event loop).
* We've reached a stable state when the currently executing task/event has
* finished, see:
* http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#synchronous-section
* In practice this runs aRunnable once the currently executing event
* finishes. If called multiple times per task/event, all the runnables will
* be executed, in the order in which runInStableState() was called.
*
* XXX - This can wreak havoc if you're not using this for very simple
* purposes, eg testing or setting a flag.
*/
void runInStableState(in nsIRunnable runnable);
/**
* Run the given runnable before the next iteration of the event loop (this
* includes native events too). If a nested loop is spawned within the current
* event then the runnable will not be run until that loop has terminated.
*
* XXX - This can wreak havoc if you're not using this for very simple
* purposes, eg testing or setting a flag.
*/
void runBeforeNextEvent(in nsIRunnable runnable);
/**
* Run the given runnable before the next iteration of the event loop (this
* includes native events too). If a nested loop is spawned within the current
* event then the runnable will not be run until that loop has terminated.
*
* XXX - This can wreak havoc if you're not using this for very simple
* purposes, eg testing or setting a flag.
*/
void runBeforeNextEvent(in nsIRunnable runnable);
/*
* Returns the value of a given property animated on the compositor thread.
* If the property is NOT currently being animated on the compositor thread,
* returns an empty string.
*/
AString getOMTAStyle(in nsIDOMElement aElement, in AString aProperty,
[optional] in AString aPseudoElement);
/*
* Returns the value of a given property animated on the compositor thread.
* If the property is NOT currently being animated on the compositor thread,
* returns an empty string.
*/
AString getOMTAStyle(in nsIDOMElement aElement, in AString aProperty,
[optional] in AString aPseudoElement);
/**
* Special function that gets a property syncronously from the last composite
* that occured.
*
* Supported properties:
* "overdraw": Report a percentage between 0 and 999 indicate how many times
* each pixels on the destination window have been touched.
* "missed_hwc": Report a bool if hardware composer is supported but was
* not used for the last frame.
*/
float requestCompositorProperty(in AString aProperty);
/**
* Special function that gets a property syncronously from the last composite
* that occured.
*
* Supported properties:
* "overdraw": Report a percentage between 0 and 999 indicate how many times
* each pixels on the destination window have been touched.
* "missed_hwc": Report a bool if hardware composer is supported but was
* not used for the last frame.
*/
float requestCompositorProperty(in AString aProperty);
/**
* If aHandlingInput is true, this informs the event state manager that
* we're handling user input. Otherwise, this is a no-op (as by default
* we're not handling user input).
* Remember to call destruct() on the return value!
* See also nsIDOMWindowUtils::isHandlingUserInput.
*/
nsIJSRAIIHelper setHandlingUserInput(in boolean aHandlingInput);
/**
* If aHandlingInput is true, this informs the event state manager that
* we're handling user input. Otherwise, this is a no-op (as by default
* we're not handling user input).
* Remember to call destruct() on the return value!
* See also nsIDOMWindowUtils::isHandlingUserInput.
*/
nsIJSRAIIHelper setHandlingUserInput(in boolean aHandlingInput);
/**
* Get the content- and compositor-side APZ test data instances.
* The return values are of type APZTestData (see APZTestData.webidl).
*/
[implicit_jscontext] jsval getContentAPZTestData();
[implicit_jscontext] jsval getCompositorAPZTestData();
/**
* Get the content- and compositor-side APZ test data instances.
* The return values are of type APZTestData (see APZTestData.webidl).
*/
[implicit_jscontext] jsval getContentAPZTestData();
[implicit_jscontext] jsval getCompositorAPZTestData();
/**
* Posts an eRestyle_Self restyle event for the given element.
*/
void postRestyleSelfEvent(in nsIDOMElement aElement);
/**
* Posts an eRestyle_Self restyle event for the given element.
*/
void postRestyleSelfEvent(in nsIDOMElement aElement);
/**
* With this it's possible to mute all the MediaElements in this window.
* We have audioMuted and audioVolume to preserve the volume across
* mute/umute.
*/
attribute boolean audioMuted;
/**
* With this it's possible to mute all the MediaElements in this window.
* We have audioMuted and audioVolume to preserve the volume across
* mute/umute.
*/
attribute boolean audioMuted;
/**
* range: greater or equal to 0. The real volume level is affected by the
* volume of all ancestor windows.
*/
attribute float audioVolume;
/**
* range: greater or equal to 0. The real volume level is affected by the
* volume of all ancestor windows.
*/
attribute float audioVolume;
/**
* This method doesn't do anything useful. It was solely added for the
* purpose of the test for bug 503926.
*/
void xpconnectArgument(in nsIDOMWindowUtils aThis);
/**
* This method doesn't do anything useful. It was solely added for the
* purpose of the test for bug 503926.
*/
void xpconnectArgument(in nsIDOMWindowUtils aThis);
/**
* Helper for JS components that need to send permission requests with
* e10s support properly.
*/
void askPermission(in nsIContentPermissionRequest aRequest);
/**
* Helper for JS components that need to send permission requests with
* e10s support properly.
*/
void askPermission(in nsIContentPermissionRequest aRequest);
/**
* Number of frames constructed (excluding breaking) for the curent

View File

@ -27,7 +27,7 @@ interface nsIDocument;
* string containing a copy of the container's serialized data, using
* getDataAsBase64.
*/
[scriptable, uuid(63eeafec-63f5-42c3-aea9-5c04678784e7)]
[scriptable, uuid(c664aae7-0d67-4155-a2dd-a3861778626f)]
interface nsIStructuredCloneContainer : nsISupports
{
/**
@ -45,9 +45,17 @@ interface nsIStructuredCloneContainer : nsISupports
[implicit_jscontext]
void initFromBase64(in AString aData,in unsigned long aFormatVersion);
/**
* Deserializes this structured clone container returning it as a jsval.
* Can be called on main and worker threads.
*/
[implicit_jscontext]
jsval deserializeToJsval();
/**
* Deserialize the object this container holds, returning it wrapped as
* an nsIVariant.
* Main thread only!
*/
[implicit_jscontext]
nsIVariant deserializeToVariant();

View File

@ -11,7 +11,7 @@
* uses service workers to notify applications. This interface exists to allow
* privileged code to receive messages without migrating to service workers.
*/
[scriptable, uuid(abde228b-7d14-4cab-b1f9-9f87750ede0f)]
[scriptable, uuid(74586476-d73f-4867-bece-87c1dea35750)]
interface nsIPushNotificationService : nsISupports
{
/**
@ -48,7 +48,12 @@ interface nsIPushNotificationService : nsISupports
jsval registration(in string scope, in jsval originAttributes);
/**
* Clear all subscriptions
* Clear all subscriptions.
*/
jsval clearAll();
jsval clearAll();
/**
* Clear subscriptions for a domain.
*/
jsval clearForDomain(in string domain);
};

View File

@ -6,8 +6,6 @@
#include "nsISupports.idl"
interface nsIDOMWindow;
/**
* nsIWebContentHandlerRegistrar
*
@ -19,7 +17,7 @@ interface nsIDOMWindow;
* can invoke it.
*/
[scriptable, uuid(e6a75410-c93e-42bf-84ca-a5c3ec34a2f1)]
[scriptable, uuid(65a3fafd-0e4a-4b06-8b4e-6a611da63d98)]
interface nsIWebContentHandlerRegistrar : nsISupports
{
/**
@ -30,11 +28,11 @@ interface nsIWebContentHandlerRegistrar : nsISupports
void registerContentHandler(in DOMString mimeType,
in DOMString uri,
in DOMString title,
in nsIDOMWindow contentWindow);
in nsISupports windowOrBrowser);
void registerProtocolHandler(in DOMString protocol,
in DOMString uri,
in DOMString title,
in nsIDOMWindow contentWindow);
in nsISupports windowOrBrowser);
};
%{ C++

View File

@ -193,6 +193,7 @@
#include "mozilla/RemoteSpellCheckEngineChild.h"
#include "GMPServiceChild.h"
#include "gfxPlatform.h"
#include "nscore.h" // for NS_FREE_PERMANENT_DATA
using namespace mozilla;
using namespace mozilla::docshell;
@ -762,6 +763,14 @@ ContentChild::AppendProcessId(nsACString& aName)
aName.Append(nsPrintfCString("(pid %u)", pid));
}
void
ContentChild::InitGraphicsDeviceData()
{
// Initialize the graphics platform. This may contact the parent process
// to read device preferences.
gfxPlatform::GetPlatform();
}
void
ContentChild::InitXPCOM()
{
@ -1897,7 +1906,7 @@ ContentChild::ActorDestroy(ActorDestroyReason why)
QuickExit();
}
#if !defined(DEBUG) && !defined(MOZ_ASAN)
#ifndef NS_FREE_PERMANENT_DATA
// In release builds, there's no point in the content process
// going through the full XPCOM shutdown path, because it doesn't
// keep persistent state.

View File

@ -76,6 +76,7 @@ public:
IPC::Channel* aChannel);
void InitProcessAttributes();
void InitXPCOM();
void InitGraphicsDeviceData();
static ContentChild* GetSingleton() {
return sSingleton;

View File

@ -5148,6 +5148,13 @@ ContentParent::RecvProfile(const nsCString& aProfile)
return true;
}
bool
ContentParent::RecvGetGraphicsDeviceInitData(DeviceInitData* aOut)
{
gfxPlatform::GetPlatform()->GetDeviceInitData(aOut);
return true;
}
} // namespace dom
} // namespace mozilla

View File

@ -862,6 +862,7 @@ private:
virtual bool RecvGamepadListenerAdded() override;
virtual bool RecvGamepadListenerRemoved() override;
virtual bool RecvProfile(const nsCString& aProfile) override;
virtual bool RecvGetGraphicsDeviceInitData(DeviceInitData* aOut) override;
// If you add strong pointers to cycle collected objects here, be sure to
// release these objects in ShutDownProcess. See the comment there for more

View File

@ -76,10 +76,11 @@ bool
ContentProcess::Init()
{
mContent.Init(IOThreadChild::message_loop(),
ParentPid(),
IOThreadChild::channel());
ParentPid(),
IOThreadChild::channel());
mXREEmbed.Start();
mContent.InitXPCOM();
mContent.InitGraphicsDeviceData();
#if defined(XP_WIN) && defined(MOZ_CONTENT_SANDBOX)
SetUpSandboxEnvironment();

View File

@ -60,6 +60,7 @@ include PluginTypes;
include ProtocolTypes;
include PContentPermission;
include BrowserConfiguration;
include GraphicsMessages;
// Workaround to prevent error if PContentChild.cpp & PContentBridgeParent.cpp
// are put into different UnifiedProtocolsXX.cpp files.
@ -1053,6 +1054,12 @@ parent:
async Profile(nsCString aProfile);
/**
* Request graphics initialization information from the parent.
*/
sync GetGraphicsDeviceInitData()
returns (DeviceInitData aData);
both:
AsyncMessage(nsString aMessage, ClonedMessageData aData,
CpowEntry[] aCpows, Principal aPrincipal);

View File

@ -3237,9 +3237,15 @@ TabParent::RecvInvokeDragSession(nsTArray<IPCDataTransfer>&& aTransfers,
const int32_t& aDragAreaX, const int32_t& aDragAreaY)
{
mInitialDataTransferItems.Clear();
nsPresContext* pc = mFrameElement->OwnerDoc()->GetShell()->GetPresContext();
EventStateManager* esm = pc->EventStateManager();
nsIPresShell* shell = mFrameElement->OwnerDoc()->GetShell();
if (!shell) {
if (Manager()->IsContentParent()) {
unused << Manager()->AsContentParent()->SendEndDragSession(true, true);
}
return true;
}
EventStateManager* esm = shell->GetPresContext()->EventStateManager();
for (uint32_t i = 0; i < aTransfers.Length(); ++i) {
auto& items = aTransfers[i].items();
nsTArray<DataTransferItem>* itemArray = mInitialDataTransferItems.AppendElement();

View File

@ -6,7 +6,6 @@ BlockMixedActiveContent = Blocked loading mixed active content "%1$S"
# CORS
# LOCALIZATION NOTE: Do not translate "Access-Control-Allow-Origin", Access-Control-Allow-Credentials, Access-Control-Allow-Methods, Access-Control-Allow-Headers
CORSDisabled=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS disabled).
CORSRequestFailed=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS request failed).
CORSRequestNotHttp=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS request not http).
CORSMissingAllowOrigin=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
CORSAllowOriginNotMatchingOrigin=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS header 'Access-Control-Allow-Origin' does not match '%2$S').

View File

@ -41,6 +41,3 @@ FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'/media/webrtc/trunk/webrtc/modules/video_capture/windows',
]
if CONFIG['OS_ARCH'] == 'WINNT':
DEFINES['NOMINMAX'] = True

View File

@ -23,8 +23,5 @@ FINAL_LIBRARY = 'xul'
FAIL_ON_WARNINGS = True
if CONFIG['OS_ARCH'] == 'WINNT':
DEFINES['NOMINMAX'] = True
if CONFIG['MOZ_GONK_MEDIACODEC']:
DEFINES['MOZ_GONK_MEDIACODEC'] = True

View File

@ -177,6 +177,16 @@ public:
(*aData)[3] == 0x6b) {
return true;
}
// 0xa3 // SimpleBlock
if (aData->Length() >= 1 &&
(*aData)[0] == 0xa3) {
return true;
}
// 0xa1 // Block
if (aData->Length() >= 1 &&
(*aData)[0] == 0xa1) {
return true;
}
return false;
}

View File

@ -99,8 +99,7 @@ IsTypeSupported(const nsAString& aType)
}
return NS_OK;
} else if (DecoderTraits::IsWebMType(mimeTypeUTF8)) {
if (!Preferences::GetBool("media.mediasource.webm.enabled", false) ||
Preferences::GetBool("media.mediasource.format-reader", false)) {
if (!Preferences::GetBool("media.mediasource.webm.enabled", false)) {
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
}
if (hasCodecs &&

View File

@ -23,6 +23,3 @@ include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
FAIL_ON_WARNINGS = True
if CONFIG['OS_ARCH'] == 'WINNT':
DEFINES['NOMINMAX'] = True

View File

@ -82,6 +82,3 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
FINAL_LIBRARY = 'xul'
FAIL_ON_WARNINGS = True
if CONFIG['OS_ARCH'] == 'WINNT':
DEFINES['NOMINMAX'] = True

View File

@ -31,9 +31,6 @@ include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
if CONFIG['OS_ARCH'] == 'WINNT':
DEFINES['NOMINMAX'] = True
FAIL_ON_WARNINGS = True
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']

View File

@ -133,47 +133,6 @@ public:
}
#endif
}
// Inverse-transform the FFTSize()/2+1 points of data in each
// of aRealDataIn and aImagDataIn and store the resulting
// FFTSize() points in aRealDataOut.
void PerformInverseFFT(float* aRealDataIn,
float *aImagDataIn,
float *aRealDataOut)
{
EnsureIFFT();
const uint32_t inputSize = mFFTSize / 2 + 1;
#if defined(MOZ_LIBAV_FFT)
AlignedTArray<FFTSample> inputBuffer(inputSize * 2);
for (uint32_t i = 0; i < inputSize; ++i) {
inputBuffer[2*i] = aRealDataIn[i];
inputBuffer[(2*i)+1] = aImagDataIn[i];
}
av_rdft_calc(mAvIRDFT, inputBuffer.Elements());
PodCopy(aRealDataOut, inputBuffer.Elements(), FFTSize());
// TODO: Once bug 877662 lands, change this to use SSE.
for (uint32_t i = 0; i < mFFTSize; ++i) {
aRealDataOut[i] /= mFFTSize;
}
#else
AlignedTArray<ComplexU> inputBuffer(inputSize);
for (uint32_t i = 0; i < inputSize; ++i) {
inputBuffer[i].r = aRealDataIn[i];
inputBuffer[i].i = aImagDataIn[i];
}
#if defined(BUILD_ARM_NEON)
if (mozilla::supports_neon()) {
omxSP_FFTInv_CCSToR_F32_Sfs(inputBuffer.Elements()->f,
aRealDataOut, mOmxIFFT);
} else
#endif
{
kiss_fftri(mKissIFFT, &(inputBuffer.Elements()->c), aRealDataOut);
for (uint32_t i = 0; i < mFFTSize; ++i) {
aRealDataOut[i] /= mFFTSize;
}
}
#endif
}
void Multiply(const FFTBlock& aFrame)
{
@ -217,10 +176,18 @@ public:
{
return mOutputBuffer[aIndex].r;
}
float& RealData(uint32_t aIndex)
{
return mOutputBuffer[aIndex].r;
}
float ImagData(uint32_t aIndex) const
{
return mOutputBuffer[aIndex].i;
}
float& ImagData(uint32_t aIndex)
{
return mOutputBuffer[aIndex].i;
}
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
{

View File

@ -178,9 +178,11 @@ void PeriodicWave::createBandLimitedTables(const float* realData, const float* i
float normalizationScale = 1;
unsigned fftSize = m_periodicWaveSize;
unsigned halfSize = fftSize / 2 + 1;
unsigned halfSize = fftSize / 2;
unsigned i;
// Limit the number of components used to those for frequencies below the
// Nyquist of the fixed length inverse FFT.
numberOfComponents = std::min(numberOfComponents, halfSize);
m_bandLimitedTables.SetCapacity(m_numberOfRanges);
@ -188,46 +190,27 @@ void PeriodicWave::createBandLimitedTables(const float* realData, const float* i
for (unsigned rangeIndex = 0; rangeIndex < m_numberOfRanges; ++rangeIndex) {
// This FFTBlock is used to cull partials (represented by frequency bins).
FFTBlock frame(fftSize);
nsAutoArrayPtr<float> realP(new float[halfSize]);
nsAutoArrayPtr<float> imagP(new float[halfSize]);
// Copy from loaded frequency data and scale.
float scale = fftSize;
AudioBufferCopyWithScale(realData, scale, realP, numberOfComponents);
AudioBufferCopyWithScale(imagData, scale, imagP, numberOfComponents);
// If fewer components were provided than 1/2 FFT size,
// then clear the remaining bins.
for (i = numberOfComponents; i < halfSize; ++i) {
realP[i] = 0;
imagP[i] = 0;
}
// Generate complex conjugate because of the way the
// inverse FFT is defined.
float minusOne = -1;
AudioBufferInPlaceScale(imagP, minusOne, halfSize);
// Find the starting bin where we should start culling.
// We need to clear out the highest frequencies to band-limit
// the waveform.
// Find the starting bin where we should start culling the aliasing
// partials for this pitch range. We need to clear out the highest
// frequencies to band-limit the waveform.
unsigned numberOfPartials = numberOfPartialsForRange(rangeIndex);
// Also limit to the number of components that are provided.
numberOfPartials = std::min(numberOfPartials, numberOfComponents - 1);
// Cull the aliasing partials for this pitch range.
for (i = numberOfPartials + 1; i < halfSize; ++i) {
realP[i] = 0;
imagP[i] = 0;
// Copy from loaded frequency data and generate complex conjugate
// because of the way the inverse FFT is defined.
// The coefficients of higher partials remain zero, as initialized in
// the FFTBlock constructor.
for (i = 0; i < numberOfPartials + 1; ++i) {
frame.RealData(i) = realData[i];
frame.ImagData(i) = -imagData[i];
}
// Clear nyquist if necessary.
if (numberOfPartials < halfSize)
realP[halfSize-1] = 0;
// Clear any DC-offset.
realP[0] = 0;
// Clear values which have no effect.
imagP[0] = 0;
imagP[halfSize-1] = 0;
frame.RealData(0) = 0;
// Clear value which has no effect.
frame.ImagData(0) = 0;
// Create the band-limited table.
AlignedAudioFloatArray* table = new AlignedAudioFloatArray(m_periodicWaveSize);
@ -235,7 +218,7 @@ void PeriodicWave::createBandLimitedTables(const float* realData, const float* i
// Apply an inverse FFT to generate the time-domain table data.
float* data = m_bandLimitedTables[rangeIndex]->Elements();
frame.PerformInverseFFT(realP, imagP, data);
frame.GetInverseWithoutScaling(data);
// For the first range (which has the highest power), calculate
// its peak value then compute normalization scale.
@ -256,18 +239,16 @@ void PeriodicWave::generateBasicWaveform(OscillatorType shape)
{
const float piFloat = M_PI;
unsigned fftSize = periodicWaveSize();
unsigned halfSize = fftSize / 2 + 1;
unsigned halfSize = fftSize / 2;
AudioFloatArray real(halfSize);
AudioFloatArray imag(halfSize);
float* realP = real.Elements();
float* imagP = imag.Elements();
// Clear DC and Nyquist.
// Clear DC and imag value which is ignored.
realP[0] = 0;
imagP[0] = 0;
realP[halfSize-1] = 0;
imagP[halfSize-1] = 0;
for (unsigned n = 1; n < halfSize; ++n) {
float omega = 2 * piFloat * n;

View File

@ -83,9 +83,6 @@ if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
]
FINAL_LIBRARY = 'xul'
if CONFIG['OS_ARCH'] == 'WINNT':
DEFINES['NOMINMAX'] = True
if CONFIG['_MSC_VER']:
CXXFLAGS += [

View File

@ -696,8 +696,8 @@ Notification::Notification(nsIGlobalObject* aGlobal, const nsAString& aID,
: DOMEventTargetHelper(),
mWorkerPrivate(nullptr), mObserver(nullptr),
mID(aID), mTitle(aTitle), mBody(aBody), mDir(aDir), mLang(aLang),
mTag(aTag), mIconUrl(aIconUrl), mBehavior(aBehavior), mIsClosed(false),
mIsStored(false), mTaskCount(0)
mTag(aTag), mIconUrl(aIconUrl), mBehavior(aBehavior), mData(JS::NullValue()),
mIsClosed(false), mIsStored(false), mTaskCount(0)
{
if (NS_IsMainThread()) {
// We can only call this on the main thread because
@ -827,13 +827,6 @@ Notification::PersistNotification()
nsString alertName;
GetAlertName(alertName);
nsString dataString;
nsCOMPtr<nsIStructuredCloneContainer> scContainer;
scContainer = GetDataCloneContainer();
if (scContainer) {
scContainer->GetDataAsBase64(dataString);
}
nsAutoString behavior;
if (!mBehavior.ToJSON(behavior)) {
return NS_ERROR_FAILURE;
@ -848,7 +841,7 @@ Notification::PersistNotification()
mTag,
mIconUrl,
alertName,
dataString,
mDataAsBase64,
behavior,
mScope);
@ -913,6 +906,8 @@ Notification::CreateInternal(nsIGlobalObject* aGlobal,
Notification::~Notification()
{
mData.setUndefined();
mozilla::DropJSObjects(this);
AssertIsOnTargetThread();
MOZ_ASSERT(!mFeature);
MOZ_ASSERT(!mTempRef);
@ -920,15 +915,16 @@ Notification::~Notification()
NS_IMPL_CYCLE_COLLECTION_CLASS(Notification)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(Notification, DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mData)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mDataObjectContainer)
tmp->mData.setUndefined();
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(Notification, DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mData)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDataObjectContainer)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(Notification, DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK(mData);
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_IMPL_ADDREF_INHERITED(Notification, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(Notification, DOMEventTargetHelper)
@ -1394,13 +1390,6 @@ Notification::ShowInternal()
}
MOZ_ASSERT(observer);
// mDataObjectContainer might be uninitialized here because the notification
// was constructed with an undefined data property.
nsString dataStr;
if (mDataObjectContainer) {
mDataObjectContainer->GetDataAsBase64(dataStr);
}
#ifdef MOZ_B2G
nsCOMPtr<nsIAppNotificationService> appNotifier =
do_GetService("@mozilla.org/system-alerts-service;1");
@ -1428,7 +1417,7 @@ Notification::ShowInternal()
ops.mDir = DirectionToString(mDir);
ops.mLang = mLang;
ops.mTag = mTag;
ops.mData = dataStr;
ops.mData = mDataAsBase64;
ops.mMozbehavior = mBehavior;
ops.mMozbehavior.mSoundFile = soundUrl;
@ -1471,7 +1460,7 @@ Notification::ShowInternal()
alertService->ShowAlertNotification(iconUrl, mTitle, mBody, true,
uniqueCookie, observer, alertName,
DirectionToString(mDir), mLang,
dataStr, GetPrincipal(),
mDataAsBase64, GetPrincipal(),
inPrivateBrowsing);
}
@ -1977,52 +1966,76 @@ Notification::GetOrigin(nsIPrincipal* aPrincipal, nsString& aOrigin)
return NS_OK;
}
nsIStructuredCloneContainer* Notification::GetDataCloneContainer()
{
return mDataObjectContainer;
}
void
Notification::GetData(JSContext* aCx,
JS::MutableHandle<JS::Value> aRetval)
{
if (!mData && mDataObjectContainer) {
if (mData.isNull() && !mDataAsBase64.IsEmpty()) {
nsresult rv;
rv = mDataObjectContainer->DeserializeToVariant(aCx, getter_AddRefs(mData));
nsRefPtr<nsStructuredCloneContainer> container =
new nsStructuredCloneContainer();
rv = container->InitFromBase64(mDataAsBase64, JS_STRUCTURED_CLONE_VERSION,
aCx);
if (NS_WARN_IF(NS_FAILED(rv))) {
aRetval.setNull();
return;
}
JS::Rooted<JS::Value> data(aCx);
rv = container->DeserializeToJsval(aCx, &data);
if (NS_WARN_IF(NS_FAILED(rv))) {
aRetval.setNull();
return;
}
if (data.isGCThing()) {
mozilla::HoldJSObjects(this);
}
mData = data;
}
if (!mData) {
if (mData.isNull()) {
aRetval.setNull();
return;
}
VariantToJsval(aCx, mData, aRetval);
JS::ExposeValueToActiveJS(mData);
aRetval.set(mData);
}
void
Notification::InitFromJSVal(JSContext* aCx, JS::Handle<JS::Value> aData,
ErrorResult& aRv)
{
if (mDataObjectContainer || aData.isNull()) {
if (!mDataAsBase64.IsEmpty() || aData.isNull()) {
return;
}
mDataObjectContainer = new nsStructuredCloneContainer();
aRv = mDataObjectContainer->InitFromJSVal(aData, aCx);
nsRefPtr<nsStructuredCloneContainer> dataObjectContainer =
new nsStructuredCloneContainer();
aRv = dataObjectContainer->InitFromJSVal(aData, aCx);
if (NS_WARN_IF(aRv.Failed())) {
return;
}
dataObjectContainer->GetDataAsBase64(mDataAsBase64);
}
void Notification::InitFromBase64(JSContext* aCx, const nsAString& aData,
ErrorResult& aRv)
{
if (mDataObjectContainer || aData.IsEmpty()) {
if (!mDataAsBase64.IsEmpty() || aData.IsEmpty()) {
return;
}
auto container = new nsStructuredCloneContainer();
// To and fro to ensure it is valid base64.
nsRefPtr<nsStructuredCloneContainer> container =
new nsStructuredCloneContainer();
aRv = container->InitFromBase64(aData, JS_STRUCTURED_CLONE_VERSION,
aCx);
mDataObjectContainer = container;
if (NS_WARN_IF(aRv.Failed())) {
return;
}
container->GetDataAsBase64(mDataAsBase64);
}
bool

View File

@ -17,7 +17,6 @@
#include "nsCycleCollectionParticipant.h"
class nsIPrincipal;
class nsIStructuredCloneContainer;
class nsIVariant;
namespace mozilla {
@ -126,7 +125,7 @@ public:
IMPL_EVENT_HANDLER(close)
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(Notification, DOMEventTargetHelper)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(Notification, DOMEventTargetHelper)
static bool PrefEnabled(JSContext* aCx, JSObject* aObj);
// Returns if Notification.get() is allowed for the current global.
@ -205,8 +204,6 @@ public:
return mIsStored;
}
nsIStructuredCloneContainer* GetDataCloneContainer();
static bool RequestPermissionEnabledForScope(JSContext* aCx, JSObject* /* unused */);
static void RequestPermission(const GlobalObject& aGlobal,
@ -359,11 +356,11 @@ protected:
const nsString mLang;
const nsString mTag;
const nsString mIconUrl;
nsCOMPtr<nsIStructuredCloneContainer> mDataObjectContainer;
nsString mDataAsBase64;
const NotificationBehavior mBehavior;
// It's null until GetData is first called
nsCOMPtr<nsIVariant> mData;
JS::Heap<JS::Value> mData;
nsString mAlertName;
nsString mScope;

View File

@ -154,6 +154,36 @@ this.PushDB.prototype = {
);
},
// testFn(record) is called with a database record and should return true if
// that record should be deleted.
clearIf: function(testFn) {
debug("clearIf()");
return new Promise((resolve, reject) =>
this.newTxn(
"readwrite",
this._dbStoreName,
(aTxn, aStore) => {
aTxn.result = undefined;
aStore.openCursor().onsuccess = event => {
let cursor = event.target.result;
if (cursor) {
if (testFn(this.toPushRecord(cursor.value))) {
let deleteRequest = cursor.delete();
deleteRequest.onerror = e => {
debug("Failed to delete entry even when test succeeded!");
}
}
cursor.continue();
}
}
},
resolve,
reject
)
);
},
getByPushEndpoint: function(aPushEndpoint) {
debug("getByPushEndpoint()");

Some files were not shown because too many files have changed in this diff Show More