Merge m-c to b2g-inbound. a=merge

This commit is contained in:
Ryan VanderMeulen 2015-06-03 16:02:51 -04:00
Родитель c94be5b3d2 2b848889f8
Коммит daca3d1f20
487 изменённых файлов: 353143 добавлений и 4809 удалений

Просмотреть файл

@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please # changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more. # don't change CLOBBER for WebIDL changes any more.
Bug 1166031 - NSS update hit needs-clobber bustage. Bug 1165460 - GCC changes need clobbering.

Просмотреть файл

@ -30,6 +30,14 @@ NSS_DISABLE_DBM=1
MOZ_NO_EV_CERTS=1 MOZ_NO_EV_CERTS=1
MOZ_DISABLE_EXPORT_JS=1 MOZ_DISABLE_EXPORT_JS=1
# Bug 1171082 - Broken on Windows B2G Desktop
if test "$OS_TARGET" != "WINNT"; then
MOZ_WEBSPEECH=1
MOZ_WEBSPEECH_MODELS=1
MOZ_WEBSPEECH_POCKETSPHINX=1
MOZ_WEBSPEECH_TEST_BACKEND=1
fi # !WINNT
if test "$OS_TARGET" = "Android"; then if test "$OS_TARGET" = "Android"; then
MOZ_CAPTURE=1 MOZ_CAPTURE=1
MOZ_RAW=1 MOZ_RAW=1

Просмотреть файл

@ -135,6 +135,9 @@
@RESPATH@/run-mozilla.sh @RESPATH@/run-mozilla.sh
#endif #endif
#endif #endif
#ifdef MOZ_WEBSPEECH_MODELS
@BINPATH@/models/
#endif
; [Components] ; [Components]
@RESPATH@/components/components.manifest @RESPATH@/components/components.manifest

Просмотреть файл

@ -60,6 +60,9 @@ if CONFIG['OS_ARCH'] == 'WINNT':
RCINCLUDE = 'splash.rc' RCINCLUDE = 'splash.rc'
DEFINES['MOZ_PHOENIX'] = True DEFINES['MOZ_PHOENIX'] = True
for cdm in CONFIG['MOZ_EME_MODULES']:
DEFINES['MOZ_%s_EME' % cdm.upper()] = True
# Control the default heap size. # Control the default heap size.
# This is the heap returned by GetProcessHeap(). # This is the heap returned by GetProcessHeap().
# As we use the CRT heap, the default size is too large and wastes VM. # As we use the CRT heap, the default size is too large and wastes VM.

Просмотреть файл

@ -1842,10 +1842,10 @@ pref("ui.key.menuAccessKeyFocuses", true);
// Encrypted media extensions. // Encrypted media extensions.
pref("media.eme.enabled", true); pref("media.eme.enabled", true);
pref("media.eme.apiVisible", true); pref("media.eme.apiVisible", true);
#ifdef XP_WIN
pref("media.gmp-eme-adobe.enabled", true);
pref("browser.eme.ui.enabled", true); pref("browser.eme.ui.enabled", true);
#ifdef MOZ_ADOBE_EME
pref("media.gmp-eme-adobe.enabled", true);
#endif #endif
// Play with different values of the decay time and get telemetry, // Play with different values of the decay time and get telemetry,

Просмотреть файл

@ -636,22 +636,6 @@ window[chromehidden~="toolbar"] toolbar:not(#nav-bar):not(#TabsToolbar):not(#pri
background-image: -moz-element(#historySwipeAnimationNextPageSnapshot); background-image: -moz-element(#historySwipeAnimationNextPageSnapshot);
} }
/* Identity UI */
#identity-popup-content-box:not(.chromeUI) > #identity-popup-brandName,
#identity-popup-content-box:not(.chromeUI) > #identity-popup-chromeLabel,
#identity-popup-content-box.chromeUI > .identity-popup-label:not(#identity-popup-brandName):not(#identity-popup-chromeLabel),
#identity-popup-content-box.chromeUI > .identity-popup-description,
#identity-popup.chromeUI > #identity-popup-button-container,
#identity-popup-content-box.unknownIdentity > #identity-popup-connectedToLabel ,
#identity-popup-content-box.unknownIdentity > #identity-popup-runByLabel ,
#identity-popup-content-box.unknownIdentity > #identity-popup-content-host ,
#identity-popup-content-box.unknownIdentity > #identity-popup-content-owner ,
#identity-popup-content-box.verifiedIdentity > #identity-popup-connectedToLabel2 ,
#identity-popup-content-box.verifiedDomain > #identity-popup-connectedToLabel2 ,
#identity-popup-content-box.verifiedDomain > #identity-popup-runByLabel {
display: none;
}
/* Full Screen UI */ /* Full Screen UI */
#fullscr-toggler { #fullscr-toggler {

Просмотреть файл

@ -6685,14 +6685,6 @@ var gIdentityHandler = {
this._permissionList = document.getElementById("identity-popup-permission-list"); this._permissionList = document.getElementById("identity-popup-permission-list");
}, },
/**
* Handler for commands on the help button in the "identity-popup" panel.
*/
handleHelpCommand : function(event) {
openHelpLink("secure-connection");
this._identityPopup.hidePopup();
},
/** /**
* Handler for mouseclicks on the "More Information" button in the * Handler for mouseclicks on the "More Information" button in the
* "identity-popup" panel. * "identity-popup" panel.
@ -7051,8 +7043,6 @@ var gIdentityHandler = {
}, },
onPopupShown : function(event) { onPopupShown : function(event) {
document.getElementById('identity-popup-more-info-button').focus();
this._identityPopup.addEventListener("blur", this, true); this._identityPopup.addEventListener("blur", this, true);
this._identityPopup.addEventListener("popuphidden", this); this._identityPopup.addEventListener("popuphidden", this);
}, },

Просмотреть файл

@ -9,6 +9,7 @@
<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?> <?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?> <?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/devtools/common.css" type="text/css"?> <?xml-stylesheet href="chrome://browser/skin/devtools/common.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/controlcenter/panel.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUIOverlay.css" type="text/css"?> <?xml-stylesheet href="chrome://browser/skin/customizableui/panelUIOverlay.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?> <?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/browser-lightweightTheme.css" type="text/css"?> <?xml-stylesheet href="chrome://browser/skin/browser-lightweightTheme.css" type="text/css"?>
@ -406,67 +407,6 @@
<menupopup id="placesContext"/> <menupopup id="placesContext"/>
<!-- Popup for site identity information -->
<panel id="identity-popup"
type="arrow"
hidden="true"
noautofocus="true"
onpopupshown="if (event.target == this)
gIdentityHandler.onPopupShown(event);"
orient="vertical"
level="top">
<hbox id="identity-popup-container" align="top">
<image id="identity-popup-icon"/>
<vbox id="identity-popup-content-box">
<label id="identity-popup-brandName"
class="identity-popup-label"
value="&brandFullName;"/>
<label id="identity-popup-chromeLabel"
class="identity-popup-label"/>
<label id="identity-popup-connectedToLabel"
class="identity-popup-label"
value="&identity.connectedTo;"/>
<label id="identity-popup-connectedToLabel2"
class="identity-popup-label"
value="&identity.unverifiedsite2;"/>
<description id="identity-popup-content-host"
class="identity-popup-description"/>
<label id="identity-popup-runByLabel"
class="identity-popup-label"
value="&identity.runBy;"/>
<description id="identity-popup-content-owner"
class="identity-popup-description"/>
<description id="identity-popup-content-supplemental"
class="identity-popup-description"/>
<description id="identity-popup-content-verifier"
class="identity-popup-description"/>
<hbox id="identity-popup-encryption" flex="1">
<vbox>
<image id="identity-popup-encryption-icon"/>
</vbox>
<description id="identity-popup-encryption-label" flex="1"
class="identity-popup-description"/>
</hbox>
<vbox id="identity-popup-permissions">
<separator class="thin"/>
<label class="identity-popup-label header"
value="&identity.permissions;"/>
<vbox id="identity-popup-permission-list" class="indent"/>
</vbox>
</vbox>
</hbox>
<!-- Footer button to open security page info -->
<hbox id="identity-popup-button-container" align="center">
<button id="identity-popup-help-icon"
oncommand="gIdentityHandler.handleHelpCommand(event);"
tooltiptext="&identity.help.tooltip;"/>
<spacer flex="1"/>
<button id="identity-popup-more-info-button"
label="&identity.moreInfoLinkText;"
oncommand="gIdentityHandler.handleMoreInfoClick(event);"/>
</hbox>
</panel>
<panel id="ctrlTab-panel" class="KUI-panel" hidden="true" norestorefocus="true" level="top"> <panel id="ctrlTab-panel" class="KUI-panel" hidden="true" norestorefocus="true" level="top">
<hbox> <hbox>
<button class="ctrlTab-preview" flex="1"/> <button class="ctrlTab-preview" flex="1"/>
@ -549,6 +489,7 @@
#include popup-notifications.inc #include popup-notifications.inc
#include ../../components/customizableui/content/panelUI.inc.xul #include ../../components/customizableui/content/panelUI.inc.xul
#include ../../components/controlcenter/content/panel.inc.xul
<hbox id="downloads-animation-container" mousethrough="always"> <hbox id="downloads-animation-container" mousethrough="always">
<vbox id="downloads-notification-anchor"> <vbox id="downloads-notification-anchor">

Просмотреть файл

@ -0,0 +1,59 @@
<!-- 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/. -->
<panel id="identity-popup"
type="arrow"
hidden="true"
noautofocus="true"
onpopupshown="if (event.target == this)
gIdentityHandler.onPopupShown(event);"
orient="vertical"
level="top">
<hbox id="identity-popup-container" align="top">
<image id="identity-popup-icon"/>
<vbox id="identity-popup-content-box">
<label id="identity-popup-brandName"
class="identity-popup-label"
value="&brandFullName;"/>
<label id="identity-popup-chromeLabel"
class="identity-popup-label"/>
<label id="identity-popup-connectedToLabel"
class="identity-popup-label"
value="&identity.connectedTo;"/>
<label id="identity-popup-connectedToLabel2"
class="identity-popup-label"
value="&identity.unverifiedsite2;"/>
<description id="identity-popup-content-host"
class="identity-popup-description"/>
<label id="identity-popup-runByLabel"
class="identity-popup-label"
value="&identity.runBy;"/>
<description id="identity-popup-content-owner"
class="identity-popup-description"/>
<description id="identity-popup-content-supplemental"
class="identity-popup-description"/>
<description id="identity-popup-content-verifier"
class="identity-popup-description"/>
<hbox id="identity-popup-encryption" flex="1">
<vbox>
<image id="identity-popup-encryption-icon"/>
</vbox>
<description id="identity-popup-encryption-label" flex="1"
class="identity-popup-description"/>
</hbox>
<vbox id="identity-popup-permissions">
<separator class="thin"/>
<label class="identity-popup-label header"
value="&identity.permissions;"/>
<vbox id="identity-popup-permission-list" class="indent"/>
</vbox>
</vbox>
</hbox>
<!-- Footer button to open security page info -->
<hbox id="identity-popup-button-container" align="center">
<button id="identity-popup-more-info-button" flex="1"
label="&identity.moreInfoLinkText2;"
oncommand="gIdentityHandler.handleMoreInfoClick(event);"/>
</hbox>
</panel>

Просмотреть файл

@ -54,3 +54,6 @@ if CONFIG['MOZ_SAFE_BROWSING']:
with Files('safebrowsing/*'): with Files('safebrowsing/*'):
BUG_COMPONENT = ('Toolkit', 'Phishing Protection') BUG_COMPONENT = ('Toolkit', 'Phishing Protection')
with Files('controlcenter/**'):
BUG_COMPONENT = ('Firefox', 'General')

Просмотреть файл

@ -32,5 +32,10 @@ export MOZ_TELEMETRY_REPORTING=1
# Treat warnings as errors in directories with FAIL_ON_WARNINGS. # Treat warnings as errors in directories with FAIL_ON_WARNINGS.
ac_add_options --enable-warnings-as-errors ac_add_options --enable-warnings-as-errors
# Enable Adobe Primetime CDM on 32-bit Windows in Mozilla builds.
# Enabled here on the assumption that downstream vendors will not be using
# these build configs.
ac_add_options --enable-eme=adobe
# Package js shell. # Package js shell.
export MOZ_PACKAGE_JSSHELL=1 export MOZ_PACKAGE_JSSHELL=1

Просмотреть файл

@ -12,6 +12,7 @@ support-files =
helper_disable_cache.js helper_disable_cache.js
doc_theme.css doc_theme.css
doc_viewsource.html doc_viewsource.html
browser_toolbox_options_enable_serviceworkers_testing_frame_script.js
browser_toolbox_options_enable_serviceworkers_testing.html browser_toolbox_options_enable_serviceworkers_testing.html
serviceworker.js serviceworker.js
@ -66,7 +67,6 @@ skip-if = os == "mac" && os_version == "10.8" || os == "win" && os_version == "5
[browser_toolbox_custom_host.js] [browser_toolbox_custom_host.js]
[browser_toolbox_theme_registration.js] [browser_toolbox_theme_registration.js]
[browser_toolbox_options_enable_serviceworkers_testing.js] [browser_toolbox_options_enable_serviceworkers_testing.js]
skip-if = true # Bug 1153407 - this test breaks subsequent tests and is not e10s compatible
[browser_toolbox_selected_tool_unavailable.js] [browser_toolbox_selected_tool_unavailable.js]
# We want this test to run for mochitest-dt as well, so we include it here: # We want this test to run for mochitest-dt as well, so we include it here:

Просмотреть файл

@ -3,56 +3,8 @@
<head> <head>
<title>browser_toolbox_options_enable_serviceworkers_testing.html</title> <title>browser_toolbox_options_enable_serviceworkers_testing.html</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<style>
div {
width: 260px;
height: 24px;
border: 1px solid #000;
margin-top: 10px;
}
h1 {
font-size: 20px
}
</style>
<script type="application/javascript;version=1.8">
function log(msg) {
var output = document.getElementById("output");
output.innerHTML = msg;
}
navigator.serviceWorker.register("serviceworker.js").then(
swr => {
var msg = "";
var button = document.getElementById("button");
if (swr.installing) {
msg += "Installing worker/";
}
if (swr.waiting) {
msg += "Waiting worker/";
}
if (swr.active) {
msg += "Active worker/";
}
log(msg);
button.click();
},
error => {
var button = document.getElementById("button");
if (error.name === "SecurityError") {
log("SecurityError");
}
button.click();
});
</script>
</head> </head>
<body> <body>
<h1>Test in page</h1> <h1>SW-test</h1>
<input id="button"
type="button"
value="Worker clicks here"/>
<br>
<div id="output">No output</div>
</body> </body>
</html> </html>

Просмотреть файл

@ -4,13 +4,19 @@
// Test that enabling Service Workers testing option enables the // Test that enabling Service Workers testing option enables the
// mServiceWorkersTestingEnabled attribute added to nsPIDOMWindow. // mServiceWorkersTestingEnabled attribute added to nsPIDOMWindow.
const COMMON_FRAME_SCRIPT_URL =
"chrome://browser/content/devtools/frame-script-utils.js";
const ROOT_TEST_DIR =
getRootDirectory(gTestPath);
const FRAME_SCRIPT_URL =
ROOT_TEST_DIR +
"browser_toolbox_options_enable_serviceworkers_testing_frame_script.js";
const TEST_URI = URL_ROOT + const TEST_URI = URL_ROOT +
"browser_toolbox_options_enable_serviceworkers_testing.html"; "browser_toolbox_options_enable_serviceworkers_testing.html";
const ELEMENT_ID = "devtools-enable-serviceWorkersTesting"; const ELEMENT_ID = "devtools-enable-serviceWorkersTesting";
let toolbox; let toolbox;
let doc;
function test() { function test() {
// Note: Pref dom.serviceWorkers.testing.enabled is false since we are testing // Note: Pref dom.serviceWorkers.testing.enabled is false since we are testing
@ -19,16 +25,19 @@ function test() {
["dom.serviceWorkers.exemptFromPerDomainMax", true], ["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.enabled", true], ["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", false] ["dom.serviceWorkers.testing.enabled", false]
]}, start); ]}, init);
} }
function start() { function init() {
gBrowser.selectedTab = gBrowser.addTab(); let tab = gBrowser.selectedTab = gBrowser.addTab();
let target = TargetFactory.forTab(gBrowser.selectedTab); let target = TargetFactory.forTab(gBrowser.selectedTab);
let linkedBrowser = tab.linkedBrowser;
linkedBrowser.messageManager.loadFrameScript(COMMON_FRAME_SCRIPT_URL, false);
linkedBrowser.messageManager.loadFrameScript(FRAME_SCRIPT_URL, false);
gBrowser.selectedBrowser.addEventListener("load", function onLoad(evt) { gBrowser.selectedBrowser.addEventListener("load", function onLoad(evt) {
gBrowser.selectedBrowser.removeEventListener(evt.type, onLoad, true); gBrowser.selectedBrowser.removeEventListener(evt.type, onLoad, true);
doc = content.document;
gDevTools.showToolbox(target).then(testSelectTool); gDevTools.showToolbox(target).then(testSelectTool);
}, true); }, true);
@ -37,89 +46,24 @@ function start() {
function testSelectTool(aToolbox) { function testSelectTool(aToolbox) {
toolbox = aToolbox; toolbox = aToolbox;
toolbox.once("options-selected", () => { toolbox.once("options-selected", start);
testRegisterFails().then(testRegisterInstallingWorker);
});
toolbox.selectTool("options"); toolbox.selectTool("options");
} }
function testRegisterFails() { function register() {
let deferred = promise.defer(); return executeInContent("devtools:sw-test:register");
let output = doc.getElementById("output");
let button = doc.getElementById("button");
function doTheCheck() {
info("Testing it doesn't registers correctly until enable testing");
is(output.textContent,
"SecurityError",
"SecurityError expected");
deferred.resolve();
}
if (output.textContent !== "No output") {
doTheCheck();
}
button.addEventListener('click', function onClick() {
button.removeEventListener('click', onClick);
doTheCheck();
});
return deferred.promise;
} }
function testRegisterInstallingWorker() { function unregister(swr) {
toggleServiceWorkersTestingCheckbox().then(() => { return executeInContent("devtools:sw-test:unregister");
let output = doc.getElementById("output");
let button = doc.getElementById("button");
function doTheCheck() {
info("Testing it registers correctly and there is an installing worker");
is(output.textContent,
"Installing worker/",
"Installing worker expected");
testRegisterFailsWhenToolboxCloses();
}
if (output.textContent !== "No output") {
doTheCheck();
}
button.addEventListener('click', function onClick() {
button.removeEventListener('click', onClick);
doTheCheck();
});
});
} }
// Workers should be turned back off when we closes the toolbox function testRegisterFails(data) {
function testRegisterFailsWhenToolboxCloses() { is(data.success, false, "Register should fail with security error");
info("Testing it disable worker when closing the toolbox"); return promise.resolve();
toolbox.destroy()
.then(reload)
.then(testRegisterFails)
.then(finishUp);
}
function reload() {
let deferred = promise.defer();
gBrowser.selectedBrowser.addEventListener("load", function onLoad(evt) {
gBrowser.selectedBrowser.removeEventListener(evt.type, onLoad, true);
doc = content.document;
deferred.resolve();
}, true);
let mm = getFrameScript();
mm.sendAsyncMessage("devtools:test:reload");
return deferred.promise;
} }
function toggleServiceWorkersTestingCheckbox() { function toggleServiceWorkersTestingCheckbox() {
let deferred = promise.defer();
let panel = toolbox.getCurrentPanel(); let panel = toolbox.getCurrentPanel();
let cbx = panel.panelDoc.getElementById(ELEMENT_ID); let cbx = panel.panelDoc.getElementById(ELEMENT_ID);
@ -133,11 +77,46 @@ function toggleServiceWorkersTestingCheckbox() {
cbx.click(); cbx.click();
return reload(); return promise.resolve();
}
function reload() {
let deferred = promise.defer();
gBrowser.selectedBrowser.addEventListener("load", function onLoad(evt) {
gBrowser.selectedBrowser.removeEventListener(evt.type, onLoad, true);
deferred.resolve();
}, true);
executeInContent("devtools:test:reload", {}, {}, false);
return deferred.promise;
}
function testRegisterSuccesses(data) {
is(data.success, true, "Register should success");
return promise.resolve();
}
function start() {
register()
.then(testRegisterFails)
.then(toggleServiceWorkersTestingCheckbox)
.then(reload)
.then(register)
.then(testRegisterSuccesses)
.then(unregister)
// Workers should be turned back off when we closes the toolbox
.then(toolbox.destroy.bind(toolbox))
.then(reload)
.then(register)
.then(testRegisterFails)
.catch(function(e) {
ok(false, "Some test failed with error " + e);
}).then(finishUp);
} }
function finishUp() { function finishUp() {
gBrowser.removeCurrentTab(); gBrowser.removeCurrentTab();
toolbox = doc = null; toolbox = null;
finish(); finish();
} }

Просмотреть файл

@ -0,0 +1,24 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// A helper frame-script for browser/devtools/framework service worker tests.
"use strict";
addMessageListener("devtools:sw-test:register", function(msg) {
content.navigator.serviceWorker.register("serviceworker.js")
.then(swr => {
sendAsyncMessage("devtools:sw-test:register", {success: true});
}, error => {
sendAsyncMessage("devtools:sw-test:register", {success: false});
});
});
addMessageListener("devtools:sw-test:unregister", function(msg) {
content.navigator.serviceWorker.getRegistration().then(swr => {
swr.unregister().then(result => {
sendAsyncMessage("devtools:sw-test:unregister",
{success: result ? true : false});
});
});
});

Просмотреть файл

@ -65,3 +65,47 @@ function *openScratchpadWindow () {
}); });
return p; return p;
} }
/**
* Wait for a content -> chrome message on the message manager (the window
* messagemanager is used).
* @param {String} name The message name
* @return {Promise} A promise that resolves to the response data when the
* message has been received
*/
function waitForContentMessage(name) {
info("Expecting message " + name + " from content");
let mm = gBrowser.selectedBrowser.messageManager;
let def = promise.defer();
mm.addMessageListener(name, function onMessage(msg) {
mm.removeMessageListener(name, onMessage);
def.resolve(msg.data);
});
return def.promise;
}
/**
* Send an async message to the frame script (chrome -> content) and wait for a
* response message with the same name (content -> chrome).
* @param {String} name The message name. Should be one of the messages defined
* in doc_frame_script.js
* @param {Object} data Optional data to send along
* @param {Object} objects Optional CPOW objects to send along
* @param {Boolean} expectResponse If set to false, don't wait for a response
* with the same name from the content script. Defaults to true.
* @return {Promise} Resolves to the response data if a response is expected,
* immediately resolves otherwise
*/
function executeInContent(name, data={}, objects={}, expectResponse=true) {
info("Sending message " + name + " to content");
let mm = gBrowser.selectedBrowser.messageManager;
mm.sendAsyncMessage(name, data, objects);
if (expectResponse) {
return waitForContentMessage(name);
} else {
return promise.resolve();
}
}

