Merge mozilla-central to autoland. a=merge CLOSED TREE

This commit is contained in:
Gurzau Raul 2018-10-10 01:02:56 +03:00
Родитель 0811112d77 b85cacc85f
Коммит 342b8a145e
20 изменённых файлов: 216 добавлений и 128 удалений

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

@ -41,6 +41,9 @@ var gExceptionPaths = [
// Exclude all search-plugins because they aren't referenced by filename
"resource://search-plugins/",
// This is only in Nightly, and accessed using a direct chrome URL
"chrome://browser/content/aboutconfig/",
];
// These are not part of the omni.ja file, so we find them only when running

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

@ -0,0 +1,5 @@
/* 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/. */
/* aboutconfig.css */

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

@ -0,0 +1,20 @@
<!-- 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/. -->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" media="screen, projection" type="text/css"
href="chrome://global/skin/in-content/common.css"/>
<link rel="stylesheet" type="text/css"
href="chrome://browser/content/aboutconfig/aboutconfig.css"/>
<script type="application/javascript"
src="chrome://browser/content/aboutconfig/aboutconfig.js"></script>
<title>about:config</title>
</head>
<body>
</body>
</html>

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

@ -0,0 +1,5 @@
/* 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/. */
/* aboutconfig.js */

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

@ -0,0 +1,8 @@
# 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/.
browser.jar:
content/browser/aboutconfig/aboutconfig.css (content/aboutconfig.css)
content/browser/aboutconfig/aboutconfig.html (content/aboutconfig.html)
content/browser/aboutconfig/aboutconfig.js (content/aboutconfig.js)

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

@ -0,0 +1,9 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
JAR_MANIFESTS += ['jar.mn']

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

@ -0,0 +1,7 @@
"use strict";
module.exports = {
"extends": [
"plugin:mozilla/browser-test",
],
};

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

@ -0,0 +1,3 @@
[DEFAULT]
[browser_basic.js]

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

@ -0,0 +1,14 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
add_task(async function test_load_title() {
await BrowserTestUtils.withNewTab({
gBrowser,
url: "chrome://browser/content/aboutconfig/aboutconfig.html",
}, browser => {
info("about:config loaded");
return ContentTask.spawn(browser, null, () => {
Assert.equal(content.document.title, "about:config");
});
});
});

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

