chrome-devtools-frontend 1.0.1596535 → 1.0.1597624
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/prompts/ui-widgets.md +7 -8
- package/docs/ui_engineering.md +10 -11
- package/front_end/core/host/AidaClient.ts +4 -0
- package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -0
- package/front_end/core/host/UserMetrics.ts +12 -0
- package/front_end/core/root/Runtime.ts +5 -0
- package/front_end/core/sdk/CPUThrottlingManager.ts +14 -13
- package/front_end/core/sdk/CSSMatchedStyles.ts +2 -0
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +28 -0
- package/front_end/core/sdk/PageResourceLoader.ts +22 -1
- package/front_end/devtools_compatibility.js +2 -1
- package/front_end/models/ai_assistance/AiConversation.ts +29 -8
- package/front_end/models/ai_assistance/ChangeManager.ts +16 -0
- package/front_end/models/ai_assistance/ExtensionScope.ts +11 -3
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +127 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +26 -3
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +11 -8
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +24 -0
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +323 -16
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +27 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +21 -0
- package/front_end/models/greendev/Prototypes.ts +7 -1
- package/front_end/models/trace/Processor.ts +1 -0
- package/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +33 -0
- package/front_end/models/trace/insights/CharacterSet.ts +172 -0
- package/front_end/models/trace/insights/Models.ts +1 -0
- package/front_end/models/trace/insights/types.ts +1 -0
- package/front_end/models/trace/types/TraceEvents.ts +17 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +51 -36
- package/front_end/panels/ai_assistance/PatchWidget.ts +6 -6
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +93 -74
- package/front_end/panels/ai_assistance/components/ChatView.ts +6 -11
- package/front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts +18 -9
- package/front_end/panels/ai_assistance/components/StylingAgentMarkdownRenderer.ts +200 -0
- package/front_end/panels/ai_assistance/components/chatMessage.css +11 -8
- package/front_end/panels/application/AppManifestView.ts +3 -4
- package/front_end/panels/application/DeviceBoundSessionsView.ts +18 -22
- package/front_end/panels/application/FrameDetailsView.ts +9 -15
- package/front_end/panels/application/OriginTrialTreeView.ts +2 -3
- package/front_end/panels/application/ReportingApiView.ts +13 -17
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
- package/front_end/panels/application/components/BackForwardCacheView.ts +3 -3
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -3
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +3 -2
- package/front_end/panels/changes/ChangesView.ts +6 -4
- package/front_end/panels/common/ExtensionServer.ts +15 -0
- package/front_end/panels/console/ConsolePinPane.ts +3 -3
- package/front_end/panels/coverage/CoverageListView.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +11 -15
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +3 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +55 -47
- package/front_end/panels/elements/ElementsTreeOutline.ts +149 -28
- package/front_end/panels/elements/EventListenersWidget.ts +3 -2
- package/front_end/panels/elements/StandaloneStylesContainer.ts +21 -6
- package/front_end/panels/elements/StylePropertyTreeElement.ts +49 -4
- package/front_end/panels/layer_viewer/Layers3DView.ts +5 -4
- package/front_end/panels/lighthouse/LighthousePanel.ts +8 -0
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +5 -6
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +6 -11
- package/front_end/panels/network/RequestCookiesView.ts +3 -4
- package/front_end/panels/network/RequestInitiatorView.ts +7 -5
- package/front_end/panels/network/RequestResponseView.ts +10 -15
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +3 -4
- package/front_end/panels/recorder/components/RecordingView.ts +31 -36
- package/front_end/panels/recorder/components/StepEditor.ts +6 -7
- package/front_end/panels/search/SearchView.ts +2 -3
- package/front_end/panels/settings/SettingsScreen.ts +3 -2
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +2 -5
- package/front_end/panels/timeline/components/LiveMetricsView.ts +5 -8
- package/front_end/panels/timeline/components/insights/Cache.ts +8 -10
- package/front_end/panels/timeline/components/insights/CharacterSet.ts +38 -0
- package/front_end/panels/timeline/components/insights/DOMSize.ts +16 -20
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +2 -6
- package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +3 -4
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +3 -4
- package/front_end/panels/timeline/components/insights/ForcedReflow.ts +5 -7
- package/front_end/panels/timeline/components/insights/INPBreakdown.ts +3 -4
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +3 -4
- package/front_end/panels/timeline/components/insights/ImageRef.ts +2 -4
- package/front_end/panels/timeline/components/insights/InsightRenderer.ts +2 -0
- package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +5 -7
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +2 -4
- package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +3 -4
- package/front_end/panels/timeline/components/insights/ModernHTTP.ts +3 -4
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +7 -11
- package/front_end/panels/timeline/components/insights/NodeLink.ts +2 -4
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +3 -4
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +7 -10
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +5 -7
- package/front_end/panels/timeline/components/insights/insights.ts +2 -0
- package/front_end/panels/web_audio/WebAudioView.ts +3 -4
- package/front_end/ui/components/settings/SettingCheckbox.ts +2 -0
- package/front_end/ui/legacy/UIUtils.ts +5 -5
- package/front_end/ui/legacy/Widget.ts +33 -2
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -3
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +8 -8
- package/front_end/ui/visual_logging/Debugging.ts +0 -32
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ import * as ApplicationComponents from './components/components.js';
|
|
|
22
22
|
|
|
23
23
|
const {styleMap, classMap, ref} = Directives;
|
|
24
24
|
const {linkifyURL} = Components.Linkifier.Linkifier;
|
|
25
|
-
const {widgetConfig} = UI.Widget;
|
|
25
|
+
const {widget, widgetConfig} = UI.Widget;
|
|
26
26
|
|
|
27
27
|
const UIStrings = {
|
|
28
28
|
/**
|
|
@@ -1095,12 +1095,11 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
1095
1095
|
render(html`
|
|
1096
1096
|
<style>${appManifestViewStyles}</style>
|
|
1097
1097
|
<style>${UI.inspectorCommonStyles}</style>
|
|
1098
|
-
${isEmpty ?
|
|
1099
|
-
<devtools-widget .widgetConfig=${widgetConfig(UI.EmptyWidget.EmptyWidget, {
|
|
1098
|
+
${isEmpty ? widget(UI.EmptyWidget.EmptyWidget, {
|
|
1100
1099
|
header: i18nString(UIStrings.noManifestDetected),
|
|
1101
1100
|
text: i18nString(UIStrings.manifestDescription),
|
|
1102
1101
|
link: 'https://web.dev/add-manifest/' as Platform.DevToolsPath.UrlString
|
|
1103
|
-
})
|
|
1102
|
+
}) : html`
|
|
1104
1103
|
<devtools-report .data=${{reportTitle: i18nString(UIStrings.appManifest), reportUrl: url}}>
|
|
1105
1104
|
${renderErrors(warnings, errors, imageErrors, output)}
|
|
1106
1105
|
${installabilityErrors?.length ? renderInstallability(installabilityErrors) : nothing}
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
type SessionAndEvents
|
|
20
20
|
} from './DeviceBoundSessionsModel.js';
|
|
21
21
|
import deviceBoundSessionsViewStyles from './deviceBoundSessionsView.css.js';
|
|
22
|
-
const {widgetConfig} = UI.Widget;
|
|
22
|
+
const {widget, widgetConfig} = UI.Widget;
|
|
23
23
|
|
|
24
24
|
const UIStrings = {
|
|
25
25
|
/**
|
|
@@ -727,28 +727,24 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
727
727
|
if (!failedRequest) {
|
|
728
728
|
return nothing;
|
|
729
729
|
}
|
|
730
|
+
// clang-format off
|
|
730
731
|
return html`${failedRequest.requestUrl && html`
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
<devtools-widget .widgetConfig=${UI.Widget.widgetConfig(SourceFrame.JSONView.SearchableJsonView, {
|
|
748
|
-
jsonObject: tryParseJson(failedRequest.responseErrorBody),
|
|
749
|
-
})}></devtools-widget>
|
|
750
|
-
</devtools-report-value>
|
|
751
|
-
`}`;
|
|
732
|
+
<devtools-report-key>${i18nString(UIStrings.failedRequestUrl)}</devtools-report-key>
|
|
733
|
+
<devtools-report-value>${failedRequest.requestUrl}</devtools-report-value>`}
|
|
734
|
+
${failedRequest.netError && html`
|
|
735
|
+
<devtools-report-key>${i18nString(UIStrings.failedRequestNetError)}</devtools-report-key>
|
|
736
|
+
<devtools-report-value>${failedRequest.netError}</devtools-report-value>`}
|
|
737
|
+
${failedRequest.responseError !== undefined ? html`
|
|
738
|
+
<devtools-report-key>${i18nString(UIStrings.failedRequestResponseCode)}</devtools-report-key>
|
|
739
|
+
<devtools-report-value>${failedRequest.responseError}</devtools-report-value>` : nothing}
|
|
740
|
+
${failedRequest.responseErrorBody && html`
|
|
741
|
+
<devtools-report-key>${i18nString(UIStrings.failedRequestResponseBody)}</devtools-report-key>
|
|
742
|
+
<devtools-report-value>
|
|
743
|
+
${widget(SourceFrame.JSONView.SearchableJsonView, {
|
|
744
|
+
jsonObject: tryParseJson(failedRequest.responseErrorBody),
|
|
745
|
+
})}
|
|
746
|
+
</devtools-report-value>`}`;
|
|
747
|
+
// clang-format on
|
|
752
748
|
};
|
|
753
749
|
|
|
754
750
|
const creationEventDetails =
|
|
@@ -30,7 +30,7 @@ import * as ApplicationComponents from './components/components.js';
|
|
|
30
30
|
import frameDetailsReportViewStyles from './frameDetailsReportView.css.js';
|
|
31
31
|
import {OriginTrialTreeView} from './OriginTrialTreeView.js';
|
|
32
32
|
|
|
33
|
-
const {widgetConfig} = UI.Widget;
|
|
33
|
+
const {widget, widgetConfig} = UI.Widget;
|
|
34
34
|
|
|
35
35
|
const UIStrings = {
|
|
36
36
|
/**
|
|
@@ -297,11 +297,10 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
297
297
|
${renderIsolationSection(input)}
|
|
298
298
|
${renderApiAvailabilitySection(input.frame)}
|
|
299
299
|
${renderOriginTrial(input.trials)}
|
|
300
|
-
${input.permissionsPolicies ?
|
|
301
|
-
|
|
300
|
+
${input.permissionsPolicies ?
|
|
301
|
+
widget(ApplicationComponents.PermissionsPolicySection.PermissionsPolicySection, {
|
|
302
302
|
policies: input.permissionsPolicies,
|
|
303
|
-
showDetails: false})}
|
|
304
|
-
</devtools-widget>` : nothing}
|
|
303
|
+
showDetails: false}) : nothing}
|
|
305
304
|
${input.protocolMonitorExperimentEnabled ? renderAdditionalInfoSection(input.frame) : nothing}
|
|
306
305
|
</devtools-report>
|
|
307
306
|
`, target);
|
|
@@ -434,10 +433,7 @@ function renderOwnerElement(linkTargetDOMNode: SDK.DOMModel.DOMNode|null): LitTe
|
|
|
434
433
|
<devtools-report-key>${i18nString(UIStrings.ownerElement)}</devtools-report-key>
|
|
435
434
|
<devtools-report-value class="without-min-width">
|
|
436
435
|
<div class="inline-items">
|
|
437
|
-
|
|
438
|
-
node: linkTargetDOMNode
|
|
439
|
-
})}>
|
|
440
|
-
</devtools-widget>
|
|
436
|
+
${widget(PanelCommon.DOMLinkifier.DOMNodeLink, {node: linkTargetDOMNode})}
|
|
441
437
|
</div>
|
|
442
438
|
</devtools-report-value>
|
|
443
439
|
`;
|
|
@@ -454,9 +450,8 @@ function maybeRenderCreationStacktrace(stackTrace: StackTrace.StackTrace.StackTr
|
|
|
454
450
|
<devtools-report-key title=${i18nString(UIStrings.creationStackTraceExplanation)}>${
|
|
455
451
|
i18nString(UIStrings.creationStackTrace)}</devtools-report-key>
|
|
456
452
|
<devtools-report-value jslog=${VisualLogging.section('frame-creation-stack-trace')}>
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
</devtools-widget>
|
|
453
|
+
${widget(Components.JSPresentationUtils.StackTracePreviewContent,
|
|
454
|
+
{stackTrace, options: {expandable: true}})}
|
|
460
455
|
</devtools-report-value>
|
|
461
456
|
`;
|
|
462
457
|
// clang-format on
|
|
@@ -524,9 +519,8 @@ function maybeRenderCreatorAdScriptAncestry(
|
|
|
524
519
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
525
520
|
// clang-format off
|
|
526
521
|
return html`<div>
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
</devtools-widget>
|
|
522
|
+
${widget(Components.Linkifier.ScriptLocationLink,
|
|
523
|
+
{target, scriptId: adScriptId.scriptId, options: {jslogContext: 'ad-script'}})}
|
|
530
524
|
</div>`;
|
|
531
525
|
// clang-format on
|
|
532
526
|
});
|
|
@@ -16,7 +16,7 @@ import originTrialTokenRowsStyles from './originTrialTokenRows.css.js';
|
|
|
16
16
|
import originTrialTreeViewStyles from './originTrialTreeView.css.js';
|
|
17
17
|
|
|
18
18
|
const {classMap} = Directives;
|
|
19
|
-
const {
|
|
19
|
+
const {widget} = UI.Widget;
|
|
20
20
|
|
|
21
21
|
const UIStrings = {
|
|
22
22
|
/**
|
|
@@ -131,8 +131,7 @@ interface TokenField {
|
|
|
131
131
|
function renderTokenDetails(token: Protocol.Page.OriginTrialTokenWithStatus): TemplateResult {
|
|
132
132
|
return html`
|
|
133
133
|
<li role="treeitem">
|
|
134
|
-
|
|
135
|
-
</devtools-widget>
|
|
134
|
+
${widget(OriginTrialTokenRows, {data: token})}
|
|
136
135
|
</li>`;
|
|
137
136
|
}
|
|
138
137
|
|
|
@@ -13,7 +13,7 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
|
13
13
|
|
|
14
14
|
import * as ApplicationComponents from './components/components.js';
|
|
15
15
|
|
|
16
|
-
const {widgetConfig} = UI.Widget;
|
|
16
|
+
const {widget, widgetConfig} = UI.Widget;
|
|
17
17
|
|
|
18
18
|
const UIStrings = {
|
|
19
19
|
/**
|
|
@@ -66,34 +66,30 @@ export const DEFAULT_VIEW = (input: ViewInput, output: undefined, target: HTMLEl
|
|
|
66
66
|
${input.hasReports ? html`
|
|
67
67
|
<devtools-split-view slot="main" sidebar-position="second" sidebar-initial-size="150">
|
|
68
68
|
<div slot="main">
|
|
69
|
-
|
|
69
|
+
${widget(ApplicationComponents.ReportsGrid.ReportsGrid, {
|
|
70
70
|
reports: input.reports, onReportSelected: input.onReportSelected,
|
|
71
|
-
})}
|
|
71
|
+
})}
|
|
72
72
|
</div>
|
|
73
73
|
<div slot="sidebar" class="vbox" jslog=${VisualLogging.pane('preview').track({resize: true})}>
|
|
74
|
-
${input.focusedReport
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
header: i18nString(UIStrings.noReportSelected),
|
|
81
|
-
text: i18nString(UIStrings.clickToDisplayBody),
|
|
82
|
-
})}></devtools-widget>
|
|
83
|
-
`}
|
|
74
|
+
${input.focusedReport
|
|
75
|
+
? widget(SourceFrame.JSONView.SearchableJsonView, {jsonObject: input.focusedReport.body})
|
|
76
|
+
: widget(UI.EmptyWidget.EmptyWidget, {
|
|
77
|
+
header: i18nString(UIStrings.noReportSelected),
|
|
78
|
+
text: i18nString(UIStrings.clickToDisplayBody),
|
|
79
|
+
})}
|
|
84
80
|
</div>
|
|
85
81
|
</devtools-split-view>
|
|
86
82
|
` : html`
|
|
87
83
|
<div slot="main">
|
|
88
|
-
|
|
84
|
+
${widget(ApplicationComponents.ReportsGrid.ReportsGrid, {
|
|
89
85
|
reports: input.reports, onReportSelected: input.onReportSelected,
|
|
90
|
-
})}
|
|
86
|
+
})}
|
|
91
87
|
</div>
|
|
92
88
|
`}
|
|
93
89
|
<div slot="sidebar">
|
|
94
|
-
|
|
90
|
+
${widget(ApplicationComponents.EndpointsGrid.EndpointsGrid, {
|
|
95
91
|
endpoints: input.endpoints,
|
|
96
|
-
})}
|
|
92
|
+
})}
|
|
97
93
|
</div>
|
|
98
94
|
</devtools-split-view>
|
|
99
95
|
`, target);
|
|
@@ -178,7 +178,7 @@ export class ServiceWorkerCacheView extends UI.View.SimpleView {
|
|
|
178
178
|
this.dataGrid = this.createDataGrid();
|
|
179
179
|
const dataGridWidget = this.dataGrid.asWidget();
|
|
180
180
|
this.splitWidget.setSidebarWidget(dataGridWidget);
|
|
181
|
-
dataGridWidget.setMinimumSize(0,
|
|
181
|
+
dataGridWidget.setMinimumSize(0, 100);
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
override wasShown(): void {
|
|
@@ -147,7 +147,7 @@ const UIStrings = {
|
|
|
147
147
|
|
|
148
148
|
const str_ = i18n.i18n.registerUIStrings('panels/application/components/BackForwardCacheView.ts', UIStrings);
|
|
149
149
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
150
|
-
const {
|
|
150
|
+
const {widget} = UI.Widget;
|
|
151
151
|
|
|
152
152
|
const enum ScreenStatusType {
|
|
153
153
|
RUNNING = 'Running',
|
|
@@ -387,7 +387,7 @@ function maybeRenderJavaScriptDetails(details: Protocol.Page.BackForwardCacheBlo
|
|
|
387
387
|
const maxLengthForDisplayedURLs = 50;
|
|
388
388
|
const rows = [html`<div>${i18nString(UIStrings.filesPerIssue, {n: details.length})}</div>`];
|
|
389
389
|
rows.push(...details.map(detail => html`
|
|
390
|
-
|
|
390
|
+
${widget(Components.Linkifier.ScriptLocationLink, {
|
|
391
391
|
sourceURL: detail.url as Platform.DevToolsPath.UrlString,
|
|
392
392
|
lineNumber: detail.lineNumber,
|
|
393
393
|
options: {
|
|
@@ -396,7 +396,7 @@ function maybeRenderJavaScriptDetails(details: Protocol.Page.BackForwardCacheBlo
|
|
|
396
396
|
inlineFrameIndex: 0,
|
|
397
397
|
maxLength: maxLengthForDisplayedURLs,
|
|
398
398
|
}
|
|
399
|
-
})}
|
|
399
|
+
})}`));
|
|
400
400
|
return html`
|
|
401
401
|
<div class="details-list">
|
|
402
402
|
<devtools-expandable-list .data=${
|
|
@@ -134,7 +134,7 @@ const UIStrings = {
|
|
|
134
134
|
const str_ = i18n.i18n.registerUIStrings('panels/application/preloading/components/UsedPreloadingView.ts', UIStrings);
|
|
135
135
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
136
136
|
|
|
137
|
-
const {
|
|
137
|
+
const {widget} = UI.Widget;
|
|
138
138
|
|
|
139
139
|
export interface UsedPreloadingViewData {
|
|
140
140
|
pageURL: Platform.DevToolsPath.UrlString;
|
|
@@ -270,8 +270,7 @@ function renderMismatchedSections(data: MismatchedData): LitTemplate {
|
|
|
270
270
|
${i18nString(UIStrings.preloadedURLs)}
|
|
271
271
|
</devtools-report-section-header>
|
|
272
272
|
<devtools-report-section jslog=${VisualLogging.section('preloaded-urls')}>
|
|
273
|
-
|
|
274
|
-
</devtools-widget>
|
|
273
|
+
${widget(MismatchedPreloadingGrid, {data})}
|
|
275
274
|
</devtools-report-section>`;
|
|
276
275
|
// clang-format on
|
|
277
276
|
}
|
|
@@ -107,6 +107,7 @@ const DOM_BREAKPOINT_DOCUMENTATION_URL =
|
|
|
107
107
|
'https://developer.chrome.com/docs/devtools/javascript/breakpoints#dom' as Platform.DevToolsPath.UrlString;
|
|
108
108
|
|
|
109
109
|
const {html, render, Directives} = Lit;
|
|
110
|
+
const {widget} = UI.Widget;
|
|
110
111
|
|
|
111
112
|
export interface Breakpoint {
|
|
112
113
|
breakpoint: SDK.DOMDebuggerModel.DOMBreakpoint;
|
|
@@ -169,11 +170,11 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
169
170
|
</ul>` : html
|
|
170
171
|
`<div class="placeholder">
|
|
171
172
|
<div class="gray-info-message">${i18nString(UIStrings.noBreakpoints)}</div>
|
|
172
|
-
|
|
173
|
+
${widget(UI.EmptyWidget.EmptyWidget, {
|
|
173
174
|
header: i18nString(UIStrings.noBreakpoints),
|
|
174
175
|
text: i18nString(UIStrings.domBreakpointsDescription),
|
|
175
176
|
link: DOM_BREAKPOINT_DOCUMENTATION_URL,
|
|
176
|
-
})}
|
|
177
|
+
})}
|
|
177
178
|
</div>`}
|
|
178
179
|
</div>
|
|
179
180
|
`,
|
|
@@ -34,6 +34,8 @@ const UIStrings = {
|
|
|
34
34
|
const str_ = i18n.i18n.registerUIStrings('panels/changes/ChangesView.ts', UIStrings);
|
|
35
35
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
36
36
|
const {render, html} = Lit;
|
|
37
|
+
const {widget} = UI.Widget;
|
|
38
|
+
|
|
37
39
|
interface ViewInput {
|
|
38
40
|
selectedSourceCode: Workspace.UISourceCode.UISourceCode|null;
|
|
39
41
|
onSelect(sourceCode: Workspace.UISourceCode.UISourceCode|null): void;
|
|
@@ -63,10 +65,10 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
63
65
|
})}>
|
|
64
66
|
</devtools-widget>
|
|
65
67
|
<div class=diff-container role=tabpanel ?hidden=${input.workspaceDiff.modifiedUISourceCodes().length === 0}>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
${widget(CombinedDiffView.CombinedDiffView, {
|
|
69
|
+
selectedFileUrl: input.selectedSourceCode?.url(),
|
|
70
|
+
workspaceDiff: input.workspaceDiff
|
|
71
|
+
})}
|
|
70
72
|
</div>
|
|
71
73
|
${hasCopyToPrompt ? html`
|
|
72
74
|
<devtools-widget class="copy-to-prompt"
|
|
@@ -1574,6 +1574,21 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
1574
1574
|
return this.status.E_FAILED('Permission denied');
|
|
1575
1575
|
}
|
|
1576
1576
|
|
|
1577
|
+
try {
|
|
1578
|
+
const parsedUrl = new URL(frame.url);
|
|
1579
|
+
let targetType = Host.UserMetrics.ExtensionEvalTarget.WEB_PAGE;
|
|
1580
|
+
if (parsedUrl.protocol === 'chrome-extension:') {
|
|
1581
|
+
if (parsedUrl.origin === securityOrigin) {
|
|
1582
|
+
targetType = Host.UserMetrics.ExtensionEvalTarget.SAME_EXTENSION;
|
|
1583
|
+
} else {
|
|
1584
|
+
targetType = Host.UserMetrics.ExtensionEvalTarget.OTHER_EXTENSION;
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
Host.userMetrics.extensionEvalTarget(targetType);
|
|
1588
|
+
} catch {
|
|
1589
|
+
// Ignore invalid URLs.
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1577
1592
|
void context
|
|
1578
1593
|
.evaluate(
|
|
1579
1594
|
{
|
|
@@ -20,6 +20,7 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
|
20
20
|
import consolePinPaneStyles from './consolePinPane.css.js';
|
|
21
21
|
|
|
22
22
|
const {createRef, ref} = Directives;
|
|
23
|
+
const {widget} = UI.Widget;
|
|
23
24
|
|
|
24
25
|
const UIStrings = {
|
|
25
26
|
/**
|
|
@@ -71,12 +72,11 @@ export const DEFAULT_PANE_VIEW = (input: PaneViewInput, _output: object, target:
|
|
|
71
72
|
render(html`
|
|
72
73
|
<style>${consolePinPaneStyles}</style>
|
|
73
74
|
<div class='console-pins monospace' jslog=${VisualLogging.pane('console-pins')} @contextmenu=${input.onContextMenu}>
|
|
74
|
-
${input.pins.map(pin =>
|
|
75
|
-
<devtools-widget .widgetConfig=${UI.Widget.widgetConfig(ConsolePinPresenter, {
|
|
75
|
+
${input.pins.map(pin => widget(ConsolePinPresenter, {
|
|
76
76
|
pin,
|
|
77
77
|
focusOut: input.focusOut,
|
|
78
78
|
onRemove: () => input.onRemove(pin),
|
|
79
|
-
|
|
79
|
+
})
|
|
80
80
|
)}
|
|
81
81
|
</div>`, target);
|
|
82
82
|
// clang-format on
|
|
@@ -340,7 +340,7 @@ function renderItem(info: CoverageListItem, input: ViewInput): TemplateResult {
|
|
|
340
340
|
</td>
|
|
341
341
|
${info.sources.length > 0 ? html`
|
|
342
342
|
<td><table>
|
|
343
|
-
${ifExpanded(
|
|
343
|
+
${ifExpanded(html`${repeat(info.sources, source => source.url, source => renderItem(source, input))}`)}
|
|
344
344
|
</table></td>` : nothing}
|
|
345
345
|
</tr>`;
|
|
346
346
|
// clang-format on
|
|
@@ -6,7 +6,7 @@ import * as Host from '../../core/host/host.js';
|
|
|
6
6
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
7
7
|
import type * as Protocol from '../../generated/protocol.js';
|
|
8
8
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
9
|
-
import {
|
|
9
|
+
import {render} from '../../ui/lit/lit.js';
|
|
10
10
|
|
|
11
11
|
import {type ContrastIssue, CSSOverviewCompletedView, type OverviewData} from './CSSOverviewCompletedView.js';
|
|
12
12
|
import {CSSOverviewModel, type GlobalStyleStats} from './CSSOverviewModel.js';
|
|
@@ -14,7 +14,7 @@ import {CSSOverviewProcessingView} from './CSSOverviewProcessingView.js';
|
|
|
14
14
|
import {CSSOverviewStartView} from './CSSOverviewStartView.js';
|
|
15
15
|
import type {UnusedDeclaration} from './CSSOverviewUnusedDeclarations.js';
|
|
16
16
|
|
|
17
|
-
const {
|
|
17
|
+
const {widget} = UI.Widget;
|
|
18
18
|
|
|
19
19
|
interface ViewInput {
|
|
20
20
|
state: 'start'|'processing'|'completed';
|
|
@@ -28,19 +28,15 @@ interface ViewInput {
|
|
|
28
28
|
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
29
29
|
|
|
30
30
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
target: input.target,
|
|
41
|
-
})}></devtools-widget>`,
|
|
42
|
-
target);
|
|
43
|
-
// clang-format on
|
|
31
|
+
render(
|
|
32
|
+
input.state === 'start' ? widget(CSSOverviewStartView, {onStartCapture: input.onStartCapture}) :
|
|
33
|
+
input.state === 'processing' ? widget(CSSOverviewProcessingView, {onCancel: input.onCancel}) :
|
|
34
|
+
widget(CSSOverviewCompletedView, {
|
|
35
|
+
onReset: input.onReset,
|
|
36
|
+
overviewData: input.overviewData,
|
|
37
|
+
target: input.target,
|
|
38
|
+
}),
|
|
39
|
+
target);
|
|
44
40
|
};
|
|
45
41
|
|
|
46
42
|
export class CSSOverviewPanel extends UI.Panel.Panel implements SDK.TargetManager.Observer {
|
|
@@ -16,7 +16,7 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
|
16
16
|
import {DeveloperResourcesListView} from './DeveloperResourcesListView.js';
|
|
17
17
|
import developerResourcesViewStyles from './developerResourcesView.css.js';
|
|
18
18
|
|
|
19
|
-
const {
|
|
19
|
+
const {widget} = UI.Widget;
|
|
20
20
|
const {bindToSetting} = UI.UIUtils;
|
|
21
21
|
|
|
22
22
|
const UIStrings = {
|
|
@@ -98,14 +98,12 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
98
98
|
</devtools-toolbar>
|
|
99
99
|
</div>
|
|
100
100
|
<div class="developer-resource-view-results">
|
|
101
|
-
|
|
102
|
-
.widgetConfig=${widgetConfig(DeveloperResourcesListView, {
|
|
101
|
+
${widget(DeveloperResourcesListView, {
|
|
103
102
|
items: input.items,
|
|
104
103
|
selectedItem: input.selectedItem,
|
|
105
104
|
onSelect: input.onSelect,
|
|
106
105
|
filters: input.filters
|
|
107
|
-
|
|
108
|
-
</devtools-widget>
|
|
106
|
+
})}
|
|
109
107
|
</div>
|
|
110
108
|
<div class="developer-resource-view-toolbar-summary">
|
|
111
109
|
<div class="developer-resource-view-message">
|