Просмотреть файл

@ -6,17 +6,11 @@
"use strict"; "use strict";
const {Cc, Cu, Ci} = require("chrome"); const {Cu, Ci} = require("chrome");
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource:///modules/devtools/DOMHelpers.jsm");
Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource:///modules/devtools/ViewHelpers.jsm");
const {Promise: promise} = require("resource://gre/modules/Promise.jsm"); const {Promise: promise} = require("resource://gre/modules/Promise.jsm");
XPCOMUtils.defineLazyGetter(this, "DOMUtils", function () {
return Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils);
});
const PSEUDO_CLASSES = [":hover", ":active", ":focus"];
const ENSURE_SELECTION_VISIBLE_DELAY = 50; // ms const ENSURE_SELECTION_VISIBLE_DELAY = 50; // ms
const ELLIPSIS = Services.prefs.getComplexValue("intl.ellipsis", Ci.nsIPrefLocalizedString).data; const ELLIPSIS = Services.prefs.getComplexValue("intl.ellipsis", Ci.nsIPrefLocalizedString).data;
const MAX_LABEL_LENGTH = 40; const MAX_LABEL_LENGTH = 40;
@ -29,7 +23,7 @@ const LOW_PRIORITY_ELEMENTS = {
"META": true, "META": true,
"SCRIPT": true, "SCRIPT": true,
"STYLE": true, "STYLE": true,
"TITLE": true, "TITLE": true
}; };
/** /**
@ -51,7 +45,6 @@ function HTMLBreadcrumbs(inspector) {
this.selection = this.inspector.selection; this.selection = this.inspector.selection;
this.chromeWin = this.inspector.panelWin; this.chromeWin = this.inspector.panelWin;
this.chromeDoc = this.inspector.panelDoc; this.chromeDoc = this.inspector.panelDoc;
this.DOMHelpers = new DOMHelpers(this.chromeWin);
this._init(); this._init();
} }
@ -93,10 +86,11 @@ HTMLBreadcrumbs.prototype = {
this.container._scrollButtonDown.collapsed = true; this.container._scrollButtonDown.collapsed = true;
this.onscrollboxreflow = () => { this.onscrollboxreflow = () => {
if (this.container._scrollButtonDown.collapsed) if (this.container._scrollButtonDown.collapsed) {
this.container.removeAttribute("overflows"); this.container.removeAttribute("overflows");
else } else {
this.container.setAttribute("overflows", true); this.container.setAttribute("overflows", true);
}
}; };
this.container.addEventListener("underflow", this.onscrollboxreflow, false); this.container.addEventListener("underflow", this.onscrollboxreflow, false);
@ -118,12 +112,12 @@ HTMLBreadcrumbs.prototype = {
*/ */
selectionGuard: function() { selectionGuard: function() {
let selection = this.selection.nodeFront; let selection = this.selection.nodeFront;
return (result) => { return result => {
if (selection != this.selection.nodeFront) { if (selection != this.selection.nodeFront) {
return promise.reject("selection-changed"); return promise.reject("selection-changed");
} }
return result; return result;
} };
}, },
/** /**
@ -204,11 +198,6 @@ HTMLBreadcrumbs.prototype = {
} }
} }
// XXX: Until we have pseudoclass lock in the node.
for (let pseudo of node.pseudoClassLocks) {
}
// Figure out which element (if any) needs ellipsing. // Figure out which element (if any) needs ellipsing.
// Substring for that element, then clear out any extras // Substring for that element, then clear out any extras
// (except for pseudo elements). // (except for pseudo elements).
@ -217,11 +206,11 @@ HTMLBreadcrumbs.prototype = {
let maxClassLength = MAX_LABEL_LENGTH - tagText.length - idText.length; let maxClassLength = MAX_LABEL_LENGTH - tagText.length - idText.length;
if (tagText.length > maxTagLength) { if (tagText.length > maxTagLength) {
tagText = tagText.substr(0, maxTagLength) + ELLIPSIS; tagText = tagText.substr(0, maxTagLength) + ELLIPSIS;
idText = classesText = ""; idText = classesText = "";
} else if (idText.length > maxIdLength) { } else if (idText.length > maxIdLength) {
idText = idText.substr(0, maxIdLength) + ELLIPSIS; idText = idText.substr(0, maxIdLength) + ELLIPSIS;
classesText = ""; classesText = "";
} else if (classesText.length > maxClassLength) { } else if (classesText.length > maxClassLength) {
classesText = classesText.substr(0, maxClassLength) + ELLIPSIS; classesText = classesText.substr(0, maxClassLength) + ELLIPSIS;
} }
@ -250,19 +239,20 @@ HTMLBreadcrumbs.prototype = {
// for inspector.selection // for inspector.selection
this.selection.setNodeFront(node, "breadcrumbs"); this.selection.setNodeFront(node, "breadcrumbs");
let title = this.chromeDoc.createElement("menuitem"); // Build a list of extra menu items that will be appended at the end of the
title.setAttribute("label", this.inspector.strings.GetStringFromName("breadcrumbs.siblings")); // inspector node context menu.
title.setAttribute("disabled", "true"); let items = [this.chromeDoc.createElement("menuseparator")];
let separator = this.chromeDoc.createElement("menuseparator");
let items = [title, separator];
this.walker.siblings(node, { this.walker.siblings(node, {
whatToShow: Ci.nsIDOMNodeFilter.SHOW_ELEMENT whatToShow: Ci.nsIDOMNodeFilter.SHOW_ELEMENT
}).then(siblings => { }).then(siblings => {
let nodes = siblings.nodes; let nodes = siblings.nodes;
for (let i = 0; i < nodes.length; i++) { for (let i = 0; i < nodes.length; i++) {
// Skip siblings of the documentElement node.
if (nodes[i].nodeType !== Ci.nsIDOMNode.ELEMENT_NODE) {
continue;
}
let item = this.chromeDoc.createElement("menuitem"); let item = this.chromeDoc.createElement("menuitem");
if (nodes[i] === node) { if (nodes[i] === node) {
item.setAttribute("disabled", "true"); item.setAttribute("disabled", "true");
@ -276,12 +266,14 @@ HTMLBreadcrumbs.prototype = {
item.onmouseup = (function(node) { item.onmouseup = (function(node) {
return function() { return function() {
selection.setNodeFront(node, "breadcrumbs"); selection.setNodeFront(node, "breadcrumbs");
} };
})(nodes[i]); })(nodes[i]);
items.push(item); items.push(item);
this.inspector.showNodeMenu(button, "before_start", items);
} }
// Append the items to the inspector node context menu and show the menu.
this.inspector.showNodeMenu(button, "before_start", items);
}); });
}, },
@ -445,8 +437,9 @@ HTMLBreadcrumbs.prototype = {
} }
if (index > -1) { if (index > -1) {
this.nodeHierarchy[index].button.setAttribute("checked", "true"); this.nodeHierarchy[index].button.setAttribute("checked", "true");
if (this.hadFocus) if (this.hadFocus) {
this.nodeHierarchy[index].button.focus(); this.nodeHierarchy[index].button.focus();
}
} }
this.currentIndex = index; this.currentIndex = index;
}, },
@ -457,7 +450,6 @@ HTMLBreadcrumbs.prototype = {
* @returns {Number} The index for this node or -1 if not found. * @returns {Number} The index for this node or -1 if not found.
*/ */
indexOf: function(node) { indexOf: function(node) {
let i = this.nodeHierarchy.length - 1;
for (let i = this.nodeHierarchy.length - 1; i >= 0; i--) { for (let i = this.nodeHierarchy.length - 1; i >= 0; i--) {
if (this.nodeHierarchy[i].node === node) { if (this.nodeHierarchy[i].node === node) {
return i; return i;
@ -492,9 +484,10 @@ HTMLBreadcrumbs.prototype = {
button.onkeypress = function onBreadcrumbsKeypress(e) { button.onkeypress = function onBreadcrumbsKeypress(e) {
if (e.charCode == Ci.nsIDOMKeyEvent.DOM_VK_SPACE || if (e.charCode == Ci.nsIDOMKeyEvent.DOM_VK_SPACE ||
e.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_RETURN) e.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_RETURN) {
button.click(); button.click();
} }
};
button.onBreadcrumbsClick = () => { button.onBreadcrumbsClick = () => {
this.selection.setNodeFront(node, "breadcrumbs"); this.selection.setNodeFront(node, "breadcrumbs");
@ -574,9 +567,8 @@ HTMLBreadcrumbs.prototype = {
if (response.hasLast) { if (response.hasLast) {
deferred.resolve(fallback); deferred.resolve(fallback);
return; return;
} else {
moreChildren();
} }
moreChildren();
}).then(null, this.selectionGuardEnd); }).then(null, this.selectionGuardEnd);
}; };
@ -594,9 +586,8 @@ HTMLBreadcrumbs.prototype = {
let idx = this.indexOf(node); let idx = this.indexOf(node);
if (idx > -1) { if (idx > -1) {
return idx; return idx;
} else {
node = node.parentNode();
} }
node = node.parentNode();
} }
return -1; return -1;
}, },
@ -725,12 +716,14 @@ HTMLBreadcrumbs.prototype = {
cmdDispatcher.focusedElement.parentNode == this.container); cmdDispatcher.focusedElement.parentNode == this.container);
if (!this.selection.isConnected()) { if (!this.selection.isConnected()) {
this.cutAfter(-1); // remove all the crumbs // remove all the crumbs
this.cutAfter(-1);
return; return;
} }
if (!this.selection.isElementNode()) { if (!this.selection.isElementNode()) {
this.setCursor(-1); // no selection // no selection
this.setCursor(-1);
return; return;
} }

Просмотреть файл

@ -31,6 +31,7 @@ support-files =
[browser_inspector_breadcrumbs.js] [browser_inspector_breadcrumbs.js]
[browser_inspector_breadcrumbs_highlight_hover.js] [browser_inspector_breadcrumbs_highlight_hover.js]
[browser_inspector_breadcrumbs_menu.js]
[browser_inspector_breadcrumbs_mutations.js] [browser_inspector_breadcrumbs_mutations.js]
[browser_inspector_delete-selected-node-01.js] [browser_inspector_delete-selected-node-01.js]
[browser_inspector_delete-selected-node-02.js] [browser_inspector_delete-selected-node-02.js]

Просмотреть файл

