chrome-devtools-frontend 1.0.1524741 → 1.0.1525561
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/policy/slow-close.md +22 -19
- package/front_end/{models/source_map_scopes → core/sdk}/ScopeTreeCache.ts +8 -7
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/formatter_worker/FormatterActions.ts +7 -0
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +15 -12
- package/front_end/models/formatter/FormatterWorkerPool.ts +1 -1
- package/front_end/models/source_map_scopes/NamesResolver.ts +1 -3
- package/front_end/models/source_map_scopes/source_map_scopes.ts +0 -2
- package/front_end/panels/changes/ChangesSidebar.ts +10 -3
- package/front_end/panels/changes/ChangesView.ts +69 -69
- package/front_end/panels/changes/CombinedDiffView.ts +1 -1
- package/front_end/panels/changes/changesView.css +4 -0
- package/front_end/panels/lighthouse/LighthouseController.ts +5 -0
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +43 -46
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +254 -153
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +28 -21
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/docs/linear_memory_inspector/basic.ts +21 -9
- package/front_end/ui/components/highlighting/HighlightManager.ts +21 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +22 -5
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +18 -20
- package/package.json +1 -1
|
@@ -479,12 +479,23 @@ export class Tooltip extends HTMLElement {
|
|
|
479
479
|
}
|
|
480
480
|
};
|
|
481
481
|
|
|
482
|
+
#globalKeyDown = (event: KeyboardEvent): void => {
|
|
483
|
+
if (!this.open || event.key !== 'Escape') {
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
this.#openedViaHotkey = false;
|
|
488
|
+
this.toggle();
|
|
489
|
+
event.consume(true);
|
|
490
|
+
};
|
|
491
|
+
|
|
482
492
|
#keyDown = (event: KeyboardEvent): void => {
|
|
483
|
-
//
|
|
484
|
-
//
|
|
485
|
-
//
|
|
486
|
-
|
|
487
|
-
|
|
493
|
+
// This supports the scenario where the user uses Alt+ArrowDown in hotkey
|
|
494
|
+
// mode to toggle the visibility.
|
|
495
|
+
// Note that the "Escape to close" scenario is handled in the global
|
|
496
|
+
// keydown function so we capture Escape presses even if the tooltip does
|
|
497
|
+
// not have focus.
|
|
498
|
+
const shouldToggleVisibility = (this.useHotkey && event.altKey && event.key === 'ArrowDown');
|
|
488
499
|
|
|
489
500
|
if (shouldToggleVisibility) {
|
|
490
501
|
this.#openedViaHotkey = !this.open;
|
|
@@ -494,6 +505,7 @@ export class Tooltip extends HTMLElement {
|
|
|
494
505
|
};
|
|
495
506
|
|
|
496
507
|
#registerEventListeners(): void {
|
|
508
|
+
document.body.addEventListener('keydown', this.#globalKeyDown);
|
|
497
509
|
if (this.#anchor) {
|
|
498
510
|
// We bind the keydown listener regardless of if use-hotkey is enabled
|
|
499
511
|
// as we always want to support ESC to close.
|
|
@@ -525,6 +537,11 @@ export class Tooltip extends HTMLElement {
|
|
|
525
537
|
if (this.#timeout) {
|
|
526
538
|
window.clearTimeout(this.#timeout);
|
|
527
539
|
}
|
|
540
|
+
|
|
541
|
+
// Should always exist when this component is used, but in test
|
|
542
|
+
// environments on Chromium this isn't always the case, hence the body? check.
|
|
543
|
+
document.body?.removeEventListener('keydown', this.#globalKeyDown);
|
|
544
|
+
|
|
528
545
|
if (this.#anchor) {
|
|
529
546
|
this.#anchor.removeEventListener('click', this.toggle);
|
|
530
547
|
this.#anchor.removeEventListener('mouseenter', this.showTooltip);
|
|
@@ -16,20 +16,22 @@ const MEMORY_TRANSFER_MIN_CHUNK_SIZE = 1000;
|
|
|
16
16
|
* known upfront.
|
|
17
17
|
*/
|
|
18
18
|
class LinearMemoryInspectorView extends UI.Widget.VBox {
|
|
19
|
-
#memory = new Uint8Array([0]);
|
|
19
|
+
#memory: Uint8Array = new Uint8Array([0]);
|
|
20
20
|
#address = 0;
|
|
21
21
|
#inspector = new LinearMemoryInspectorComponents.LinearMemoryInspector.LinearMemoryInspector();
|
|
22
22
|
|
|
23
23
|
constructor() {
|
|
24
24
|
super();
|
|
25
|
-
this.#inspector.addEventListener(
|
|
25
|
+
this.#inspector.contentElement.addEventListener(
|
|
26
26
|
LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent.eventName,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
(event: LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent) =>
|
|
28
|
+
this.#memoryRequested(event));
|
|
29
|
+
this.#inspector.contentElement.addEventListener(
|
|
30
|
+
LinearMemoryInspectorComponents.LinearMemoryInspector.AddressChangedEvent.eventName,
|
|
31
|
+
(event: LinearMemoryInspectorComponents.LinearMemoryInspector.AddressChangedEvent) => {
|
|
30
32
|
this.#address = event.data;
|
|
31
33
|
});
|
|
32
|
-
this.
|
|
34
|
+
this.#inspector.show(this.contentElement);
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
override wasShown(): void {
|
|
@@ -51,13 +53,11 @@ class LinearMemoryInspectorView extends UI.Widget.VBox {
|
|
|
51
53
|
const memoryChunkStart = Math.max(0, this.#address - MEMORY_TRANSFER_MIN_CHUNK_SIZE / 2);
|
|
52
54
|
const memoryChunkEnd = memoryChunkStart + MEMORY_TRANSFER_MIN_CHUNK_SIZE;
|
|
53
55
|
const memory = this.#memory.slice(memoryChunkStart, memoryChunkEnd);
|
|
54
|
-
this.#inspector.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
hideValueInspector: true,
|
|
60
|
-
};
|
|
56
|
+
this.#inspector.memory = memory;
|
|
57
|
+
this.#inspector.address = this.#address;
|
|
58
|
+
this.#inspector.memoryOffset = memoryChunkStart;
|
|
59
|
+
this.#inspector.outerMemoryLength = this.#memory.length;
|
|
60
|
+
this.#inspector.hideValueInspector = true;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
#memoryRequested(event: LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent): void {
|
|
@@ -80,13 +80,11 @@ class LinearMemoryInspectorView extends UI.Widget.VBox {
|
|
|
80
80
|
const chunkEnd = Math.max(end, start + MEMORY_TRANSFER_MIN_CHUNK_SIZE);
|
|
81
81
|
const memory = this.#memory.slice(start, chunkEnd);
|
|
82
82
|
|
|
83
|
-
this.#inspector.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
hideValueInspector: true,
|
|
89
|
-
};
|
|
83
|
+
this.#inspector.memory = memory;
|
|
84
|
+
this.#inspector.address = address;
|
|
85
|
+
this.#inspector.memoryOffset = start;
|
|
86
|
+
this.#inspector.outerMemoryLength = this.#memory.length;
|
|
87
|
+
this.#inspector.hideValueInspector = true;
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
90
|
|
package/package.json
CHANGED