mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
Bug 1415300 - Update Debugger frontend (11-7). r=jdescottes
MozReview-Commit-ID: HdGGdN5Efw8 --HG-- extra : rebase_source : 416a1198f631e4b701c7ac93e2fd8f8c8dac667d
This commit is contained in:
parent
e3b9be5f45
commit
3214f9fa6f
@ -1,7 +1,7 @@
|
|||||||
This is the debugger.html project output.
|
This is the debugger.html project output.
|
||||||
See https://github.com/devtools-html/debugger.html
|
See https://github.com/devtools-html/debugger.html
|
||||||
|
|
||||||
Taken from upstream commit: d9f18b2cd0792de70289d4dcde5ed3e38be87cf1
|
Taken from upstream commit: b902ed728543b8ed39b8d145da37a25418aea48e
|
||||||
|
|
||||||
Packages:
|
Packages:
|
||||||
- babel-plugin-transform-es2015-modules-commonjs @6.26.0
|
- babel-plugin-transform-es2015-modules-commonjs @6.26.0
|
||||||
|
@ -410,6 +410,10 @@ body {
|
|||||||
padding-left: 3px;
|
padding-left: 3px;
|
||||||
font-weight: normal;
|
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/>. */
|
||||||
|
|
||||||
.modal-wrapper {
|
.modal-wrapper {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -473,6 +477,10 @@ body {
|
|||||||
transform: translateY(30px);
|
transform: translateY(30px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.shortcuts-content {
|
.shortcuts-content {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
-moz-column-width: 250px;
|
-moz-column-width: 250px;
|
||||||
@ -486,20 +494,6 @@ body {
|
|||||||
color: var(--theme-content-color1);
|
color: var(--theme-content-color1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mac .keystroke {
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 1px;
|
|
||||||
border-radius: 3px;
|
|
||||||
border-color: var(--theme-graphs-grey);
|
|
||||||
background-color: var(--theme-selection-color);
|
|
||||||
width: 21px;
|
|
||||||
height: 17px;
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 10px;
|
|
||||||
text-align: center;
|
|
||||||
padding-top: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shortcuts-section {
|
.shortcuts-section {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
@ -529,6 +523,10 @@ body {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* 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 {
|
:root {
|
||||||
--arrow-width: 10px;
|
--arrow-width: 10px;
|
||||||
}
|
}
|
||||||
@ -544,6 +542,10 @@ body {
|
|||||||
--search-overlays-semitransparent: rgba(42, 46, 56, 0.66);
|
--search-overlays-semitransparent: rgba(42, 46, 56, 0.66);
|
||||||
--popup-shadow-color: #5c667b;
|
--popup-shadow-color: #5c667b;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
@ -602,6 +604,10 @@ button:focus {
|
|||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
menupopup {
|
menupopup {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 10000;
|
z-index: 10000;
|
||||||
@ -922,6 +928,10 @@ menuseparator {
|
|||||||
.split-box.dragging > .uncontrolled {
|
.split-box.dragging > .uncontrolled {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.arrow,
|
.arrow,
|
||||||
.worker,
|
.worker,
|
||||||
.refresh,
|
.refresh,
|
||||||
@ -1035,6 +1045,10 @@ html .arrow.expanded svg {
|
|||||||
.theme-dark .webpack {
|
.theme-dark .webpack {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
|
||||||
|
|
||||||
.managed-tree .tree {
|
.managed-tree .tree {
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
-moz-user-select: none;
|
-moz-user-select: none;
|
||||||
@ -1076,6 +1090,10 @@ html[dir="rtl"] .managed-tree .tree .node > div {
|
|||||||
.managed-tree .tree-node button {
|
.managed-tree .tree-node button {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.close-btn path {
|
.close-btn path {
|
||||||
fill: var(--theme-comment-alt);
|
fill: var(--theme-comment-alt);
|
||||||
}
|
}
|
||||||
@ -1123,6 +1141,10 @@ html[dir="rtl"] .managed-tree .tree .node > div {
|
|||||||
.close-btn.big .close svg {
|
.close-btn.big .close svg {
|
||||||
width: 9px;
|
width: 9px;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.search-field {
|
.search-field {
|
||||||
width: calc(100% - 1px);
|
width: calc(100% - 1px);
|
||||||
height: 27px;
|
height: 27px;
|
||||||
@ -1229,6 +1251,10 @@ html[dir="rtl"] .managed-tree .tree .node > div {
|
|||||||
.search-field .search-nav-buttons .nav-btn path {
|
.search-field .search-nav-buttons .nav-btn path {
|
||||||
fill: var(--theme-comment);
|
fill: var(--theme-comment);
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.project-text-search {
|
.project-text-search {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -1317,6 +1343,10 @@ html[dir="rtl"] .managed-tree .tree .node > div {
|
|||||||
.project-text-search .managed-tree .tree {
|
.project-text-search .managed-tree .tree {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.search-container {
|
.search-container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 30px;
|
top: 30px;
|
||||||
@ -1329,6 +1359,10 @@ html[dir="rtl"] .managed-tree .tree .node > div {
|
|||||||
background-color: var(--theme-body-background);
|
background-color: var(--theme-body-background);
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.sources-panel {
|
.sources-panel {
|
||||||
background-color: var(--theme-sidebar-background);
|
background-color: var(--theme-sidebar-background);
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -1420,6 +1454,7 @@ html[dir="rtl"] .managed-tree .tree .node > div {
|
|||||||
-moz-user-select: none;
|
-moz-user-select: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
height: 29px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.source-outline-tabs .tab {
|
.source-outline-tabs .tab {
|
||||||
@ -1488,6 +1523,10 @@ html[dir="rtl"] .managed-tree .tree .node > div {
|
|||||||
.theme-dark .sources-list .managed-tree .tree .node.focused img.blackBox {
|
.theme-dark .sources-list .managed-tree .tree .node.focused img.blackBox {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.outline {
|
.outline {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
@ -1533,6 +1572,10 @@ html[dir="rtl"] .managed-tree .tree .node > div {
|
|||||||
.outline-list__element:hover {
|
.outline-list__element:hover {
|
||||||
background: var(--theme-toolbar-background-hover);
|
background: var(--theme-toolbar-background-hover);
|
||||||
}
|
}
|
||||||
|
/* 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-signature {
|
.function-signature {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
}
|
}
|
||||||
@ -1552,6 +1595,10 @@ html[dir="rtl"] .managed-tree .tree .node > div {
|
|||||||
.function-signature .comma {
|
.function-signature .comma {
|
||||||
color: var(--object-color);
|
color: var(--object-color);
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.toggle-button-start,
|
.toggle-button-start,
|
||||||
.toggle-button-end {
|
.toggle-button-end {
|
||||||
transform: translate(0, 0px);
|
transform: translate(0, 0px);
|
||||||
@ -1597,6 +1644,10 @@ html .toggle-button-end.vertical svg {
|
|||||||
.toggle-button-end.collapsed {
|
.toggle-button-end.collapsed {
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.source-footer {
|
.source-footer {
|
||||||
background: var(--theme-body-background);
|
background: var(--theme-body-background);
|
||||||
border-top: 1px solid var(--theme-splitter-color);
|
border-top: 1px solid var(--theme-splitter-color);
|
||||||
@ -1683,6 +1734,10 @@ html .toggle-button-end.vertical svg {
|
|||||||
.source-footer .blackbox-summary {
|
.source-footer .blackbox-summary {
|
||||||
color: var(--theme-body-color);
|
color: var(--theme-body-color);
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.search-bar {
|
.search-bar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -2063,6 +2118,10 @@ html[dir="rtl"] .arrow svg,
|
|||||||
opacity: 0.6;
|
opacity: 0.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/>. */
|
||||||
|
|
||||||
.bracket-arrow {
|
.bracket-arrow {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
@ -2105,6 +2164,10 @@ html[dir="rtl"] .arrow svg,
|
|||||||
border-top-color: var(--theme-body-background);
|
border-top-color: var(--theme-body-background);
|
||||||
top: -1px;
|
top: -1px;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.popover {
|
.popover {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
@ -2114,6 +2177,10 @@ html[dir="rtl"] .arrow svg,
|
|||||||
height: 5px;
|
height: 5px;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.popover .preview-popup {
|
.popover .preview-popup {
|
||||||
background: var(--theme-body-background);
|
background: var(--theme-body-background);
|
||||||
width: 350px;
|
width: 350px;
|
||||||
@ -2238,6 +2305,10 @@ html[dir="rtl"] .arrow svg,
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: var(--theme-content-color3);
|
color: var(--theme-content-color3);
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.call-site {
|
.call-site {
|
||||||
background: #f0f9ff;
|
background: #f0f9ff;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -2283,9 +2354,17 @@ html[dir="rtl"] .arrow svg,
|
|||||||
.theme-dark .call-site-bp::before {
|
.theme-dark .call-site-bp::before {
|
||||||
border-bottom-color: #dd4d4d;
|
border-bottom-color: #dd4d4d;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.empty-line .CodeMirror-linenumber {
|
.empty-line .CodeMirror-linenumber {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
|
||||||
|
|
||||||
.conditional-breakpoint-panel {
|
.conditional-breakpoint-panel {
|
||||||
cursor: initial;
|
cursor: initial;
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
@ -2320,6 +2399,10 @@ html[dir="rtl"] .arrow svg,
|
|||||||
.conditional-breakpoint-panel input:focus {
|
.conditional-breakpoint-panel input:focus {
|
||||||
outline-width: 0;
|
outline-width: 0;
|
||||||
}
|
}
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
|
||||||
|
|
||||||
.editor-wrapper {
|
.editor-wrapper {
|
||||||
--debug-line-border: rgb(145, 188, 219);
|
--debug-line-border: rgb(145, 188, 219);
|
||||||
--debug-expression-background: rgba(202, 227, 255, 0.5);
|
--debug-expression-background: rgba(202, 227, 255, 0.5);
|
||||||
@ -2327,6 +2410,7 @@ html[dir="rtl"] .arrow svg,
|
|||||||
--editor-second-searchbar-height: 27px;
|
--editor-second-searchbar-height: 27px;
|
||||||
--debug-line-error-border: rgb(255, 0, 0);
|
--debug-line-error-border: rgb(255, 0, 0);
|
||||||
--debug-expression-error-background: rgba(231, 116, 113, 0.3);
|
--debug-expression-error-background: rgba(231, 116, 113, 0.3);
|
||||||
|
--editor-header-height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.theme-dark .editor-wrapper {
|
.theme-dark .editor-wrapper {
|
||||||
@ -2352,9 +2436,9 @@ html[dir="rtl"] .arrow svg,
|
|||||||
*/
|
*/
|
||||||
.editor-wrapper {
|
.editor-wrapper {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: calc(100% - 29px);
|
height: calc(100% - var(--editor-header-height));
|
||||||
width: calc(100% - 1px);
|
width: calc(100% - 1px);
|
||||||
top: 29px;
|
top: var(--editor-header-height);
|
||||||
left: 0px;
|
left: 0px;
|
||||||
--editor-footer-height: 24px;
|
--editor-footer-height: 24px;
|
||||||
}
|
}
|
||||||
@ -2534,6 +2618,10 @@ debug-expression-error {
|
|||||||
.visible {
|
.visible {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.cm-highlight {
|
.cm-highlight {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@ -2559,6 +2647,10 @@ debug-expression-error {
|
|||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
margin: 0 -1px -1px -1px;
|
margin: 0 -1px -1px -1px;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.breakpoints-toggle {
|
.breakpoints-toggle {
|
||||||
margin: 2px 3px;
|
margin: 2px 3px;
|
||||||
}
|
}
|
||||||
@ -2671,6 +2763,10 @@ html .breakpoints-list .breakpoint.paused {
|
|||||||
.breakpoint:hover .close {
|
.breakpoint:hover .close {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.input-expression {
|
.input-expression {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
@ -2752,6 +2848,10 @@ html .breakpoints-list .breakpoint.paused {
|
|||||||
.expression-input {
|
.expression-input {
|
||||||
max-width: 50%;
|
max-width: 50%;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.frames ul .frames-group .group,
|
.frames ul .frames-group .group,
|
||||||
.frames ul .frames-group .group .location {
|
.frames ul .frames-group .group .location {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@ -2775,6 +2875,10 @@ html .breakpoints-list .breakpoint.paused {
|
|||||||
border-top: 1px solid var(--theme-splitter-color);
|
border-top: 1px solid var(--theme-splitter-color);
|
||||||
border-bottom: 1px solid var(--theme-splitter-color);
|
border-bottom: 1px solid var(--theme-splitter-color);
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.why-paused {
|
.why-paused {
|
||||||
background-color: var(--theme-body-background);
|
background-color: var(--theme-body-background);
|
||||||
color: var(--theme-body-color);
|
color: var(--theme-body-color);
|
||||||
@ -2803,6 +2907,10 @@ html .breakpoints-list .breakpoint.paused {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-style: normal;
|
font-style: 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/>. */
|
||||||
|
|
||||||
.frames ul {
|
.frames ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -2895,6 +3003,10 @@ html .breakpoints-list .breakpoint.paused {
|
|||||||
:root.theme-dark .annotation-logo svg path {
|
:root.theme-dark .annotation-logo svg path {
|
||||||
fill: var(--theme-highlight-blue);
|
fill: var(--theme-highlight-blue);
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.event-listeners {
|
.event-listeners {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -2940,6 +3052,10 @@ html .breakpoints-list .breakpoint.paused {
|
|||||||
.event-listeners .listener:hover .close {
|
.event-listeners .listener:hover .close {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.workers-list * {
|
.workers-list * {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
@ -2952,6 +3068,10 @@ html .breakpoints-list .breakpoint.paused {
|
|||||||
position: relative;
|
position: relative;
|
||||||
transition: all 0.25s ease;
|
transition: all 0.25s ease;
|
||||||
}
|
}
|
||||||
|
/* 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 {
|
:root {
|
||||||
--accordion-header-background: var(--theme-toolbar-background);
|
--accordion-header-background: var(--theme-toolbar-background);
|
||||||
}
|
}
|
||||||
@ -3028,6 +3148,10 @@ html .breakpoints-list .breakpoint.paused {
|
|||||||
.accordion .header-buttons button::-moz-focus-inner {
|
.accordion .header-buttons button::-moz-focus-inner {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.command-bar {
|
.command-bar {
|
||||||
flex: 0 0 29px;
|
flex: 0 0 29px;
|
||||||
border-bottom: 1px solid var(--theme-splitter-color);
|
border-bottom: 1px solid var(--theme-splitter-color);
|
||||||
@ -3156,6 +3280,10 @@ img.resume {
|
|||||||
.command-bar.bottom > button:hover {
|
.command-bar.bottom > button:hover {
|
||||||
color: var(--theme-body-color);
|
color: var(--theme-body-color);
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.object-node.default-property {
|
.object-node.default-property {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
@ -3186,6 +3314,10 @@ img.resume {
|
|||||||
.scopes-list .function-signature {
|
.scopes-list .function-signature {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.secondary-panes {
|
.secondary-panes {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -3230,6 +3362,10 @@ img.resume {
|
|||||||
.theme-dark .secondary-panes .accordion .arrow svg {
|
.theme-dark .secondary-panes .accordion .arrow svg {
|
||||||
fill: var(--theme-content-color3);
|
fill: var(--theme-content-color3);
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.welcomebox {
|
.welcomebox {
|
||||||
width: calc(100% - 1px);
|
width: calc(100% - 1px);
|
||||||
|
|
||||||
@ -3311,6 +3447,10 @@ html .welcomebox .toggle-button-end.collapsed {
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.source-header {
|
.source-header {
|
||||||
border-bottom: 1px solid var(--theme-splitter-color);
|
border-bottom: 1px solid var(--theme-splitter-color);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -3439,6 +3579,10 @@ html .welcomebox .toggle-button-end.collapsed {
|
|||||||
.source-tab:hover .close-btn {
|
.source-tab:hover .close-btn {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
.dropdown {
|
.dropdown {
|
||||||
--width: 150px;
|
--width: 150px;
|
||||||
background: var(--theme-body-background);
|
background: var(--theme-body-background);
|
||||||
@ -3502,6 +3646,10 @@ html[dir="rtl"] .dropdown {
|
|||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
|
||||||
|
|
||||||
.result-list {
|
.result-list {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -275,6 +275,10 @@ var _devtoolsUtils = __webpack_require__(1363);
|
|||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
/* 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 { workerHandler } = _devtoolsUtils.workerUtils;
|
const { workerHandler } = _devtoolsUtils.workerUtils;
|
||||||
|
|
||||||
function prettyPrint({ url, indent, source }) {
|
function prettyPrint({ url, indent, source }) {
|
||||||
|
@ -482,7 +482,9 @@ var _url = __webpack_require__(334);
|
|||||||
* @memberof utils/source
|
* @memberof utils/source
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utils for working with Source URLs
|
* Utils for working with Source URLs
|
||||||
@ -593,7 +595,12 @@ function getFilename(source) {
|
|||||||
return getFormattedSourceId(id);
|
return getFormattedSourceId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return getFilenameFromURL(url);
|
let filename = getFilenameFromURL(url);
|
||||||
|
const qMarkIdx = filename.indexOf("?");
|
||||||
|
if (qMarkIdx > 0) {
|
||||||
|
filename = filename.slice(0, qMarkIdx);
|
||||||
|
}
|
||||||
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -658,13 +665,17 @@ function getSourceLineCount(source) {
|
|||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getMode(source) {
|
function getMode(source, sourceMetaData) {
|
||||||
const { contentType, text, isWasm, url } = source;
|
const { contentType, text, isWasm, url } = source;
|
||||||
|
|
||||||
if (!text || isWasm) {
|
if (!text || isWasm) {
|
||||||
return { name: "text" };
|
return { name: "text" };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (url && url.match(/\.jsx$/i) || sourceMetaData && sourceMetaData.isReactComponent) {
|
||||||
|
return "jsx";
|
||||||
|
}
|
||||||
|
|
||||||
// if the url ends with .marko we set the name to Javascript so
|
// if the url ends with .marko we set the name to Javascript so
|
||||||
// syntax highlighting works for marko too
|
// syntax highlighting works for marko too
|
||||||
if (url && url.match(/\.marko$/i)) {
|
if (url && url.match(/\.marko$/i)) {
|
||||||
@ -735,7 +746,7 @@ const {
|
|||||||
isOriginalId
|
isOriginalId
|
||||||
} = __webpack_require__(1389);
|
} = __webpack_require__(1389);
|
||||||
|
|
||||||
const { workerUtils: { WorkerDispatcher } } = __webpack_require__(1390);
|
const { workerUtils: { WorkerDispatcher } } = __webpack_require__(1363);
|
||||||
|
|
||||||
const dispatcher = new WorkerDispatcher();
|
const dispatcher = new WorkerDispatcher();
|
||||||
|
|
||||||
@ -793,7 +804,9 @@ module.exports = {
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
|
/* 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/>. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utils for utils, by utils
|
* Utils for utils, by utils
|
||||||
@ -1111,180 +1124,6 @@ module.exports = {
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 1390:
|
|
||||||
/***/ (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__(1391);
|
|
||||||
const workerUtils = __webpack_require__(1392);
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
networkRequest,
|
|
||||||
workerUtils
|
|
||||||
};
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 1391:
|
|
||||||
/***/ (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;
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 1392:
|
|
||||||
/***/ (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;
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
};
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 1393:
|
/***/ 1393:
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
@ -1294,6 +1133,10 @@ module.exports = {
|
|||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
|
/* 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 basename(path) {
|
function basename(path) {
|
||||||
return path.split("/").pop();
|
return path.split("/").pop();
|
||||||
}
|
}
|
||||||
@ -1385,8 +1228,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|||||||
function ignoreWhiteSpace(str) {
|
function ignoreWhiteSpace(str) {
|
||||||
return (/^\s{0,2}$/.test(str) ? "(?!\\s*.*)" : str
|
return (/^\s{0,2}$/.test(str) ? "(?!\\s*.*)" : str
|
||||||
);
|
);
|
||||||
}
|
} /* 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 wholeMatch(query, wholeWord) {
|
function wholeMatch(query, wholeWord) {
|
||||||
if (query === "" || !wholeWord) {
|
if (query === "" || !wholeWord) {
|
||||||
@ -1456,7 +1300,9 @@ var _devtoolsUtils = __webpack_require__(1363);
|
|||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
const { workerHandler } = _devtoolsUtils.workerUtils;
|
const { workerHandler } = _devtoolsUtils.workerUtils; /* 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/>. */
|
||||||
|
|
||||||
self.onmessage = workerHandler({ getMatches: _getMatches2.default, findSourceMatches: _projectSearch.findSourceMatches });
|
self.onmessage = workerHandler({ getMatches: _getMatches2.default, findSourceMatches: _projectSearch.findSourceMatches });
|
||||||
|
|
||||||
@ -1496,7 +1342,9 @@ function getMatches(query, text, modifiers) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return matchedLocations;
|
return matchedLocations;
|
||||||
}
|
} /* 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/>. */
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
@ -1541,7 +1389,11 @@ function findSourceMatches(source, queryText) {
|
|||||||
|
|
||||||
matches = [].concat(...matches);
|
matches = [].concat(...matches);
|
||||||
return matches;
|
return matches;
|
||||||
} // Maybe reuse file search's functions?
|
} /* 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/>. */
|
||||||
|
|
||||||
|
// Maybe reuse file search's functions?
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
@ -1861,7 +1713,7 @@ module.exports = charenc;
|
|||||||
/*!
|
/*!
|
||||||
* Determine if an object is a Buffer
|
* Determine if an object is a Buffer
|
||||||
*
|
*
|
||||||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
* @author Feross Aboukhadijeh <https://feross.org>
|
||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@ support-files =
|
|||||||
examples/output.js
|
examples/output.js
|
||||||
examples/simple1.js
|
examples/simple1.js
|
||||||
examples/simple2.js
|
examples/simple2.js
|
||||||
|
examples/simple3.js
|
||||||
examples/frames.js
|
examples/frames.js
|
||||||
examples/script-mutate.js
|
examples/script-mutate.js
|
||||||
examples/script-switching-02.js
|
examples/script-switching-02.js
|
||||||
@ -65,7 +66,6 @@ support-files =
|
|||||||
[browser_dbg-breakpoints.js]
|
[browser_dbg-breakpoints.js]
|
||||||
[browser_dbg-breakpoints-toggle.js]
|
[browser_dbg-breakpoints-toggle.js]
|
||||||
[browser_dbg-breakpoints-reloading.js]
|
[browser_dbg-breakpoints-reloading.js]
|
||||||
skip-if = true # Bug 1383576
|
|
||||||
[browser_dbg-breakpoints-cond.js]
|
[browser_dbg-breakpoints-cond.js]
|
||||||
[browser_dbg-browser-content-toolbox.js]
|
[browser_dbg-browser-content-toolbox.js]
|
||||||
skip-if = !e10s # This test is only valid in e10s
|
skip-if = !e10s # This test is only valid in e10s
|
||||||
@ -73,7 +73,6 @@ skip-if = !e10s # This test is only valid in e10s
|
|||||||
[browser_dbg-scopes.js]
|
[browser_dbg-scopes.js]
|
||||||
[browser_dbg-chrome-create.js]
|
[browser_dbg-chrome-create.js]
|
||||||
[browser_dbg-chrome-debugging.js]
|
[browser_dbg-chrome-debugging.js]
|
||||||
skip-if = debug # bug 1374187
|
|
||||||
[browser_dbg-console.js]
|
[browser_dbg-console.js]
|
||||||
[browser_dbg-debugger-buttons.js]
|
[browser_dbg-debugger-buttons.js]
|
||||||
[browser_dbg-editor-gutter.js]
|
[browser_dbg-editor-gutter.js]
|
||||||
@ -87,19 +86,18 @@ skip-if = debug # bug 1374187
|
|||||||
skip-if = os == "linux" # bug 1351952
|
skip-if = os == "linux" # bug 1351952
|
||||||
[browser_dbg-layout-changes.js]
|
[browser_dbg-layout-changes.js]
|
||||||
[browser_dbg-pause-exceptions.js]
|
[browser_dbg-pause-exceptions.js]
|
||||||
skip-if = true # Bug 1393121
|
|
||||||
[browser_dbg-navigation.js]
|
[browser_dbg-navigation.js]
|
||||||
[browser_dbg-minified.js]
|
[browser_dbg-minified.js]
|
||||||
[browser_dbg-pretty-print.js]
|
[browser_dbg-pretty-print.js]
|
||||||
[browser_dbg-pretty-print-console.js]
|
[browser_dbg-pretty-print-console.js]
|
||||||
[browser_dbg-pretty-print-paused.js]
|
[browser_dbg-pretty-print-paused.js]
|
||||||
|
[browser_dbg-preview.js]
|
||||||
|
[browser_dbg-returnvalues.js]
|
||||||
[browser_dbg-scopes-mutations.js]
|
[browser_dbg-scopes-mutations.js]
|
||||||
[browser_dbg-search-file.js]
|
[browser_dbg-search-file.js]
|
||||||
skip-if = os == "win" # Bug 1393121
|
skip-if = os == "win" # Bug 1393121
|
||||||
[browser_dbg-quick-open.js]
|
[browser_dbg-quick-open.js]
|
||||||
skip-if = true
|
|
||||||
[browser_dbg-search-project.js]
|
[browser_dbg-search-project.js]
|
||||||
skip-if = true # Bug 1393121, 1393299
|
|
||||||
[browser_dbg-sourcemaps.js]
|
[browser_dbg-sourcemaps.js]
|
||||||
[browser_dbg-sourcemaps-reloading.js]
|
[browser_dbg-sourcemaps-reloading.js]
|
||||||
[browser_dbg-sourcemaps2.js]
|
[browser_dbg-sourcemaps2.js]
|
||||||
@ -108,5 +106,5 @@ skip-if = true # Bug 1393121, 1393299
|
|||||||
[browser_dbg-tabs.js]
|
[browser_dbg-tabs.js]
|
||||||
[browser_dbg-toggling-tools.js]
|
[browser_dbg-toggling-tools.js]
|
||||||
[browser_dbg-wasm-sourcemaps.js]
|
[browser_dbg-wasm-sourcemaps.js]
|
||||||
skip-if = true
|
skip-if = true
|
||||||
[browser_dbg-reload.js]
|
[browser_dbg-reload.js]
|
||||||
|
@ -12,16 +12,15 @@ add_task(async function() {
|
|||||||
await addBreakpoint(dbg, "scripts.html", 18);
|
await addBreakpoint(dbg, "scripts.html", 18);
|
||||||
reload(dbg);
|
reload(dbg);
|
||||||
await waitForPaused(dbg);
|
await waitForPaused(dbg);
|
||||||
|
|
||||||
await waitForLoadedSource(dbg, "doc-scripts.html");
|
await waitForLoadedSource(dbg, "doc-scripts.html");
|
||||||
assertPausedLocation(dbg);
|
assertPausedLocation(dbg);
|
||||||
await resume(dbg);
|
await resume(dbg);
|
||||||
|
|
||||||
const paused = waitForPaused(dbg);
|
|
||||||
|
|
||||||
// Create an eval script that pauses itself.
|
// Create an eval script that pauses itself.
|
||||||
invokeInTab("doEval");
|
invokeInTab("doEval");
|
||||||
|
await waitForPaused(dbg);
|
||||||
|
|
||||||
await paused;
|
|
||||||
await resume(dbg);
|
await resume(dbg);
|
||||||
const source = getSelectedSource(getState()).toJS();
|
const source = getSelectedSource(getState()).toJS();
|
||||||
ok(!source.url, "It is an eval source");
|
ok(!source.url, "It is an eval source");
|
||||||
|
@ -1,21 +1,31 @@
|
|||||||
/* Any copyright is dedicated to the Public Domain.
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
function clickStepOver(dbg) {
|
function clickButton(dbg, button) {
|
||||||
clickElement(dbg, "stepOver");
|
const resumeFired = waitForDispatch(dbg, "COMMAND");
|
||||||
|
clickElement(dbg, button);
|
||||||
|
return resumeFired;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function clickStepOver(dbg) {
|
||||||
|
await clickButton(dbg, "stepOver");
|
||||||
return waitForPaused(dbg);
|
return waitForPaused(dbg);
|
||||||
}
|
}
|
||||||
|
|
||||||
function clickStepIn(dbg) {
|
async function clickStepIn(dbg) {
|
||||||
clickElement(dbg, "stepIn");
|
await clickButton(dbg, "stepIn");
|
||||||
return waitForPaused(dbg);
|
return waitForPaused(dbg);
|
||||||
}
|
}
|
||||||
|
|
||||||
function clickStepOut(dbg) {
|
async function clickStepOut(dbg) {
|
||||||
clickElement(dbg, "stepOut");
|
await clickButton(dbg, "stepOut");
|
||||||
return waitForPaused(dbg);
|
return waitForPaused(dbg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function clickResume(dbg) {
|
||||||
|
return clickButton(dbg, "resume");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test debugger buttons
|
* Test debugger buttons
|
||||||
* 1. resume
|
* 1. resume
|
||||||
@ -33,7 +43,7 @@ add_task(async function() {
|
|||||||
assertPausedLocation(dbg);
|
assertPausedLocation(dbg);
|
||||||
|
|
||||||
// resume
|
// resume
|
||||||
clickElement(dbg, "resume");
|
await clickResume(dbg)
|
||||||
await waitForPaused(dbg);
|
await waitForPaused(dbg);
|
||||||
assertPausedLocation(dbg);
|
assertPausedLocation(dbg);
|
||||||
|
|
||||||
|
@ -4,13 +4,6 @@
|
|||||||
// Tests that the editor highlights the correct location when the
|
// Tests that the editor highlights the correct location when the
|
||||||
// debugger pauses
|
// debugger pauses
|
||||||
|
|
||||||
// checks to see if the first breakpoint is visible
|
|
||||||
function isElementVisible(dbg, elementName) {
|
|
||||||
const bpLine = findElement(dbg, elementName);
|
|
||||||
const cm = findElement(dbg, "codeMirror");
|
|
||||||
return bpLine && isVisibleWithin(cm, bpLine);
|
|
||||||
}
|
|
||||||
|
|
||||||
add_task(async function() {
|
add_task(async function() {
|
||||||
// This test runs too slowly on linux debug. I'd like to figure out
|
// This test runs too slowly on linux debug. I'd like to figure out
|
||||||
// which is the slowest part of this and make it run faster, but to
|
// which is the slowest part of this and make it run faster, but to
|
||||||
@ -54,5 +47,5 @@ add_task(async function() {
|
|||||||
await waitForLoadedSource(dbg, "long.js");
|
await waitForLoadedSource(dbg, "long.js");
|
||||||
|
|
||||||
assertPausedLocation(dbg);
|
assertPausedLocation(dbg);
|
||||||
ok(isElementVisible(dbg, "breakpoint"), "Breakpoint is visible");
|
ok(isVisibleInEditor(dbg, findElement(dbg, "breakpoint")), "Breakpoint is visible");
|
||||||
});
|
});
|
||||||
|
@ -40,7 +40,6 @@ async function addExpression(dbg, input) {
|
|||||||
findElementWithSelector(dbg, expressionSelectors.input).focus();
|
findElementWithSelector(dbg, expressionSelectors.input).focus();
|
||||||
type(dbg, input);
|
type(dbg, input);
|
||||||
pressKey(dbg, "Enter");
|
pressKey(dbg, "Enter");
|
||||||
|
|
||||||
await waitForDispatch(dbg, "EVALUATE_EXPRESSION");
|
await waitForDispatch(dbg, "EVALUATE_EXPRESSION");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,10 +47,11 @@ async function editExpression(dbg, input) {
|
|||||||
info("updating the expression");
|
info("updating the expression");
|
||||||
dblClickElement(dbg, "expressionNode", 1);
|
dblClickElement(dbg, "expressionNode", 1);
|
||||||
// Position cursor reliably at the end of the text.
|
// Position cursor reliably at the end of the text.
|
||||||
|
const evaluation = waitForDispatch(dbg, "EVALUATE_EXPRESSION")
|
||||||
pressKey(dbg, "End");
|
pressKey(dbg, "End");
|
||||||
type(dbg, input);
|
type(dbg, input);
|
||||||
pressKey(dbg, "Enter");
|
pressKey(dbg, "Enter");
|
||||||
await waitForDispatch(dbg, "EVALUATE_EXPRESSION");
|
await evaluation;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -59,13 +59,18 @@ async function editExpression(dbg, input) {
|
|||||||
* resume, and wait for the expression to finish being evaluated.
|
* resume, and wait for the expression to finish being evaluated.
|
||||||
*/
|
*/
|
||||||
async function addBadExpression(dbg, input) {
|
async function addBadExpression(dbg, input) {
|
||||||
const paused = waitForPaused(dbg);
|
const evaluation = waitForDispatch(dbg, "EVALUATE_EXPRESSION")
|
||||||
const added = addExpression(dbg, input);
|
|
||||||
|
findElementWithSelector(dbg, expressionSelectors.input).focus();
|
||||||
|
type(dbg, input);
|
||||||
|
pressKey(dbg, "Enter");
|
||||||
|
|
||||||
|
await waitForPaused(dbg);
|
||||||
|
|
||||||
await paused;
|
|
||||||
ok(dbg.selectors.isEvaluatingExpression(dbg.getState()));
|
ok(dbg.selectors.isEvaluatingExpression(dbg.getState()));
|
||||||
await resume(dbg);
|
await resume(dbg);
|
||||||
await added;
|
await evaluation;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
add_task(async function() {
|
add_task(async function() {
|
||||||
|
@ -24,7 +24,7 @@ add_task(async function() {
|
|||||||
await waitForLoadedSource(dbg, "simple1");
|
await waitForLoadedSource(dbg, "simple1");
|
||||||
|
|
||||||
assertPausedLocation(dbg);
|
assertPausedLocation(dbg);
|
||||||
is(countSources(dbg), 4, "4 sources are loaded.");
|
is(countSources(dbg), 5, "5 sources are loaded.");
|
||||||
|
|
||||||
await navigate(dbg, "about:blank");
|
await navigate(dbg, "about:blank");
|
||||||
await waitForDispatch(dbg, "NAVIGATE");
|
await waitForDispatch(dbg, "NAVIGATE");
|
||||||
@ -36,11 +36,12 @@ add_task(async function() {
|
|||||||
"doc-scripts.html",
|
"doc-scripts.html",
|
||||||
"simple1.js",
|
"simple1.js",
|
||||||
"simple2.js",
|
"simple2.js",
|
||||||
|
"simple3.js",
|
||||||
"long.js",
|
"long.js",
|
||||||
"scripts.html"
|
"scripts.html"
|
||||||
);
|
);
|
||||||
|
|
||||||
is(countSources(dbg), 4, "4 sources are loaded.");
|
is(countSources(dbg), 5, "5 sources are loaded.");
|
||||||
|
|
||||||
// Test that the current select source persists across reloads
|
// Test that the current select source persists across reloads
|
||||||
await selectSource(dbg, "long.js");
|
await selectSource(dbg, "long.js");
|
||||||
|
@ -19,26 +19,34 @@ function caughtException() {
|
|||||||
add_task(async function() {
|
add_task(async function() {
|
||||||
const dbg = await initDebugger("doc-exceptions.html");
|
const dbg = await initDebugger("doc-exceptions.html");
|
||||||
|
|
||||||
// test skipping an uncaught exception
|
log("1. test skipping an uncaught exception");
|
||||||
await uncaughtException();
|
await uncaughtException();
|
||||||
ok(!isPaused(dbg));
|
ok(!isPaused(dbg));
|
||||||
|
|
||||||
// Test pausing on an uncaught exception
|
log("2. Test pausing on an uncaught exception");
|
||||||
await togglePauseOnExceptions(dbg, true, false);
|
await togglePauseOnExceptions(dbg, true, false);
|
||||||
uncaughtException();
|
uncaughtException();
|
||||||
await waitForPaused(dbg);
|
await waitForPaused(dbg);
|
||||||
assertPausedLocation(dbg);
|
assertPausedLocation(dbg);
|
||||||
await resume(dbg);
|
await resume(dbg);
|
||||||
|
await waitForActive(dbg);
|
||||||
|
|
||||||
// Test pausing on a caught Error
|
log("3. Test pausing on a caught Error");
|
||||||
caughtException();
|
caughtException();
|
||||||
await waitForPaused(dbg);
|
await waitForPaused(dbg);
|
||||||
assertPausedLocation(dbg);
|
assertPausedLocation(dbg);
|
||||||
|
|
||||||
|
log("3.b Test pausing in the catch statement");
|
||||||
|
await resume(dbg);
|
||||||
|
await waitForPaused(dbg);
|
||||||
|
assertPausedLocation(dbg);
|
||||||
await resume(dbg);
|
await resume(dbg);
|
||||||
|
|
||||||
// Test skipping a caught error
|
log("4. Test skipping a caught error");
|
||||||
await togglePauseOnExceptions(dbg, true, true);
|
await togglePauseOnExceptions(dbg, true, true);
|
||||||
caughtException();
|
caughtException();
|
||||||
|
|
||||||
|
log("4.b Test pausing in the catch statement");
|
||||||
await waitForPaused(dbg);
|
await waitForPaused(dbg);
|
||||||
assertPausedLocation(dbg);
|
assertPausedLocation(dbg);
|
||||||
await resume(dbg);
|
await resume(dbg);
|
||||||
|
@ -0,0 +1,68 @@
|
|||||||
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
function getCoordsFromPosition(cm, { line, ch }) {
|
||||||
|
return cm.charCoords({ line: ~~line, ch: ~~ch });
|
||||||
|
}
|
||||||
|
|
||||||
|
function hoverAtPos(dbg, { line, ch }) {
|
||||||
|
const cm = getCM(dbg);
|
||||||
|
const coords = getCoordsFromPosition(cm, { line: line - 1, ch });
|
||||||
|
const tokenEl = dbg.win.document.elementFromPoint(coords.left, coords.top);
|
||||||
|
tokenEl.dispatchEvent(
|
||||||
|
new MouseEvent("mouseover", {
|
||||||
|
bubbles: true,
|
||||||
|
cancelable: true,
|
||||||
|
view: dbg.win
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function assertTooltip(dbg, { result, expression }) {
|
||||||
|
const previewEl = findElement(dbg, "tooltip");
|
||||||
|
is(previewEl.innerText, result, "Preview text shown to user");
|
||||||
|
|
||||||
|
const preview = dbg.selectors.getPreview(dbg.getState());
|
||||||
|
is(`${preview.result}`, result, "Preview.result");
|
||||||
|
is(preview.updating, false, "Preview.updating");
|
||||||
|
is(preview.expression, expression, "Preview.expression");
|
||||||
|
}
|
||||||
|
|
||||||
|
function assertPopup(dbg, { field, value, expression }) {
|
||||||
|
const previewEl = findElement(dbg, "popup");
|
||||||
|
is(previewEl.innerText, "", "Preview text shown to user");
|
||||||
|
|
||||||
|
const preview = dbg.selectors.getPreview(dbg.getState());
|
||||||
|
|
||||||
|
is(
|
||||||
|
`${preview.result.preview.ownProperties[field].value}`,
|
||||||
|
value,
|
||||||
|
"Preview.result"
|
||||||
|
);
|
||||||
|
is(preview.updating, false, "Preview.updating");
|
||||||
|
is(preview.expression, expression, "Preview.expression");
|
||||||
|
}
|
||||||
|
|
||||||
|
add_task(async function() {
|
||||||
|
const dbg = await initDebugger("doc-scripts.html");
|
||||||
|
const { selectors: { getSelectedSource }, getState } = dbg;
|
||||||
|
const simple3 = findSource(dbg, "simple3.js");
|
||||||
|
|
||||||
|
await selectSource(dbg, "simple3");
|
||||||
|
|
||||||
|
await addBreakpoint(dbg, simple3, 5);
|
||||||
|
|
||||||
|
invokeInTab("simple");
|
||||||
|
await waitForPaused(dbg);
|
||||||
|
|
||||||
|
const tooltipPreviewed = waitForDispatch(dbg, "SET_PREVIEW");
|
||||||
|
hoverAtPos(dbg, { line: 5, ch: 12 });
|
||||||
|
await tooltipPreviewed;
|
||||||
|
assertTooltip(dbg, { result: "3", expression: "result" });
|
||||||
|
|
||||||
|
const popupPreviewed = waitForDispatch(dbg, "SET_PREVIEW");
|
||||||
|
hoverAtPos(dbg, { line: 2, ch: 10 });
|
||||||
|
await popupPreviewed;
|
||||||
|
assertPopup(dbg, { field: "foo", value: "1", expression: "obj" });
|
||||||
|
assertPopup(dbg, { field: "bar", value: "2", expression: "obj" });
|
||||||
|
});
|
@ -99,7 +99,7 @@ add_task(async function() {
|
|||||||
quickOpen(dbg, "#");
|
quickOpen(dbg, "#");
|
||||||
is(resultCount(dbg), 1, "one variable result");
|
is(resultCount(dbg), 1, "one variable result");
|
||||||
const results = findAllElements(dbg, "resultItems");
|
const results = findAllElements(dbg, "resultItems");
|
||||||
results.forEach(result => is(result.textContent, "x:13"));
|
results.forEach(result => is(result.textContent, "x13"));
|
||||||
await waitToClose(dbg);
|
await waitToClose(dbg);
|
||||||
|
|
||||||
info("Testing goto line:column");
|
info("Testing goto line:column");
|
||||||
|
@ -0,0 +1,69 @@
|
|||||||
|
function getLabel(dbg, index) {
|
||||||
|
return findElement(dbg, "scopeNode", index).innerText;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getValue(dbg, index) {
|
||||||
|
return findElement(dbg, "scopeValue", index).innerText;
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleScopes(dbg) {
|
||||||
|
return findElement(dbg, "scopesHeader").click();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function testReturnValue(dbg, val) {
|
||||||
|
invokeInTab("return_something", val);
|
||||||
|
await waitForPaused(dbg);
|
||||||
|
|
||||||
|
// "Step in" 3 times to get to the point where the debugger can
|
||||||
|
// see the return value.
|
||||||
|
await stepIn(dbg);
|
||||||
|
await stepIn(dbg);
|
||||||
|
await stepIn(dbg);
|
||||||
|
|
||||||
|
is(getLabel(dbg, 1), "return_something", "check for return_something");
|
||||||
|
|
||||||
|
// We don't show "undefined" but we do show other falsy values.
|
||||||
|
let label = getLabel(dbg, 2);
|
||||||
|
if (val === "undefined") {
|
||||||
|
ok(label !== "<return>", "do not show <return> for undefined");
|
||||||
|
} else {
|
||||||
|
is(label, "<return>", "check for <return>");
|
||||||
|
// The "uneval" call here gives us the way one would write `val` as
|
||||||
|
// a JavaScript expression, similar to the way the debugger
|
||||||
|
// displays values, so this test works when `val` is a string.
|
||||||
|
is(getValue(dbg, 2), uneval(val), `check value is ${uneval(val)}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
await resume(dbg);
|
||||||
|
assertNotPaused(dbg);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function testThrowValue(dbg, val) {
|
||||||
|
invokeInTab("throw_something", val);
|
||||||
|
await waitForPaused(dbg);
|
||||||
|
|
||||||
|
// "Step in" once to get to the point where the debugger can see the
|
||||||
|
// exception.
|
||||||
|
await stepIn(dbg);
|
||||||
|
|
||||||
|
is(getLabel(dbg, 1), "callee", "check for callee");
|
||||||
|
is(getLabel(dbg, 2), "<exception>", "check for <exception>");
|
||||||
|
// The "uneval" call here gives us the way one would write `val` as
|
||||||
|
// a JavaScript expression, similar to the way the debugger
|
||||||
|
// displays values, so this test works when `val` is a string.
|
||||||
|
is(getValue(dbg, 2), uneval(val), `check exception is ${uneval(val)}`);
|
||||||
|
|
||||||
|
await resume(dbg);
|
||||||
|
await waitForPaused(dbg);
|
||||||
|
await resume(dbg);
|
||||||
|
assertNotPaused(dbg);
|
||||||
|
}
|
||||||
|
|
||||||
|
add_task(async function() {
|
||||||
|
const dbg = await initDebugger("doc-return-values.html");
|
||||||
|
toggleScopes(dbg);
|
||||||
|
await togglePauseOnExceptions(dbg, true, false);
|
||||||
|
|
||||||
|
await testReturnValue(dbg, "to sender");
|
||||||
|
await testThrowValue(dbg, "a fit");
|
||||||
|
});
|
@ -78,10 +78,8 @@ add_task(async function() {
|
|||||||
'The "lastName" element has the expected "Doe" value'
|
'The "lastName" element has the expected "Doe" value'
|
||||||
);
|
);
|
||||||
|
|
||||||
info("Resuming");
|
|
||||||
onPaused = waitForPaused(dbg);
|
|
||||||
await resume(dbg);
|
await resume(dbg);
|
||||||
await onPaused;
|
await waitForPaused(dbg);
|
||||||
|
|
||||||
is(
|
is(
|
||||||
getScopeNodeLabel(dbg, 2),
|
getScopeNodeLabel(dbg, 2),
|
||||||
|
@ -78,7 +78,6 @@ add_task(async function() {
|
|||||||
assertPausedLocation(dbg);
|
assertPausedLocation(dbg);
|
||||||
|
|
||||||
await stepIn(dbg);
|
await stepIn(dbg);
|
||||||
// await waitForMappedScopes(dbg);
|
|
||||||
assertPausedLocation(dbg);
|
assertPausedLocation(dbg);
|
||||||
|
|
||||||
await stepOver(dbg);
|
await stepOver(dbg);
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
/* Any copyright is dedicated to the Public Domain.
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
|
||||||
function assertBpInGutter(dbg, lineNumber) {
|
function assertBpInGutter(dbg, lineNumber) {
|
||||||
const el = findElement(dbg, "breakpoint");
|
const el = findElement(dbg, "breakpoint");
|
||||||
const bpLineNumber = +el.querySelector(".CodeMirror-linenumber").innerText;
|
const bpLineNumber = +el.querySelector(".CodeMirror-linenumber").innerText;
|
||||||
is(bpLineNumber, lineNumber);
|
is(bpLineNumber, lineNumber, "Breakpoint is on the correct line in the gutter");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tests loading sourcemapped sources, setting breakpoints, and
|
// Tests loading sourcemapped sources, setting breakpoints, and
|
||||||
|
@ -8,8 +8,10 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<button onclick="simple()">Click me!</button>
|
||||||
<script src="simple1.js"></script>
|
<script src="simple1.js"></script>
|
||||||
<script src="simple2.js"></script>
|
<script src="simple2.js"></script>
|
||||||
|
<script src="simple3.js"></script>
|
||||||
<script src="long.js"></script>
|
<script src="long.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// This inline script allows this HTML page to show up as a
|
// This inline script allows this HTML page to show up as a
|
||||||
|
@ -7,25 +7,33 @@ function main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function doEval() {
|
function doEval() {
|
||||||
eval("(" + function() {
|
eval(
|
||||||
debugger;
|
"(" +
|
||||||
|
function() {
|
||||||
|
debugger;
|
||||||
|
|
||||||
window.evaledFunc = function() {
|
window.evaledFunc = function() {
|
||||||
var foo = 1;
|
var foo = 1;
|
||||||
var bar = 2;
|
var bar = 2;
|
||||||
return foo + bar;
|
return foo + bar;
|
||||||
};
|
};
|
||||||
}.toString() + ")()");
|
}.toString() +
|
||||||
|
")()"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function doNamedEval() {
|
function doNamedEval() {
|
||||||
eval("(" + function() {
|
eval(
|
||||||
debugger;
|
"(" +
|
||||||
|
function() {
|
||||||
|
debugger;
|
||||||
|
|
||||||
window.evaledFunc = function() {
|
window.evaledFunc = function() {
|
||||||
var foo = 1;
|
var foo = 1;
|
||||||
var bar = 2;
|
var bar = 2;
|
||||||
return foo + bar;
|
return foo + bar;
|
||||||
};
|
};
|
||||||
}.toString() + ")();\n //# sourceURL=evaled.js");
|
}.toString() +
|
||||||
|
")();\n //# sourceURL=evaled.js"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
function simple() {
|
||||||
|
const obj = { foo: 1, bar: 2 };
|
||||||
|
const func = foo(1, 2);
|
||||||
|
const result = func();
|
||||||
|
return result;
|
||||||
|
}
|
@ -52,6 +52,18 @@ registerCleanupFunction(() => {
|
|||||||
delete window.resumeTest;
|
delete window.resumeTest;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function log(msg, data) {
|
||||||
|
info(`${msg} ${!data ? "" : JSON.stringify(data)}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function logThreadEvents(dbg, event) {
|
||||||
|
const thread = dbg.toolbox.threadClient;
|
||||||
|
|
||||||
|
thread.addListener(event, function onEvent(eventName, ...args) {
|
||||||
|
info(`Thread event '${eventName}' fired.`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Wait until an action of `type` is dispatched. This is different
|
// Wait until an action of `type` is dispatched. This is different
|
||||||
// then `_afterDispatchDone` because it doesn't wait for async actions
|
// then `_afterDispatchDone` because it doesn't wait for async actions
|
||||||
// to be done/errored. Use this if you want to listen for the "start"
|
// to be done/errored. Use this if you want to listen for the "start"
|
||||||
@ -109,11 +121,11 @@ function waitForDispatch(dbg, type, eventRepeat = 1) {
|
|||||||
let count = 0;
|
let count = 0;
|
||||||
|
|
||||||
return Task.spawn(function*() {
|
return Task.spawn(function*() {
|
||||||
info("Waiting for " + type + " to dispatch " + eventRepeat + " time(s)");
|
info(`Waiting for ${type} to dispatch ${eventRepeat} time(s)`);
|
||||||
while (count < eventRepeat) {
|
while (count < eventRepeat) {
|
||||||
yield _afterDispatchDone(dbg.store, type);
|
yield _afterDispatchDone(dbg.store, type);
|
||||||
count++;
|
count++;
|
||||||
info(type + " dispatched " + count + " time(s)");
|
info(`${type} dispatched ${count} time(s)`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -128,12 +140,12 @@ function waitForDispatch(dbg, type, eventRepeat = 1) {
|
|||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
function waitForThreadEvents(dbg, eventName) {
|
function waitForThreadEvents(dbg, eventName) {
|
||||||
info("Waiting for thread event '" + eventName + "' to fire.");
|
info(`Waiting for thread event '${eventName}' to fire.`);
|
||||||
const thread = dbg.toolbox.threadClient;
|
const thread = dbg.toolbox.threadClient;
|
||||||
|
|
||||||
return new Promise(function(resolve, reject) {
|
return new Promise(function(resolve, reject) {
|
||||||
thread.addListener(eventName, function onEvent(eventName, ...args) {
|
thread.addListener(eventName, function onEvent(eventName, ...args) {
|
||||||
info("Thread event '" + eventName + "' fired.");
|
info(`Thread event '${eventName}' fired.`);
|
||||||
thread.removeListener(eventName, onEvent);
|
thread.removeListener(eventName, onEvent);
|
||||||
resolve.apply(resolve, args);
|
resolve.apply(resolve, args);
|
||||||
});
|
});
|
||||||
@ -180,7 +192,7 @@ function waitForSources(dbg, ...sources) {
|
|||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
info("Waiting on sources: " + sources.join(", "));
|
info(`Waiting on sources: ${sources.join(", ")}`);
|
||||||
const { selectors: { getSources }, store } = dbg;
|
const { selectors: { getSources }, store } = dbg;
|
||||||
return Promise.all(
|
return Promise.all(
|
||||||
sources.map(url => {
|
sources.map(url => {
|
||||||
@ -244,6 +256,15 @@ function waitForSelectedSource(dbg, url) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assert that the debugger is not currently paused.
|
||||||
|
* @memberof mochitest/asserts
|
||||||
|
* @static
|
||||||
|
*/
|
||||||
|
function assertNotPaused(dbg) {
|
||||||
|
ok(!isPaused(dbg), "client is not paused");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assert that the debugger is paused at the correct location.
|
* Assert that the debugger is paused at the correct location.
|
||||||
*
|
*
|
||||||
@ -262,6 +283,8 @@ function assertPausedLocation(dbg) {
|
|||||||
const pause = getPause(getState());
|
const pause = getPause(getState());
|
||||||
const pauseLine = pause && pause.frame && pause.frame.location.line;
|
const pauseLine = pause && pause.frame && pause.frame.location.line;
|
||||||
assertDebugLine(dbg, pauseLine);
|
assertDebugLine(dbg, pauseLine);
|
||||||
|
|
||||||
|
ok(isVisibleInEditor(dbg, getCM(dbg).display.gutters), "gutter is visible");
|
||||||
}
|
}
|
||||||
|
|
||||||
function assertDebugLine(dbg, line) {
|
function assertDebugLine(dbg, line) {
|
||||||
@ -278,10 +301,15 @@ function assertDebugLine(dbg, line) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ok(
|
ok(
|
||||||
lineInfo.wrapClass.includes("debug-line"),
|
lineInfo.wrapClass.includes("new-debug-line"),
|
||||||
"Line is highlighted as paused"
|
"Line is highlighted as paused"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const debugLine = findElementWithSelector(dbg, ".new-debug-line")
|
||||||
|
|| findElementWithSelector(dbg, ".new-debug-line-error");
|
||||||
|
|
||||||
|
ok(isVisibleInEditor(dbg, debugLine), "debug line is visible");
|
||||||
|
|
||||||
const markedSpans = lineInfo.handle.markedSpans;
|
const markedSpans = lineInfo.handle.markedSpans;
|
||||||
if (markedSpans && markedSpans.length > 0) {
|
if (markedSpans && markedSpans.length > 0) {
|
||||||
const marker = markedSpans[0].marker;
|
const marker = markedSpans[0].marker;
|
||||||
@ -311,10 +339,7 @@ function assertHighlightLocation(dbg, source, line) {
|
|||||||
// Check the highlight line
|
// Check the highlight line
|
||||||
const lineEl = findElement(dbg, "highlightLine");
|
const lineEl = findElement(dbg, "highlightLine");
|
||||||
ok(lineEl, "Line is highlighted");
|
ok(lineEl, "Line is highlighted");
|
||||||
ok(
|
ok(isVisibleInEditor(dbg, lineEl), "Highlighted line is visible");
|
||||||
isVisibleWithin(findElement(dbg, "codeMirror"), lineEl),
|
|
||||||
"Highlighted line is visible"
|
|
||||||
);
|
|
||||||
ok(
|
ok(
|
||||||
getCM(dbg)
|
getCM(dbg)
|
||||||
.lineInfo(line - 1)
|
.lineInfo(line - 1)
|
||||||
@ -335,6 +360,14 @@ function isPaused(dbg) {
|
|||||||
return !!getPause(getState());
|
return !!getPause(getState());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function waitForLoadedObjects(dbg) {
|
||||||
|
const { hasLoadingObjects } = dbg.selectors;
|
||||||
|
return waitForState(
|
||||||
|
dbg,
|
||||||
|
state => !hasLoadingObjects(state),
|
||||||
|
"loaded objects"
|
||||||
|
);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Waits for the debugger to be fully paused.
|
* Waits for the debugger to be fully paused.
|
||||||
*
|
*
|
||||||
@ -343,13 +376,36 @@ function isPaused(dbg) {
|
|||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
async function waitForPaused(dbg) {
|
async function waitForPaused(dbg) {
|
||||||
// We want to make sure that we get both a real paused event and
|
const { getSelectedScope, hasLoadingObjects } = dbg.selectors;
|
||||||
// that the state is fully populated. The client may do some more
|
|
||||||
// work (call other client methods) before populating the state.
|
return waitForState(
|
||||||
let loading = waitForDispatch(dbg, "LOAD_OBJECT_PROPERTIES");
|
dbg,
|
||||||
await waitForThreadEvents(dbg, "paused");
|
state => {
|
||||||
await waitForState(dbg, state => isPaused(dbg));
|
const paused = isPaused(dbg);
|
||||||
await loading;
|
const scope = !!getSelectedScope(state);
|
||||||
|
const loaded = !hasLoadingObjects(state);
|
||||||
|
return paused && scope && loaded;
|
||||||
|
},
|
||||||
|
"paused"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* useful for when you want to see what is happening
|
||||||
|
* e.g await waitForever()
|
||||||
|
*/
|
||||||
|
function waitForever() {
|
||||||
|
return new Promise(r => {});
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* useful for waiting for a short amount of time as
|
||||||
|
* a placeholder for a better waitForX handler.
|
||||||
|
*
|
||||||
|
* e.g await waitForTime(500)
|
||||||
|
*/
|
||||||
|
function waitForTime(ms) {
|
||||||
|
return new Promise(r => setTimeout(r, ms));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -475,7 +531,7 @@ function findSource(dbg, url) {
|
|||||||
const source = sources.find(s => (s.get("url") || "").includes(url));
|
const source = sources.find(s => (s.get("url") || "").includes(url));
|
||||||
|
|
||||||
if (!source) {
|
if (!source) {
|
||||||
throw new Error("Unable to find source: " + url);
|
throw new Error(`Unable to find source: ${url}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return source.toJS();
|
return source.toJS();
|
||||||
@ -485,7 +541,7 @@ function waitForLoadedSource(dbg, url) {
|
|||||||
return waitForState(
|
return waitForState(
|
||||||
dbg,
|
dbg,
|
||||||
state => findSource(dbg, url).loadedState == "loaded",
|
state => findSource(dbg, url).loadedState == "loaded",
|
||||||
`loaded source`
|
"loaded source"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -500,13 +556,13 @@ function waitForLoadedSource(dbg, url) {
|
|||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
function selectSource(dbg, url, line) {
|
function selectSource(dbg, url, line) {
|
||||||
info("Selecting source: " + url);
|
info(`Selecting source: ${url}`);
|
||||||
const source = findSource(dbg, url);
|
const source = findSource(dbg, url);
|
||||||
return dbg.actions.selectSource(source.id, { location: { line } });
|
return dbg.actions.selectSource(source.id, { location: { line } });
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeTab(dbg, url) {
|
function closeTab(dbg, url) {
|
||||||
info("Closing tab: " + url);
|
info(`Closing tab: ${url}`);
|
||||||
const source = findSource(dbg, url);
|
const source = findSource(dbg, url);
|
||||||
return dbg.actions.closeTab(source.url);
|
return dbg.actions.closeTab(source.url);
|
||||||
}
|
}
|
||||||
@ -519,9 +575,9 @@ function closeTab(dbg, url) {
|
|||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
function stepOver(dbg) {
|
async function stepOver(dbg) {
|
||||||
info("Stepping over");
|
info("Stepping over");
|
||||||
dbg.actions.stepOver();
|
await dbg.actions.stepOver();
|
||||||
return waitForPaused(dbg);
|
return waitForPaused(dbg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -533,9 +589,9 @@ function stepOver(dbg) {
|
|||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
function stepIn(dbg) {
|
async function stepIn(dbg) {
|
||||||
info("Stepping in");
|
info("Stepping in");
|
||||||
dbg.actions.stepIn();
|
await dbg.actions.stepIn();
|
||||||
return waitForPaused(dbg);
|
return waitForPaused(dbg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -547,9 +603,9 @@ function stepIn(dbg) {
|
|||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
function stepOut(dbg) {
|
async function stepOut(dbg) {
|
||||||
info("Stepping out");
|
info("Stepping out");
|
||||||
dbg.actions.stepOut();
|
await dbg.actions.stepOut();
|
||||||
return waitForPaused(dbg);
|
return waitForPaused(dbg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -563,8 +619,7 @@ function stepOut(dbg) {
|
|||||||
*/
|
*/
|
||||||
function resume(dbg) {
|
function resume(dbg) {
|
||||||
info("Resuming");
|
info("Resuming");
|
||||||
dbg.actions.resume();
|
return dbg.actions.resume();
|
||||||
return waitForState(dbg, state => !dbg.selectors.isPaused(state), "resumed");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteExpression(dbg, input) {
|
function deleteExpression(dbg, input) {
|
||||||
@ -652,7 +707,7 @@ function removeBreakpoint(dbg, sourceId, line, col) {
|
|||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
function togglePauseOnExceptions(
|
async function togglePauseOnExceptions(
|
||||||
dbg,
|
dbg,
|
||||||
pauseOnExceptions,
|
pauseOnExceptions,
|
||||||
ignoreCaughtExceptions
|
ignoreCaughtExceptions
|
||||||
@ -663,26 +718,37 @@ function togglePauseOnExceptions(
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!isPaused(dbg)) {
|
if (!isPaused(dbg)) {
|
||||||
return waitForThreadEvents(dbg, "resumed");
|
await waitForThreadEvents(dbg, "resumed");
|
||||||
|
await waitForLoadedObjects(dbg);
|
||||||
}
|
}
|
||||||
|
|
||||||
return command;
|
return command;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function waitForActive(dbg) {
|
||||||
|
return waitForState(dbg, state => !dbg.selectors.isPaused(state), "active");
|
||||||
|
}
|
||||||
|
|
||||||
// Helpers
|
// Helpers
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invokes a global function in the debuggee tab.
|
* Invokes a global function in the debuggee tab.
|
||||||
*
|
*
|
||||||
* @memberof mochitest/helpers
|
* @memberof mochitest/helpers
|
||||||
* @param {String} fnc
|
* @param {String} fnc The name of a global function on the content window to
|
||||||
|
* call. This is applied to structured clones of the
|
||||||
|
* remaining arguments to invokeInTab.
|
||||||
|
* @param {Any} ...args Remaining args to serialize and pass to fnc.
|
||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
function invokeInTab(fnc) {
|
function invokeInTab(fnc, ...args) {
|
||||||
info(`Invoking function ${fnc} in tab`);
|
info(`Invoking in tab: ${fnc}(${args.map(uneval).join(",")})`);
|
||||||
return ContentTask.spawn(gBrowser.selectedBrowser, fnc, function*(fnc) {
|
return ContentTask.spawn(gBrowser.selectedBrowser, { fnc, args }, function*({
|
||||||
content.wrappedJSObject[fnc](); // eslint-disable-line mozilla/no-cpows-in-tests, max-len
|
fnc,
|
||||||
|
args
|
||||||
|
}) {
|
||||||
|
content.wrappedJSObject[fnc](...args); // eslint-disable-line mozilla/no-cpows-in-tests, max-len
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -755,10 +821,54 @@ function type(dbg, string) {
|
|||||||
string.split("").forEach(char => EventUtils.synthesizeKey(char, {}, dbg.win));
|
string.split("").forEach(char => EventUtils.synthesizeKey(char, {}, dbg.win));
|
||||||
}
|
}
|
||||||
|
|
||||||
function isVisibleWithin(outerEl, innerEl) {
|
|
||||||
|
/*
|
||||||
|
* Checks to see if the inner element is visible inside the editor.
|
||||||
|
*
|
||||||
|
* @memberof mochitest/helpers
|
||||||
|
* @param {Object} dbg
|
||||||
|
* @param {HTMLElement} inner element
|
||||||
|
* @return {boolean}
|
||||||
|
* @static
|
||||||
|
*/
|
||||||
|
|
||||||
|
function isVisibleInEditor(dbg, element) {
|
||||||
|
return isVisible(findElement(dbg, "codeMirror"), element);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Checks to see if the inner element is visible inside the
|
||||||
|
* outer element.
|
||||||
|
*
|
||||||
|
* Note, the inner element does not need to be entirely visible,
|
||||||
|
* it is possible for it to be somewhat clipped by the outer element's
|
||||||
|
* bounding element or for it to span the entire length, starting before the
|
||||||
|
* outer element and ending after.
|
||||||
|
*
|
||||||
|
* @memberof mochitest/helpers
|
||||||
|
* @param {HTMLElement} outer element
|
||||||
|
* @param {HTMLElement} inner element
|
||||||
|
* @return {boolean}
|
||||||
|
* @static
|
||||||
|
*/
|
||||||
|
function isVisible(outerEl, innerEl) {
|
||||||
|
if (!innerEl || !outerEl) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const innerRect = innerEl.getBoundingClientRect();
|
const innerRect = innerEl.getBoundingClientRect();
|
||||||
const outerRect = outerEl.getBoundingClientRect();
|
const outerRect = outerEl.getBoundingClientRect();
|
||||||
return innerRect.top > outerRect.top && innerRect.bottom < outerRect.bottom;
|
|
||||||
|
const verticallyVisible =
|
||||||
|
(innerRect.top >= outerRect.top || innerRect.bottom <= outerRect.bottom)
|
||||||
|
|| (innerRect.top < outerRect.top && innerRect.bottom > outerRect.bottom);
|
||||||
|
|
||||||
|
const horizontallyVisible =
|
||||||
|
(innerRect.left >= outerRect.left || innerRect.right <= outerRect.right)
|
||||||
|
|| (innerRect.left < outerRect.left && innerRect.right > outerRect.right);
|
||||||
|
|
||||||
|
const visible = verticallyVisible && horizontallyVisible;
|
||||||
|
return visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectors = {
|
const selectors = {
|
||||||
@ -785,7 +895,7 @@ const selectors = {
|
|||||||
highlightLine: ".CodeMirror-code > .highlight-line",
|
highlightLine: ".CodeMirror-code > .highlight-line",
|
||||||
codeMirror: ".CodeMirror",
|
codeMirror: ".CodeMirror",
|
||||||
resume: ".resume.active",
|
resume: ".resume.active",
|
||||||
sourceTabs: `.source-tabs`,
|
sourceTabs: ".source-tabs",
|
||||||
stepOver: ".stepOver.active",
|
stepOver: ".stepOver.active",
|
||||||
stepOut: ".stepOut.active",
|
stepOut: ".stepOut.active",
|
||||||
stepIn: ".stepIn.active",
|
stepIn: ".stepIn.active",
|
||||||
@ -796,8 +906,10 @@ const selectors = {
|
|||||||
sourceNode: i => `.sources-list .tree-node:nth-child(${i})`,
|
sourceNode: i => `.sources-list .tree-node:nth-child(${i})`,
|
||||||
sourceNodes: ".sources-list .tree-node",
|
sourceNodes: ".sources-list .tree-node",
|
||||||
sourceArrow: i => `.sources-list .tree-node:nth-child(${i}) .arrow`,
|
sourceArrow: i => `.sources-list .tree-node:nth-child(${i}) .arrow`,
|
||||||
resultItems: `.result-list .result-item`,
|
resultItems: ".result-list .result-item",
|
||||||
fileMatch: `.managed-tree .result`
|
fileMatch: ".managed-tree .result",
|
||||||
|
popup: ".popover",
|
||||||
|
tooltip: ".tooltip"
|
||||||
};
|
};
|
||||||
|
|
||||||
function getSelector(elementName, ...args) {
|
function getSelector(elementName, ...args) {
|
||||||
|
Loading…
Reference in New Issue
Block a user