@ -0,0 +1,51 @@
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Test that the inspector node context menu appears when right-clicking on the
// breadcrumbs nodes.
const TEST_URI = TEST_URL_ROOT + "doc_inspector_breadcrumbs.html";
add_task(function*() {
let {inspector} = yield openInspectorForURL(TEST_URI);
let container = inspector.panelDoc.getElementById("inspector-breadcrumbs");
info("Select a test node and try to right-click on the selected breadcrumb");
yield selectNode("#i1", inspector);
let button = container.querySelector("button[checked]");
let onMenuShown = once(inspector.nodemenu, "popupshown");
button.onclick({button: 2});
yield onMenuShown;
ok(true, "The context menu appeared on right-click");
info("Right-click on a non selected crumb (the body node)");
button = button.previousSibling;
onMenuShown = once(inspector.nodemenu, "popupshown");
let onInspectorUpdated = inspector.once("inspector-updated");
button.onclick({button: 2});
yield onMenuShown;
ok(true, "The context menu appeared on right-click");
yield onInspectorUpdated;
is(inspector.selection.nodeFront.tagName.toLowerCase(), "body",
"The body node was selected when right-clicking in the breadcrumbs");
info("Right-click on the html node");
button = button.previousSibling;
onMenuShown = once(inspector.nodemenu, "popupshown");
onInspectorUpdated = inspector.once("inspector-updated");
button.onclick({button: 2});
yield onMenuShown;
ok(true, "The context menu appeared on right-click");
yield onInspectorUpdated;
is(inspector.selection.nodeFront.tagName.toLowerCase(), "html",
"The html node was selected when right-clicking in the breadcrumbs");
});

Просмотреть файл

@ -2,6 +2,7 @@
tags = devtools tags = devtools
subsuite = devtools subsuite = devtools
support-files = support-files =
doc_force_gc.html
doc_innerHTML.html doc_innerHTML.html
doc_simple-test.html doc_simple-test.html
head.js head.js
@ -12,7 +13,6 @@ support-files =
[browser_aaa-run-first-leaktest.js] [browser_aaa-run-first-leaktest.js]
[browser_marker-utils.js] [browser_marker-utils.js]
[browser_markers-gc.js] [browser_markers-gc.js]
skip-if = e10s # GC events seem unreliable in multiprocess
[browser_markers-parse-html.js] [browser_markers-parse-html.js]
[browser_markers-styles.js] [browser_markers-styles.js]
[browser_markers-timestamp.js] [browser_markers-timestamp.js]

Просмотреть файл

@ -6,17 +6,16 @@
*/ */
const TIME_CLOSE_TO = 10000; const TIME_CLOSE_TO = 10000;
const TEST_URL = EXAMPLE_URL + "doc_force_gc.html"
function* spawnTest () { function* spawnTest () {
let { target, front } = yield initBackend(SIMPLE_URL); let { target, front } = yield initBackend(TEST_URL);
let markers; let markers;
front.on("timeline-data", handler); front.on("timeline-data", handler);
let model = yield front.startRecording({ withTicks: true }); let model = yield front.startRecording({ withTicks: true });
// Check async for markers found while GC/CCing between
yield waitUntil(() => { yield waitUntil(() => {
forceCC();
return !!markers; return !!markers;
}, 100); }, 100);

Просмотреть файл

@ -0,0 +1,21 @@
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>Performance tool + garbage collection test page</title>
</head>
<body>
<script type="text/javascript">
window.test = function () {
SpecialPowers.Cu.forceGC();
setTimeout(window.test, 100);
};
test();
</script>
</body>
</html>

Просмотреть файл

@ -705,6 +705,10 @@ CSSCompleter.prototype = {
// possibility of suggestions. // possibility of suggestions.
switch(this.selectorState) { switch(this.selectorState) {
case SELECTOR_STATES.null: case SELECTOR_STATES.null:
if (this.completing === ",") {
return Promise.resolve([]);
}
query += "*"; query += "*";
break; break;

Просмотреть файл

@ -8,6 +8,8 @@ const {InspectorFront} = require("devtools/server/actors/inspector");
const AUTOCOMPLETION_PREF = "devtools.editor.autocomplete"; const AUTOCOMPLETION_PREF = "devtools.editor.autocomplete";
const TEST_URI = "data:text/html;charset=UTF-8,<html><body><bar></bar><div id='baz'></div><body></html>"; const TEST_URI = "data:text/html;charset=UTF-8,<html><body><bar></bar><div id='baz'></div><body></html>";
const wait = (delay) => new Promise(resolve => setTimeout(resolve, delay));
add_task(function*() { add_task(function*() {
yield promiseTab(TEST_URI); yield promiseTab(TEST_URI);
yield runTests(); yield runTests();
@ -27,6 +29,7 @@ function* runTests() {
yield testKeyboard(ed, edWin); yield testKeyboard(ed, edWin);
yield testKeyboardCycle(ed, edWin); yield testKeyboardCycle(ed, edWin);
yield testKeyboardCycleForPrefixedString(ed, edWin); yield testKeyboardCycleForPrefixedString(ed, edWin);
yield testKeyboardCSSComma(ed, edWin);
teardown(ed, win); teardown(ed, win);
} }
@ -87,6 +90,22 @@ function* testKeyboardCycleForPrefixedString(ed, win) {
is (ed.getText(), "#baz", "Editor text has been updated"); is (ed.getText(), "#baz", "Editor text has been updated");
} }
function* testKeyboardCSSComma(ed, win) {
ed.focus();
ed.setText("b");
ed.setCursor({line: 1, ch: 1});
let isPopupOpened = false;
let popupOpened = ed.getAutocompletionPopup().once("popup-opened");
popupOpened.then(() => isPopupOpened = true);
EventUtils.synthesizeKey(",", { }, win);
yield wait(500);
ok(!isPopupOpened, "Autocompletion shouldn't be opened");
}
function* testMouse(ed, win) { function* testMouse(ed, win) {
ed.focus(); ed.focus();
ed.setText("b"); ed.setText("b");

Просмотреть файл

@ -686,15 +686,10 @@ with that structure, consider a translation which ignores the preceding domain a
just addresses the organization to follow, e.g. "This site is run by " --> just addresses the organization to follow, e.g. "This site is run by " -->
<!ENTITY identity.runBy "which is run by"> <!ENTITY identity.runBy "which is run by">
<!ENTITY identity.moreInfoLinkText "More Information"> <!ENTITY identity.moreInfoLinkText2 "More Information">
<!ENTITY identity.permissions "Permissions"> <!ENTITY identity.permissions "Permissions">
<!-- LOCALIZATION NOTE (identity.help.tooltip) : This string should be the
localized title of this SUMO article
https://support.mozilla.org/kb/how-do-i-tell-if-my-connection-is-secure -->
<!ENTITY identity.help.tooltip "How do I tell if my connection to a website is secure?">
<!-- Name for the tabs toolbar as spoken by screen readers. <!-- Name for the tabs toolbar as spoken by screen readers.
The word "toolbar" is appended automatically and should not be contained below! --> The word "toolbar" is appended automatically and should not be contained below! -->
<!ENTITY tabsToolbar.label "Browser tabs"> <!ENTITY tabsToolbar.label "Browser tabs">

Просмотреть файл

@ -1025,105 +1025,6 @@ toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-ba
-moz-margin-end: 1px; -moz-margin-end: 1px;
} }
/* Identity popup icons */
#identity-popup-icon {
height: 64px;
width: 64px;
padding: 0;
list-style-image: url("chrome://browser/skin/identity.png");
-moz-image-region: rect(0px, 64px, 64px, 0px);
}
#identity-popup.verifiedDomain > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(64px, 64px, 128px, 0px);
}
#identity-popup.verifiedIdentity > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(128px, 64px, 192px, 0px);
}
/* Identity popup body text */
.identity-popup-description {
white-space: pre-wrap;
-moz-padding-start: 15px;
margin: 2px 0 4px;
}
.identity-popup-label {
white-space: pre-wrap;
-moz-padding-start: 15px;
margin: 0;
}
#identity-popup-content-host ,
#identity-popup-content-owner {
font-weight: bold;
max-width: 300px;
}
#identity-popup-content-host ,
#identity-popup-content-box.verifiedIdentity > #identity-popup-content-owner {
font-size: 140%;
}
#identity-popup-content-owner {
margin-bottom: 0 !important;
}
#identity-popup-content-verifier {
margin: 4px 0 2px;
}
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption {
margin-top: 10px;
-moz-margin-start: -18px;
}
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption > vbox > #identity-popup-encryption-icon ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption > vbox > #identity-popup-encryption-icon {
list-style-image: url("chrome://browser/skin/Secure.png");
}
#identity-popup-help-icon {
-moz-appearance: none;
margin-left: 0px;
border: none;
background: none;
min-width: 0;
list-style-image: url("moz-icon://stock/gtk-dialog-question?size=16");
cursor: pointer;
}
#identity-popup-help-icon > .button-box > .button-text {
display: none;
}
#identity-popup-help-icon > .button-box > .button-icon {
height: 16px;
width: 16px;
}
#identity-popup-help-icon:-moz-focusring {
outline: 1px dotted;
outline-offset: 1px;
}
#identity-popup > .panel-arrowcontainer > .panel-arrowcontent {
padding: 0;
}
#identity-popup-container {
min-width: 280px;
padding: 10px;
}
#identity-popup-button-container {
background: linear-gradient(to bottom, rgba(0,0,0,0.04) 60%, transparent);
padding: 10px;
margin-top: 5px;
}
%include ../shared/notification-icons.inc.css %include ../shared/notification-icons.inc.css
.popup-notification-body[popupid="addon-progress"], .popup-notification-body[popupid="addon-progress"],

Просмотреть файл

@ -0,0 +1,74 @@
/* 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/controlcenter/panel.inc.css
/* Identity popup icons */
#identity-popup-icon {
height: 64px;
width: 64px;
padding: 0;
list-style-image: url("chrome://browser/skin/identity.png");
-moz-image-region: rect(0px, 64px, 64px, 0px);
}
#identity-popup.verifiedDomain > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(64px, 64px, 128px, 0px);
}
#identity-popup.verifiedIdentity > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(128px, 64px, 192px, 0px);
}
/* Identity popup body text */
.identity-popup-description {
white-space: pre-wrap;
-moz-padding-start: 15px;
margin: 2px 0 4px;
}
.identity-popup-label {
white-space: pre-wrap;
-moz-padding-start: 15px;
margin: 0;
}
#identity-popup-content-host ,
#identity-popup-content-owner {
font-weight: bold;
max-width: 300px;
}
#identity-popup-content-host ,
#identity-popup-content-box.verifiedIdentity > #identity-popup-content-owner {
font-size: 140%;
}
#identity-popup-content-owner {
margin-bottom: 0 !important;
}
#identity-popup-content-verifier {
margin: 4px 0 2px;
}
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption {
margin-top: 10px;
-moz-margin-start: -18px;
}
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption > vbox > #identity-popup-encryption-icon ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption > vbox > #identity-popup-encryption-icon {
list-style-image: url("chrome://browser/skin/Secure.png");
}
#identity-popup > .panel-arrowcontainer > .panel-arrowcontent {
padding: 0;
}
#identity-popup-container {
min-width: 280px;
padding: 10px;
}

Просмотреть файл

@ -134,6 +134,7 @@ browser.jar:
skin/classic/browser/loop/menuPanel.png (loop/menuPanel.png) skin/classic/browser/loop/menuPanel.png (loop/menuPanel.png)
skin/classic/browser/loop/toolbar.png (loop/toolbar.png) skin/classic/browser/loop/toolbar.png (loop/toolbar.png)
skin/classic/browser/loop/toolbar-inverted.png (loop/toolbar-inverted.png) skin/classic/browser/loop/toolbar-inverted.png (loop/toolbar-inverted.png)
* skin/classic/browser/controlcenter/panel.css (controlcenter/panel.css)
skin/classic/browser/customizableui/background-noise-toolbar.png (customizableui/background-noise-toolbar.png) skin/classic/browser/customizableui/background-noise-toolbar.png (customizableui/background-noise-toolbar.png)
skin/classic/browser/customizableui/customize-illustration.png (../shared/customizableui/customize-illustration.png) skin/classic/browser/customizableui/customize-illustration.png (../shared/customizableui/customize-illustration.png)
skin/classic/browser/customizableui/customize-illustration-rtl.png (../shared/customizableui/customize-illustration-rtl.png) skin/classic/browser/customizableui/customize-illustration-rtl.png (../shared/customizableui/customize-illustration-rtl.png)

Просмотреть файл

@ -3118,140 +3118,6 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
background-color: Highlight; background-color: Highlight;
} }
/* Popup Icons */
#identity-popup-icon {
height: 64px;
width: 64px;
padding: 0;
list-style-image: url("chrome://browser/skin/identity.png");
-moz-image-region: rect(0px, 64px, 64px, 0px);
}
#identity-popup.verifiedDomain > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(64px, 64px, 128px, 0px);
}
#identity-popup.verifiedIdentity > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(128px, 64px, 192px, 0px);
}
@media (min-resolution: 2dppx) {
#identity-popup-icon {
list-style-image: url("chrome://browser/skin/identity@2x.png");
-moz-image-region: rect(0px, 128px, 128px, 0px);
}
#identity-popup.verifiedDomain > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(128px, 128px, 256px, 0px);
}
#identity-popup.verifiedIdentity > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(256px, 128px, 384px, 0px);
}
}
/* Popup Body Text */
.identity-popup-description {
white-space: pre-wrap;
-moz-padding-start: 15px;
margin: 2px 0 4px;
}
.identity-popup-label {
white-space: pre-wrap;
-moz-padding-start: 15px;
margin: 0;
}
#identity-popup-content-host ,
#identity-popup-content-owner {
font-weight: bold;
max-width: 300px;
}
#identity-popup-content-host ,
#identity-popup-content-box.verifiedIdentity > #identity-popup-content-owner {
font-size: 140%;
}
#identity-popup-content-owner {
margin-bottom: 0 !important;
}
#identity-popup-content-verifier {
margin: 4px 0 2px;
}
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption {
margin-top: 10px;
-moz-margin-start: -24px;
}
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption > vbox > #identity-popup-encryption-icon ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption > vbox > #identity-popup-encryption-icon {
margin-top: 5px;
list-style-image: url("chrome://browser/skin/Secure-Glyph.png");
}
#identity-popup-help-icon {
-moz-appearance: none;
border: none;
margin: 10px 0 0 2px;
background: none;
min-width: 0;
list-style-image: url("chrome://global/skin/icons/question-16.png");
cursor: pointer;
}
#identity-popup-help-icon > .button-box > .button-text {
display: none;
}
#identity-popup-help-icon > .button-box > .button-icon {
height: 16px;
width: 16px;
}
#identity-popup-help-icon:focus {
@hudButtonFocused@
}
#identity-popup-help-icon:hover:active {
@hudButtonPressed@
}
@media (min-resolution: 2dppx) {
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption > vbox > #identity-popup-encryption-icon ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption > vbox > #identity-popup-encryption-icon {
list-style-image: url("chrome://browser/skin/Secure-Glyph@2x.png");
width: 24px;
}
#identity-popup-help-icon {
list-style-image: url("chrome://global/skin/icons/question-32.png");
}
}
#identity-popup {
margin-top: 1px;
}
#identity-popup > .panel-arrowcontainer > .panel-arrowcontent {
padding: 0;
}
#identity-popup-container {
padding: 16px;
}
#identity-popup-button-container {
background-color: hsla(210,4%,10%,.07);
border-top: 1px solid hsla(210,4%,10%,.12);
padding: 16px;
margin-top: 5px;
}
%include ../shared/notification-icons.inc.css %include ../shared/notification-icons.inc.css
#notification-popup-box { #notification-popup-box {
@ -3431,21 +3297,6 @@ notification[value="loop-sharing-notification"] .messageImage {
font-weight: bold; font-weight: bold;
} }
/* Popup Buttons */
#identity-popup-more-info-button {
@hudButton@
margin: 10px 0 0;
min-height: 0px;
}
#identity-popup-more-info-button:focus {
@hudButtonFocused@
}
#identity-popup-more-info-button:hover:active {
@hudButtonPressed@
}
/* ::::: Keyboard UI Panel ::::: */ /* ::::: Keyboard UI Panel ::::: */
.KUI-panel { .KUI-panel {

Просмотреть файл

@ -0,0 +1,101 @@
/* 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/controlcenter/panel.inc.css
/* Popup Icons */
#identity-popup-icon {
height: 64px;
width: 64px;
padding: 0;
list-style-image: url("chrome://browser/skin/identity.png");
-moz-image-region: rect(0px, 64px, 64px, 0px);
}
#identity-popup.verifiedDomain > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(64px, 64px, 128px, 0px);
}
#identity-popup.verifiedIdentity > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(128px, 64px, 192px, 0px);
}
@media (min-resolution: 2dppx) {
#identity-popup-icon {
list-style-image: url("chrome://browser/skin/identity@2x.png");
-moz-image-region: rect(0px, 128px, 128px, 0px);
}
#identity-popup.verifiedDomain > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(128px, 128px, 256px, 0px);
}
#identity-popup.verifiedIdentity > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(256px, 128px, 384px, 0px);
}
}
/* Popup Body Text */
.identity-popup-description {
white-space: pre-wrap;
-moz-padding-start: 15px;
margin: 2px 0 4px;
}
.identity-popup-label {
white-space: pre-wrap;
-moz-padding-start: 15px;
margin: 0;
}
#identity-popup-content-host ,
#identity-popup-content-owner {
font-weight: bold;
max-width: 300px;
}
#identity-popup-content-host ,
#identity-popup-content-box.verifiedIdentity > #identity-popup-content-owner {
font-size: 140%;
}
#identity-popup-content-owner {
margin-bottom: 0 !important;
}
#identity-popup-content-verifier {
margin: 4px 0 2px;
}
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption {
margin-top: 10px;
-moz-margin-start: -24px;
}
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption > vbox > #identity-popup-encryption-icon ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption > vbox > #identity-popup-encryption-icon {
margin-top: 5px;
list-style-image: url("chrome://browser/skin/Secure-Glyph.png");
}
@media (min-resolution: 2dppx) {
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption > vbox > #identity-popup-encryption-icon ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption > vbox > #identity-popup-encryption-icon {
list-style-image: url("chrome://browser/skin/Secure-Glyph@2x.png");
width: 24px;
}
}
#identity-popup {
margin-top: 1px;
}
#identity-popup > .panel-arrowcontainer > .panel-arrowcontent {
padding: 0;
}
#identity-popup-container {
padding: 16px;
}

