chrome-devtools-frontend 1.0.1730971 → 1.0.1732697
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/get_the_code.md +1 -73
- package/front_end/Tests.js +15 -0
- package/front_end/core/host/AidaClient.ts +47 -3
- package/front_end/core/host/AidaClientTypes.ts +27 -3
- package/front_end/core/host/AidaGcaTranslation.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +8 -3
- package/front_end/core/sdk/NetworkManager.ts +2 -1
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +2 -2
- package/front_end/generated/Deprecation.ts +0 -8
- package/front_end/generated/InspectorBackendCommands.ts +2 -1
- package/front_end/generated/SupportedCSSProperties.ts +2 -2
- package/front_end/generated/protocol.ts +9 -0
- package/front_end/models/ai-utils/debug.ts +127 -22
- package/front_end/models/ai_assistance/README.md +1 -1
- package/front_end/models/ai_assistance/agents/AiAgent.ts +10 -5
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +4 -3
- package/front_end/models/ai_assistance/contexts/LighthouseContext.snapshot.txt +9 -2
- package/front_end/models/ai_assistance/contexts/LighthouseContext.ts +4 -3
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +97 -11
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +92 -43
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +26 -26
- package/front_end/models/ai_assistance/skills/styling.md +4 -2
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +31 -36
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +2 -1
- package/front_end/models/ai_code_completion/ai_code_completion.ts +11 -2
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +2 -1
- package/front_end/models/ai_code_generation/ai_code_generation.ts +11 -2
- package/front_end/models/bindings/CompilerScriptMapping.ts +0 -1
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +0 -1
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -1
- package/front_end/models/har/HARFormat.ts +1 -0
- package/front_end/models/har/Importer.ts +7 -1
- package/front_end/models/har/Log.snapshot.txt +2 -0
- package/front_end/models/har/Log.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.ts +0 -4
- package/front_end/models/trace/LanternComputationData.ts +4 -0
- package/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +126 -1
- package/front_end/models/trace/lantern/types/Lantern.ts +3 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +33 -1
- package/front_end/panels/ai_assistance/ExternalHandler.ts +1 -1
- package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -0
- package/front_end/panels/ai_assistance/components/PermissionPrompt.ts +4 -4
- package/front_end/panels/ai_assistance/components/chatInput.css +1 -1
- package/front_end/panels/ai_assistance/components/chatMessage.css +3 -4
- package/front_end/panels/ai_assistance/components/exploreWidget.css +3 -3
- package/front_end/panels/animation/animationTimeline.css +11 -9
- package/front_end/panels/application/IndexedDBViews.ts +2 -2
- package/front_end/panels/application/PrivateVerificationTokensView.ts +217 -9
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
- package/front_end/panels/application/ServiceWorkersView.ts +1 -1
- package/front_end/panels/application/StorageView.ts +1 -1
- package/front_end/panels/application/appManifestView.css +0 -6
- package/front_end/panels/application/backgroundServiceView.css +0 -21
- package/front_end/panels/application/components/backForwardCacheView.css +1 -9
- package/front_end/panels/application/components/endpointsGrid.css +1 -1
- package/front_end/panels/application/components/permissionsPolicySection.css +1 -1
- package/front_end/panels/application/components/reportsGrid.css +1 -1
- package/front_end/panels/application/components/serviceWorkerRouterView.css +2 -2
- package/front_end/panels/application/components/trustTokensView.css +1 -1
- package/front_end/panels/application/cookieItemsView.css +0 -1
- package/front_end/panels/application/frameDetailsReportView.css +0 -10
- package/front_end/panels/application/indexedDBViews.css +0 -10
- package/front_end/panels/application/privateVerificationTokensView.css +12 -0
- package/front_end/panels/application/resourcesPanel.css +0 -23
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +7 -7
- package/front_end/panels/application/serviceWorkersView.css +4 -3
- package/front_end/panels/changes/CombinedDiffView.ts +1 -1
- package/front_end/panels/comments/CommentsPane.ts +7 -11
- package/front_end/panels/common/CommentThreadWidget.ts +11 -3
- package/front_end/panels/common/CommentsOverlayWidget.ts +337 -117
- package/front_end/panels/console/consoleContextSelector.css +1 -1
- package/front_end/panels/console/consolePinPane.css +1 -1
- package/front_end/panels/console/consolePrompt.css +4 -2
- package/front_end/panels/console/consoleView.css +5 -3
- package/front_end/panels/coverage/CoverageView.ts +0 -1
- package/front_end/panels/coverage/coverageView.css +4 -3
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +0 -1
- package/front_end/panels/elements/AccessibilityTreeView.ts +1 -1
- package/front_end/panels/elements/CSSValueTraceView.ts +2 -4
- package/front_end/panels/elements/ComputedStyleWidget.ts +8 -19
- package/front_end/panels/elements/DOMTreeContextMenu.ts +1 -1
- package/front_end/panels/elements/DOMTreeWidget.ts +14 -0
- package/front_end/panels/elements/MetricsSidebarPane.ts +1 -1
- package/front_end/panels/elements/PlatformFontsWidget.ts +0 -1
- package/front_end/panels/elements/PropertiesWidget.ts +1 -1
- package/front_end/panels/elements/PropertyRenderer.ts +7 -27
- package/front_end/panels/elements/StylePropertyTreeElement.ts +61 -72
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -0
- package/front_end/panels/elements/WebCustomData.ts +1 -1
- package/front_end/panels/elements/components/cssHintDetailsView.css +1 -1
- package/front_end/panels/elements/components/cssVariableValueView.css +3 -1
- package/front_end/panels/elements/components/elementsBreadcrumbs.css +1 -1
- package/front_end/panels/elements/components/elementsTreeExpandButton.css +3 -2
- package/front_end/panels/elements/components/stylePropertyEditor.css +2 -2
- package/front_end/panels/elements/layoutPane.css +1 -1
- package/front_end/panels/elements/metricsSidebarPane.css +6 -6
- package/front_end/panels/elements/platformFontsWidget.css +1 -1
- package/front_end/panels/elements/propertiesWidget.css +0 -5
- package/front_end/panels/elements/stylesSidebarPane.css +1 -1
- package/front_end/panels/emulation/DeviceModeView.ts +4 -3
- package/front_end/panels/emulation/deviceModeView.css +9 -10
- package/front_end/panels/event_listeners/eventListenersView.css +5 -5
- package/front_end/panels/explain/components/consoleInsight.css +5 -20
- package/front_end/panels/issues/issuesTree.css +11 -10
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +4 -2
- package/front_end/panels/layer_viewer/TransformController.ts +106 -54
- package/front_end/panels/layer_viewer/layerTreeOutline.css +1 -1
- package/front_end/panels/lighthouse/lighthousePanel.css +5 -8
- package/front_end/panels/lighthouse/lighthouseStartView.css +1 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +4 -4
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +1 -1
- package/front_end/panels/media/EventTimelineView.ts +1 -4
- package/front_end/panels/media/TickingFlameChart.ts +3 -2
- package/front_end/panels/media/playerListView.css +14 -7
- package/front_end/panels/media/playerMessagesView.css +11 -7
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +1 -1
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +5 -7
- package/front_end/panels/network/NetworkConfigView.ts +1 -1
- package/front_end/panels/network/NetworkWaterfallColumn.ts +92 -55
- package/front_end/panels/network/binaryResourceView.css +0 -7
- package/front_end/panels/network/networkConfigView.css +3 -3
- package/front_end/panels/network/networkLogView.css +5 -11
- package/front_end/panels/network/networkManageCustomHeadersView.css +1 -1
- package/front_end/panels/network/networkTimingTable.css +6 -6
- package/front_end/panels/network/requestConditionsDrawer.css +1 -24
- package/front_end/panels/network/requestPayloadView.css +1 -1
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +1 -1
- package/front_end/panels/performance_monitor/performanceMonitor.css +2 -2
- package/front_end/panels/profiler/ModuleUIStrings.ts +12 -0
- package/front_end/panels/protocol_monitor/JSONEditor.css +4 -3
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/protocol_monitor/protocolMonitor.css +1 -1
- package/front_end/panels/recorder/createRecordingView.css +2 -2
- package/front_end/panels/recorder/extensionView.css +1 -1
- package/front_end/panels/recorder/recorderPanel.css +3 -3
- package/front_end/panels/recorder/recordingListView.css +1 -1
- package/front_end/panels/recorder/stepEditor.css +2 -2
- package/front_end/panels/recorder/stepView.css +0 -31
- package/front_end/panels/recorder/timelineSection.css +1 -1
- package/front_end/panels/screencast/screencastView.css +3 -2
- package/front_end/panels/search/searchView.css +4 -3
- package/front_end/panels/security/SecurityPanelSidebar.ts +0 -1
- package/front_end/panels/security/mainView.css +2 -2
- package/front_end/panels/security/originView.css +1 -5
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +2 -1
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +1 -2
- package/front_end/panels/sources/breakpointsView.css +3 -4
- package/front_end/panels/sources/tabbedEditorContainer.css +1 -1
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +4 -3
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +30 -10
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +1 -1
- package/front_end/panels/timeline/components/OriginMap.ts +1 -1
- package/front_end/panels/timeline/components/fieldSettingsDialog.css +1 -1
- package/front_end/panels/timeline/components/metricCard.css +1 -1
- package/front_end/panels/timeline/components/networkRequestDetails.css +0 -1
- package/front_end/panels/timeline/components/networkRequestTooltip.css +4 -4
- package/front_end/panels/timeline/components/relatedInsightChips.css +1 -1
- package/front_end/panels/timeline/timelineFlameChartView.css +4 -4
- package/front_end/panels/timeline/timelineFlamechartPopover.css +3 -3
- package/front_end/panels/timeline/timelineHistoryManager.css +1 -1
- package/front_end/panels/timeline/timelineMiniMap.css +3 -2
- package/front_end/panels/timeline/timelineStatusDialog.css +1 -1
- package/front_end/panels/web_audio/webAudio.css +0 -20
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +166 -8
- package/front_end/ui/comments/CommentOverlayManager.ts +17 -2
- package/front_end/ui/components/buttons/button.css +0 -1
- package/front_end/ui/components/diff_view/diffView.css +2 -2
- package/front_end/ui/components/markdown_view/codeBlock.css +3 -3
- package/front_end/ui/components/markdown_view/markdownView.css +3 -3
- package/front_end/ui/components/menus/Menu.ts +1 -1
- package/front_end/ui/components/menus/menuItem.css +1 -1
- package/front_end/ui/components/panel_feedback/panelFeedback.css +5 -4
- package/front_end/ui/components/panel_introduction_steps/panelIntroductionSteps.css +1 -1
- package/front_end/ui/components/report_view/reportValue.css +5 -2
- package/front_end/ui/components/suggestion_input/suggestionInput.css +6 -6
- package/front_end/ui/legacy/ContextMenu.ts +3 -0
- package/front_end/ui/legacy/GlassPane.ts +3 -3
- package/front_end/ui/legacy/SoftContextMenu.ts +7 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +2 -0
- package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +7 -6
- package/front_end/ui/legacy/components/inline_editor/colorSwatch.css +1 -2
- package/front_end/ui/legacy/components/inline_editor/cssAngleEditor.css +3 -3
- package/front_end/ui/legacy/components/perf_ui/chartViewport.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/filmStripView.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/flameChart.css +12 -9
- package/front_end/ui/legacy/components/perf_ui/overviewGrid.css +11 -7
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +3 -4
- package/front_end/ui/legacy/components/source_frame/imageView.css +4 -4
- package/front_end/ui/legacy/components/utils/imagePreview.css +1 -1
- package/front_end/ui/legacy/components/utils/jsUtils.css +2 -1
- package/front_end/ui/legacy/dropTarget.css +1 -1
- package/front_end/ui/legacy/filter.css +4 -3
- package/front_end/ui/legacy/inspectorCommon.css +16 -48
- package/front_end/ui/legacy/inspectorDrawerTabbedPane.css +1 -1
- package/front_end/ui/legacy/progressIndicator.css +1 -2
- package/front_end/ui/legacy/reportView.css +4 -1
- package/front_end/ui/legacy/searchableView.css +1 -1
- package/front_end/ui/legacy/suggestBox.css +2 -1
- package/front_end/ui/legacy/tabbedPane.css +7 -4
- package/front_end/ui/legacy/toolbar.css +2 -1
- package/front_end/ui/legacy/treeoutline.css +6 -5
- package/front_end/ui/legacy/viewContainers.css +3 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +15 -0
- package/inspector_overlay/highlight_anchor.ts +8 -11
- package/package.json +1 -1
- package/front_end/models/ai_code_completion/debug.ts +0 -33
- package/front_end/models/ai_code_generation/debug.ts +0 -33
|
@@ -146,7 +146,7 @@ circle.animation-keyframe-point:active {
|
|
|
146
146
|
|
|
147
147
|
.animation-timeline-current-time {
|
|
148
148
|
flex: 0 0 auto;
|
|
149
|
-
margin-right:
|
|
149
|
+
margin-right: var(--sys-size-3);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
.animation-grid-header {
|
|
@@ -199,11 +199,13 @@ circle.animation-keyframe-point:active {
|
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
.animation-scrubber-line {
|
|
202
|
-
width:
|
|
202
|
+
/* 11px width: 2 * 6px left inset (--sys-size-4) - 1px line (--sys-size-1). */
|
|
203
|
+
width: calc(2 * var(--sys-size-4) - var(--sys-size-1));
|
|
204
|
+
/* 6px inset (--sys-size-4) - 1px border (--sys-size-1) aligns the 1px stem. */
|
|
203
205
|
background: linear-gradient(
|
|
204
206
|
to right,
|
|
205
|
-
transparent
|
|
206
|
-
var(--sys-color-error)
|
|
207
|
+
transparent calc(var(--sys-size-4) - var(--sys-size-1)),
|
|
208
|
+
var(--sys-color-error) calc(var(--sys-size-4) - var(--sys-size-1)),
|
|
207
209
|
var(--sys-color-error) var(--sys-size-4),
|
|
208
210
|
transparent var(--sys-size-4)
|
|
209
211
|
);
|
|
@@ -211,7 +213,8 @@ circle.animation-keyframe-point:active {
|
|
|
211
213
|
top: calc(-1 * var(--sys-size-12));
|
|
212
214
|
height: var(--sys-size-12);
|
|
213
215
|
left: calc(-1 * var(--sys-size-4));
|
|
214
|
-
padding:
|
|
216
|
+
/* 5px side hit padding: 6px (--sys-size-4) - 1px line width (--sys-size-1). */
|
|
217
|
+
padding: 0 calc(var(--sys-size-4) - var(--sys-size-1));
|
|
215
218
|
z-index: 3;
|
|
216
219
|
}
|
|
217
220
|
|
|
@@ -330,7 +333,7 @@ text.animation-timeline-grid-label {
|
|
|
330
333
|
align-items: center;
|
|
331
334
|
justify-content: center;
|
|
332
335
|
margin-left: var(--timeline-controls-width);
|
|
333
|
-
padding:
|
|
336
|
+
padding: var(--sys-size-5);
|
|
334
337
|
}
|
|
335
338
|
|
|
336
339
|
.animation-controls-toolbar {
|
|
@@ -384,7 +387,7 @@ text.animation-timeline-grid-label {
|
|
|
384
387
|
}
|
|
385
388
|
|
|
386
389
|
.animation-buffer-preview:focus-visible {
|
|
387
|
-
outline: -
|
|
390
|
+
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
|
|
388
391
|
}
|
|
389
392
|
|
|
390
393
|
.animation-buffer-preview.selected .preview-icon {
|
|
@@ -448,7 +451,6 @@ text.animation-timeline-grid-label {
|
|
|
448
451
|
.animation-playback-rate-control {
|
|
449
452
|
margin: var(--sys-size-3) 0 var(--sys-size-3) var(--sys-size-2);
|
|
450
453
|
display: flex;
|
|
451
|
-
width: 120px;
|
|
452
454
|
}
|
|
453
455
|
|
|
454
456
|
.animation-playback-rate-button {
|
|
@@ -461,7 +463,7 @@ text.animation-timeline-grid-label {
|
|
|
461
463
|
margin-right: calc(-1 * var(--sys-size-1));
|
|
462
464
|
padding: var(--sys-size-1) var(--sys-size-3);
|
|
463
465
|
background-color: transparent;
|
|
464
|
-
|
|
466
|
+
width: var(--sys-size-14);
|
|
465
467
|
text-align: center;
|
|
466
468
|
}
|
|
467
469
|
|
|
@@ -442,6 +442,8 @@ export type IDBDataViewView = (input: IndexedDBDataViewInput, output: undefined,
|
|
|
442
442
|
// clang-format off
|
|
443
443
|
export const IDB_DATA_VIEW_DEFAULT_VIEW: IDBDataViewView = (input, _output, target) => {
|
|
444
444
|
render(html`
|
|
445
|
+
<style>${indexedDBViewsStyles}</style>
|
|
446
|
+
<style>${DataGrid.dataGridStyles}</style>
|
|
445
447
|
${renderToolbar(input)}
|
|
446
448
|
<div class="data-grid-container">
|
|
447
449
|
${renderDataGrid(input)}
|
|
@@ -488,8 +490,6 @@ export class IDBDataView extends UI.View.SimpleView {
|
|
|
488
490
|
viewId: 'idb',
|
|
489
491
|
});
|
|
490
492
|
this.#view = view;
|
|
491
|
-
this.registerRequiredCSS(indexedDBViewsStyles);
|
|
492
|
-
this.registerRequiredCSS(DataGrid.dataGridStyles);
|
|
493
493
|
|
|
494
494
|
this.model = model;
|
|
495
495
|
this.databaseId = databaseId;
|
|
@@ -2,39 +2,145 @@
|
|
|
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 '../../ui/legacy/components/data_grid/data_grid.js';
|
|
6
|
+
|
|
7
|
+
import * as Common from '../../core/common/common.js';
|
|
5
8
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
9
|
+
import * as Platform from '../../core/platform/platform.js';
|
|
10
|
+
import * as SDK from '../../core/sdk/sdk.js';
|
|
11
|
+
import type * as Protocol from '../../generated/protocol.js';
|
|
6
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
7
|
-
import {html, render} from '../../ui/lit/lit.js';
|
|
13
|
+
import {Directives, html, render, type TemplateResult} from '../../ui/lit/lit.js';
|
|
8
14
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
9
15
|
|
|
10
16
|
import privateVerificationTokensViewStyles from './privateVerificationTokensView.css.js';
|
|
11
17
|
|
|
18
|
+
const {repeat} = Directives;
|
|
19
|
+
|
|
12
20
|
const UIStrings = {
|
|
21
|
+
/**
|
|
22
|
+
* @description Text for the issuer of an item.
|
|
23
|
+
*/
|
|
24
|
+
issuer: 'Issuer',
|
|
25
|
+
/**
|
|
26
|
+
* @description Column header indicating whether the current origin is the issuer of the token.
|
|
27
|
+
*/
|
|
28
|
+
isIssuer: 'Is issuer',
|
|
29
|
+
/**
|
|
30
|
+
* @description Column header indicating whether the current origin is authorized to redeem the token.
|
|
31
|
+
*/
|
|
32
|
+
isRedeemer: 'Is redeemer',
|
|
13
33
|
/**
|
|
14
34
|
* @description Empty state message when no private verification tokens match the current origin.
|
|
15
35
|
*/
|
|
16
36
|
noPrivateVerificationTokens: 'No private verification tokens for this origin',
|
|
37
|
+
/**
|
|
38
|
+
* @description Column header for Token ID.
|
|
39
|
+
*/
|
|
40
|
+
tokenId: 'Token ID',
|
|
41
|
+
/**
|
|
42
|
+
* @description Column header for Public Key ID.
|
|
43
|
+
*/
|
|
44
|
+
keyId: 'Key ID',
|
|
45
|
+
/**
|
|
46
|
+
* @description Column header for token expiration date.
|
|
47
|
+
*/
|
|
48
|
+
expiration: 'Expiration',
|
|
49
|
+
/**
|
|
50
|
+
* @description Column header for token creation time.
|
|
51
|
+
*/
|
|
52
|
+
creationTime: 'Created',
|
|
53
|
+
/**
|
|
54
|
+
* @description Column header for token protocol version.
|
|
55
|
+
*/
|
|
56
|
+
version: 'Version',
|
|
57
|
+
/**
|
|
58
|
+
* @description Column header for base64 encoded token payload.
|
|
59
|
+
*/
|
|
60
|
+
tokenPayload: 'Token (Base64)',
|
|
17
61
|
} as const;
|
|
18
62
|
const str_ = i18n.i18n.registerUIStrings('panels/application/PrivateVerificationTokensView.ts', UIStrings);
|
|
19
63
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
20
64
|
|
|
21
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Presentation model for a single token row. All values are pre-formatted by
|
|
67
|
+
* the presenter so that the view is a pure projection of its input.
|
|
68
|
+
*/
|
|
69
|
+
export interface TokenRow {
|
|
70
|
+
id: string;
|
|
71
|
+
issuerOrigin: Platform.DevToolsPath.UrlString;
|
|
72
|
+
isIssuer: boolean;
|
|
73
|
+
isRedeemer: boolean;
|
|
74
|
+
keyId: number;
|
|
75
|
+
expiration: string;
|
|
76
|
+
creationTime: string;
|
|
77
|
+
version: number;
|
|
78
|
+
token: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface ViewInput {
|
|
82
|
+
tokens: TokenRow[];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function renderView(input: ViewInput): TemplateResult {
|
|
86
|
+
const hasTokens = input.tokens.length > 0;
|
|
87
|
+
// clang-format off
|
|
88
|
+
return html`
|
|
89
|
+
<div class="pvt-view" jslog=${VisualLogging.pane('private-verification-tokens')}>
|
|
90
|
+
<div class="table-container">
|
|
91
|
+
${hasTokens ? html`
|
|
92
|
+
<devtools-data-grid striped inline>
|
|
93
|
+
<table>
|
|
94
|
+
<tr>
|
|
95
|
+
<th id="issuer" weight="6" sortable>${i18nString(UIStrings.issuer)}</th>
|
|
96
|
+
<th id="is-issuer" type="boolean" align="center" weight="3" sortable>${i18nString(UIStrings.isIssuer)}</th>
|
|
97
|
+
<th id="is-redeemer" type="boolean" align="center" weight="3" sortable>${i18nString(UIStrings.isRedeemer)}</th>
|
|
98
|
+
<th id="id" weight="3" sortable>${i18nString(UIStrings.tokenId)}</th>
|
|
99
|
+
<th id="key-id" weight="2" sortable>${i18nString(UIStrings.keyId)}</th>
|
|
100
|
+
<th id="expiration" weight="5" sortable>${i18nString(UIStrings.expiration)}</th>
|
|
101
|
+
<th id="creation-time" weight="5" sortable>${i18nString(UIStrings.creationTime)}</th>
|
|
102
|
+
<th id="version" weight="2" sortable>${i18nString(UIStrings.version)}</th>
|
|
103
|
+
<th id="token" weight="2">${i18nString(UIStrings.tokenPayload)}</th>
|
|
104
|
+
</tr>
|
|
105
|
+
${repeat(input.tokens, token => token.id, token => html`
|
|
106
|
+
<tr>
|
|
107
|
+
<td>${token.issuerOrigin}</td>
|
|
108
|
+
<td>${token.isIssuer}</td>
|
|
109
|
+
<td>${token.isRedeemer}</td>
|
|
110
|
+
<td>${token.id}</td>
|
|
111
|
+
<td>${token.keyId}</td>
|
|
112
|
+
<td>${token.expiration}</td>
|
|
113
|
+
<td>${token.creationTime}</td>
|
|
114
|
+
<td>${token.version}</td>
|
|
115
|
+
<td class="monospace" title=${token.token}>${token.token}</td>
|
|
116
|
+
</tr>
|
|
117
|
+
`)}
|
|
118
|
+
</table>
|
|
119
|
+
</devtools-data-grid>
|
|
120
|
+
` : html`
|
|
121
|
+
${UI.Widget.widget(UI.EmptyWidget.EmptyWidget, {header: i18nString(UIStrings.noPrivateVerificationTokens)})}
|
|
122
|
+
`}
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
`;
|
|
126
|
+
// clang-format on
|
|
127
|
+
}
|
|
22
128
|
|
|
23
129
|
type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
24
130
|
|
|
25
|
-
export const DEFAULT_VIEW: View = (
|
|
131
|
+
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
26
132
|
// clang-format off
|
|
27
133
|
render(html`
|
|
28
134
|
<style>${privateVerificationTokensViewStyles}</style>
|
|
29
135
|
<style>${UI.inspectorCommonStyles}</style>
|
|
30
|
-
|
|
31
|
-
${UI.Widget.widget(UI.EmptyWidget.EmptyWidget, {header: i18nString(UIStrings.noPrivateVerificationTokens)})}
|
|
32
|
-
</div>
|
|
136
|
+
${renderView(input)}
|
|
33
137
|
`, target);
|
|
34
138
|
// clang-format on
|
|
35
139
|
};
|
|
36
140
|
|
|
37
|
-
export class PrivateVerificationTokensView extends UI.Widget.VBox
|
|
141
|
+
export class PrivateVerificationTokensView extends UI.Widget.VBox implements
|
|
142
|
+
SDK.TargetManager.SDKModelObserver<SDK.PrivateVerificationTokensModel.PrivateVerificationTokensModel> {
|
|
143
|
+
#model: SDK.PrivateVerificationTokensModel.PrivateVerificationTokensModel|null = null;
|
|
38
144
|
#view: View;
|
|
39
145
|
|
|
40
146
|
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
@@ -44,10 +150,112 @@ export class PrivateVerificationTokensView extends UI.Widget.VBox {
|
|
|
44
150
|
|
|
45
151
|
override wasShown(): void {
|
|
46
152
|
super.wasShown();
|
|
153
|
+
const targetManager = SDK.TargetManager.TargetManager.instance();
|
|
154
|
+
targetManager.observeModels(SDK.PrivateVerificationTokensModel.PrivateVerificationTokensModel, this,
|
|
155
|
+
{scoped: true});
|
|
156
|
+
targetManager.addEventListener(SDK.TargetManager.Events.INSPECTED_URL_CHANGED, this.requestUpdate, this);
|
|
157
|
+
targetManager.addModelListener(SDK.SecurityOriginManager.SecurityOriginManager,
|
|
158
|
+
SDK.SecurityOriginManager.Events.MainSecurityOriginChanged, this.requestUpdate, this,
|
|
159
|
+
{scoped: true});
|
|
160
|
+
this.requestUpdate();
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
override willHide(): void {
|
|
164
|
+
super.willHide();
|
|
165
|
+
const targetManager = SDK.TargetManager.TargetManager.instance();
|
|
166
|
+
targetManager.unobserveModels(SDK.PrivateVerificationTokensModel.PrivateVerificationTokensModel, this);
|
|
167
|
+
targetManager.removeEventListener(SDK.TargetManager.Events.INSPECTED_URL_CHANGED, this.requestUpdate, this);
|
|
168
|
+
targetManager.removeModelListener(SDK.SecurityOriginManager.SecurityOriginManager,
|
|
169
|
+
SDK.SecurityOriginManager.Events.MainSecurityOriginChanged, this.requestUpdate,
|
|
170
|
+
this);
|
|
171
|
+
if (this.#model) {
|
|
172
|
+
this.modelRemoved(this.#model);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
modelAdded(model: SDK.PrivateVerificationTokensModel.PrivateVerificationTokensModel): void {
|
|
177
|
+
if (model.target() !== SDK.TargetManager.TargetManager.instance().primaryPageTarget() || model === this.#model) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
if (this.#model) {
|
|
181
|
+
this.modelRemoved(this.#model);
|
|
182
|
+
}
|
|
183
|
+
this.#model = model;
|
|
184
|
+
model.setTracking(true);
|
|
185
|
+
model.addEventListener(SDK.PrivateVerificationTokensModel.Events.TOKENS_UPDATED, this.requestUpdate, this);
|
|
47
186
|
this.requestUpdate();
|
|
48
187
|
}
|
|
49
188
|
|
|
50
|
-
|
|
51
|
-
|
|
189
|
+
modelRemoved(model: SDK.PrivateVerificationTokensModel.PrivateVerificationTokensModel): void {
|
|
190
|
+
if (model !== this.#model) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
model.setTracking(false);
|
|
194
|
+
model.removeEventListener(SDK.PrivateVerificationTokensModel.Events.TOKENS_UPDATED, this.requestUpdate, this);
|
|
195
|
+
this.#model = null;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
override async performUpdate(signal?: AbortSignal): Promise<void> {
|
|
199
|
+
const model = this.#model;
|
|
200
|
+
let tokens: TokenRow[] = [];
|
|
201
|
+
if (model) {
|
|
202
|
+
const currentOrigin = getInspectedOrigin(model.target());
|
|
203
|
+
if (currentOrigin) {
|
|
204
|
+
const [rawTokens, configs] = await Promise.all([model.getTokens(), model.getIssuerConfigs()]);
|
|
205
|
+
// The widget may have been hidden, the model swapped, or a newer update
|
|
206
|
+
// requested while the CDP calls were in flight.
|
|
207
|
+
if (signal?.aborted || this.#model !== model) {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
tokens = toTokenRows(rawTokens, configs, currentOrigin);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if (signal?.aborted) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
this.#view({tokens}, undefined, this.contentElement);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function toTokenRows(rawTokens: Protocol.Storage.PrivateVerificationToken[],
|
|
222
|
+
configs: Protocol.Storage.PrivateVerificationTokensIssuerConfig[],
|
|
223
|
+
currentOrigin: Platform.DevToolsPath.UrlString): TokenRow[] {
|
|
224
|
+
const redeemersByIssuer =
|
|
225
|
+
new Map(configs.map(config => [extractOrigin(config.issuerOrigin), config.redeemerOrigins.map(extractOrigin)]));
|
|
226
|
+
return rawTokens
|
|
227
|
+
.map(token => {
|
|
228
|
+
const issuerOrigin = extractOrigin(token.issuerOrigin);
|
|
229
|
+
return {
|
|
230
|
+
id: token.id,
|
|
231
|
+
issuerOrigin,
|
|
232
|
+
isIssuer: issuerOrigin === currentOrigin,
|
|
233
|
+
isRedeemer: Boolean(redeemersByIssuer.get(issuerOrigin)?.includes(currentOrigin)),
|
|
234
|
+
keyId: token.keyId,
|
|
235
|
+
expiration: formatEpochTime(token.expiration),
|
|
236
|
+
creationTime: formatEpochTime(token.creationTime),
|
|
237
|
+
version: token.version,
|
|
238
|
+
token: token.token,
|
|
239
|
+
};
|
|
240
|
+
})
|
|
241
|
+
.filter(token => token.isIssuer || token.isRedeemer)
|
|
242
|
+
.sort((a, b) => a.issuerOrigin.localeCompare(b.issuerOrigin) ||
|
|
243
|
+
Platform.StringUtilities.naturalOrderComparator(a.id, b.id));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
function getInspectedOrigin(target: SDK.Target.Target): Platform.DevToolsPath.UrlString {
|
|
247
|
+
const securityOriginManager = target.model(SDK.SecurityOriginManager.SecurityOriginManager);
|
|
248
|
+
return extractOrigin(securityOriginManager?.mainSecurityOrigin() || target.inspectedURL());
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function extractOrigin(url: string): Platform.DevToolsPath.UrlString {
|
|
252
|
+
return Common.ParsedURL.ParsedURL.extractOrigin(url as Platform.DevToolsPath.UrlString);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function formatEpochTime(seconds: number): string {
|
|
256
|
+
if (!Number.isFinite(seconds) || seconds <= 0) {
|
|
257
|
+
return '—';
|
|
52
258
|
}
|
|
259
|
+
const date = new Date(seconds * 1000);
|
|
260
|
+
return Number.isNaN(date.getTime()) ? '—' : date.toISOString();
|
|
53
261
|
}
|
|
@@ -110,6 +110,7 @@ export type View = (input: ViewInput, output: undefined, target: HTMLElement) =>
|
|
|
110
110
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
111
111
|
// clang-format off
|
|
112
112
|
render(html`
|
|
113
|
+
<style>${serviceWorkerCacheViewsStyles}</style>
|
|
113
114
|
<devtools-toolbar class="data-view-toolbar" jslog=${VisualLogging.toolbar()}>
|
|
114
115
|
<devtools-button
|
|
115
116
|
title=${i18nString(UIStrings.refresh)}
|
|
@@ -244,7 +245,6 @@ export class ServiceWorkerCacheView extends UI.View.SimpleView {
|
|
|
244
245
|
viewId: 'cache',
|
|
245
246
|
});
|
|
246
247
|
this.#view = view;
|
|
247
|
-
this.registerRequiredCSS(serviceWorkerCacheViewsStyles);
|
|
248
248
|
|
|
249
249
|
this.model = model;
|
|
250
250
|
this.cache = cache;
|
|
@@ -272,6 +272,7 @@ type View = (input: ServiceWorkersViewInput, output: undefined, target: HTMLElem
|
|
|
272
272
|
export const DEFAULT_VIEW: View = (input, _output, target): void => {
|
|
273
273
|
// clang-format off
|
|
274
274
|
render(html`
|
|
275
|
+
<style>${serviceWorkersViewStyles}</style>
|
|
275
276
|
<!-- This Origin Report -->
|
|
276
277
|
${renderOriginReport(input)}
|
|
277
278
|
${renderOthersOriginView()}`,
|
|
@@ -307,7 +308,6 @@ export class ServiceWorkersView extends UI.Widget.VBox implements
|
|
|
307
308
|
useShadowDom: true,
|
|
308
309
|
});
|
|
309
310
|
this.#view = view;
|
|
310
|
-
this.registerRequiredCSS(serviceWorkersViewStyles);
|
|
311
311
|
|
|
312
312
|
this.sections = new Map();
|
|
313
313
|
|
|
@@ -339,6 +339,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
339
339
|
|
|
340
340
|
// clang-format off
|
|
341
341
|
render(html`
|
|
342
|
+
<style>${storageViewStyles}</style>
|
|
342
343
|
<devtools-report class="clear-storage-header" .data=${{reportTitle: i18nString(UIStrings.storageTitle)}}>
|
|
343
344
|
${input.subtitle ? html`<div class="report-subtitle" slot="toolbar">${input.subtitle}</div>` : nothing}
|
|
344
345
|
${renderClearSiteData()}
|
|
@@ -383,7 +384,6 @@ export class StorageView extends UI.Widget.VBox {
|
|
|
383
384
|
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
384
385
|
super(element, {useShadowDom: true});
|
|
385
386
|
this.#view = view;
|
|
386
|
-
this.registerRequiredCSS(storageViewStyles);
|
|
387
387
|
this.pieColors = storagePieColors;
|
|
388
388
|
|
|
389
389
|
this.settings = new Map();
|
|
@@ -30,27 +30,6 @@
|
|
|
30
30
|
flex-direction: column;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.background-service-preview {
|
|
34
|
-
position: absolute;
|
|
35
|
-
background-color: var(--sys-color-cdt-base-container);
|
|
36
|
-
justify-content: center;
|
|
37
|
-
align-items: center;
|
|
38
|
-
overflow: auto;
|
|
39
|
-
font-size: var(--sys-typescale-body3-size);
|
|
40
|
-
color: var(--sys-color-on-surface-subtle);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.background-service-preview > div {
|
|
44
|
-
max-width: 450px;
|
|
45
|
-
margin: 10px;
|
|
46
|
-
text-align: center;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.background-service-preview > div > p {
|
|
50
|
-
flex: none;
|
|
51
|
-
white-space: pre-line;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
33
|
.background-service-shortcut {
|
|
55
34
|
color: var(--sys-color-on-surface-subtle);
|
|
56
35
|
}
|
|
@@ -38,7 +38,7 @@ devtools-report-value {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.circled-exclamation-icon {
|
|
41
|
-
margin-right:
|
|
41
|
+
margin-right: var(--sys-size-5);
|
|
42
42
|
flex-shrink: 0;
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -47,14 +47,6 @@ devtools-report-value {
|
|
|
47
47
|
flex-shrink: 0;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.report-line {
|
|
51
|
-
grid-column-start: span 2;
|
|
52
|
-
display: flex;
|
|
53
|
-
align-items: center;
|
|
54
|
-
margin: 0 30px;
|
|
55
|
-
line-height: 26px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
50
|
.report-key {
|
|
59
51
|
color: var(--sys-color-token-subtle);
|
|
60
52
|
min-width: auto;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:host {
|
|
7
7
|
display: block;
|
|
8
8
|
white-space: normal;
|
|
9
|
-
max-width:
|
|
9
|
+
max-width: var(--sys-size-32);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.router-rules {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
.item {
|
|
34
34
|
display: flex;
|
|
35
35
|
flex-direction: column;
|
|
36
|
-
padding-left:
|
|
36
|
+
padding-left: var(--sys-size-5);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.condition,
|
|
@@ -46,11 +46,6 @@ devtools-button.help-button {
|
|
|
46
46
|
position: relative;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
button.text-link {
|
|
50
|
-
padding-left: var(--sys-size-2);
|
|
51
|
-
height: 26px;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
49
|
.inline-button {
|
|
55
50
|
padding-left: 1ex;
|
|
56
51
|
}
|
|
@@ -109,11 +104,6 @@ button.text-link {
|
|
|
109
104
|
font-weight: bold;
|
|
110
105
|
}
|
|
111
106
|
|
|
112
|
-
.link:not(button):has(devtools-icon) {
|
|
113
|
-
vertical-align: baseline;
|
|
114
|
-
margin-inline-start: 3px;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
107
|
.inline-icon {
|
|
118
108
|
margin-bottom: -5px;
|
|
119
109
|
width: 18px;
|
|
@@ -42,20 +42,10 @@
|
|
|
42
42
|
overflow: auto;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.indexed-db-header {
|
|
46
|
-
min-width: 400px;
|
|
47
|
-
flex-shrink: 0;
|
|
48
|
-
flex-grow: 0;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
45
|
.source-code.indexed-db-key-path {
|
|
52
46
|
font-size: unset !important; /* stylelint-disable-line declaration-no-important */
|
|
53
47
|
}
|
|
54
48
|
|
|
55
|
-
.resources-toolbar {
|
|
56
|
-
padding-right: 10px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
49
|
.object-store-summary-bar {
|
|
60
50
|
flex: 0 0 27px;
|
|
61
51
|
line-height: 27px;
|
|
@@ -55,16 +55,6 @@
|
|
|
55
55
|
flex: auto;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.storage-view .storage-table-error {
|
|
59
|
-
color: var(--sys-color-error);
|
|
60
|
-
font-size: var(--sys-typescale-headline1-size);
|
|
61
|
-
font-weight: bold;
|
|
62
|
-
padding: 10px;
|
|
63
|
-
display: flex;
|
|
64
|
-
align-items: center;
|
|
65
|
-
justify-content: center;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
58
|
.storage-view.query {
|
|
69
59
|
padding: var(--sys-size-2) 0;
|
|
70
60
|
overflow: hidden auto;
|
|
@@ -89,19 +79,6 @@
|
|
|
89
79
|
white-space: pre-wrap;
|
|
90
80
|
}
|
|
91
81
|
|
|
92
|
-
.prompt-icon {
|
|
93
|
-
position: absolute;
|
|
94
|
-
display: block;
|
|
95
|
-
left: 7px;
|
|
96
|
-
top: 9px;
|
|
97
|
-
margin-top: -7px;
|
|
98
|
-
user-select: none;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.database-user-query .prompt-icon {
|
|
102
|
-
margin-top: -10px;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
82
|
.database-query-prompt-container .prompt-icon {
|
|
106
83
|
top: var(--sys-size-4);
|
|
107
84
|
}
|
|
@@ -77,26 +77,26 @@
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.service-worker-update-timing-bar.activate {
|
|
80
|
-
|
|
81
|
-
height:
|
|
80
|
+
margin-block: auto;
|
|
81
|
+
height: var(--sys-size-5);
|
|
82
82
|
background-color: var(--sys-color-yellow-bright);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
.service-worker-update-timing-bar.wait {
|
|
86
|
-
|
|
87
|
-
height:
|
|
86
|
+
margin-block: auto;
|
|
87
|
+
height: var(--sys-size-5);
|
|
88
88
|
background-color: var(--sys-color-purple-bright);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.service-worker-update-timing-bar.install {
|
|
92
|
-
|
|
93
|
-
height:
|
|
92
|
+
margin-block: auto;
|
|
93
|
+
height: var(--sys-size-5);
|
|
94
94
|
background-color: var(--sys-color-cyan-bright);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
.service-worker-update-timing-table > tbody > tr > td {
|
|
98
98
|
padding: var(--sys-size-3) 0;
|
|
99
|
-
padding-right:
|
|
99
|
+
padding-right: var(--sys-size-5);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
table.service-worker-update-timing-table > tbody > tr.service-worker-update-timing-table-header > td {
|