chrome-devtools-frontend 1.0.1697998 → 1.0.1699061
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/.agents/skills/devtools-verification/SKILL.md +19 -0
- package/.agents/skills/{repro-flaky-tests → fix-tests}/SKILL.md +2 -2
- package/.agents/skills/version-control/SKILL.md +21 -9
- package/front_end/core/platform/HostRuntime.ts +12 -0
- package/front_end/core/platform/api/HostRuntime.ts +13 -0
- package/front_end/core/platform/browser/HostRuntime.ts +34 -0
- package/front_end/core/platform/node/HostRuntime.ts +40 -0
- package/front_end/core/sdk/AnimationModel.ts +12 -98
- package/front_end/core/sdk/CSSModel.ts +4 -2
- package/front_end/core/sdk/CSSPropertyParser.ts +4 -4
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +4 -44
- package/front_end/core/sdk/Connections.ts +6 -1
- package/front_end/core/sdk/ConsoleModel.ts +1 -12
- package/front_end/core/sdk/DOMModel.ts +6 -56
- package/front_end/core/sdk/DebuggerModel.ts +9 -8
- package/front_end/core/sdk/NetworkManager.ts +2 -2
- package/front_end/core/sdk/NetworkRequest.ts +1 -1
- package/front_end/core/sdk/OverlayModel.ts +11 -12
- package/front_end/core/sdk/PageFunctions.ts +187 -0
- package/front_end/core/sdk/Resource.ts +1 -1
- package/front_end/core/sdk/RuntimeModel.ts +1 -20
- package/front_end/core/sdk/Script.ts +21 -0
- package/front_end/core/sdk/SourceMap.ts +15 -2
- package/front_end/core/sdk/SourceMapCache.ts +13 -10
- package/front_end/core/sdk/SourceMapManager.ts +11 -9
- package/front_end/core/sdk/SourceMapScopeChainEntry.ts +109 -15
- package/front_end/core/sdk/SourceMapScopesInfo.ts +8 -2
- package/front_end/entrypoints/heap_snapshot_worker/ContextAnalyzer.ts +635 -0
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +26 -12
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +16 -2
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +4 -4
- package/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker.ts +2 -0
- package/front_end/entrypoints/shell/shell.ts +1 -1
- package/front_end/models/ai_assistance/DOMHelpers.ts +95 -0
- package/front_end/models/ai_assistance/EvaluateAction.ts +5 -42
- package/front_end/models/ai_assistance/ExtensionScope.ts +2 -31
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +3 -4
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +10 -7
- package/front_end/models/ai_assistance/contexts/FileContext.ts +2 -10
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +3 -2
- package/front_end/models/ai_assistance/tools/ListSources.ts +21 -14
- package/front_end/models/bindings/CompilerScriptMapping.ts +3 -10
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +48 -17
- package/front_end/models/bindings/ResourceScriptMapping.ts +2 -2
- package/front_end/models/bindings/StylesSourceMapping.ts +1 -1
- package/front_end/models/comment_manager/CD4ABridge.ts +55 -12
- package/front_end/models/comment_manager/CommentManager.ts +46 -91
- package/front_end/models/comment_manager/CommentThread.ts +145 -0
- package/front_end/models/comment_manager/comment_manager.ts +2 -0
- package/front_end/models/emulation/DeviceModeModel.ts +54 -1
- package/front_end/models/extensions/ExtensionAPI.ts +8 -6
- package/front_end/models/extensions/ExtensionEndpoint.ts +11 -8
- package/front_end/models/extensions/HostUrlPattern.ts +4 -3
- package/front_end/models/extensions/LanguageExtensionEndpoint.ts +3 -2
- package/front_end/models/extensions/RecorderExtensionEndpoint.ts +2 -1
- package/front_end/models/formatter/FormatterWorkerPool.ts +4 -6
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +55 -0
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +18 -14
- package/front_end/models/issues_manager/CookieIssue.ts +0 -13
- package/front_end/models/issues_manager/IssuesManager.ts +5 -0
- package/front_end/models/issues_manager/WebInstallIssue.ts +63 -0
- package/front_end/models/issues_manager/descriptions/webInstallManifestMissingId.md +3 -0
- package/front_end/models/issues_manager/descriptions/webInstallManifestMissingNameOrShortName.md +3 -0
- package/front_end/models/issues_manager/descriptions/webInstallManifestParsingOrNetworkError.md +3 -0
- package/front_end/models/issues_manager/descriptions/webInstallNoManifest.md +3 -0
- package/front_end/models/issues_manager/descriptions/webInstallStartUrlInvalid.md +3 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/source_map_scopes/NamesResolver.ts +11 -3
- package/front_end/models/source_map_scopes/ScopeChainModel.ts +10 -6
- package/front_end/models/workspace/UISourceCode.ts +20 -0
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +281 -3
- package/front_end/panels/accessibility/accessibilityAnnouncementRecordingView.css +85 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -8
- package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +4 -10
- package/front_end/panels/animation/AnimationTimeline.ts +1 -1
- package/front_end/panels/application/CrashReportContextView.ts +1 -1
- package/front_end/panels/application/IndexedDBViews.ts +1 -1
- package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -0
- package/front_end/panels/application/components/AdsView.ts +63 -1
- package/front_end/panels/application/components/adsView.css +11 -1
- package/front_end/{ui/comments → panels/common}/CommentThreadWidget.ts +5 -20
- package/front_end/{ui/comments → panels/common}/CommentsOverlayWidget.ts +39 -62
- package/front_end/{ui/comments → panels/common}/CommentsStatusBarPill.ts +5 -5
- package/front_end/panels/common/ExtensionServer.ts +2 -1
- package/front_end/{ui/comments → panels/common}/commentThreadWidget.css +0 -12
- package/front_end/{ui/comments → panels/common}/commentsOverlay.css +2 -1
- package/front_end/{ui/comments/comments-meta.ts → panels/common/common-meta.ts} +11 -11
- package/front_end/panels/common/common.ts +3 -0
- package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +3 -3
- package/front_end/panels/elements/CSSRuleValidator.ts +1 -1
- package/front_end/panels/elements/ElementsPanel.ts +9 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +11 -3
- package/front_end/panels/elements/ElementsTreeOutline.ts +69 -74
- package/front_end/panels/elements/PropertiesWidget.ts +11 -10
- package/front_end/panels/elements/PropertyRenderer.ts +29 -25
- package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -6
- package/front_end/panels/elements/elementsTreeOutline.css +11 -5
- package/front_end/panels/emulation/DeviceModeToolbar.ts +2 -3
- package/front_end/panels/event_listeners/EventListenersView.ts +33 -44
- package/front_end/panels/lighthouse/LighthouseController.ts +1 -1
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts +6 -7
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +5 -1
- package/front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts +1 -1
- package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +1 -1
- package/front_end/panels/recorder/StepView.ts +19 -4
- package/front_end/panels/recorder/TimelineSection.ts +1 -1
- package/front_end/panels/recorder/stepView.css +1 -0
- package/front_end/panels/security/SecurityPanel.ts +5 -5
- package/front_end/panels/security/SecurityPanelSidebar.ts +2 -11
- package/front_end/panels/settings/BackendLinkingSettingsTab.ts +2 -1
- package/front_end/panels/settings/EditFileSystemView.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +2 -2
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +11 -16
- package/front_end/panels/sources/sources-meta.ts +1 -1
- package/front_end/panels/timeline/components/DetailsView.ts +3 -3
- package/front_end/panels/timeline/components/OriginMap.ts +1 -1
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +2 -3
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +0 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentOverlayManager.ts +28 -110
- package/front_end/ui/comments/comments.ts +0 -6
- package/front_end/ui/components/buttons/Button.ts +19 -1
- package/front_end/ui/legacy/ContextMenu.ts +16 -1
- package/front_end/ui/legacy/PlusButton.ts +5 -6
- package/front_end/ui/legacy/Treeoutline.ts +6 -0
- package/front_end/ui/legacy/Widget.ts +33 -0
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +3 -0
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +14 -4
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +36 -32
- package/front_end/ui/visual_logging/KnownContextValues.ts +4 -0
- package/package.json +1 -1
- package/.agents/skills/devtools-ci/SKILL.md +0 -65
- package/.agents/skills/evaluate-ai-css-completion/SKILL.md +0 -143
- package/.agents/skills/evaluate-ai-css-completion/scripts/evaluate.js +0 -104
- package/.agents/skills/fixing-skipped-tests/SKILL.md +0 -32
- package/.agents/skills/gerrit-cli/SKILL.md +0 -74
- package/.agents/skills/gerrit-cli/references/commands.md +0 -169
- package/.agents/skills/gerrit-cli/references/workflows.md +0 -63
- package/.agents/skills/gerrit-cli/scripts/import_upstream.py +0 -85
- package/front_end/models/issues_manager/descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +0 -4
|
@@ -348,14 +348,16 @@ export class TracingContext {
|
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
+
export const CSSControlMap: MapConstructor = Map;
|
|
352
|
+
export type CSSControlMap = Map<string, HTMLElement[]>;
|
|
353
|
+
|
|
351
354
|
export class RenderingContext {
|
|
352
355
|
constructor(readonly ast: SDK.CSSPropertyParser.SyntaxTree, readonly property: SDK.CSSProperty.CSSProperty|null,
|
|
353
356
|
readonly renderers: Map<Platform.Constructor.Constructor<SDK.CSSPropertyParser.Match>,
|
|
354
357
|
MatchRenderer<SDK.CSSPropertyParser.Match>>,
|
|
355
358
|
readonly matchedResult: SDK.CSSPropertyParser.BottomUpTreeMatching,
|
|
356
|
-
readonly cssControls?:
|
|
357
|
-
readonly
|
|
358
|
-
readonly signal?: AbortSignal|undefined) {
|
|
359
|
+
readonly cssControls?: CSSControlMap|undefined, readonly options: {readonly?: boolean} = {},
|
|
360
|
+
readonly tracing?: TracingContext|undefined, readonly signal?: AbortSignal|undefined) {
|
|
359
361
|
}
|
|
360
362
|
|
|
361
363
|
addControl(cssType: string, control: HTMLElement): void {
|
|
@@ -406,11 +408,10 @@ export class Renderer extends SDK.CSSPropertyParser.TreeWalker {
|
|
|
406
408
|
constructor(
|
|
407
409
|
ast: SDK.CSSPropertyParser.SyntaxTree,
|
|
408
410
|
property: SDK.CSSProperty.CSSProperty|null,
|
|
409
|
-
renderers:
|
|
410
|
-
|
|
411
|
-
MatchRenderer<SDK.CSSPropertyParser.Match>>,
|
|
411
|
+
renderers: Map<Platform.Constructor.Constructor<SDK.CSSPropertyParser.Match>,
|
|
412
|
+
MatchRenderer<SDK.CSSPropertyParser.Match>>,
|
|
412
413
|
matchedResult: SDK.CSSPropertyParser.BottomUpTreeMatching,
|
|
413
|
-
cssControls:
|
|
414
|
+
cssControls: CSSControlMap,
|
|
414
415
|
options: {
|
|
415
416
|
readonly?: boolean,
|
|
416
417
|
},
|
|
@@ -423,12 +424,12 @@ export class Renderer extends SDK.CSSPropertyParser.TreeWalker {
|
|
|
423
424
|
new RenderingContext(this.ast, property, renderers, this.#matchedResult, cssControls, options, tracing, signal);
|
|
424
425
|
}
|
|
425
426
|
|
|
426
|
-
static render(nodeOrNodes: CodeMirror.SyntaxNode|CodeMirror.SyntaxNode[],
|
|
427
|
-
|
|
427
|
+
static render(nodeOrNodes: CodeMirror.SyntaxNode|CodeMirror.SyntaxNode[],
|
|
428
|
+
context: RenderingContext): {nodes: Node[], cssControls: CSSControlMap} {
|
|
428
429
|
if (!Array.isArray(nodeOrNodes)) {
|
|
429
430
|
return this.render([nodeOrNodes], context);
|
|
430
431
|
}
|
|
431
|
-
const cssControls = new
|
|
432
|
+
const cssControls = new CSSControlMap();
|
|
432
433
|
const renderers = nodeOrNodes.map(
|
|
433
434
|
node => this.walkExcludingSuccessors(
|
|
434
435
|
context.ast.subtree(node), context.property, context.renderers, context.matchedResult, cssControls,
|
|
@@ -437,9 +438,8 @@ export class Renderer extends SDK.CSSPropertyParser.TreeWalker {
|
|
|
437
438
|
return {nodes, cssControls};
|
|
438
439
|
}
|
|
439
440
|
|
|
440
|
-
static renderInto(
|
|
441
|
-
|
|
442
|
-
parent: Node): {nodes: Node[], cssControls: SDK.CSSPropertyParser.CSSControlMap} {
|
|
441
|
+
static renderInto(nodeOrNodes: CodeMirror.SyntaxNode|CodeMirror.SyntaxNode[], context: RenderingContext,
|
|
442
|
+
parent: Node): {nodes: Node[], cssControls: CSSControlMap} {
|
|
443
443
|
const {nodes, cssControls} = this.render(nodeOrNodes, context);
|
|
444
444
|
if (parent.lastChild && SDK.CSSPropertyParser.requiresSpace([parent.lastChild], nodes)) {
|
|
445
445
|
parent.appendChild(document.createTextNode(' '));
|
|
@@ -456,8 +456,14 @@ export class Renderer extends SDK.CSSPropertyParser.TreeWalker {
|
|
|
456
456
|
const renderer = match &&
|
|
457
457
|
this.#context.renderers.get(match.constructor as Platform.Constructor.Constructor<SDK.CSSPropertyParser.Match>);
|
|
458
458
|
if (renderer || match instanceof SDK.CSSPropertyParserMatchers.TextMatch) {
|
|
459
|
-
|
|
460
|
-
|
|
459
|
+
let output: Node[];
|
|
460
|
+
if (renderer) {
|
|
461
|
+
output = renderer.render(match, this.#context);
|
|
462
|
+
} else {
|
|
463
|
+
const span = document.createElement('span');
|
|
464
|
+
span.appendChild(document.createTextNode(match.text));
|
|
465
|
+
output = [span];
|
|
466
|
+
}
|
|
461
467
|
this.#context.tracing?.highlighting.addMatch(match, output);
|
|
462
468
|
this.renderedMatchForTest(output, match);
|
|
463
469
|
this.#output = mergeWithSpacing(this.#output, output);
|
|
@@ -490,11 +496,10 @@ export class Renderer extends SDK.CSSPropertyParser.TreeWalker {
|
|
|
490
496
|
//
|
|
491
497
|
// More general, longer matches take precedence over shorter, more specific matches. Whitespaces are normalized, for
|
|
492
498
|
// unmatched text and around rendered matching results.
|
|
493
|
-
static renderValueElement(
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
signal?: AbortSignal): {valueElement: HTMLElement, cssControls: SDK.CSSPropertyParser.CSSControlMap} {
|
|
499
|
+
static renderValueElement(property: SDK.CSSProperty.CSSProperty|{name: string, value: string},
|
|
500
|
+
matchedResult: SDK.CSSPropertyParser.BottomUpTreeMatching|null,
|
|
501
|
+
renderers: Array<MatchRenderer<SDK.CSSPropertyParser.Match>>, tracing?: TracingContext,
|
|
502
|
+
signal?: AbortSignal): {valueElement: HTMLElement, cssControls: CSSControlMap} {
|
|
498
503
|
const valueElement = document.createElement('span');
|
|
499
504
|
valueElement.setAttribute(
|
|
500
505
|
'jslog', `${VisualLogging.value().track({
|
|
@@ -510,11 +515,10 @@ export class Renderer extends SDK.CSSPropertyParser.TreeWalker {
|
|
|
510
515
|
return {valueElement, cssControls};
|
|
511
516
|
}
|
|
512
517
|
|
|
513
|
-
static renderValueNodes(
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
signal?: AbortSignal): {nodes: Node[], cssControls: SDK.CSSPropertyParser.CSSControlMap} {
|
|
518
|
+
static renderValueNodes(property: SDK.CSSProperty.CSSProperty|{name: string, value: string},
|
|
519
|
+
matchedResult: SDK.CSSPropertyParser.BottomUpTreeMatching|null,
|
|
520
|
+
renderers: Array<MatchRenderer<SDK.CSSPropertyParser.Match>>, tracing?: TracingContext,
|
|
521
|
+
signal?: AbortSignal): {nodes: Node[], cssControls: CSSControlMap} {
|
|
518
522
|
if (!matchedResult) {
|
|
519
523
|
return {nodes: [document.createTextNode(property.value)], cssControls: new Map()};
|
|
520
524
|
}
|
|
@@ -35,6 +35,7 @@ import {CSSValueTraceView} from './CSSValueTraceView.js';
|
|
|
35
35
|
import {ElementsPanel} from './ElementsPanel.js';
|
|
36
36
|
import {
|
|
37
37
|
BinOpRenderer,
|
|
38
|
+
type CSSControlMap,
|
|
38
39
|
type MatchRenderer,
|
|
39
40
|
Renderer,
|
|
40
41
|
rendererBase,
|
|
@@ -713,7 +714,7 @@ export class ColorRenderer extends ColorRendererBase {
|
|
|
713
714
|
|
|
714
715
|
#getValueChild(match: SDK.CSSPropertyParserMatchers.ColorMatch, context: RenderingContext): {
|
|
715
716
|
valueChild: HTMLSpanElement,
|
|
716
|
-
cssControls?:
|
|
717
|
+
cssControls?: CSSControlMap,
|
|
717
718
|
childTracingContexts?: TracingContext[],
|
|
718
719
|
} {
|
|
719
720
|
const valueChild = document.createElement('span');
|
|
@@ -906,11 +907,10 @@ export class LightDarkColorRenderer extends LightDarkColorRendererBase {
|
|
|
906
907
|
return [colorSwatch, content];
|
|
907
908
|
}
|
|
908
909
|
|
|
909
|
-
async applyColorScheme(
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
darkControls: SDK.CSSPropertyParser.CSSControlMap): Promise<void> {
|
|
910
|
+
async applyColorScheme(match: SDK.CSSPropertyParserMatchers.LightDarkColorMatch, context: RenderingContext,
|
|
911
|
+
colorSwatch: InlineEditor.ColorSwatch.ColorSwatch, light: HTMLSpanElement,
|
|
912
|
+
dark: HTMLSpanElement, lightControls: CSSControlMap,
|
|
913
|
+
darkControls: CSSControlMap): Promise<void> {
|
|
914
914
|
const activeColor = await this.#activeColor(match);
|
|
915
915
|
if (context.signal?.aborted) {
|
|
916
916
|
return;
|
|
@@ -56,11 +56,13 @@
|
|
|
56
56
|
line-height: normal;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
:host(.elements-tree-outline),
|
|
59
60
|
.elements-disclosure devtools-tree {
|
|
60
61
|
width: 100%;
|
|
61
62
|
min-width: 100%;
|
|
62
63
|
min-height: 100%;
|
|
63
64
|
display: inline-block;
|
|
65
|
+
padding: 0;
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
.elements-disclosure li {
|
|
@@ -86,6 +88,10 @@
|
|
|
86
88
|
display: flex;
|
|
87
89
|
}
|
|
88
90
|
|
|
91
|
+
.elements-disclosure li .tree-element-title {
|
|
92
|
+
display: contents;
|
|
93
|
+
}
|
|
94
|
+
|
|
89
95
|
.elements-disclosure li.parent:not(.always-parent) {
|
|
90
96
|
/** Keep it in sync with ElementsTreeElements.updateDecorations **/
|
|
91
97
|
margin-left: calc(-1 * var(--sys-size-6));
|
|
@@ -570,7 +576,7 @@ li.hovered:not(.always-parent) + ol.children:not(.shadow-root) {
|
|
|
570
576
|
.tree-outline-disclosure li .selection {
|
|
571
577
|
display: none;
|
|
572
578
|
z-index: -1;
|
|
573
|
-
margin-left:
|
|
579
|
+
margin-left: calc(var(--indent, 0px) * -1);
|
|
574
580
|
}
|
|
575
581
|
|
|
576
582
|
.tree-outline-disclosure li.selected .selection {
|
|
@@ -605,6 +611,10 @@ li.hovered:not(.always-parent) + ol.children:not(.shadow-root) {
|
|
|
605
611
|
background-color: var(--sys-color-tonal-container);
|
|
606
612
|
}
|
|
607
613
|
|
|
614
|
+
.tree-outline-disclosure .elements-tree-outline li:has(.elements-tree-editor) .selection {
|
|
615
|
+
display: none;
|
|
616
|
+
}
|
|
617
|
+
|
|
608
618
|
.tree-outline-disclosure ol {
|
|
609
619
|
list-style-type: none;
|
|
610
620
|
padding-inline-start: 12px;
|
|
@@ -623,7 +633,3 @@ li.hovered:not(.always-parent) + ol.children:not(.shadow-root) {
|
|
|
623
633
|
.tree-outline-disclosure li.in-clipboard .highlight {
|
|
624
634
|
outline: 1px dotted var(--sys-color-divider);
|
|
625
635
|
}
|
|
626
|
-
|
|
627
|
-
.tree-outline-disclosure li.elements-tree-expand-all {
|
|
628
|
-
margin: var(--sys-size-2) 0;
|
|
629
|
-
}
|
|
@@ -842,9 +842,8 @@ export class DeviceModeToolbar extends UI.Widget.Widget {
|
|
|
842
842
|
if (!this.model) {
|
|
843
843
|
return;
|
|
844
844
|
}
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
EmulationModel.DeviceModeModel.Type.Device, device, this.lastMode.get(device) || device.modes[0], scale);
|
|
845
|
+
this.model.emulate(EmulationModel.DeviceModeModel.Type.Device, device,
|
|
846
|
+
this.lastMode.get(device) || device.modes[0]);
|
|
848
847
|
}
|
|
849
848
|
|
|
850
849
|
private switchToResponsive(): void {
|
|
@@ -17,7 +17,7 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
|
17
17
|
|
|
18
18
|
import {frameworkEventListeners} from './EventListenersUtils.js';
|
|
19
19
|
import eventListenersViewStyles from './eventListenersView.css.js';
|
|
20
|
-
const {widget} = UI.Widget;
|
|
20
|
+
const {widget, widgetRef} = UI.Widget;
|
|
21
21
|
const {html, render} = Lit;
|
|
22
22
|
const {repeat} = Lit.Directives;
|
|
23
23
|
|
|
@@ -54,16 +54,23 @@ const UIStrings = {
|
|
|
54
54
|
const str_ = i18n.i18n.registerUIStrings('panels/event_listeners/EventListenersView.ts', UIStrings);
|
|
55
55
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
56
56
|
|
|
57
|
+
interface ListenerEntry {
|
|
58
|
+
object: SDK.RemoteObject.RemoteObject;
|
|
59
|
+
listener: SDK.DOMDebuggerModel.EventListener;
|
|
60
|
+
objectTree: ObjectUI.ObjectPropertiesSection.ObjectTree;
|
|
61
|
+
}
|
|
62
|
+
|
|
57
63
|
interface ViewInput {
|
|
58
64
|
togglePassiveListener(listener: SDK.DOMDebuggerModel.EventListener): void;
|
|
59
65
|
removeListener(listener: SDK.DOMDebuggerModel.EventListener): boolean;
|
|
60
66
|
reveal(object: SDK.RemoteObject.RemoteObject): void;
|
|
61
67
|
linkifier: Components.Linkifier.Linkifier;
|
|
62
|
-
listeners: Map<string,
|
|
68
|
+
listeners: Map<string, ListenerEntry[]>;
|
|
63
69
|
filter?: {showFramework: boolean, showPassive: boolean, showBlocking: boolean};
|
|
64
70
|
}
|
|
65
71
|
|
|
66
72
|
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
73
|
+
|
|
67
74
|
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
68
75
|
const types = input.listeners.keys().toArray().sort();
|
|
69
76
|
|
|
@@ -92,37 +99,6 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
92
99
|
void menu.show();
|
|
93
100
|
};
|
|
94
101
|
|
|
95
|
-
const listenerProperties = (listener: SDK.DOMDebuggerModel.EventListener): Iterable<Lit.TemplateResult> => {
|
|
96
|
-
const runtimeModel = listener.domDebuggerModel().runtimeModel();
|
|
97
|
-
const properties = [
|
|
98
|
-
new ObjectUI.ObjectPropertiesSection.ObjectTreeNode(
|
|
99
|
-
runtimeModel.createRemotePropertyFromPrimitiveValue('useCapture', listener.useCapture()), undefined, {
|
|
100
|
-
readOnly: false,
|
|
101
|
-
propertiesMode: ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.OWN_AND_INTERNAL_AND_INHERITED,
|
|
102
|
-
}),
|
|
103
|
-
new ObjectUI.ObjectPropertiesSection.ObjectTreeNode(
|
|
104
|
-
runtimeModel.createRemotePropertyFromPrimitiveValue('passive', listener.passive()), undefined, {
|
|
105
|
-
readOnly: false,
|
|
106
|
-
propertiesMode: ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.OWN_AND_INTERNAL_AND_INHERITED,
|
|
107
|
-
}),
|
|
108
|
-
new ObjectUI.ObjectPropertiesSection.ObjectTreeNode(
|
|
109
|
-
runtimeModel.createRemotePropertyFromPrimitiveValue('once', listener.once()), undefined, {
|
|
110
|
-
readOnly: false,
|
|
111
|
-
propertiesMode: ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.OWN_AND_INTERNAL_AND_INHERITED,
|
|
112
|
-
}),
|
|
113
|
-
];
|
|
114
|
-
if (typeof listener.handler() !== 'undefined') {
|
|
115
|
-
properties.push(new ObjectUI.ObjectPropertiesSection.ObjectTreeNode(
|
|
116
|
-
new SDK.RemoteObject.RemoteObjectProperty('handler', listener.handler()), undefined, {
|
|
117
|
-
readOnly: false,
|
|
118
|
-
propertiesMode: ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.OWN_AND_INTERNAL_AND_INHERITED,
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
121
|
-
return ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement
|
|
122
|
-
.createPropertyNodes({properties}, true, true, undefined)
|
|
123
|
-
.map(node => html`<devtools-tree-wrapper .treeElement=${node}></devtools-tree-wrapper>`);
|
|
124
|
-
};
|
|
125
|
-
|
|
126
102
|
const shouldHide = (listenerOrType: SDK.DOMDebuggerModel.EventListener|string): boolean => {
|
|
127
103
|
if (!input.filter) {
|
|
128
104
|
return false;
|
|
@@ -183,7 +159,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
183
159
|
<li role=treeitem toggle-on-click aria-label="${type}, event listener" ?hidden=${shouldHide(type)}>
|
|
184
160
|
${type}
|
|
185
161
|
<ul role=group>
|
|
186
|
-
${repeat(input.listeners.get(type) ?? [], ({listener}) => listener, ({listener, object}) => html`
|
|
162
|
+
${repeat(input.listeners.get(type) ?? [], ({listener}) => listener, ({listener, object, objectTree}) => html`
|
|
187
163
|
<li role=treeitem
|
|
188
164
|
data-origin=${listener.origin()}
|
|
189
165
|
@contextmenu=${(e: Event) => onContextMenu(e, listener, object)}
|
|
@@ -213,9 +189,8 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
213
189
|
undefined, {tabStop: true})}
|
|
214
190
|
</span>
|
|
215
191
|
</span>
|
|
216
|
-
<ul role=group
|
|
217
|
-
|
|
218
|
-
</ul>
|
|
192
|
+
<ul role=group ${widget(ObjectUI.ObjectPropertiesSection.ObjectTreeWidget, {objectTree})} ${
|
|
193
|
+
widgetRef(ObjectUI.ObjectPropertiesSection.ObjectTreeWidget, () => {})}></ul>
|
|
219
194
|
</li>`)}
|
|
220
195
|
</ul>
|
|
221
196
|
</li>`)}
|
|
@@ -229,8 +204,7 @@ export class EventListenersView extends UI.Widget.VBox {
|
|
|
229
204
|
#objects: Array<SDK.RemoteObject.RemoteObject|null> = [];
|
|
230
205
|
#filter: {showFramework: boolean, showPassive: boolean, showBlocking: boolean}|undefined;
|
|
231
206
|
#view: View;
|
|
232
|
-
#listeners?:
|
|
233
|
-
Map<string, Array<{object: SDK.RemoteObject.RemoteObject, listener: SDK.DOMDebuggerModel.EventListener}>>;
|
|
207
|
+
#listeners?: Map<string, ListenerEntry[]>;
|
|
234
208
|
#linkifier = new Components.Linkifier.Linkifier();
|
|
235
209
|
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
236
210
|
super(element);
|
|
@@ -271,6 +245,7 @@ export class EventListenersView extends UI.Widget.VBox {
|
|
|
271
245
|
filter: this.#filter,
|
|
272
246
|
togglePassiveListener: (listener: SDK.DOMDebuggerModel.EventListener) => {
|
|
273
247
|
void listener.togglePassive().then(() => {
|
|
248
|
+
this.#listeners = undefined;
|
|
274
249
|
this.requestUpdate();
|
|
275
250
|
});
|
|
276
251
|
},
|
|
@@ -305,14 +280,27 @@ export class EventListenersView extends UI.Widget.VBox {
|
|
|
305
280
|
this.eventListenersArrivedForTest();
|
|
306
281
|
}
|
|
307
282
|
|
|
308
|
-
static
|
|
309
|
-
|
|
283
|
+
static #createObjectTree(listener: SDK.DOMDebuggerModel.EventListener): ObjectUI.ObjectPropertiesSection.ObjectTree {
|
|
284
|
+
const object = SDK.RemoteObject.RemoteObject.fromLocalObject({
|
|
285
|
+
useCapture: listener.useCapture(),
|
|
286
|
+
passive: listener.passive(),
|
|
287
|
+
once: listener.once(),
|
|
288
|
+
...(typeof listener.handler() !== 'undefined' ? {handler: listener.handler()} : {}),
|
|
289
|
+
});
|
|
290
|
+
const objectTree = new ObjectUI.ObjectPropertiesSection.ObjectTree(object, {
|
|
291
|
+
readOnly: false,
|
|
292
|
+
propertiesMode: ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.OWN_AND_INTERNAL_AND_INHERITED,
|
|
293
|
+
});
|
|
294
|
+
objectTree.expanded = true;
|
|
295
|
+
return objectTree;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
static async #loadListeners(objects: SDK.RemoteObject.RemoteObject[]): Promise<Map<string, ListenerEntry[]>> {
|
|
310
299
|
return Map.groupBy((await Promise.all(objects.map(this.#loadListenersForObject))).flat(),
|
|
311
300
|
({listener}) => listener.type());
|
|
312
301
|
}
|
|
313
302
|
|
|
314
|
-
static async #loadListenersForObject(object: SDK.RemoteObject.RemoteObject):
|
|
315
|
-
Promise<Array<{object: SDK.RemoteObject.RemoteObject, listener: SDK.DOMDebuggerModel.EventListener}>> {
|
|
303
|
+
static async #loadListenersForObject(object: SDK.RemoteObject.RemoteObject): Promise<ListenerEntry[]> {
|
|
316
304
|
const domDebuggerModel = object.runtimeModel().target().model(SDK.DOMDebuggerModel.DOMDebuggerModel);
|
|
317
305
|
const [eventListeners, frameworkEventListenersObject] =
|
|
318
306
|
await Promise.all([domDebuggerModel?.eventListeners(object), frameworkEventListeners(object)]);
|
|
@@ -335,7 +323,8 @@ export class EventListenersView extends UI.Widget.VBox {
|
|
|
335
323
|
}
|
|
336
324
|
|
|
337
325
|
return [eventListeners, frameworkEventListenersObject.eventListeners].flatMap(
|
|
338
|
-
listeners => listeners.map(
|
|
326
|
+
listeners => listeners.map(
|
|
327
|
+
listener => ({object, listener, objectTree: EventListenersView.#createObjectTree(listener)})));
|
|
339
328
|
|
|
340
329
|
function isInternalEventListener(this: Array<Platform.Constructor.Constructor<unknown>>): boolean[] {
|
|
341
330
|
const isInternal = [];
|
|
@@ -40,7 +40,7 @@ const UIStrings = {
|
|
|
40
40
|
/**
|
|
41
41
|
* @description Help text in the Lighthouse panel.
|
|
42
42
|
*/
|
|
43
|
-
atLeastOneCategoryMustBeSelected: 'At least one category must be selected
|
|
43
|
+
atLeastOneCategoryMustBeSelected: 'At least one category must be selected',
|
|
44
44
|
/**
|
|
45
45
|
* @description Text in sidebar of the Application panel.
|
|
46
46
|
*/
|
|
@@ -87,7 +87,7 @@ interface SerializableSettings {
|
|
|
87
87
|
|
|
88
88
|
export class LinearMemoryInspectorController extends SDK.TargetManager.SDKModelObserver<SDK.RuntimeModel.RuntimeModel>
|
|
89
89
|
implements Common.Revealer.Revealer<SDK.RemoteObject.LinearMemoryInspectable>,
|
|
90
|
-
UI.ContextMenu.Provider<ObjectUI.ObjectPropertiesSection.
|
|
90
|
+
UI.ContextMenu.Provider<ObjectUI.ObjectPropertiesSection.ObjectTreeNode> {
|
|
91
91
|
#paneInstance = LinearMemoryInspectorPane.instance();
|
|
92
92
|
#bufferIdToRemoteObject = new Map<string, SDK.RemoteObject.RemoteObject>();
|
|
93
93
|
#bufferIdToHighlightInfo = new Map<string, LinearMemoryInspectorComponents.LinearMemoryViewerUtils.HighlightInfo>();
|
|
@@ -315,12 +315,11 @@ export class LinearMemoryInspectorController extends SDK.TargetManager.SDKModelO
|
|
|
315
315
|
void UI.ViewManager.ViewManager.instance().showView('linear-memory-inspector', omitFocus);
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
appendApplicableItems(
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
const
|
|
323
|
-
const object = target.property.object;
|
|
318
|
+
appendApplicableItems(_event: Event, contextMenu: UI.ContextMenu.ContextMenu,
|
|
319
|
+
target: ObjectUI.ObjectPropertiesSection.ObjectTreeNode): void {
|
|
320
|
+
if (target.object?.isLinearMemoryInspectable()) {
|
|
321
|
+
const expression = target.path;
|
|
322
|
+
const object = target.object;
|
|
324
323
|
contextMenu.debugSection().appendItem(
|
|
325
324
|
i18nString(UIStrings.openInMemoryInspectorPanel),
|
|
326
325
|
this.reveal.bind(this, new SDK.RemoteObject.LinearMemoryInspectable(object, expression)),
|
|
@@ -29,7 +29,11 @@
|
|
|
29
29
|
justify-content: center;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.navigator-widget
|
|
32
|
+
.navigator-widget {
|
|
33
|
+
flex: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.navigator-widget + devtools-linear-memory-inspector-viewer {
|
|
33
37
|
margin-top: var(--sys-size-6);
|
|
34
38
|
}
|
|
35
39
|
|
|
@@ -15,7 +15,7 @@ const UIStrings = {
|
|
|
15
15
|
/**
|
|
16
16
|
* @description Icon title for warning indicator in the Network panel title.
|
|
17
17
|
*/
|
|
18
|
-
requestsMayBeOverridden: 'Requests may be overridden locally. See the Sources panel',
|
|
18
|
+
requestsMayBeOverridden: 'Requests may be overridden locally. See the Sources panel.',
|
|
19
19
|
/**
|
|
20
20
|
* @description Icon title for warning indicator in the Network panel title.
|
|
21
21
|
*/
|
|
@@ -42,7 +42,7 @@ const UIStrings = {
|
|
|
42
42
|
/**
|
|
43
43
|
* @description Tooltip text in throttling manager of the Performance panel.
|
|
44
44
|
*/
|
|
45
|
-
excessConcurrency: 'Exceeding the default value may degrade system performance
|
|
45
|
+
excessConcurrency: 'Exceeding the default value may degrade system performance',
|
|
46
46
|
/**
|
|
47
47
|
* @description Tooltip text in throttling manager of the Performance panel.
|
|
48
48
|
*/
|
|
@@ -159,7 +159,7 @@ const UIStrings = {
|
|
|
159
159
|
* @description Text to explain why the user should run the CPU calibration process.
|
|
160
160
|
*/
|
|
161
161
|
calibrationCTA:
|
|
162
|
-
'To use the CPU throttling presets, run the calibration process to determine the ideal throttling rate for your device
|
|
162
|
+
'To use the CPU throttling presets, run the calibration process to determine the ideal throttling rate for your device',
|
|
163
163
|
/**
|
|
164
164
|
* @description Text to explain what CPU throttling presets are.
|
|
165
165
|
*/
|
|
@@ -18,6 +18,7 @@ import stepViewStyles from './stepView.css.js';
|
|
|
18
18
|
import {TimelineSection} from './TimelineSection.js';
|
|
19
19
|
|
|
20
20
|
const {html} = Lit;
|
|
21
|
+
const {ifDefined} = Lit.Directives;
|
|
21
22
|
const {widget} = UI.Widget;
|
|
22
23
|
|
|
23
24
|
const UIStrings = {
|
|
@@ -276,8 +277,7 @@ function renderStepActions(input: ViewInput): Lit.TemplateResult|null {
|
|
|
276
277
|
return html`
|
|
277
278
|
<devtools-menu-button
|
|
278
279
|
class="step-actions"
|
|
279
|
-
|
|
280
|
-
aria-label=${i18nString(UIStrings.openStepActions)}
|
|
280
|
+
.accessibleLabel=${i18nString(UIStrings.openStepActions)}
|
|
281
281
|
.populateMenuCall=${input.populateStepContextMenu}
|
|
282
282
|
@keydown=${(event: Event) => {
|
|
283
283
|
event.stopPropagation();
|
|
@@ -312,6 +312,8 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
312
312
|
section: input.section,
|
|
313
313
|
});
|
|
314
314
|
const subtitle = input.step ? getSelectorPreview(input.step) : getSectionPreview(input.section);
|
|
315
|
+
const breakpointTitle =
|
|
316
|
+
input.hasBreakpoint ? i18nString(UIStrings.removeBreakpoint) : i18nString(UIStrings.addBreakpoint);
|
|
315
317
|
|
|
316
318
|
// clang-format off
|
|
317
319
|
Lit.render(
|
|
@@ -347,13 +349,26 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
347
349
|
}
|
|
348
350
|
}}
|
|
349
351
|
class=${Lit.Directives.classMap(stepClasses)}>
|
|
350
|
-
<svg slot="icon" width="24" height="24" class="icon"
|
|
352
|
+
<svg slot="icon" width="24" height="24" class="icon"
|
|
353
|
+
role=${input.step ? 'button' : 'presentation'}
|
|
354
|
+
aria-label=${ifDefined(input.step ? breakpointTitle : undefined)}
|
|
355
|
+
aria-hidden=${ifDefined(input.step ? undefined : 'true')}
|
|
356
|
+
tabindex=${ifDefined(input.step ? 0 : undefined)}
|
|
357
|
+
@click=${input.step ? input.onBreakpointClick : undefined}
|
|
358
|
+
@keydown=${input.step ? (event: KeyboardEvent) => {
|
|
359
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
360
|
+
input.onBreakpointClick();
|
|
361
|
+
event.preventDefault();
|
|
362
|
+
event.stopPropagation();
|
|
363
|
+
}
|
|
364
|
+
} : undefined}
|
|
365
|
+
jslog=${ifDefined(input.step ? VisualLogging.action('breakpoint').track({click: true}) : undefined)}>
|
|
351
366
|
<circle class="circle-icon"/>
|
|
352
367
|
<g class="error-icon">
|
|
353
368
|
<path d="M1.5 1.5L6.5 6.5" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
354
369
|
<path d="M1.5 6.5L6.5 1.5" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
355
370
|
</g>
|
|
356
|
-
<path
|
|
371
|
+
<path class="breakpoint-icon" d="M2.5 5.5H17.7098L21.4241 12L17.7098 18.5H2.5V5.5Z"/>
|
|
357
372
|
</svg>
|
|
358
373
|
<div class="summary">
|
|
359
374
|
<div class="title-container ${isExpandable ? 'action' : ''}"
|
|
@@ -37,7 +37,7 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
37
37
|
<div class=${Lit.Directives.classMap(classes)}>
|
|
38
38
|
<div class="overlay"></div>
|
|
39
39
|
<div class="icon"><slot name="icon"></slot></div>
|
|
40
|
-
<svg width="24" height="100%" class="bar">
|
|
40
|
+
<svg width="24" height="100%" class="bar" aria-hidden="true">
|
|
41
41
|
<rect class="line" x="7" y="0" width="2" height="100%" />
|
|
42
42
|
</svg>
|
|
43
43
|
<slot></slot>
|
|
@@ -608,7 +608,7 @@ export class SecurityPanel extends UI.Panel.Panel implements SDK.TargetManager.S
|
|
|
608
608
|
SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.PrimaryPageChanged,
|
|
609
609
|
this.onPrimaryPageChanged, this);
|
|
610
610
|
|
|
611
|
-
this.sidebar.
|
|
611
|
+
this.sidebar.showOverview();
|
|
612
612
|
}
|
|
613
613
|
|
|
614
614
|
static instance(opts: {forceNew: boolean|null} = {forceNew: null}): SecurityPanel {
|
|
@@ -657,7 +657,7 @@ export class SecurityPanel extends UI.Panel.Panel implements SDK.TargetManager.S
|
|
|
657
657
|
override wasShown(): void {
|
|
658
658
|
super.wasShown();
|
|
659
659
|
if (!this.visibleView) {
|
|
660
|
-
this.sidebar.
|
|
660
|
+
this.sidebar.showOverview();
|
|
661
661
|
}
|
|
662
662
|
}
|
|
663
663
|
|
|
@@ -808,7 +808,7 @@ export class SecurityPanel extends UI.Panel.Panel implements SDK.TargetManager.S
|
|
|
808
808
|
const {frame} = event.data;
|
|
809
809
|
const request = this.lastResponseReceivedForLoaderId.get(frame.loaderId);
|
|
810
810
|
|
|
811
|
-
this.sidebar.
|
|
811
|
+
this.sidebar.showOverview();
|
|
812
812
|
this.sidebar.clearOrigins();
|
|
813
813
|
this.origins.clear();
|
|
814
814
|
this.lastResponseReceivedForLoaderId.clear();
|
|
@@ -831,8 +831,8 @@ export class SecurityPanel extends UI.Panel.Panel implements SDK.TargetManager.S
|
|
|
831
831
|
private onInterstitialShown(): void {
|
|
832
832
|
// The panel might have been displaying the origin view on the
|
|
833
833
|
// previously loaded page. When showing an interstitial, switch
|
|
834
|
-
// back to the
|
|
835
|
-
this.sidebar.
|
|
834
|
+
// back to the overview view.
|
|
835
|
+
this.sidebar.showOverview();
|
|
836
836
|
this.sidebar.toggleOriginsList(true /* hidden */);
|
|
837
837
|
}
|
|
838
838
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import * as Common from '../../core/common/common.js';
|
|
6
5
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
6
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
7
|
import * as Protocol from '../../generated/protocol.js';
|
|
@@ -208,7 +207,6 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
208
207
|
};
|
|
209
208
|
|
|
210
209
|
export class SecurityPanelSidebar extends UI.Widget.VBox {
|
|
211
|
-
readonly #securitySidebarLastItemSetting: Common.Settings.Setting<string>;
|
|
212
210
|
#mainOrigin: string|null = null;
|
|
213
211
|
#origins = new Map<Platform.DevToolsPath.UrlString, Protocol.Security.SecurityState>();
|
|
214
212
|
#originsHidden = false;
|
|
@@ -222,9 +220,6 @@ export class SecurityPanelSidebar extends UI.Widget.VBox {
|
|
|
222
220
|
super(element);
|
|
223
221
|
this.#view = view;
|
|
224
222
|
this.registerRequiredCSS(lockIconStyles, sidebarStyles);
|
|
225
|
-
|
|
226
|
-
this.#securitySidebarLastItemSetting =
|
|
227
|
-
Common.Settings.Settings.instance().createSetting('security-last-selected-element-path', '');
|
|
228
223
|
}
|
|
229
224
|
|
|
230
225
|
set onShowOrigin(callback: (origin: Platform.DevToolsPath.UrlString|null) => void) {
|
|
@@ -233,12 +228,11 @@ export class SecurityPanelSidebar extends UI.Widget.VBox {
|
|
|
233
228
|
|
|
234
229
|
override wasShown(): void {
|
|
235
230
|
super.wasShown();
|
|
236
|
-
this.
|
|
231
|
+
this.requestUpdate();
|
|
237
232
|
}
|
|
238
233
|
|
|
239
|
-
|
|
234
|
+
showOverview(): void {
|
|
240
235
|
this.#selectedElementId = 'overview';
|
|
241
|
-
this.#securitySidebarLastItemSetting.set('overview');
|
|
242
236
|
this.requestUpdate();
|
|
243
237
|
this.#onShowOrigin?.(null);
|
|
244
238
|
}
|
|
@@ -295,7 +289,6 @@ export class SecurityPanelSidebar extends UI.Widget.VBox {
|
|
|
295
289
|
const element = {
|
|
296
290
|
select: () => {
|
|
297
291
|
this.#selectedElementId = origin;
|
|
298
|
-
this.#securitySidebarLastItemSetting.set(origin);
|
|
299
292
|
this.requestUpdate();
|
|
300
293
|
this.#onShowOrigin?.(origin);
|
|
301
294
|
},
|
|
@@ -312,7 +305,6 @@ export class SecurityPanelSidebar extends UI.Widget.VBox {
|
|
|
312
305
|
|
|
313
306
|
set selectedOrigin(origin: Platform.DevToolsPath.UrlString|null) {
|
|
314
307
|
this.#selectedElementId = origin ?? 'overview';
|
|
315
|
-
this.#securitySidebarLastItemSetting.set(this.#selectedElementId);
|
|
316
308
|
this.requestUpdate();
|
|
317
309
|
this.#onShowOrigin?.(origin);
|
|
318
310
|
}
|
|
@@ -333,7 +325,6 @@ export class SecurityPanelSidebar extends UI.Widget.VBox {
|
|
|
333
325
|
const output: ViewOutput = {
|
|
334
326
|
onElementSelected: (id: string) => {
|
|
335
327
|
this.#selectedElementId = id;
|
|
336
|
-
this.#securitySidebarLastItemSetting.set(id);
|
|
337
328
|
this.requestUpdate();
|
|
338
329
|
},
|
|
339
330
|
onShowOrigin: (origin: Platform.DevToolsPath.UrlString|null) => {
|
|
@@ -93,7 +93,7 @@ const UIStrings = {
|
|
|
93
93
|
/**
|
|
94
94
|
* @description Warning message displayed below the backend linking rules table when one or more rules are invalid.
|
|
95
95
|
*/
|
|
96
|
-
invalidRulesWarning: 'Invalid rules will not be applied or saved
|
|
96
|
+
invalidRulesWarning: 'Invalid rules will not be applied or saved',
|
|
97
97
|
} as const;
|
|
98
98
|
|
|
99
99
|
const str_ = i18n.i18n.registerUIStrings('panels/settings/BackendLinkingSettingsTab.ts', UIStrings);
|
|
@@ -168,6 +168,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
168
168
|
name=${i18nString(UIStrings.rulesSectionHeading)}
|
|
169
169
|
striped
|
|
170
170
|
inline
|
|
171
|
+
deletable
|
|
171
172
|
@delete=${() => {}}
|
|
172
173
|
@create=${onCreate}>
|
|
173
174
|
<table>
|