Просмотреть файл

@ -192,6 +192,7 @@ browser.jar:
skin/classic/browser/yosemite/loop/menuPanel@2x.png (loop/menuPanel-yosemite@2x.png) skin/classic/browser/yosemite/loop/menuPanel@2x.png (loop/menuPanel-yosemite@2x.png)
skin/classic/browser/yosemite/loop/toolbar.png (loop/toolbar-yosemite.png) skin/classic/browser/yosemite/loop/toolbar.png (loop/toolbar-yosemite.png)
skin/classic/browser/yosemite/loop/toolbar@2x.png (loop/toolbar-yosemite@2x.png) skin/classic/browser/yosemite/loop/toolbar@2x.png (loop/toolbar-yosemite@2x.png)
* skin/classic/browser/controlcenter/panel.css (controlcenter/panel.css)
skin/classic/browser/customizableui/background-noise-toolbar.png (customizableui/background-noise-toolbar.png) skin/classic/browser/customizableui/background-noise-toolbar.png (customizableui/background-noise-toolbar.png)
skin/classic/browser/customizableui/customize-titleBar-toggle.png (customizableui/customize-titleBar-toggle.png) skin/classic/browser/customizableui/customize-titleBar-toggle.png (customizableui/customize-titleBar-toggle.png)
skin/classic/browser/customizableui/customize-titleBar-toggle@2x.png (customizableui/customize-titleBar-toggle@2x.png) skin/classic/browser/customizableui/customize-titleBar-toggle@2x.png (customizableui/customize-titleBar-toggle@2x.png)

Просмотреть файл

@ -0,0 +1,59 @@
#identity-popup-content-box:not(.chromeUI) > #identity-popup-brandName,
#identity-popup-content-box:not(.chromeUI) > #identity-popup-chromeLabel,
#identity-popup-content-box.chromeUI > .identity-popup-label:not(#identity-popup-brandName):not(#identity-popup-chromeLabel),
#identity-popup-content-box.chromeUI > .identity-popup-description,
#identity-popup-content-box.unknownIdentity > #identity-popup-connectedToLabel ,
#identity-popup-content-box.unknownIdentity > #identity-popup-runByLabel ,
#identity-popup-content-box.unknownIdentity > #identity-popup-content-host ,
#identity-popup-content-box.unknownIdentity > #identity-popup-content-owner ,
#identity-popup-content-box.verifiedIdentity > #identity-popup-connectedToLabel2 ,
#identity-popup-content-box.verifiedDomain > #identity-popup-connectedToLabel2 ,
#identity-popup-content-box.verifiedDomain > #identity-popup-runByLabel {
display: none;
}
#identity-popup.chromeUI > #identity-popup-container > #identity-popup-icon {
list-style-image: url("chrome://branding/content/icon64.png");
}
#identity-popup-brandName {
font-weight: bold;
font-size: 1.25em;
margin-top: .5em;
margin-bottom: .5em;
}
#identity-popup-content-box {
max-width: 50ch;
}
#identity-popup-button-container {
background-color: hsla(210,4%,10%,.07);
}
#identity-popup-more-info-button {
border: none;
border-top: 1px solid hsla(210,4%,10%,.14);
background: transparent;
-moz-appearance: none;
margin-top: 5px;
padding: 1.1em;
margin: 0;
}
#identity-popup-more-info-button:hover {
background-color: hsla(210,4%,10%,.07);
}
#identity-popup-more-info-button:hover:active {
color: inherit;
background-color: hsla(210,4%,10%,.12);
box-shadow: 0 1px 0 hsla(210,4%,10%,.05) inset;
}
@media (min-resolution: 1.1dppx) {
#identity-popup.chromeUI > #identity-popup-container > #identity-popup-icon {
list-style-image: url("chrome://branding/content/icon128.png");
-moz-image-region: rect(0, 128px, 128px, 0);
}
}

Просмотреть файл

@ -91,21 +91,6 @@
opacity: 0.3; opacity: 0.3;
} }
#identity-popup.chromeUI > #identity-popup-container > #identity-popup-icon {
list-style-image: url("chrome://branding/content/icon64.png");
}
#identity-popup-brandName {
font-weight: bold;
font-size: 1.25em;
margin-top: .5em;
margin-bottom: .5em;
}
#identity-popup-content-box {
max-width: 50ch;
}
@media not all and (min-resolution: 1.1dppx) { @media not all and (min-resolution: 1.1dppx) {
#page-proxy-favicon { #page-proxy-favicon {
-moz-image-region: rect(0, 16px, 16px, 0); -moz-image-region: rect(0, 16px, 16px, 0);
@ -159,9 +144,4 @@
#identity-box[open=true] > #page-proxy-favicon { #identity-box[open=true] > #page-proxy-favicon {
-moz-image-region: rect(0, 96px, 32px, 64px); -moz-image-region: rect(0, 96px, 32px, 64px);
} }
#identity-popup.chromeUI > #identity-popup-container > #identity-popup-icon {
list-style-image: url("chrome://branding/content/icon128.png");
-moz-image-region: rect(0, 128px, 128px, 0);
}
} }

Просмотреть файл

@ -158,26 +158,33 @@
text-shadow: 0 0 .5em white, 0 0 .5em white, 0 1px 0 rgba(255,255,255,.4); text-shadow: 0 0 .5em white, 0 0 .5em white, 0 1px 0 rgba(255,255,255,.4);
} }
/* Vertical toolbar border */ /* Show borders on vista through win8, but not on win10 and later: */
#main-window:not([customizing])[sizemode=normal] #navigator-toolbox:not(:-moz-lwtheme)::after, @media (-moz-os-version: windows-vista),
#main-window:not([customizing])[sizemode=normal] #navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(:-moz-lwtheme), (-moz-os-version: windows-win7),
#main-window:not([customizing])[sizemode=normal] #navigator-toolbox:-moz-lwtheme, (-moz-os-version: windows-win8) {
#main-window[customizing] #navigator-toolbox::after, /* Vertical toolbar border */
#main-window[customizing] #navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar) { #main-window:not([customizing])[sizemode=normal] #navigator-toolbox:not(:-moz-lwtheme)::after,
border-left: 1px solid @toolbarShadowColor@; #main-window:not([customizing])[sizemode=normal] #navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(:-moz-lwtheme),
border-right: 1px solid @toolbarShadowColor@; #main-window:not([customizing])[sizemode=normal] #navigator-toolbox:-moz-lwtheme,
background-clip: padding-box; #main-window[customizing] #navigator-toolbox::after,
} #main-window[customizing] #navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar) {
#main-window[sizemode=normal] #browser-border-start, border-left: 1px solid @toolbarShadowColor@;
#main-window[sizemode=normal] #browser-border-end { border-right: 1px solid @toolbarShadowColor@;
display: -moz-box; background-clip: padding-box;
background-color: @toolbarShadowColor@; }
width: 1px;
} #main-window[sizemode=normal] #browser-border-start,
#main-window[sizemode=normal] #browser-bottombox { #main-window[sizemode=normal] #browser-border-end {
border: 1px solid @toolbarShadowColor@; display: -moz-box;
border-top-style: none; background-color: @toolbarShadowColor@;
background-clip: padding-box; width: 1px;
}
#main-window[sizemode=normal] #browser-bottombox {
border: 1px solid @toolbarShadowColor@;
border-top-style: none;
background-clip: padding-box;
}
} }
#main-window[sizemode=normal] #TabsToolbar { #main-window[sizemode=normal] #TabsToolbar {

Просмотреть файл

@ -2138,116 +2138,6 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
background-color: Highlight; background-color: Highlight;
} }
/* ::::: Identity Indicator Styling ::::: */
/* Popup Icons */
#identity-popup-icon {
height: 64px;
width: 64px;
padding: 0;
list-style-image: url("chrome://browser/skin/identity.png");
-moz-image-region: rect(0px, 64px, 64px, 0px);
}
#identity-popup.verifiedDomain > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(64px, 64px, 128px, 0px);
}
#identity-popup.verifiedIdentity > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(128px, 64px, 192px, 0px);
}
/* Popup Body Text */
.identity-popup-description {
white-space: pre-wrap;
-moz-padding-start: 15px;
margin: 2px 0 4px;
}
.identity-popup-label {
white-space: pre-wrap;
-moz-padding-start: 15px;
margin: 0;
}
#identity-popup-content-host,
#identity-popup-content-box.verifiedIdentity > #identity-popup-content-owner {
font-size: 1.2em;
}
#identity-popup-content-host {
margin-top: 3px;
margin-bottom: 5px;
font-weight: bold;
max-width: 300px;
}
#identity-popup-content-owner {
margin-top: 4px;
margin-bottom: 0 !important;
font-weight: bold;
max-width: 300px;
}
.verifiedDomain > #identity-popup-content-owner {
font-weight: normal;
}
#identity-popup-content-verifier {
margin: 4px 0 2px;
}
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption {
margin-top: 10px;
-moz-margin-start: -24px;
}
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption > vbox > #identity-popup-encryption-icon ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption > vbox > #identity-popup-encryption-icon {
list-style-image: url("chrome://browser/skin/Secure24.png");
}
#identity-popup-help-icon {
-moz-appearance: none;
border: none;
margin: 7px 0 0 -3px;
background: none;
min-width: 0;
list-style-image: url("chrome://global/skin/icons/question-16.png");
cursor: pointer;
}
#identity-popup-help-icon > .button-box > .button-text {
display: none;
}
#identity-popup-help-icon > .button-box > .button-icon {
height: 16px;
width: 16px;
}
#identity-popup-more-info-button {
margin-top: 6px;
margin-bottom: 0;
-moz-margin-end: 0;
}
#identity-popup > .panel-arrowcontainer > .panel-arrowcontent {
padding: 0;
}
#identity-popup-container {
min-width: 280px;
padding: 10px;
}
#identity-popup-button-container {
background: linear-gradient(to bottom, rgba(0,0,0,0.04) 60%, transparent);
padding: 10px;
margin-top: 5px;
}
%include ../shared/notification-icons.inc.css %include ../shared/notification-icons.inc.css
.popup-notification-body[popupid="addon-progress"], .popup-notification-body[popupid="addon-progress"],

Просмотреть файл

@ -0,0 +1,82 @@
/* 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/controlcenter/panel.inc.css
/* Popup Icons */
#identity-popup-icon {
height: 64px;
width: 64px;
padding: 0;
list-style-image: url("chrome://browser/skin/identity.png");
-moz-image-region: rect(0px, 64px, 64px, 0px);
}
#identity-popup.verifiedDomain > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(64px, 64px, 128px, 0px);
}
#identity-popup.verifiedIdentity > #identity-popup-container > #identity-popup-icon {
-moz-image-region: rect(128px, 64px, 192px, 0px);
}
/* Popup Body Text */
.identity-popup-description {
white-space: pre-wrap;
-moz-padding-start: 15px;
margin: 2px 0 4px;
}
.identity-popup-label {
white-space: pre-wrap;
-moz-padding-start: 15px;
margin: 0;
}
#identity-popup-content-host,
#identity-popup-content-box.verifiedIdentity > #identity-popup-content-owner {
font-size: 1.2em;
}
#identity-popup-content-host {
margin-top: 3px;
margin-bottom: 5px;
font-weight: bold;
max-width: 300px;
}
#identity-popup-content-owner {
margin-top: 4px;
margin-bottom: 0 !important;
font-weight: bold;
max-width: 300px;
}
.verifiedDomain > #identity-popup-content-owner {
font-weight: normal;
}
#identity-popup-content-verifier {
margin: 4px 0 2px;
}
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption {
margin-top: 10px;
-moz-margin-start: -24px;
}
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption > vbox > #identity-popup-encryption-icon ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption > vbox > #identity-popup-encryption-icon {
list-style-image: url("chrome://browser/skin/Secure24.png");
}
#identity-popup > .panel-arrowcontainer > .panel-arrowcontent {
padding: 0;
}
#identity-popup-container {
min-width: 280px;
padding: 10px;
}

Просмотреть файл

@ -177,6 +177,7 @@ browser.jar:
skin/classic/browser/loop/toolbar-inverted.png (loop/toolbar-inverted.png) skin/classic/browser/loop/toolbar-inverted.png (loop/toolbar-inverted.png)
skin/classic/browser/loop/toolbar-XP.png (loop/toolbar-XP.png) skin/classic/browser/loop/toolbar-XP.png (loop/toolbar-XP.png)
skin/classic/browser/loop/toolbar-lunaSilver.png (loop/toolbar-lunaSilver.png) skin/classic/browser/loop/toolbar-lunaSilver.png (loop/toolbar-lunaSilver.png)
* skin/classic/browser/controlcenter/panel.css (controlcenter/panel.css)
skin/classic/browser/customizableui/background-noise-toolbar.png (customizableui/background-noise-toolbar.png) skin/classic/browser/customizableui/background-noise-toolbar.png (customizableui/background-noise-toolbar.png)
skin/classic/browser/customizableui/customizeFavicon.ico (../shared/customizableui/customizeFavicon.ico) skin/classic/browser/customizableui/customizeFavicon.ico (../shared/customizableui/customizeFavicon.ico)
skin/classic/browser/customizableui/customize-illustration.png (../shared/customizableui/customize-illustration.png) skin/classic/browser/customizableui/customize-illustration.png (../shared/customizableui/customize-illustration.png)

Просмотреть файл

@ -64,7 +64,7 @@ case "$target" in
kernel_name=`uname -s | tr "[[:upper:]]" "[[:lower:]]"` kernel_name=`uname -s | tr "[[:upper:]]" "[[:lower:]]"`
for version in $android_gnu_compiler_version 4.8 4.7 4.6 4.4.3; do for version in $android_gnu_compiler_version 4.9 4.8 4.7 4.6 4.4.3; do
case "$target_cpu" in case "$target_cpu" in
arm) arm)
target_name=arm-linux-androideabi-$version target_name=arm-linux-androideabi-$version

Просмотреть файл

