MozReview-Commit-ID: 9wTctDOsPpO
This commit is contained in:
Wes Kocher 2017-06-02 17:31:31 -07:00
Родитель cef1c12f64 3b4f95ac59
Коммит 269f7e9f5c
141 изменённых файлов: 23838 добавлений и 22794 удалений

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

@ -113,7 +113,8 @@ panelview:not([mainview]):not([current]) {
visibility: collapse;
}
panelview[mainview] > .panel-header {
panelview[mainview] > .panel-header,
panelview:not([title]) > .panel-header {
display: none;
}

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

@ -192,14 +192,7 @@ var gSearchResultsPane = {
searchFunction(event) {
let query = event.target.value.trim().toLowerCase();
this.findSelection.removeAllRanges();
// Remove all search tooltips that were created
let searchTooltips = Array.from(document.querySelectorAll(".search-tooltip"));
for (let searchTooltip of searchTooltips) {
searchTooltip.parentElement.classList.remove("search-tooltip-parent");
searchTooltip.remove();
}
this.listSearchTooltips = [];
this.removeAllSearchTooltips();
let srHeader = document.getElementById("header-searchResults");
@ -370,5 +363,17 @@ var gSearchResultsPane = {
offSet += relativeOffset > 0 ? relativeOffset : 0;
searchTooltip.style.setProperty("left", `${offSet}px`);
},
/**
* Remove all search tooltips that were created.
*/
removeAllSearchTooltips() {
let searchTooltips = Array.from(document.querySelectorAll(".search-tooltip"));
for (let searchTooltip of searchTooltips) {
searchTooltip.parentElement.classList.remove("search-tooltip-parent");
searchTooltip.remove();
}
this.listSearchTooltips = [];
}
}

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

@ -166,6 +166,7 @@ function gotoPref(aCategory) {
gSearchResultsPane.searchInput.value = "";
gSearchResultsPane.searchResultsCategory.hidden = true;
gSearchResultsPane.findSelection.removeAllRanges();
gSearchResultsPane.removeAllSearchTooltips();
}
// Updating the hash (below) or changing the selected category

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

@ -31,10 +31,12 @@
#PopupAutoComplete > richlistbox > richlistitem[originaltype="login"] > .ac-site-icon {
display: initial;
list-style-image: url(chrome://browser/skin/notification-icons.svg#login);
-moz-context-properties: fill;
fill: GrayText;
}
#PopupAutoComplete > richlistbox > richlistitem[originaltype="login"] > .ac-site-icon[selected] {
list-style-image: url(chrome://browser/skin/notification-icons.svg#login-highlighted);
fill: HighlightText;
}

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

@ -245,6 +245,8 @@ toolbar:-moz-lwtheme-darktext {
#identity-icon:-moz-lwtheme-brighttext,
#tracking-protection-icon:-moz-lwtheme-brighttext,
#connection-icon:-moz-lwtheme-brighttext,
.notification-anchor-icon:-moz-lwtheme-brighttext,
#blocked-permissions-container > .blocked-permission-icon:-moz-lwtheme-brighttext,
#extension-icon:-moz-lwtheme-brighttext {
fill: rgba(255,255,255,.7);
}

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

@ -383,6 +383,8 @@ description#identity-popup-content-verifier,
}
.identity-popup-permission-icon.in-use {
-moz-context-properties: fill;
fill: rgb(224, 41, 29);
animation: 1.5s ease in-use-blink infinite;
}

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

@ -59,9 +59,12 @@
#identity-icon,
#tracking-protection-icon,
#connection-icon,
.notification-anchor-icon,
#blocked-permissions-container > .blocked-permission-icon,
#extension-icon {
width: 16px;
height: 16px;
margin-inline-start: 2px;
-moz-context-properties: fill;
fill: GrayText;
}
@ -69,6 +72,8 @@
#identity-icon:-moz-lwtheme,
#tracking-protection-icon:-moz-lwtheme,
#connection-icon:-moz-lwtheme,
.notification-anchor-icon:-moz-lwtheme,
#blocked-permissions-container > .blocked-permission-icon:-moz-lwtheme,
#extension-icon:-moz-lwtheme {
fill: rgba(0,0,0,.6);
}
@ -76,6 +81,7 @@
/* MAIN IDENTITY ICON */
#identity-icon {
margin-inline-start: 0;
list-style-image: url(chrome://browser/skin/identity-icon.svg);
}
@ -116,6 +122,8 @@
height: 16px;
margin-inline-start: -16px;
position: relative;
-moz-context-properties: fill;
fill: rgb(224, 41, 29);
display: none;
}
@ -155,7 +163,6 @@
#tracking-protection-icon {
list-style-image: url(chrome://browser/skin/tracking-protection-16.svg#enabled);
margin-inline-start: 2px;
margin-inline-end: 0;
}
@ -184,7 +191,6 @@
#connection-icon,
#extension-icon {
margin-inline-start: 2px;
visibility: collapse;
}

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

@ -66,7 +66,7 @@
skin/classic/browser/info.svg (../shared/info.svg)
* skin/classic/browser/menuPanel.svg (../shared/menuPanel.svg)
* skin/classic/browser/menuPanel-small.svg (../shared/menuPanel-small.svg)
* skin/classic/browser/notification-icons.svg (../shared/notification-icons.svg)
skin/classic/browser/notification-icons.svg (../shared/notification-icons.svg)
skin/classic/browser/tracking-protection-16.svg (../shared/identity-block/tracking-protection-16.svg)
skin/classic/browser/newtab/close.png (../shared/newtab/close.png)
skin/classic/browser/newtab/controls.svg (../shared/newtab/controls.svg)

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

@ -4,6 +4,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%endif
.popup-notification-icon,
.identity-popup-permission-icon {
-moz-context-properties: fill;
fill: GrayText;
}
#notification-popup-box {
padding: 5px 0px;
margin: -5px 0px;
@ -11,13 +17,6 @@
padding-inline-end: 5px;
}
.notification-anchor-icon,
#blocked-permissions-container > .blocked-permission-icon {
width: 16px;
height: 16px;
margin-inline-start: 2px;
}
/* This class can be used alone or in combination with the class defining the
type of icon displayed. This rule must be defined before the others in order
for its list-style-image to be overridden. */
@ -25,12 +24,6 @@
list-style-image: url(chrome://browser/skin/notification-icons.svg#default-info);
}
.notification-anchor-icon:not(.plugin-blocked):-moz-lwtheme,
#blocked-permissions-container > .blocked-permission-icon:-moz-lwtheme {
filter: url(chrome://global/skin/filters.svg#fill);
fill: currentColor;
}
/* INDIVIDUAL NOTIFICATIONS */
.focus-tab-by-prompt-icon {
@ -252,6 +245,7 @@ html|*#webRTC-previewVideo {
.plugin-icon.plugin-blocked {
list-style-image: url(chrome://browser/skin/notification-icons.svg#plugin-blocked);
fill: #d92215 !important;
}
#notification-popup-box[hidden] {

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

@ -1,12 +1,8 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
class="fieldtext"
<svg fill="context-fill" xmlns="http://www.w3.org/2000/svg"
width="32" height="32" viewBox="0 0 32 32">
#include icon-colors.inc.svg
<style>
:root > use:not(:target),
:root > g:not(:target),
@ -20,31 +16,6 @@
clip-path: url(#blocked-clipPath);
}
#login-highlighted {
fill: HighlightText;
fill-opacity: 1;
}
#plugin-blocked,
#plugin-blocked:target ~ #strikeout {
fill: #d92215;
fill-opacity: 1;
}
#camera-sharing,
#microphone-sharing,
#screen-sharing {
fill: rgb(224, 41, 29);
fill-opacity: 1;
}
#camera-indicator,
#microphone-indicator,
#screen-indicator {
fill: white;
fill-opacity: 1;
}
#update-icon {
stroke: #fff;
stroke-width: 3px;
@ -87,41 +58,40 @@
<circle cx="16" cy="16" r="14" mask="url(#i-mask)"/>
</g>
<use id="camera" xlink:href="#camera-icon" />
<use id="camera-sharing" xlink:href="#camera-icon"/>
<use id="camera-indicator" xlink:href="#camera-icon" />
<use id="camera-blocked" class="blocked" xlink:href="#camera-icon" />
<use id="desktop-notification" xlink:href="#desktop-notification-icon" />
<use id="desktop-notification-blocked" class="blocked" xlink:href="#desktop-notification-icon" />
<use id="focus-tab-by-prompt" xlink:href="#focus-tab-by-prompt-icon" />
<use id="geo-osx" xlink:href="#geo-osx-icon" />
<use id="geo-osx-blocked" class="blocked" xlink:href="#geo-osx-icon" />
<use id="geo-linux" xlink:href="#geo-linux-icon" />
<use id="geo-linux-blocked" class="blocked" xlink:href="#geo-linux-icon" />
<use id="geo-linux-detailed" xlink:href="#geo-linux-detailed-icon" />
<use id="geo-windows" xlink:href="#geo-windows-icon" />
<use id="geo-windows-blocked" class="blocked" xlink:href="#geo-windows-icon" />
<use id="geo-windows-detailed" xlink:href="#geo-windows-detailed-icon" />
<use id="indexedDB" xlink:href="#indexedDB-icon" />
<use id="indexedDB-blocked" class="blocked" xlink:href="#indexedDB-icon" />
<use id="login" xlink:href="#login-icon" />
<use id="login-highlighted" class="highlighted" xlink:href="#login-icon" />
<use id="login-detailed" xlink:href="#login-detailed-icon" />
<use id="microphone" xlink:href="#microphone-icon" />
<use id="microphone-sharing" xlink:href="#microphone-icon"/>
<use id="microphone-indicator" xlink:href="#microphone-icon"/>
<use id="microphone-blocked" class="blocked" xlink:href="#microphone-icon" />
<use id="microphone-detailed" xlink:href="#microphone-detailed-icon" />
<use id="persistent-storage" xlink:href="#persistent-storage-icon" />
<use id="persistent-storage-blocked" class="blocked" xlink:href="#persistent-storage-icon" />
<use id="plugin" xlink:href="#plugin-icon" />
<use id="plugin-blocked" class="blocked" xlink:href="#plugin-icon" />
<use id="popup" xlink:href="#popup-icon" />
<use id="screen" xlink:href="#screen-icon" />
<use id="screen-sharing" xlink:href="#screen-icon"/>
<use id="screen-indicator" xlink:href="#screen-icon"/>
<use id="screen-blocked" class="blocked" xlink:href="#screen-icon" />
<use id="update" xlink:href="#update-icon" />
<use id="camera" href="#camera-icon" />
<use id="camera-sharing" href="#camera-icon"/>
<use id="camera-indicator" href="#camera-icon" />
<use id="camera-blocked" class="blocked" href="#camera-icon" />
<use id="desktop-notification" href="#desktop-notification-icon" />
<use id="desktop-notification-blocked" class="blocked" href="#desktop-notification-icon" />
<use id="focus-tab-by-prompt" href="#focus-tab-by-prompt-icon" />
<use id="geo-osx" href="#geo-osx-icon" />
<use id="geo-osx-blocked" class="blocked" href="#geo-osx-icon" />
<use id="geo-linux" href="#geo-linux-icon" />
<use id="geo-linux-blocked" class="blocked" href="#geo-linux-icon" />
<use id="geo-linux-detailed" href="#geo-linux-detailed-icon" />
<use id="geo-windows" href="#geo-windows-icon" />
<use id="geo-windows-blocked" class="blocked" href="#geo-windows-icon" />
<use id="geo-windows-detailed" href="#geo-windows-detailed-icon" />
<use id="indexedDB" href="#indexedDB-icon" />
<use id="indexedDB-blocked" class="blocked" href="#indexedDB-icon" />
<use id="login" href="#login-icon" />
<use id="login-detailed" href="#login-detailed-icon" />
<use id="microphone" href="#microphone-icon" />
<use id="microphone-sharing" href="#microphone-icon"/>
<use id="microphone-indicator" href="#microphone-icon"/>
<use id="microphone-blocked" class="blocked" href="#microphone-icon" />
<use id="microphone-detailed" href="#microphone-detailed-icon" />
<use id="persistent-storage" href="#persistent-storage-icon" />
<use id="persistent-storage-blocked" class="blocked" href="#persistent-storage-icon" />
<use id="plugin" href="#plugin-icon" />
<use id="plugin-blocked" class="blocked" href="#plugin-icon" />
<use id="popup" href="#popup-icon" />
<use id="screen" href="#screen-icon" />
<use id="screen-sharing" href="#screen-icon"/>
<use id="screen-indicator" href="#screen-icon"/>
<use id="screen-blocked" class="blocked" href="#screen-icon" />
<use id="update" href="#update-icon" />
<path id="strikeout" d="m 2,28 2,2 26,-26 -2,-2 z"/>
</svg>

До

Ширина:  |  Высота:  |  Размер: 8.2 KiB

После

Ширина:  |  Высота:  |  Размер: 7.4 KiB

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

@ -112,6 +112,8 @@
/* 16px of the icon + 6px of margin-inline-end of .tab-icon-image */
margin-inline-start: -22px;
position: relative;
-moz-context-properties: fill;
fill: rgb(224, 41, 29);
}
.tab-sharing-icon-overlay[sharing="camera"] {

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

@ -15,6 +15,12 @@ window {
border-style: none;
}
#audioVideoButton,
#screenShareButton {
-moz-context-properties: fill;
fill: white;
}
#firefoxButton {
background-image: url("chrome://branding/content/icon48.png");
background-repeat: no-repeat;

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

