chrome-devtools-frontend 1.0.951864 → 1.0.952784
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/front_end/.eslintrc.js +6 -0
- 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/PageResourceLoader.ts +2 -1
- 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 +202 -200
- 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/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/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/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/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/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/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/timeline/TimelineFlameChartView.ts +1 -1
- 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/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_prompt/TextPrompt.ts +18 -18
- package/front_end/ui/components/tree_outline/TreeOutline.ts +69 -70
- package/front_end/ui/legacy/SearchableView.ts +13 -4
- 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
|
@@ -89,8 +89,7 @@ export class PerformanceMonitorImpl extends UI.Widget.HBox implements
|
|
|
89
89
|
this.scaleHeight = 16;
|
|
90
90
|
/** @const */
|
|
91
91
|
this.graphHeight = 90;
|
|
92
|
-
this.gridColor = ThemeSupport.ThemeSupport.instance().
|
|
93
|
-
'rgba(0, 0, 0, 0.08)', ThemeSupport.ThemeSupport.ColorUsage.Foreground);
|
|
92
|
+
this.gridColor = ThemeSupport.ThemeSupport.instance().getComputedValue('--divider-line');
|
|
94
93
|
this.controlPane = new ControlPane(this.contentElement);
|
|
95
94
|
const chartContainer = this.contentElement.createChild('div', 'perfmon-chart-container');
|
|
96
95
|
this.canvas = chartContainer.createChild('canvas') as HTMLCanvasElement;
|
|
@@ -116,6 +115,7 @@ export class PerformanceMonitorImpl extends UI.Widget.HBox implements
|
|
|
116
115
|
return;
|
|
117
116
|
}
|
|
118
117
|
this.registerCSSFiles([performanceMonitorStyles]);
|
|
118
|
+
this.controlPane.instantiateMetricData();
|
|
119
119
|
SDK.TargetManager.TargetManager.instance().addEventListener(
|
|
120
120
|
SDK.TargetManager.Events.SuspendStateChanged, this.suspendStateChanged, this);
|
|
121
121
|
this.model.enable();
|
|
@@ -220,11 +220,9 @@ export class PerformanceMonitorImpl extends UI.Widget.HBox implements
|
|
|
220
220
|
|
|
221
221
|
private drawHorizontalGrid(ctx: CanvasRenderingContext2D): void {
|
|
222
222
|
const labelDistanceSeconds = 10;
|
|
223
|
-
const lightGray = ThemeSupport.ThemeSupport.instance().
|
|
224
|
-
'rgba(0, 0, 0, 0.02)', ThemeSupport.ThemeSupport.ColorUsage.Foreground);
|
|
223
|
+
const lightGray = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-inverted-opacity-2');
|
|
225
224
|
ctx.font = '10px ' + Host.Platform.fontFamily();
|
|
226
|
-
ctx.fillStyle = ThemeSupport.ThemeSupport.instance().
|
|
227
|
-
'rgba(0, 0, 0, 0.55)', ThemeSupport.ThemeSupport.ColorUsage.Foreground);
|
|
225
|
+
ctx.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-inverted-opacity-50');
|
|
228
226
|
const currentTime = Date.now() / 1000;
|
|
229
227
|
for (let sec = Math.ceil(currentTime);; --sec) {
|
|
230
228
|
const x = this.width - ((currentTime - sec) * 1000 - this.pollIntervalMs) * this.pixelsPerMs;
|
|
@@ -277,8 +275,7 @@ export class PerformanceMonitorImpl extends UI.Widget.HBox implements
|
|
|
277
275
|
ctx.restore();
|
|
278
276
|
}
|
|
279
277
|
}
|
|
280
|
-
ctx.fillStyle = ThemeSupport.ThemeSupport.instance().
|
|
281
|
-
'rgba(0, 0, 0, 0.55)', ThemeSupport.ThemeSupport.ColorUsage.Foreground);
|
|
278
|
+
ctx.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-inverted-opacity-50');
|
|
282
279
|
ctx.font = `10px ${Host.Platform.fontFamily()}`;
|
|
283
280
|
ctx.fillText(chartInfo.title, 8, 10);
|
|
284
281
|
this.drawVerticalGrid(ctx, height - bottomPadding, max, chartInfo);
|
|
@@ -327,8 +324,7 @@ export class PerformanceMonitorImpl extends UI.Widget.HBox implements
|
|
|
327
324
|
const span = max;
|
|
328
325
|
const topPadding = 18;
|
|
329
326
|
const visibleHeight = height - topPadding;
|
|
330
|
-
ctx.fillStyle = ThemeSupport.ThemeSupport.instance().
|
|
331
|
-
'rgba(0, 0, 0, 0.55)', ThemeSupport.ThemeSupport.ColorUsage.Foreground);
|
|
327
|
+
ctx.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-inverted-opacity-50');
|
|
332
328
|
ctx.strokeStyle = this.gridColor;
|
|
333
329
|
ctx.beginPath();
|
|
334
330
|
for (let i = 0; i < 2; ++i) {
|
|
@@ -345,8 +341,7 @@ export class PerformanceMonitorImpl extends UI.Widget.HBox implements
|
|
|
345
341
|
ctx.beginPath();
|
|
346
342
|
ctx.moveTo(0, height + 0.5);
|
|
347
343
|
ctx.lineTo(this.width, height + 0.5);
|
|
348
|
-
ctx.strokeStyle = ThemeSupport.ThemeSupport.instance().
|
|
349
|
-
'rgba(0, 0, 0, 0.2)', ThemeSupport.ThemeSupport.ColorUsage.Foreground);
|
|
344
|
+
ctx.strokeStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-inverted-opacity-2');
|
|
350
345
|
ctx.stroke();
|
|
351
346
|
function calcY(value: number): number {
|
|
352
347
|
return Math.round(height - visibleHeight * value / span) + 0.5;
|
|
@@ -443,8 +438,9 @@ export class ControlPane extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
443
438
|
element: Element;
|
|
444
439
|
private readonly enabledChartsSetting: Common.Settings.Setting<string[]>;
|
|
445
440
|
private readonly enabledCharts: Set<string>;
|
|
446
|
-
|
|
447
|
-
private
|
|
441
|
+
|
|
442
|
+
private chartsInfo: ChartInfo[] = [];
|
|
443
|
+
private indicators: Map<string, MetricIndicator> = new Map();
|
|
448
444
|
|
|
449
445
|
constructor(parent: Element) {
|
|
450
446
|
super();
|
|
@@ -453,7 +449,9 @@ export class ControlPane extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
453
449
|
this.enabledChartsSetting = Common.Settings.Settings.instance().createSetting(
|
|
454
450
|
'perfmonActiveIndicators2', ['TaskDuration', 'JSHeapTotalSize', 'Nodes']);
|
|
455
451
|
this.enabledCharts = new Set(this.enabledChartsSetting.get());
|
|
452
|
+
}
|
|
456
453
|
|
|
454
|
+
instantiateMetricData(): void {
|
|
457
455
|
const defaults = {
|
|
458
456
|
color: undefined,
|
|
459
457
|
format: undefined,
|
|
@@ -463,55 +461,112 @@ export class ControlPane extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
463
461
|
stacked: undefined,
|
|
464
462
|
};
|
|
465
463
|
|
|
464
|
+
// Get ThemeSupport instance here just to make things a little less verbose.
|
|
465
|
+
const themeSupport = ThemeSupport.ThemeSupport.instance();
|
|
466
466
|
this.chartsInfo = [
|
|
467
467
|
{
|
|
468
468
|
...defaults,
|
|
469
469
|
title: i18nString(UIStrings.cpuUsage),
|
|
470
470
|
metrics: [
|
|
471
|
-
{
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
471
|
+
{
|
|
472
|
+
name: 'TaskDuration',
|
|
473
|
+
color: themeSupport.getComputedValue('--override-color-perf-monitor-cpu-task-duration', this.element),
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
name: 'ScriptDuration',
|
|
477
|
+
color: themeSupport.getComputedValue('--override-color-perf-monitor-cpu-script-duration', this.element),
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
name: 'LayoutDuration',
|
|
481
|
+
color: themeSupport.getComputedValue('--override-color-perf-monitor-cpu-layout-duration', this.element),
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
name: 'RecalcStyleDuration',
|
|
485
|
+
color:
|
|
486
|
+
themeSupport.getComputedValue('--override-color-perf-monitor-cpu-recalc-style-duration', this.element),
|
|
487
|
+
},
|
|
475
488
|
],
|
|
476
489
|
format: Format.Percent,
|
|
477
490
|
smooth: true,
|
|
478
491
|
stacked: true,
|
|
479
|
-
color: '
|
|
492
|
+
color: themeSupport.getComputedValue('--override-color-perf-monitor-cpu', this.element),
|
|
480
493
|
max: 1,
|
|
481
494
|
currentMax: undefined,
|
|
482
495
|
},
|
|
483
496
|
{
|
|
484
497
|
...defaults,
|
|
485
498
|
title: i18nString(UIStrings.jsHeapSize),
|
|
486
|
-
metrics: [
|
|
499
|
+
metrics: [
|
|
500
|
+
{
|
|
501
|
+
name: 'JSHeapTotalSize',
|
|
502
|
+
color: themeSupport.getComputedValue('--override-color-perf-monitor-jsheap-total-size', this.element),
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
name: 'JSHeapUsedSize',
|
|
506
|
+
color: themeSupport.getComputedValue('--override-color-perf-monitor-jsheap-used-size', this.element),
|
|
507
|
+
},
|
|
508
|
+
],
|
|
487
509
|
format: Format.Bytes,
|
|
488
|
-
color: '
|
|
510
|
+
color: themeSupport.getComputedValue('--override-color-perf-monitor-jsheap'),
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
...defaults,
|
|
514
|
+
title: i18nString(UIStrings.domNodes),
|
|
515
|
+
metrics: [
|
|
516
|
+
{
|
|
517
|
+
name: 'Nodes',
|
|
518
|
+
color: themeSupport.getComputedValue('--override-color-perf-monitor-dom-nodes', this.element),
|
|
519
|
+
},
|
|
520
|
+
],
|
|
489
521
|
},
|
|
490
|
-
{...defaults, title: i18nString(UIStrings.domNodes), metrics: [{name: 'Nodes', color: 'green'}]},
|
|
491
522
|
{
|
|
492
523
|
...defaults,
|
|
493
524
|
title: i18nString(UIStrings.jsEventListeners),
|
|
494
|
-
metrics: [
|
|
525
|
+
metrics: [
|
|
526
|
+
{
|
|
527
|
+
name: 'JSEventListeners',
|
|
528
|
+
color: themeSupport.getComputedValue('--override-color-perf-monitor-js-event-listeners', this.element),
|
|
529
|
+
},
|
|
530
|
+
],
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
...defaults,
|
|
534
|
+
title: i18nString(UIStrings.documents),
|
|
535
|
+
metrics: [{
|
|
536
|
+
name: 'Documents',
|
|
537
|
+
color: themeSupport.getComputedValue('--override-color-perf-monitor-documents', this.element),
|
|
538
|
+
}],
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
...defaults,
|
|
542
|
+
title: i18nString(UIStrings.documentFrames),
|
|
543
|
+
metrics: [{
|
|
544
|
+
name: 'Frames',
|
|
545
|
+
color: themeSupport.getComputedValue('--override-color-perf-monitor-document-frames', this.element),
|
|
546
|
+
}],
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
...defaults,
|
|
550
|
+
title: i18nString(UIStrings.layoutsSec),
|
|
551
|
+
metrics: [{
|
|
552
|
+
name: 'LayoutCount',
|
|
553
|
+
color: themeSupport.getComputedValue('--override-color-perf-monitor-layout-count', this.element),
|
|
554
|
+
}],
|
|
495
555
|
},
|
|
496
|
-
{...defaults, title: i18nString(UIStrings.documents), metrics: [{name: 'Documents', color: 'darkblue'}]},
|
|
497
|
-
{...defaults, title: i18nString(UIStrings.documentFrames), metrics: [{name: 'Frames', color: 'darkcyan'}]},
|
|
498
|
-
{...defaults, title: i18nString(UIStrings.layoutsSec), metrics: [{name: 'LayoutCount', color: 'hotpink'}]},
|
|
499
556
|
{
|
|
500
557
|
...defaults,
|
|
501
558
|
title: i18nString(UIStrings.styleRecalcsSec),
|
|
502
|
-
metrics: [
|
|
559
|
+
metrics: [
|
|
560
|
+
{
|
|
561
|
+
name: 'RecalcStyleCount',
|
|
562
|
+
color: themeSupport.getComputedValue('--override-color-perf-monitor-recalc-style-count', this.element),
|
|
563
|
+
},
|
|
564
|
+
],
|
|
503
565
|
},
|
|
504
566
|
];
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
info.color, ThemeSupport.ThemeSupport.ColorUsage.Foreground);
|
|
509
|
-
}
|
|
510
|
-
for (const metric of info.metrics) {
|
|
511
|
-
metric.color = ThemeSupport.ThemeSupport.instance().patchColorText(
|
|
512
|
-
metric.color, ThemeSupport.ThemeSupport.ColorUsage.Foreground);
|
|
513
|
-
}
|
|
514
|
-
}
|
|
567
|
+
|
|
568
|
+
// Clear any existing child elements.
|
|
569
|
+
this.element.removeChildren();
|
|
515
570
|
|
|
516
571
|
this.indicators = new Map();
|
|
517
572
|
for (const chartInfo of this.chartsInfo) {
|
|
@@ -6,6 +6,38 @@
|
|
|
6
6
|
|
|
7
7
|
.perfmon-pane {
|
|
8
8
|
overflow: hidden;
|
|
9
|
+
|
|
10
|
+
--override-color-perf-monitor-cpu: rgb(227 33 33);
|
|
11
|
+
--override-color-perf-monitor-cpu-task-duration: rgb(154 154 154);
|
|
12
|
+
--override-color-perf-monitor-cpu-script-duration: rgb(255 165 0);
|
|
13
|
+
--override-color-perf-monitor-cpu-layout-duration: rgb(138 43 226);
|
|
14
|
+
--override-color-perf-monitor-cpu-recalc-style-duration: rgb(238 130 238);
|
|
15
|
+
--override-color-perf-monitor-jsheap: rgb(0 0 255);
|
|
16
|
+
--override-color-perf-monitor-jsheap-total-size: rgb(153 153 255);
|
|
17
|
+
--override-color-perf-monitor-jsheap-used-size: rgb(0 0 255);
|
|
18
|
+
--override-color-perf-monitor-dom-nodes: rgb(11 154 11);
|
|
19
|
+
--override-color-perf-monitor-js-event-listeners: rgb(154 205 50);
|
|
20
|
+
--override-color-perf-monitor-documents: rgb(0 0 139);
|
|
21
|
+
--override-color-perf-monitor-document-frames: rgb(0 139 139);
|
|
22
|
+
--override-color-perf-monitor-layout-count: rgb(255 105 180);
|
|
23
|
+
--override-color-perf-monitor-recalc-style-count: rgb(255 20 147);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:host-context(.-theme-with-dark-background) .perfmon-pane {
|
|
27
|
+
--override-color-perf-monitor-cpu: rgb(242 113 113);
|
|
28
|
+
--override-color-perf-monitor-cpu-task-duration: rgb(201 201 201);
|
|
29
|
+
--override-color-perf-monitor-cpu-script-duration: rgb(255 165 0);
|
|
30
|
+
--override-color-perf-monitor-cpu-layout-duration: rgb(124 29 212);
|
|
31
|
+
--override-color-perf-monitor-cpu-recalc-style-duration: rgb(179 49 179);
|
|
32
|
+
--override-color-perf-monitor-jsheap: rgb(153 153 255);
|
|
33
|
+
--override-color-perf-monitor-jsheap-total-size: rgb(153 153 255);
|
|
34
|
+
--override-color-perf-monitor-jsheap-used-size: rgb(0 0 255);
|
|
35
|
+
--override-color-perf-monitor-dom-nodes: rgb(127 255 127);
|
|
36
|
+
--override-color-perf-monitor-js-event-listeners: rgb(154 205 50);
|
|
37
|
+
--override-color-perf-monitor-documents: rgb(116 116 255);
|
|
38
|
+
--override-color-perf-monitor-document-frames: rgb(116 255 255);
|
|
39
|
+
--override-color-perf-monitor-layout-count: rgb(255 105 180);
|
|
40
|
+
--override-color-perf-monitor-recalc-style-count: rgb(235 0 127);
|
|
9
41
|
}
|
|
10
42
|
|
|
11
43
|
.perfmon-pane.suspended {
|
|
@@ -398,7 +398,7 @@ export class ProtocolMonitorImpl extends UI.Widget.VBox {
|
|
|
398
398
|
responseIcon.data = {iconName: 'ic_response', color: 'var(--color-text-disabled)', width: '16px', height: '16px'};
|
|
399
399
|
const newRow: DataGrid.DataGridUtils.Row = {
|
|
400
400
|
cells: [
|
|
401
|
-
{columnId: 'method', value: message.method},
|
|
401
|
+
{columnId: 'method', value: message.method, title: message.method},
|
|
402
402
|
{columnId: 'request', value: '', renderer: DataGrid.DataGridRenderers.codeBlockRenderer},
|
|
403
403
|
{
|
|
404
404
|
columnId: 'response',
|
|
@@ -439,7 +439,7 @@ export class ProtocolMonitorImpl extends UI.Widget.VBox {
|
|
|
439
439
|
'--override-data-grid-row-background-color': 'var(--override-data-grid-sent-message-row-background-color)',
|
|
440
440
|
},
|
|
441
441
|
cells: [
|
|
442
|
-
{columnId: 'method', value: message.method},
|
|
442
|
+
{columnId: 'method', value: message.method, title: message.method},
|
|
443
443
|
{
|
|
444
444
|
columnId: 'request',
|
|
445
445
|
value: JSON.stringify(message.params),
|
|
@@ -44,40 +44,40 @@ export interface SyncSectionData {
|
|
|
44
44
|
|
|
45
45
|
export class SyncSection extends HTMLElement {
|
|
46
46
|
static readonly litTagName = LitHtml.literal`devtools-sync-section`;
|
|
47
|
-
|
|
47
|
+
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
#syncInfo: Host.InspectorFrontendHostAPI.SyncInformation = {isSyncActive: false};
|
|
50
|
+
#syncSetting?: Common.Settings.Setting<boolean>;
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
#boundRender = this.#render.bind(this);
|
|
53
53
|
|
|
54
54
|
connectedCallback(): void {
|
|
55
|
-
this
|
|
55
|
+
this.#shadow.adoptedStyleSheets = [syncSectionStyles];
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
set data(data: SyncSectionData) {
|
|
59
|
-
this
|
|
60
|
-
this
|
|
61
|
-
ComponentHelpers.ScheduledRender.scheduleRender(this, this
|
|
59
|
+
this.#syncInfo = data.syncInfo;
|
|
60
|
+
this.#syncSetting = data.syncSetting;
|
|
61
|
+
ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
if (!this
|
|
64
|
+
#render(): void {
|
|
65
|
+
if (!this.#syncSetting) {
|
|
66
66
|
throw new Error('SyncSection not properly initialized');
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
const checkboxDisabled = !this
|
|
69
|
+
const checkboxDisabled = !this.#syncInfo.isSyncActive || !this.#syncInfo.arePreferencesSynced;
|
|
70
70
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
71
71
|
// clang-format off
|
|
72
72
|
LitHtml.render(LitHtml.html`
|
|
73
73
|
<fieldset>
|
|
74
74
|
<legend>${Common.Settings.getLocalizedSettingsCategory(Common.Settings.SettingCategory.SYNC)}</legend>
|
|
75
|
-
${renderAccountInfoOrWarning(this
|
|
75
|
+
${renderAccountInfoOrWarning(this.#syncInfo)}
|
|
76
76
|
<${Settings.SettingCheckbox.SettingCheckbox.litTagName} .data=${
|
|
77
|
-
{setting: this
|
|
77
|
+
{setting: this.#syncSetting, disabled: checkboxDisabled} as Settings.SettingCheckbox.SettingCheckboxData}>
|
|
78
78
|
</${Settings.SettingCheckbox.SettingCheckbox.litTagName}>
|
|
79
79
|
</fieldset>
|
|
80
|
-
`, this
|
|
80
|
+
`, this.#shadow, {host: this});
|
|
81
81
|
// clang-format on
|
|
82
82
|
}
|
|
83
83
|
}
|