@ -21,7 +21,7 @@
namespace mozilla { namespace mozilla {
void void
OriginAttributes::CreateSuffix(nsACString& aStr) OriginAttributes::CreateSuffix(nsACString& aStr) const
{ {
aStr.Truncate(); aStr.Truncate();
MOZ_RELEASE_ASSERT(mAppId != nsIScriptSecurityManager::UNKNOWN_APP_ID); MOZ_RELEASE_ASSERT(mAppId != nsIScriptSecurityManager::UNKNOWN_APP_ID);
@ -259,4 +259,29 @@ BasePrincipal::CreateCodebasePrincipal(nsIURI* aURI, OriginAttributes& aAttrs)
return codebase.forget(); return codebase.forget();
} }
/* static */ bool
BasePrincipal::IsCodebasePrincipal(nsIPrincipal* aPrincipal)
{
MOZ_ASSERT(aPrincipal);
bool isNullPrincipal = true;
nsresult rv = aPrincipal->GetIsNullPrincipal(&isNullPrincipal);
if (NS_WARN_IF(NS_FAILED(rv))) {
return false;
}
if (isNullPrincipal || nsContentUtils::IsSystemPrincipal(aPrincipal)) {
return false;
}
// No expanded principals.
nsCOMPtr<nsIExpandedPrincipal> expandedPrincipal =
do_QueryInterface(aPrincipal);
if (expandedPrincipal) {
return false;
}
return true;
}
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -41,7 +41,7 @@ public:
// Serializes non-default values into the suffix format, i.e. // Serializes non-default values into the suffix format, i.e.
// |!key1=value1&key2=value2|. If there are no non-default attributes, this // |!key1=value1&key2=value2|. If there are no non-default attributes, this
// returns an empty string. // returns an empty string.
void CreateSuffix(nsACString& aStr); void CreateSuffix(nsACString& aStr) const;
void Serialize(nsIObjectOutputStream* aStream) const; void Serialize(nsIObjectOutputStream* aStream) const;
nsresult Deserialize(nsIObjectInputStream* aStream); nsresult Deserialize(nsIObjectInputStream* aStream);
@ -83,6 +83,8 @@ public:
virtual bool IsOnCSSUnprefixingWhitelist() override { return false; } virtual bool IsOnCSSUnprefixingWhitelist() override { return false; }
static bool IsCodebasePrincipal(nsIPrincipal* aPrincipal);
static BasePrincipal* Cast(nsIPrincipal* aPrin) { return static_cast<BasePrincipal*>(aPrin); } static BasePrincipal* Cast(nsIPrincipal* aPrin) { return static_cast<BasePrincipal*>(aPrin); }
static already_AddRefed<BasePrincipal> CreateCodebasePrincipal(nsIURI* aURI, OriginAttributes& aAttrs); static already_AddRefed<BasePrincipal> CreateCodebasePrincipal(nsIURI* aURI, OriginAttributes& aAttrs);

6
config/external/moz.build поставляемый
Просмотреть файл

@ -40,6 +40,12 @@ if not CONFIG['MOZ_NATIVE_PNG']:
if CONFIG['CPU_ARCH'] == 'arm': if CONFIG['CPU_ARCH'] == 'arm':
external_dirs += ['media/openmax_dl'] external_dirs += ['media/openmax_dl']
if CONFIG['MOZ_WEBSPEECH_POCKETSPHINX']:
external_dirs += [
'media/sphinxbase',
'media/pocketsphinx',
]
external_dirs += [ external_dirs += [
'media/kiss_fft', 'media/kiss_fft',
'media/libcubeb', 'media/libcubeb',

Просмотреть файл

@ -3879,6 +3879,9 @@ MOZ_OMX_PLUGIN=
MOZ_VPX= MOZ_VPX=
MOZ_VPX_ERROR_CONCEALMENT= MOZ_VPX_ERROR_CONCEALMENT=
MOZ_WEBSPEECH=1 MOZ_WEBSPEECH=1
MOZ_WEBSPEECH_MODELS=
MOZ_WEBSPEECH_POCKETSPHINX=
MOZ_WEBSPEECH_TEST_BACKEND=1
VPX_AS= VPX_AS=
VPX_ASFLAGS= VPX_ASFLAGS=
VPX_AS_CONVERSION= VPX_AS_CONVERSION=
@ -5164,6 +5167,34 @@ else
AC_SUBST(MOZ_SAMPLE_TYPE_FLOAT32) AC_SUBST(MOZ_SAMPLE_TYPE_FLOAT32)
fi fi
dnl ========================================================
dnl = Disable Speech API test backend
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(webspeechtestbackend,
[ --disable-webspeechtestbackend Disable support for HTML Speech API Test Backend],
MOZ_WEBSPEECH_TEST_BACKEND=,
MOZ_WEBSPEECH_TEST_BACKEND=1)
if test -n "$MOZ_WEBSPEECH_TEST_BACKEND"; then
AC_DEFINE(MOZ_WEBSPEECH_TEST_BACKEND)
fi
AC_SUBST(MOZ_WEBSPEECH_TEST_BACKEND)
dnl ========================================================
dnl = Disable Speech API pocketsphinx backend
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(webspeechpocketsphinx,
[ --disable-webspeechpocketsphinx Disable support for HTML Speech API Pocketsphinx Backend],
MOZ_WEBSPEECH_POCKETSPHINX=,
MOZ_WEBSPEECH_POCKETSPHINX=1)
if test -n "$MOZ_WEBSPEECH_POCKETSPHINX"; then
AC_DEFINE(MOZ_WEBSPEECH_POCKETSPHINX)
fi
AC_SUBST(MOZ_WEBSPEECH_POCKETSPHINX)
dnl ======================================================== dnl ========================================================
dnl = Disable Speech API code dnl = Disable Speech API code
dnl ======================================================== dnl ========================================================
@ -5178,6 +5209,20 @@ fi
AC_SUBST(MOZ_WEBSPEECH) AC_SUBST(MOZ_WEBSPEECH)
dnl ========================================================
dnl = Disable Speech API models
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(webspeechmodels,
[ --disable-webspeechmodels Disable support for HTML Speech API Models],
MOZ_WEBSPEECH_MODELS=,
MOZ_WEBSPEECH_MODELS=1)
if test -n "$MOZ_WEBSPEECH_MODELS"; then
AC_DEFINE(MOZ_WEBSPEECH_MODELS)
fi
AC_SUBST(MOZ_WEBSPEECH_MODELS)
dnl ======================================================== dnl ========================================================
dnl = Enable Raw Codecs dnl = Enable Raw Codecs
dnl ======================================================== dnl ========================================================
@ -5340,17 +5385,31 @@ dnl ========================================================
dnl = EME support dnl = EME support
dnl ======================================================== dnl ========================================================
MOZ_ARG_DISABLE_BOOL(eme, MOZ_ARG_ENABLE_STRING(eme,
[ --disable-eme Disable support for Encrypted Media Extensions], [ --enable-eme[=adobe] Enable support for Encrypted Media Extensions ],
MOZ_EME=, MOZ_EME_ARGS=$enableval)
MOZ_EME=1)
if test "$MOZ_EME_ARGS"; then
if test "$MOZ_EME_ARGS" = "no"; then
dnl EME explicitly disabled with --disable-eme
MOZ_EME=
elif test "$MOZ_EME_ARGS" = "yes"; then
dnl EME explicitly enabled with --enable-eme
MOZ_EME=1
else
dnl EME explicitly enabled with --enable-eme=<args>
MOZ_EME=1
MOZ_EME_MODULES=`echo $MOZ_EME_ARGS | sed -e 's/,/ /g'`
fi
fi
AC_SUBST_SET(MOZ_EME_MODULES)
if test -n "$MOZ_EME"; then if test -n "$MOZ_EME"; then
if test -z "$MOZ_FMP4"; then if test -z "$MOZ_FMP4"; then
AC_MSG_ERROR([Encrypted Media Extension support requires Fragmented MP4 support]) AC_MSG_ERROR([Encrypted Media Extension support requires Fragmented MP4 support])
fi fi
AC_DEFINE(MOZ_EME) AC_DEFINE(MOZ_EME)
fi; fi
dnl ======================================================== dnl ========================================================
dnl = Enable media plugin support dnl = Enable media plugin support
@ -7419,17 +7478,6 @@ dnl =
dnl ======================================================== dnl ========================================================
MOZ_ARG_HEADER(Profiling and Instrumenting) MOZ_ARG_HEADER(Profiling and Instrumenting)
dnl ========================================================
dnl = Enable runtime visual profiling logger
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(visual-event-tracer,
[ --enable-visual-event-tracer Enable visual event tracer instrumentation],
MOZ_VISUAL_EVENT_TRACER=1,
MOZ_VISUAL_EVENT_TRACER=)
if test -n "$MOZ_VISUAL_EVENT_TRACER"; then
AC_DEFINE(MOZ_VISUAL_EVENT_TRACER)
fi
dnl ======================================================== dnl ========================================================
dnl = Enable TaskTracer dnl = Enable TaskTracer
dnl ======================================================== dnl ========================================================
@ -8614,7 +8662,9 @@ else
# so if the file is named libsomething.so. The lib/ path is also required # so if the file is named libsomething.so. The lib/ path is also required
# because the unpacked file will be under the lib/ subdirectory and will # because the unpacked file will be under the lib/ subdirectory and will
# need to be executed from that path. # need to be executed from that path.
MOZ_CHILD_PROCESS_NAME="lib/libplugin-container.so" MOZ_CHILD_PROCESS_NAME="libplugin-container.so"
MOZ_CHILD_PROCESS_NAME_PIE="libplugin-container-pie.so"
AC_SUBST(MOZ_CHILD_PROCESS_NAME_PIE)
fi fi
MOZ_CHILD_PROCESS_BUNDLE="plugin-container.app/Contents/MacOS/" MOZ_CHILD_PROCESS_BUNDLE="plugin-container.app/Contents/MacOS/"

Просмотреть файл

@ -17,13 +17,13 @@
#include "mozilla/dom/TabChild.h" #include "mozilla/dom/TabChild.h"
#include "mozilla/dom/ProfileTimelineMarkerBinding.h" #include "mozilla/dom/ProfileTimelineMarkerBinding.h"
#include "mozilla/dom/ToJSValue.h" #include "mozilla/dom/ToJSValue.h"
#include "mozilla/dom/workers/ServiceWorkerManager.h"
#include "mozilla/EventStateManager.h" #include "mozilla/EventStateManager.h"
#include "mozilla/Preferences.h" #include "mozilla/Preferences.h"
#include "mozilla/Services.h" #include "mozilla/Services.h"
#include "mozilla/StartupTimeline.h" #include "mozilla/StartupTimeline.h"
#include "mozilla/Telemetry.h" #include "mozilla/Telemetry.h"
#include "mozilla/unused.h" #include "mozilla/unused.h"
#include "mozilla/VisualEventTracer.h"
#include "URIUtils.h" #include "URIUtils.h"
#include "nsIContent.h" #include "nsIContent.h"
@ -52,7 +52,6 @@
#include "nsIAuthPrompt2.h" #include "nsIAuthPrompt2.h"
#include "nsIChannelEventSink.h" #include "nsIChannelEventSink.h"
#include "nsIAsyncVerifyRedirectCallback.h" #include "nsIAsyncVerifyRedirectCallback.h"
#include "nsIServiceWorkerManager.h"
#include "nsIScriptSecurityManager.h" #include "nsIScriptSecurityManager.h"
#include "nsIScriptObjectPrincipal.h" #include "nsIScriptObjectPrincipal.h"
#include "nsIScrollableFrame.h" #include "nsIScrollableFrame.h"
@ -217,6 +216,7 @@ static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
using namespace mozilla; using namespace mozilla;
using namespace mozilla::dom; using namespace mozilla::dom;
using mozilla::dom::workers::ServiceWorkerManager;
// True means sUseErrorPages has been added to preferences var cache. // True means sUseErrorPages has been added to preferences var cache.
static bool gAddedPreferencesVarCache = false; static bool gAddedPreferencesVarCache = false;
@ -7499,8 +7499,6 @@ nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
return NS_ERROR_NULL_POINTER; return NS_ERROR_NULL_POINTER;
} }
MOZ_EVENT_TRACER_DONE(this, "docshell::pageload");
nsCOMPtr<nsIURI> url; nsCOMPtr<nsIURI> url;
nsresult rv = aChannel->GetURI(getter_AddRefs(url)); nsresult rv = aChannel->GetURI(getter_AddRefs(url));
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
@ -10481,13 +10479,6 @@ nsDocShell::DoURILoad(nsIURI* aURI,
nsIURI* aBaseURI, nsIURI* aBaseURI,
nsContentPolicyType aContentPolicyType) nsContentPolicyType aContentPolicyType)
{ {
#ifdef MOZ_VISUAL_EVENT_TRACER
nsAutoCString urlSpec;
aURI->GetAsciiSpec(urlSpec);
MOZ_EVENT_TRACER_NAME_OBJECT(this, urlSpec.BeginReading());
MOZ_EVENT_TRACER_EXEC(this, "docshell::pageload");
#endif
nsresult rv; nsresult rv;
nsCOMPtr<nsIURILoader> uriLoader; nsCOMPtr<nsIURILoader> uriLoader;
@ -14041,13 +14032,15 @@ nsDocShell::ShouldPrepareForIntercept(nsIURI* aURI, bool aIsNavigate,
return NS_OK; return NS_OK;
} }
nsCOMPtr<nsIServiceWorkerManager> swm = services::GetServiceWorkerManager(); nsRefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
if (!swm) { if (!swm) {
return NS_OK; return NS_OK;
} }
if (aIsNavigate) { if (aIsNavigate) {
return swm->IsAvailableForURI(aURI, aShouldIntercept); OriginAttributes attrs(GetAppId(), GetIsInBrowserElement());
*aShouldIntercept = swm->IsAvailable(attrs, aURI);
return NS_OK;
} }
nsCOMPtr<nsIDocument> doc = GetDocument(); nsCOMPtr<nsIDocument> doc = GetDocument();
@ -14055,13 +14048,19 @@ nsDocShell::ShouldPrepareForIntercept(nsIURI* aURI, bool aIsNavigate,
return NS_ERROR_NOT_AVAILABLE; return NS_ERROR_NOT_AVAILABLE;
} }
return swm->IsControlled(doc, aShouldIntercept); ErrorResult rv;
*aShouldIntercept = swm->IsControlled(doc, rv);
if (NS_WARN_IF(rv.Failed())) {
return rv.StealNSResult();
}
return NS_OK;
} }
NS_IMETHODIMP NS_IMETHODIMP
nsDocShell::ChannelIntercepted(nsIInterceptedChannel* aChannel) nsDocShell::ChannelIntercepted(nsIInterceptedChannel* aChannel)
{ {
nsCOMPtr<nsIServiceWorkerManager> swm = services::GetServiceWorkerManager(); nsRefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
if (!swm) { if (!swm) {
aChannel->Cancel(); aChannel->Cancel();
return NS_OK; return NS_OK;
@ -14081,7 +14080,16 @@ nsDocShell::ChannelIntercepted(nsIInterceptedChannel* aChannel)
} }
bool isReload = mLoadType & LOAD_CMD_RELOAD; bool isReload = mLoadType & LOAD_CMD_RELOAD;
return swm->DispatchFetchEvent(doc, aChannel, isReload);
OriginAttributes attrs(GetAppId(), GetIsInBrowserElement());
ErrorResult error;
swm->DispatchFetchEvent(attrs, doc, aChannel, isReload, error);
if (NS_WARN_IF(error.Failed())) {
return error.StealNSResult();
}
return NS_OK;
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -1336,127 +1336,127 @@ DOMInterfaces = {
'headerFile': 'WebGLBuffer.h' 'headerFile': 'WebGLBuffer.h'
}, },
'WebGLExtensionCompressedTextureATC': { 'WEBGL_compressed_texture_atc': {
'nativeType': 'mozilla::WebGLExtensionCompressedTextureATC', 'nativeType': 'mozilla::WebGLExtensionCompressedTextureATC',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionCompressedTextureETC1': { 'WEBGL_compressed_texture_etc1': {
'nativeType': 'mozilla::WebGLExtensionCompressedTextureETC1', 'nativeType': 'mozilla::WebGLExtensionCompressedTextureETC1',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionCompressedTexturePVRTC': { 'WEBGL_compressed_texture_pvrtc': {
'nativeType': 'mozilla::WebGLExtensionCompressedTexturePVRTC', 'nativeType': 'mozilla::WebGLExtensionCompressedTexturePVRTC',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionCompressedTextureS3TC': { 'WEBGL_compressed_texture_s3tc': {
'nativeType': 'mozilla::WebGLExtensionCompressedTextureS3TC', 'nativeType': 'mozilla::WebGLExtensionCompressedTextureS3TC',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionDepthTexture': { 'WEBGL_depth_texture': {
'nativeType': 'mozilla::WebGLExtensionDepthTexture', 'nativeType': 'mozilla::WebGLExtensionDepthTexture',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionDebugRendererInfo': { 'WEBGL_debug_renderer_info': {
'nativeType': 'mozilla::WebGLExtensionDebugRendererInfo', 'nativeType': 'mozilla::WebGLExtensionDebugRendererInfo',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionDebugShaders': { 'WEBGL_debug_shaders': {
'nativeType': 'mozilla::WebGLExtensionDebugShaders', 'nativeType': 'mozilla::WebGLExtensionDebugShaders',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionElementIndexUint': { 'OES_element_index_uint': {
'nativeType': 'mozilla::WebGLExtensionElementIndexUint', 'nativeType': 'mozilla::WebGLExtensionElementIndexUint',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionFragDepth': { 'EXT_frag_depth': {
'nativeType': 'mozilla::WebGLExtensionFragDepth', 'nativeType': 'mozilla::WebGLExtensionFragDepth',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionLoseContext': { 'WEBGL_lose_context': {
'nativeType': 'mozilla::WebGLExtensionLoseContext', 'nativeType': 'mozilla::WebGLExtensionLoseContext',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionSRGB': { 'EXT_sRGB': {
'nativeType': 'mozilla::WebGLExtensionSRGB', 'nativeType': 'mozilla::WebGLExtensionSRGB',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionStandardDerivatives': { 'OES_standard_derivatives': {
'nativeType': 'mozilla::WebGLExtensionStandardDerivatives', 'nativeType': 'mozilla::WebGLExtensionStandardDerivatives',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionShaderTextureLod': { 'EXT_shader_texture_lod': {
'nativeType': 'mozilla::WebGLExtensionShaderTextureLod', 'nativeType': 'mozilla::WebGLExtensionShaderTextureLod',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionTextureFilterAnisotropic': { 'EXT_texture_filter_anisotropic': {
'nativeType': 'mozilla::WebGLExtensionTextureFilterAnisotropic', 'nativeType': 'mozilla::WebGLExtensionTextureFilterAnisotropic',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionTextureFloat': { 'OES_texture_float': {
'nativeType': 'mozilla::WebGLExtensionTextureFloat', 'nativeType': 'mozilla::WebGLExtensionTextureFloat',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionTextureFloatLinear': { 'OES_texture_float_linear': {
'nativeType': 'mozilla::WebGLExtensionTextureFloatLinear', 'nativeType': 'mozilla::WebGLExtensionTextureFloatLinear',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionTextureHalfFloat': { 'OES_texture_half_float': {
'nativeType': 'mozilla::WebGLExtensionTextureHalfFloat', 'nativeType': 'mozilla::WebGLExtensionTextureHalfFloat',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionTextureHalfFloatLinear': { 'OES_texture_half_float_linear': {
'nativeType': 'mozilla::WebGLExtensionTextureHalfFloatLinear', 'nativeType': 'mozilla::WebGLExtensionTextureHalfFloatLinear',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionColorBufferFloat': { 'WEBGL_color_buffer_float': {
'nativeType': 'mozilla::WebGLExtensionColorBufferFloat', 'nativeType': 'mozilla::WebGLExtensionColorBufferFloat',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionColorBufferHalfFloat': { 'EXT_color_buffer_half_float': {
'nativeType': 'mozilla::WebGLExtensionColorBufferHalfFloat', 'nativeType': 'mozilla::WebGLExtensionColorBufferHalfFloat',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionDrawBuffers': { 'WEBGL_draw_buffers': {
'nativeType': 'mozilla::WebGLExtensionDrawBuffers', 'nativeType': 'mozilla::WebGLExtensionDrawBuffers',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionVertexArray': { 'OES_vertex_array_object': {
'nativeType': 'mozilla::WebGLExtensionVertexArray', 'nativeType': 'mozilla::WebGLExtensionVertexArray',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionInstancedArrays': { 'ANGLE_instanced_arrays': {
'nativeType': 'mozilla::WebGLExtensionInstancedArrays', 'nativeType': 'mozilla::WebGLExtensionInstancedArrays',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionBlendMinMax': { 'EXT_blend_minmax': {
'nativeType': 'mozilla::WebGLExtensionBlendMinMax', 'nativeType': 'mozilla::WebGLExtensionBlendMinMax',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
'WebGLExtensionDisjointTimerQuery': { 'EXT_disjoint_timer_query': {
'nativeType': 'mozilla::WebGLExtensionDisjointTimerQuery', 'nativeType': 'mozilla::WebGLExtensionDisjointTimerQuery',
'headerFile': 'WebGLExtensions.h' 'headerFile': 'WebGLExtensions.h'
}, },
@ -1519,7 +1519,7 @@ DOMInterfaces = {
'headerFile': 'WebGLTexture.h' 'headerFile': 'WebGLTexture.h'
}, },
'WebGLTimerQuery': { 'WebGLTimerQueryEXT': {
'nativeType': 'mozilla::WebGLTimerQuery', 'nativeType': 'mozilla::WebGLTimerQuery',
'headerFile': 'WebGLTimerQuery.h' 'headerFile': 'WebGLTimerQuery.h'
}, },
@ -1534,7 +1534,7 @@ DOMInterfaces = {
'headerFile': 'WebGLUniformLocation.h' 'headerFile': 'WebGLUniformLocation.h'
}, },
'WebGLVertexArray': { 'WebGLVertexArrayObjectOES': {
'nativeType': 'mozilla::WebGLVertexArray', 'nativeType': 'mozilla::WebGLVertexArray',
'headerFile': 'WebGLVertexArray.h' 'headerFile': 'WebGLVertexArray.h'
}, },

Просмотреть файл

@ -11157,12 +11157,13 @@ def memberProperties(m, descriptor):
props.isJsonifier = True props.isJsonifier = True
elif (not m.isIdentifierLess() or m == descriptor.operations['Stringifier']): elif (not m.isIdentifierLess() or m == descriptor.operations['Stringifier']):
if not m.isStatic() and descriptor.interface.hasInterfacePrototypeObject(): if not m.isStatic() and descriptor.interface.hasInterfacePrototypeObject():
if m.returnsPromise() and descriptor.needsSpecialGenericOps(): if descriptor.needsSpecialGenericOps():
props.isPromiseReturningMethod = True if m.returnsPromise():
props.isPromiseReturningMethod = True
else:
props.isGenericMethod = True
if m.getExtendedAttribute("CrossOriginCallable"): if m.getExtendedAttribute("CrossOriginCallable"):
props.isCrossOriginMethod = True props.isCrossOriginMethod = True
elif descriptor.needsSpecialGenericOps():
props.isGenericMethod = True
elif m.isAttr(): elif m.isAttr():
if not m.isStatic() and descriptor.interface.hasInterfacePrototypeObject(): if not m.isStatic() and descriptor.interface.hasInterfacePrototypeObject():
if m.hasLenientThis(): if m.hasLenientThis():

Просмотреть файл

@ -1779,7 +1779,7 @@ WebGLContext::GetSurfaceSnapshot(bool* out_premultAlpha)
if (!srcPremultAlpha) { if (!srcPremultAlpha) {
if (out_premultAlpha) { if (out_premultAlpha) {
*out_premultAlpha = false; *out_premultAlpha = false;
} else { } else if(hasAlpha) {
gfxUtils::PremultiplyDataSurface(surf, surf); gfxUtils::PremultiplyDataSurface(surf, surf);
} }
} }

Просмотреть файл

@ -26,6 +26,6 @@ WebGLExtensionBlendMinMax::IsSupported(const WebGLContext* webgl)
return webgl->GL()->IsSupported(gl::GLFeature::blend_minmax); return webgl->GL()->IsSupported(gl::GLFeature::blend_minmax);
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionBlendMinMax) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionBlendMinMax, EXT_blend_minmax)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -32,6 +32,6 @@ WebGLExtensionColorBufferFloat::IsSupported(const WebGLContext* webgl)
gl->IsANGLE(); gl->IsANGLE();
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionColorBufferFloat) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionColorBufferFloat, WEBGL_color_buffer_float)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -30,6 +30,6 @@ WebGLExtensionColorBufferHalfFloat::IsSupported(const WebGLContext* webgl)
gl->IsANGLE(); gl->IsANGLE();
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionColorBufferHalfFloat) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionColorBufferHalfFloat, EXT_color_buffer_half_float)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -21,6 +21,6 @@ WebGLExtensionCompressedTextureATC::~WebGLExtensionCompressedTextureATC()
{ {
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionCompressedTextureATC) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionCompressedTextureATC, WEBGL_compressed_texture_atc)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -19,6 +19,6 @@ WebGLExtensionCompressedTextureETC1::~WebGLExtensionCompressedTextureETC1()
{ {
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionCompressedTextureETC1) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionCompressedTextureETC1, WEBGL_compressed_texture_etc1)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -22,6 +22,6 @@ WebGLExtensionCompressedTexturePVRTC::~WebGLExtensionCompressedTexturePVRTC()
{ {
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionCompressedTexturePVRTC) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionCompressedTexturePVRTC, WEBGL_compressed_texture_pvrtc)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -22,6 +22,6 @@ WebGLExtensionCompressedTextureS3TC::~WebGLExtensionCompressedTextureS3TC()
{ {
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionCompressedTextureS3TC) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionCompressedTextureS3TC, WEBGL_compressed_texture_s3tc)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -19,6 +19,6 @@ WebGLExtensionDebugRendererInfo::~WebGLExtensionDebugRendererInfo()
{ {
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionDebugRendererInfo) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionDebugRendererInfo, WEBGL_debug_renderer_info)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -38,6 +38,6 @@ WebGLExtensionDebugShaders::GetTranslatedShaderSource(WebGLShader* shader,
mContext->GetShaderTranslatedSource(shader, retval); mContext->GetShaderTranslatedSource(shader, retval);
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionDebugShaders) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionDebugShaders, WEBGL_debug_shaders)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -19,6 +19,6 @@ WebGLExtensionDepthTexture::~WebGLExtensionDepthTexture()
{ {
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionDepthTexture) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionDepthTexture, WEBGL_depth_texture)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -242,6 +242,6 @@ WebGLExtensionDisjointTimerQuery::IsSupported(const WebGLContext* webgl)
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionDisjointTimerQuery) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionDisjointTimerQuery, EXT_disjoint_timer_query)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -83,6 +83,6 @@ WebGLExtensionDrawBuffers::IsSupported(const WebGLContext* webgl)
return true; return true;
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionDrawBuffers) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionDrawBuffers, WEBGL_draw_buffers)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -19,6 +19,6 @@ WebGLExtensionElementIndexUint::~WebGLExtensionElementIndexUint()
{ {
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionElementIndexUint) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionElementIndexUint, OES_element_index_uint)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -29,6 +29,6 @@ WebGLExtensionFragDepth::IsSupported(const WebGLContext* webgl)
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionFragDepth) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionFragDepth, EXT_frag_depth)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -73,6 +73,6 @@ WebGLExtensionInstancedArrays::IsSupported(const WebGLContext* webgl)
gl->IsSupported(gl::GLFeature::instanced_arrays); gl->IsSupported(gl::GLFeature::instanced_arrays);
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionInstancedArrays) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionInstancedArrays, ANGLE_instanced_arrays)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -31,6 +31,6 @@ WebGLExtensionLoseContext::RestoreContext()
mContext->RestoreContext(); mContext->RestoreContext();
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionLoseContext) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionLoseContext, WEBGL_lose_context)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -39,6 +39,6 @@ WebGLExtensionSRGB::IsSupported(const WebGLContext* webgl)
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionSRGB) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionSRGB, EXT_sRGB)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -19,6 +19,6 @@ WebGLExtensionShaderTextureLod::~WebGLExtensionShaderTextureLod()
{ {
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionShaderTextureLod) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionShaderTextureLod, EXT_shader_texture_lod)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -19,6 +19,6 @@ WebGLExtensionStandardDerivatives::~WebGLExtensionStandardDerivatives()
{ {
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionStandardDerivatives) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionStandardDerivatives, OES_standard_derivatives)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -19,6 +19,6 @@ WebGLExtensionTextureFilterAnisotropic::~WebGLExtensionTextureFilterAnisotropic(
{ {
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionTextureFilterAnisotropic) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionTextureFilterAnisotropic, EXT_texture_filter_anisotropic)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -18,6 +18,6 @@ WebGLExtensionTextureFloat::~WebGLExtensionTextureFloat()
{ {
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionTextureFloat) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionTextureFloat, OES_texture_float)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -18,6 +18,6 @@ WebGLExtensionTextureFloatLinear::~WebGLExtensionTextureFloatLinear()
{ {
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionTextureFloatLinear) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionTextureFloatLinear, OES_texture_float_linear)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -18,6 +18,6 @@ WebGLExtensionTextureHalfFloat::~WebGLExtensionTextureHalfFloat()
{ {
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionTextureHalfFloat) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionTextureHalfFloat, OES_texture_half_float)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -18,6 +18,6 @@ WebGLExtensionTextureHalfFloatLinear::~WebGLExtensionTextureHalfFloatLinear()
{ {
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionTextureHalfFloatLinear) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionTextureHalfFloatLinear, OES_texture_half_float_linear)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -70,6 +70,6 @@ WebGLExtensionVertexArray::BindVertexArrayOES(WebGLVertexArray* array)
mContext->BindVertexArray(array); mContext->BindVertexArray(array);
} }
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionVertexArray) IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionVertexArray, OES_vertex_array_object)
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -45,10 +45,10 @@ protected:
#define DECL_WEBGL_EXTENSION_GOOP \ #define DECL_WEBGL_EXTENSION_GOOP \
virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) override; virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) override;
#define IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionType) \ #define IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionType, WebGLBindingType)\
JSObject* \ JSObject* \
WebGLExtensionType::WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) { \ WebGLExtensionType::WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) { \
return dom::WebGLExtensionType##Binding::Wrap(cx, this, aGivenProto); \ return dom::WebGLBindingType##Binding::Wrap(cx, this, aGivenProto); \
} }
class WebGLExtensionCompressedTextureATC class WebGLExtensionCompressedTextureATC

