зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1365059 - Update Debugger frontend (5/15/2017). r=jdescottes
MozReview-Commit-ID: 34vyUjfmd1Z --HG-- extra : rebase_source : 52d4c3032cbc490b5d0556c2744a35623211c4ea
This commit is contained in:
Родитель
4d16361faf
Коммит
03467c51b9
|
@ -979,14 +979,13 @@ html .arrow.expanded svg {
|
|||
.search-field .search-nav-buttons .nav-btn path {
|
||||
fill: var(--theme-comment);
|
||||
}
|
||||
|
||||
.result-list {
|
||||
list-style: none;
|
||||
width: 100%;
|
||||
background-color: var(--theme-toolbar-background);
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
overflow: auto;
|
||||
width: calc(100% - 1px); /* 1px fixes the hidden right border */
|
||||
}
|
||||
|
||||
.result-list.big {
|
||||
|
@ -1004,10 +1003,7 @@ html .arrow.expanded svg {
|
|||
padding: 4px 13px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.result-list li:first-child {
|
||||
border-top: none;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.result-list.big li {
|
||||
|
@ -1022,12 +1018,7 @@ html .arrow.expanded svg {
|
|||
}
|
||||
|
||||
.result-list li.selected {
|
||||
border: 1px solid var(--theme-selection-background);
|
||||
}
|
||||
|
||||
.result-list.big li.selected {
|
||||
padding-left: 9px;
|
||||
padding-top: 9px;
|
||||
border-color: var(--theme-selection-background);
|
||||
}
|
||||
|
||||
.search-bar .result-list li.selected {
|
||||
|
@ -1035,6 +1026,10 @@ html .arrow.expanded svg {
|
|||
color: white;
|
||||
}
|
||||
|
||||
.theme-dark .search-bar .result-list li.selected {
|
||||
background-color: var(--theme-body-background);
|
||||
}
|
||||
|
||||
.result-list li .title {
|
||||
line-height: 1.5em;
|
||||
word-break: break-all;
|
||||
|
@ -1132,6 +1127,35 @@ html .arrow.expanded svg {
|
|||
padding-top: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
.outline-list {
|
||||
list-style-type: "-";
|
||||
}
|
||||
|
||||
.outline-list__element {
|
||||
color: blue;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
|
||||
.function-signature {
|
||||
line-height: 20px;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.function-signature .function-name {
|
||||
color: var(--theme-highlight-blue);
|
||||
}
|
||||
|
||||
.function-signature .param {
|
||||
color: var(--string-color);
|
||||
}
|
||||
|
||||
.function-signature .paren {
|
||||
color: var(--object-color);
|
||||
}
|
||||
|
||||
.function-signature .comma {
|
||||
color: var(--object-color);
|
||||
}
|
||||
.tree {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
|
@ -1159,6 +1183,10 @@ html .arrow.expanded svg {
|
|||
background-color: var(--theme-selection-background);
|
||||
}
|
||||
|
||||
.theme-dark .tree .node.focused {
|
||||
background-color: var(--theme-selection-background-semitransparent);
|
||||
}
|
||||
|
||||
html:not([dir="rtl"]) .tree .node > div {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
@ -1209,6 +1237,11 @@ html[dir="rtl"] .tree .node > div {
|
|||
transform: translate(0, 2px);
|
||||
transition: transform 0.25s ease-in-out;
|
||||
cursor: pointer;
|
||||
padding: 5px 2px;
|
||||
}
|
||||
|
||||
.toggle-button-start.vertical,
|
||||
.toggle-button-end.vertical {
|
||||
padding: 4px 2px;
|
||||
}
|
||||
|
||||
|
@ -1241,10 +1274,6 @@ html .toggle-button-end.vertical svg {
|
|||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.toggle-button-end.vertical {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.toggle-button-start.collapsed,
|
||||
.toggle-button-end.collapsed {
|
||||
transform: rotate(180deg);
|
||||
|
@ -1454,78 +1483,59 @@ html .toggle-button-end.vertical svg {
|
|||
.search-bar .result-list {
|
||||
max-height: 230px;
|
||||
}
|
||||
|
||||
.function-signature {
|
||||
line-height: 20px;
|
||||
align-self: center;
|
||||
.object-value .unavailable {
|
||||
color: var(--theme-comment);
|
||||
}
|
||||
.bracket-arrow {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.function-signature .function-name {
|
||||
color: var(--theme-highlight-blue);
|
||||
}
|
||||
|
||||
.function-signature .param {
|
||||
color: var(--string-color);
|
||||
}
|
||||
|
||||
.function-signature .paren {
|
||||
color: var(--object-color);
|
||||
}
|
||||
|
||||
.function-signature .comma {
|
||||
color: var(--object-color);
|
||||
}
|
||||
.popover {
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
box-shadow: 1px 2px 4px 1px var(--theme-toolbar-background-alt);
|
||||
}
|
||||
|
||||
.popover .gap {
|
||||
height: 5px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.popover::before,
|
||||
.popover::after {
|
||||
.bracket-arrow::before,
|
||||
.bracket-arrow::after {
|
||||
content: '';
|
||||
height: 0;
|
||||
width: 0;
|
||||
position: absolute;
|
||||
border: 7px solid transparent;
|
||||
left: calc(20% - 7px); /* corresponds to calculation in Popover.js */
|
||||
}
|
||||
|
||||
.popover::before {
|
||||
.bracket-arrow.up::before {
|
||||
border-bottom-color: var(--theme-splitter-color);
|
||||
top: -9px;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
.theme-dark .popover::before {
|
||||
.theme-dark .bracket-arrow.up::before {
|
||||
border-bottom-color: var(--theme-body-color);
|
||||
}
|
||||
|
||||
.popover::after {
|
||||
.bracket-arrow.up::after {
|
||||
border-bottom-color: var(--theme-body-background);
|
||||
top: -8px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.popover.up::before {
|
||||
.bracket-arrow.down::before {
|
||||
border-bottom-color: transparent;
|
||||
border-top-color: var(--theme-splitter-color);
|
||||
bottom: -9px;
|
||||
top: initial;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.theme-dark .popover.up::before {
|
||||
.theme-dark .bracket-arrow.down::before {
|
||||
border-top-color: var(--theme-body-color);
|
||||
}
|
||||
|
||||
.popover.up::after {
|
||||
.bracket-arrow.down::after {
|
||||
border-bottom-color: transparent;
|
||||
border-top-color: var(--theme-body-background);
|
||||
bottom: -8px;
|
||||
top: initial;
|
||||
border-top-color: var(--theme-toolbar-background);
|
||||
top: -1px;
|
||||
}
|
||||
.popover {
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.popover .gap {
|
||||
height: 5px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.popover .preview {
|
||||
background: var(--theme-body-background);
|
||||
|
@ -1607,6 +1617,7 @@ html .toggle-button-end.vertical svg {
|
|||
|
||||
.add-to-expression-bar {
|
||||
border: 1px solid var(--theme-splitter-color);
|
||||
border-top: none;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
|
@ -1633,11 +1644,15 @@ html .toggle-button-end.vertical svg {
|
|||
color: var(--theme-comment);
|
||||
cursor: pointer;
|
||||
}
|
||||
/* vim:set ts=2 sw=2 sts=2 et: */
|
||||
.editor-wrapper {
|
||||
--debug-line-background: rgba(226, 236, 247, 0.5);
|
||||
--debug-line-border: rgb(145, 188, 219);
|
||||
}
|
||||
|
||||
/* 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/. */
|
||||
.theme-dark .editor-wrapper {
|
||||
--debug-line-background: rgb(73, 82, 103);
|
||||
--debug-line-border: rgb(119, 134, 162);
|
||||
}
|
||||
|
||||
/**
|
||||
* There's a known codemirror flex issue with chrome that this addresses.
|
||||
|
@ -1677,6 +1692,10 @@ html[dir="rtl"] .editor-mount {
|
|||
height: 14px;
|
||||
}
|
||||
|
||||
.editor-wrapper .highlight-lines {
|
||||
background: var(--theme-selection-background-semitransparent);
|
||||
}
|
||||
|
||||
.coverage-on .CodeMirror-code :not(.hit-marker) .CodeMirror-line,
|
||||
.coverage-on .CodeMirror-code :not(.hit-marker) .CodeMirror-gutter-wrapper {
|
||||
opacity: 0.5;
|
||||
|
@ -1717,6 +1736,17 @@ html[dir="rtl"] .editor-mount {
|
|||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.editor.column-breakpoint svg {
|
||||
fill: var(--theme-selection-background);
|
||||
vertical-align: middle;
|
||||
width: 17px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.editor.column-breakpoint.breakpoint-disabled svg {
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.CodeMirror {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
@ -1756,13 +1786,18 @@ html[dir="rtl"] .editor-mount {
|
|||
color: var(--theme-content-color3);
|
||||
}
|
||||
|
||||
.debug-line .CodeMirror-line {
|
||||
background-color: var(--breakpoint-active-color) !important;
|
||||
.new-debug-line .CodeMirror-line {
|
||||
background-color: var(--debug-line-background) !important;
|
||||
outline: var(--debug-line-border) solid 1px;
|
||||
}
|
||||
|
||||
.new-debug-line .CodeMirror-linenumber {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
/* Don't display the highlight color since the debug line
|
||||
is already highlighted */
|
||||
.debug-line .CodeMirror-activeline-background {
|
||||
.new-debug-line .CodeMirror-activeline-background {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
@ -1812,13 +1847,13 @@ html[dir="rtl"] .editor-mount {
|
|||
}
|
||||
|
||||
.why-paused {
|
||||
background-color: var(--breakpoint-active-color);
|
||||
background-color: var(--theme-body-background);
|
||||
border-bottom: 1px solid var(--theme-splitter-color);
|
||||
color: var(--theme-highlight-blue);
|
||||
padding: 10px 10px 10px 20px;
|
||||
white-space: normal;
|
||||
opacity: 0.9;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
flex: 0 1 auto;
|
||||
}
|
||||
|
||||
|
@ -1829,6 +1864,10 @@ html[dir="rtl"] .editor-mount {
|
|||
.why-paused .message {
|
||||
font-size: 10px;
|
||||
}
|
||||
.breakpoints-toggle {
|
||||
margin: 2px 3px;
|
||||
}
|
||||
|
||||
.breakpoints-list * {
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
|
@ -1884,6 +1923,7 @@ html .breakpoints-list .breakpoint.paused {
|
|||
|
||||
.breakpoints-list .breakpoint-checkbox {
|
||||
margin-inline-start: 0;
|
||||
vertical-align: -2px;
|
||||
}
|
||||
|
||||
.breakpoints-list .breakpoint-label {
|
||||
|
@ -1916,8 +1956,9 @@ html .breakpoints-list .breakpoint.paused {
|
|||
|
||||
.breakpoint .close-btn {
|
||||
position: absolute;
|
||||
offset-inline-end: 16px;
|
||||
top: 12px;
|
||||
offset-inline-end: 13px;
|
||||
offset-inline-start: auto;
|
||||
top: 9px;
|
||||
}
|
||||
|
||||
.breakpoint .close {
|
||||
|
@ -2410,10 +2451,16 @@ html .command-bar > button:disabled {
|
|||
z-index: 100;
|
||||
}
|
||||
|
||||
html .welcomebox .toggle-button-end {
|
||||
bottom: 11px;
|
||||
.welcomebox .toggle-button-end {
|
||||
position: absolute;
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
offset-inline-end: 0;
|
||||
offset-inline-start: auto;
|
||||
}
|
||||
|
||||
html .welcomebox .toggle-button-end.collapsed {
|
||||
bottom: 1px;
|
||||
}
|
||||
.source-header {
|
||||
border-bottom: 1px solid var(--theme-splitter-color);
|
||||
|
@ -2430,7 +2477,7 @@ html .welcomebox .toggle-button-end {
|
|||
|
||||
.source-header .new-tab-btn {
|
||||
padding: 0px 4px;
|
||||
margin-top: 8px;
|
||||
margin-top: 4px;
|
||||
cursor: pointer;
|
||||
fill: var(--theme-comment);
|
||||
transition: 0.1s ease;
|
||||
|
@ -2450,15 +2497,15 @@ html .welcomebox .toggle-button-end {
|
|||
border: 1px solid transparent;
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 2px;
|
||||
height: 30px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
align-items: flex-end;
|
||||
position: relative;
|
||||
transition: all 0.25s ease;
|
||||
min-width: 40px;
|
||||
overflow: hidden;
|
||||
padding: 6px;
|
||||
padding: 5px;
|
||||
margin-inline-start: 3px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.source-tab:hover {
|
||||
|
@ -2492,9 +2539,10 @@ html .welcomebox .toggle-button-end {
|
|||
fill: var(--theme-textbox-box-shadow);
|
||||
}
|
||||
|
||||
.source-tab .blackBox {
|
||||
.source-tab .blackBox,
|
||||
.source-tab .prettyPrint {
|
||||
line-height: 0;
|
||||
padding: 5px;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.source-tab .blackBox svg {
|
||||
|
@ -2506,20 +2554,21 @@ html .welcomebox .toggle-button-end {
|
|||
fill: var(--theme-textbox-box-shadow);
|
||||
}
|
||||
|
||||
.theme-dark .source-tab .blackBox circle {
|
||||
fill: var(--theme-body-color);
|
||||
}
|
||||
|
||||
.source-tab .filename {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.source-tab.pretty .filename {
|
||||
padding-inline-start: 8px;
|
||||
padding: 0 4px;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.source-tab .close-btn {
|
||||
visibility: hidden;
|
||||
line-height: 0;
|
||||
margin-inline-start: 6px;
|
||||
}
|
||||
|
||||
.source-tab.active .close-btn {
|
||||
|
@ -2536,8 +2585,8 @@ html .welcomebox .toggle-button-end {
|
|||
box-shadow: 0 4px 4px 0 var(--search-overlays-semitransparent);
|
||||
max-height: 300px;
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
top: 35px;
|
||||
right: 0;
|
||||
top: 23px;
|
||||
width: var(--width);
|
||||
z-index: 1000;
|
||||
}
|
||||
|
@ -2559,7 +2608,6 @@ html[dir="rtl"] .dropdown {
|
|||
border: none;
|
||||
padding: 0;
|
||||
font-weight: 100;
|
||||
margin-top: 6px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -5368,7 +5368,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
this.potentialArrowAt = -1;
|
||||
|
||||
this.inMethod = this.inFunction = this.inGenerator = this.inAsync = this.inPropertyName = this.inType = this.noAnonFunctionType = false;
|
||||
this.inMethod = this.inFunction = this.inGenerator = this.inAsync = this.inPropertyName = this.inType = this.inClassProperty = this.noAnonFunctionType = false;
|
||||
|
||||
this.labels = [];
|
||||
|
||||
|
@ -6080,25 +6080,29 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
Tokenizer.prototype.readNumber = function readNumber(startsWithDot) {
|
||||
var start = this.state.pos;
|
||||
var octal = this.input.charCodeAt(this.state.pos) === 48;
|
||||
var octal = this.input.charCodeAt(start) === 48; // '0'
|
||||
var isFloat = false;
|
||||
|
||||
if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number");
|
||||
if (octal && this.state.pos == start + 1) octal = false; // number === 0
|
||||
|
||||
var next = this.input.charCodeAt(this.state.pos);
|
||||
if (next === 46) {
|
||||
if (next === 46 && !octal) {
|
||||
// '.'
|
||||
++this.state.pos;
|
||||
this.readInt(10);
|
||||
isFloat = true;
|
||||
next = this.input.charCodeAt(this.state.pos);
|
||||
}
|
||||
if (next === 69 || next === 101) {
|
||||
|
||||
if ((next === 69 || next === 101) && !octal) {
|
||||
// 'eE'
|
||||
next = this.input.charCodeAt(++this.state.pos);
|
||||
if (next === 43 || next === 45) ++this.state.pos; // '+-'
|
||||
if (this.readInt(10) === null) this.raise(start, "Invalid number");
|
||||
isFloat = true;
|
||||
}
|
||||
|
||||
if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.state.pos, "Identifier directly after number");
|
||||
|
||||
var str = this.input.slice(start, this.state.pos);
|
||||
|
@ -6107,8 +6111,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
val = parseFloat(str);
|
||||
} else if (!octal || str.length === 1) {
|
||||
val = parseInt(str, 10);
|
||||
} else if (/[89]/.test(str) || this.state.strict) {
|
||||
} else if (this.state.strict) {
|
||||
this.raise(start, "Invalid number");
|
||||
} else if (/[89]/.test(str)) {
|
||||
val = parseInt(str, 10);
|
||||
} else {
|
||||
val = parseInt(str, 8);
|
||||
}
|
||||
|
@ -7407,6 +7413,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
};
|
||||
|
||||
pp$1.parseClassProperty = function (node) {
|
||||
this.state.inClassProperty = true;
|
||||
if (this.match(types.eq)) {
|
||||
if (!this.hasPlugin("classProperties")) this.unexpected();
|
||||
this.next();
|
||||
|
@ -7415,6 +7422,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
node.value = null;
|
||||
}
|
||||
this.semicolon();
|
||||
this.state.inClassProperty = false;
|
||||
return this.finishNode(node, "ClassProperty");
|
||||
};
|
||||
|
||||
|
@ -8446,7 +8454,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
switch (this.state.type) {
|
||||
case types._super:
|
||||
if (!this.state.inMethod && !this.options.allowSuperOutsideMethod) {
|
||||
if (!this.state.inMethod && !this.state.inClassProperty && !this.options.allowSuperOutsideMethod) {
|
||||
this.raise(this.state.start, "'super' outside of function or class");
|
||||
}
|
||||
|
||||
|
@ -8955,8 +8963,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
|
||||
if (!prop.computed && prop.key.type === "Identifier") {
|
||||
this.checkReservedWord(prop.key.name, prop.key.start, true, true);
|
||||
|
||||
if (isPattern) {
|
||||
this.checkReservedWord(prop.key.name, prop.key.start, true, true);
|
||||
prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
|
||||
} else if (this.match(types.eq) && refShorthandDefaultPos) {
|
||||
if (!refShorthandDefaultPos.start) {
|
||||
|
@ -10199,7 +10208,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
} else {
|
||||
if (this.match(types.ellipsis)) {
|
||||
if (!allowSpread) {
|
||||
this.unexpected(null, "Spread operator cannnot appear in class or interface definitions");
|
||||
this.unexpected(null, "Spread operator cannot appear in class or interface definitions");
|
||||
}
|
||||
if (variance) {
|
||||
this.unexpected(variance.start, "Spread properties cannot have variance");
|
||||
|
@ -10885,6 +10894,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
};
|
||||
});
|
||||
|
||||
instance.extend("isNonstaticConstructor", function (inner) {
|
||||
return function (method) {
|
||||
return !this.match(types.colon) && inner.call(this, method);
|
||||
};
|
||||
});
|
||||
|
||||
// parse type parameters for class methods
|
||||
instance.extend("parseClassMethod", function (inner) {
|
||||
return function (classBody, method) {
|
||||
|
@ -11141,6 +11156,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
} catch (err) {
|
||||
if (err instanceof SyntaxError) {
|
||||
this.state = state;
|
||||
|
||||
// Remove `tc.j_expr` and `tc.j_oTag` from context added
|
||||
// by parsing `jsxTagStart` to stop the JSX plugin from
|
||||
// messing with the tokens
|
||||
this.state.context.length -= 2;
|
||||
|
||||
jsxError = err;
|
||||
} else {
|
||||
// istanbul ignore next: no such error is expected
|
||||
|
@ -11149,9 +11170,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
}
|
||||
|
||||
// Need to push something onto the context to stop
|
||||
// the JSX plugin from messing with the tokens
|
||||
this.state.context.push(types$1.parenExpression);
|
||||
if (jsxError != null || this.isRelational("<")) {
|
||||
var arrowExpression = void 0;
|
||||
var typeParameters = void 0;
|
||||
|
@ -11174,7 +11192,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
this.raise(typeParameters.start, "Expected an arrow function after this type parameter declaration");
|
||||
}
|
||||
}
|
||||
this.state.context.pop();
|
||||
|
||||
return inner.apply(this, args);
|
||||
};
|
||||
|
@ -19540,7 +19557,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
exports.disable = disable;
|
||||
exports.enable = enable;
|
||||
exports.enabled = enabled;
|
||||
exports.humanize = __webpack_require__(1016);
|
||||
exports.humanize = __webpack_require__(1024);
|
||||
|
||||
/**
|
||||
* The currently active debug mode names, and names to skip.
|
||||
|
@ -28947,41 +28964,63 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
exports.getVariablesInScope = getVariablesInScope;
|
||||
exports.isExpressionInScope = isExpressionInScope;
|
||||
|
||||
var _babylon = __webpack_require__(435);
|
||||
|
||||
var babylon = _interopRequireWildcard(_babylon);
|
||||
|
||||
var _babelTraverse = __webpack_require__(436);
|
||||
|
||||
var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
|
||||
|
||||
var _babelTypes = __webpack_require__(493);
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
var _devtoolsConfig = __webpack_require__(828);
|
||||
|
||||
var _toPairs = __webpack_require__(195);
|
||||
|
||||
var _toPairs2 = _interopRequireDefault(_toPairs);
|
||||
|
||||
var _isEmpty = __webpack_require__(963);
|
||||
|
||||
var _isEmpty2 = _interopRequireDefault(_isEmpty);
|
||||
|
||||
var _uniq = __webpack_require__(561);
|
||||
|
||||
var _uniq2 = _interopRequireDefault(_uniq);
|
||||
|
||||
var _parseScriptTags = __webpack_require__(1023);
|
||||
|
||||
var _parseScriptTags2 = _interopRequireDefault(_parseScriptTags);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
||||
|
||||
var babylon = __webpack_require__(435);
|
||||
var traverse = __webpack_require__(436).default;
|
||||
var t = __webpack_require__(493);
|
||||
|
||||
var _require = __webpack_require__(828),
|
||||
isDevelopment = _require.isDevelopment;
|
||||
|
||||
var toPairs = __webpack_require__(195);
|
||||
var isEmpty = __webpack_require__(963);
|
||||
var uniq = __webpack_require__(561);
|
||||
|
||||
var ASTs = new Map();
|
||||
|
||||
var symbolDeclarations = new Map();
|
||||
|
||||
function _parse(code) {
|
||||
return babylon.parse(code, {
|
||||
function _parse(code, opts) {
|
||||
return babylon.parse(code, Object.assign({}, opts, {
|
||||
sourceType: "module",
|
||||
|
||||
plugins: ["jsx", "flow"]
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
function parse(text) {
|
||||
function parse(text, opts) {
|
||||
var ast = void 0;
|
||||
if (!text) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
ast = _parse(text);
|
||||
ast = _parse(text, opts);
|
||||
} catch (error) {
|
||||
if (isDevelopment()) {
|
||||
if ((0, _devtoolsConfig.isDevelopment)()) {
|
||||
console.warn("parse failed", text);
|
||||
}
|
||||
|
||||
|
@ -28997,7 +29036,19 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
|
||||
var ast = {};
|
||||
if (sourceText.contentType == "text/javascript") {
|
||||
if (sourceText.contentType == "text/html") {
|
||||
// Custom parser for parse-script-tags that adapts its input structure to
|
||||
// our parser's signature
|
||||
var parser = (_ref) => {
|
||||
var source = _ref.source,
|
||||
line = _ref.line;
|
||||
|
||||
return parse(source, {
|
||||
startLine: line
|
||||
});
|
||||
};
|
||||
ast = (0, _parseScriptTags2.default)(sourceText.text, parser) || {};
|
||||
} else if (sourceText.contentType == "text/javascript") {
|
||||
ast = parse(sourceText.text);
|
||||
}
|
||||
|
||||
|
@ -29046,32 +29097,22 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return t.isFunction(path) || t.isArrowFunctionExpression(path) || t.isObjectMethod(path) || t.isClassMethod(path);
|
||||
}
|
||||
|
||||
function formatSymbol(symbol) {
|
||||
return {
|
||||
id: `${symbol.name}:${symbol.location.start.line}`,
|
||||
title: symbol.name,
|
||||
subtitle: `:${symbol.location.start.line}`,
|
||||
value: symbol.name,
|
||||
location: symbol.location
|
||||
};
|
||||
}
|
||||
|
||||
function getVariableNames(path) {
|
||||
if (t.isObjectProperty(path) && !isFunction(path.node.value)) {
|
||||
return [formatSymbol({
|
||||
return [{
|
||||
name: path.node.key.name,
|
||||
location: path.node.loc
|
||||
})];
|
||||
}];
|
||||
}
|
||||
|
||||
if (!path.node.declarations) {
|
||||
return path.node.params.map(dec => formatSymbol({
|
||||
return path.node.params.map(dec => ({
|
||||
name: dec.name,
|
||||
location: dec.loc
|
||||
}));
|
||||
}
|
||||
|
||||
return path.node.declarations.map(dec => formatSymbol({
|
||||
return path.node.declarations.map(dec => ({
|
||||
name: dec.id.name,
|
||||
location: dec.loc
|
||||
}));
|
||||
|
@ -29101,10 +29142,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
var bindings = scope.bindings;
|
||||
|
||||
|
||||
return toPairs(bindings).map((_ref) => {
|
||||
var _ref2 = _slicedToArray(_ref, 2),
|
||||
name = _ref2[0],
|
||||
binding = _ref2[1];
|
||||
return (0, _toPairs2.default)(bindings).map((_ref2) => {
|
||||
var _ref3 = _slicedToArray(_ref2, 2),
|
||||
name = _ref3[0],
|
||||
binding = _ref3[1];
|
||||
|
||||
return {
|
||||
name,
|
||||
|
@ -29127,9 +29168,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
* helps find member expressions on one line and function scopes that are
|
||||
* often many lines
|
||||
*/
|
||||
function nodeContainsLocation(_ref3) {
|
||||
var node = _ref3.node,
|
||||
location = _ref3.location;
|
||||
function nodeContainsLocation(_ref4) {
|
||||
var node = _ref4.node,
|
||||
location = _ref4.location;
|
||||
var _node$loc = node.loc,
|
||||
start = _node$loc.start,
|
||||
end = _node$loc.end;
|
||||
|
@ -29171,11 +29212,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
var symbols = { functions: [], variables: [] };
|
||||
|
||||
if (isEmpty(ast)) {
|
||||
if ((0, _isEmpty2.default)(ast)) {
|
||||
return symbols;
|
||||
}
|
||||
|
||||
traverse(ast, {
|
||||
(0, _babelTraverse2.default)(ast, {
|
||||
enter(path) {
|
||||
if (isVariable(path)) {
|
||||
var _symbols$variables;
|
||||
|
@ -29184,17 +29225,17 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
|
||||
if (isFunction(path)) {
|
||||
symbols.functions.push(formatSymbol({
|
||||
symbols.functions.push({
|
||||
name: getFunctionName(path),
|
||||
location: path.node.loc
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
if (t.isClassDeclaration(path)) {
|
||||
symbols.variables.push(formatSymbol({
|
||||
symbols.variables.push({
|
||||
name: path.node.id.name,
|
||||
location: path.node.loc
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -29205,12 +29246,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
function getClosestMemberExpression(source, token, location) {
|
||||
var ast = getAst(source);
|
||||
if (isEmpty(ast)) {
|
||||
if ((0, _isEmpty2.default)(ast)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var expression = null;
|
||||
traverse(ast, {
|
||||
(0, _babelTraverse2.default)(ast, {
|
||||
enter(path) {
|
||||
var node = path.node;
|
||||
|
||||
|
@ -29263,13 +29304,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
function getClosestScope(source, location) {
|
||||
var ast = getAst(source);
|
||||
if (isEmpty(ast)) {
|
||||
if ((0, _isEmpty2.default)(ast)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var closestPath = null;
|
||||
|
||||
traverse(ast, {
|
||||
(0, _babelTraverse2.default)(ast, {
|
||||
enter(path) {
|
||||
if (isLexicalScope(path) && nodeContainsLocation({ node: path.node, location })) {
|
||||
closestPath = path;
|
||||
|
@ -29286,13 +29327,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
function getClosestPath(source, location) {
|
||||
var ast = getAst(source);
|
||||
if (isEmpty(ast)) {
|
||||
if ((0, _isEmpty2.default)(ast)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var closestPath = null;
|
||||
|
||||
traverse(ast, {
|
||||
(0, _babelTraverse2.default)(ast, {
|
||||
enter(path) {
|
||||
if (nodeContainsLocation({ node: path.node, location })) {
|
||||
closestPath = path;
|
||||
|
@ -29308,12 +29349,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
|
||||
function getVariablesInScope(scope) {
|
||||
var _ref4;
|
||||
var _ref5;
|
||||
|
||||
var scopes = getScopeChain(scope);
|
||||
var scopeVars = scopes.map(getScopeVariables);
|
||||
var vars = (_ref4 = [{ name: "this" }, { name: "arguments" }]).concat.apply(_ref4, _toConsumableArray(scopeVars)).map(variable => variable.name);
|
||||
return uniq(vars);
|
||||
var vars = (_ref5 = [{ name: "this" }, { name: "arguments" }]).concat.apply(_ref5, _toConsumableArray(scopeVars)).map(variable => variable.name);
|
||||
return (0, _uniq2.default)(vars);
|
||||
}
|
||||
|
||||
function isExpressionInScope(expression, scope) {
|
||||
|
@ -29462,7 +29503,159 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
/* 1013 */,
|
||||
/* 1014 */,
|
||||
/* 1015 */,
|
||||
/* 1016 */
|
||||
/* 1016 */,
|
||||
/* 1017 */,
|
||||
/* 1018 */,
|
||||
/* 1019 */,
|
||||
/* 1020 */,
|
||||
/* 1021 */,
|
||||
/* 1022 */,
|
||||
/* 1023 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
||||
|
||||
var babylon = __webpack_require__(435);
|
||||
var types = __webpack_require__(493);
|
||||
|
||||
var startScript = /<script[^>]*>/im;
|
||||
var endScript = /<\/script\s*>/im;
|
||||
|
||||
function getCandidateScriptLocations(source, index) {
|
||||
var i = index || 0;
|
||||
var str = source.substring(i);
|
||||
|
||||
var startMatch = startScript.exec(str);
|
||||
if (startMatch) {
|
||||
var startsAt = startMatch.index + startMatch[0].length;
|
||||
var afterStart = str.substring(startsAt);
|
||||
var endMatch = endScript.exec(afterStart);
|
||||
if (endMatch) {
|
||||
var locLength = endMatch.index;
|
||||
var locIndex = i + startsAt;
|
||||
|
||||
return [adjustForLineAndColumn(source, {
|
||||
index: locIndex,
|
||||
length: locLength,
|
||||
source: source.substring(locIndex, locIndex + locLength)
|
||||
})].concat(_toConsumableArray(getCandidateScriptLocations(source, locIndex + locLength + endMatch[0].length)));
|
||||
}
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
function parseScript(_ref) {
|
||||
var source = _ref.source,
|
||||
line = _ref.line;
|
||||
|
||||
// remove empty or only whitespace scripts
|
||||
if (source.length === 0 || /^\s+$/.test(source)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
return babylon.parse(source, {
|
||||
sourceType: "script",
|
||||
startLine: line
|
||||
});
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function parseScripts(locations) {
|
||||
var parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : parseScript;
|
||||
|
||||
return locations.map(parser);
|
||||
}
|
||||
|
||||
function generateWhitespace(length) {
|
||||
return Array.from(new Array(length + 1)).join(" ");
|
||||
}
|
||||
|
||||
function calcLineAndColumn(source, index) {
|
||||
var lines = source.substring(0, index).replace(/\r\l?/, "\n").split(/\n/);
|
||||
var line = lines.length;
|
||||
var column = lines.pop().length + 1;
|
||||
|
||||
return {
|
||||
column: column,
|
||||
line: line
|
||||
};
|
||||
}
|
||||
|
||||
function adjustForLineAndColumn(fullSource, location) {
|
||||
var _calcLineAndColumn = calcLineAndColumn(fullSource, location.index),
|
||||
column = _calcLineAndColumn.column,
|
||||
line = _calcLineAndColumn.line;
|
||||
|
||||
return Object.assign({}, location, {
|
||||
line: line,
|
||||
column: column,
|
||||
// prepend whitespace for scripts that do not start on the first column
|
||||
source: generateWhitespace(column) + location.source
|
||||
});
|
||||
}
|
||||
|
||||
function parseScriptTags(source, parser) {
|
||||
var scripts = parseScripts(getCandidateScriptLocations(source), parser).filter(types.isFile).reduce(function (main, script) {
|
||||
return {
|
||||
statements: main.statements.concat(script.program.body),
|
||||
comments: main.comments.concat(script.comments),
|
||||
tokens: main.tokens.concat(script.tokens)
|
||||
};
|
||||
}, {
|
||||
statements: [],
|
||||
comments: [],
|
||||
tokens: []
|
||||
});
|
||||
|
||||
var program = types.program(scripts.statements);
|
||||
var file = types.file(program, scripts.comments, scripts.tokens);
|
||||
|
||||
var end = calcLineAndColumn(source, source.length);
|
||||
file.start = program.start = 0;
|
||||
file.end = program.end = source.length;
|
||||
file.loc = program.loc = {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
},
|
||||
end: end
|
||||
};
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
function extractScriptTags(source) {
|
||||
return parseScripts(getCandidateScriptLocations(source), function (loc) {
|
||||
var ast = parseScript(loc);
|
||||
|
||||
if (ast) {
|
||||
return loc;
|
||||
}
|
||||
|
||||
return null;
|
||||
}).filter(types.isFile);
|
||||
}
|
||||
|
||||
exports.default = parseScriptTags;
|
||||
exports.extractScriptTags = extractScriptTags;
|
||||
exports.generateWhitespace = generateWhitespace;
|
||||
exports.getCandidateScriptLocations = getCandidateScriptLocations;
|
||||
exports.parseScript = parseScript;
|
||||
exports.parseScripts = parseScripts;
|
||||
exports.parseScriptTags = parseScriptTags;
|
||||
|
||||
/***/ },
|
||||
/* 1024 */
|
||||
/***/ function(module, exports) {
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,7 +47,7 @@ add_task(function*() {
|
|||
|
||||
yield addExpression(dbg, "f");
|
||||
is(getLabel(dbg, 1), "f");
|
||||
is(getValue(dbg, 1), "ReferenceError");
|
||||
is(getValue(dbg, 1), "(unavailable)");
|
||||
|
||||
yield editExpression(dbg, "oo");
|
||||
is(getLabel(dbg, 1), "foo()");
|
||||
|
|
|
@ -83,38 +83,13 @@ add_task(async function() {
|
|||
await onPaused;
|
||||
|
||||
is(
|
||||
getScopeNodeLabel(dbg, 6),
|
||||
"lastName",
|
||||
'The sixth element in the scope panel is still "lastName"'
|
||||
getScopeNodeLabel(dbg, 2),
|
||||
"<this>",
|
||||
'The second element in the scope panel is "<this>"'
|
||||
);
|
||||
is(
|
||||
getScopeNodeValue(dbg, 6),
|
||||
'"Doe"',
|
||||
'The "lastName" property is still "Doe", but it should be "Pierce"' +
|
||||
"since it was changed in the script."
|
||||
getScopeNodeLabel(dbg, 3),
|
||||
"phonebook",
|
||||
'The third element in the scope panel is "phonebook"'
|
||||
);
|
||||
|
||||
onPaused = waitForPaused(dbg);
|
||||
await resume(dbg);
|
||||
await onPaused;
|
||||
is(
|
||||
getScopeNodeLabel(dbg, 6),
|
||||
"lastName",
|
||||
'The sixth element in the scope panel is still "lastName"'
|
||||
);
|
||||
is(
|
||||
getScopeNodeLabel(dbg, 7),
|
||||
"__proto__",
|
||||
'The seventh element in the scope panel is still "__proto__", ' +
|
||||
'but it should be now "timezone", since it was added to the "sarah" object ' +
|
||||
"in the script"
|
||||
);
|
||||
is(
|
||||
getScopeNodeValue(dbg, 7),
|
||||
"Object",
|
||||
'The seventh element in the scope panel has the value "Object", ' +
|
||||
'but it should be "PST"'
|
||||
);
|
||||
|
||||
await resume(dbg);
|
||||
});
|
||||
|
|
|
@ -9,7 +9,7 @@ function getLabel(dbg, index) {
|
|||
return findElement(dbg, "scopeNode", index).innerText;
|
||||
}
|
||||
|
||||
add_task(function* () {
|
||||
add_task(function*() {
|
||||
const dbg = yield initDebugger("doc-script-switching.html");
|
||||
|
||||
toggleScopes(dbg);
|
||||
|
@ -23,9 +23,9 @@ add_task(function* () {
|
|||
|
||||
toggleNode(dbg, 4);
|
||||
yield waitForDispatch(dbg, "LOAD_OBJECT_PROPERTIES");
|
||||
is(getLabel(dbg, 5), "prototype");
|
||||
is(getLabel(dbg, 5), "length");
|
||||
|
||||
yield stepOver(dbg);
|
||||
is(getLabel(dbg, 4), "foo()");
|
||||
is(getLabel(dbg, 5), "prototype");
|
||||
is(getLabel(dbg, 5), "Window");
|
||||
});
|
||||
|
|
|
@ -11,11 +11,11 @@ function* waitForSourceCount(dbg, i) {
|
|||
});
|
||||
}
|
||||
|
||||
add_task(function* () {
|
||||
add_task(function*() {
|
||||
const dbg = yield initDebugger("doc-sources.html");
|
||||
const { selectors: { getSelectedSource }, getState } = dbg;
|
||||
|
||||
yield waitForSources(dbg, "simple1");
|
||||
yield waitForSources(dbg, "simple1", "simple2", "nested-source", "long.js");
|
||||
|
||||
// Expand nodes and make sure more sources appear.
|
||||
is(findAllElements(dbg, "sourceNodes").length, 2);
|
||||
|
@ -27,15 +27,21 @@ add_task(function* () {
|
|||
is(findAllElements(dbg, "sourceNodes").length, 8);
|
||||
|
||||
// Select a source.
|
||||
ok(!findElementWithSelector(dbg, ".sources-list .focused"),
|
||||
"Source is not focused");
|
||||
ok(
|
||||
!findElementWithSelector(dbg, ".sources-list .focused"),
|
||||
"Source is not focused"
|
||||
);
|
||||
const selected = waitForDispatch(dbg, "SELECT_SOURCE");
|
||||
clickElement(dbg, "sourceNode", 4);
|
||||
yield selected;
|
||||
ok(findElementWithSelector(dbg, ".sources-list .focused"),
|
||||
"Source is focused");
|
||||
ok(getSelectedSource(getState()).get("url").includes("nested-source.js"),
|
||||
"The right source is selected");
|
||||
ok(
|
||||
findElementWithSelector(dbg, ".sources-list .focused"),
|
||||
"Source is focused"
|
||||
);
|
||||
ok(
|
||||
getSelectedSource(getState()).get("url").includes("nested-source.js"),
|
||||
"The right source is selected"
|
||||
);
|
||||
|
||||
// Make sure new sources appear in the list.
|
||||
ContentTask.spawn(gBrowser.selectedBrowser, null, function() {
|
||||
|
@ -45,16 +51,20 @@ add_task(function* () {
|
|||
});
|
||||
|
||||
yield waitForSourceCount(dbg, 9);
|
||||
is(findElement(dbg, "sourceNode", 7).textContent,
|
||||
"math.min.js",
|
||||
"The dynamic script exists");
|
||||
is(
|
||||
findElement(dbg, "sourceNode", 7).textContent,
|
||||
"math.min.js",
|
||||
"The dynamic script exists"
|
||||
);
|
||||
|
||||
// Make sure named eval sources appear in the list.
|
||||
ContentTask.spawn(gBrowser.selectedBrowser, null, function() {
|
||||
content.eval("window.evaledFunc = function() {} //# sourceURL=evaled.js");
|
||||
});
|
||||
yield waitForSourceCount(dbg, 11);
|
||||
is(findElement(dbg, "sourceNode", 2).textContent,
|
||||
"evaled.js",
|
||||
"The eval script exists");
|
||||
is(
|
||||
findElement(dbg, "sourceNode", 2).textContent,
|
||||
"evaled.js",
|
||||
"The eval script exists"
|
||||
);
|
||||
});
|
||||
|
|
|
@ -176,8 +176,7 @@ function waitForSources(dbg, ...sources) {
|
|||
sources.map(url => {
|
||||
function sourceExists(state) {
|
||||
return getSources(state).some(s => {
|
||||
let u = s.get("url");
|
||||
return u && u.includes(url);
|
||||
return (s.get("url") || "").includes(url);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -214,9 +213,8 @@ function assertPausedLocation(dbg, source, line) {
|
|||
is(location.get("line"), line);
|
||||
|
||||
// Check the debug line
|
||||
let cm = dbg.win.document.querySelector(".CodeMirror").CodeMirror;
|
||||
ok(
|
||||
cm.lineInfo(line - 1).wrapClass.includes("debug-line"),
|
||||
getCM(dbg).lineInfo(line - 1).wrapClass.includes("debug-line"),
|
||||
"Line is highlighted as paused"
|
||||
);
|
||||
}
|
||||
|
@ -245,7 +243,7 @@ function assertHighlightLocation(dbg, source, line) {
|
|||
"Highlighted line is visible"
|
||||
);
|
||||
ok(
|
||||
dbg.win.cm.lineInfo(line - 1).wrapClass.includes("highlight-line"),
|
||||
getCM(dbg).lineInfo(line - 1).wrapClass.includes("highlight-line"),
|
||||
"Line is highlighted"
|
||||
);
|
||||
}
|
||||
|
@ -359,10 +357,7 @@ function findSource(dbg, url) {
|
|||
}
|
||||
|
||||
const sources = dbg.selectors.getSources(dbg.getState());
|
||||
const source = sources.find(s => {
|
||||
let u = s.get("url");
|
||||
return u && u.includes(url);
|
||||
});
|
||||
const source = sources.find(s => (s.get("url") || "").includes(url));
|
||||
|
||||
if (!source) {
|
||||
throw new Error("Unable to find source: " + url);
|
||||
|
@ -623,9 +618,12 @@ function isVisibleWithin(outerEl, innerEl) {
|
|||
const selectors = {
|
||||
callStackHeader: ".call-stack-pane ._header",
|
||||
callStackBody: ".call-stack-pane .pane",
|
||||
expressionNode: i => `.expressions-list .tree-node:nth-child(${i}) .object-label`,
|
||||
expressionValue: i => `.expressions-list .tree-node:nth-child(${i}) .object-value`,
|
||||
expressionClose: i => `.expressions-list .expression-container:nth-child(${i}) .close`,
|
||||
expressionNode: i =>
|
||||
`.expressions-list .tree-node:nth-child(${i}) .object-label`,
|
||||
expressionValue: i =>
|
||||
`.expressions-list .tree-node:nth-child(${i}) .object-value`,
|
||||
expressionClose: i =>
|
||||
`.expressions-list .expression-container:nth-child(${i}) .close`,
|
||||
expressionNodes: ".expressions-list .tree-node",
|
||||
scopesHeader: ".scopes-pane ._header",
|
||||
breakpointItem: i => `.breakpoints-list .breakpoint:nth-child(${i})`,
|
||||
|
@ -746,3 +744,8 @@ function toggleCallStack(dbg) {
|
|||
function toggleScopes(dbg) {
|
||||
return findElement(dbg, "scopesHeader").click();
|
||||
}
|
||||
|
||||
function getCM(dbg) {
|
||||
const el = dbg.win.document.querySelector(".CodeMirror");
|
||||
return el.CodeMirror;
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ function bindToolboxHandlers() {
|
|||
}
|
||||
|
||||
function setupThreadListeners(panel) {
|
||||
updateBadgeText(panel._selectors().getPause(panel._getState()));
|
||||
updateBadgeText(panel._selectors.getPause(panel._getState()));
|
||||
|
||||
let onPaused = updateBadgeText.bind(null, true);
|
||||
let onResumed = updateBadgeText.bind(null, false);
|
||||
|
|
|
@ -128,25 +128,33 @@ otherEvents=Other
|
|||
# source.
|
||||
blackboxCheckboxTooltip2=Toggle blackboxing
|
||||
|
||||
# LOCALIZATION NOTE (sources.search.key): Key shortcut to open the search for
|
||||
# LOCALIZATION NOTE (sources.search.key2): Key shortcut to open the search for
|
||||
# searching all the source files the debugger has seen.
|
||||
sources.search.key=P
|
||||
sources.search.key2=CmdOrCtrl+P
|
||||
|
||||
# LOCALIZATION NOTE (sources.search.alt.key): A second key shortcut to open the
|
||||
# search for searching all the source files the debugger has seen.
|
||||
sources.search.alt.key=CmdOrCtrl+O
|
||||
|
||||
# LOCALIZATION NOTE (sources.noSourcesAvailable): Text shown when the debugger
|
||||
# does not have any sources.
|
||||
sources.noSourcesAvailable=This page has no sources
|
||||
|
||||
# LOCALIZATION NOTE (sourceSearch.search.key): Key shortcut to open the search
|
||||
# LOCALIZATION NOTE (sourceSearch.search.key2): Key shortcut to open the search
|
||||
# for searching within a the currently opened files in the editor
|
||||
sourceSearch.search.key=F
|
||||
sourceSearch.search.key2=CmdOrCtrl+F
|
||||
|
||||
# LOCALIZATION NOTE (sourceSearch.search.placeholder): placeholder text in
|
||||
# the source search input bar
|
||||
sourceSearch.search.placeholder=Search in file…
|
||||
|
||||
# LOCALIZATION NOTE (sourceSearch.search.again.key): Key shortcut to re-open
|
||||
# the search for re-searching the same search triggered from a sourceSearch
|
||||
sourceSearch.search.again.key=G
|
||||
# LOCALIZATION NOTE (sourceSearch.search.again.key2): Key shortcut to highlight
|
||||
# the next occurrence of the last search triggered from a source search
|
||||
sourceSearch.search.again.key2=CmdOrCtrl+G
|
||||
|
||||
# LOCALIZATION NOTE (sourceSearch.search.againPrev.key2): Key shortcut to highlight
|
||||
# the previous occurrence of the last search triggered from a source search
|
||||
sourceSearch.search.againPrev.key2=CmdOrCtrl+Shift+G
|
||||
|
||||
# LOCALIZATION NOTE (sourceSearch.resultsSummary1): Shows a summary of
|
||||
# the number of matches for autocomplete
|
||||
|
@ -552,9 +560,9 @@ symbolSearch.search.functionsPlaceholder=Search functions…
|
|||
# text displayed when the user searches for variables in a file
|
||||
symbolSearch.search.variablesPlaceholder=Search variables…
|
||||
|
||||
# LOCALIZATION NOTE(symbolSearch.search.key): The shortcut (cmd+shift+o) for
|
||||
# LOCALIZATION NOTE(symbolSearch.search.key2): The Key Shortcut for
|
||||
# searching for a function or variable
|
||||
symbolSearch.search.key=O
|
||||
symbolSearch.search.key2=CmdOrCtrl+Shift+O
|
||||
|
||||
# LOCALIZATION NOTE(symbolSearch.searchModifier.regex): A search option
|
||||
# when searching text in a file
|
||||
|
|
Загрузка…
Ссылка в новой задаче