chrome-devtools-frontend 1.0.951410 → 1.0.952713
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/config/gni/devtools_grd_files.gni +3 -0
- package/extension-api/ExtensionAPI.d.ts +1 -1
- package/front_end/.eslintrc.js +6 -0
- package/front_end/Tests.js +10 -0
- package/front_end/core/common/App.ts +0 -3
- package/front_end/core/common/AppProvider.ts +0 -3
- package/front_end/core/common/JavaScriptMetaData.ts +0 -3
- package/front_end/core/common/QueryParamHandler.ts +0 -3
- package/front_end/core/common/Runnable.ts +0 -3
- package/front_end/core/common/SimpleHistoryManager.ts +0 -3
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/i18n/locales/en-US.json +3 -0
- package/front_end/core/i18n/locales/en-XL.json +3 -0
- package/front_end/core/root/Runtime.ts +4 -12
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +0 -12
- package/front_end/core/sdk/PageResourceLoader.ts +2 -1
- package/front_end/core/sdk/TracingManager.ts +0 -3
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +39 -39
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +54 -54
- package/front_end/entrypoints/formatter_worker/ESTreeWalker.ts +20 -20
- package/front_end/entrypoints/formatter_worker/FormattedContentBuilder.ts +54 -54
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +145 -144
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +40 -40
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +64 -69
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +203 -203
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +109 -108
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +17 -17
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +30 -30
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +25 -25
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +52 -55
- package/front_end/entrypoints/main/MainImpl.ts +49 -49
- package/front_end/entrypoints/node_app/NodeConnectionsPanel.ts +43 -43
- package/front_end/entrypoints/node_app/NodeMain.ts +38 -38
- package/front_end/generated/InspectorBackendCommands.js +5 -1
- package/front_end/generated/protocol.d.ts +16 -0
- package/front_end/legacy/legacy-defs.d.ts +0 -21
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +0 -3
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -3
- package/front_end/models/bindings/FileUtils.ts +0 -3
- package/front_end/models/extensions/ExtensionAPI.ts +2 -1
- package/front_end/models/extensions/ExtensionTraceProvider.ts +0 -3
- package/front_end/models/heap_snapshot_model/HeapSnapshotModel.ts +1 -1
- package/front_end/models/issues_manager/ClientHintIssue.ts +95 -0
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +6 -6
- package/front_end/models/issues_manager/ContrastCheckTrigger.ts +15 -15
- package/front_end/models/issues_manager/CorsIssue.ts +9 -9
- package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +5 -5
- package/front_end/models/issues_manager/DeprecationIssue.ts +7 -7
- package/front_end/models/issues_manager/GenericIssue.ts +5 -5
- package/front_end/models/issues_manager/HeavyAdIssue.ts +5 -5
- package/front_end/models/issues_manager/Issue.ts +10 -10
- package/front_end/models/issues_manager/IssueResolver.ts +11 -10
- package/front_end/models/issues_manager/IssuesManager.ts +61 -56
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +4 -4
- package/front_end/models/issues_manager/MixedContentIssue.ts +7 -7
- package/front_end/models/issues_manager/NavigatorUserAgentIssue.ts +7 -7
- package/front_end/models/issues_manager/QuirksModeIssue.ts +4 -4
- package/front_end/models/issues_manager/SameSiteCookieIssue.ts +16 -16
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +5 -5
- package/front_end/models/issues_manager/SourceFrameIssuesManager.ts +32 -31
- package/front_end/models/issues_manager/TrustedWebActivityIssue.ts +5 -5
- package/front_end/models/issues_manager/WasmCrossOriginModuleSharingIssue.ts +5 -5
- package/front_end/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
- package/front_end/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md +4 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/timeline_model/TimelineModel.ts +1 -1
- package/front_end/panels/application/components/BackForwardCacheView.ts +33 -33
- package/front_end/panels/application/components/EndpointsGrid.ts +12 -12
- package/front_end/panels/application/components/FrameDetailsView.ts +108 -110
- package/front_end/panels/application/components/OriginTrialTreeView.ts +45 -45
- package/front_end/panels/application/components/PermissionsPolicySection.ts +19 -19
- package/front_end/panels/application/components/ReportsGrid.ts +30 -30
- package/front_end/panels/application/components/StackTrace.ts +48 -47
- package/front_end/panels/application/components/TrustTokensView.ts +31 -31
- package/front_end/panels/console/ConsoleView.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -25
- package/front_end/panels/console/consoleView.css +5 -0
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +41 -52
- package/front_end/panels/css_overview/CSSOverviewController.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +18 -27
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +6 -6
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +4 -4
- package/front_end/panels/elements/ElementsTreeElement.ts +2 -6
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +17 -17
- package/front_end/panels/elements/components/AdornerManager.ts +21 -21
- package/front_end/panels/elements/components/AdornerSettingsPane.ts +14 -14
- package/front_end/panels/elements/components/CSSQuery.ts +16 -16
- package/front_end/panels/elements/components/ComputedStyleProperty.ts +14 -14
- package/front_end/panels/elements/components/ComputedStyleTrace.ts +15 -15
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +78 -78
- package/front_end/panels/elements/components/ElementsPanelLink.ts +16 -16
- package/front_end/panels/elements/components/LayoutPane.ts +47 -47
- package/front_end/panels/elements/components/NodeText.ts +18 -18
- package/front_end/panels/elements/components/QueryContainer.ts +40 -40
- package/front_end/panels/elements/components/StylePropertyEditor.ts +18 -18
- package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +4 -4
- package/front_end/panels/event_listeners/EventListenersUtils.ts +2 -1
- package/front_end/panels/issues/AffectedBlockedByResponseView.ts +4 -4
- package/front_end/panels/issues/AffectedCookiesView.ts +4 -5
- package/front_end/panels/issues/AffectedDirectivesView.ts +19 -19
- package/front_end/panels/issues/AffectedDocumentsInQuirksModeView.ts +7 -8
- package/front_end/panels/issues/AffectedElementsView.ts +4 -4
- package/front_end/panels/issues/AffectedElementsWithLowContrastView.ts +7 -8
- package/front_end/panels/issues/AffectedHeavyAdView.ts +8 -8
- package/front_end/panels/issues/AffectedResourcesView.ts +25 -26
- package/front_end/panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts +8 -8
- package/front_end/panels/issues/AffectedSourcesView.ts +4 -4
- package/front_end/panels/issues/AffectedTrustedWebActivityIssueDetailsView.ts +4 -4
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +17 -17
- package/front_end/panels/issues/CSPViolationsListView.ts +22 -23
- package/front_end/panels/issues/CSPViolationsView.ts +17 -17
- package/front_end/panels/issues/ComboBoxOfCheckBoxes.ts +13 -13
- package/front_end/panels/issues/CorsIssueDetailsView.ts +23 -23
- package/front_end/panels/issues/GenericIssueDetailsView.ts +4 -4
- package/front_end/panels/issues/HiddenIssuesRow.ts +7 -7
- package/front_end/panels/issues/IssueAggregator.ts +95 -95
- package/front_end/panels/issues/IssueKindView.ts +14 -14
- package/front_end/panels/issues/IssueView.ts +98 -98
- package/front_end/panels/issues/IssuesPane.ts +102 -102
- package/front_end/panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts +5 -5
- package/front_end/panels/issues/components/HideIssuesMenu.ts +10 -10
- package/front_end/panels/media/PlayerListView.ts +160 -97
- package/front_end/panels/media/PlayerMessagesView.ts +1 -0
- package/front_end/panels/media/playerListView.css +58 -0
- package/front_end/panels/network/NetworkLogView.ts +2 -6
- package/front_end/panels/network/NetworkWaterfallColumn.ts +2 -4
- package/front_end/panels/network/components/RequestTrustTokensView.ts +40 -40
- package/front_end/panels/network/components/WebBundleInfoView.ts +9 -9
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +92 -37
- package/front_end/panels/performance_monitor/performanceMonitor.css +32 -0
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +2 -2
- package/front_end/panels/search/SearchConfig.ts +0 -6
- package/front_end/panels/settings/KeybindsSettingsTab.ts +4 -0
- package/front_end/panels/settings/components/SyncSection.ts +14 -14
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +96 -96
- package/front_end/panels/sources/BreakpointEditDialog.ts +4 -3
- package/front_end/panels/sources/NavigatorView.ts +3 -9
- package/front_end/panels/sources/SourceMapNamesResolver.ts +3 -3
- package/front_end/panels/sources/SourcesPanel.ts +1 -3
- package/front_end/panels/sources/SourcesView.ts +0 -3
- package/front_end/panels/sources/TabbedEditorContainer.ts +0 -3
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
- package/front_end/panels/timeline/TimelineLoader.ts +0 -3
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -1
- package/front_end/panels/timeline/components/WebVitalsLane.ts +77 -76
- package/front_end/panels/timeline/components/WebVitalsTimeline.ts +133 -133
- package/front_end/panels/timeline/components/WebVitalsTooltip.ts +9 -9
- package/front_end/panels/webauthn/WebauthnPane.ts +203 -205
- package/front_end/third_party/codemirror.next/bundle.ts +3 -3
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +10 -1
- package/front_end/third_party/codemirror.next/codemirror.next.js +2 -1
- package/front_end/third_party/codemirror.next/package.json +3 -3
- package/front_end/third_party/diff/DiffWrapper.ts +7 -0
- package/front_end/ui/components/adorners/Adorner.ts +2 -2
- package/front_end/ui/components/buttons/Button.ts +9 -9
- package/front_end/ui/components/data_grid/DataGrid.ts +64 -64
- package/front_end/ui/components/data_grid/DataGridController.ts +22 -22
- package/front_end/ui/components/data_grid/DataGridUtils.ts +3 -0
- package/front_end/ui/components/diff_view/DiffView.ts +6 -6
- package/front_end/ui/components/expandable_list/ExpandableList.ts +5 -5
- package/front_end/ui/components/icon_button/Icon.ts +4 -4
- package/front_end/ui/components/icon_button/IconButton.ts +4 -4
- package/front_end/ui/components/issue_counter/IssueCounter.ts +3 -3
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +11 -11
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +50 -50
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +6 -6
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +4 -4
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +12 -12
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +11 -11
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +40 -39
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +18 -18
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
- package/front_end/ui/components/linkifier/LinkifierImpl.ts +4 -4
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +5 -5
- package/front_end/ui/components/markdown_view/MarkdownLink.ts +2 -2
- package/front_end/ui/components/markdown_view/MarkdownView.ts +4 -4
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +2 -2
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +2 -2
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +4 -4
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +22 -22
- package/front_end/ui/components/report_view/ReportView.ts +16 -16
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +14 -14
- package/front_end/ui/components/settings/SettingCheckbox.ts +5 -5
- package/front_end/ui/components/survey_link/SurveyLink.ts +8 -8
- package/front_end/ui/components/text_editor/TextEditor.ts +9 -9
- package/front_end/ui/components/text_editor/cursor_tooltip.ts +7 -1
- package/front_end/ui/components/text_prompt/TextPrompt.ts +18 -18
- package/front_end/ui/components/tree_outline/TreeOutline.ts +69 -70
- package/front_end/ui/legacy/ContextFlavorListener.ts +0 -4
- package/front_end/ui/legacy/SearchableView.ts +13 -4
- package/front_end/ui/legacy/SuggestBox.ts +0 -3
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +6 -6
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +0 -3
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +13 -12
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +2 -2
- package/front_end/ui/legacy/themeColors.css +2 -0
- package/front_end/ui/legacy/theme_support/theme_support_impl.ts +34 -7
- package/package.json +1 -1
- package/scripts/eslint_rules/lib/use_private_class_members.js +41 -0
- package/scripts/eslint_rules/tests/use_private_class_members_test.js +62 -0
- package/scripts/migration/class-fields/migrate.js +2 -3
- package/scripts/migration/class-fields/migrate.sh +1 -3
- package/scripts/migration/class-fields/package.json +1 -1
- package/config/gni/all_devtools_files.gni +0 -255
- package/scripts/build/devtools_file_hashes.py +0 -82
- package/scripts/devtools_run/devtools_run_cli +0 -49
- package/scripts/devtools_run/package.json +0 -13
- package/scripts/unzip.py +0 -20
- package/scripts/visualize_deps/jquery_svg.html +0 -57
- package/scripts/visualize_deps/run_visualize.js +0 -119
|
@@ -240,19 +240,19 @@ const UIStrings = {
|
|
|
240
240
|
const str_ = i18n.i18n.registerUIStrings('panels/application/components/FrameDetailsView.ts', UIStrings);
|
|
241
241
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
242
242
|
export class FrameDetailsView extends UI.ThrottledWidget.ThrottledWidget {
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
readonly #reportView = new FrameDetailsReportView();
|
|
244
|
+
readonly #frame: SDK.ResourceTreeModel.ResourceTreeFrame;
|
|
245
245
|
|
|
246
246
|
constructor(frame: SDK.ResourceTreeModel.ResourceTreeFrame) {
|
|
247
247
|
super();
|
|
248
|
-
this
|
|
248
|
+
this.#frame = frame;
|
|
249
249
|
this.contentElement.classList.add('overflow-auto');
|
|
250
|
-
this.contentElement.appendChild(this
|
|
250
|
+
this.contentElement.appendChild(this.#reportView);
|
|
251
251
|
this.update();
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
async doUpdate(): Promise<void> {
|
|
255
|
-
this
|
|
255
|
+
this.#reportView.data = {frame: this.#frame};
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
|
|
@@ -264,67 +264,67 @@ export interface FrameDetailsReportViewData {
|
|
|
264
264
|
|
|
265
265
|
export class FrameDetailsReportView extends HTMLElement {
|
|
266
266
|
static readonly litTagName = LitHtml.literal`devtools-resources-frame-details-view`;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
267
|
+
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
268
|
+
#frame?: SDK.ResourceTreeModel.ResourceTreeFrame;
|
|
269
|
+
#protocolMonitorExperimentEnabled = false;
|
|
270
|
+
#permissionsPolicies: Promise<Protocol.Page.PermissionsPolicyFeatureState[]|null>|null = null;
|
|
271
|
+
#permissionsPolicySectionData: PermissionsPolicySectionData = {policies: [], showDetails: false};
|
|
272
|
+
#originTrialTreeView: OriginTrialTreeView = new OriginTrialTreeView();
|
|
273
273
|
|
|
274
274
|
connectedCallback(): void {
|
|
275
|
-
this
|
|
276
|
-
this
|
|
275
|
+
this.#protocolMonitorExperimentEnabled = Root.Runtime.experiments.isEnabled('protocolMonitor');
|
|
276
|
+
this.#shadow.adoptedStyleSheets = [frameDetailsReportViewStyles];
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
set data(data: FrameDetailsReportViewData) {
|
|
280
|
-
this
|
|
281
|
-
if (!this
|
|
282
|
-
this
|
|
280
|
+
this.#frame = data.frame;
|
|
281
|
+
if (!this.#permissionsPolicies && this.#frame) {
|
|
282
|
+
this.#permissionsPolicies = this.#frame.getPermissionsPolicyState();
|
|
283
283
|
}
|
|
284
|
-
this
|
|
284
|
+
this.#render();
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
|
|
287
|
+
async #render(): Promise<void> {
|
|
288
288
|
await coordinator.write('FrameDetailsView render', () => {
|
|
289
|
-
if (!this
|
|
289
|
+
if (!this.#frame) {
|
|
290
290
|
return;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
294
294
|
// clang-format off
|
|
295
295
|
LitHtml.render(LitHtml.html`
|
|
296
|
-
<${ReportView.ReportView.Report.litTagName} .data=${{reportTitle: this
|
|
297
|
-
${this
|
|
298
|
-
${this
|
|
299
|
-
${this
|
|
300
|
-
${this
|
|
301
|
-
${LitHtml.Directives.until(this
|
|
302
|
-
this
|
|
296
|
+
<${ReportView.ReportView.Report.litTagName} .data=${{reportTitle: this.#frame.displayName()} as ReportView.ReportView.ReportData}>
|
|
297
|
+
${this.#renderDocumentSection()}
|
|
298
|
+
${this.#renderIsolationSection()}
|
|
299
|
+
${this.#renderApiAvailabilitySection()}
|
|
300
|
+
${this.#renderOriginTrial()}
|
|
301
|
+
${LitHtml.Directives.until(this.#permissionsPolicies?.then(policies => {
|
|
302
|
+
this.#permissionsPolicySectionData.policies = policies || [];
|
|
303
303
|
return LitHtml.html`
|
|
304
304
|
<${PermissionsPolicySection.litTagName}
|
|
305
|
-
.data=${this
|
|
305
|
+
.data=${this.#permissionsPolicySectionData as PermissionsPolicySectionData}
|
|
306
306
|
>
|
|
307
307
|
</${PermissionsPolicySection.litTagName}>
|
|
308
308
|
`;
|
|
309
309
|
}), LitHtml.nothing)}
|
|
310
|
-
${this
|
|
310
|
+
${this.#protocolMonitorExperimentEnabled ? this.#renderAdditionalInfoSection() : LitHtml.nothing}
|
|
311
311
|
</${ReportView.ReportView.Report.litTagName}>
|
|
312
|
-
`, this
|
|
312
|
+
`, this.#shadow, {host: this});
|
|
313
313
|
// clang-format on
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
-
|
|
318
|
-
if (!this
|
|
317
|
+
#renderOriginTrial(): LitHtml.TemplateResult|{} {
|
|
318
|
+
if (!this.#frame) {
|
|
319
319
|
return LitHtml.nothing;
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
this
|
|
322
|
+
this.#originTrialTreeView.classList.add('span-cols');
|
|
323
323
|
|
|
324
|
-
const frame = this
|
|
324
|
+
const frame = this.#frame;
|
|
325
325
|
const refreshOriginTrials: () => void = () => {
|
|
326
326
|
frame.getOriginTrials().then(trials => {
|
|
327
|
-
this
|
|
327
|
+
this.#originTrialTreeView.data = {trials} as OriginTrialTreeViewData;
|
|
328
328
|
});
|
|
329
329
|
};
|
|
330
330
|
refreshOriginTrials();
|
|
@@ -343,14 +343,14 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
343
343
|
} as IconButton.IconButton.IconButtonData}>
|
|
344
344
|
</${IconButton.IconButton.IconButton.litTagName}>
|
|
345
345
|
</${ReportView.ReportView.ReportSectionHeader.litTagName}>
|
|
346
|
-
${this
|
|
346
|
+
${this.#originTrialTreeView}
|
|
347
347
|
<${ReportView.ReportView.ReportSectionDivider.litTagName}></${
|
|
348
348
|
ReportView.ReportView.ReportSectionDivider.litTagName}>
|
|
349
349
|
`;
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
-
|
|
353
|
-
if (!this
|
|
352
|
+
#renderDocumentSection(): LitHtml.TemplateResult|{} {
|
|
353
|
+
if (!this.#frame) {
|
|
354
354
|
return LitHtml.nothing;
|
|
355
355
|
}
|
|
356
356
|
|
|
@@ -361,26 +361,26 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
361
361
|
ReportView.ReportView.ReportKey.litTagName}>
|
|
362
362
|
<${ReportView.ReportView.ReportValue.litTagName}>
|
|
363
363
|
<div class="inline-items">
|
|
364
|
-
${this
|
|
365
|
-
${this
|
|
366
|
-
<div class="text-ellipsis" title=${this
|
|
364
|
+
${this.#maybeRenderSourcesLinkForURL()}
|
|
365
|
+
${this.#maybeRenderNetworkLinkForURL()}
|
|
366
|
+
<div class="text-ellipsis" title=${this.#frame.url}>${this.#frame.url}</div>
|
|
367
367
|
</div>
|
|
368
368
|
</${ReportView.ReportView.ReportValue.litTagName}>
|
|
369
|
-
${this
|
|
370
|
-
${this
|
|
371
|
-
${LitHtml.Directives.until(this
|
|
372
|
-
${this
|
|
373
|
-
${this
|
|
369
|
+
${this.#maybeRenderUnreachableURL()}
|
|
370
|
+
${this.#maybeRenderOrigin()}
|
|
371
|
+
${LitHtml.Directives.until(this.#renderOwnerElement(), LitHtml.nothing)}
|
|
372
|
+
${this.#maybeRenderCreationStacktrace()}
|
|
373
|
+
${this.#maybeRenderAdStatus()}
|
|
374
374
|
<${ReportView.ReportView.ReportSectionDivider.litTagName}></${
|
|
375
375
|
ReportView.ReportView.ReportSectionDivider.litTagName}>
|
|
376
376
|
`;
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
|
|
380
|
-
if (!this
|
|
379
|
+
#maybeRenderSourcesLinkForURL(): LitHtml.TemplateResult|{} {
|
|
380
|
+
if (!this.#frame || this.#frame.unreachableUrl()) {
|
|
381
381
|
return LitHtml.nothing;
|
|
382
382
|
}
|
|
383
|
-
const sourceCode = this
|
|
383
|
+
const sourceCode = this.#uiSourceCodeForFrame(this.#frame);
|
|
384
384
|
return renderIconLink(
|
|
385
385
|
'sources_panel_icon',
|
|
386
386
|
i18nString(UIStrings.clickToRevealInSourcesPanel),
|
|
@@ -388,9 +388,9 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
388
388
|
);
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
-
|
|
392
|
-
if (this
|
|
393
|
-
const resource = this
|
|
391
|
+
#maybeRenderNetworkLinkForURL(): LitHtml.TemplateResult|{} {
|
|
392
|
+
if (this.#frame) {
|
|
393
|
+
const resource = this.#frame.resourceForURL(this.#frame.url);
|
|
394
394
|
if (resource && resource.request) {
|
|
395
395
|
const request = resource.request;
|
|
396
396
|
return renderIconLink(
|
|
@@ -404,8 +404,7 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
404
404
|
return LitHtml.nothing;
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
-
|
|
408
|
-
|null {
|
|
407
|
+
#uiSourceCodeForFrame(frame: SDK.ResourceTreeModel.ResourceTreeFrame): Workspace.UISourceCode.UISourceCode|null {
|
|
409
408
|
for (const project of Workspace.Workspace.WorkspaceImpl.instance().projects()) {
|
|
410
409
|
const projectTarget = Bindings.NetworkProject.NetworkProject.getTargetForProject(project);
|
|
411
410
|
if (projectTarget && projectTarget === frame.resourceTreeModel().target()) {
|
|
@@ -418,8 +417,8 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
418
417
|
return null;
|
|
419
418
|
}
|
|
420
419
|
|
|
421
|
-
|
|
422
|
-
if (!this
|
|
420
|
+
#maybeRenderUnreachableURL(): LitHtml.TemplateResult|{} {
|
|
421
|
+
if (!this.#frame || !this.#frame.unreachableUrl()) {
|
|
423
422
|
return LitHtml.nothing;
|
|
424
423
|
}
|
|
425
424
|
return LitHtml.html`
|
|
@@ -427,16 +426,16 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
427
426
|
ReportView.ReportView.ReportKey.litTagName}>
|
|
428
427
|
<${ReportView.ReportView.ReportValue.litTagName}>
|
|
429
428
|
<div class="inline-items">
|
|
430
|
-
${this
|
|
431
|
-
<div class="text-ellipsis" title=${this
|
|
429
|
+
${this.#renderNetworkLinkForUnreachableURL()}
|
|
430
|
+
<div class="text-ellipsis" title=${this.#frame.unreachableUrl()}>${this.#frame.unreachableUrl()}</div>
|
|
432
431
|
</div>
|
|
433
432
|
</${ReportView.ReportView.ReportValue.litTagName}>
|
|
434
433
|
`;
|
|
435
434
|
}
|
|
436
435
|
|
|
437
|
-
|
|
438
|
-
if (this
|
|
439
|
-
const unreachableUrl = Common.ParsedURL.ParsedURL.fromString(this
|
|
436
|
+
#renderNetworkLinkForUnreachableURL(): LitHtml.TemplateResult|{} {
|
|
437
|
+
if (this.#frame) {
|
|
438
|
+
const unreachableUrl = Common.ParsedURL.ParsedURL.fromString(this.#frame.unreachableUrl());
|
|
440
439
|
if (unreachableUrl) {
|
|
441
440
|
return renderIconLink(
|
|
442
441
|
'network_panel_icon',
|
|
@@ -460,22 +459,22 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
460
459
|
return LitHtml.nothing;
|
|
461
460
|
}
|
|
462
461
|
|
|
463
|
-
|
|
464
|
-
if (this
|
|
462
|
+
#maybeRenderOrigin(): LitHtml.TemplateResult|{} {
|
|
463
|
+
if (this.#frame && this.#frame.securityOrigin && this.#frame.securityOrigin !== '://') {
|
|
465
464
|
return LitHtml.html`
|
|
466
465
|
<${ReportView.ReportView.ReportKey.litTagName}>${i18nString(UIStrings.origin)}</${
|
|
467
466
|
ReportView.ReportView.ReportKey.litTagName}>
|
|
468
467
|
<${ReportView.ReportView.ReportValue.litTagName}>
|
|
469
|
-
<div class="text-ellipsis" title=${this
|
|
468
|
+
<div class="text-ellipsis" title=${this.#frame.securityOrigin}>${this.#frame.securityOrigin}</div>
|
|
470
469
|
</${ReportView.ReportView.ReportValue.litTagName}>
|
|
471
470
|
`;
|
|
472
471
|
}
|
|
473
472
|
return LitHtml.nothing;
|
|
474
473
|
}
|
|
475
474
|
|
|
476
|
-
|
|
477
|
-
if (this
|
|
478
|
-
const linkTargetDOMNode = await this
|
|
475
|
+
async #renderOwnerElement(): Promise<LitHtml.TemplateResult|{}> {
|
|
476
|
+
if (this.#frame) {
|
|
477
|
+
const linkTargetDOMNode = await this.#frame.getOwnerDOMNodeOrDocument();
|
|
479
478
|
if (linkTargetDOMNode) {
|
|
480
479
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
481
480
|
// clang-format off
|
|
@@ -483,7 +482,7 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
483
482
|
<${ReportView.ReportView.ReportKey.litTagName}>${i18nString(UIStrings.ownerElement)}</${ReportView.ReportView.ReportKey.litTagName}>
|
|
484
483
|
<${ReportView.ReportView.ReportValue.litTagName} class="without-min-width">
|
|
485
484
|
<button class="link" role="link" tabindex=0 title=${i18nString(UIStrings.clickToRevealInElementsPanel)}
|
|
486
|
-
@mouseenter=${(): Promise<void>|undefined => this
|
|
485
|
+
@mouseenter=${(): Promise<void>|undefined => this.#frame?.highlight()}
|
|
487
486
|
@mouseleave=${(): void => SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight()}
|
|
488
487
|
@click=${(): Promise<void> => Common.Revealer.reveal(linkTargetDOMNode)}
|
|
489
488
|
>
|
|
@@ -503,8 +502,8 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
503
502
|
return LitHtml.nothing;
|
|
504
503
|
}
|
|
505
504
|
|
|
506
|
-
|
|
507
|
-
const creationStackTraceData = this
|
|
505
|
+
#maybeRenderCreationStacktrace(): LitHtml.TemplateResult|{} {
|
|
506
|
+
const creationStackTraceData = this.#frame?.getCreationStackTraceData();
|
|
508
507
|
if (creationStackTraceData && creationStackTraceData.creationStackTrace) {
|
|
509
508
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
510
509
|
// clang-format off
|
|
@@ -513,7 +512,7 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
513
512
|
i18nString(UIStrings.creationStackTrace)}</${ReportView.ReportView.ReportKey.litTagName}>
|
|
514
513
|
<${ReportView.ReportView.ReportValue.litTagName}>
|
|
515
514
|
<${StackTrace.litTagName} .data=${{
|
|
516
|
-
frame: this
|
|
515
|
+
frame: this.#frame,
|
|
517
516
|
buildStackTraceRows: Components.JSPresentationUtils.buildStackTraceRows,
|
|
518
517
|
} as StackTraceData}>
|
|
519
518
|
</${StackTrace.litTagName}>
|
|
@@ -524,7 +523,7 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
524
523
|
return LitHtml.nothing;
|
|
525
524
|
}
|
|
526
525
|
|
|
527
|
-
|
|
526
|
+
#getAdFrameTypeStrings(type: Protocol.Page.AdFrameType.Child|Protocol.Page.AdFrameType.Root):
|
|
528
527
|
{value: Platform.UIString.LocalizedString, description: Platform.UIString.LocalizedString} {
|
|
529
528
|
switch (type) {
|
|
530
529
|
case Protocol.Page.AdFrameType.Child:
|
|
@@ -534,8 +533,7 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
534
533
|
}
|
|
535
534
|
}
|
|
536
535
|
|
|
537
|
-
|
|
538
|
-
Platform.UIString.LocalizedString {
|
|
536
|
+
#getAdFrameExplanationString(explanation: Protocol.Page.AdFrameExplanation): Platform.UIString.LocalizedString {
|
|
539
537
|
switch (explanation) {
|
|
540
538
|
case Protocol.Page.AdFrameExplanation.CreatedByAdScript:
|
|
541
539
|
return i18nString(UIStrings.createdByAdScriptExplanation);
|
|
@@ -546,18 +544,18 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
546
544
|
}
|
|
547
545
|
}
|
|
548
546
|
|
|
549
|
-
|
|
550
|
-
if (!this
|
|
547
|
+
#maybeRenderAdStatus(): LitHtml.TemplateResult|{} {
|
|
548
|
+
if (!this.#frame) {
|
|
551
549
|
return LitHtml.nothing;
|
|
552
550
|
}
|
|
553
|
-
const adFrameType = this
|
|
551
|
+
const adFrameType = this.#frame.adFrameType();
|
|
554
552
|
if (adFrameType === Protocol.Page.AdFrameType.None) {
|
|
555
553
|
return LitHtml.nothing;
|
|
556
554
|
}
|
|
557
|
-
const typeStrings = this
|
|
555
|
+
const typeStrings = this.#getAdFrameTypeStrings(adFrameType);
|
|
558
556
|
const rows = [LitHtml.html`<div title=${typeStrings.description}>${typeStrings.value}</div>`];
|
|
559
|
-
for (const explanation of this
|
|
560
|
-
rows.push(LitHtml.html`<div>${this
|
|
557
|
+
for (const explanation of this.#frame.adFrameStatus()?.explanations || []) {
|
|
558
|
+
rows.push(LitHtml.html`<div>${this.#getAdFrameExplanationString(explanation)}</div>`);
|
|
561
559
|
}
|
|
562
560
|
return LitHtml.html`
|
|
563
561
|
<${ReportView.ReportView.ReportKey.litTagName}>${i18nString(UIStrings.adStatus)}</${
|
|
@@ -569,8 +567,8 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
569
567
|
`;
|
|
570
568
|
}
|
|
571
569
|
|
|
572
|
-
|
|
573
|
-
if (!this
|
|
570
|
+
#renderIsolationSection(): LitHtml.TemplateResult|{} {
|
|
571
|
+
if (!this.#frame) {
|
|
574
572
|
return LitHtml.nothing;
|
|
575
573
|
}
|
|
576
574
|
return LitHtml.html`
|
|
@@ -579,30 +577,30 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
579
577
|
<${ReportView.ReportView.ReportKey.litTagName}>${i18nString(UIStrings.secureContext)}</${
|
|
580
578
|
ReportView.ReportView.ReportKey.litTagName}>
|
|
581
579
|
<${ReportView.ReportView.ReportValue.litTagName}>
|
|
582
|
-
${this
|
|
583
|
-
this
|
|
580
|
+
${this.#frame.isSecureContext() ? i18nString(UIStrings.yes) : i18nString(UIStrings.no)}\xA0${
|
|
581
|
+
this.#maybeRenderSecureContextExplanation()}
|
|
584
582
|
</${ReportView.ReportView.ReportValue.litTagName}>
|
|
585
583
|
<${ReportView.ReportView.ReportKey.litTagName}>${i18nString(UIStrings.crossoriginIsolated)}</${
|
|
586
584
|
ReportView.ReportView.ReportKey.litTagName}>
|
|
587
585
|
<${ReportView.ReportView.ReportValue.litTagName}>
|
|
588
|
-
${this
|
|
586
|
+
${this.#frame.isCrossOriginIsolated() ? i18nString(UIStrings.yes) : i18nString(UIStrings.no)}
|
|
589
587
|
</${ReportView.ReportView.ReportValue.litTagName}>
|
|
590
|
-
${LitHtml.Directives.until(this
|
|
588
|
+
${LitHtml.Directives.until(this.#maybeRenderCoopCoepStatus(), LitHtml.nothing)}
|
|
591
589
|
<${ReportView.ReportView.ReportSectionDivider.litTagName}></${
|
|
592
590
|
ReportView.ReportView.ReportSectionDivider.litTagName}>
|
|
593
591
|
`;
|
|
594
592
|
}
|
|
595
593
|
|
|
596
|
-
|
|
597
|
-
const explanation = this
|
|
594
|
+
#maybeRenderSecureContextExplanation(): LitHtml.TemplateResult|{} {
|
|
595
|
+
const explanation = this.#getSecureContextExplanation();
|
|
598
596
|
if (explanation) {
|
|
599
597
|
return LitHtml.html`<span class="inline-comment">${explanation}</span>`;
|
|
600
598
|
}
|
|
601
599
|
return LitHtml.nothing;
|
|
602
600
|
}
|
|
603
601
|
|
|
604
|
-
|
|
605
|
-
switch (this
|
|
602
|
+
#getSecureContextExplanation(): Platform.UIString.LocalizedString|null {
|
|
603
|
+
switch (this.#frame?.getSecureContextType()) {
|
|
606
604
|
case Protocol.Page.SecureContextType.Secure:
|
|
607
605
|
return null;
|
|
608
606
|
case Protocol.Page.SecureContextType.SecureLocalhost:
|
|
@@ -615,18 +613,18 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
615
613
|
return null;
|
|
616
614
|
}
|
|
617
615
|
|
|
618
|
-
|
|
619
|
-
if (this
|
|
620
|
-
const model = this
|
|
621
|
-
const info = model && await model.getSecurityIsolationStatus(this
|
|
616
|
+
async #maybeRenderCoopCoepStatus(): Promise<LitHtml.TemplateResult|{}> {
|
|
617
|
+
if (this.#frame) {
|
|
618
|
+
const model = this.#frame.resourceTreeModel().target().model(SDK.NetworkManager.NetworkManager);
|
|
619
|
+
const info = model && await model.getSecurityIsolationStatus(this.#frame.id);
|
|
622
620
|
if (info) {
|
|
623
621
|
return LitHtml.html`
|
|
624
622
|
${
|
|
625
|
-
this
|
|
623
|
+
this.#maybeRenderCrossOriginStatus(
|
|
626
624
|
info.coep, i18n.i18n.lockedString('Cross-Origin Embedder Policy (COEP)'),
|
|
627
625
|
Protocol.Network.CrossOriginEmbedderPolicyValue.None)}
|
|
628
626
|
${
|
|
629
|
-
this
|
|
627
|
+
this.#maybeRenderCrossOriginStatus(
|
|
630
628
|
info.coop, i18n.i18n.lockedString('Cross-Origin Opener Policy (COOP)'),
|
|
631
629
|
Protocol.Network.CrossOriginOpenerPolicyValue.UnsafeNone)}
|
|
632
630
|
`;
|
|
@@ -635,7 +633,7 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
635
633
|
return LitHtml.nothing;
|
|
636
634
|
}
|
|
637
635
|
|
|
638
|
-
|
|
636
|
+
#maybeRenderCrossOriginStatus(
|
|
639
637
|
info: Protocol.Network.CrossOriginEmbedderPolicyStatus|Protocol.Network.CrossOriginOpenerPolicyStatus|undefined,
|
|
640
638
|
policyName: string,
|
|
641
639
|
noneValue: Protocol.Network.CrossOriginEmbedderPolicyValue|
|
|
@@ -658,8 +656,8 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
658
656
|
`;
|
|
659
657
|
}
|
|
660
658
|
|
|
661
|
-
|
|
662
|
-
if (!this
|
|
659
|
+
#renderApiAvailabilitySection(): LitHtml.TemplateResult|{} {
|
|
660
|
+
if (!this.#frame) {
|
|
663
661
|
return LitHtml.nothing;
|
|
664
662
|
}
|
|
665
663
|
|
|
@@ -670,16 +668,16 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
670
668
|
${i18nString(UIStrings.availabilityOfCertainApisDepends)}
|
|
671
669
|
<x-link href="https://web.dev/why-coop-coep/" class="link">${i18nString(UIStrings.learnMore)}</x-link>
|
|
672
670
|
</div>
|
|
673
|
-
${this
|
|
674
|
-
${this
|
|
671
|
+
${this.#renderSharedArrayBufferAvailability()}
|
|
672
|
+
${this.#renderMeasureMemoryAvailability()}
|
|
675
673
|
<${ReportView.ReportView.ReportSectionDivider.litTagName}></${
|
|
676
674
|
ReportView.ReportView.ReportSectionDivider.litTagName}>
|
|
677
675
|
`;
|
|
678
676
|
}
|
|
679
677
|
|
|
680
|
-
|
|
681
|
-
if (this
|
|
682
|
-
const features = this
|
|
678
|
+
#renderSharedArrayBufferAvailability(): LitHtml.TemplateResult|{} {
|
|
679
|
+
if (this.#frame) {
|
|
680
|
+
const features = this.#frame.getGatedAPIFeatures();
|
|
683
681
|
if (features) {
|
|
684
682
|
const sabAvailable = features.includes(Protocol.Page.GatedAPIFeatures.SharedArrayBuffers);
|
|
685
683
|
const sabTransferAvailable =
|
|
@@ -719,7 +717,7 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
719
717
|
<${ReportView.ReportView.ReportKey.litTagName}>SharedArrayBuffers</${
|
|
720
718
|
ReportView.ReportView.ReportKey.litTagName}>
|
|
721
719
|
<${ReportView.ReportView.ReportValue.litTagName} title=${tooltipText}>
|
|
722
|
-
${availabilityText}\xA0${renderHint(this
|
|
720
|
+
${availabilityText}\xA0${renderHint(this.#frame)}
|
|
723
721
|
</${ReportView.ReportView.ReportValue.litTagName}>
|
|
724
722
|
`;
|
|
725
723
|
}
|
|
@@ -727,9 +725,9 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
727
725
|
return LitHtml.nothing;
|
|
728
726
|
}
|
|
729
727
|
|
|
730
|
-
|
|
731
|
-
if (this
|
|
732
|
-
const measureMemoryAvailable = this
|
|
728
|
+
#renderMeasureMemoryAvailability(): LitHtml.TemplateResult|{} {
|
|
729
|
+
if (this.#frame) {
|
|
730
|
+
const measureMemoryAvailable = this.#frame.isCrossOriginIsolated();
|
|
733
731
|
const availabilityText =
|
|
734
732
|
measureMemoryAvailable ? i18nString(UIStrings.available) : i18nString(UIStrings.unavailable);
|
|
735
733
|
const tooltipText = measureMemoryAvailable ? i18nString(UIStrings.thePerformanceAPI) :
|
|
@@ -747,8 +745,8 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
747
745
|
return LitHtml.nothing;
|
|
748
746
|
}
|
|
749
747
|
|
|
750
|
-
|
|
751
|
-
if (!this
|
|
748
|
+
#renderAdditionalInfoSection(): LitHtml.TemplateResult|{} {
|
|
749
|
+
if (!this.#frame) {
|
|
752
750
|
return LitHtml.nothing;
|
|
753
751
|
}
|
|
754
752
|
|
|
@@ -759,7 +757,7 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
|
759
757
|
<${ReportView.ReportView.ReportKey.litTagName}>${i18nString(UIStrings.frameId)}</${
|
|
760
758
|
ReportView.ReportView.ReportKey.litTagName}>
|
|
761
759
|
<${ReportView.ReportView.ReportValue.litTagName}>
|
|
762
|
-
<div class="text-ellipsis" title=${this
|
|
760
|
+
<div class="text-ellipsis" title=${this.#frame.id}>${this.#frame.id}</div>
|
|
763
761
|
</${ReportView.ReportView.ReportValue.litTagName}>
|
|
764
762
|
<${ReportView.ReportView.ReportSectionDivider.litTagName}></${
|
|
765
763
|
ReportView.ReportView.ReportSectionDivider.litTagName}>
|