Просмотреть файл

@ -140,6 +140,8 @@ WebGLShader::WebGLShader(WebGLContext* webgl, GLenum type)
: WebGLContextBoundObject(webgl) : WebGLContextBoundObject(webgl)
, mGLName(CreateShader(webgl->GL(), type)) , mGLName(CreateShader(webgl->GL(), type))
, mType(type) , mType(type)
, mTranslationSuccessful(false)
, mCompilationSuccessful(false)
{ {
mContext->mShaders.insertBack(this); mContext->mShaders.insertBack(this);
} }

Просмотреть файл

@ -16,7 +16,7 @@ namespace mozilla {
JSObject* JSObject*
WebGLTimerQuery::WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) WebGLTimerQuery::WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto)
{ {
return dom::WebGLTimerQueryBinding::Wrap(cx, this, aGivenProto); return dom::WebGLTimerQueryEXTBinding::Wrap(cx, this, aGivenProto);
} }
WebGLTimerQuery::WebGLTimerQuery(WebGLContext* webgl, GLuint aName) WebGLTimerQuery::WebGLTimerQuery(WebGLContext* webgl, GLuint aName)

Просмотреть файл

@ -17,7 +17,7 @@ namespace mozilla {
JSObject* JSObject*
WebGLVertexArray::WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) WebGLVertexArray::WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto)
{ {
return dom::WebGLVertexArrayBinding::Wrap(cx, this, aGivenProto); return dom::WebGLVertexArrayObjectOESBinding::Wrap(cx, this, aGivenProto);
} }
WebGLVertexArray::WebGLVertexArray(WebGLContext* webgl) WebGLVertexArray::WebGLVertexArray(WebGLContext* webgl)

Просмотреть файл

@ -14,7 +14,7 @@ load 746813-1.html
load 743499-negative-size.html load 743499-negative-size.html
skip-if(Android) load 767337-1.html skip-if(Android) load 767337-1.html
skip-if(Android||B2G) load 780392-1.html # bug 833371 for B2G skip-if(Android||B2G) load 780392-1.html # bug 833371 for B2G
skip-if(Android||B2G) skip-if(gtk2Widget&&isDebugBuild) load 789933-1.html # bug 833371 for B2G, bug 1155252 for linux skip-if(Android||B2G) skip-if(gtkWidget&&isDebugBuild) load 789933-1.html # bug 833371 for B2G, bug 1155252 for linux
load 794463-1.html load 794463-1.html
load 802926-1.html load 802926-1.html
load 896047-1.html load 896047-1.html

Просмотреть файл

