Skip to content

Commit 38e5360

Browse files
Merge pull request #14162 from brendandahl/indent-stepper
Indent the stepper on save/restore.
2 parents 11f030d + 2e56369 commit 38e5360

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

web/debugger.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ const Stepper = (function StepperClosure() {
292292
this.breakPoints = initialBreakPoints;
293293
this.currentIdx = -1;
294294
this.operatorListIdx = 0;
295+
this.indentLevel = 0;
295296
}
296297

297298
init(operatorList) {
@@ -382,8 +383,14 @@ const Stepper = (function StepperClosure() {
382383
table.appendChild(charCodeRow);
383384
table.appendChild(fontCharRow);
384385
table.appendChild(unicodeRow);
386+
} else if (fn === "restore") {
387+
this.indentLevel--;
385388
}
386-
line.appendChild(c("td", fn));
389+
line.appendChild(c("td", " ".repeat(this.indentLevel * 2) + fn));
390+
if (fn === "save") {
391+
this.indentLevel++;
392+
}
393+
387394
if (decArgs instanceof HTMLElement) {
388395
line.appendChild(decArgs);
389396
} else {

web/viewer.css

+1
Original file line numberDiff line numberDiff line change
@@ -1707,6 +1707,7 @@ html[dir="rtl"] #documentPropertiesOverlay .row > * {
17071707
}
17081708
#PDFBug table {
17091709
font-size: 10px;
1710+
white-space: pre;
17101711
}
17111712
#PDFBug table.showText {
17121713
border-collapse: collapse;

0 commit comments

Comments
 (0)