@ -17,25 +17,6 @@ import pickle
import mozpack.path as mozpath
class Pool(object):
def __new__(cls, size):
try:
import multiprocessing
size = min(size, multiprocessing.cpu_count())
return multiprocessing.Pool(size)
except:
return super(Pool, cls).__new__(cls)
def imap_unordered(self, fn, iterable):
return itertools.imap(fn, iterable)
def close(self):
pass
def join(self):
pass
class File(object):
def __init__(self, path):
self._path = path
@ -258,9 +239,22 @@ def prefix_lines(text, prefix):
return ''.join('%s> %s' % (prefix, line) for line in text.splitlines(True))
def execute_and_prefix(*args, **kwargs):
prefix = kwargs['prefix']
del kwargs['prefix']
proc = subprocess.Popen(*args, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, **kwargs)
while True:
line = proc.stdout.readline()
if not line:
break
print prefix_lines(line.rstrip(), prefix)
sys.stdout.flush()
return proc.wait()
def run(objdir):
ret = 0
output = ''
with open(os.path.join(objdir, CONFIGURE_DATA), 'rb') as f:
data = pickle.load(f)
@ -336,11 +330,10 @@ def run(objdir):
print prefix_lines('configuring', relobjdir)
print prefix_lines('running %s' % ' '.join(command[:-1]), relobjdir)
sys.stdout.flush()
try:
output += subprocess.check_output(command,
stderr=subprocess.STDOUT, cwd=objdir, env=data['env'])
except subprocess.CalledProcessError as e:
return relobjdir, e.returncode, e.output
returncode = execute_and_prefix(command, cwd=objdir, env=data['env'],
prefix=relobjdir)
if returncode:
return returncode
# Leave config.status with a new timestamp if configure is newer than
# its original mtime.
@ -370,18 +363,13 @@ def run(objdir):
if skip_configure:
print prefix_lines('running config.status', relobjdir)
sys.stdout.flush()
try:
output += subprocess.check_output([data['shell'], '-c',
'./config.status'], stderr=subprocess.STDOUT, cwd=objdir,
env=data['env'])
except subprocess.CalledProcessError as e:
ret = e.returncode
output += e.output
ret = execute_and_prefix([data['shell'], '-c', './config.status'],
cwd=objdir, env=data['env'], prefix=relobjdir)
for f in contents:
f.update_time()
return relobjdir, ret, output
return ret
def subconfigure(args):
@ -404,19 +392,11 @@ def subconfigure(args):
return 0
ret = 0
# One would think using a ThreadPool would be faster, considering
# everything happens in subprocesses anyways, but no, it's actually
# slower on Windows. (20s difference overall!)
pool = Pool(len(subconfigures))
for relobjdir, returncode, output in \
pool.imap_unordered(run, subconfigures):
print prefix_lines(output, relobjdir)
sys.stdout.flush()
for subconfigure in subconfigures:
returncode = run(subconfigure)
ret = max(returncode, ret)
if ret:
break
pool.close()
pool.join()
return ret

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

@ -11,10 +11,12 @@
*
* @param {object} target
* The object the toolbox is debugging.
* @param {object} threadClient
* The toolbox's thread client
* @param {SourceMapService} sourceMapService
* The devtools-source-map functions
*/
function SourceMapURLService(target, sourceMapService) {
function SourceMapURLService(target, threadClient, sourceMapService) {
this._target = target;
this._sourceMapService = sourceMapService;
this._urls = new Map();
@ -24,6 +26,14 @@ function SourceMapURLService(target, sourceMapService) {
target.on("source-updated", this._onSourceUpdated);
target.on("will-navigate", this.reset);
// Start fetching the sources now.
this._loadingPromise = new Promise(resolve => {
threadClient.getSources(({sources}) => {
// Just ignore errors.
resolve(sources);
});
});
}
/**
@ -75,6 +85,14 @@ SourceMapURLService.prototype._onSourceUpdated = function (_, sourceEvent) {
* A promise resolving either to the original location, or null.
*/
SourceMapURLService.prototype.originalPositionFor = async function (url, line, column) {
// Ensure the sources are loaded before replying.
await this._loadingPromise;
// Maybe we were shut down while waiting.
if (!this._urls) {
return null;
}
const urlInfo = this._urls.get(url);
if (!urlInfo) {
return null;

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

@ -13,6 +13,8 @@ support-files =
code_binary_search.map
code_binary_search_absolute.js
code_binary_search_absolute.map
code_bundle_no_race.js
code_bundle_no_race.js.map
code_bundle_reload_1.js
code_bundle_reload_1.js.map
code_bundle_reload_2.js
@ -20,6 +22,7 @@ support-files =
code_inline_bundle.js
code_inline_original.js
code_math.js
code_no_race.js
code_reload_1.js
code_reload_2.js
doc_empty-tab-01.html
@ -52,6 +55,7 @@ support-files =
[browser_source_map-01.js]
[browser_source_map-absolute.js]
[browser_source_map-inline.js]
[browser_source_map-no-race.js]
[browser_source_map-reload.js]
[browser_target_from_url.js]
[browser_target_events.js]

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

@ -0,0 +1,41 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Test that the source map service doesn't race against source
// reporting.
"use strict";
const JS_URL = URL_ROOT + "code_bundle_no_race.js";
const PAGE_URL = `data:text/html,
<!doctype html>
<html>
<script src="${JS_URL}"></script>
<head>
<meta charset="utf-8"/>
<title>Empty test page to test race case</title>
</head>
<body>
</body>
</html>`;
const ORIGINAL_URL = "webpack:///code_no_race.js";
const GENERATED_LINE = 84;
const ORIGINAL_LINE = 11;
add_task(function* () {
// Start with the empty page, then navigate, so that we can properly
// listen for new sources arriving.
const toolbox = yield openNewTabAndToolbox(PAGE_URL, "webconsole");
const service = toolbox.sourceMapURLService;
info(`checking original location for ${JS_URL}:${GENERATED_LINE}`);
let newLoc = yield service.originalPositionFor(JS_URL, GENERATED_LINE);
is(newLoc.sourceUrl, ORIGINAL_URL, "check mapped URL");
is(newLoc.line, ORIGINAL_LINE, "check mapped line number");
});

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

@ -0,0 +1,92 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Original source code for the inline source map test.
// The generated file was made with
// webpack --devtool source-map code_no_race.js code_bundle_no_race.js
function f() {
console.log("anything will do");
}
f();
/***/ })
/******/ ]);
//# sourceMappingURL=code_bundle_no_race.js.map

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

@ -0,0 +1 @@
{"version":3,"sources":["webpack:///webpack/bootstrap 40c4319d19d88c63024f","webpack:///./code_no_race.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;AChEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA","file":"code_bundle_no_race.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 40c4319d19d88c63024f","/* Any copyright is dedicated to the Public Domain.\n http://creativecommons.org/publicdomain/zero/1.0/ */\n\n// Original source code for the inline source map test.\n// The generated file was made with\n// webpack --devtool source-map code_no_race.js code_bundle_no_race.js\n\n\"use strict\";\n\nfunction f() {\n console.log(\"anything will do\");\n}\n\nf();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./code_no_race.js\n// module id = 0\n// module chunks = 0"],"sourceRoot":""}

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

@ -0,0 +1,14 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Original source code for the inline source map test.
// The generated file was made with
// webpack --devtool source-map code_no_race.js code_bundle_no_race.js
"use strict";
function f() {
console.log("anything will do");
}
f();

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

@ -560,7 +560,8 @@ Toolbox.prototype = {
if (!sourceMaps) {
return null;
}
this._sourceMapURLService = new SourceMapURLService(this._target, sourceMaps);
this._sourceMapURLService = new SourceMapURLService(this._target, this.threadClient,
sourceMaps);
return this._sourceMapURLService;
},

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

@ -395,7 +395,7 @@ function matchCssFilters(message, filters) {
}
function matchSearchFilters(message, filters) {
let text = filters.text || "";
let text = (filters.text || "").trim();
return (
text === ""
// Look for a match in parameters.

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

@ -100,10 +100,20 @@ describe("Filtering", () => {
});
describe("Text filter", () => {
it("set the expected property on the store", () => {
store.dispatch(actions.filterTextSet("danger"));
expect(getAllFilters(store.getState()).text).toEqual("danger");
});
it("matches on value grips", () => {
store.dispatch(actions.filterTextSet("danger"));
let messages = getVisibleMessages(store.getState());
expect(messages.length - numUnfilterableMessages).toEqual(1);
// Checks that trimming works.
store.dispatch(actions.filterTextSet(" danger "));
messages = getVisibleMessages(store.getState());
expect(messages.length - numUnfilterableMessages).toEqual(1);
});
it("matches unicode values", () => {

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

@ -2352,7 +2352,7 @@ WebGLContext::GetVRFrame()
if (sharedSurface && sharedSurface->GetAllocator() != vrmc) {
RefPtr<SharedSurfaceTextureClient> dest =
screen->Factory()->NewTexClient(sharedSurface->GetSize());
screen->Factory()->NewTexClient(sharedSurface->GetSize(), vrmc);
if (!dest) {
return nullptr;
}

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

@ -128,6 +128,7 @@
#include "nsDirectoryServiceUtils.h"
#include "nsDirectoryServiceDefs.h"
#include "nsContentPermissionHelper.h"
#include "nsPluginHost.h"
#ifdef NS_PRINTING
#include "nsPrintingProxy.h"
#endif
@ -3374,5 +3375,15 @@ ContentChild::GetEventTargetFor(TabChild* aTabChild)
return IToplevelProtocol::GetActorEventTarget(aTabChild);
}
mozilla::ipc::IPCResult
ContentChild::RecvSetPluginList(const uint32_t& aPluginEpoch,
nsTArray<plugins::PluginTag>&& aPluginTags,
nsTArray<plugins::FakePluginTag>&& aFakePluginTags)
{
RefPtr<nsPluginHost> host = nsPluginHost::GetInst();
host->SetPluginsInContent(aPluginEpoch, aPluginTags, aFakePluginTags);
return IPC_OK();
}
} // namespace dom
} // namespace mozilla

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

@ -661,6 +661,9 @@ public:
virtual already_AddRefed<nsIEventTarget> GetEventTargetFor(TabChild* aTabChild) override;
mozilla::ipc::IPCResult
RecvSetPluginList(const uint32_t& aPluginEpoch, nsTArray<PluginTag>&& aPluginTags, nsTArray<FakePluginTag>&& aFakePluginTags) override;
private:
static void ForceKillTimerCallback(nsITimer* aTimer, void* aClosure);
void StartForceKillTimer();

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

@ -1162,17 +1162,6 @@ ContentParent::RecvGetBlocklistState(const uint32_t& aPluginId,
return IPC_OK();
}
mozilla::ipc::IPCResult
ContentParent::RecvFindPlugins(const uint32_t& aPluginEpoch,
nsresult* aRv,
nsTArray<PluginTag>* aPlugins,
nsTArray<FakePluginTag>* aFakePlugins,
uint32_t* aNewPluginEpoch)
{
*aRv = mozilla::plugins::FindPluginsForContent(aPluginEpoch, aPlugins, aFakePlugins, aNewPluginEpoch);
return IPC_OK();
}
/*static*/ TabParent*
ContentParent::CreateBrowser(const TabContext& aContext,
Element* aFrameElement,
@ -2448,6 +2437,11 @@ ContentParent::InitInternal(ProcessPriority aInitialPriority,
Unused << SendInitBlobURLs(registrations);
}
}
// Start up nsPluginHost and run FindPlugins to cache the plugin list.
// If this isn't our first content process, just send over cached list.
RefPtr<nsPluginHost> pluginHost = nsPluginHost::GetInst();
pluginHost->SendPluginsToContent();
}
bool
@ -5297,3 +5291,11 @@ ContentParent::CanCommunicateWith(ContentParentId aOtherProcess)
}
return parentId == aOtherProcess;
}
mozilla::ipc::IPCResult
ContentParent::RecvMaybeReloadPlugins()
{
RefPtr<nsPluginHost> pluginHost = nsPluginHost::GetInst();
pluginHost->ReloadPlugins();
return IPC_OK();
}

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

@ -298,6 +298,8 @@ public:
uint32_t* aRunID,
Endpoint<PPluginModuleParent>* aEndpoint) override;
virtual mozilla::ipc::IPCResult RecvMaybeReloadPlugins() override;
virtual mozilla::ipc::IPCResult RecvConnectPluginBridge(const uint32_t& aPluginId,
nsresult* aRv,
Endpoint<PPluginModuleParent>* aEndpoint) override;
@ -305,12 +307,6 @@ public:
virtual mozilla::ipc::IPCResult RecvGetBlocklistState(const uint32_t& aPluginId,
uint32_t* aIsBlocklisted) override;
virtual mozilla::ipc::IPCResult RecvFindPlugins(const uint32_t& aPluginEpoch,
nsresult* aRv,
nsTArray<PluginTag>* aPlugins,
nsTArray<FakePluginTag>* aFakePlugins,
uint32_t* aNewPluginEpoch) override;
virtual mozilla::ipc::IPCResult RecvUngrabPointer(const uint32_t& aTime) override;
virtual mozilla::ipc::IPCResult RecvRemovePermission(const IPC::Principal& aPrincipal,

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

@ -611,6 +611,17 @@ child:
async PIPCBlobInputStream(nsID aID, uint64_t aSize);
/**
* This call takes the set of plugins loaded in the chrome process, and
* sends them to the content process. However, in many cases this set will
* not have changed since the last SetPluginList message. To keep track of
* this, the chrome process increments an epoch number every time the set of
* plugins changes. The chrome process sends up the last epoch it observed.
* If the epoch last seen by the content process is the same, the content
* process ignores the update. Otherwise the content process updates its
* list and reloads its plugins.
**/
async SetPluginList(uint32_t pluginEpoch, PluginTag[] plugins, FakePluginTag[] fakePlugins);
parent:
async InitBackground(Endpoint<PBackgroundParent> aEndpoint);
@ -646,20 +657,6 @@ parent:
*/
sync GetBlocklistState(uint32_t aPluginId) returns (uint32_t aState);
/**
* This call returns the set of plugins loaded in the chrome
* process. However, in many cases this set will not have changed since the
* last FindPlugins message. Consequently, the chrome process increments an
* epoch number every time the set of plugins changes. The content process
* sends up the last epoch it observed. If the epochs are the same, the
* chrome process returns no plugins. Otherwise it returns a complete list.
*
* |pluginEpoch| is the epoch last observed by the content
* process. |newPluginEpoch| is the current epoch in the chrome process. If
* |pluginEpoch == newPluginEpoch|, then |plugins| will be left empty.
*/
sync FindPlugins(uint32_t pluginEpoch) returns (nsresult aResult, PluginTag[] plugins, FakePluginTag[] fakePlugins, uint32_t newPluginEpoch);
async PJavaScript();
async PRemoteSpellcheckEngine();
@ -1094,6 +1091,7 @@ parent:
async AddMemoryReport(MemoryReport aReport);
async FinishMemoryReport(uint32_t aGeneration);
async MaybeReloadPlugins();
both:
async AsyncMessage(nsString aMessage, CpowEntry[] aCpows,
Principal aPrincipal, ClonedMessageData aData);

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

@ -330,7 +330,7 @@ GeolocationInsecureRequestIsForbidden=A Geolocation request can only be fulfille
# LOCALIZATION NOTE: Do not translate "Large-Allocation", as it is a literal header name.
LargeAllocationNonWin32=This page would be loaded in a new process due to a Large-Allocation header, however Large-Allocation process creation is disabled on non-Win32 platforms.
# LOCALIZATION NOTE: Do not translate URL.createObjectURL(MediaStream).
URLCreateObjectURL_MediaStream=URL.createObjectURL(MediaStream) is deprecated and will be removed soon.
URLCreateObjectURL_MediaStreamWarning=URL.createObjectURL(MediaStream) is deprecated and will be removed soon.
# LOCALIZATION NOTE: Do not translate MozAutoGainControl or autoGainControl.
MozAutoGainControlWarning=mozAutoGainControl is deprecated. Use autoGainControl instead.
# LOCALIZATION NOTE: Do not translate mozNoiseSuppression or noiseSuppression.

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

@ -4033,10 +4033,7 @@ MediaStreamGraph::ApplyAudioContextOperation(MediaStream* aDestinationStream,
bool
MediaStreamGraph::IsNonRealtime() const
{
const MediaStreamGraphImpl* impl = static_cast<const MediaStreamGraphImpl*>(this);
MediaStreamGraphImpl* graph;
return !gGraphs.Get(uint32_t(impl->AudioChannel()), &graph) || graph != impl;
return !static_cast<const MediaStreamGraphImpl*>(this)->mRealtime;
}
void

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

@ -0,0 +1,39 @@
<html>
<body>
<script>
var offer= "v=0\r\no=- 6276735615230473072 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE video\r\na=msid-semantic:WMS *\r\na=ice-ufrag:XoEUdw==\r\na=ice-pwd:hfNjAs9TU4NNuumB50mGfJwkqIEN8A==\r\na=ice-lite\r\na=setup:actpass\r\na=fingerprint:sha-256 0D:54:F2:D9:F3:10:00:2D:CD:14:C6:AC:CB:5D:E7:34:5E:6F:A8:BF:25:96:48:40:0B:C7:F9:18:6A:A6:73:3F\r\nm=video 9 UDP/TLS/RTP/SAVPF 100\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=mid:video\r\na=recvonly\r\na=rtcp-rsize\r\na=rtcp-mux\r\na=rtpmap:100 VP8/90000\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=rtcp-fb:100 goog-remb\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:4 urn:3gpp:video-orientation\r\na=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=rid:hi recv\r\na=rid:mid recv\r\na=rid:lo recv\r\na=simulcast: recv rid=hi,mid,lo\r\na=candidate:1796272311 1 UDP 2130706431 192.168.10.146 55984 typ host\r\na=end-of-candidates\r\n"
var data = {};
data.sdp = offer;
data.type = "offer";
console.log('OFFER', JSON.stringify(data.sdp));
var pc = new RTCPeerConnection();
navigator.mediaDevices.getUserMedia({video: true, fake: true})
.then((stream) => {
return pc.addStream(stream);
})
.then(() => {
return pc.setRemoteDescription(new RTCSessionDescription(data));
})
.then(function() {
var sender = pc.getSenders()[0];
console.log('setting parameters');
return sender.setParameters({encodings: [
{rid: "hi", maxBitrate: 800000},
{rid: "mid", maxBitrate: 400000, scaleDownResolutionBy: 2},
{rid: "lo", maxBitrate: 150000, scaleDownResolutionBy: 4}
]});
})
.then(function() {
return pc.createAnswer();
})
.then(function(answer) {
console.log('answer', JSON.stringify(answer.sdp));
return pc.setLocalDescription(answer);
});
</script>
</body>
</html>

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

@ -0,0 +1,25 @@
<html>
<body>
<script>
const sdp = {"type":"offer","sdp":"v=0\r\no=- 6276735615230473072 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE video\r\na=msid-semantic:WMS *\r\na=ice-ufrag:XpXW4g==\r\na=ice-pwd:hjagMNwFF/kMOmWoULEFptwuQXkMVQ==\r\na=ice-lite\r\na=setup:actpass\r\na=fingerprint:sha-256 DC:FC:25:56:2B:88:77:2F:E4:FA:97:4E:2E:F1:D6:34:A6:A0:11:E2:E4:38:B3:98:08:D2:F7:9D:F5:E2:C1:15\r\nm=video 9 UDP/TLS/RTP/SAVPF 100\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=mid:video\r\na=recvonly\r\na=rtcp-rsize\r\na=rtcp-mux\r\na=rtpmap:100 VP8/90000\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=rtcp-fb:100 goog-remb\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:4 urn:3gpp:video-orientation\r\na=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=rid:hi recv\r\na=rid:mid recv\r\na=rid:lo recv\r\na=simulcast: recv rid=hi;mid;lo\r\na=candidate:1796272311 1 UDP 2130706431 127.0.0.1 33584 typ host\r\na=end-of-candidates\r\n"};
var pc = new RTCPeerConnection();
navigator.mediaDevices.getUserMedia({video: true, fake: true})
.then(stream => pc.addStream(stream))
.then(() => {
console.log('hum');
pc.setRemoteDescription(sdp)
.then(function() {
return pc.createAnswer();
})
.then(function(answer) {
console.log(answer.sdp);
return pc.setLocalDescription(answer);
})
.then(console.log('yay'))
.catch(e => console.error(e));
})
</script>
</body>
</html>

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

@ -15,3 +15,5 @@ load 860143.html
load 861958.html
load 863929.html
load 1348381.html
load 1367930_1.html
load 1367930_2.html

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

@ -51,6 +51,7 @@
#include "nsICategoryManager.h"
#include "nsPluginStreamListenerPeer.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/FakePluginTagInitBinding.h"
#include "mozilla/LoadInfo.h"
#include "mozilla/plugins/PluginAsyncSurrogate.h"
@ -267,14 +268,6 @@ nsPluginHost::nsPluginHost()
, mPluginsDisabled(false)
, mPluginEpoch(0)
{
// Bump the pluginchanged epoch on startup. This insures content gets a
// good plugin list the first time it requests it. Normally we'd just
// init this to 1, but due to the unique nature of our ctor we need to do
// this manually.
if (XRE_IsParentProcess()) {
IncrementChromeEpoch();
}
// check to see if pref is set at startup to let plugins take over in
// full page mode for certain image mime types that we handle internally
mOverrideInternalTypes =
@ -303,6 +296,13 @@ nsPluginHost::nsPluginHost()
PLUGIN_LOG(PLUGIN_LOG_ALWAYS,("nsPluginHost::ctor\n"));
PR_LogFlush();
#endif
// Load plugins on creation, as there's a good chance we'll need to send them
// to content processes directly after creation.
if (XRE_IsParentProcess())
{
LoadPlugins();
}
}
nsPluginHost::~nsPluginHost()
@ -360,8 +360,20 @@ nsresult nsPluginHost::ReloadPlugins()
PLUGIN_LOG(PLUGIN_LOG_NORMAL,
("nsPluginHost::ReloadPlugins Begin\n"));
nsresult rv = NS_OK;
// If we're calling this from a content process, forward the reload request to
// the parent process. If plugins actually changed, it will notify us
// asynchronously later.
if (XRE_IsContentProcess())
{
Unused << mozilla::dom::ContentChild::GetSingleton()->SendMaybeReloadPlugins();
// In content processes, always signal that plugins have not changed. We
// will never know if they changed here unless we make slow synchronous
// calls. This information will hopefully only be wrong once, as if there
// has been a plugin update, we expect to have gotten notification from the
// parent process and everything should be updated by the next time this is
// called. See Bug 1337058 for more info.
return NS_ERROR_PLUGINS_PLUGINSNOTCHANGED;
}
// this will create the initial plugin list out of cache
// if it was not created yet
if (!mPluginsLoaded)
@ -382,6 +394,14 @@ nsresult nsPluginHost::ReloadPlugins()
if (!pluginschanged)
return NS_ERROR_PLUGINS_PLUGINSNOTCHANGED;
return ActuallyReloadPlugins();
}
nsresult
nsPluginHost::ActuallyReloadPlugins()
{
nsresult rv = NS_OK;
// shutdown plugins and kill the list if there are no running plugins
RefPtr<nsPluginTag> prev;
RefPtr<nsPluginTag> next;
@ -415,6 +435,13 @@ nsresult nsPluginHost::ReloadPlugins()
// load them again
rv = LoadPlugins();
if (XRE_IsParentProcess())
{
// If the plugin list changed, update content. If the plugin list changed
// for the content process, it will also reload plugins.
SendPluginsToContent();
}
PLUGIN_LOG(PLUGIN_LOG_NORMAL,
("nsPluginHost::ReloadPlugins End\n"));
@ -2276,11 +2303,11 @@ WatchRegKey(uint32_t aRoot, nsCOMPtr<nsIWindowsRegKey>& aKey)
nsresult nsPluginHost::LoadPlugins()
{
#ifdef ANDROID
// This should only be run in the parent process. On plugin list change, we'll
// update observers in the content process as part of SetPluginsInContent
if (XRE_IsContentProcess()) {
return NS_OK;
}
#endif
// do not do anything if it is already done
// use ReloadPlugins() to enforce loading
if (mPluginsLoaded)
@ -2315,32 +2342,24 @@ nsresult nsPluginHost::LoadPlugins()
}
nsresult
nsPluginHost::FindPluginsInContent(bool aCreatePluginList, bool* aPluginsChanged)
nsPluginHost::SetPluginsInContent(uint32_t aPluginEpoch,
nsTArray<mozilla::plugins::PluginTag>& aPlugins,
nsTArray<mozilla::plugins::FakePluginTag>& aFakePlugins)
{
MOZ_ASSERT(XRE_IsContentProcess());
dom::ContentChild* cp = dom::ContentChild::GetSingleton();
nsresult rv;
nsTArray<PluginTag> plugins;
nsTArray<FakePluginTag> fakePlugins;
uint32_t parentEpoch;
if (!cp->SendFindPlugins(ChromeEpochForContent(), &rv, &plugins, &fakePlugins, &parentEpoch) ||
NS_FAILED(rv)) {
return NS_ERROR_NOT_AVAILABLE;
}
if (parentEpoch != ChromeEpochForContent()) {
*aPluginsChanged = true;
if (!aCreatePluginList) {
return NS_OK;
}
if (aPluginEpoch != ChromeEpochForContent()) {
// Since we know we're going to be repopulating the lists anyways, trigger a
// reload now to clear out all old entries.
ActuallyReloadPlugins();
// Don't do this if aCreatePluginList is false. Otherwise, when we actually
// want to create the list, we'll come back here and do nothing.
SetChromeEpochForContent(parentEpoch);
SetChromeEpochForContent(aPluginEpoch);
for (size_t i = 0; i < plugins.Length(); i++) {
PluginTag& tag = plugins[i];
for (auto tag : aPlugins) {
// Don't add the same plugin again.
if (nsPluginTag* existing = PluginWithId(tag.id())) {
@ -2367,7 +2386,7 @@ nsPluginHost::FindPluginsInContent(bool aCreatePluginList, bool* aPluginsChanged
AddPluginTag(pluginTag);
}
for (const auto& tag : fakePlugins) {
for (const auto& tag : aFakePlugins) {
// Don't add the same plugin again.
for (const auto& existingTag : mFakePlugins) {
if (existingTag->Id() == tag.id()) {
@ -2394,6 +2413,12 @@ nsPluginHost::FindPluginsInContent(bool aCreatePluginList, bool* aPluginsChanged
}
}
}
nsCOMPtr<nsIObserverService> obsService =
mozilla::services::GetObserverService();
if (obsService) {
obsService->NotifyObservers(nullptr, "plugins-list-updated", nullptr);
}
}
mPluginsLoaded = true;
@ -2411,8 +2436,10 @@ nsresult nsPluginHost::FindPlugins(bool aCreatePluginList, bool * aPluginsChange
*aPluginsChanged = false;
// If plugins are found or change, the content process will be notified by the
// parent process. Bail out early if this is called from the content process.
if (XRE_IsContentProcess()) {
return FindPluginsInContent(aCreatePluginList, aPluginsChanged);
return NS_OK;
}
nsresult rv;
@ -2541,35 +2568,19 @@ nsresult nsPluginHost::FindPlugins(bool aCreatePluginList, bool * aPluginsChange
}
nsresult
mozilla::plugins::FindPluginsForContent(uint32_t aPluginEpoch,
nsTArray<PluginTag>* aPlugins,
nsTArray<FakePluginTag>* aFakePlugins,
uint32_t* aNewPluginEpoch)
{
MOZ_ASSERT(XRE_IsParentProcess());
RefPtr<nsPluginHost> host = nsPluginHost::GetInst();
return host->FindPluginsForContent(aPluginEpoch, aPlugins, aFakePlugins, aNewPluginEpoch);
}
nsresult
nsPluginHost::FindPluginsForContent(uint32_t aPluginEpoch,
nsTArray<PluginTag>* aPlugins,
nsTArray<FakePluginTag>* aFakePlugins,
uint32_t* aNewPluginEpoch)
nsPluginHost::SendPluginsToContent()
{
MOZ_ASSERT(XRE_IsParentProcess());
nsTArray<PluginTag> pluginTags;
nsTArray<FakePluginTag> fakePluginTags;
// Load plugins so that the epoch is correct.
nsresult rv = LoadPlugins();
if (NS_FAILED(rv)) {
return rv;
}
*aNewPluginEpoch = ChromeEpoch();
if (aPluginEpoch == ChromeEpoch()) {
return NS_OK;
}
uint32_t newPluginEpoch = ChromeEpoch();
nsTArray<nsCOMPtr<nsIInternalPluginTag>> plugins;
GetPlugins(plugins, true);
@ -2584,15 +2595,15 @@ nsPluginHost::FindPluginsForContent(uint32_t aPluginEpoch,
nsFakePluginTag* tag = static_cast<nsFakePluginTag*>(basetag.get());
mozilla::ipc::URIParams handlerURI;
SerializeURI(tag->HandlerURI(), handlerURI);
aFakePlugins->AppendElement(FakePluginTag(tag->Id(),
handlerURI,
tag->Name(),
tag->Description(),
tag->MimeTypes(),
tag->MimeDescriptions(),
tag->Extensions(),
tag->GetNiceFileName(),
tag->SandboxScript()));
fakePluginTags.AppendElement(FakePluginTag(tag->Id(),
handlerURI,
tag->Name(),
tag->Description(),
tag->MimeTypes(),
tag->MimeDescriptions(),
tag->Extensions(),
tag->GetNiceFileName(),
tag->SandboxScript()));
continue;
}
@ -2600,21 +2611,27 @@ nsPluginHost::FindPluginsForContent(uint32_t aPluginEpoch,
/// to be more sane and avoid this dance
nsPluginTag *tag = static_cast<nsPluginTag *>(basetag.get());
aPlugins->AppendElement(PluginTag(tag->mId,
tag->Name(),
tag->Description(),
tag->MimeTypes(),
tag->MimeDescriptions(),
tag->Extensions(),
tag->mIsJavaPlugin,
tag->mIsFlashPlugin,
tag->mSupportsAsyncInit,
tag->mSupportsAsyncRender,
tag->FileName(),
tag->Version(),
tag->mLastModifiedTime,
tag->IsFromExtension(),
tag->mSandboxLevel));
pluginTags.AppendElement(PluginTag(tag->mId,
tag->Name(),
tag->Description(),
tag->MimeTypes(),
tag->MimeDescriptions(),
tag->Extensions(),
tag->mIsJavaPlugin,
tag->mIsFlashPlugin,
tag->mSupportsAsyncInit,
tag->mSupportsAsyncRender,
tag->FileName(),
tag->Version(),
tag->mLastModifiedTime,
tag->IsFromExtension(),
tag->mSandboxLevel));
}
nsTArray<dom::ContentParent*> parents;
dom::ContentParent::GetAll(parents);
for (auto p : parents)
{
Unused << p->SendSetPluginList(newPluginEpoch, pluginTags, fakePluginTags);
}
return NS_OK;
}

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

@ -252,6 +252,10 @@ public:
InfallibleTArray<nsCString>& result,
bool firstMatchOnly);
nsresult SendPluginsToContent();
nsresult SetPluginsInContent(uint32_t aPluginEpoch,
nsTArray<mozilla::plugins::PluginTag>& aPlugins,
nsTArray<mozilla::plugins::FakePluginTag>& aFakePlugins);
private:
friend class nsPluginUnloadRunnable;
@ -301,8 +305,6 @@ private:
nsresult
FindStoppedPluginForURL(nsIURI* aURL, nsIPluginInstanceOwner *aOwner);
nsresult FindPluginsInContent(bool aCreatePluginList, bool * aPluginsChanged);
nsresult
FindPlugins(bool aCreatePluginList, bool * aPluginsChanged);
@ -368,6 +370,8 @@ private:
void UpdateInMemoryPluginInfo(nsPluginTag* aPluginTag);
nsresult ActuallyReloadPlugins();
RefPtr<nsPluginTag> mPlugins;
RefPtr<nsPluginTag> mCachedPlugins;
RefPtr<nsInvalidPluginTag> mInvalidPlugins;

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

@ -5,7 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
with Files("**"):
BUG_COMPONENT = ("Core", "DOM")
BUG_COMPONENT = ("Core", "WebVR")
EXPORTS.mozilla.dom += [
'VRDisplay.h',
@ -28,4 +28,5 @@ LOCAL_INCLUDES += [
'/dom/base'
]
MOCHITEST_MANIFESTS += ['test/mochitest.ini']
MOCHITEST_MANIFESTS += ['test/mochitest/mochitest.ini']
REFTEST_MANIFESTS += ['test/reftest/reftest.list']

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

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

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

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

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

@ -10,6 +10,7 @@
</head>
<body>
<script>
"use strict";
var vrDisplay;
function requestPresentTest() {

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

@ -0,0 +1,56 @@
var VRServiceTest;
var vrMockDisplay;
var VRSimulationDriver = (function() {
"use strict";
var AttachWebVRDisplay = function() {
var promise = VRServiceTest.attachVRDisplay("VRDisplayTest");
promise.then(function (display) {
vrMockDisplay = display;
});
return promise;
};
var SetVRDisplayPose = function(position,
linearVelocity, linearAcceleration,
orientation, angularVelocity,
angularAcceleration) {
vrMockDisplay.setPose(position, linearVelocity, linearAcceleration,
orientation, angularVelocity, angularAcceleration);
};
var SetEyeResolution = function(width, height) {
vrMockDisplay.setEyeResolution(width, height);
}
var SetEyeParameter = function(eye, offsetX, offsetY, offsetZ,
upDegree, rightDegree, downDegree, leftDegree) {
vrMockDisplay.setEyeParameter(eye, offsetX, offsetY, offsetZ, upDegree, rightDegree,
downDegree, leftDegree);
}
var SetMountState = function(isMounted) {
vrMockDisplay.setMountState(isMounted);
}
var UpdateVRDisplay = function() {
vrMockDisplay.update();
}
var API = {
AttachWebVRDisplay: AttachWebVRDisplay,
SetVRDisplayPose: SetVRDisplayPose,
SetEyeResolution: SetEyeResolution,
SetEyeParameter: SetEyeParameter,
SetMountState: SetMountState,
UpdateVRDisplay: UpdateVRDisplay,
none: false
};
return API;
}());

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

@ -0,0 +1,136 @@
<!DOCTYPE html>
<meta charset='UTF-8'>
<!-- Draw rect in WebGL and submit it to the VR device as a base64 image.
If this fails, something is seriously wrong. -->
<html class="reftest-wait">
<head>
<script type='text/javascript' src='webgl-util.js'></script>
<script type='text/javascript' src="VRSimulationDriver.js"></script>
<script id="vs" type="x-shader/x-vertex">
attribute vec2 aVertCoord;
void main(void) {
gl_Position = vec4(aVertCoord, 0.0, 1.0);
}
</script>
<script id="fs" type="x-shader/x-fragment">
precision mediump float;
void main(void) {
gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
}
</script>
<script type='text/javascript'>
'use strict';
var submitResult = null;
var vrDisplay = null;
var webglCanvas = null;
var gl = null;
var prog = null;
var img = null;
function setStatus(text) {
var elem = document.getElementById('status');
elem.innerHTML = text;
}
function initVRMock() {
VRServiceTest = navigator.requestVRServiceTest();
if (!VRServiceTest) {
setStatus('VRServiceTest get failed.');
return;
}
VRSimulationDriver.AttachWebVRDisplay().then(() => {
// Looking for VR displays
if (navigator.getVRDisplays) {
submitResult = new VRSubmitFrameResult();
navigator.getVRDisplays().then(function (displays) {
if (displays.length > 0) {
vrDisplay = displays[0];
vrDisplay.requestPresent([{ source: webglCanvas }]);
vrDisplay.requestAnimationFrame(onAnimationFrame);
}
});
}
});
}
function onAnimationFrame() {
if (!vrDisplay.isPresenting) {
return;
}
vrDisplay.requestAnimationFrame(onAnimationFrame);
gl.clearColor(0.0, 1.0, 0.0, 1.0);
gl.clear(gl.COLOR_BUFFER_BIT);
// Presenting render a stereo view.
gl.viewport(0, 0, webglCanvas.width * 0.5, webglCanvas.height);
gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
gl.viewport(webglCanvas.width * 0.5, 0, webglCanvas.width * 0.5, webglCanvas.height);
gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
// Indicate VRDisplay we're done rendering.
vrDisplay.submitFrame();
if (vrDisplay.getSubmitFrameResult(submitResult)) {
if (!img) {
img = document.createElement("img");
img.onload = function(){
webglCanvas.style.display = 'none';
vrDisplay.exitPresent();
setTimeout(testComplete, 0);
};
img.src = submitResult.base64Image;
document.body.appendChild(img);
} else {
img.src = submitResult.base64Image;
}
}
}
function runTest() {
webglCanvas = document.getElementById('canvas');
gl = WebGLUtil.getWebGL('canvas');
if (!gl) {
setStatus('WebGL context creation failed.');
return;
}
gl.disable(gl.DEPTH_TEST);
prog = WebGLUtil.createProgramByIds(gl, 'vs', 'fs');
if (!prog) {
setStatus('Program linking failed.');
return;
}
prog.aVertCoord = gl.getAttribLocation(prog, "aVertCoord");
var vertCoordArr = new Float32Array([
-0.5, -0.5,
0.5, -0.5,
-0.5, 0.5,
0.5, 0.5,
]);
var vertCoordBuff = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, vertCoordBuff);
gl.bufferData(gl.ARRAY_BUFFER, vertCoordArr, gl.STATIC_DRAW);
gl.useProgram(prog);
gl.enableVertexAttribArray(prog.aVertCoord);
gl.vertexAttribPointer(prog.aVertCoord, 2, gl.FLOAT, false, 0, 0);
initVRMock();
}
function testComplete() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload='runTest();'>
<canvas id='canvas' width='256' height='256'></canvas>
<div id='status'></div>
</body>
</html>

Двоичные данные
dom/vr/test/reftest/draw_rect.png Normal file

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

После

Ширина:  |  Высота:  |  Размер: 1.7 KiB

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

@ -0,0 +1,7 @@
# WebVR Reftests
default-preferences pref(dom.vr.puppet.enabled,true) pref(dom.vr.test.enabled,true) pref(dom.vr.require-gesture,false) pref(dom.vr.puppet.submitframe,1)
# VR SubmitFrame is only implemented for D3D11 now.
# We need to continue to investigate why these reftests can be run well in local,
# but will be suspended until terminating on reftest debug build.
skip-if(!winWidget||!layersGPUAccelerated||isDebugBuild) == draw_rect.html wrapper.html?draw_rect.png

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

@ -0,0 +1,170 @@
WebGLUtil = (function() {
// ---------------------------------------------------------------------------
// Error handling (for obvious failures, such as invalid element ids)
function defaultErrorFunc(str) {
console.log('Error: ' + str);
}
var gErrorFunc = defaultErrorFunc;
function setErrorFunc(func) {
gErrorFunc = func;
}
function error(str) {
gErrorFunc(str);
}
// ---------------------------------------------------------------------------
// Warning handling (for failures that may be intentional)
function defaultWarningFunc(str) {
console.log('Warning: ' + str);
}
var gWarningFunc = defaultWarningFunc;
function setWarningFunc(func) {
gWarningFunc = func;
}
function warning(str) {
gWarningFunc(str);
}
// ---------------------------------------------------------------------------
// WebGL helpers
function getWebGL(canvasId, requireConformant, attributes) {
// `requireConformant` will default to falsey if it is not supplied.
var canvas = document.getElementById(canvasId);
var gl = null;
try {
gl = canvas.getContext('webgl', attributes);
} catch(e) {}
if (!gl && !requireConformant) {
try {
gl = canvas.getContext('experimental-webgl', attributes);
} catch(e) {}
}
if (!gl) {
error('WebGL context could not be retrieved from \'' + canvasId + '\'.');
return null;
}
return gl;
}
function withWebGL2(canvasId, callback, onFinished) {
var run = function() {
var canvas = document.getElementById(canvasId);
var gl = null;
try {
gl = canvas.getContext('webgl2');
} catch(e) {}
if (!gl) {
todo(false, 'WebGL2 is not supported');
onFinished();
return;
}
function errorFunc(str) {
ok(false, 'Error: ' + str);
}
setErrorFunc(errorFunc);
setWarningFunc(errorFunc);
callback(gl);
onFinished();
};
try {
var prefArrArr = [
['webgl.force-enabled', true],
['webgl.enable-webgl2', true],
];
var prefEnv = {'set': prefArrArr};
SpecialPowers.pushPrefEnv(prefEnv, run);
} catch (e) {
warning('No SpecialPowers, but trying WebGL2 anyway...');
run();
}
}
function getContentFromElem(elem) {
var str = "";
var k = elem.firstChild;
while (k) {
if (k.nodeType == 3)
str += k.textContent;
k = k.nextSibling;
}
return str;
}
// Returns a valid shader, or null on errors.
function createShaderById(gl, id) {
var elem = document.getElementById(id);
if (!elem) {
error('Failed to create shader from non-existent id \'' + id + '\'.');
return null;
}
var src = getContentFromElem(elem);
var shader;
if (elem.type == "x-shader/x-fragment") {
shader = gl.createShader(gl.FRAGMENT_SHADER);
} else if (elem.type == "x-shader/x-vertex") {
shader = gl.createShader(gl.VERTEX_SHADER);
} else {
error('Bad MIME type for shader \'' + id + '\': ' + elem.type + '.');
return null;
}
gl.shaderSource(shader, src);
gl.compileShader(shader);
return shader;
}
function createProgramByIds(gl, vsId, fsId) {
var vs = createShaderById(gl, vsId);
var fs = createShaderById(gl, fsId);
if (!vs || !fs)
return null;
var prog = gl.createProgram();
gl.attachShader(prog, vs);
gl.attachShader(prog, fs);
gl.linkProgram(prog);
if (!gl.getProgramParameter(prog, gl.LINK_STATUS)) {
var str = "Shader program linking failed:";
str += "\nShader program info log:\n" + gl.getProgramInfoLog(prog);
str += "\n\nVert shader log:\n" + gl.getShaderInfoLog(vs);
str += "\n\nFrag shader log:\n" + gl.getShaderInfoLog(fs);
warning(str);
return null;
}
return prog;
}
return {
setErrorFunc: setErrorFunc,
setWarningFunc: setWarningFunc,
getWebGL: getWebGL,
withWebGL2: withWebGL2,
createShaderById: createShaderById,
createProgramByIds: createProgramByIds,
};
})();

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

@ -0,0 +1,27 @@
<!DOCTYPE HTML>
<html class="reftest-wait">
<head>
<title>Image reftest wrapper</title>
<style type="text/css">
#image1 { background-color: rgb(10, 100, 250); }
</style>
<script>
// The image is loaded async after the page loads
// wait for it to finish loading
function onImageLoad() {
document.documentElement.removeAttribute("class");
};
</script>
</head>
<body>
<img id="image1">
<script>
// Use as "wrapper.html?image.png"
var imgURL = document.location.search.substr(1);
document.images[0].onload = onImageLoad;
document.images[0].onerror = onImageLoad;
document.images[0].src = imgURL;
</script>
</body>
</html>

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

@ -99,7 +99,7 @@ CreateElementTransaction::DoTransaction()
RefPtr<Selection> selection = mEditorBase->GetSelection();
NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
rv = selection->CollapseNative(mParent, mParent->IndexOf(mNewNode) + 1);
rv = selection->Collapse(mParent, mParent->IndexOf(mNewNode) + 1);
NS_ASSERTION(!rv.Failed(),
"selection could not be collapsed after insert");
return NS_OK;

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

@ -1070,12 +1070,12 @@ EditorBase::BeginningOfDocument()
nsCOMPtr<nsINode> firstNode = GetFirstEditableNode(rootElement);
if (!firstNode) {
// just the root node, set selection to inside the root
return selection->CollapseNative(rootElement, 0);
return selection->Collapse(rootElement, 0);
}
if (firstNode->NodeType() == nsIDOMNode::TEXT_NODE) {
// If firstNode is text, set selection to beginning of the text node.
return selection->CollapseNative(firstNode, 0);
return selection->Collapse(firstNode, 0);
}
// Otherwise, it's a leaf node and we set the selection just in front of it.
@ -1085,7 +1085,7 @@ EditorBase::BeginningOfDocument()
}
int32_t offsetInParent = parent->IndexOf(firstNode);
return selection->CollapseNative(parent, offsetInParent);
return selection->Collapse(parent, offsetInParent);
}
NS_IMETHODIMP
@ -1108,7 +1108,7 @@ EditorBase::EndOfDocument()
}
uint32_t length = node->Length();
return selection->CollapseNative(node, int32_t(length));
return selection->Collapse(node, int32_t(length));
}
NS_IMETHODIMP

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

@ -3380,12 +3380,12 @@ SetSelectionAroundHeadChildren(Selection* aSelection,
NS_ENSURE_STATE(headNode);
// Collapse selection to before first child of the head,
nsresult rv = aSelection->CollapseNative(headNode, 0);
nsresult rv = aSelection->Collapse(headNode, 0);
NS_ENSURE_SUCCESS(rv, rv);
// Then extend it to just after.
uint32_t childCount = headNode->GetChildCount();
return aSelection->ExtendNative(headNode, childCount + 1);
return aSelection->Extend(headNode, childCount + 1);
}
NS_IMETHODIMP
@ -3717,7 +3717,7 @@ HTMLEditor::SetCaretInTableCell(nsIDOMElement* aElement)
RefPtr<Selection> selection = GetSelection();
NS_ENSURE_TRUE(selection, false);
return NS_SUCCEEDED(selection->CollapseNative(node, 0));
return NS_SUCCEEDED(selection->Collapse(node, 0));
}
/**
@ -3820,7 +3820,7 @@ HTMLEditor::SetSelectionAtDocumentStart(Selection* aSelection)
dom::Element* rootElement = GetRoot();
NS_ENSURE_TRUE(rootElement, NS_ERROR_NULL_POINTER);
return aSelection->CollapseNative(rootElement, 0);
return aSelection->Collapse(rootElement, 0);
}
/**

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

@ -1359,7 +1359,7 @@ TextEditRules::CreateBogusNodeIfNeeded(Selection* aSelection)
NS_ENSURE_SUCCESS(rv, rv);
// Set selection.
aSelection->CollapseNative(body, 0);
aSelection->Collapse(body, 0);
return NS_OK;
}

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

@ -17,6 +17,7 @@
#include "mozilla/layers/TextureClientSharedSurface.h"
#include "mozilla/layers/TextureForwarder.h"
#include "mozilla/Unused.h"
#include "VRManagerChild.h"
namespace mozilla {
namespace gl {
@ -317,15 +318,22 @@ SurfaceFactory::~SurfaceFactory()
}
already_AddRefed<layers::SharedSurfaceTextureClient>
SurfaceFactory::NewTexClient(const gfx::IntSize& size)
SurfaceFactory::NewTexClient(const gfx::IntSize& size, const layers::LayersIPCChannel* aLayersChannel)
{
while (!mRecycleFreePool.empty()) {
RefPtr<layers::SharedSurfaceTextureClient> cur = mRecycleFreePool.front();
mRecycleFreePool.pop();
if (cur->Surf()->mSize == size) {
cur->Surf()->WaitForBufferOwnership();
return cur.forget();
if (cur->Surf()->mSize == size){
// In the general case, textureClients transit textures through
// CompositorForwarder. But, the textureClient created by VRManagerChild
// has a different LayerIPCChannel, PVRManager. Therefore, textureClients
// need to be separated into different cases.
if ((aLayersChannel && aLayersChannel == cur->GetAllocator()) ||
(cur->GetAllocator() != gfx::VRManagerChild::Get())) {
cur->Surf()->WaitForBufferOwnership();
return cur.forget();
}
}
StopRecycling(cur);

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

@ -306,7 +306,8 @@ protected:
public:
UniquePtr<SharedSurface> NewSharedSurface(const gfx::IntSize& size);
//already_AddRefed<ShSurfHandle> NewShSurfHandle(const gfx::IntSize& size);
already_AddRefed<layers::SharedSurfaceTextureClient> NewTexClient(const gfx::IntSize& size);
already_AddRefed<layers::SharedSurfaceTextureClient> NewTexClient(const gfx::IntSize& size,
const layers::LayersIPCChannel* aLayersChannel = nullptr);
static void RecycleCallback(layers::TextureClient* tc, void* /*closure*/);

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

@ -1058,7 +1058,7 @@ impl Renderer {
let config = FrameBuilderConfig {
enable_scrollbars: options.enable_scrollbars,
default_font_render_mode,
default_font_render_mode: default_font_render_mode,
debug: options.debug,
cache_expiry_frames: options.cache_expiry_frames,
};

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

@ -865,8 +865,6 @@ description =
description =
[PContent::GetBlocklistState]
description =
[PContent::FindPlugins]
description =
[PContent::NSSU2FTokenIsCompatibleVersion]
description =
[PContent::NSSU2FTokenIsRegistered]

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

@ -78,9 +78,9 @@ namespace %(namespace)s {
} // js
"""
def embed(cxx, preprocessorOption, msgs, sources, c_out, js_out, namespace, env):
def embed(cxx, preprocessorOption, cppflags, msgs, sources, c_out, js_out, namespace, env):
combinedSources = '\n'.join([msgs] + ['#include "%(s)s"' % { 's': source } for source in sources])
args = ['-D%(k)s=%(v)s' % { 'k': k, 'v': env[k] } for k in env]
args = cppflags + ['-D%(k)s=%(v)s' % { 'k': k, 'v': env[k] } for k in env]
preprocessed = preprocess(cxx, preprocessorOption, combinedSources, args)
processed = '\n'.join([line for line in preprocessed.splitlines() if \
(line.strip() and not line.startswith('#'))])
@ -143,12 +143,14 @@ def process_inputs(namespace, c_out, msg_file, inputs):
sources = [path for path in inputs if path.endswith(".js") and not path.endswith(".h.js")]
assert len(deps) + len(sources) == len(inputs)
cxx = shlex.split(buildconfig.substs['CXX'])
cxx_option = buildconfig.substs['PREPROCESS_OPTION']
pp_option = buildconfig.substs['PREPROCESS_OPTION']
cppflags = shlex.split(buildconfig.substs['OS_CPPFLAGS'])
cppflags += shlex.split(buildconfig.substs['WARNINGS_AS_ERRORS'])
env = get_config_defines(buildconfig)
js_path = re.sub(r"\.out\.h$", "", c_out.name) + ".js"
msgs = messages(msg_file)
with open(js_path, 'w') as js_out:
embed(cxx, cxx_option, msgs, sources, c_out, js_out, namespace, env)
embed(cxx, pp_option, cppflags, msgs, sources, c_out, js_out, namespace, env)
def generate_selfhosted(c_out, msg_file, *inputs):
# Called from moz.build to embed selfhosted JS.

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

@ -235,9 +235,24 @@ def main(argv):
if read_all:
test_list = jittests.find_tests()
# If code coverage is enabled, exclude tests. (bug 1347245)
# Exclude tests when code coverage is enabled.
# This part is equivalent to:
# skip-if = coverage
if os.getenv('GCOV_PREFIX') is not None:
options.exclude += ['asm.js/testSIMD.js']
# GCOV errors.
options.exclude += ['asm.js/testSIMD.js'] # Bug 1347245
# JSVM errors.
options.exclude += ['basic/functionnames.js'] # Bug 1369783
options.exclude += ['debug/Debugger-findScripts-23.js']
options.exclude += ['debug/bug1160182.js']
options.exclude += ['xdr/incremental-encoder.js']
options.exclude += ['xdr/bug1186973.js'] # Bug 1369785
options.exclude += ['basic/werror.js']
# Prevent code coverage test that expects coverage
# to be off when it starts.
options.exclude += ['debug/Script-getOffsetsCoverage-02.js']
if options.exclude_from:
with open(options.exclude_from) as fh:

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

@ -145,8 +145,7 @@ case "$target" in
CFLAGS="$CFLAGS -TC -nologo"
CXXFLAGS="$CXXFLAGS -TP -nologo"
if test -z "$CLANG_CL"; then
CFLAGS="$CFLAGS -utf-8"
CXXFLAGS="$CXXFLAGS -utf-8"
CPPFLAGS="$CPPFLAGS -utf-8"
fi
# MSVC warning C4800 warns when a value is implicitly cast to bool,
# because this also forces narrowing to a single byte, which can be a

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

@ -3935,6 +3935,13 @@ ContainerState::SetupMaskLayerForCSSMask(Layer* aLayer,
aLayer->SetMaskLayer(maskLayer);
}
static bool
IsScrollThumbLayer(nsDisplayItem* aItem)
{
return aItem->GetType() == nsDisplayItem::TYPE_OWN_LAYER &&
static_cast<nsDisplayOwnLayer*>(aItem)->IsScrollThumbLayer();
}
/*
* Iterate through the non-clip items in aList and its descendants.
* For each item we compute the effective clip rect. Each item is assigned
@ -4204,8 +4211,9 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList)
mPaintedLayerDataTree.AddingOwnLayer(clipAGR,
&scrolledClipRect,
uniformColorPtr);
} else if (*animatedGeometryRoot == item->Frame() &&
*animatedGeometryRoot != mBuilder->RootReferenceFrame()) {
} else if ((*animatedGeometryRoot == item->Frame() &&
*animatedGeometryRoot != mBuilder->RootReferenceFrame()) ||
(IsScrollThumbLayer(item) && mManager->IsWidgetLayerManager())) {
// This is the case for scrollbar thumbs, for example. In that case the
// clip we care about is the overflow:hidden clip on the scrollbar.
mPaintedLayerDataTree.AddingOwnLayer(animatedGeometryRoot->mParentAGR,

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

@ -6110,6 +6110,14 @@ nsDisplayOwnLayer::nsDisplayOwnLayer(nsDisplayListBuilder* aBuilder,
, mForceActive(aForceActive)
{
MOZ_COUNT_CTOR(nsDisplayOwnLayer);
// For scroll thumb layers, override the AGR to be the thumb's AGR rather
// than the AGR for mFrame (which is the slider frame).
if (IsScrollThumbLayer()) {
if (nsIFrame* thumbFrame = nsBox::GetChildXULBox(mFrame)) {
mAnimatedGeometryRoot = aBuilder->FindAnimatedGeometryRootFor(thumbFrame);
}
}
}
#ifdef NS_BUILD_REFCNT_LOGGING
@ -6130,6 +6138,20 @@ nsDisplayOwnLayer::GetLayerState(nsDisplayListBuilder* aBuilder,
return RequiredLayerStateForChildren(aBuilder, aManager, aParameters, mList, mAnimatedGeometryRoot);
}
bool
nsDisplayOwnLayer::IsScrollThumbLayer() const
{
return (mFlags & VERTICAL_SCROLLBAR) || (mFlags & HORIZONTAL_SCROLLBAR);
}
bool
nsDisplayOwnLayer::ShouldBuildLayerEvenIfInvisible(nsDisplayListBuilder* aBuilder)
{
// Render scroll thumb layers even if they are invisible, because async
// scrolling might bring them into view.
return IsScrollThumbLayer();
}
// nsDisplayOpacity uses layers for rendering
already_AddRefed<Layer>
nsDisplayOwnLayer::BuildLayer(nsDisplayListBuilder* aBuilder,

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

@ -1428,6 +1428,7 @@ private:
AnimatedGeometryRoot* FindAnimatedGeometryRootFor(nsDisplayItem* aItem);
friend class nsDisplayItem;
friend class nsDisplayOwnLayer;
AnimatedGeometryRoot* FindAnimatedGeometryRootFor(nsIFrame* aFrame);
AnimatedGeometryRoot* WrapAGRForFrame(nsIFrame* aAnimatedGeometryRoot,
@ -4079,7 +4080,7 @@ public:
#ifdef NS_BUILD_REFCNT_LOGGING
virtual ~nsDisplayOwnLayer();
#endif
virtual bool ShouldBuildLayerEvenIfInvisible(nsDisplayListBuilder* aBuilder) override;
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
LayerManager* aManager,
const ContainerLayerParameters& aContainerParameters) override;
@ -4095,6 +4096,7 @@ public:
return false;
}
uint32_t GetFlags() { return mFlags; }
bool IsScrollThumbLayer() const;
NS_DISPLAY_DECL_NAME("OwnLayer", TYPE_OWN_LAYER)
protected:
uint32_t mFlags;

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

@ -39,7 +39,7 @@ skip-if(!winWidget) != 403458-winmenu-ltr.xul 403458-winmenu-rtl.xul
== 492155-1.html about:blank
== 492155-2.html about:blank
== 492155-3.html about:blank
fails-if(Android&&!asyncPan) != 492155-4.html about:blank
fails-if(Android&&!asyncPan) fuzzy-if(styloVsGecko,0-1,0-1) != 492155-4.html about:blank
!= box-shadow-input.html box-shadow-input-ref.html
!= box-shadow-button.html box-shadow-button-ref.html

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

@ -376,6 +376,9 @@ include usercss/reftest.list
include view-source/reftest.list
# vr
include ../../dom/vr/test/reftest/reftest.list
# web-animations
include web-animations/reftest.list

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

@ -128,4 +128,4 @@ fuzzy-if(gtkWidget,3,4) == text-emphasis-line-height-002b.html text-emphasis-lin
== text-emphasis-line-height-004c.html text-emphasis-line-height-004-ref.html
== text-emphasis-line-height-004d.html text-emphasis-line-height-004-ref.html
# END tests from support/generate-text-emphasis-line-height-tests.py
fuzzy-if(gtkWidget,3,4) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),43,1) fails-if(styloVsGecko||stylo) == text-emphasis-line-height-001z.html text-emphasis-line-height-001-ref.html
fuzzy-if(gtkWidget,3,4) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),43,1) == text-emphasis-line-height-001z.html text-emphasis-line-height-001-ref.html

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

@ -22,6 +22,8 @@ user_pref("app.update.staging.enabled", false);
user_pref("app.update.url.android", "");
// Ensure we can load the reftest extension
user_pref("extensions.allow-non-mpc-extensions", true);
user_pref("extensions.legacy.enabled", true);
user_pref("security.turn_off_all_security_so_that_viruses_can_take_over_this_computer", true);
// Disable addon updates and prefetching so we don't leak them
user_pref("extensions.update.enabled", false);
user_pref("extensions.systemAddon.update.url", "http://localhost/dummy-system-addons.xml");

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

@ -325,10 +325,6 @@ class RefTest(object):
if options.specialPowersExtensionPath is not None:
if not self.use_marionette:
addons.append(options.specialPowersExtensionPath)
# SpecialPowers requires insecure automation-only features that we
# put behind a pref.
prefs['security.turn_off_all_security_so_that_viruses'
'_can_take_over_this_computer'] = True
for pref in prefs:
prefs[pref] = mozprofile.Preferences.cast(prefs[pref])

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

@ -421,6 +421,22 @@ nsSliderFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
nsRect dirty = aDirtyRect.Intersect(thumbRect);
dirty = nsLayoutUtils::ComputePartialPrerenderArea(aDirtyRect, overflow, refSize);
// Clip the thumb layer to the slider track. This is necessary to ensure
// FrameLayerBuilder is able to merge content before and after the
// scrollframe into the same layer (otherwise it thinks the thumb could
// potentially move anywhere within the existing clip).
DisplayListClipState::AutoSaveRestore thumbClipState(aBuilder);
aBuilder->GetCurrentReferenceFrame();
thumbClipState.ClipContainingBlockDescendants(
GetRectRelativeToSelf() + aBuilder->ToReferenceFrame(this));
// Have the thumb's container layer capture the current clip, so
// it doesn't apply to the thumb's contents. This allows the contents
// to be fully rendered even if they're partially or fully offscreen,
// so async scrolling can still bring it into view.
DisplayListClipState::AutoSaveRestore thumbContentsClipState(aBuilder);
thumbContentsClipState.Clear();
nsDisplayListBuilder::AutoContainerASRTracker contASRTracker(aBuilder);
nsDisplayListCollection tempLists;
nsBoxFrame::BuildDisplayListForChildren(aBuilder, dirty, tempLists);
@ -435,10 +451,11 @@ nsSliderFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
masterList.AppendToTop(tempLists.PositionedDescendants());
masterList.AppendToTop(tempLists.Outlines());
// Restore the saved clip so it applies to the thumb container layer.
thumbContentsClipState.Restore();
// Wrap the list to make it its own layer.
const ActiveScrolledRoot* ownLayerASR = contASRTracker.GetContainerASR();
DisplayListClipState::AutoSaveRestore ownLayerClipState(aBuilder);
ownLayerClipState.ClearUpToASR(ownLayerASR);
aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayOwnLayer(aBuilder, this, &masterList, ownLayerASR,
flags, scrollTargetId,

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

@ -77,7 +77,8 @@ class JsepTrackTest : public ::testing::Test
new JsepApplicationCodecDescription(
"webrtc-datachannel",
256,
5999
5999,
499
));
// if we're doing something with red, it needs
@ -1108,6 +1109,11 @@ TEST_F(JsepTrackTest, DataChannelDraft05)
mOffer->ToString().find("a=sctpmap:5999 webrtc-datachannel 256"));
ASSERT_NE(std::string::npos,
mAnswer->ToString().find("a=sctpmap:5999 webrtc-datachannel 256"));
// Note: this is testing for a workaround, see bug 1335262 for details
ASSERT_NE(std::string::npos,
mOffer->ToString().find("a=max-message-size:499"));
ASSERT_NE(std::string::npos,
mAnswer->ToString().find("a=max-message-size:499"));
ASSERT_EQ(std::string::npos, mOffer->ToString().find("a=sctp-port"));
ASSERT_EQ(std::string::npos, mAnswer->ToString().find("a=sctp-port"));
}
@ -1122,7 +1128,8 @@ TEST_F(JsepTrackTest, DataChannelDraft05AnswerWithDifferentPort)
new JsepApplicationCodecDescription(
"webrtc-datachannel",
256,
4555
4555,
10544
));
InitTracks(SdpMediaSection::kApplication);
@ -1136,6 +1143,11 @@ TEST_F(JsepTrackTest, DataChannelDraft05AnswerWithDifferentPort)
mOffer->ToString().find("a=sctpmap:4555 webrtc-datachannel 256"));
ASSERT_NE(std::string::npos,
mAnswer->ToString().find("a=sctpmap:5999 webrtc-datachannel 256"));
// Note: this is testing for a workaround, see bug 1335262 for details
ASSERT_NE(std::string::npos,
mOffer->ToString().find("a=max-message-size:10544"));
ASSERT_NE(std::string::npos,
mAnswer->ToString().find("a=max-message-size:499"));
ASSERT_EQ(std::string::npos, mOffer->ToString().find("a=sctp-port"));
ASSERT_EQ(std::string::npos, mAnswer->ToString().find("a=sctp-port"));
}
@ -1169,6 +1181,8 @@ TEST_F(JsepTrackTest, DataChannelDraft21)
ASSERT_NE(std::string::npos, mOffer->ToString().find("a=sctp-port:5999"));
ASSERT_NE(std::string::npos, mAnswer->ToString().find("a=sctp-port:5999"));
ASSERT_NE(std::string::npos, mOffer->ToString().find("a=max-message-size:499"));
ASSERT_NE(std::string::npos, mAnswer->ToString().find("a=max-message-size:499"));
ASSERT_EQ(std::string::npos, mOffer->ToString().find("a=sctpmap"));
ASSERT_EQ(std::string::npos, mAnswer->ToString().find("a=sctpmap"));
}

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

@ -9,6 +9,7 @@
#include "signaling/src/sdp/SdpMediaSection.h"
#include "signaling/src/sdp/SdpHelper.h"
#include "nsCRT.h"
#include "mozilla/net/DataChannelProtocol.h"
namespace mozilla {
@ -755,11 +756,14 @@ class JsepApplicationCodecDescription : public JsepCodecDescription {
JsepApplicationCodecDescription(const std::string& name,
uint16_t channels,
uint16_t localPort,
uint32_t localMaxMessageSize,
bool enabled = true)
: JsepCodecDescription(mozilla::SdpMediaSection::kApplication, "",
name, 0, channels, enabled),
mLocalPort(localPort),
mRemotePort(0)
mLocalMaxMessageSize(localMaxMessageSize),
mRemotePort(0),
mRemoteMaxMessageSize(0)
{
}
@ -797,7 +801,8 @@ class JsepApplicationCodecDescription : public JsepCodecDescription {
{
if (mEnabled && msection.GetMediaType() == mType) {
if (msection.GetFormats().empty()) {
msection.AddDataChannel(mName, mLocalPort, mChannels);
msection.AddDataChannel(mName, mLocalPort, mChannels,
mLocalMaxMessageSize);
}
AddParametersToMSection(msection);
@ -809,9 +814,17 @@ class JsepApplicationCodecDescription : public JsepCodecDescription {
{
JsepCodecDescription::Negotiate(pt, remoteMsection);
uint32_t message_size = remoteMsection.GetMaxMessageSize();
if (message_size) {
mRemoteMaxMessageSize = message_size;
}
int sctp_port = remoteMsection.GetSctpPort();
if (sctp_port) {
mRemotePort = sctp_port;
if (!message_size) {
mRemoteMaxMessageSize = WEBRTC_DATACHANELL_MAX_MESSAGE_SIZE_DEFAULT;
}
return true;
}
@ -827,7 +840,9 @@ class JsepApplicationCodecDescription : public JsepCodecDescription {
uint16_t mLocalPort;
uint32_t mLocalMaxMessageSize;
uint16_t mRemotePort;
uint32_t mRemoteMaxMessageSize;
};
} // namespace mozilla

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

@ -2368,7 +2368,8 @@ JsepSessionImpl::SetupDefaultCodecs()
mSupportedCodecs.values.push_back(new JsepApplicationCodecDescription(
"webrtc-datachannel",
WEBRTC_DATACHANNEL_STREAMS_DEFAULT,
5000
WEBRTC_DATACHANNEL_PORT_DEFAULT,
WEBRTC_DATACHANELL_MAX_MESSAGE_SIZE_DEFAULT
));
// Update the redundant encodings for the RED codec with the supported

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

@ -275,9 +275,19 @@ JsepTrack::CreateEncodings(
rids.push_back(SdpRidAttributeList::Rid());
}
// For each rid in the remote, make sure we have an encoding, and configure
size_t max_streams = 1;
if (mJsEncodeConstraints.size()) {
max_streams = std::min(rids.size(), mJsEncodeConstraints.size());
}
// Drop SSRCs if less RIDs were offered than we have encoding constraints
if (mSsrcs.size() > max_streams) {
mSsrcs.resize(max_streams);
}
// For each stream make sure we have an encoding, and configure
// that encoding appropriately.
for (size_t i = 0; i < rids.size(); ++i) {
for (size_t i = 0; i < max_streams; ++i) {
if (i == negotiatedDetails->mEncodings.values.size()) {
negotiatedDetails->mEncodings.values.push_back(new JsepTrackEncoding);
}

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

@ -1084,7 +1084,9 @@ PeerConnectionImpl::ConfigureJsepSessionCodecs() {
// tests to work (it doesn't have a window available) we ifdef the following
// two implementations.
NS_IMETHODIMP
PeerConnectionImpl::EnsureDataConnection(uint16_t aNumstreams)
PeerConnectionImpl::EnsureDataConnection(uint16_t aLocalPort,
uint16_t aNumstreams,
uint32_t aMaxMessageSize)
{
PC_AUTO_ENTER_API_CALL(false);
@ -1096,7 +1098,7 @@ PeerConnectionImpl::EnsureDataConnection(uint16_t aNumstreams)
return NS_OK;
}
mDataConnection = new DataChannelConnection(this);
if (!mDataConnection->Init(5000, aNumstreams, true)) {
if (!mDataConnection->Init(aLocalPort, aNumstreams, true)) {
CSFLogError(logTag,"%s DataConnection Init Failed",__FUNCTION__);
return NS_ERROR_FAILURE;
}
@ -1110,6 +1112,7 @@ PeerConnectionImpl::GetDatachannelParameters(
uint32_t* channels,
uint16_t* localport,
uint16_t* remoteport,
uint32_t* remotemaxmessagesize,
uint16_t* level) const {
auto trackPairs = mJsepSession->GetNegotiatedTrackPairs();
@ -1162,6 +1165,8 @@ PeerConnectionImpl::GetDatachannelParameters(
static_cast<const JsepApplicationCodecDescription*>(codec)->mLocalPort;
*remoteport =
static_cast<const JsepApplicationCodecDescription*>(codec)->mRemotePort;
*remotemaxmessagesize = static_cast<const JsepApplicationCodecDescription*>
(codec)->mRemoteMaxMessageSize;
if (trackPair.HasBundleLevel()) {
*level = static_cast<uint16_t>(trackPair.BundleLevel());
} else {
@ -1175,6 +1180,7 @@ PeerConnectionImpl::GetDatachannelParameters(
*channels = 0;
*localport = 0;
*remoteport = 0;
*remotemaxmessagesize = 0;
*level = 0;
return NS_ERROR_FAILURE;
}
@ -1234,8 +1240,10 @@ PeerConnectionImpl::InitializeDataChannel()
uint32_t channels = 0;
uint16_t localport = 0;
uint16_t remoteport = 0;
uint32_t remotemaxmessagesize = 0;
uint16_t level = 0;
nsresult rv = GetDatachannelParameters(&channels, &localport, &remoteport, &level);
nsresult rv = GetDatachannelParameters(&channels, &localport, &remoteport,
&remotemaxmessagesize, &level);
if (NS_FAILED(rv)) {
CSFLogDebug(logTag, "%s: We did not negotiate datachannel", __FUNCTION__);
@ -1246,7 +1254,7 @@ PeerConnectionImpl::InitializeDataChannel()
channels = MAX_NUM_STREAMS;
}
rv = EnsureDataConnection(channels);
rv = EnsureDataConnection(localport, channels, remotemaxmessagesize);
if (NS_SUCCEEDED(rv)) {
// use the specified TransportFlow
RefPtr<TransportFlow> flow = mMedia->GetTransportFlow(level, false).get();
@ -1302,7 +1310,9 @@ PeerConnectionImpl::CreateDataChannel(const nsAString& aLabel,
DataChannelConnection::Type theType =
static_cast<DataChannelConnection::Type>(aType);
nsresult rv = EnsureDataConnection(WEBRTC_DATACHANNEL_STREAMS_DEFAULT);
nsresult rv = EnsureDataConnection(WEBRTC_DATACHANNEL_PORT_DEFAULT,
WEBRTC_DATACHANNEL_STREAMS_DEFAULT,
WEBRTC_DATACHANELL_MAX_MESSAGE_SIZE_DEFAULT);
if (NS_FAILED(rv)) {
return rv;
}

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

@ -646,7 +646,8 @@ private:
std::vector<uint8_t>* fingerprint) const;
nsresult ConfigureJsepSessionCodecs();
NS_IMETHODIMP EnsureDataConnection(uint16_t aNumstreams);
NS_IMETHODIMP EnsureDataConnection(uint16_t aLocalPort, uint16_t aNumstreams,
uint32_t aMaxMessageSize);
nsresult CloseInt();
nsresult CheckApiState(bool assert_ice_ready) const;
@ -679,6 +680,7 @@ private:
uint32_t* channels,
uint16_t* localport,
uint16_t* remoteport,
uint32_t* maxmessagesize,
uint16_t* level) const;
static void DeferredAddTrackToJsepSession(const std::string& pcHandle,

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

@ -64,7 +64,8 @@ public:
virtual const SdpRtcpFbAttributeList& GetRtcpFb() const = 0;
virtual const SdpRtpmapAttributeList& GetRtpmap() const = 0;
virtual const SdpSctpmapAttributeList& GetSctpmap() const = 0;
virtual unsigned int GetSctpPort() const = 0;
virtual uint32_t GetSctpPort() const = 0;
virtual uint32_t GetMaxMessageSize() const = 0;
virtual const SdpSsrcAttributeList& GetSsrc() const = 0;
virtual const SdpSsrcGroupAttributeList& GetSsrcGroup() const = 0;

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

@ -168,7 +168,7 @@ SdpHelper::DisableMsection(Sdp* sdp, SdpMediaSection* msection)
msection->AddCodec("120", "VP8", 90000, 1);
break;
case SdpMediaSection::kApplication:
msection->AddDataChannel("rejected", 0, 0);
msection->AddDataChannel("rejected", 0, 0, 0);
break;
default:
// We need to have something here to fit the grammar, this seems safe

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

@ -99,7 +99,7 @@ SdpMediaSection::GetSctpmap() const
return &sctpmap.GetFirstEntry();
}
int
uint32_t
SdpMediaSection::GetSctpPort() const
{
auto& attrs = GetAttributeList();
@ -107,8 +107,18 @@ SdpMediaSection::GetSctpPort() const
return 0;
}
uint32_t val = attrs.GetSctpPort();
return val;
return attrs.GetSctpPort();
}
uint32_t
SdpMediaSection::GetMaxMessageSize() const
{
auto& attrs = GetAttributeList();
if (!attrs.HasAttribute(SdpAttribute::kMaxMessageSizeAttribute)) {
return 0;
}
return attrs.GetMaxMessageSize();
}
bool

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

@ -96,8 +96,8 @@ public:
uint32_t clockrate, uint16_t channels) = 0;
virtual void ClearCodecs() = 0;
virtual void AddDataChannel(const std::string& name,
uint16_t port, uint16_t streams) = 0;
virtual void AddDataChannel(const std::string& name, uint16_t port,
uint16_t streams, uint32_t message_size) = 0;
size_t
GetLevel() const
@ -157,7 +157,8 @@ public:
void RemoveFmtp(const std::string& pt);
const SdpRtpmapAttributeList::Rtpmap* FindRtpmap(const std::string& pt) const;
const SdpSctpmapAttributeList::Sctpmap* GetSctpmap() const;
int GetSctpPort() const;
uint32_t GetSctpPort() const;
uint32_t GetMaxMessageSize() const;
bool HasRtcpFb(const std::string& pt,
SdpRtcpFbAttributeList::Type type,
const std::string& subType) const;

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

@ -1387,6 +1387,17 @@ SipccSdpAttributeList::GetSctpPort() const
return static_cast<const SdpNumberAttribute*>(attr)->mValue;
}
uint32_t
SipccSdpAttributeList::GetMaxMessageSize() const
{
if (!HasAttribute(SdpAttribute::kMaxMessageSizeAttribute)) {
MOZ_CRASH();
}
const SdpAttribute* attr = GetAttribute(SdpAttribute::kMaxMessageSizeAttribute);
return static_cast<const SdpNumberAttribute*>(attr)->mValue;
}
const SdpSetupAttribute&
SipccSdpAttributeList::GetSetup() const
{

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

@ -65,7 +65,8 @@ public:
virtual const SdpRtcpFbAttributeList& GetRtcpFb() const override;
virtual const SdpRtpmapAttributeList& GetRtpmap() const override;
virtual const SdpSctpmapAttributeList& GetSctpmap() const override;
virtual unsigned int GetSctpPort() const override;
virtual uint32_t GetSctpPort() const override;
virtual uint32_t GetMaxMessageSize() const override;
// These attributes are effectively simple types, so we'll make life
// easy by just returning their value.

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

@ -398,7 +398,7 @@ SipccSdpMediaSection::ClearCodecs()
void
SipccSdpMediaSection::AddDataChannel(const std::string& name, uint16_t port,
uint16_t streams)
uint16_t streams, uint32_t message_size)
{
// Only one allowed, for now. This may change as the specs (and deployments)
// evolve.
@ -409,6 +409,10 @@ SipccSdpMediaSection::AddDataChannel(const std::string& name, uint16_t port,
mFormats.push_back(name);
mAttributeList.SetAttribute(new SdpNumberAttribute(
SdpAttribute::kSctpPortAttribute, port));
if (message_size) {
mAttributeList.SetAttribute(new SdpNumberAttribute(
SdpAttribute::kMaxMessageSizeAttribute, message_size));
}
} else {
// old data channels format according to draft 05
std::string port_str = std::to_string(port);
@ -416,6 +420,11 @@ SipccSdpMediaSection::AddDataChannel(const std::string& name, uint16_t port,
SdpSctpmapAttributeList* sctpmap = new SdpSctpmapAttributeList();
sctpmap->PushEntry(port_str, name, streams);
mAttributeList.SetAttribute(sctpmap);
if (message_size) {
// This is a workaround to allow detecting Firefox's w/o EOR support
mAttributeList.SetAttribute(new SdpNumberAttribute(
SdpAttribute::kMaxMessageSizeAttribute, message_size));
}
}
}

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

@ -61,8 +61,8 @@ public:
uint32_t clockrate, uint16_t channels) override;
virtual void ClearCodecs() override;
virtual void AddDataChannel(const std::string& name,
uint16_t port, uint16_t streams) override;
virtual void AddDataChannel(const std::string& name, uint16_t port,
uint16_t streams, uint32_t message_size) override;
virtual void Serialize(std::ostream&) const override;

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

@ -16,8 +16,9 @@
#error "Unsupported compiler"
#endif
// Duplicated in fsm.def
#define WEBRTC_DATACHANNEL_STREAMS_DEFAULT 256
#define WEBRTC_DATACHANNEL_STREAMS_DEFAULT 256
#define WEBRTC_DATACHANNEL_PORT_DEFAULT 5000
#define WEBRTC_DATACHANELL_MAX_MESSAGE_SIZE_DEFAULT 65536
#define DATA_CHANNEL_PPID_CONTROL 50
#define DATA_CHANNEL_PPID_BINARY 52

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

@ -942,7 +942,7 @@ case "$target" in
# in the same library as dllimport caller. To work around it, we build NSPR
# and NSS with -mnop-fun-dllimport flag. The drawback of this solution is that
# function thunks need to be generated for cross-DLL calls.
MOZ_FOLD_LIBS_FLAGS=-mnop-fun-dllimport
MOZ_FOLD_LIBS_FLAGS="-mnop-fun-dllimport"
else
TARGET_COMPILER_ABI=msvc
if test "$AS_BIN"; then
@ -973,8 +973,7 @@ case "$target" in
CFLAGS="$CFLAGS -W3 -Gy -Zc:inline"
CXXFLAGS="$CXXFLAGS -W3 -Gy -Zc:inline"
if test -z "$CLANG_CL"; then
CFLAGS="$CFLAGS -utf-8"
CXXFLAGS="$CXXFLAGS -utf-8"
CPPFLAGS="$CPPFLAGS -utf-8"
fi
if test "$CPU_ARCH" = "x86"; then
dnl VS2012+ defaults to -arch:SSE2. We want to target nothing
@ -5351,7 +5350,7 @@ AC_SUBST(MOZ_DEVTOOLS)
AC_SUBST(MOZ_PACKAGE_JSSHELL)
AC_SUBST(MOZ_FOLD_LIBS)
AC_SUBST(MOZ_FOLD_LIBS_FLAGS)
AC_SUBST_LIST(MOZ_FOLD_LIBS_FLAGS)
AC_SUBST(SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE)
AC_SUBST(DMG_TOOL)

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

@ -144,7 +144,7 @@ class BuildProgressFooter(object):
def clear(self):
"""Removes the footer from the current terminal."""
self._fh.write(self._t.move_x(0))
self._fh.write(self._t.clear_eos())
self._fh.write(self._t.clear_eol())
def draw(self):
"""Draws this footer in the terminal."""
@ -1748,9 +1748,6 @@ class PackageFrontend(MachCommandBase):
for b in from_build:
user_value = b
if '/' not in b:
b = '{}/opt'.format(b)
if not b.startswith('toolchain-'):
b = 'toolchain-{}'.format(b)
@ -1760,8 +1757,8 @@ class PackageFrontend(MachCommandBase):
'Could not find a toolchain build named `{build}`')
return 1
optimized, task_id = optimize_task(task, {})
if not optimized:
task_id = optimize_task(task, {})
if task_id in (True, False):
self.log(logging.ERROR, 'artifact', {'build': user_value},
'Could not find artifacts for a toolchain build '
'named `{build}`')

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

@ -86,10 +86,10 @@ Please commit or stash these changes before vendoring, or re-run with `--ignore-
if os.path.exists('/usr/local/opt/openssl/include/openssl/ssl.h'):
# Found a likely homebrew install.
self.log(logging.INFO, 'openssl', {},
'Using OpenSSL in /usr/local/opt/openssl')
'Using OpenSSL in /usr/local/opt/openssl')
return {
'OPENSSL_INCLUDE_DIR': '/usr/local/opt/openssl/include',
'DEP_OPENSSL_INCLUDE': '/usr/local/opt/openssl/include',
'OPENSSL_INCLUDE_DIR': '/usr/local/opt/openssl/include',
'OPENSSL_LIB_DIR': '/usr/local/opt/openssl/lib',
}
self.log(logging.ERROR, 'openssl', {}, "OpenSSL not found!")

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

@ -12,18 +12,23 @@
# The NSS build system processes them using a series of sed replacements,
# but the Mozilla build system is already running a Python script to generate
# the file so it's simpler to just do the replacement in Python.
#
# One difference between the NSS build system and Mozilla's is that
# Mozilla's supports building on Linux for Windows using MinGW. MinGW
# expects all lines containing ;+ removed and all ;- tokens removed.
import buildconfig
def main(output, input):
is_darwin = buildconfig.substs['OS_ARCH'] == 'Darwin'
is_mingw = "WINNT" == buildconfig.substs['OS_ARCH'] and buildconfig.substs['GCC_USE_GNU_LD']
with open(input, 'rb') as f:
for line in f:
line = line.rstrip()
# Remove all lines containing ';-'
if ';-' in line:
# On everything except MinGW, remove all lines containing ';-'
if not is_mingw and ';-' in line:
continue
# On OS X, remove all lines containing ';+'
if is_darwin and ';+' in line:
@ -31,14 +36,15 @@ def main(output, input):
# Remove the string ' DATA '.
line = line.replace(' DATA ', '')
# Remove the string ';+'
line = line.replace(';+', '')
if not is_mingw:
line = line.replace(';+', '')
# Remove the string ';;'
line = line.replace(';;', '')
# If a ';' is present, remove everything after it,
# and on OS X, remove it as well.
i = line.find(';')
if i != -1:
if is_darwin:
if is_darwin or is_mingw:
line = line[:i]
else:
line = line[:i+1]

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

@ -1161,4 +1161,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
static const int32_t kUnknownId = -1;
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1504797564903000);
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1504884031179000);

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

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

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

@ -93,6 +93,8 @@ else:
# anyway.
if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
gyp_vars['cc_is_clang'] = 1
if CONFIG['GCC_USE_GNU_LD']:
gyp_vars['cc_use_gnu_ld'] = 1
GYP_DIRS += ['nss']
GYP_DIRS['nss'].input = 'nss/nss.gyp'
@ -113,6 +115,8 @@ else:
if CONFIG['CPU_ARCH'] == 'x86':
# This should really be the default.
sandbox_vars['ASFLAGS'] = ['-safeseh']
if CONFIG['MOZ_FOLD_LIBS_FLAGS']:
sandbox_vars['CFLAGS'] = CONFIG['MOZ_FOLD_LIBS_FLAGS']
if CONFIG['OS_TARGET'] == 'Android':
sandbox_vars['CFLAGS'] = [
'-include', TOPSRCDIR + '/security/manager/android_stub.h',

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

@ -23,11 +23,12 @@ use std::borrow::ToOwned;
use std::collections::LinkedList;
use std::mem;
use std::sync::Arc;
use style::computed_values::{line_height, text_rendering, text_transform};
use style::computed_values::{text_rendering, text_transform};
use style::computed_values::{word_break, white_space};
use style::logical_geometry::{LogicalSize, WritingMode};
use style::properties::ServoComputedValues;
use style::properties::style_structs;
use style::values::generics::text::LineHeight;
use unicode_bidi as bidi;
use unicode_script::{Script, get_script};
@ -165,8 +166,8 @@ impl TextRunScanner {
white_space::T::pre_line => CompressionMode::CompressWhitespace,
};
text_transform = inherited_text_style.text_transform;
letter_spacing = inherited_text_style.letter_spacing.0;
word_spacing = inherited_text_style.word_spacing.0
letter_spacing = inherited_text_style.letter_spacing;
word_spacing = inherited_text_style.word_spacing.value()
.map(|lop| lop.to_hash_key())
.unwrap_or((Au(0), NotNaN::new(0.0).unwrap()));
text_rendering = inherited_text_style.text_rendering;
@ -288,8 +289,8 @@ impl TextRunScanner {
// example, `finally` with a wide `letter-spacing` renders as `f i n a l l y` and not
// `fi n a l l y`.
let mut flags = ShapingFlags::empty();
match letter_spacing {
Some(Au(0)) | None => {}
match letter_spacing.value() {
Some(&Au(0)) | None => {}
Some(_) => flags.insert(IGNORE_LIGATURES_SHAPING_FLAG),
}
if text_rendering == text_rendering::T::optimizespeed {
@ -300,7 +301,7 @@ impl TextRunScanner {
flags.insert(KEEP_ALL_FLAG);
}
let options = ShapingOptions {
letter_spacing: letter_spacing,
letter_spacing: letter_spacing.value().cloned(),
word_spacing: word_spacing,
script: Script::Common,
flags: flags,
@ -447,9 +448,9 @@ pub fn font_metrics_for_style(font_context: &mut FontContext, font_style: ::Styl
pub fn line_height_from_style(style: &ServoComputedValues, metrics: &FontMetrics) -> Au {
let font_size = style.get_font().font_size;
match style.get_inheritedtext().line_height {
line_height::T::Normal => metrics.line_gap,
line_height::T::Number(l) => font_size.scale_by(l),
line_height::T::Length(l) => l
LineHeight::Normal => metrics.line_gap,
LineHeight::Number(l) => font_size.scale_by(l),
LineHeight::Length(l) => l
}
}

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

@ -646,7 +646,7 @@ impl LayoutElementHelpers for LayoutJS<Element> {
};
if let Some(border) = border {
let width_value = specified::BorderWidth::from_length(specified::Length::from_px(border as f32));
let width_value = specified::BorderSideWidth::Length(specified::Length::from_px(border as f32));
hints.push(from_declaration(
shared_lock,
PropertyDeclaration::BorderTopWidth(width_value.clone())));

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

@ -7,7 +7,6 @@
use context::QuirksMode;
use cssparser::{Parser, SourcePosition, UnicodeRange};
use error_reporting::ParseErrorReporter;
use parking_lot::RwLock;
use style_traits::OneOrMoreCommaSeparated;
use stylesheets::{CssRuleType, Origin, UrlExtraData, Namespaces};
@ -82,8 +81,8 @@ pub struct ParserContext<'a> {
pub parsing_mode: ParsingMode,
/// The quirks mode of this stylesheet.
pub quirks_mode: QuirksMode,
/// The list of all namespaces active in the current stylesheet
pub namespaces: Option<&'a RwLock<Namespaces>>,
/// The currently active namespaces.
pub namespaces: Option<&'a Namespaces>,
}
impl<'a> ParserContext<'a> {
@ -108,19 +107,21 @@ impl<'a> ParserContext<'a> {
}
/// Create a parser context for on-the-fly parsing in CSSOM
pub fn new_for_cssom(url_data: &'a UrlExtraData,
error_reporter: &'a ParseErrorReporter,
rule_type: Option<CssRuleType>,
parsing_mode: ParsingMode,
quirks_mode: QuirksMode)
-> ParserContext<'a> {
pub fn new_for_cssom(
url_data: &'a UrlExtraData,
error_reporter: &'a ParseErrorReporter,
rule_type: Option<CssRuleType>,
parsing_mode: ParsingMode,
quirks_mode: QuirksMode
) -> ParserContext<'a> {
Self::new(Origin::Author, url_data, error_reporter, rule_type, parsing_mode, quirks_mode)
}
/// Create a parser context based on a previous context, but with a modified rule type.
pub fn new_with_rule_type(context: &'a ParserContext,
rule_type: Option<CssRuleType>)
-> ParserContext<'a> {
pub fn new_with_rule_type(
context: &'a ParserContext,
rule_type: Option<CssRuleType>
) -> ParserContext<'a> {
ParserContext {
stylesheet_origin: context.stylesheet_origin,
url_data: context.url_data,
@ -134,13 +135,14 @@ impl<'a> ParserContext<'a> {
}
/// Create a parser context for inline CSS which accepts additional line offset argument.
pub fn new_with_line_number_offset(stylesheet_origin: Origin,
url_data: &'a UrlExtraData,
error_reporter: &'a ParseErrorReporter,
line_number_offset: u64,
parsing_mode: ParsingMode,
quirks_mode: QuirksMode)
-> ParserContext<'a> {
pub fn new_with_line_number_offset(
stylesheet_origin: Origin,
url_data: &'a UrlExtraData,
error_reporter: &'a ParseErrorReporter,
line_number_offset: u64,
parsing_mode: ParsingMode,
quirks_mode: QuirksMode
) -> ParserContext<'a> {
ParserContext {
stylesheet_origin: stylesheet_origin,
url_data: url_data,

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

@ -257,22 +257,30 @@ impl PropertyDeclarationBlock {
}
/// Adds or overrides the declaration for a given property in this block,
/// **except** if an existing declaration for the same property is more important.
/// **except** if an existing declaration for the same property is more
/// important.
///
/// Always ensures that the property declaration is at the end.
pub fn extend(&mut self, drain: SourcePropertyDeclarationDrain, importance: Importance) {
self.extend_common(drain, importance, false);
}
/// Adds or overrides the declaration for a given property in this block,
/// **even** if an existing declaration for the same property is more important.
/// **even** if an existing declaration for the same property is more
/// important, and reuses the same position in the block.
///
/// Return whether anything changed.
/// Returns whether anything changed.
pub fn extend_reset(&mut self, drain: SourcePropertyDeclarationDrain,
importance: Importance) -> bool {
self.extend_common(drain, importance, true)
}
fn extend_common(&mut self, mut drain: SourcePropertyDeclarationDrain,
importance: Importance, overwrite_more_important: bool) -> bool {
fn extend_common(
&mut self,
mut drain: SourcePropertyDeclarationDrain,
importance: Importance,
overwrite_more_important_and_reuse_slot: bool,
) -> bool {
let all_shorthand_len = match drain.all_shorthand {
AllShorthand::NotSet => 0,
AllShorthand::CSSWideKeyword(_) |
@ -285,20 +293,32 @@ impl PropertyDeclarationBlock {
let mut changed = false;
for decl in &mut drain.declarations {
changed |= self.push_common(decl, importance, overwrite_more_important);
changed |= self.push_common(
decl,
importance,
overwrite_more_important_and_reuse_slot,
);
}
match drain.all_shorthand {
AllShorthand::NotSet => {}
AllShorthand::CSSWideKeyword(keyword) => {
for &id in ShorthandId::All.longhands() {
let decl = PropertyDeclaration::CSSWideKeyword(id, keyword);
changed |= self.push_common(decl, importance, overwrite_more_important);
changed |= self.push_common(
decl,
importance,
overwrite_more_important_and_reuse_slot,
);
}
}
AllShorthand::WithVariables(unparsed) => {
for &id in ShorthandId::All.longhands() {
let decl = PropertyDeclaration::WithVariables(id, unparsed.clone());
changed |= self.push_common(decl, importance, overwrite_more_important);
changed |= self.push_common(
decl,
importance,
overwrite_more_important_and_reuse_slot,
);
}
}
}
@ -306,28 +326,38 @@ impl PropertyDeclarationBlock {
}
/// Adds or overrides the declaration for a given property in this block,
/// **except** if an existing declaration for the same property is more important.
/// **except** if an existing declaration for the same property is more
/// important.
///
/// Ensures that, if inserted, it's inserted at the end of the declaration
/// block.
pub fn push(&mut self, declaration: PropertyDeclaration, importance: Importance) {
self.push_common(declaration, importance, false);
}
fn push_common(&mut self, declaration: PropertyDeclaration, importance: Importance,
overwrite_more_important: bool) -> bool {
fn push_common(
&mut self,
declaration: PropertyDeclaration,
importance: Importance,
overwrite_more_important_and_reuse_slot: bool
) -> bool {
let definitely_new = if let PropertyDeclarationId::Longhand(id) = declaration.id() {
!self.longhands.contains(id)
} else {
false // For custom properties, always scan
};
if !definitely_new {
for slot in &mut *self.declarations {
let mut index_to_remove = None;
for (i, slot) in self.declarations.iter_mut().enumerate() {
if slot.0.id() == declaration.id() {
match (slot.1, importance) {
(Importance::Normal, Importance::Important) => {
self.important_count += 1;
}
(Importance::Important, Importance::Normal) => {
if overwrite_more_important {
if overwrite_more_important_and_reuse_slot {
self.important_count -= 1;
} else {
return false
@ -337,10 +367,25 @@ impl PropertyDeclarationBlock {
return false;
}
}
*slot = (declaration, importance);
return true
if overwrite_more_important_and_reuse_slot {
*slot = (declaration, importance);
return true;
}
// NOTE(emilio): We could avoid this and just override for
// properties not affected by logical props, but it's not
// clear it's worth it given the `definitely_new` check.
index_to_remove = Some(i);
break;
}
}
if let Some(index) = index_to_remove {
self.declarations.remove(index);
self.declarations.push((declaration, importance));
return true;
}
}
if let PropertyDeclarationId::Longhand(id) = declaration.id() {

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

@ -998,17 +998,17 @@ fn static_assert() {
}
pub fn set_border_image_width(&mut self, v: longhands::border_image_width::computed_value::T) {
use values::generics::border::BorderImageWidthSide;
use values::generics::border::BorderImageSideWidth;
% for side in SIDES:
match v.${side.index} {
BorderImageWidthSide::Auto => {
BorderImageSideWidth::Auto => {
self.gecko.mBorderImageWidth.data_at_mut(${side.index}).set_value(CoordDataValue::Auto)
},
BorderImageWidthSide::Length(l) => {
BorderImageSideWidth::Length(l) => {
l.to_gecko_style_coord(&mut self.gecko.mBorderImageWidth.data_at_mut(${side.index}))
},
BorderImageWidthSide::Number(n) => {
BorderImageSideWidth::Number(n) => {
self.gecko.mBorderImageWidth.data_at_mut(${side.index}).set_value(CoordDataValue::Factor(n))
},
}
@ -3637,65 +3637,64 @@ fn static_assert() {
}
pub fn set_line_height(&mut self, v: longhands::line_height::computed_value::T) {
use properties::longhands::line_height::computed_value::T;
use values::generics::text::LineHeight;
// FIXME: Align binary representations and ditch |match| for cast + static_asserts
let en = match v {
T::Normal => CoordDataValue::Normal,
T::Length(val) => CoordDataValue::Coord(val.0),
T::Number(val) => CoordDataValue::Factor(val),
T::MozBlockHeight =>
LineHeight::Normal => CoordDataValue::Normal,
LineHeight::Length(val) => CoordDataValue::Coord(val.0),
LineHeight::Number(val) => CoordDataValue::Factor(val),
LineHeight::MozBlockHeight =>
CoordDataValue::Enumerated(structs::NS_STYLE_LINE_HEIGHT_BLOCK_HEIGHT),
};
self.gecko.mLineHeight.set_value(en);
}
pub fn clone_line_height(&self) -> longhands::line_height::computed_value::T {
use properties::longhands::line_height::computed_value::T;
use values::generics::text::LineHeight;
return match self.gecko.mLineHeight.as_value() {
CoordDataValue::Normal => T::Normal,
CoordDataValue::Coord(coord) => T::Length(Au(coord)),
CoordDataValue::Factor(n) => T::Number(n),
CoordDataValue::Normal => LineHeight::Normal,
CoordDataValue::Coord(coord) => LineHeight::Length(Au(coord)),
CoordDataValue::Factor(n) => LineHeight::Number(n),
CoordDataValue::Enumerated(val) if val == structs::NS_STYLE_LINE_HEIGHT_BLOCK_HEIGHT =>
T::MozBlockHeight,
_ => {
debug_assert!(false);
T::MozBlockHeight
}
LineHeight::MozBlockHeight,
_ => panic!("this should not happen"),
}
}
<%call expr="impl_coord_copy('line_height', 'mLineHeight')"></%call>
pub fn set_letter_spacing(&mut self, v: longhands::letter_spacing::computed_value::T) {
match v.0 {
Some(au) => self.gecko.mLetterSpacing.set(au),
None => self.gecko.mLetterSpacing.set_value(CoordDataValue::Normal)
use values::generics::text::Spacing;
match v {
Spacing::Value(value) => self.gecko.mLetterSpacing.set(value),
Spacing::Normal => self.gecko.mLetterSpacing.set_value(CoordDataValue::Normal)
}
}
pub fn clone_letter_spacing(&self) -> longhands::letter_spacing::computed_value::T {
use properties::longhands::letter_spacing::computed_value::T;
use values::generics::text::Spacing;
debug_assert!(
matches!(self.gecko.mLetterSpacing.as_value(),
CoordDataValue::Normal |
CoordDataValue::Coord(_)),
"Unexpected computed value for letter-spacing");
T(Au::from_gecko_style_coord(&self.gecko.mLetterSpacing))
Au::from_gecko_style_coord(&self.gecko.mLetterSpacing).map_or(Spacing::Normal, Spacing::Value)
}
<%call expr="impl_coord_copy('letter_spacing', 'mLetterSpacing')"></%call>
pub fn set_word_spacing(&mut self, v: longhands::word_spacing::computed_value::T) {
match v.0 {
Some(lop) => self.gecko.mWordSpacing.set(lop),
use values::generics::text::Spacing;
match v {
Spacing::Value(lop) => self.gecko.mWordSpacing.set(lop),
// https://drafts.csswg.org/css-text-3/#valdef-word-spacing-normal
None => self.gecko.mWordSpacing.set_value(CoordDataValue::Coord(0)),
Spacing::Normal => self.gecko.mWordSpacing.set_value(CoordDataValue::Coord(0)),
}
}
pub fn clone_word_spacing(&self) -> longhands::word_spacing::computed_value::T {
use properties::longhands::word_spacing::computed_value::T;
use values::computed::LengthOrPercentage;
use values::generics::text::Spacing;
debug_assert!(
matches!(self.gecko.mWordSpacing.as_value(),
CoordDataValue::Normal |
@ -3703,7 +3702,7 @@ fn static_assert() {
CoordDataValue::Percent(_) |
CoordDataValue::Calc(_)),
"Unexpected computed value for word-spacing");
T(LengthOrPercentage::from_gecko_style_coord(&self.gecko.mWordSpacing))
LengthOrPercentage::from_gecko_style_coord(&self.gecko.mWordSpacing).map_or(Spacing::Normal, Spacing::Value)
}
<%call expr="impl_coord_copy('word_spacing', 'mWordSpacing')"></%call>

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