@ -23,7 +23,7 @@ pref(webgl.force-layers-readback,true) == webgl-clear-test.html?readback wrappe
# failures encountered when running on Try, and then targetting the Try config by # failures encountered when running on Try, and then targetting the Try config by
# differences in the `sandbox` contents. That is, I'm labeling based on symptoms rather # differences in the `sandbox` contents. That is, I'm labeling based on symptoms rather
# than cause. # than cause.
# Lin-R-e10s: gtk2Widget && browserIsRemote # Lin-R-e10s: gtkWidget && browserIsRemote
# WinXP-R: winWidget && layersGPUAccelerated && !d2d # WinXP-R: winWidget && layersGPUAccelerated && !d2d
# Win7+-R: winWidget && layersGPUAccelerated && d2d # Win7+-R: winWidget && layersGPUAccelerated && d2d
# Win7+-Ru: winWidget && !layersGPUAccelerated # Win7+-Ru: winWidget && !layersGPUAccelerated
@ -47,10 +47,10 @@ pref(webgl.force-layers-readback,true) == webgl-clear-test.html?readback wrappe
== webgl-color-test.html?frame=1&aa&________&premult&_____ wrapper.html?colors-no-alpha.png == webgl-color-test.html?frame=1&aa&________&premult&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=1&__&preserve&premult&_____ wrapper.html?colors-no-alpha.png == webgl-color-test.html?frame=1&__&preserve&premult&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=1&aa&preserve&premult&_____ wrapper.html?colors-no-alpha.png == webgl-color-test.html?frame=1&aa&preserve&premult&_____ wrapper.html?colors-no-alpha.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=1&__&________&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=1&__&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=1&aa&________&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=1&aa&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=1&__&preserve&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=1&__&preserve&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=1&aa&preserve&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=1&aa&preserve&_______&alpha wrapper.html?colors-non-premult.png
== webgl-color-test.html?frame=1&__&________&premult&alpha wrapper.html?colors-premult.png == webgl-color-test.html?frame=1&__&________&premult&alpha wrapper.html?colors-premult.png
== webgl-color-test.html?frame=1&aa&________&premult&alpha wrapper.html?colors-premult.png == webgl-color-test.html?frame=1&aa&________&premult&alpha wrapper.html?colors-premult.png
== webgl-color-test.html?frame=1&__&preserve&premult&alpha wrapper.html?colors-premult.png == webgl-color-test.html?frame=1&__&preserve&premult&alpha wrapper.html?colors-premult.png
@ -64,10 +64,10 @@ fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersG
== webgl-color-test.html?frame=6&aa&________&premult&_____ wrapper.html?colors-no-alpha.png == webgl-color-test.html?frame=6&aa&________&premult&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=6&__&preserve&premult&_____ wrapper.html?colors-no-alpha.png == webgl-color-test.html?frame=6&__&preserve&premult&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=6&aa&preserve&premult&_____ wrapper.html?colors-no-alpha.png == webgl-color-test.html?frame=6&aa&preserve&premult&_____ wrapper.html?colors-no-alpha.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=6&__&________&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=6&__&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=6&aa&________&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=6&aa&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=6&__&preserve&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=6&__&preserve&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&(!layersGPUAccelerated||!d2d)) == webgl-color-test.html?frame=6&aa&preserve&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&(!layersGPUAccelerated||!d2d)) == webgl-color-test.html?frame=6&aa&preserve&_______&alpha wrapper.html?colors-non-premult.png
== webgl-color-test.html?frame=6&__&________&premult&alpha wrapper.html?colors-premult.png == webgl-color-test.html?frame=6&__&________&premult&alpha wrapper.html?colors-premult.png
== webgl-color-test.html?frame=6&aa&________&premult&alpha wrapper.html?colors-premult.png == webgl-color-test.html?frame=6&aa&________&premult&alpha wrapper.html?colors-premult.png
== webgl-color-test.html?frame=6&__&preserve&premult&alpha wrapper.html?colors-premult.png == webgl-color-test.html?frame=6&__&preserve&premult&alpha wrapper.html?colors-premult.png
@ -81,10 +81,10 @@ fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&(!layer
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&________&premult&_____ wrapper.html?colors-no-alpha.png pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&________&premult&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&preserve&premult&_____ wrapper.html?colors-no-alpha.png pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&preserve&premult&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&preserve&premult&_____ wrapper.html?colors-no-alpha.png pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&preserve&premult&_____ wrapper.html?colors-no-alpha.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&________&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&________&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&preserve&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&preserve&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&preserve&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&preserve&_______&alpha wrapper.html?colors-non-premult.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&________&premult&alpha wrapper.html?colors-premult.png pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&________&premult&alpha wrapper.html?colors-premult.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&________&premult&alpha wrapper.html?colors-premult.png pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&________&premult&alpha wrapper.html?colors-premult.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&preserve&premult&alpha wrapper.html?colors-premult.png pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&preserve&premult&alpha wrapper.html?colors-premult.png
@ -98,10 +98,10 @@ fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersG
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&________&premult&_____ wrapper.html?colors-no-alpha.png pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&________&premult&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&preserve&premult&_____ wrapper.html?colors-no-alpha.png pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&preserve&premult&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&preserve&premult&_____ wrapper.html?colors-no-alpha.png pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&preserve&premult&_____ wrapper.html?colors-no-alpha.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&________&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&________&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&preserve&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&preserve&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&(!layersGPUAccelerated||!d2d)) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&preserve&_______&alpha wrapper.html?colors-non-premult.png fuzzy(1,30000) fails-if(gtkWidget&&browserIsRemote) fails-if(winWidget&&(!layersGPUAccelerated||!d2d)) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&preserve&_______&alpha wrapper.html?colors-non-premult.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&________&premult&alpha wrapper.html?colors-premult.png pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&________&premult&alpha wrapper.html?colors-premult.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&________&premult&alpha wrapper.html?colors-premult.png pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&________&premult&alpha wrapper.html?colors-premult.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&preserve&premult&alpha wrapper.html?colors-premult.png pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&preserve&premult&alpha wrapper.html?colors-premult.png

Просмотреть файл

@ -20,7 +20,7 @@ interface nsIServiceWorkerUnregisterCallback : nsISupports
void unregisterFailed(); void unregisterFailed();
}; };
[scriptable, builtinclass, uuid(8ce0d197-5740-4ddf-aa4a-e5a63e611d03)] [scriptable, builtinclass, uuid(103763c8-53ba-42e4-8b26-e601d5bc4afe)]
interface nsIServiceWorkerInfo : nsISupports interface nsIServiceWorkerInfo : nsISupports
{ {
readonly attribute nsIPrincipal principal; readonly attribute nsIPrincipal principal;
@ -33,7 +33,7 @@ interface nsIServiceWorkerInfo : nsISupports
readonly attribute DOMString waitingCacheName; readonly attribute DOMString waitingCacheName;
}; };
[scriptable, builtinclass, uuid(384c9aec-29e5-4bdb-abc2-fba10da83e17)] [scriptable, builtinclass, uuid(d130fcbd-1afe-4dd9-b70d-08a4b2373af5)]
interface nsIServiceWorkerManager : nsISupports interface nsIServiceWorkerManager : nsISupports
{ {
/** /**
@ -66,16 +66,6 @@ interface nsIServiceWorkerManager : nsISupports
// Remove ready pending Promise // Remove ready pending Promise
void removeReadyPromise(in nsIDOMWindow aWindow); void removeReadyPromise(in nsIDOMWindow aWindow);
// Returns true if a ServiceWorker is available for the scope of aURI.
bool isAvailableForURI(in nsIURI aURI);
// Returns true if a given document is currently controlled by a ServiceWorker
bool isControlled(in nsIDocument aDocument);
// Cause a fetch event to be dispatched to the worker global associated with the given document.
void dispatchFetchEvent(in nsIDocument aDoc, in nsIInterceptedChannel aChannel,
in boolean aIsReload);
/** /**
* Call this to request that document `aDoc` be controlled by a ServiceWorker * Call this to request that document `aDoc` be controlled by a ServiceWorker
* if a registration exists for it's scope. * if a registration exists for it's scope.
@ -108,8 +98,10 @@ interface nsIServiceWorkerManager : nsISupports
/* /*
* This implements the soft update algorithm. * This implements the soft update algorithm.
* XXXbaku this can be removed when bug 1155153 lands.
*/ */
void softUpdate(in DOMString aScope); [implicit_jscontext] void softUpdate(in jsval aOriginAttributes,
in DOMString aScope);
/* /*
* Clears ServiceWorker registrations from memory and disk for the specified * Clears ServiceWorker registrations from memory and disk for the specified
@ -128,14 +120,17 @@ interface nsIServiceWorkerManager : nsISupports
void removeAll(); void removeAll();
// Testing // Testing
DOMString getScopeForUrl(in DOMString path); DOMString getScopeForUrl(in nsIPrincipal aPrincipal, in DOMString aPath);
// This is meant to be used only by about:serviceworkers. It returns an array // This is meant to be used only by about:serviceworkers. It returns an array
// of nsIServiceWorkerInfo. // of nsIServiceWorkerInfo.
nsIArray getAllRegistrations(); nsIArray getAllRegistrations();
void sendPushEvent(in ACString scope, in DOMString data); [implicit_jscontext] void sendPushEvent(in jsval aOriginAttributes,
void sendPushSubscriptionChangeEvent(in ACString scope); in ACString aScope,
in DOMString aData);
[implicit_jscontext] void sendPushSubscriptionChangeEvent(in jsval aOriginAttributes,
in ACString scope);
void updateAllRegistrations(); void updateAllRegistrations();
}; };

Просмотреть файл

@ -768,7 +768,7 @@ void
MediaCodecReader::TextureClientRecycleCallback(TextureClient* aClient) MediaCodecReader::TextureClientRecycleCallback(TextureClient* aClient)
{ {
MOZ_ASSERT(aClient, "aClient should not be nullptr in RecycleCallback()"); MOZ_ASSERT(aClient, "aClient should not be nullptr in RecycleCallback()");
MOZ_ASSERT(!aClient->IsDead());
size_t index = 0; size_t index = 0;
{ {

Просмотреть файл

@ -915,6 +915,7 @@ void OmxDecoder::RecycleCallbackImp(TextureClient* aClient)
/* static */ void /* static */ void
OmxDecoder::RecycleCallback(TextureClient* aClient, void* aClosure) OmxDecoder::RecycleCallback(TextureClient* aClient, void* aClosure)
{ {
MOZ_ASSERT(aClient && !aClient->IsDead());
OmxDecoder* decoder = static_cast<OmxDecoder*>(aClosure); OmxDecoder* decoder = static_cast<OmxDecoder*>(aClosure);
decoder->RecycleCallbackImp(aClient); decoder->RecycleCallbackImp(aClient);
} }

Просмотреть файл

@ -569,6 +569,7 @@ GonkVideoDecoderManager::GetColorConverterBuffer(int32_t aWidth, int32_t aHeight
void void
GonkVideoDecoderManager::RecycleCallback(TextureClient* aClient, void* aClosure) GonkVideoDecoderManager::RecycleCallback(TextureClient* aClient, void* aClosure)
{ {
MOZ_ASSERT(aClient && !aClient->IsDead());
GonkVideoDecoderManager* videoManager = static_cast<GonkVideoDecoderManager*>(aClosure); GonkVideoDecoderManager* videoManager = static_cast<GonkVideoDecoderManager*>(aClosure);
GrallocTextureClientOGL* client = static_cast<GrallocTextureClientOGL*>(aClient); GrallocTextureClientOGL* client = static_cast<GrallocTextureClientOGL*>(aClient);
aClient->ClearRecycleCallback(); aClient->ClearRecycleCallback();

Просмотреть файл

@ -170,6 +170,11 @@ IntelWebMVideoDecoder::Demux(nsRefPtr<VP8Sample>& aSample, bool* aEOS)
return false; return false;
} }
if (count > 1) {
NS_WARNING("Packet contains more than one video frame");
return false;
}
int64_t tstamp = holder->Timestamp(); int64_t tstamp = holder->Timestamp();
// The end time of this frame is the start time of the next frame. Fetch // The end time of this frame is the start time of the next frame. Fetch
@ -187,34 +192,32 @@ IntelWebMVideoDecoder::Demux(nsRefPtr<VP8Sample>& aSample, bool* aEOS)
} }
mReader->SetLastVideoFrameTime(tstamp); mReader->SetLastVideoFrameTime(tstamp);
for (uint32_t i = 0; i < count; ++i) { unsigned char* data;
unsigned char* data; size_t length;
size_t length; r = nestegg_packet_data(packet, 0, &data, &length);
r = nestegg_packet_data(packet, i, &data, &length); if (r == -1) {
if (r == -1) { return false;
return false; }
}
vpx_codec_stream_info_t si; vpx_codec_stream_info_t si;
memset(&si, 0, sizeof(si)); memset(&si, 0, sizeof(si));
si.sz = sizeof(si); si.sz = sizeof(si);
if (mReader->GetVideoCodec() == NESTEGG_CODEC_VP8) { if (mReader->GetVideoCodec() == NESTEGG_CODEC_VP8) {
vpx_codec_peek_stream_info(vpx_codec_vp8_dx(), data, length, &si); vpx_codec_peek_stream_info(vpx_codec_vp8_dx(), data, length, &si);
} else if (mReader->GetVideoCodec() == NESTEGG_CODEC_VP9) { } else if (mReader->GetVideoCodec() == NESTEGG_CODEC_VP9) {
vpx_codec_peek_stream_info(vpx_codec_vp9_dx(), data, length, &si); vpx_codec_peek_stream_info(vpx_codec_vp9_dx(), data, length, &si);
} }
MOZ_ASSERT(mPlatform && mMediaDataDecoder); MOZ_ASSERT(mPlatform && mMediaDataDecoder);
aSample = new VP8Sample(tstamp, aSample = new VP8Sample(tstamp,
next_tstamp - tstamp, next_tstamp - tstamp,
0, 0,
data, data,
length, length,
si.is_kf); si.is_kf);
if (!aSample->mData) { if (!aSample->mData) {
return false; return false;
}
} }
return true; return true;

Просмотреть файл

@ -98,6 +98,11 @@ SoftwareWebMVideoDecoder::DecodeVideoFrame(bool &aKeyframeSkip,
return false; return false;
} }
if (count > 1) {
NS_WARNING("Packet contains more than one video frame");
return false;
}
int64_t tstamp = holder->Timestamp(); int64_t tstamp = holder->Timestamp();
// The end time of this frame is the start time of the next frame. Fetch // The end time of this frame is the start time of the next frame. Fetch
@ -115,106 +120,104 @@ SoftwareWebMVideoDecoder::DecodeVideoFrame(bool &aKeyframeSkip,
} }
mReader->SetLastVideoFrameTime(tstamp); mReader->SetLastVideoFrameTime(tstamp);
for (uint32_t i = 0; i < count; ++i) { unsigned char* data;
unsigned char* data; size_t length;
size_t length; r = nestegg_packet_data(packet, 0, &data, &length);
r = nestegg_packet_data(packet, i, &data, &length); if (r == -1) {
if (r == -1) { return false;
}
vpx_codec_stream_info_t si;
memset(&si, 0, sizeof(si));
si.sz = sizeof(si);
if (mReader->GetVideoCodec() == NESTEGG_CODEC_VP8) {
vpx_codec_peek_stream_info(vpx_codec_vp8_dx(), data, length, &si);
} else if (mReader->GetVideoCodec() == NESTEGG_CODEC_VP9) {
vpx_codec_peek_stream_info(vpx_codec_vp9_dx(), data, length, &si);
}
if (aKeyframeSkip && (!si.is_kf || tstamp < aTimeThreshold)) {
// Skipping to next keyframe...
a.mParsed++;
a.mDropped++;
return true;
}
if (aKeyframeSkip && si.is_kf) {
aKeyframeSkip = false;
}
if (vpx_codec_decode(&mVPX, data, length, nullptr, 0)) {
return false;
}
// If the timestamp of the video frame is less than
// the time threshold required then it is not added
// to the video queue and won't be displayed.
if (tstamp < aTimeThreshold) {
a.mParsed++;
a.mDropped++;
return true;
}
vpx_codec_iter_t iter = nullptr;
vpx_image_t *img;
while ((img = vpx_codec_get_frame(&mVPX, &iter))) {
NS_ASSERTION(img->fmt == VPX_IMG_FMT_I420, "WebM image format not I420");
// Chroma shifts are rounded down as per the decoding examples in the SDK
VideoData::YCbCrBuffer b;
b.mPlanes[0].mData = img->planes[0];
b.mPlanes[0].mStride = img->stride[0];
b.mPlanes[0].mHeight = img->d_h;
b.mPlanes[0].mWidth = img->d_w;
b.mPlanes[0].mOffset = b.mPlanes[0].mSkip = 0;
b.mPlanes[1].mData = img->planes[1];
b.mPlanes[1].mStride = img->stride[1];
b.mPlanes[1].mHeight = (img->d_h + 1) >> img->y_chroma_shift;
b.mPlanes[1].mWidth = (img->d_w + 1) >> img->x_chroma_shift;
b.mPlanes[1].mOffset = b.mPlanes[1].mSkip = 0;
b.mPlanes[2].mData = img->planes[2];
b.mPlanes[2].mStride = img->stride[2];
b.mPlanes[2].mHeight = (img->d_h + 1) >> img->y_chroma_shift;
b.mPlanes[2].mWidth = (img->d_w + 1) >> img->x_chroma_shift;
b.mPlanes[2].mOffset = b.mPlanes[2].mSkip = 0;
nsIntRect pictureRect = mReader->GetPicture();
IntRect picture = pictureRect;
nsIntSize initFrame = mReader->GetInitialFrame();
if (img->d_w != static_cast<uint32_t>(initFrame.width) ||
img->d_h != static_cast<uint32_t>(initFrame.height)) {
// Frame size is different from what the container reports. This is
// legal in WebM, and we will preserve the ratio of the crop rectangle
// as it was reported relative to the picture size reported by the
// container.
picture.x = (pictureRect.x * img->d_w) / initFrame.width;
picture.y = (pictureRect.y * img->d_h) / initFrame.height;
picture.width = (img->d_w * pictureRect.width) / initFrame.width;
picture.height = (img->d_h * pictureRect.height) / initFrame.height;
}
VideoInfo videoInfo = mReader->GetMediaInfo().mVideo;
nsRefPtr<VideoData> v = VideoData::Create(videoInfo,
mReader->GetDecoder()->GetImageContainer(),
holder->Offset(),
tstamp,
next_tstamp - tstamp,
b,
si.is_kf,
-1,
picture);
if (!v) {
return false; return false;
} }
a.mParsed++;
vpx_codec_stream_info_t si; a.mDecoded++;
memset(&si, 0, sizeof(si)); NS_ASSERTION(a.mDecoded <= a.mParsed,
si.sz = sizeof(si); "Expect only 1 frame per chunk per packet in WebM...");
if (mReader->GetVideoCodec() == NESTEGG_CODEC_VP8) { mReader->VideoQueue().Push(v);
vpx_codec_peek_stream_info(vpx_codec_vp8_dx(), data, length, &si);
} else if (mReader->GetVideoCodec() == NESTEGG_CODEC_VP9) {
vpx_codec_peek_stream_info(vpx_codec_vp9_dx(), data, length, &si);
}
if (aKeyframeSkip && (!si.is_kf || tstamp < aTimeThreshold)) {
// Skipping to next keyframe...
a.mParsed++; // Assume 1 frame per chunk.
a.mDropped++;
continue;
}
if (aKeyframeSkip && si.is_kf) {
aKeyframeSkip = false;
}
if (vpx_codec_decode(&mVPX, data, length, nullptr, 0)) {
return false;
}
// If the timestamp of the video frame is less than
// the time threshold required then it is not added
// to the video queue and won't be displayed.
if (tstamp < aTimeThreshold) {
a.mParsed++; // Assume 1 frame per chunk.
a.mDropped++;
continue;
}
vpx_codec_iter_t iter = nullptr;
vpx_image_t *img;
while ((img = vpx_codec_get_frame(&mVPX, &iter))) {
NS_ASSERTION(img->fmt == VPX_IMG_FMT_I420, "WebM image format not I420");
// Chroma shifts are rounded down as per the decoding examples in the SDK
VideoData::YCbCrBuffer b;
b.mPlanes[0].mData = img->planes[0];
b.mPlanes[0].mStride = img->stride[0];
b.mPlanes[0].mHeight = img->d_h;
b.mPlanes[0].mWidth = img->d_w;
b.mPlanes[0].mOffset = b.mPlanes[0].mSkip = 0;
b.mPlanes[1].mData = img->planes[1];
b.mPlanes[1].mStride = img->stride[1];
b.mPlanes[1].mHeight = (img->d_h + 1) >> img->y_chroma_shift;
b.mPlanes[1].mWidth = (img->d_w + 1) >> img->x_chroma_shift;
b.mPlanes[1].mOffset = b.mPlanes[1].mSkip = 0;
b.mPlanes[2].mData = img->planes[2];
b.mPlanes[2].mStride = img->stride[2];
b.mPlanes[2].mHeight = (img->d_h + 1) >> img->y_chroma_shift;
b.mPlanes[2].mWidth = (img->d_w + 1) >> img->x_chroma_shift;
b.mPlanes[2].mOffset = b.mPlanes[2].mSkip = 0;
nsIntRect pictureRect = mReader->GetPicture();
IntRect picture = pictureRect;
nsIntSize initFrame = mReader->GetInitialFrame();
if (img->d_w != static_cast<uint32_t>(initFrame.width) ||
img->d_h != static_cast<uint32_t>(initFrame.height)) {
// Frame size is different from what the container reports. This is
// legal in WebM, and we will preserve the ratio of the crop rectangle
// as it was reported relative to the picture size reported by the
// container.
picture.x = (pictureRect.x * img->d_w) / initFrame.width;
picture.y = (pictureRect.y * img->d_h) / initFrame.height;
picture.width = (img->d_w * pictureRect.width) / initFrame.width;
picture.height = (img->d_h * pictureRect.height) / initFrame.height;
}
VideoInfo videoInfo = mReader->GetMediaInfo().mVideo;
nsRefPtr<VideoData> v = VideoData::Create(videoInfo,
mReader->GetDecoder()->GetImageContainer(),
holder->Offset(),
tstamp,
next_tstamp - tstamp,
b,
si.is_kf,
-1,
picture);
if (!v) {
return false;
}
a.mParsed++;
a.mDecoded++;
NS_ASSERTION(a.mDecoded <= a.mParsed,
"Expect only 1 frame per chunk per packet in WebM...");
mReader->VideoQueue().Push(v);
}
} }
return true; return true;

