Bug 1408562 - Update Debugger frontend (10-13). r=jdescottes

MozReview-Commit-ID: 6qEViJ9Z2Nw

--HG--
extra : rebase_source : cc99bd7f7f369588023e3c84e35b5253e4fbb6b5
This commit is contained in:
Jason Laster 2017-10-19 11:05:49 +02:00
Родитель 98ed53bd59
Коммит ebfefa4a4c
17 изменённых файлов: 32492 добавлений и 33865 удалений

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

@ -1,7 +1,7 @@
This is the debugger.html project output.
See https://github.com/devtools-html/debugger.html
Taken from upstream commit: 455e7e3f2de29113e37de8c03052de110f5fb106
Taken from upstream commit: aa6b25cc7dc645b8c1d76af58b99012e40b80848
Packages:
- babel-plugin-transform-es2015-modules-commonjs @6.26.0

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

@ -2,6 +2,141 @@
* 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/. */
menu {
display: inline;
padding: 0;
}
menu > menuitem::after {
content: "\25BA";
float: right;
padding-left: 5px;
}
menu > menupopup {
display: none;
}
menu > menuitem:hover + menupopup,
menu > menupopup:hover {
display: block;
}
menupopup {
position: fixed;
z-index: 10000;
background: white;
border: 1px solid #cccccc;
padding: 5px 0;
background: #f2f2f2;
border-radius: 5px;
color: #585858;
box-shadow: 0 0 4px 0 rgba(190, 190, 190, 0.8);
min-width: 130px;
}
menuitem {
display: block;
padding: 0 20px;
line-height: 20px;
font-weight: 500;
font-size: 13px;
-moz-user-select: none;
user-select: none;
}
menuitem:hover {
background: #3780fb;
color: white;
cursor: pointer;
}
menuitem[disabled=true] {
color: #cccccc;
}
menuitem[disabled=true]:hover {
background-color: transparent;
cursor: default;
}
menuitem[type=checkbox]::before {
content: "";
width: 10px;
display: inline-block;
}
menuitem[type=checkbox][checked=true]::before {
content: "\2713";
left: -8px;
position: relative;
}
menuseparator {
border-bottom: 1px solid #cacdd3;
width: 100%;
height: 5px;
display: block;
margin-bottom: 5px;
}
#contextmenu-mask.show {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999;
}
/* 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/. */
:root.theme-light,
:root .theme-light {
--theme-search-overlays-semitransparent: rgba(221, 225, 228, 0.66);
}
* {
box-sizing: border-box;
}
html,
body {
height: 100%;
margin: 0;
padding: 0;
width: 100%;
}
#mount {
display: flex;
height: 100%;
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
background: transparent;
}
::-webkit-scrollbar-track {
border-radius: 8px;
background: transparent;
}
::-webkit-scrollbar-thumb {
border-radius: 8px;
background: rgba(113, 113, 113, 0.5);
}
:root.theme-dark .CodeMirror-scrollbar-filler {
background: transparent;
}
/* 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/. */
.landing-page {
flex: 1;
display: flex;
@ -275,144 +410,10 @@
padding-left: 3px;
font-weight: normal;
}
/* 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/. */
menu {
display: inline;
padding: 0;
}
menu > menuitem::after {
content: "\25BA";
float: right;
padding-left: 5px;
}
menu > menupopup {
display: none;
}
menu > menuitem:hover + menupopup,
menu > menupopup:hover {
display: block;
}
menupopup {
position: fixed;
z-index: 10000;
background: white;
border: 1px solid #cccccc;
padding: 5px 0;
background: #f2f2f2;
border-radius: 5px;
color: #585858;
box-shadow: 0 0 4px 0 rgba(190, 190, 190, 0.8);
min-width: 130px;
}
menuitem {
display: block;
padding: 0 20px;
line-height: 20px;
font-weight: 500;
font-size: 13px;
-moz-user-select: none;
user-select: none;
}
menuitem:hover {
background: #3780fb;
color: white;
cursor: pointer;
}
menuitem[disabled=true] {
color: #cccccc;
}
menuitem[disabled=true]:hover {
background-color: transparent;
cursor: default;
}
menuitem[type=checkbox]::before {
content: "";
width: 10px;
display: inline-block;
}
menuitem[type=checkbox][checked=true]::before {
content: "\2713";
left: -8px;
position: relative;
}
menuseparator {
border-bottom: 1px solid #cacdd3;
width: 100%;
height: 5px;
display: block;
margin-bottom: 5px;
}
#contextmenu-mask.show {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999;
}
/* 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/. */
:root.theme-light,
:root .theme-light {
--theme-search-overlays-semitransparent: rgba(221, 225, 228, 0.66);
}
* {
box-sizing: border-box;
}
html,
body {
height: 100%;
margin: 0;
padding: 0;
width: 100%;
}
#mount {
display: flex;
height: 100%;
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
background: transparent;
}
::-webkit-scrollbar-track {
border-radius: 8px;
background: transparent;
}
::-webkit-scrollbar-thumb {
border-radius: 8px;
background: rgba(113, 113, 113, 0.5);
}
:root.theme-dark .CodeMirror-scrollbar-filler {
background: transparent;
}
.modal-wrapper {
position: fixed;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
height: 100%;
@ -423,13 +424,12 @@ body {
}
.modal {
top: 0;
margin: auto;
width: 500px;
width: 80%;
height: auto;
overflow-y: scroll;
background-color: var(--theme-toolbar-background);
transform: translateY(-250px);
transition: transform 150ms cubic-bezier(0.07, 0.95, 0, 1);
box-shadow: 0 0 10px 2px var(--popup-shadow-color);
box-shadow: 1px 1px 3px 1px var(--popup-shadow-color);
}
.modal.entering,
@ -439,13 +439,24 @@ body {
.modal.entered,
.modal.exiting {
transform: translateY(0px);
transform: translateY(5px);
}
@media (max-width: 520px) {
/* This rule is active when the screen is not short and narrow */
@media (min-width: 580px) and (min-height: 340px) {
.modal {
width: 80%;
left: 10%;
width: 50%;
}
}
@media (min-height: 340px) {
.modal {
height: auto;
max-height: 80vh;
}
.modal.entered,
.modal.exiting {
transform: translateY(30px);
}
}
.shortcuts-content {
@ -490,10 +501,6 @@ body {
width: calc(100% - 1px); /* 1px fixes the hidden right border */
}
.shortcuts-modal {
width: 45%;
}
.shortcuts-list li {
font-size: 12px;
color: var(--theme-body-color);
@ -1696,10 +1703,10 @@ html .toggle-button-end.vertical svg {
transition: opacity 200ms;
border: none;
background: transparent;
padding: 6px 0.7em;
padding: 6px;
}
.source-footer > .commands > .action i {
.source-footer > .commands > .action img {
height: 100%;
display: flex;
flex-direction: column;
@ -1718,9 +1725,18 @@ html .toggle-button-end.vertical svg {
fill: var(--theme-selection-color);
}
.source-footer > .commands > .action svg {
.source-footer > .commands > .action > img.prettyPrint {
mask: url("chrome://devtools/skin/images/debugger/prettyPrint.svg") no-repeat;
height: 16px;
width: 16px;
background: var(--theme-body-color);
}
.source-footer > .commands > .action > img.blackBox {
mask: url("chrome://devtools/skin/images/debugger/blackBox.svg") no-repeat;
height: 16px;
width: 16px;
background: var(--theme-body-color);
}
.source-footer .commands .coverage {
@ -1733,8 +1749,8 @@ html .toggle-button-end.vertical svg {
border-radius: 2px;
}
.source-footer .black-box.blackboxed svg {
fill: var(--theme-highlight-blue);
.source-footer > .commands > .blackboxed > img.blackBox {
background: var(--theme-highlight-blue);
}
.source-footer .blackbox-summary {
@ -2188,12 +2204,19 @@ html[dir="rtl"] .arrow svg,
box-shadow: 1px 2px 3px var(--popup-shadow-color);
}
.popover .preview-popup .header {
.popover .preview-popup .header-container {
width: 100%;
line-height: 20px;
border-bottom: 1px solid #cccccc;
display: flex;
flex-direction: column;
margin-bottom: 5px;
}
.popover .preview-popup .header-container h3 {
margin: 0;
margin-bottom: 5px;
font-weight: normal;
font-size: 14px;
}
.popover .preview-popup .header .link {
@ -2492,8 +2515,9 @@ html[dir="rtl"] .editor-mount {
}
.CodeMirror-linenumber {
font-size: 11px;
line-height: 14px;
font-size: 12px;
line-height: 15px;
font-family: monospace;
}
.folding-enabled .CodeMirror-linenumber {
@ -3149,6 +3173,18 @@ html .command-bar > button:disabled {
.command-bar > button {
padding: 6px 5px;
}
.command-bar.bottom {
justify-content: flex-end;
}
.command-bar.bottom > button {
color: var(--theme-comment);
width: 26px;
}
.command-bar.bottom > button:hover {
color: var(--theme-body-color);
}
.object-node.default-property {
opacity: 0.6;
}
@ -3373,13 +3409,13 @@ html .welcomebox .toggle-button-end.collapsed {
fill: var(--theme-body-color);
}
.source-tab .prettyPrint {
line-height: 0;
}
.source-tab .prettyPrint svg {
.source-tab img.prettyPrint {
mask: url("chrome://devtools/skin/images/debugger/prettyPrint.svg") no-repeat;
mask-size: 100%;
padding-top: 12px;
height: 12px;
width: 12px;
background: var(--theme-highlight-blue);
}
.source-tab .prettyPrint path {
@ -3388,13 +3424,16 @@ html .welcomebox .toggle-button-end.collapsed {
.source-tab .blackBox,
.source-tab .prettyPrint {
line-height: 0;
align-self: center;
}
.source-tab .blackBox svg {
.source-tab img.blackBox {
mask: url("chrome://devtools/skin/images/debugger/blackBox.svg") no-repeat;
mask-size: 100%;
padding-top: 12px;
height: 12px;
width: 12px;
background: var(--theme-highlight-blue);
}
.source-tab .blackBox path {

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

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

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

@ -78,12 +78,201 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ 1282:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(1283);
module.exports = __webpack_require__(1630);
/***/ }),
/***/ 1283:
/***/ 1363:
/***/ (function(module, exports, __webpack_require__) {
/* 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/. */
const networkRequest = __webpack_require__(1367);
const workerUtils = __webpack_require__(1368);
module.exports = {
networkRequest,
workerUtils
};
/***/ }),
/***/ 1367:
/***/ (function(module, exports) {
/* 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/. */
function networkRequest(url, opts) {
return fetch(url, {
cache: opts.loadFromCache ? "default" : "no-cache"
}).then(res => {
if (res.status >= 200 && res.status < 300) {
return res.text().then(text => ({ content: text }));
}
return Promise.reject(`request failed with status ${res.status}`);
});
}
module.exports = networkRequest;
/***/ }),
/***/ 1368:
/***/ (function(module, exports) {
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
function WorkerDispatcher() {
this.msgId = 1;
this.worker = null;
} /* 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/. */
const mark = typeof window == "object" && window.performance && window.performance.mark ? window.performance.mark.bind(window.performance) : () => {};
const measure = typeof window == "object" && window.performance && window.performance.measure ? window.performance.measure.bind(window.performance) : () => {};
WorkerDispatcher.prototype = {
start(url) {
this.worker = new Worker(url);
this.worker.onerror = () => {
console.error(`Error in worker ${url}`);
};
},
stop() {
if (!this.worker) {
return;
}
this.worker.terminate();
this.worker = null;
},
task(method) {
return (...args) => {
return new Promise((resolve, reject) => {
const id = this.msgId++;
mark(`${method}_start`);
this.worker.postMessage({ id, method, args });
const listener = ({ data: result }) => {
if (result.id !== id) {
return;
}
if (!this.worker) {
reject("Oops, The worker has shutdown!");
return;
}
this.worker.removeEventListener("message", listener);
mark(`${method}_end`);
measure(`${method}`, `${method}_start`, `${method}_end`);
if (result.error) {
reject(result.error);
} else {
resolve(result.response);
}
};
this.worker.addEventListener("message", listener);
});
};
}
};
function workerHandler(publicInterface) {
return function (msg) {
const { id, method, args } = msg.data;
try {
const response = publicInterface[method].apply(undefined, args);
if (response instanceof Promise) {
response.then(val => self.postMessage({ id, response: val }),
// Error can't be sent via postMessage, so be sure to
// convert to string.
err => self.postMessage({ id, error: err.toString() }));
} else {
self.postMessage({ id, response });
}
} catch (error) {
// Error can't be sent via postMessage, so be sure to convert to
// string.
self.postMessage({ id, error: error.toString() });
}
};
}
function streamingWorkerHandler(publicInterface, { timeout = 100 } = {}, worker = self) {
let streamingWorker = (() => {
var _ref = _asyncToGenerator(function* (id, tasks) {
let isWorking = true;
const intervalId = setTimeout(function () {
isWorking = false;
}, timeout);
const results = [];
while (tasks.length !== 0 && isWorking) {
const { callback, context, args } = tasks.shift();
const result = yield callback.call(context, args);
results.push(result);
}
worker.postMessage({ id, status: "pending", data: results });
clearInterval(intervalId);
if (tasks.length !== 0) {
yield streamingWorker(id, tasks);
}
});
return function streamingWorker(_x, _x2) {
return _ref.apply(this, arguments);
};
})();
return (() => {
var _ref2 = _asyncToGenerator(function* (msg) {
const { id, method, args } = msg.data;
const workerMethod = publicInterface[method];
if (!workerMethod) {
console.error(`Could not find ${method} defined in worker.`);
}
worker.postMessage({ id, status: "start" });
try {
const tasks = workerMethod(args);
yield streamingWorker(id, tasks);
worker.postMessage({ id, status: "done" });
} catch (error) {
worker.postMessage({ id, status: "error", error });
}
});
return function (_x3) {
return _ref2.apply(this, arguments);
};
})();
}
module.exports = {
WorkerDispatcher,
workerHandler,
streamingWorkerHandler
};
/***/ }),
/***/ 1630:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -93,19 +282,14 @@ var _prettyFast = __webpack_require__(802);
var _prettyFast2 = _interopRequireDefault(_prettyFast);
var _devtoolsUtils = __webpack_require__(900);
var _devtoolsUtils = __webpack_require__(1363);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var workerHandler = _devtoolsUtils.workerUtils.workerHandler;
const { workerHandler } = _devtoolsUtils.workerUtils;
function prettyPrint(_ref) {
var url = _ref.url,
indent = _ref.indent,
source = _ref.source;
var prettified = (0, _prettyFast2.default)(source, {
function prettyPrint({ url, indent, source }) {
const prettified = (0, _prettyFast2.default)(source, {
url: url,
indent: " ".repeat(indent)
});
@ -118,7 +302,7 @@ function prettyPrint(_ref) {
function invertMappings(mappings) {
return mappings._array.map(m => {
var mapping = {
const mapping = {
generated: {
line: m.originalLine,
column: m.originalColumn
@ -7411,184 +7595,6 @@ SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSou
exports.SourceNode = SourceNode;
/***/ }),
/***/ 900:
/***/ (function(module, exports, __webpack_require__) {
/* 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/. */
const networkRequest = __webpack_require__(901);
const workerUtils = __webpack_require__(902);
module.exports = {
networkRequest,
workerUtils
};
/***/ }),
/***/ 901:
/***/ (function(module, exports) {
/* 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/. */
function networkRequest(url, opts) {
return fetch(url, {
cache: opts.loadFromCache ? "default" : "no-cache"
}).then(res => {
if (res.status >= 200 && res.status < 300) {
return res.text().then(text => ({ content: text }));
}
return Promise.reject(`request failed with status ${res.status}`);
});
}
module.exports = networkRequest;
/***/ }),
/***/ 902:
/***/ (function(module, exports) {
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
function WorkerDispatcher() {
this.msgId = 1;
this.worker = null;
} /* 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/. */
WorkerDispatcher.prototype = {
start(url) {
this.worker = new Worker(url);
this.worker.onerror = () => {
console.error(`Error in worker ${url}`);
};
},
stop() {
if (!this.worker) {
return;
}
this.worker.terminate();
this.worker = null;
},
task(method) {
return (...args) => {
return new Promise((resolve, reject) => {
const id = this.msgId++;
this.worker.postMessage({ id, method, args });
const listener = ({ data: result }) => {
if (result.id !== id) {
return;
}
if (!this.worker) {
reject("Oops, The worker has shutdown!");
return;
}
this.worker.removeEventListener("message", listener);
if (result.error) {
reject(result.error);
} else {
resolve(result.response);
}
};
this.worker.addEventListener("message", listener);
});
};
}
};
function workerHandler(publicInterface) {
return function (msg) {
const { id, method, args } = msg.data;
try {
const response = publicInterface[method].apply(undefined, args);
if (response instanceof Promise) {
response.then(val => self.postMessage({ id, response: val }),
// Error can't be sent via postMessage, so be sure to
// convert to string.
err => self.postMessage({ id, error: err.toString() }));
} else {
self.postMessage({ id, response });
}
} catch (error) {
// Error can't be sent via postMessage, so be sure to convert to
// string.
self.postMessage({ id, error: error.toString() });
}
};
}
function streamingWorkerHandler(publicInterface, { timeout = 100 } = {}, worker = self) {
let streamingWorker = (() => {
var _ref = _asyncToGenerator(function* (id, tasks) {
let isWorking = true;
const intervalId = setTimeout(function () {
isWorking = false;
}, timeout);
const results = [];
while (tasks.length !== 0 && isWorking) {
const { callback, context, args } = tasks.shift();
const result = yield callback.call(context, args);
results.push(result);
}
worker.postMessage({ id, status: "pending", data: results });
clearInterval(intervalId);
if (tasks.length !== 0) {
yield streamingWorker(id, tasks);
}
});
return function streamingWorker(_x, _x2) {
return _ref.apply(this, arguments);
};
})();
return (() => {
var _ref2 = _asyncToGenerator(function* (msg) {
const { id, method, args } = msg.data;
const workerMethod = publicInterface[method];
if (!workerMethod) {
console.error(`Could not find ${method} defined in worker.`);
}
worker.postMessage({ id, status: "start" });
try {
const tasks = workerMethod(args);
yield streamingWorker(id, tasks);
worker.postMessage({ id, status: "done" });
} catch (error) {
worker.postMessage({ id, status: "error", error });
}
});
return function (_x3) {
return _ref2.apply(this, arguments);
};
})();
}
module.exports = {
WorkerDispatcher,
workerHandler,
streamingWorkerHandler
};
/***/ })
/******/ });

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

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

@ -109,5 +109,5 @@ skip-if = true # Bug 1393121, 1393299
[browser_dbg-tabs.js]
[browser_dbg-toggling-tools.js]
[browser_dbg-wasm-sourcemaps.js]
skip-if = true
skip-if = asan
[browser_dbg-reload.js]

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

@ -39,21 +39,21 @@ add_task(async function() {
const dbg = await initDebugger("doc-scripts.html");
await selectSource(dbg, "simple2");
dump('Adding a conditional Breakpoint\n')
dump("Adding a conditional Breakpoint\n");
await setConditionalBreakpoint(dbg, 5, "1");
await waitForDispatch(dbg, "ADD_BREAKPOINT");
let bp = findBreakpoint(dbg, "simple2", 5);
is(bp.condition, "1", "breakpoint is created with the condition");
assertEditorBreakpoint(dbg, 5, true);
dump('Editing a conditional breakpoint\n')
dump("Editing a conditional breakpoint\n");
await setConditionalBreakpoint(dbg, 5, "2");
await waitForDispatch(dbg, "SET_BREAKPOINT_CONDITION");
bp = findBreakpoint(dbg, "simple2", 5);
is(bp.condition, "12", "breakpoint is created with the condition");
assertEditorBreakpoint(dbg, 5, true);
dump("Removing a conditional breakpoint\n")
dump("Removing a conditional breakpoint\n");
clickElement(dbg, "gutter", 5);
await waitForDispatch(dbg, "REMOVE_BREAKPOINT");
bp = findBreakpoint(dbg, "simple2", 5);

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

@ -9,7 +9,9 @@
* Tests that the debugger is succesfully loaded in the Browser Content Toolbox.
*/
const {gDevToolsBrowser} = require("devtools/client/framework/devtools-browser");
const {
gDevToolsBrowser
} = require("devtools/client/framework/devtools-browser");
function toggleBreakpoint(dbg, index) {
const bp = findElement(dbg, "breakpointItem", index);

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

@ -0,0 +1,81 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* This if the debugger's layout is correctly modified when the toolbox's
* host changes.
*/
"use strict";
var gDefaultHostType = Services.prefs.getCharPref("devtools.toolbox.host");
add_task(async function() {
// test is too slow on some platforms due to the number of test cases
requestLongerTimeout(2);
const dbg = await initDebugger("doc-iframes.html");
const layouts = [
["horizontal", "bottom"],
["vertical", "side"],
["horizontal", "window:big"],
["vertical", "window:small"]
];
for (let layout of layouts) {
const [orientation, host] = layout;
await testLayout(dbg, orientation, host);
}
ok(true, "Orientations are correct");
});
async function testLayout(dbg, orientation, host) {
const { panel, toolbox } = dbg;
info(`Switching to ${host} ${orientation}.`);
await switchHost(dbg, host);
await resizeToolboxWindow(dbg, host);
return waitForState(
dbg,
state => dbg.selectors.getOrientation(state) == orientation
);
}
function getHost(host) {
if (host.indexOf("window") == 0) {
return "window";
}
return host;
}
async function switchHost(dbg, hostType) {
const { toolbox } = dbg;
await toolbox.switchHost(getHost(hostType));
}
function resizeToolboxWindow(dbg, host) {
const { panel, toolbox } = dbg;
let sizeOption = host.split(":")[1];
let win = toolbox.win.parent;
let breakpoint = 700;
if (sizeOption == "big" && win.outerWidth <= breakpoint) {
return resizeWindow(dbg, breakpoint + 300);
} else if (sizeOption == "small" && win.outerWidth >= breakpoint) {
return resizeWindow(dbg, breakpoint - 300);
}
}
function resizeWindow(dbg, width) {
const { panel, toolbox } = dbg;
let win = toolbox.win.parent;
const currentWidth = win.screen.width;
win.resizeTo(width, window.screen.availHeight);
}
registerCleanupFunction(function() {
Services.prefs.setCharPref("devtools.toolbox.host", gDefaultHostType);
gDefaultHostType = null;
});

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

@ -7,6 +7,10 @@
add_task(async function() {
const dbg = await initDebugger("doc-wasm-sourcemaps.html");
// NOTE: wait for page load -- attempt to fight the intermittent failure:
// "A promise chain failed to handle a rejection: Debugger.Frame is not live"
await waitForSource(dbg, "doc-wasm-sourcemaps");
await reload(dbg);
await waitForPaused(dbg);
assertPausedLocation(dbg);

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

@ -362,11 +362,11 @@ function createDebuggerContext(toolbox) {
store: store,
client: client,
toolbox: toolbox,
win: win
win: win,
panel: panel
};
}
/**
* Clear all the debugger related preferences.
*/
@ -511,7 +511,7 @@ function stepOut(dbg) {
function resume(dbg) {
info("Resuming");
dbg.actions.resume();
return waitForState(dbg, (state) => !dbg.selectors.isPaused(state));
return waitForState(dbg, state => !dbg.selectors.isPaused(state));
}
function deleteExpression(dbg, input) {

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

@ -299,3 +299,5 @@ devtools.jar:
# Debugger
skin/images/debugger/arrow.svg (themes/images/debugger/arrow.svg)
skin/images/debugger/blackBox.svg (themes/images/debugger/blackBox.svg)
skin/images/debugger/prettyPrint.svg (themes/images/debugger/prettyPrint.svg)

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

@ -24,6 +24,11 @@ copySource.accesskey=y
copySourceUri2=Copy source URI
copySourceUri2.accesskey=u
# LOCALIZATION NOTE (setDirectoryRoot): This is the text that appears in the
# context menu to set a directory as root directory
setDirectoryRoot.label=Set directory root
setDirectoryRoot.accesskey=r
# LOCALIZATION NOTE (copyFunction): This is the text that appears in the
# context menu to copy the function the user selected
copyFunction.label=Copy function
@ -367,6 +372,7 @@ editor.addBreakpoint=Add breakpoint
# LOCALIZATION NOTE (editor.disableBreakpoint): Editor gutter context menu item
# for disabling a breakpoint on a line.
editor.disableBreakpoint=Disable breakpoint
editor.disableBreakpoint.accesskey=D
# LOCALIZATION NOTE (editor.enableBreakpoint): Editor gutter context menu item
# for enabling a breakpoint on a line.
@ -381,8 +387,9 @@ editor.removeBreakpoint=Remove breakpoint
editor.editBreakpoint=Edit breakpoint
# LOCALIZATION NOTE (editor.addConditionalBreakpoint): Editor gutter context
# menu item for adding a breakpoint condition on a line.
editor.addConditionalBreakpoint=Add conditional breakpoint
# menu item for adding/editing a breakpoint condition on a line.
editor.addConditionalBreakpoint=Add/Edit conditional breakpoint
editor.addConditionalBreakpoint.accesskey=c
# LOCALIZATION NOTE (editor.conditionalPanel.placeholder): Placeholder text for
# input element inside ConditionalPanel component
@ -395,6 +402,7 @@ editor.conditionalPanel.close=Cancel edit breakpoint and close
# LOCALIZATION NOTE (editor.jumpToMappedLocation1): Context menu item
# for navigating to a source mapped location
editor.jumpToMappedLocation1=Jump to %S location
editor.jumpToMappedLocation1.accesskey=m
# LOCALIZATION NOTE (framework.disableGrouping): This is the text that appears in the
# context menu to disable framework grouping.
@ -415,6 +423,7 @@ original=original
# LOCALIZATION NOTE (expressions.placeholder): Placeholder text for expression
# input element
expressions.placeholder=Add watch expression
expressions.placeholder.accesskey=e
# LOCALIZATION NOTE (sourceTabs.closeTab): Editor source tab context menu item
# for closing the selected tab below the mouse.
@ -468,10 +477,6 @@ sourceFooter.codeCoverage=Code coverage
# for close tab button in source tabs.
sourceTabs.closeTabButtonTooltip=Close tab
# LOCALIZATION NOTE (sourceTabs.newTabButtonTooltip): The tooltip that is displayed for
# new tab button in source tabs.
sourceTabs.newTabButtonTooltip=Search for sources (%S)
# LOCALIZATION NOTE (scopes.header): Scopes right sidebar pane header.
scopes.header=Scopes
@ -754,6 +759,7 @@ anonymous=(anonymous)
# LOCALIZATION NOTE (shortcuts.toggleBreakpoint): text describing
# keyboard shortcut action for toggling breakpoint
shortcuts.toggleBreakpoint=Toggle Breakpoint
shortcuts.toggleBreakpoint.accesskey=B
# LOCALIZATION NOTE (shortcuts.toggleCondPanel): text describing
# keyboard shortcut action for toggling conditional panel keyboard

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

@ -37,5 +37,10 @@ pref("devtools.debugger.file-search-case-sensitive", false);
pref("devtools.debugger.file-search-whole-word", false);
pref("devtools.debugger.file-search-regex-match", false);
pref("devtools.debugger.features.async-stepping", true);
pref("devtools.debugger.features.project-text-search", true);
pref("devtools.debugger.features.wasm", true);
pref("devtools.debugger.features.shortcuts", true);
pref("devtools.debugger.project-directory-root", "");
pref("devtools.debugger.features.root", false);
pref("devtools.debugger.features.column-breakpoints", false);

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

@ -0,0 +1,9 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g fill-rule="evenodd">
<circle cx="8" cy="8.5" r="1.5"/>
<path d="M15.498 8.28l-.001-.03v-.002-.004l-.002-.018-.004-.031c0-.002 0-.002 0 0l-.004-.035.006.082c-.037-.296-.133-.501-.28-.661-.4-.522-.915-1.042-1.562-1.604-1.36-1.182-2.74-1.975-4.178-2.309a6.544 6.544 0 0 0-2.755-.042c-.78.153-1.565.462-2.369.91C3.252 5.147 2.207 6 1.252 7.035c-.216.233-.36.398-.499.577-.338.437-.338 1 0 1.437.428.552.941 1.072 1.59 1.635 1.359 1.181 2.739 1.975 4.177 2.308.907.21 1.829.223 2.756.043.78-.153 1.564-.462 2.369-.91 1.097-.612 2.141-1.464 3.097-2.499.217-.235.36-.398.498-.578.12-.128.216-.334.248-.554 0 .01 0 .01-.008.04l.013-.079-.001.011.003-.031.001-.017v.005l.001-.02v.008l.002-.03.001-.05-.001-.044v-.004-.004zm-.954.045v.007l.001.004V8.33v.012l-.001.01v-.005-.005l.002-.015-.001.008c-.002.014-.002.014 0 0l-.007.084c.003-.057-.004-.041-.014-.031-.143.182-.27.327-.468.543-.89.963-1.856 1.752-2.86 2.311-.724.404-1.419.677-2.095.81a5.63 5.63 0 0 1-2.374-.036c-1.273-.295-2.523-1.014-3.774-2.101-.604-.525-1.075-1.001-1.457-1.496-.054-.07-.054-.107 0-.177.117-.152.244-.298.442-.512.89-.963 1.856-1.752 2.86-2.311.724-.404 1.419-.678 2.095-.81a5.631 5.631 0 0 1 2.374.036c1.272.295 2.523 1.014 3.774 2.101.603.524 1.074 1 1.457 1.496.035.041.043.057.046.076 0 .01 0 .01.008.043l-.009-.047.003.02-.002-.013v-.008.016c0-.004 0-.004 0 0v-.004z"/>
</g>
</svg>

После

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

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

@ -0,0 +1,6 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<path d="M4.525 13.21h-.472c-.574 0-.987-.154-1.24-.463-.253-.31-.38-.882-.38-1.719v-.573c0-.746-.097-1.265-.292-1.557-.196-.293-.51-.44-.945-.44v-.974c.435 0 .75-.146.945-.44.195-.292.293-.811.293-1.556v-.58c0-.833.126-1.404.379-1.712.253-.31.666-.464 1.24-.464h.472v.783h-.179c-.37 0-.628.08-.774.24-.145.159-.218.54-.218 1.141v.383c0 .824-.096 1.432-.287 1.823-.191.39-.516.679-.974.866.458.191.783.482.974.873.191.39.287.998.287 1.823v.382c0 .602.073.982.218 1.142.146.16.404.239.774.239h.18v.783zm9.502-4.752c-.43 0-.744.147-.942.44-.197.292-.296.811-.296 1.557v.573c0 .837-.125 1.41-.376 1.719-.251.309-.664.463-1.237.463h-.478v-.783h.185c.37 0 .628-.08.774-.24.145-.159.218-.539.218-1.14v-.383c0-.825.096-1.433.287-1.823.191-.39.516-.682.974-.873-.458-.187-.783-.476-.974-.866-.191-.391-.287-.999-.287-1.823v-.383c0-.602-.073-.982-.218-1.142-.146-.159-.404-.239-.774-.239h-.185v-.783h.478c.573 0 .986.155 1.237.464.25.308.376.88.376 1.712v.58c0 .673.088 1.174.263 1.503.176.329.5.493.975.493v.974z" fill-rule="evenodd"/>
</svg>

После

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