@ -59,7 +59,10 @@ DIRS += [
DIRS += ['build']
if CONFIG['NIGHTLY_BUILD']:
DIRS += ['payments']
DIRS += [
'aboutconfig',
'payments',
]
XPIDL_SOURCES += [
'nsIBrowserHandler.idl',

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

@ -6,6 +6,7 @@
const { ADBScanner } = require("devtools/shared/adb/adb-scanner");
loader.lazyRequireGetter(this, "adbAddon", "devtools/shared/adb/adb-addon", true);
loader.lazyRequireGetter(this, "ADB_ADDON_STATES", "devtools/shared/adb/adb-addon", true);
/**
* This module provides a collection of helper methods to detect USB runtimes whom Firefox
@ -22,7 +23,7 @@ function disableUSBRuntimes() {
exports.disableUSBRuntimes = disableUSBRuntimes;
async function enableUSBRuntimes() {
if (adbAddon.status !== "installed") {
if (adbAddon.status !== ADB_ADDON_STATES.INSTALLED) {
console.error("ADB extension is not installed");
return;
}

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

@ -12,6 +12,7 @@ const {ADBScanner} = require("devtools/shared/adb/adb-scanner");
const {RuntimeScanners} = require("devtools/client/webide/modules/runtimes");
loader.lazyRequireGetter(this, "adbAddon", "devtools/shared/adb/adb-addon", true);
loader.lazyRequireGetter(this, "ADB_ADDON_STATES", "devtools/shared/adb/adb-addon", true);
window.addEventListener("load", function() {
document.querySelector("#aboutaddons").onclick = function() {
@ -33,9 +34,9 @@ function BuildUI() {
progress.removeAttribute("value");
li.setAttribute("status", adbAddon.status);
status.textContent = Strings.GetStringFromName("addons_status_" + adbAddon.status);
if (adbAddon.status == "installed") {
if (adbAddon.status == ADB_ADDON_STATES.INSTALLED) {
RuntimeScanners.add(ADBScanner);
} else if (adbAddon.status == "uninstalled") {
} else if (adbAddon.status == ADB_ADDON_STATES.UNINSTALLED) {
RuntimeScanners.remove(ADBScanner);
}
}

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

@ -14,62 +14,86 @@ const ADB_ADDON_ID = Services.prefs.getCharPref("devtools.remote.adb.extensionID
// Extension ID for adb helper extension that might be installed on Firefox 63 or older.
const OLD_ADB_ADDON_ID = "adbhelper@mozilla.org";
const platform = Services.appShell.hiddenDOMWindow.navigator.platform;
let OS = "";
if (platform.includes("Win")) {
OS = "win32";
} else if (platform.includes("Mac")) {
OS = "mac64";
} else if (platform.includes("Linux")) {
if (platform.includes("x86_64")) {
OS = "linux64";
} else {
OS = "linux32";
// Possible values for ADBAddon::state. WebIDE relies on the exact values for localization
// and styles, so they should not be updated until WebIDE is removed.
const ADB_ADDON_STATES = {
DOWNLOADING: "downloading",
INSTALLED: "installed",
INSTALLING: "installing",
PREPARING: "preparing",
UNINSTALLED: "uninstalled",
UNKNOWN: "unknown",
};
exports.ADB_ADDON_STATES = ADB_ADDON_STATES;
/**
* Wrapper around the ADB Extension providing ADB binaries for devtools remote debugging.
* Fires the following events:
* - "update": the status of the addon was updated
* - "failure": addon installation failed
* - "progress": addon download in progress
*
* AdbAddon::state can take any of the values from ADB_ADDON_STATES.
*/
class ADBAddon extends EventEmitter {
constructor() {
super();
this._status = ADB_ADDON_STATES.UNKNOWN;
// Uninstall old version of the extension that might be installed on this profile.
this.uninstallOldExtension();
const addonsListener = {};
addonsListener.onEnabled =
addonsListener.onDisabled =
addonsListener.onInstalled =
addonsListener.onUninstalled = () => this.updateInstallStatus();
AddonManager.addAddonListener(addonsListener);
this.updateInstallStatus();
}
}
function ADBAddon() {
EventEmitter.decorate(this);
this._status = "unknown";
// This addon uses the string "linux" for "linux32"
const fixedOS = OS == "linux32" ? "linux" : OS;
this.xpiLink = ADB_LINK.replace(/#OS#/g, fixedOS);
// Uninstall old version of the extension that might be installed on this profile.
this.uninstallOldExtension();
this.updateInstallStatus();
const addonsListener = {};
addonsListener.onEnabled =
addonsListener.onDisabled =
addonsListener.onInstalled =
addonsListener.onUninstalled = () => this.updateInstallStatus();
AddonManager.addAddonListener(addonsListener);
}
ADBAddon.prototype = {
set status(value) {
if (this._status != value) {
this._status = value;
this.emit("update");
}
},
}
get status() {
return this._status;
},
}
updateInstallStatus: async function() {
async updateInstallStatus() {
const addon = await AddonManager.getAddonByID(ADB_ADDON_ID);
if (addon && !addon.userDisabled) {
this.status = "installed";
this.status = ADB_ADDON_STATES.INSTALLED;
} else {
this.status = "uninstalled";
this.status = ADB_ADDON_STATES.UNINSTALLED;
}
},
}
/**
* Returns the platform specific download link for the ADB extension.
*/
_getXpiLink() {
const platform = Services.appShell.hiddenDOMWindow.navigator.platform;
let OS = "";
if (platform.includes("Win")) {
OS = "win32";
} else if (platform.includes("Mac")) {
OS = "mac64";
} else if (platform.includes("Linux")) {
if (platform.includes("x86_64")) {
OS = "linux64";
} else {
OS = "linux";
}
}
return ADB_LINK.replace(/#OS#/g, OS);
}
/**
* Install and enable the adb extension. Returns a promise that resolves when ADB is
@ -78,18 +102,18 @@ ADBAddon.prototype = {
* @param {String} source
* String passed to the AddonManager for telemetry.
*/
install: async function(source) {
async install(source) {
const addon = await AddonManager.getAddonByID(ADB_ADDON_ID);
if (addon && !addon.userDisabled) {
this.status = "installed";
this.status = ADB_ADDON_STATES.INSTALLED;
return;
}
this.status = "preparing";
this.status = ADB_ADDON_STATES.PREPARING;
if (addon && addon.userDisabled) {
await addon.enable();
} else {
const install = await AddonManager.getInstallForURL(
this.xpiLink,
this._getXpiLink(),
"application/x-xpinstall",
null, null, null, null, null,
{ source }
@ -97,57 +121,68 @@ ADBAddon.prototype = {
install.addListener(this);
install.install();
}
},
}
uninstall: async function() {
async uninstall() {
const addon = await AddonManager.getAddonByID(ADB_ADDON_ID);
addon.uninstall();
},
}
uninstallOldExtension: async function() {
async uninstallOldExtension() {
const oldAddon = await AddonManager.getAddonByID(OLD_ADB_ADDON_ID);
if (oldAddon) {
oldAddon.uninstall();
}
},
}
installFailureHandler: function(install, message) {
this.status = "uninstalled";
installFailureHandler(install, message) {
this.status = ADB_ADDON_STATES.UNINSTALLED;
this.emit("failure", message);
},
}
onDownloadStarted: function() {
this.status = "downloading";
},
// Expected AddonManager install listener.
onDownloadStarted() {
this.status = ADB_ADDON_STATES.DOWNLOADING;
}
onInstallStarted: function() {
this.status = "installing";
},
onDownloadProgress: function(install) {
// Expected AddonManager install listener.
onDownloadProgress(install) {
if (install.maxProgress == -1) {
this.emit("progress", -1);
} else {
this.emit("progress", install.progress / install.maxProgress);
}
},
}
onInstallEnded: function({addon}) {
addon.enable();
},
onDownloadCancelled: function(install) {
// Expected AddonManager install listener.
onDownloadCancelled(install) {
this.installFailureHandler(install, "Download cancelled");
},
onDownloadFailed: function(install) {
}
// Expected AddonManager install listener.
onDownloadFailed(install) {
this.installFailureHandler(install, "Download failed");
},
onInstallCancelled: function(install) {
}
// Expected AddonManager install listener.
onInstallStarted() {
this.status = ADB_ADDON_STATES.INSTALLING;
}
// Expected AddonManager install listener.
onInstallCancelled(install) {
this.installFailureHandler(install, "Install cancelled");
},
onInstallFailed: function(install) {
}
// Expected AddonManager install listener.
onInstallFailed(install) {
this.installFailureHandler(install, "Install failed");
},
};
}
// Expected AddonManager install listener.
onInstallEnded({addon}) {
addon.enable();
}
}
exports.adbAddon = new ADBAddon();

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

@ -6,13 +6,13 @@
const { require } = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {});
const EventEmitter = require("devtools/shared/event-emitter");
const { adbAddon } = require("devtools/shared/adb/adb-addon");
const { adbAddon, ADB_ADDON_STATES } = require("devtools/shared/adb/adb-addon");
/* exported EXPORTED_SYMBOLS */
const EXPORTED_SYMBOLS = ["Devices"];
var addonInstalled = adbAddon.status === "installed";
var addonInstalled = adbAddon.status === ADB_ADDON_STATES.INSTALLED;
const Devices = {
_devices: {},
@ -49,7 +49,7 @@ const Devices = {
},
updateAdbAddonStatus: function() {
this.adbExtensionInstalled = adbAddon.status === "installed";
this.adbExtensionInstalled = adbAddon.status === ADB_ADDON_STATES.INSTALLED;
},
};

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

@ -162,39 +162,15 @@ ClipManager::BeginItem(nsDisplayItem* aItem,
// some overhead further down the pipeline.
bool separateLeaf = false;
if (clip && clip->mASR == asr && clip->mClip.GetRoundedRectCount() == 0) {
switch (type) {
case DisplayItemType::TYPE_BLEND_CONTAINER:
case DisplayItemType::TYPE_BLEND_MODE:
case DisplayItemType::TYPE_FILTER:
case DisplayItemType::TYPE_FIXED_POSITION:
case DisplayItemType::TYPE_MASK:
case DisplayItemType::TYPE_OPACITY:
case DisplayItemType::TYPE_OWN_LAYER:
case DisplayItemType::TYPE_PERSPECTIVE:
case DisplayItemType::TYPE_RESOLUTION:
case DisplayItemType::TYPE_SCROLL_INFO_LAYER:
case DisplayItemType::TYPE_STICKY_POSITION:
case DisplayItemType::TYPE_SUBDOCUMENT:
case DisplayItemType::TYPE_SVG_WRAPPER:
case DisplayItemType::TYPE_TABLE_BLEND_CONTAINER:
case DisplayItemType::TYPE_TABLE_BLEND_MODE:
case DisplayItemType::TYPE_TABLE_FIXED_POSITION:
case DisplayItemType::TYPE_TRANSFORM:
case DisplayItemType::TYPE_WRAP_LIST:
// Container display items are not currently supported because the clip
// rect of a stacking context is not handled the same as normal display
// items.
break;
case DisplayItemType::TYPE_TEXT:
// Text with shadows interprets the text display item clip rect and
// clips from the clip chain differently.
if (aItem->Frame()->StyleText()->HasTextShadow()) {
break;
}
MOZ_FALLTHROUGH;
default:
separateLeaf = true;
break;
if (type == DisplayItemType::TYPE_TEXT) {
// Text with shadows interprets the text display item clip rect and
// clips from the clip chain differently.
separateLeaf = !aItem->Frame()->StyleText()->HasTextShadow();
} else {
// Container display items are not currently supported because the clip
// rect of a stacking context is not handled the same as normal display
// items.
separateLeaf = aItem->GetChildren() == nullptr;
}
}

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

@ -51,6 +51,8 @@ transform(qcms_profile* src_profile, qcms_profile* dst_profile, size_t size)
static uint8_t src[] = {
0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, 0xFF, 0x7F, 0x10, 0x20, 0x30,
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0xBF, 0xEF, 0x6F,
0x3F, 0xC0, 0x9F, 0xE0, 0x90, 0xCF, 0x40, 0xAF, 0x0F, 0x01, 0x60, 0xF0,
};
static uint8_t dst[sizeof(src) * 4]; // 4x in case of GRAY to RGBA

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

@ -444,13 +444,9 @@ struct JSContext : public JS::RootingContext,
}
#endif
private:
/* Space for interpreter frames. */
js::ThreadData<js::InterpreterStack> interpreterStack_;
public:
js::InterpreterStack& interpreterStack() {
return interpreterStack_.ref();
return runtime()->interpreterStack();
}
/* Base address of the native stack for the current thread. */

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

@ -230,7 +230,14 @@ struct JSRuntime : public js::MallocProvider<JSRuntime>
friend class js::jit::JitActivation;
friend class js::jit::CompileRuntime;
/* Space for interpreter frames. */
js::MainThreadData<js::InterpreterStack> interpreterStack_;
public:
js::InterpreterStack& interpreterStack() {
return interpreterStack_.ref();
}
/*
* If non-null, another runtime guaranteed to outlive this one and whose
* permanent data may be used by this one where possible.

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

@ -181,17 +181,11 @@ VARCACHE_PREF(
// If this is true, "keypress" event's keyCode value and charCode value always
// become same if the event is not created/initialized by JS.
#ifdef RELEASE_OR_BETA
# define PREF_VALUE false
#else
# define PREF_VALUE true
#endif
VARCACHE_PREF(
"dom.keyboardevent.keypress.set_keycode_and_charcode_to_same_value",
dom_keyboardevent_keypress_set_keycode_and_charcode_to_same_value,
bool, PREF_VALUE
bool, false
)
#undef PREF_VALUE
// NOTE: This preference is used in unit tests. If it is removed or its default
// value changes, please update test_sharedMap_var_caches.js accordingly.

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

@ -10,5 +10,4 @@
[PaymentRequest's id attribute must be a UUID when PaymentDetailsInit.id is missing]
expected:
if not e10s: FAIL
if (os == "mac"): FAIL