Просмотреть файл

@ -919,40 +919,25 @@ WebMReader::DemuxPacket()
} }
// Figure out if this is a keyframe. // Figure out if this is a keyframe.
//
// Doing this at packet-granularity is kind of the wrong level of
// abstraction, but timestamps are on the packet, so the only time
// we have multiple video frames in a packet is when we have "alternate
// reference frames", which are a compression detail and never displayed.
// So for our purposes, we can just take the union of the is_kf values for
// all the frames in the packet.
bool isKeyframe = false; bool isKeyframe = false;
if (track == mAudioTrack) { if (track == mAudioTrack) {
isKeyframe = true; isKeyframe = true;
} else if (track == mVideoTrack) { } else if (track == mVideoTrack) {
unsigned int count = 0; unsigned char* data;
r = nestegg_packet_count(packet, &count); size_t length;
r = nestegg_packet_data(packet, 0, &data, &length);
if (r == -1) { if (r == -1) {
return nullptr; return nullptr;
} }
vpx_codec_stream_info_t si;
for (unsigned i = 0; i < count; ++i) { memset(&si, 0, sizeof(si));
unsigned char* data; si.sz = sizeof(si);
size_t length; if (mVideoCodec == NESTEGG_CODEC_VP8) {
r = nestegg_packet_data(packet, i, &data, &length); vpx_codec_peek_stream_info(vpx_codec_vp8_dx(), data, length, &si);
if (r == -1) { } else if (mVideoCodec == NESTEGG_CODEC_VP9) {
return nullptr; vpx_codec_peek_stream_info(vpx_codec_vp9_dx(), data, length, &si);
}
vpx_codec_stream_info_t si;
memset(&si, 0, sizeof(si));
si.sz = sizeof(si);
if (mVideoCodec == NESTEGG_CODEC_VP8) {
vpx_codec_peek_stream_info(vpx_codec_vp8_dx(), data, length, &si);
} else if (mVideoCodec == NESTEGG_CODEC_VP9) {
vpx_codec_peek_stream_info(vpx_codec_vp9_dx(), data, length, &si);
}
isKeyframe = isKeyframe || si.is_kf;
} }
isKeyframe = si.is_kf;
} }
int64_t offset = mDecoder->GetResource()->Tell(); int64_t offset = mDecoder->GetResource()->Tell();

Просмотреть файл

@ -0,0 +1,16 @@
ifdef MOZ_WEBSPEECH_MODELS
MODELSPS_KEEP_PATH := 1
MODELSPS_FILES := models/dict/cmu07a.dic \
models/en-us-semi/mixture_weights \
models/en-us-semi/feat.params \
models/en-us-semi/mdef \
models/en-us-semi/means \
models/en-us-semi/noisedict \
models/en-us-semi/sendump \
models/en-us-semi/transition_matrices \
models/en-us-semi/variances
MODELSPS_DEST := $(DIST)/bin/models
INSTALL_TARGETS += MODELSPS
endif

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,34 @@
/* ====================================================================
* Copyright (c) 2015 Alpha Cephei Inc. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY ALPHA CEPHEI INC. ``AS IS'' AND.
* ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,.
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ALPHA CEPHEI INC.
* NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT.
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,.
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY.
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT.
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE.
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ====================================================================
*
*/
This directory contains generic US english acoustic model trained with
latest sphinxtrain.

Просмотреть файл

@ -0,0 +1,12 @@
-lowerf 130
-upperf 3700
-nfilt 20
-transform dct
-lifter 22
-feat 1s_c_d_dd
-svspec 0-12/13-25/26-38
-agc none
-cmn current
-varnorm no
-cmninit 40,3,-1
-model ptm

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Двоичные данные
dom/media/webspeech/recognition/models/en-us-semi/means Normal file

Двоичный файл не отображается.

Двоичные данные
dom/media/webspeech/recognition/models/en-us-semi/mixture_weights Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,5 @@
<s> SIL
</s> SIL
<sil> SIL
[NOISE] +NSN+
[SPEECH] +SPN+

Двоичные данные
dom/media/webspeech/recognition/models/en-us-semi/sendump Normal file

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичные данные
dom/media/webspeech/recognition/models/en-us-semi/variances Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -19,9 +19,13 @@ EXPORTS.mozilla.dom += [
'SpeechRecognitionResult.h', 'SpeechRecognitionResult.h',
'SpeechRecognitionResultList.h', 'SpeechRecognitionResultList.h',
'SpeechStreamListener.h', 'SpeechStreamListener.h',
'test/FakeSpeechRecognitionService.h',
] ]
if CONFIG['MOZ_WEBSPEECH_TEST_BACKEND']:
EXPORTS.mozilla.dom += [
'test/FakeSpeechRecognitionService.h',
]
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'endpointer.cc', 'endpointer.cc',
'energy_endpointer.cc', 'energy_endpointer.cc',
@ -33,9 +37,13 @@ UNIFIED_SOURCES += [
'SpeechRecognitionResult.cpp', 'SpeechRecognitionResult.cpp',
'SpeechRecognitionResultList.cpp', 'SpeechRecognitionResultList.cpp',
'SpeechStreamListener.cpp', 'SpeechStreamListener.cpp',
'test/FakeSpeechRecognitionService.cpp',
] ]
if CONFIG['MOZ_WEBSPEECH_TEST_BACKEND']:
UNIFIED_SOURCES += [
'test/FakeSpeechRecognitionService.cpp',
]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/dom/base', '/dom/base',
] ]

Просмотреть файл

@ -33,10 +33,14 @@ if CONFIG['MOZ_WEBSPEECH']:
'SpeechSynthesis.cpp', 'SpeechSynthesis.cpp',
'SpeechSynthesisUtterance.cpp', 'SpeechSynthesisUtterance.cpp',
'SpeechSynthesisVoice.cpp', 'SpeechSynthesisVoice.cpp',
'test/FakeSynthModule.cpp',
'test/nsFakeSynthServices.cpp'
] ]
if CONFIG['MOZ_WEBSPEECH_TEST_BACKEND']:
UNIFIED_SOURCES += [
'test/FakeSynthModule.cpp',
'test/nsFakeSynthServices.cpp'
]
if CONFIG['MOZ_SYNTH_PICO']: if CONFIG['MOZ_SYNTH_PICO']:
DIRS = ['pico'] DIRS = ['pico']

211
dom/push/PushDB.jsm Normal file
Просмотреть файл

@ -0,0 +1,211 @@
/* jshint moz: true, esnext: true */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
// Don't modify this, instead set dom.push.debug.
let gDebuggingEnabled = false;
function debug(s) {
if (gDebuggingEnabled) {
dump("-*- PushDB.jsm: " + s + "\n");
}
}
const Cu = Components.utils;
Cu.import("resource://gre/modules/IndexedDBHelper.jsm");
Cu.import("resource://gre/modules/Preferences.jsm");
Cu.importGlobalProperties(["indexedDB"]);
const prefs = new Preferences("dom.push.");
this.EXPORTED_SYMBOLS = ["PushDB"];
this.PushDB = function PushDB(dbName, dbVersion, dbStoreName, schemaFunction) {
debug("PushDB()");
this._dbStoreName = dbStoreName;
this._schemaFunction = schemaFunction;
// set the indexeddb database
this.initDBHelper(dbName, dbVersion,
[dbStoreName]);
gDebuggingEnabled = prefs.get("debug");
prefs.observe("debug", this);
};
this.PushDB.prototype = {
__proto__: IndexedDBHelper.prototype,
upgradeSchema: function(aTransaction, aDb, aOldVersion, aNewVersion) {
if (this._schemaFunction) {
this._schemaFunction(aTransaction, aDb, aOldVersion, aNewVersion, this);
}
},
/*
* @param aRecord
* The record to be added.
*/
put: function(aRecord) {
debug("put()" + JSON.stringify(aRecord));
return new Promise((resolve, reject) =>
this.newTxn(
"readwrite",
this._dbStoreName,
function txnCb(aTxn, aStore) {
aStore.put(aRecord).onsuccess = function setTxnResult(aEvent) {
debug("Request successful. Updated record ID: " +
aEvent.target.result);
};
},
resolve,
reject
)
);
},
/*
* @param aKeyID
* The ID of record to be deleted.
*/
delete: function(aKeyID) {
debug("delete()");
return new Promise((resolve, reject) =>
this.newTxn(
"readwrite",
this._dbStoreName,
function txnCb(aTxn, aStore) {
debug("Going to delete " + aKeyID);
aStore.delete(aKeyID);
},
resolve,
reject
)
);
},
clearAll: function clear() {
return new Promise((resolve, reject) =>
this.newTxn(
"readwrite",
this._dbStoreName,
function (aTxn, aStore) {
debug("Going to clear all!");
aStore.clear();
},
resolve,
reject
)
);
},
getByPushEndpoint: function(aPushEndpoint) {
debug("getByPushEndpoint()");
return new Promise((resolve, reject) =>
this.newTxn(
"readonly",
this._dbStoreName,
function txnCb(aTxn, aStore) {
aTxn.result = undefined;
let index = aStore.index("pushEndpoint");
index.get(aPushEndpoint).onsuccess = function setTxnResult(aEvent) {
aTxn.result = aEvent.target.result;
debug("Fetch successful " + aEvent.target.result);
};
},
resolve,
reject
)
);
},
getByKeyID: function(aKeyID) {
debug("getByKeyID()");
return new Promise((resolve, reject) =>
this.newTxn(
"readonly",
this._dbStoreName,
function txnCb(aTxn, aStore) {
aTxn.result = undefined;
aStore.get(aKeyID).onsuccess = function setTxnResult(aEvent) {
aTxn.result = aEvent.target.result;
debug("Fetch successful " + aEvent.target.result);
};
},
resolve,
reject
)
);
},
getByScope: function(aScope) {
debug("getByScope() " + aScope);
return new Promise((resolve, reject) =>
this.newTxn(
"readonly",
this._dbStoreName,
function txnCb(aTxn, aStore) {
aTxn.result = undefined;
let index = aStore.index("scope");
index.get(aScope).onsuccess = function setTxnResult(aEvent) {
aTxn.result = aEvent.target.result;
debug("Fetch successful " + aEvent.target.result);
};
},
resolve,
reject
)
);
},
getAllKeyIDs: function() {
debug("getAllKeyIDs()");
return new Promise((resolve, reject) =>
this.newTxn(
"readonly",
this._dbStoreName,
function txnCb(aTxn, aStore) {
aStore.mozGetAll().onsuccess = function(event) {
aTxn.result = event.target.result;
};
},
resolve,
reject
)
);
},
drop: function() {
debug("drop()");
return new Promise((resolve, reject) =>
this.newTxn(
"readwrite",
this._dbStoreName,
function txnCb(aTxn, aStore) {
aStore.clear();
},
resolve,
reject
)
);
},
observe: function observe(aSubject, aTopic, aData) {
if ((aTopic == "nsPref:changed") && (aData == "dom.push.debug"))
gDebuggingEnabled = prefs.get("debug");
}
};

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -10,9 +10,11 @@ XPCOMUtils.defineLazyServiceGetter(this,
"nsIServiceWorkerManager"); "nsIServiceWorkerManager");
addMessageListener("push", function (aMessage) { addMessageListener("push", function (aMessage) {
swm.sendPushEvent(aMessage.data.scope, aMessage.data.payload); swm.sendPushEvent(aMessage.data.originAttributes,
aMessage.data.scope, aMessage.data.payload);
}); });
addMessageListener("pushsubscriptionchange", function (aMessage) { addMessageListener("pushsubscriptionchange", function (aMessage) {
swm.sendPushSubscriptionChangeEvent(aMessage.data); swm.sendPushSubscriptionChangeEvent(aMessage.data.originAttributes,
aMessage.data.scope);
}); });

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше