Merge m-c to inbound, a=merge

This commit is contained in:
Wes Kocher 2017-04-04 11:28:06 -07:00
commit 208190c049
62 changed files with 19002 additions and 19604 deletions

File diff suppressed because it is too large Load Diff

View File

@ -4,10 +4,13 @@
%include ../../shared/controlcenter/panel.inc.css
.identity-popup-expander:-moz-focusring {
padding: 1px;
.identity-popup-expander > .button-box,
.identity-popup-permission-remove-button > .button-box {
-moz-appearance: none;
}
.identity-popup-expander:-moz-focusring > .button-box {
.identity-popup-expander:-moz-focusring,
.identity-popup-permission-remove-button:-moz-focusring {
outline: 1px -moz-dialogtext dotted;
outline-offset: -1px;
}

View File

@ -228,7 +228,6 @@ menuitem[cmd="cmd_clearhistory"][disabled] {
}
.searchbar-engine-one-off-item > .button-box {
border: none;
padding: 0;
}

View File

@ -9,14 +9,7 @@
margin-top: 1px;
}
.identity-popup-expander:-moz-focusring {
padding: 2px;
}
.identity-popup-expander:-moz-focusring > .button-box {
box-shadow: var(--focus-ring-box-shadow);
}
.identity-popup-expander:-moz-focusring,
.identity-popup-permission-remove-button:-moz-focusring {
box-shadow: var(--focus-ring-box-shadow);
}

View File

@ -141,14 +141,10 @@
.identity-popup-expander > .button-box {
padding: 0;
-moz-appearance: none;
border-style: none;
border-left: 1px solid var(--panel-separator-color);
}
.identity-popup-expander:-moz-focusring > .button-box,
.identity-popup-expander[panel-multiview-anchor] > .button-box {
border-style: none;
.identity-popup-expander:not([panel-multiview-anchor]) > .button-box {
border-left: 1px solid var(--panel-separator-color);
}
.identity-popup-expander:hover {
@ -415,7 +411,6 @@ description#identity-popup-content-verifier,
.identity-popup-permission-remove-button > .button-box {
padding: 0;
-moz-appearance: none;
}
.identity-popup-permission-remove-button > .button-box > .button-icon {

View File

@ -80,10 +80,13 @@
padding: 0 18px;
}
.downloadButton:-moz-focusring {
-moz-outline-radius: 50%;
}
.downloadButton > .button-box {
-moz-appearance: none;
padding: 2px !important;
border-radius: 50%;
}
.downloadButton > .button-box > .button-icon {

View File

@ -90,8 +90,6 @@
.downloadsPanelFooterButton > .button-box {
padding: 0;
margin: 0;
border: none;
}
#downloadsHistory {

View File

@ -111,6 +111,6 @@ window[sharingscreen][sharingaudio] > #shareSeparator {
}
:-moz-any(#audioVideoButton, #screenShareButton,
#firefoxButton):-moz-focusring > .button-box {
border: none;
#firefoxButton):-moz-focusring {
outline: none;
}

View File

@ -4,10 +4,3 @@
%include ../../shared/controlcenter/panel.inc.css
.identity-popup-expander:-moz-focusring {
padding: 1px;
}
.identity-popup-expander:-moz-focusring > .button-box {
outline: 1px -moz-dialogtext dotted;
}

View File

@ -6,14 +6,13 @@
/*** Panel and outer controls ***/
@keyfocus@ #downloadsSummary:focus,
@keyfocus@ .downloadsPanelFooterButton:focus {
outline: 1px -moz-dialogtext dotted;
outline-offset: -1px;
#downloadsSummary:-moz-focusring {
outline-offset: -5px;
}
@keyfocus@ #downloadsSummary:focus {
outline-offset: -5px;
@notKeyfocus@ #downloadsSummary:-moz-focusring,
@notKeyfocus@ .downloadsPanelFooterButton:-moz-focusring {
outline: none;
}
/*** List items and similar elements in the summary ***/
@ -24,12 +23,8 @@
--downloads-item-details-opacity: 0.6;
}
.downloadButton > .button-box {
border: 1px solid transparent;
}
@keyfocus@ .downloadButton:focus > .button-box {
border: 1px dotted ThreeDDarkShadow;
@notKeyfocus@ .downloadButton:-moz-focusring {
outline: none;
}
@media (-moz-windows-default-theme) {

View File

@ -206,6 +206,10 @@
border-bottom: 1px solid var(--panel-separator-color);
}
.searchbar-engine-one-off-item:-moz-focusring {
outline: none;
}
.search-setting-button-compact {
border-bottom: none !important;
}
@ -225,7 +229,6 @@
}
.searchbar-engine-one-off-item > .button-box {
border: none;
padding: 0;
}

View File

@ -19,6 +19,7 @@ if CONFIG['OS_ARCH'] == 'Linux':
DEFINES.update(
LINUX=True,
HAVE_FCNTL_FILE_LOCKING=True,
HAVE_POINTER_LOCALTIME_R=True,
_GNU_SOURCE=True,
)
SOURCES += ['/nsprpub/pr/src/md/unix/linux.c']
@ -33,6 +34,7 @@ elif CONFIG['OS_TARGET'] in ('FreeBSD', 'OpenBSD', 'NetBSD'):
DEFINES.update(
HAVE_BSD_FLOCK=True,
HAVE_SOCKLEN_T=True,
HAVE_POINTER_LOCALTIME_R=True,
)
DEFINES[CONFIG['OS_TARGET'].upper()] = True
SOURCES += ['/nsprpub/pr/src/md/unix/%s.c' % CONFIG['OS_TARGET'].lower()]
@ -42,6 +44,7 @@ elif CONFIG['OS_TARGET'] == 'Darwin':
DARWIN=True,
HAVE_BSD_FLOCK=True,
HAVE_SOCKLEN_T=True,
HAVE_POINTER_LOCALTIME_R=True,
)
SOURCES += [
'/nsprpub/pr/src/md/unix/darwin.c',

View File

@ -118,6 +118,7 @@ skip-if = true # Bug 1093205 - Test does not run in Firefox due to missing termi
[browser_gcli_short.js]
[browser_gcli_spell.js]
[browser_gcli_split.js]
[browser_gcli_telemetry.js]
[browser_gcli_tokenize.js]
[browser_gcli_tooltip.js]
skip-if = true # Bug 1093205 - Test does not run in Firefox due to missing terminal

View File

@ -0,0 +1,160 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* global helpers, btoa, whenDelayedStartupFinished, OpenBrowserWindow */
// Test that GCLI telemetry works properly
"use strict";
const TEST_URI = "data:text/html;charset=utf-8,browser_gcli_telemetry.js";
const COMMAND_HISTOGRAM_ID = "DEVTOOLS_GCLI_COMMANDS_KEYED";
function test() {
return Task.spawn(spawnTest).then(finish, helpers.handleError);
}
function* spawnTest() {
let options = yield helpers.openTab(TEST_URI);
let Telemetry = loadTelemetryAndRecordLogs();
yield helpers.openToolbar(options);
yield helpers.audit(options, [
{
setup: "addon list<RETURN>"
},
{
setup: "appcache clear<RETURN>"
},
{
setup: "clear<RETURN>"
},
{
setup: "console clear<RETURN>"
},
{
setup: "cookie list<RETURN>"
},
{
setup: "help<RETURN>"
},
{
setup: "help addon<RETURN>"
},
{
setup: "screenshot<RETURN>"
},
{
setup: "listen 6000<RETURN>"
},
{
setup: "unlisten<RETURN>"
},
{
setup: "context addon<RETURN>"
},
]);
let results = Telemetry.prototype.telemetryInfo;
checkTelemetryResults(results);
stopRecordingTelemetryLogs(Telemetry);
info("Closing Developer Toolbar");
yield helpers.closeToolbar(options);
info("Closing tab");
yield helpers.closeTab(options);
}
/**
* Load the Telemetry utils, then stub Telemetry.prototype.log and
* Telemetry.prototype.logKeyed in order to record everything that's logged in
* it.
* Store all recordings in Telemetry.telemetryInfo.
* @return {Telemetry}
*/
function loadTelemetryAndRecordLogs() {
info("Mock the Telemetry log function to record logged information");
let Telemetry = require("devtools/client/shared/telemetry");
Telemetry.prototype.telemetryInfo = {};
Telemetry.prototype._oldlog = Telemetry.prototype.log;
Telemetry.prototype.log = function (histogramId, value) {
if (!this.telemetryInfo) {
// Telemetry instance still in use after stopRecordingTelemetryLogs
return;
}
if (histogramId) {
if (!this.telemetryInfo[histogramId]) {
this.telemetryInfo[histogramId] = [];
}
this.telemetryInfo[histogramId].push(value);
}
};
Telemetry.prototype._oldlogKeyed = Telemetry.prototype.logKeyed;
Telemetry.prototype.logKeyed = function (histogramId, key, value) {
this.log(`${histogramId}|${key}`, value);
};
return Telemetry;
}
/**
* Stop recording the Telemetry logs and put back the utils as it was before.
* @param {Telemetry} Required Telemetry
* Telemetry object that needs to be stopped.
*/
function stopRecordingTelemetryLogs(Telemetry) {
info("Stopping Telemetry");
Telemetry.prototype.log = Telemetry.prototype._oldlog;
Telemetry.prototype.logKeyed = Telemetry.prototype._oldlogKeyed;
delete Telemetry.prototype._oldlog;
delete Telemetry.prototype._oldlogKeyed;
delete Telemetry.prototype.telemetryInfo;
}
function checkTelemetryResults(results) {
let prefix = COMMAND_HISTOGRAM_ID + "|";
let keys = Object.keys(results).filter(result => {
return result.startsWith(prefix);
});
let commands = [
"addon list",
"appcache clear",
"clear",
"console clear",
"cookie list",
"screenshot",
"listen",
"unlisten",
"context",
"help"
];
for (let command of commands) {
let key = prefix + command;
switch (key) {
case "DEVTOOLS_GCLI_COMMANDS_KEYED|addon list":
case "DEVTOOLS_GCLI_COMMANDS_KEYED|appcache clear":
case "DEVTOOLS_GCLI_COMMANDS_KEYED|clear":
case "DEVTOOLS_GCLI_COMMANDS_KEYED|console clear":
case "DEVTOOLS_GCLI_COMMANDS_KEYED|cookie list":
case "DEVTOOLS_GCLI_COMMANDS_KEYED|screenshot":
case "DEVTOOLS_GCLI_COMMANDS_KEYED|listen":
case "DEVTOOLS_GCLI_COMMANDS_KEYED|unlisten":
case "DEVTOOLS_GCLI_COMMANDS_KEYED|context":
is(results[key].length, 1, `${key} is correct`);
break;
case "DEVTOOLS_GCLI_COMMANDS_KEYED|help":
is(results[key].length, 2, `${key} is correct`);
break;
default:
ok(false, `No telemetry pings were sent for command "${command}"`);
}
}
}

View File

@ -1,6 +1,11 @@
/* 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/. */
/* eslint no-unused-vars: [2, {"vars": "local", "args": "none"}] */
/* import-globals-from helpers.js */
/* import-globals-from mockCommands.js */
"use strict";
const TEST_BASE_HTTP = "http://example.com/browser/devtools/client/commandline/test/";
const TEST_BASE_HTTPS = "https://example.com/browser/devtools/client/commandline/test/";

View File

@ -278,14 +278,19 @@ Telemetry.prototype = {
* Histogram in which the data is to be stored.
* @param {String} key
* The key within the single histogram.
* @param value
* Value to store.
* @param [value]
* Optional value to store.
*/
logKeyed: function (histogramId, key, value) {
if (histogramId) {
try {
let histogram = Services.telemetry.getKeyedHistogramById(histogramId);
histogram.add(key, value);
if (typeof value === "undefined") {
histogram.add(key);
} else {
histogram.add(key, value);
}
} catch (e) {
dump("Warning: An attempt was made to write to the " + histogramId +
" histogram, which is not defined in Histograms.json\n");
@ -322,4 +327,3 @@ Telemetry.prototype = {
}
}
};

View File

@ -34,6 +34,8 @@
--highlighter-bubble-background-color: hsl(214, 13%, 24%);
--highlighter-bubble-border-color: rgba(255, 255, 255, 0.2);
--highlighter-bubble-arrow-size: 8px;
--highlighter-font-family: message-box;
--highlighter-font-size: 11px;
}
/**
@ -120,8 +122,8 @@
position: absolute;
max-width: 95%;
font: message-box;
font-size: 11px;
font: var(--highlighter-font-family);
font-size: var(--highlighter-font-size);
}
:-moz-native-anonymous [class$=infobar] {
@ -322,7 +324,7 @@
:-moz-native-anonymous .geometry-editor-label-text {
fill: var(--highlighter-bubble-text-color);
font: message-box;
font: var(--highlighter-font-family);
font-size: 10px;
text-anchor: middle;
dominant-baseline: middle;
@ -358,7 +360,7 @@
:-moz-native-anonymous .rulers-highlighter-vertical-labels > text {
stroke: none;
fill: #202020;
font: message-box;
font: var(--highlighter-font-family);
font-size: 9px;
dominant-baseline: hanging;
}
@ -408,7 +410,7 @@
border-radius: 4px;
padding: 4px;
white-space: pre-line;
font: message-box;
font: var(--highlighter-font-family);
font-size: 10px;
pointer-events: none;
-moz-user-select: none;
@ -532,8 +534,52 @@
:-moz-native-anonymous .eye-dropper-color-value {
text-shadow: 1px 1px 1px #fff;
font: message-box;
font-size: 11px;
font: var(--highlighter-font-family);
font-size: var(--highlighter-font-size);
text-align: center;
padding: 4px 0;
}
/* Paused Debugger Overlay */
:-moz-native-anonymous .paused-dbg-root {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
flex-direction: column;
/* We don't have access to DevTools themes here, but some of these colors come from the
themes. Theme variable names are given in comments. */
--text-color: #585959; /* --theme-body-color-alt */
--toolbar-background: #fcfcfc; /* --theme-toolbar-background */;
--toolbar-border: #dde1e4; /* --theme-splitter-color */
--toolbar-box-shadow: 0 4px 4px 0 rgba(155, 155, 155, 0.26); /* --rdm-box-shadow */
--overlay-background: #dde1e4a8;
}
:-moz-native-anonymous .paused-dbg-root[overlay] {
background-color: var(--overlay-background);
pointer-events: auto;
}
:-moz-native-anonymous .paused-dbg-toolbar {
margin-top: 15px;
padding: 4px 5px;
display: inline-flex;
-moz-user-select: none;
pointer-events: auto;
color: var(--text-color);
border-radius: 2px;
box-shadow: var(--toolbar-box-shadow);
background-color: var(--toolbar-background);
border: 1px solid var(--toolbar-border);
font: var(--highlighter-font-family);
font-size: var(--highlighter-font-size);
}

View File

@ -725,3 +725,7 @@ exports.MeasuringToolHighlighter = MeasuringToolHighlighter;
const { EyeDropper } = require("./highlighters/eye-dropper");
register(EyeDropper);
exports.EyeDropper = EyeDropper;
const { PausedDebuggerOverlay } = require("./highlighters/paused-debugger");
register(PausedDebuggerOverlay);
exports.PausedDebuggerOverlay = PausedDebuggerOverlay;

View File

@ -16,6 +16,7 @@ DevToolsModules(
'eye-dropper.js',
'geometry-editor.js',
'measuring-tool.js',
'paused-debugger.js',
'rulers.js',
'selector.js',
'simple-outline.js'

View File

@ -0,0 +1,116 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { CanvasFrameAnonymousContentHelper, createNode } = require("./utils/markup");
/**
* The PausedDebuggerOverlay is a class that displays a semi-transparent mask on top of
* the whole page and a toolbar at the top of the page.
* This is used to signal to users that script execution is current paused.
* The toolbar is used to display the reason for the pause in script execution as well as
* buttons to resume or step through the program.
*/
function PausedDebuggerOverlay(highlighterEnv) {
this.env = highlighterEnv;
this.markup = new CanvasFrameAnonymousContentHelper(highlighterEnv,
this._buildMarkup.bind(this));
}
PausedDebuggerOverlay.prototype = {
typeName: "PausedDebuggerOverlay",
ID_CLASS_PREFIX: "paused-dbg-",
_buildMarkup() {
let { window } = this.env;
let prefix = this.ID_CLASS_PREFIX;
let container = createNode(window, {
attributes: {"class": "highlighter-container"}
});
// Wrapper element.
let wrapper = createNode(window, {
parent: container,
attributes: {
"id": "root",
"class": "root",
"hidden": "true",
"overlay": "true"
},
prefix
});
let toolbar = createNode(window, {
parent: wrapper,
attributes: {
"id": "toolbar",
"class": "toolbar"
},
prefix
});
createNode(window, {
nodeType: "span",
parent: toolbar,
attributes: {
"id": "reason",
"class": "reason"
},
prefix
});
return container;
},
destroy() {
this.hide();
this.markup.destroy();
this.env = null;
},
getElement(id) {
return this.markup.getElement(this.ID_CLASS_PREFIX + id);
},
show(node, options = {}) {
if (this.env.isXUL) {
return false;
}
// Show the highlighter's root element.
let root = this.getElement("root");
root.removeAttribute("hidden");
// The page overlay is only shown upon request. Sometimes we just want the toolbar.
if (options.onlyToolbar) {
root.removeAttribute("overlay");
} else {
root.setAttribute("overlay", "true");
}
// Set the text to appear in the toolbar.
let toolbar = this.getElement("toolbar");
if (options.reason) {
this.getElement("reason").setTextContent(options.reason);
toolbar.removeAttribute("hidden");
} else {
toolbar.setAttribute("hidden", "true");
}
return true;
},
hide() {
if (this.env.isXUL) {
return;
}
// Hide the overlay.
this.getElement("root").setAttribute("hidden", "true");
}
};
exports.PausedDebuggerOverlay = PausedDebuggerOverlay;

View File

@ -47,6 +47,7 @@ support-files =
[test_framerate_05.html]
[test_framerate_06.html]
[test_getProcess.html]
[test_highlighter_paused_debugger.html]
[test_inspector-anonymous.html]
[test_inspector-changeattrs.html]
[test_inspector-changevalue.html]

View File

@ -0,0 +1,92 @@
<!DOCTYPE HTML>
<html>
<!--
Test the PausedDebuggerOverlay highlighter.
-->
<head>
<meta charset="utf-8">
<title>PausedDebuggerOverlay test</title>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
</head>
<body>
<pre id="test">
<script>
"use strict";
window.onload = function () {
SimpleTest.waitForExplicitFinish();
const {utils: Cu} = Components;
const {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
require("devtools/server/actors/inspector");
const {HighlighterEnvironment} = require("devtools/server/actors/highlighters");
const {PausedDebuggerOverlay} = require("devtools/server/actors/highlighters/paused-debugger");
const env = new HighlighterEnvironment();
env.initFromWindow(window);
const highlighter = new PausedDebuggerOverlay(env);
const anonymousContent = highlighter.markup.content;
const id = elementID => `${highlighter.ID_CLASS_PREFIX}${elementID}`;
function isHidden(elementID) {
let attr = anonymousContent.getAttributeForElement(id(elementID), "hidden");
return typeof attr === "string" && attr == "true";
}
function getReason() {
return anonymousContent.getTextContentForElement(id("reason"));
}
function isOverlayShown() {
let attr = anonymousContent.getAttributeForElement(id("root"), "overlay");
return typeof attr === "string" && attr == "true";
}
info("Test that the various elements with IDs exist");
ok(highlighter.getElement("root"), "The root wrapper element exists");
ok(highlighter.getElement("toolbar"), "The toolbar element exists");
ok(highlighter.getElement("reason"), "The reason label element exists");
info("Test that the highlighter is hidden by default");
ok(isHidden("root"), "The highlighter is hidden");
info("Show the highlighter with overlay and toolbar");
let didShow = highlighter.show(null, {"reason": "Paused in debugger"});
ok(didShow, "Calling show returned true");
ok(!isHidden("root"), "The highlighter is shown");
ok(isOverlayShown(), "The overlay is shown");
is(getReason(), "Paused in debugger", "The reason displayed in the toolbar is correct");
info("Call show again with another reason");
didShow = highlighter.show(null, {"reason": "Paused for another reason"});
ok(didShow, "Calling show returned true too");
ok(!isHidden("root"), "The highlighter is still shown");
is(getReason(), "Paused for another reason",
"The reason displayed in the toolbar is correct again");
ok(isOverlayShown(), "The overlay is still shown too");
info("Call show again but with no reason");
highlighter.show();
ok(isHidden("toolbar"), "The toolbar is hidden");
ok(isOverlayShown(), "The overlay is shown however");
info("Call show again with a reason but no overlay");
highlighter.show(null, {reason: "no overlay this time", onlyToolbar: true});
ok(!isHidden("toolbar"), "The toolbar is shown this time");
is(getReason(), "no overlay this time",
"The reason displayed in the toolbar is correct again");
ok(!isOverlayShown(), "The overlay is hidden");
info("Hide the highlighter");
highlighter.hide();
ok(isHidden("root"), "The highlighter is now hidden");
SimpleTest.finish();
};
</script>
</pre>
</body>
</html>

View File

@ -22,6 +22,8 @@ var KeyEvent = require('../util/util').KeyEvent;
var Status = require('../types/types').Status;
var History = require('../ui/history').History;
var Telemetry = require("devtools/client/shared/telemetry");
var RESOLVED = Promise.resolve(true);
/**
@ -47,6 +49,9 @@ function Inputter(components) {
// Used to effect caret changes. See _processCaretChange()
this._caretChange = null;
// Use telemetry
this._telemetry = new Telemetry();
// Ensure that TAB/UP/DOWN isn't handled by the browser
this.onKeyDown = this.onKeyDown.bind(this);
this.onKeyUp = this.onKeyUp.bind(this);
@ -122,6 +127,7 @@ Inputter.prototype.destroy = function() {
this.tooltip = undefined;
this.document = undefined;
this.element = undefined;
this._telemetry = undefined;
};
/**
@ -557,6 +563,9 @@ Inputter.prototype._handleReturn = function() {
this._scrollingThroughHistory = false;
this.history.add(this.element.value);
let name = this.requisition.commandAssignment.value.name;
this._telemetry.logKeyed("DEVTOOLS_GCLI_COMMANDS_KEYED", name);
return this.requisition.exec().then(function() {
this.textChanged();
}.bind(this));

View File

@ -952,7 +952,13 @@ NS_IMETHODIMP
InsertPlaintextCommand::DoCommand(const char* aCommandName,
nsISupports* aCommandRefCon)
{
return NS_ERROR_NOT_IMPLEMENTED;
// No value is equivalent to empty string
nsCOMPtr<nsIPlaintextEditor> editor = do_QueryInterface(aCommandRefCon);
if (NS_WARN_IF(!editor)) {
return NS_ERROR_NOT_IMPLEMENTED;
}
return editor->InsertText(EmptyString());
}
NS_IMETHODIMP
@ -970,10 +976,7 @@ InsertPlaintextCommand::DoCommandParams(const char* aCommandName,
nsresult rv = aParams->GetStringValue(STATE_DATA, text);
NS_ENSURE_SUCCESS(rv, rv);
if (!text.IsEmpty())
return editor->InsertText(text);
return NS_OK;
return editor->InsertText(text);
}
NS_IMETHODIMP

View File

@ -1257,17 +1257,6 @@ HTMLEditRules::WillInsertText(EditAction aAction,
return NS_ERROR_NULL_POINTER;
}
if (inString->IsEmpty() && aAction != EditAction::insertIMEText) {
// HACK: this is a fix for bug 19395
// I can't outlaw all empty insertions
// because IME transaction depend on them
// There is more work to do to make the
// world safe for IME.
*aCancel = true;
*aHandled = false;
return NS_OK;
}
// initialize out param
*aCancel = false;
*aHandled = true;

View File

@ -1000,6 +1000,8 @@ NS_IMETHODIMP
HTMLEditor::TypedText(const nsAString& aString,
ETypingAction aAction)
{
MOZ_ASSERT(!aString.IsEmpty() || aAction != eTypedText);
AutoPlaceHolderBatch batch(this, nsGkAtoms::TypingTxnName);
if (aAction == eTypedBR) {

View File

@ -10,6 +10,8 @@
#include "nsIServiceManager.h"
#include "nsPrintEngine.h"
using namespace mozilla;
NS_IMPL_ISUPPORTS_INHERITED(nsPagePrintTimer, mozilla::Runnable, nsITimerCallback)
nsPagePrintTimer::~nsPagePrintTimer()
@ -24,7 +26,7 @@ nsPagePrintTimer::~nsPagePrintTimer()
}
}
nsresult
nsresult
nsPagePrintTimer::StartTimer(bool aUseDelay)
{
nsresult result;
@ -41,6 +43,7 @@ nsPagePrintTimer::StartTimer(bool aUseDelay)
delay = mDelay;
}
}
mTimer->SetTarget(mDocument->EventTargetFor(TaskCategory::Other));
mTimer->InitWithCallback(this, delay, nsITimer::TYPE_ONE_SHOT);
}
return result;
@ -59,6 +62,7 @@ nsPagePrintTimer::StartWatchDogTimer()
} else {
// Instead of just doing one timer for a long period do multiple so we
// can check if the user cancelled the printing.
mWatchDogTimer->SetTarget(mDocument->EventTargetFor(TaskCategory::Other));
mWatchDogTimer->InitWithCallback(this, WATCH_DOG_INTERVAL,
nsITimer::TYPE_ONE_SHOT);
}
@ -158,7 +162,8 @@ nsPagePrintTimer::Notify(nsITimer *timer)
if (donePrePrint && !mWaitingForRemotePrint) {
StopWatchDogTimer();
NS_DispatchToMainThread(this);
// Pass nullptr here since name already was set in constructor.
mDocument->Dispatch(nullptr, TaskCategory::Other, do_AddRef(this));
} else {
// Start the watch dog if we're waiting for preprint to ensure that if any
// mozPrintCallbacks take to long we error out.
@ -188,11 +193,13 @@ nsPagePrintTimer::RemotePrintFinished()
return;
}
mWaitingForRemotePrint->SetTarget(
mDocument->EventTargetFor(mozilla::TaskCategory::Other));
mozilla::Unused <<
mWaitingForRemotePrint->InitWithCallback(this, 0, nsITimer::TYPE_ONE_SHOT);
}
nsresult
nsresult
nsPagePrintTimer::Start(nsPrintObject* aPO)
{
mPrintObj = aPO;
@ -201,7 +208,7 @@ nsPagePrintTimer::Start(nsPrintObject* aPO)
}
void
void
nsPagePrintTimer::Stop()
{
if (mTimer) {

View File

@ -14,6 +14,7 @@
#include "nsThreadUtils.h"
class nsPrintEngine;
class nsIDocument;
//---------------------------------------------------
//-- Page Timer Class
@ -27,15 +28,19 @@ public:
nsPagePrintTimer(nsPrintEngine* aPrintEngine,
nsIDocumentViewerPrint* aDocViewerPrint,
nsIDocument* aDocument,
uint32_t aDelay)
: mPrintEngine(aPrintEngine)
: Runnable("nsPagePrintTimer")
, mPrintEngine(aPrintEngine)
, mDocViewerPrint(aDocViewerPrint)
, mDocument(aDocument)
, mDelay(aDelay)
, mFiringCount(0)
, mPrintObj(nullptr)
, mWatchDogCount(0)
, mDone(false)
{
MOZ_ASSERT(aDocument);
mDocViewerPrint->IncrementDestroyRefCount();
}
@ -62,6 +67,7 @@ private:
nsPrintEngine* mPrintEngine;
nsCOMPtr<nsIDocumentViewerPrint> mDocViewerPrint;
nsCOMPtr<nsIDocument> mDocument;
nsCOMPtr<nsITimer> mTimer;
nsCOMPtr<nsITimer> mWatchDogTimer;
nsCOMPtr<nsITimer> mWaitingForRemotePrint;

View File

@ -3498,8 +3498,13 @@ nsPrintEngine::StartPagePrintTimer(const UniquePtr<nsPrintObject>& aPO)
int32_t printPageDelay = 50;
mPrt->mPrintSettings->GetPrintPageDelay(&printPageDelay);
nsCOMPtr<nsIContentViewer> cv = do_QueryInterface(mDocViewerPrint);
NS_ENSURE_TRUE(cv, NS_ERROR_FAILURE);
nsCOMPtr<nsIDocument> doc = cv->GetDocument();
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
RefPtr<nsPagePrintTimer> timer =
new nsPagePrintTimer(this, mDocViewerPrint, printPageDelay);
new nsPagePrintTimer(this, mDocViewerPrint, doc, printPageDelay);
timer.forget(&mPagePrintTimer);
nsCOMPtr<nsIPrintSession> printSession;
@ -3556,9 +3561,15 @@ private:
void
nsPrintEngine::FirePrintCompletionEvent()
{
MOZ_ASSERT(NS_IsMainThread());
nsCOMPtr<nsIRunnable> event = new nsPrintCompletionEvent(mDocViewerPrint);
if (NS_FAILED(NS_DispatchToCurrentThread(event)))
NS_WARNING("failed to dispatch print completion event");
nsCOMPtr<nsIContentViewer> cv = do_QueryInterface(mDocViewerPrint);
NS_ENSURE_TRUE_VOID(cv);
nsCOMPtr<nsIDocument> doc = cv->GetDocument();
NS_ENSURE_TRUE_VOID(doc);
NS_ENSURE_SUCCESS_VOID(doc->Dispatch("nsPrintCompletionEvent",
TaskCategory::Other, event.forget()));
}
void

View File

@ -68,6 +68,9 @@ if CONFIG['OS_TARGET'] == 'WINNT':
]
DEFINES['USE_WINMM'] = True
DEFINES['USE_WASAPI'] = True
OS_LIBS += [
"avrt",
]
if CONFIG['_MSC_VER']:
CXXFLAGS += ['-wd4005'] # C4005: '_USE_MATH_DEFINES' : macro redefinition

View File

@ -3443,9 +3443,15 @@ pref("font.name-list.sans-serif.he", "Arial");
pref("font.name-list.monospace.he", "Fixed Miriam Transparent, Miriam Fixed, Rod, Courier New");
pref("font.name-list.cursive.he", "Guttman Yad, Ktav, Arial");
#ifdef EARLY_BETA_OR_EARLIER
pref("font.name-list.serif.ja", "Yu Mincho, MS PMincho, MS Mincho, Meiryo, Yu Gothic, MS PGothic, MS Gothic");
pref("font.name-list.sans-serif.ja", "Meiryo, Yu Gothic, MS PGothic, MS Gothic, Yu Mincho, MS PMincho, MS Mincho");
pref("font.name-list.monospace.ja", "MS Gothic, MS Mincho, Meiryo, Yu Gothic, Yu Mincho, MS PGothic, MS PMincho");
#else
pref("font.name-list.serif.ja", "MS PMincho, MS Mincho, MS PGothic, MS Gothic,Meiryo");
pref("font.name-list.sans-serif.ja", "MS PGothic, MS Gothic, MS PMincho, MS Mincho,Meiryo");
pref("font.name-list.monospace.ja", "MS Gothic, MS Mincho, MS PGothic, MS PMincho,Meiryo");
#endif
pref("font.name-list.serif.ko", "Batang, Gulim");
pref("font.name-list.sans-serif.ko", "Gulim");

View File

@ -23,11 +23,6 @@ from mozpack.copier import (
Jarrer,
)
STARTUP_CACHE_PATHS = [
'jsloader',
'jssubloader',
]
'''
Formatters are classes receiving packaging instructions and creating the
appropriate package layout.
@ -321,4 +316,4 @@ class OmniJarSubFormatter(PiecemealFormatter):
'greprefs.js',
'hyphenation',
'update.locale',
] or path[0] in STARTUP_CACHE_PATHS
]

View File

@ -23,10 +23,7 @@ from mozpack.copier import (
FileCopier,
)
from mozpack.packager import SimplePackager
from mozpack.packager.formats import (
FlatFormatter,
STARTUP_CACHE_PATHS,
)
from mozpack.packager.formats import FlatFormatter
from urlparse import urlparse
@ -188,8 +185,7 @@ def unpack_to_registry(source, registry):
finder = UnpackFinder(source)
packager = SimplePackager(FlatFormatter(registry))
for p, f in finder.find('*'):
if mozpath.split(p)[0] not in STARTUP_CACHE_PATHS:
packager.add(p, f)
packager.add(p, f)
packager.close()

View File

@ -408,8 +408,6 @@ class TestFormatters(unittest.TestCase):
self.assertTrue(is_resource(base, 'greprefs.js'))
self.assertTrue(is_resource(base, 'hyphenation/foo'))
self.assertTrue(is_resource(base, 'update.locale'))
self.assertTrue(
is_resource(base, 'jsloader/resource/gre/modules/foo.jsm'))
self.assertFalse(is_resource(base, 'foo'))
self.assertFalse(is_resource(base, 'foo/bar/greprefs.js'))
self.assertTrue(is_resource(base, 'defaults/messenger/foo.dat'))

View File

@ -1157,4 +1157,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
static const int32_t kUnknownId = -1;
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1499699077376000);
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1499784487081000);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,12 +8,12 @@ use data_loader::decode;
use devtools_traits::DevtoolsControlMsg;
use fetch::cors_cache::CorsCache;
use filemanager_thread::FileManager;
use http_loader::{HttpState, determine_request_referrer, http_fetch, set_default_accept_language};
use http_loader::{HttpState, determine_request_referrer, http_fetch};
use http_loader::{set_default_accept, set_default_accept_language};
use hyper::{Error, Result as HyperResult};
use hyper::client::Pool;
use hyper::header::{Accept, AcceptLanguage, ContentLanguage, ContentType};
use hyper::header::{Header, HeaderFormat, HeaderView, Headers, QualityItem};
use hyper::header::{Referer as RefererHeader, q, qitem};
use hyper::header::{Header, HeaderFormat, HeaderView, Headers, Referer as RefererHeader};
use hyper::method::Method;
use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper::status::StatusCode;
@ -61,64 +61,37 @@ pub fn fetch_with_cors_cache(request: &mut Request,
cache: &mut CorsCache,
target: Target,
context: &FetchContext) {
// Step 1
// Step 1.
if request.window == Window::Client {
// TODO: Set window to request's client object if client is a Window object
} else {
request.window = Window::NoWindow;
}
// Step 2
// Step 2.
if request.origin == Origin::Client {
// TODO: set request's origin to request's client's origin
unimplemented!()
}
// Step 3
if !request.headers.has::<Accept>() {
let value = match request.type_ {
// Substep 2
_ if request.is_navigation_request() =>
vec![qitem(mime!(Text / Html)),
// FIXME: This should properly generate a MimeType that has a
// SubLevel of xhtml+xml (https://github.com/hyperium/mime.rs/issues/22)
qitem(mime!(Application / ("xhtml+xml") )),
QualityItem::new(mime!(Application / Xml), q(0.9)),
QualityItem::new(mime!(_ / _), q(0.8))],
// Step 3.
set_default_accept(request.type_, request.destination, &mut request.headers);
// Substep 3
Type::Image =>
vec![qitem(mime!(Image / Png)),
// FIXME: This should properly generate a MimeType that has a
// SubLevel of svg+xml (https://github.com/hyperium/mime.rs/issues/22)
qitem(mime!(Image / ("svg+xml") )),
QualityItem::new(mime!(Image / _), q(0.8)),
QualityItem::new(mime!(_ / _), q(0.5))],
// Substep 3
Type::Style =>
vec![qitem(mime!(Text / Css)),
QualityItem::new(mime!(_ / _), q(0.1))],
// Substep 1
_ => vec![qitem(mime!(_ / _))]
};
// Substep 4
request.headers.set(Accept(value));
}
// Step 4
// Step 4.
set_default_accept_language(&mut request.headers);
// Step 5
// TODO: Figure out what a Priority object is
// Step 5.
// TODO: figure out what a Priority object is.
// Step 6
// Step 6.
// TODO: handle client hints headers.
// Step 7.
if request.is_subresource_request() {
// TODO: create a fetch record and append it to request's client's fetch group list
// TODO: handle client hints headers.
}
// Step 7
// Step 8.
main_fetch(request, cache, false, false, target, &mut None, &context);
}

View File

@ -16,14 +16,16 @@ use hyper::Error as HttpError;
use hyper::LanguageTag;
use hyper::client::{Pool, Request as HyperRequest, Response as HyperResponse};
use hyper::client::pool::PooledStream;
use hyper::header::{AcceptEncoding, AcceptLanguage, AccessControlAllowCredentials};
use hyper::header::{AccessControlAllowOrigin, AccessControlAllowHeaders, AccessControlAllowMethods};
use hyper::header::{AccessControlRequestHeaders, AccessControlMaxAge, AccessControlRequestMethod};
use hyper::header::{Authorization, Basic, CacheControl, CacheDirective, ContentEncoding};
use hyper::header::{ContentLength, Encoding, Header, Headers, Host, IfMatch, IfRange};
use hyper::header::{IfUnmodifiedSince, IfModifiedSince, IfNoneMatch, Location, Pragma, Quality};
use hyper::header::{QualityItem, Referer, SetCookie, UserAgent, qitem};
use hyper::header::Origin as HyperOrigin;
use hyper::header::{Accept, AccessControlAllowCredentials, AccessControlAllowHeaders};
use hyper::header::{AccessControlAllowMethods, AccessControlAllowOrigin};
use hyper::header::{AccessControlMaxAge, AccessControlRequestHeaders};
use hyper::header::{AccessControlRequestMethod, AcceptEncoding, AcceptLanguage};
use hyper::header::{Authorization, Basic, CacheControl, CacheDirective};
use hyper::header::{ContentEncoding, ContentLength, Encoding, Header, Headers};
use hyper::header::{Host, Origin as HyperOrigin, IfMatch, IfRange};
use hyper::header::{IfUnmodifiedSince, IfModifiedSince, IfNoneMatch, Location};
use hyper::header::{Pragma, Quality, QualityItem, Referer, SetCookie};
use hyper::header::{UserAgent, q, qitem};
use hyper::method::Method;
use hyper::net::{Fresh, HttpStream, HttpsStream, NetworkConnector};
use hyper::status::StatusCode;
@ -34,7 +36,8 @@ use msg::constellation_msg::PipelineId;
use net_traits::{CookieSource, FetchMetadata, NetworkError, ReferrerPolicy};
use net_traits::hosts::replace_host;
use net_traits::request::{CacheMode, CredentialsMode, Destination, Origin};
use net_traits::request::{RedirectMode, Referrer, Request, RequestMode, ResponseTainting};
use net_traits::request::{RedirectMode, Referrer, Request, RequestMode};
use net_traits::request::{ResponseTainting, Type};
use net_traits::response::{HttpsState, Response, ResponseBody, ResponseType};
use resource_thread::AuthCache;
use servo_url::{ImmutableOrigin, ServoUrl};
@ -141,6 +144,47 @@ impl NetworkHttpRequestFactory {
}
}
// Step 3 of https://fetch.spec.whatwg.org/#concept-fetch.
pub fn set_default_accept(type_: Type, destination: Destination, headers: &mut Headers) {
if headers.has::<Accept>() {
return;
}
let value = match (type_, destination) {
// Step 3.2.
(_, Destination::Document) => {
vec![
qitem(mime!(Text / Html)),
qitem(mime!(Application / ("xhtml+xml"))),
QualityItem::new(mime!(Application / Xml), q(0.9)),
QualityItem::new(mime!(_ / _), q(0.8)),
]
},
// Step 3.3.
(Type::Image, _) => {
vec![
qitem(mime!(Image / Png)),
qitem(mime!(Image / ("svg+xml") )),
QualityItem::new(mime!(Image / _), q(0.8)),
QualityItem::new(mime!(_ / _), q(0.5)),
]
},
// Step 3.3.
(Type::Style, _) => {
vec![
qitem(mime!(Text / Css)),
QualityItem::new(mime!(_ / _), q(0.1))
]
},
// Step 3.1.
_ => {
vec![qitem(mime!(_ / _))]
},
};
// Step 3.4.
headers.set(Accept(value));
}
fn set_default_accept_encoding(headers: &mut Headers) {
if headers.has::<AcceptEncoding>() {
return

View File

@ -3,12 +3,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cookie::Cookie;
use cookie_rs;
use cookie_storage::CookieStorage;
use fetch::methods::{should_be_blocked_due_to_bad_port, should_be_blocked_due_to_nosniff};
use http_loader::{HttpState, is_redirect_status, set_request_cookies};
use http_loader::{HttpState, is_redirect_status, set_default_accept};
use http_loader::{set_default_accept_language, set_request_cookies};
use hyper::buffer::BufReader;
use hyper::header::{Accept, CacheControl, CacheDirective, Connection, ConnectionOption};
use hyper::header::{CacheControl, CacheDirective, Connection, ConnectionOption};
use hyper::header::{Headers, Host, SetCookie, Pragma, Protocol, ProtocolName, Upgrade};
use hyper::http::h1::{LINE_ENDING, parse_response};
use hyper::method::Method;
@ -18,12 +17,12 @@ use hyper::version::HttpVersion;
use net_traits::{CookieSource, MessageData, NetworkError, WebSocketCommunicate, WebSocketConnectData};
use net_traits::{WebSocketDomAction, WebSocketNetworkEvent};
use net_traits::hosts::replace_host;
use net_traits::request::Type;
use net_traits::request::{Destination, Type};
use servo_url::ServoUrl;
use std::ascii::AsciiExt;
use std::io::{self, Write};
use std::net::TcpStream;
use std::sync::{Arc, Mutex, RwLock};
use std::sync::{Arc, Mutex};
use std::sync::atomic::{AtomicBool, Ordering};
use std::thread;
use url::Position;
@ -40,7 +39,7 @@ pub fn init(connect: WebSocketCommunicate,
let channel = establish_a_websocket_connection(&connect_data.resource_url,
connect_data.origin,
connect_data.protocols,
&http_state.cookie_jar);
&http_state);
let (ws_sender, mut receiver) = match channel {
Ok((protocol_in_use, sender, receiver)) => {
let _ = connect.event_sender.send(WebSocketNetworkEvent::ConnectionEstablished { protocol_in_use });
@ -150,7 +149,7 @@ fn obtain_a_websocket_connection(url: &ServoUrl) -> Result<Stream, NetworkError>
fn establish_a_websocket_connection(resource_url: &ServoUrl,
origin: String,
protocols: Vec<String>,
cookie_jar: &RwLock<CookieStorage>)
http_state: &HttpState)
-> Result<(Option<String>,
Sender<Stream>,
Receiver<Stream>),
@ -185,7 +184,7 @@ fn establish_a_websocket_connection(resource_url: &ServoUrl,
// TODO: handle permessage-deflate extension.
// Step 11 and network error check from step 12.
let response = fetch(resource_url, origin, headers, cookie_jar)?;
let response = fetch(resource_url, origin, headers, http_state)?;
// Step 12, the status code check.
if response.status != StatusCode::SwitchingProtocols {
@ -272,7 +271,7 @@ struct Response {
fn fetch(url: &ServoUrl,
origin: String,
mut headers: Headers,
cookie_jar: &RwLock<CookieStorage>)
http_state: &HttpState)
-> Result<Response, NetworkError> {
// Step 1.
// TODO: handle request's window.
@ -281,23 +280,10 @@ fn fetch(url: &ServoUrl,
// TODO: handle request's origin.
// Step 3.
// We know there is no `Accept` header in `headers`.
{
// Step 3.1.
let value = Accept::star();
// Step 3.2.
// Not applicable: not a navigation request.
// Step 3.3.
// Not applicable: request's type is the empty string.
// Step 3.4.
headers.set(value);
}
set_default_accept(Type::None, Destination::None, &mut headers);
// Step 4.
// TODO: handle `Accept-Language`.
set_default_accept_language(&mut headers);
// Step 5.
// TODO: handle request's priority.
@ -316,14 +302,14 @@ fn fetch(url: &ServoUrl,
}
// Step 8.
main_fetch(url, origin, headers, cookie_jar)
main_fetch(url, origin, headers, http_state)
}
// https://fetch.spec.whatwg.org/#concept-main-fetch
fn main_fetch(url: &ServoUrl,
origin: String,
mut headers: Headers,
cookie_jar: &RwLock<CookieStorage>)
http_state: &HttpState)
-> Result<Response, NetworkError> {
// Step 1.
let mut response = None;
@ -366,7 +352,7 @@ fn main_fetch(url: &ServoUrl,
// doesn't need to be filtered at all.
// Step 12.2.
basic_fetch(url, origin, &mut headers, cookie_jar)
basic_fetch(url, origin, &mut headers, http_state)
});
// Step 13.
@ -404,17 +390,17 @@ fn main_fetch(url: &ServoUrl,
fn basic_fetch(url: &ServoUrl,
origin: String,
headers: &mut Headers,
cookie_jar: &RwLock<CookieStorage>)
http_state: &HttpState)
-> Result<Response, NetworkError> {
// In the case of a WebSocket request, HTTP fetch is always used.
http_fetch(url, origin, headers, cookie_jar)
http_fetch(url, origin, headers, http_state)
}
// https://fetch.spec.whatwg.org/#concept-http-fetch
fn http_fetch(url: &ServoUrl,
origin: String,
headers: &mut Headers,
cookie_jar: &RwLock<CookieStorage>)
http_state: &HttpState)
-> Result<Response, NetworkError> {
// Step 1.
// Not applicable: with step 3 being useless here, this one is too.
@ -435,7 +421,7 @@ fn http_fetch(url: &ServoUrl,
// Not applicable: request's redirect mode is "error".
// Step 4.3.
let response = http_network_or_cache_fetch(url, origin, headers, cookie_jar);
let response = http_network_or_cache_fetch(url, origin, headers, http_state);
// Step 4.4.
// Not applicable: CORS flag is unset.
@ -464,7 +450,7 @@ fn http_fetch(url: &ServoUrl,
fn http_network_or_cache_fetch(url: &ServoUrl,
origin: String,
headers: &mut Headers,
cookie_jar: &RwLock<CookieStorage>)
http_state: &HttpState)
-> Result<Response, NetworkError> {
// Steps 1-3.
// Not applicable: we don't even have a request yet, and there is no body
@ -515,7 +501,7 @@ fn http_network_or_cache_fetch(url: &ServoUrl,
{
// Step 17.1.
// TODO: handle user agent configured to block cookies.
set_request_cookies(&url, headers, &cookie_jar);
set_request_cookies(&url, headers, &http_state.cookie_jar);
// Steps 17.2-6.
// Not applicable: request has no Authorization header.
@ -540,7 +526,7 @@ fn http_network_or_cache_fetch(url: &ServoUrl,
// Not applicable: cache mode is "no-store".
// Step 22.2.
let forward_response = http_network_fetch(url, headers, cookie_jar);
let forward_response = http_network_fetch(url, headers, http_state);
// Step 22.3.
// Not applicable: request's method is not unsafe.
@ -569,7 +555,7 @@ fn http_network_or_cache_fetch(url: &ServoUrl,
// https://fetch.spec.whatwg.org/#concept-http-network-fetch
fn http_network_fetch(url: &ServoUrl,
headers: &Headers,
cookie_jar: &RwLock<CookieStorage>)
http_state: &HttpState)
-> Result<Response, NetworkError> {
// Step 1.
// Not applicable: credentials flag is set.
@ -595,12 +581,10 @@ fn http_network_fetch(url: &ServoUrl,
// Step 15.
if let Some(cookies) = response.headers.get::<SetCookie>() {
let mut jar = cookie_jar.write().unwrap();
let mut jar = http_state.cookie_jar.write().unwrap();
for cookie in &**cookies {
if let Ok(cookie) = cookie_rs::Cookie::parse(&**cookie) {
if let Some(cookie) = Cookie::new_wrapped(cookie.into_owned(), url, CookieSource::HTTP) {
jar.push(cookie, url, CookieSource::HTTP);
}
if let Some(cookie) = Cookie::from_cookie_string(cookie.clone(), url, CookieSource::HTTP) {
jar.push(cookie, url, CookieSource::HTTP);
}
}
}

View File

@ -28,6 +28,10 @@ job-template:
default: browser/locales/all-locales
android-api-15-nightly: mobile/locales/l10n-changesets.json
chunks: 6
run-on-projects:
- mozilla-central
- mozilla-aurora
- mozilla-beta
run-time:
by-build-platform:
default: 36000

View File

@ -5,8 +5,7 @@ expires-after: 7 days
deadline-after: 24 hours
run-on-projects:
- try
- mozilla-beta
- mozilla-release
- release
worker-type: aws-provisioner-v1/gecko-symbol-upload
worker:
implementation: docker-worker

View File

@ -23,14 +23,31 @@ def get_method(method):
return _target_task_methods[method]
def filter_on_nightly(task, parameters):
return not task.attributes.get('nightly') or parameters.get('include_nightly')
def filter_for_project(task, parameters):
"""Filter tasks by project. Optionally enable nightlies."""
if task.attributes.get('nightly') and not parameters.get('include_nightly'):
return False
run_on_projects = set(task.attributes.get('run_on_projects', []))
return match_run_on_projects(parameters['project'], run_on_projects)
def filter_upload_symbols(task, parameters):
# Filters out symbols when there are not part of a nightly or a release build
# TODO Remove this too specific filter (bug 1353296)
return '-upload-symbols' not in task.label or \
task.attributes.get('nightly') or \
parameters.get('project') in ('mozilla-beta', 'mozilla-release')
def standard_filter(task, parameters):
return all(
filter_func(task, parameters) for filter_func in
(filter_on_nightly, filter_for_project, filter_upload_symbols)
)
@_target_task('try_option_syntax')
def target_tasks_try_option_syntax(full_task_graph, parameters):
"""Generate a list of target tasks based on try syntax in
@ -86,7 +103,7 @@ def target_tasks_default(full_task_graph, parameters):
via the `run_on_projects` attributes."""
return [l for l, t in full_task_graph.tasks.iteritems()
if filter_for_project(t, parameters)]
if standard_filter(t, parameters)]
@_target_task('ash_tasks')
@ -184,14 +201,16 @@ def target_tasks_code_coverage(full_task_graph, parameters):
@_target_task('nightly_fennec')
def target_tasks_nightly(full_task_graph, parameters):
def target_tasks_nightly_fennec(full_task_graph, parameters):
"""Select the set of tasks required for a nightly build of fennec. The
nightly build process involves a pipeline of builds, signing,
and, eventually, uploading the tasks to balrog."""
def filter(task):
platform = task.attributes.get('build_platform')
if platform in ('android-api-15-nightly', 'android-x86-nightly'):
return task.attributes.get('nightly', False)
if not task.attributes.get('nightly', False):
return False
return filter_for_project(task, parameters)
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
@ -214,7 +233,7 @@ def target_tasks_mozilla_beta(full_task_graph, parameters):
of builds and signing, but does not include beetmover or balrog jobs."""
def filter(task):
if not filter_for_project(task, parameters):
if not standard_filter(task, parameters):
return False
platform = task.attributes.get('build_platform')
if platform in ('linux64-pgo', 'linux-pgo', 'win32-pgo', 'win64-pgo',
@ -248,7 +267,7 @@ def target_tasks_candidates_fennec(full_task_graph, parameters):
"""Select the set of tasks required for a candidates build of fennec. The
nightly build process involves a pipeline of builds, signing,
and, eventually, uploading the tasks to balrog."""
filtered_for_project = target_tasks_nightly(full_task_graph, parameters)
filtered_for_project = target_tasks_nightly_fennec(full_task_graph, parameters)
def filter(task):
if task.kind not in ['balrog']:

View File

@ -79,6 +79,8 @@ l10n_description_schema = Schema({
# Description of the localized task
Required('description'): _by_platform(basestring),
Optional('run-on-projects'): job_description_schema['run-on-projects'],
# task object of the dependent task
Required('dependent-task'): object,
@ -366,7 +368,7 @@ def make_job_description(config, jobs):
'symbol': job['treeherder']['symbol'],
'platform': job['treeherder']['platform'],
},
'run-on-projects': [],
'run-on-projects': job.get('run-on-projects') if job.get('run-on-projects') else [],
}
if job.get('index'):

View File

@ -133,7 +133,15 @@ assert.mobile = function (msg = "") {
*/
assert.window = function (win, msg = "") {
msg = msg || "Unable to locate window";
return assert.that(w => w && w.document.defaultView, msg, NoSuchWindowError)(win);
return assert.that(w => {
try {
return w && w.document.defaultView;
// If the window is no longer available a TypeError is thrown.
} catch (e if e.name === "TypeError") {
return null;
}
}, msg, NoSuchWindowError)(win);
}
/**

View File

@ -98,6 +98,18 @@ add_test(function test_string() {
run_next_test();
});
add_test(function test_window() {
assert.window({ document: { defaultView: true }});
let deadWindow = { get document() { throw new TypeError("can't access dead object"); }};
for (let typ of [null, undefined, deadWindow]) {
Assert.throws(() => assert.window(typ), NoSuchWindowError);
}
run_next_test();
});
add_test(function test_object() {
assert.object({});
assert.object(new Object());

View File

@ -1,880 +1,5 @@
[event.html]
type: testharness
[Simple editable div: beforeinput event, canceled]
expected: FAIL
[Simple editable div: input event, canceled]
expected: FAIL
[Simple editable div: beforeinput event, uncanceled]
expected: FAIL
[Simple editable div: input event, uncanceled]
expected: FAIL
[Editable b: execCommand() must not throw, canceled]
expected: FAIL
[Editable b: beforeinput event, canceled]
expected: FAIL
[Editable b: input event, canceled]
expected: FAIL
[Editable b: execCommand() must not throw, uncanceled]
expected: FAIL
[Editable b: beforeinput event, uncanceled]
expected: FAIL
[Editable b: input event, uncanceled]
expected: FAIL
[Changing selection from handler: beforeinput event, canceled]
expected: FAIL
[Changing selection from handler: input event, canceled]
expected: FAIL
[Changing selection from handler: beforeinput event, uncanceled]
expected: FAIL
[Changing selection from handler: input event, uncanceled]
expected: FAIL
[Command backColor, value "": beforeinput event, canceled]
expected: FAIL
[Command backColor, value "": beforeinput event, uncanceled]
expected: FAIL
[Command backColor, value "": input event, uncanceled]
expected: FAIL
[Command backColor, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command backColor, value "quasit": input event, canceled]
expected: FAIL
[Command backColor, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command backColor, value "quasit": input event, uncanceled]
expected: FAIL
[Command backColor, value "green": beforeinput event, canceled]
expected: FAIL
[Command backColor, value "green": input event, canceled]
expected: FAIL
[Command backColor, value "green": beforeinput event, uncanceled]
expected: FAIL
[Command backColor, value "green": input event, uncanceled]
expected: FAIL
[Command createLink, value "": beforeinput event, canceled]
expected: FAIL
[Command createLink, value "": beforeinput event, uncanceled]
expected: FAIL
[Command createLink, value "": input event, uncanceled]
expected: FAIL
[Command createLink, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command createLink, value "quasit": input event, canceled]
expected: FAIL
[Command createLink, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command createLink, value "quasit": input event, uncanceled]
expected: FAIL
[Command createLink, value "http://www.w3.org/community/editing/": beforeinput event, canceled]
expected: FAIL
[Command createLink, value "http://www.w3.org/community/editing/": input event, canceled]
expected: FAIL
[Command createLink, value "http://www.w3.org/community/editing/": beforeinput event, uncanceled]
expected: FAIL
[Command createLink, value "http://www.w3.org/community/editing/": input event, uncanceled]
expected: FAIL
[Command fontName, value "": beforeinput event, canceled]
expected: FAIL
[Command fontName, value "": beforeinput event, uncanceled]
expected: FAIL
[Command fontName, value "": input event, uncanceled]
expected: FAIL
[Command fontName, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command fontName, value "quasit": input event, canceled]
expected: FAIL
[Command fontName, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command fontName, value "quasit": input event, uncanceled]
expected: FAIL
[Command fontName, value "serif": beforeinput event, canceled]
expected: FAIL
[Command fontName, value "serif": beforeinput event, uncanceled]
expected: FAIL
[Command fontName, value "serif": input event, uncanceled]
expected: FAIL
[Command fontName, value "Helvetica": beforeinput event, canceled]
expected: FAIL
[Command fontName, value "Helvetica": input event, canceled]
expected: FAIL
[Command fontName, value "Helvetica": beforeinput event, uncanceled]
expected: FAIL
[Command fontName, value "Helvetica": input event, uncanceled]
expected: FAIL
[Command fontSize, value "": beforeinput event, canceled]
expected: FAIL
[Command fontSize, value "": beforeinput event, uncanceled]
expected: FAIL
[Command fontSize, value "": input event, uncanceled]
expected: FAIL
[Command fontSize, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command fontSize, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command fontSize, value "quasit": input event, uncanceled]
expected: FAIL
[Command fontSize, value "6": beforeinput event, canceled]
expected: FAIL
[Command fontSize, value "6": input event, canceled]
expected: FAIL
[Command fontSize, value "6": beforeinput event, uncanceled]
expected: FAIL
[Command fontSize, value "6": input event, uncanceled]
expected: FAIL
[Command fontSize, value "15px": beforeinput event, canceled]
expected: FAIL
[Command fontSize, value "15px": input event, canceled]
expected: FAIL
[Command fontSize, value "15px": beforeinput event, uncanceled]
expected: FAIL
[Command fontSize, value "15px": input event, uncanceled]
expected: FAIL
[Command foreColor, value "": beforeinput event, canceled]
expected: FAIL
[Command foreColor, value "": beforeinput event, uncanceled]
expected: FAIL
[Command foreColor, value "": input event, uncanceled]
expected: FAIL
[Command foreColor, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command foreColor, value "quasit": input event, canceled]
expected: FAIL
[Command foreColor, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command foreColor, value "quasit": input event, uncanceled]
expected: FAIL
[Command foreColor, value "green": beforeinput event, canceled]
expected: FAIL
[Command foreColor, value "green": input event, canceled]
expected: FAIL
[Command foreColor, value "green": beforeinput event, uncanceled]
expected: FAIL
[Command foreColor, value "green": input event, uncanceled]
expected: FAIL
[Command hiliteColor, value "": beforeinput event, canceled]
expected: FAIL
[Command hiliteColor, value "": beforeinput event, uncanceled]
expected: FAIL
[Command hiliteColor, value "": input event, uncanceled]
expected: FAIL
[Command hiliteColor, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command hiliteColor, value "quasit": input event, canceled]
expected: FAIL
[Command hiliteColor, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command hiliteColor, value "quasit": input event, uncanceled]
expected: FAIL
[Command hiliteColor, value "green": beforeinput event, canceled]
expected: FAIL
[Command hiliteColor, value "green": input event, canceled]
expected: FAIL
[Command hiliteColor, value "green": beforeinput event, uncanceled]
expected: FAIL
[Command hiliteColor, value "green": input event, uncanceled]
expected: FAIL
[Command italic, value "": beforeinput event, canceled]
expected: FAIL
[Command italic, value "": input event, canceled]
expected: FAIL
[Command italic, value "": beforeinput event, uncanceled]
expected: FAIL
[Command italic, value "": input event, uncanceled]
expected: FAIL
[Command italic, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command italic, value "quasit": input event, canceled]
expected: FAIL
[Command italic, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command italic, value "quasit": input event, uncanceled]
expected: FAIL
[Command removeFormat, value "": beforeinput event, canceled]
expected: FAIL
[Command removeFormat, value "": input event, canceled]
expected: FAIL
[Command removeFormat, value "": beforeinput event, uncanceled]
expected: FAIL
[Command removeFormat, value "": input event, uncanceled]
expected: FAIL
[Command removeFormat, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command removeFormat, value "quasit": input event, canceled]
expected: FAIL
[Command removeFormat, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command removeFormat, value "quasit": input event, uncanceled]
expected: FAIL
[Command strikeThrough, value "": beforeinput event, canceled]
expected: FAIL
[Command strikeThrough, value "": input event, canceled]
expected: FAIL
[Command strikeThrough, value "": beforeinput event, uncanceled]
expected: FAIL
[Command strikeThrough, value "": input event, uncanceled]
expected: FAIL
[Command strikeThrough, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command strikeThrough, value "quasit": input event, canceled]
expected: FAIL
[Command strikeThrough, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command strikeThrough, value "quasit": input event, uncanceled]
expected: FAIL
[Command subscript, value "": beforeinput event, canceled]
expected: FAIL
[Command subscript, value "": input event, canceled]
expected: FAIL
[Command subscript, value "": beforeinput event, uncanceled]
expected: FAIL
[Command subscript, value "": input event, uncanceled]
expected: FAIL
[Command subscript, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command subscript, value "quasit": input event, canceled]
expected: FAIL
[Command subscript, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command subscript, value "quasit": input event, uncanceled]
expected: FAIL
[Command superscript, value "": beforeinput event, canceled]
expected: FAIL
[Command superscript, value "": input event, canceled]
expected: FAIL
[Command superscript, value "": beforeinput event, uncanceled]
expected: FAIL
[Command superscript, value "": input event, uncanceled]
expected: FAIL
[Command superscript, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command superscript, value "quasit": input event, canceled]
expected: FAIL
[Command superscript, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command superscript, value "quasit": input event, uncanceled]
expected: FAIL
[Command underline, value "": beforeinput event, canceled]
expected: FAIL
[Command underline, value "": input event, canceled]
expected: FAIL
[Command underline, value "": beforeinput event, uncanceled]
expected: FAIL
[Command underline, value "": input event, uncanceled]
expected: FAIL
[Command underline, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command underline, value "quasit": input event, canceled]
expected: FAIL
[Command underline, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command underline, value "quasit": input event, uncanceled]
expected: FAIL
[Command unlink, value "": beforeinput event, canceled]
expected: FAIL
[Command unlink, value "": beforeinput event, uncanceled]
expected: FAIL
[Command unlink, value "": input event, uncanceled]
expected: FAIL
[Command unlink, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command unlink, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command unlink, value "quasit": input event, uncanceled]
expected: FAIL
[Command delete, value "": beforeinput event, canceled]
expected: FAIL
[Command delete, value "": input event, canceled]
expected: FAIL
[Command delete, value "": beforeinput event, uncanceled]
expected: FAIL
[Command delete, value "": input event, uncanceled]
expected: FAIL
[Command delete, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command delete, value "quasit": input event, canceled]
expected: FAIL
[Command delete, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command delete, value "quasit": input event, uncanceled]
expected: FAIL
[Command formatBlock, value "": beforeinput event, canceled]
expected: FAIL
[Command formatBlock, value "": beforeinput event, uncanceled]
expected: FAIL
[Command formatBlock, value "": input event, uncanceled]
expected: FAIL
[Command formatBlock, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command formatBlock, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command formatBlock, value "quasit": input event, uncanceled]
expected: FAIL
[Command formatBlock, value "p": beforeinput event, canceled]
expected: FAIL
[Command formatBlock, value "p": input event, canceled]
expected: FAIL
[Command formatBlock, value "p": beforeinput event, uncanceled]
expected: FAIL
[Command formatBlock, value "p": input event, uncanceled]
expected: FAIL
[Command forwardDelete, value "": beforeinput event, canceled]
expected: FAIL
[Command forwardDelete, value "": input event, canceled]
expected: FAIL
[Command forwardDelete, value "": beforeinput event, uncanceled]
expected: FAIL
[Command forwardDelete, value "": input event, uncanceled]
expected: FAIL
[Command forwardDelete, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command forwardDelete, value "quasit": input event, canceled]
expected: FAIL
[Command forwardDelete, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command forwardDelete, value "quasit": input event, uncanceled]
expected: FAIL
[Command indent, value "": beforeinput event, canceled]
expected: FAIL
[Command indent, value "": input event, canceled]
expected: FAIL
[Command indent, value "": beforeinput event, uncanceled]
expected: FAIL
[Command indent, value "": input event, uncanceled]
expected: FAIL
[Command indent, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command indent, value "quasit": input event, canceled]
expected: FAIL
[Command indent, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command indent, value "quasit": input event, uncanceled]
expected: FAIL
[Command insertHorizontalRule, value "": beforeinput event, canceled]
expected: FAIL
[Command insertHorizontalRule, value "": input event, canceled]
expected: FAIL
[Command insertHorizontalRule, value "": beforeinput event, uncanceled]
expected: FAIL
[Command insertHorizontalRule, value "": input event, uncanceled]
expected: FAIL
[Command insertHorizontalRule, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command insertHorizontalRule, value "quasit": input event, canceled]
expected: FAIL
[Command insertHorizontalRule, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command insertHorizontalRule, value "quasit": input event, uncanceled]
expected: FAIL
[Command insertHorizontalRule, value "id": beforeinput event, canceled]
expected: FAIL
[Command insertHorizontalRule, value "id": input event, canceled]
expected: FAIL
[Command insertHorizontalRule, value "id": beforeinput event, uncanceled]
expected: FAIL
[Command insertHorizontalRule, value "id": input event, uncanceled]
expected: FAIL
[Command insertHTML, value "": beforeinput event, canceled]
expected: FAIL
[Command insertHTML, value "": input event, canceled]
expected: FAIL
[Command insertHTML, value "": beforeinput event, uncanceled]
expected: FAIL
[Command insertHTML, value "": input event, uncanceled]
expected: FAIL
[Command insertHTML, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command insertHTML, value "quasit": input event, canceled]
expected: FAIL
[Command insertHTML, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command insertHTML, value "quasit": input event, uncanceled]
expected: FAIL
[Command insertHTML, value "<b>hi</b>": beforeinput event, canceled]
expected: FAIL
[Command insertHTML, value "<b>hi</b>": input event, canceled]
expected: FAIL
[Command insertHTML, value "<b>hi</b>": beforeinput event, uncanceled]
expected: FAIL
[Command insertHTML, value "<b>hi</b>": input event, uncanceled]
expected: FAIL
[Command insertImage, value "": beforeinput event, canceled]
expected: FAIL
[Command insertImage, value "": beforeinput event, uncanceled]
expected: FAIL
[Command insertImage, value "": input event, uncanceled]
expected: FAIL
[Command insertImage, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command insertImage, value "quasit": input event, canceled]
expected: FAIL
[Command insertImage, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command insertImage, value "quasit": input event, uncanceled]
expected: FAIL
[Command insertImage, value "../images/green.png": beforeinput event, canceled]
expected: FAIL
[Command insertImage, value "../images/green.png": input event, canceled]
expected: FAIL
[Command insertImage, value "../images/green.png": beforeinput event, uncanceled]
expected: FAIL
[Command insertImage, value "../images/green.png": input event, uncanceled]
expected: FAIL
[Command insertLineBreak, value "": beforeinput event, canceled]
expected: FAIL
[Command insertLineBreak, value "": beforeinput event, uncanceled]
expected: FAIL
[Command insertLineBreak, value "": input event, uncanceled]
expected: FAIL
[Command insertLineBreak, value "": input event, canceled]
expected: FAIL
[Command insertLineBreak, value "quasit": input event, canceled]
expected: FAIL
[Command insertLineBreak, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command insertLineBreak, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command insertLineBreak, value "quasit": input event, uncanceled]
expected: FAIL
[Command insertOrderedList, value "": beforeinput event, canceled]
expected: FAIL
[Command insertOrderedList, value "": input event, canceled]
expected: FAIL
[Command insertOrderedList, value "": beforeinput event, uncanceled]
expected: FAIL
[Command insertOrderedList, value "": input event, uncanceled]
expected: FAIL
[Command insertOrderedList, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command insertOrderedList, value "quasit": input event, canceled]
expected: FAIL
[Command insertOrderedList, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command insertOrderedList, value "quasit": input event, uncanceled]
expected: FAIL
[Command insertParagraph, value "": beforeinput event, canceled]
expected: FAIL
[Command insertParagraph, value "": input event, canceled]
expected: FAIL
[Command insertParagraph, value "": beforeinput event, uncanceled]
expected: FAIL
[Command insertParagraph, value "": input event, uncanceled]
expected: FAIL
[Command insertParagraph, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command insertParagraph, value "quasit": input event, canceled]
expected: FAIL
[Command insertParagraph, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command insertParagraph, value "quasit": input event, uncanceled]
expected: FAIL
[Command insertText, value "": execCommand() must not throw, canceled]
expected: FAIL
[Command insertText, value "": beforeinput event, canceled]
expected: FAIL
[Command insertText, value "": execCommand() must not throw, uncanceled]
expected: FAIL
[Command insertText, value "": beforeinput event, uncanceled]
expected: FAIL
[Command insertText, value "": input event, uncanceled]
expected: FAIL
[Command insertText, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command insertText, value "quasit": input event, canceled]
expected: FAIL
[Command insertText, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command insertText, value "quasit": input event, uncanceled]
expected: FAIL
[Command insertText, value "abc": beforeinput event, canceled]
expected: FAIL
[Command insertText, value "abc": input event, canceled]
expected: FAIL
[Command insertText, value "abc": beforeinput event, uncanceled]
expected: FAIL
[Command insertText, value "abc": input event, uncanceled]
expected: FAIL
[Command insertUnorderedList, value "": beforeinput event, canceled]
expected: FAIL
[Command insertUnorderedList, value "": input event, canceled]
expected: FAIL
[Command insertUnorderedList, value "": beforeinput event, uncanceled]
expected: FAIL
[Command insertUnorderedList, value "": input event, uncanceled]
expected: FAIL
[Command insertUnorderedList, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command insertUnorderedList, value "quasit": input event, canceled]
expected: FAIL
[Command insertUnorderedList, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command insertUnorderedList, value "quasit": input event, uncanceled]
expected: FAIL
[Command justifyCenter, value "": beforeinput event, canceled]
expected: FAIL
[Command justifyCenter, value "": input event, canceled]
expected: FAIL
[Command justifyCenter, value "": beforeinput event, uncanceled]
expected: FAIL
[Command justifyCenter, value "": input event, uncanceled]
expected: FAIL
[Command justifyCenter, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command justifyCenter, value "quasit": input event, canceled]
expected: FAIL
[Command justifyCenter, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command justifyCenter, value "quasit": input event, uncanceled]
expected: FAIL
[Command justifyFull, value "": beforeinput event, canceled]
expected: FAIL
[Command justifyFull, value "": input event, canceled]
expected: FAIL
[Command justifyFull, value "": beforeinput event, uncanceled]
expected: FAIL
[Command justifyFull, value "": input event, uncanceled]
expected: FAIL
[Command justifyFull, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command justifyFull, value "quasit": input event, canceled]
expected: FAIL
[Command justifyFull, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command justifyFull, value "quasit": input event, uncanceled]
expected: FAIL
[Command justifyLeft, value "": beforeinput event, canceled]
expected: FAIL
[Command justifyLeft, value "": input event, canceled]
expected: FAIL
[Command justifyLeft, value "": beforeinput event, uncanceled]
expected: FAIL
[Command justifyLeft, value "": input event, uncanceled]
expected: FAIL
[Command justifyLeft, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command justifyLeft, value "quasit": input event, canceled]
expected: FAIL
[Command justifyLeft, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command justifyLeft, value "quasit": input event, uncanceled]
expected: FAIL
[Command justifyRight, value "": beforeinput event, canceled]
expected: FAIL
[Command justifyRight, value "": input event, canceled]
expected: FAIL
[Command justifyRight, value "": beforeinput event, uncanceled]
expected: FAIL
[Command justifyRight, value "": input event, uncanceled]
expected: FAIL
[Command justifyRight, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command justifyRight, value "quasit": input event, canceled]
expected: FAIL
[Command justifyRight, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command justifyRight, value "quasit": input event, uncanceled]
expected: FAIL
[Command outdent, value "": beforeinput event, canceled]
expected: FAIL
[Command outdent, value "": beforeinput event, uncanceled]
expected: FAIL
[Command outdent, value "": input event, uncanceled]
expected: FAIL
[Command outdent, value "quasit": beforeinput event, canceled]
expected: FAIL
[Command outdent, value "quasit": beforeinput event, uncanceled]
expected: FAIL
[Command outdent, value "quasit": input event, uncanceled]
expected: FAIL
[Editable b: execCommand() must not throw]
expected: FAIL
@ -924,12 +49,6 @@
[Command insertImage, value "": input event]
expected: FAIL
[Command insertText, value "": execCommand() must not throw]
expected: FAIL
[Command insertText, value "": input event]
expected: FAIL
[Command outdent, value "": input event]
expected: FAIL

View File

@ -1,11 +1,5 @@
[inserttext.html]
type: testharness
[[["inserttext",""\]\] "foo[bar\]baz": execCommand("inserttext", false, "") return value]
expected: FAIL
[[["inserttext",""\]\] "foo[bar\]baz" compare innerHTML]
expected: FAIL
[[["inserttext","\\t"\]\] "foo[\]bar" compare innerHTML]
expected: FAIL

View File

@ -8645,6 +8645,14 @@
"releaseChannelCollection": "opt-out",
"description": "Records DevTools toolbox host each time the toolbox is opened and when the host is changed (0:Bottom, 1:Side, 2:Window, 3:Custom, 9:Unknown)."
},
"DEVTOOLS_GCLI_COMMANDS_KEYED": {
"bug_numbers": [1347517],
"alert_emails": ["dev-developer-tools@lists.mozilla.org"],
"expires_in_version": "never",
"keyed": true,
"kind": "count",
"description": "Reports the command name used in GCLI e.g. 'screenshot'"
},
"VIEW_SOURCE_IN_BROWSER_OPENED_BOOLEAN": {
"alert_emails": ["mozilla-dev-developer-tools@lists.mozilla.org", "jryans@mozilla.com"],
"expires_in_version": "53",

View File

@ -70,6 +70,11 @@ Structure:
}
}
.. note::
For "crash" pings generated by the crashreporter we are deliberately truncating the ``creationDate``
to hours. See bug 1345108 for context.
Process Types
-------------

View File

@ -95,12 +95,11 @@ GenerateUUID()
const char kISO8601Date[] = "%F";
const char kISO8601DateHours[] = "%FT%H:00:00.000Z";
const char kISO8601FullDate[] = "%FT%T.000Z";
// Return the current date as a string in the specified format, the following
// constants are provided:
// - kISO8601Date, the ISO 8601 date format, YYYY-MM-DD
// - kISO8601FullDate, the ISO 8601 full date format, YYYY-MM-DDTHH:MM:SS.000Z
// - kISO8601DateHours, the ISO 8601 full date format, YYYY-MM-DDTHH:00:00.000Z
static string
CurrentDate(string format)
{
@ -230,7 +229,7 @@ CreateRootNode(StringTable& strings, const string& aUuid, const string& aHash,
root["type"] = "crash"; // This is a crash ping
root["id"] = aUuid;
root["version"] = kTelemetryVersion;
root["creationDate"] = CurrentDate(kISO8601FullDate);
root["creationDate"] = CurrentDate(kISO8601DateHours);
root["clientId"] = aClientId;
// Parse the telemetry environment

View File

@ -29,7 +29,6 @@ from argparse import ArgumentParser
import os
from StringIO import StringIO
import subprocess
import platform
import mozinfo
# List of libraries to shlibsign.
@ -124,60 +123,6 @@ class LibSignFile(File):
errors.fatal('Error while signing %s' % self.path)
def precompile_cache(registry, source_path, gre_path, app_path):
'''
Create startup cache for the given application directory, using the
given GRE path.
- registry is a FileRegistry-like instance where to add the startup cache.
- source_path is the base path of the package.
- gre_path is the GRE path, relative to source_path.
- app_path is the application path, relative to source_path.
Startup cache for all resources under resource://app/ are generated,
except when gre_path == app_path, in which case it's under
resource://gre/.
'''
from tempfile import mkstemp
source_path = os.path.abspath(source_path)
if app_path != gre_path:
resource = 'app'
else:
resource = 'gre'
app_path = os.path.join(source_path, app_path)
gre_path = os.path.join(source_path, gre_path)
fd, cache = mkstemp('.zip')
os.close(fd)
os.remove(cache)
try:
extra_env = {'MOZ_STARTUP_CACHE': cache}
if buildconfig.substs.get('MOZ_TSAN'):
extra_env['TSAN_OPTIONS'] = 'report_bugs=0'
if buildconfig.substs.get('MOZ_ASAN'):
extra_env['ASAN_OPTIONS'] = 'detect_leaks=0'
if launcher.launch(['xpcshell', '-g', gre_path, '-a', app_path,
'-f', os.path.join(os.path.dirname(__file__),
'precompile_cache.js'),
'-e', 'precompile_startupcache("resource://%s/");'
% resource],
extra_linker_path=gre_path,
extra_env=extra_env):
errors.fatal('Error while running startup cache precompilation')
return
from mozpack.mozjar import JarReader
jar = JarReader(cache)
resource = '/resource/%s/' % resource
for f in jar:
if resource in f.filename:
path = f.filename[f.filename.index(resource) + len(resource):]
if registry.contains(path):
registry.add(f.filename, GeneratedFile(f.read()))
jar.close()
finally:
if os.path.exists(cache):
os.remove(cache)
class RemovedFiles(GeneratedFile):
'''
File class for removed-files. Is used as a preprocessor parser.
@ -371,25 +316,6 @@ def main():
if key in log:
f.preload(log[key])
# Fill startup cache
if isinstance(formatter, OmniJarFormatter) and launcher.can_launch() \
and buildconfig.substs['MOZ_DISABLE_STARTUPCACHE'] != '1':
gre_path = None
def get_bases():
for b in sink.packager.get_bases(addons=False):
for p in (mozpath.join('bin', b), b):
if os.path.exists(os.path.join(args.source, p)):
yield p
break
for base in sorted(get_bases()):
if not gre_path:
gre_path = base
omnijar_path = mozpath.join(sink.normalize_path(base),
buildconfig.substs['OMNIJAR_NAME'])
if formatter.contains(omnijar_path):
precompile_cache(formatter.copier[omnijar_path],
args.source, gre_path, base)
copier.copy(args.destination)

View File

@ -155,8 +155,8 @@
background-color: rgb(102,102,102);
}
#alertSettings[focusedViaMouse]:-moz-focusring > .button-box {
border-color: transparent;
#alertSettings[focusedViaMouse]:-moz-focusring {
outline: none;
}
#alertSettings > .button-box > .button-menu-dropmarker,

View File

@ -935,7 +935,6 @@ setting[type="radio"] > radiogroup {
.download-progress .cancel .button-box {
/* override in-content/common.css !important rule */
padding: 0 !important;
border: none;
}
.download-progress .cancel .button-text {

View File

@ -101,9 +101,6 @@
.popup-notification-button > .button-box {
padding: 0;
margin: 0;
/* prevent double border on windows when focused */
border: none;
}
.popup-notification-dropmarker {

View File

@ -19,11 +19,10 @@ button {
}
.button-box {
border: 1px solid transparent;
padding-top: 1px;
padding-bottom: 2px;
padding-inline-start: 3px;
padding-inline-end: 4px;
padding-top: 2px;
padding-bottom: 3px;
padding-inline-start: 4px;
padding-inline-end: 5px;
}
.button-text {
@ -33,8 +32,9 @@ button {
/* .......... focused state .......... */
button:-moz-focusring > .button-box {
border: 1px dotted ThreeDDarkShadow;
button:-moz-focusring {
outline: 1px dotted;
outline-offset: -3px;
}
/* .......... default/hover/focused state .......... */
@ -57,10 +57,10 @@ button:-moz-focusring > .button-box {
@media (-moz-windows-classic) {
button:-moz-any(:hover:active,[open="true"],[checked="true"]):not([disabled="true"]) > .button-box {
padding-top: 2px;
padding-bottom: 1px;
padding-inline-start: 4px;
padding-inline-end: 3px;
padding-top: 3px;
padding-bottom: 2px;
padding-inline-start: 5px;
padding-inline-end: 4px;
}
}

View File

@ -57,13 +57,11 @@ xul|*.checkbox-icon {
}
/* Never draw a border for the focusring, use outline instead */
xul|*.button-box,
xul|*.menulist-label-box,
xul|*.radio-label-box {
border-style: none;
}
xul|button:-moz-focusring > xul|*.button-box,
xul|menulist:-moz-focusring > xul|*.menulist-label-box,
xul|radio[focused="true"] > xul|*.radio-label-box,
html|input[type="checkbox"]:-moz-focusring + html|label:before {

View File

@ -68,11 +68,6 @@ notification[type="critical"] {
%include ../../shared/popupnotification.inc.css
.popup-notification-button:-moz-focusring {
outline: 1px -moz-dialogtext dotted;
outline-offset: -1px;
}
/* Override default icon size which is too small for this dropdown */
.popup-notification-dropmarker > .button-box > .button-menu-dropmarker {
width: 16px;

View File

@ -15,10 +15,6 @@ spinbuttons {
margin: 0 !important;
}
.spinbuttons-button > .button-box {
border: 0;
}
.spinbuttons-up {
-moz-appearance: spinner-upbutton;
}

View File

@ -52,92 +52,9 @@
#define WM_FULLSCREEN_TRANSITION_BEFORE (WM_USER + 0)
#define WM_FULLSCREEN_TRANSITION_AFTER (WM_USER + 1)
/*****************************************************************************
* WM_* messages and related constants which may not be defined by
* old Windows SDK
****************************************************************************/
#ifndef SM_CXPADDEDBORDER
#define SM_CXPADDEDBORDER 92
#endif
// require WINVER >= 0x601
#ifndef SM_MAXIMUMTOUCHES
#define SM_MAXIMUMTOUCHES 95
#endif
#ifndef WM_THEMECHANGED
#define WM_THEMECHANGED 0x031A
#endif
#ifndef WM_GETOBJECT
#define WM_GETOBJECT 0x03d
#endif
#ifndef PBT_APMRESUMEAUTOMATIC
#define PBT_APMRESUMEAUTOMATIC 0x0012
#endif
#ifndef WM_MOUSEHWHEEL
#define WM_MOUSEHWHEEL 0x020E
#endif
#ifndef MOUSEEVENTF_HWHEEL
#define MOUSEEVENTF_HWHEEL 0x01000
#endif
#ifndef WM_MOUSELEAVE
#define WM_MOUSELEAVE 0x02A3
#endif
#ifndef SPI_GETWHEELSCROLLCHARS
#define SPI_GETWHEELSCROLLCHARS 0x006C
#endif
#ifndef SPI_SETWHEELSCROLLCHARS
#define SPI_SETWHEELSCROLLCHARS 0x006D
#endif
#ifndef MAPVK_VSC_TO_VK
#define MAPVK_VK_TO_VSC 0
#define MAPVK_VSC_TO_VK 1
#define MAPVK_VK_TO_CHAR 2
#define MAPVK_VSC_TO_VK_EX 3
#define MAPVK_VK_TO_VSC_EX 4
#endif
#ifndef WM_DWMCOMPOSITIONCHANGED
#define WM_DWMCOMPOSITIONCHANGED 0x031E
#endif
#ifndef WM_DWMNCRENDERINGCHANGED
#define WM_DWMNCRENDERINGCHANGED 0x031F
#endif
#ifndef WM_DWMCOLORIZATIONCOLORCHANGED
#define WM_DWMCOLORIZATIONCOLORCHANGED 0x0320
#endif
#ifndef WM_DWMWINDOWMAXIMIZEDCHANGE
#define WM_DWMWINDOWMAXIMIZEDCHANGE 0x0321
#endif
// Drop shadow window style
#define CS_XP_DROPSHADOW 0x00020000
// App Command messages for IntelliMouse and Natural Keyboard Pro
// These messages are not included in Visual C++ 6.0, but are in 7.0+
#ifndef WM_APPCOMMAND
#define WM_APPCOMMAND 0x0319
#endif
#define FAPPCOMMAND_MASK 0xF000
#ifndef WM_GETTITLEBARINFOEX
#define WM_GETTITLEBARINFOEX 0x033F
#endif
#ifndef CCHILDREN_TITLEBAR
#define CCHILDREN_TITLEBAR 5
#endif
#ifndef APPCOMMAND_BROWSER_BACKWARD
#define APPCOMMAND_BROWSER_BACKWARD 1
#define APPCOMMAND_BROWSER_FORWARD 2

View File

@ -11,8 +11,8 @@
#include "nsWindowDbg.h"
#include "WinUtils.h"
using namespace mozilla;
using namespace mozilla::widget;
extern mozilla::LazyLogModule gWindowsLog;
#if defined(POPUP_ROLLUP_DEBUG_OUTPUT)
@ -38,8 +38,8 @@ void PrintEvent(UINT msg, bool aShowAllEvents, bool aShowMouseMoves)
}
if (aShowAllEvents || (!aShowAllEvents && gLastEventMsg != (long)msg)) {
if (aShowMouseMoves || (!aShowMouseMoves && msg != 0x0020 && msg != 0x0200 && msg != 0x0084)) {
MOZ_LOG(gWindowsLog, LogLevel::Info,
("%6d - 0x%04X %s\n", gEventCounter++, msg,
MOZ_LOG(gWindowsLog, LogLevel::Info,
("%6d - 0x%04X %s\n", gEventCounter++, msg,
gAllEvents[inx].mStr ? gAllEvents[inx].mStr : "Unknown"));
gLastEventMsg = msg;
}

View File

@ -48,6 +48,7 @@ using mozilla::plugins::PluginInstanceParent;
#include "mozilla/layers/CompositorBridgeParent.h"
#include "mozilla/layers/CompositorBridgeChild.h"
#include "ClientLayerManager.h"
#include "WinCompositorWidget.h"
#include "nsUXThemeData.h"
#include "nsUXThemeConstants.h"