chrome-devtools-frontend 1.0.1732418 → 1.0.1733843
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/get_the_code.md +1 -73
- package/front_end/Tests.js +0 -5
- package/front_end/core/host/AidaClientTypes.ts +24 -3
- package/front_end/core/host/AidaGcaTranslation.ts +29 -1
- package/front_end/core/platform/browser/HostRuntime.ts +5 -1
- package/front_end/core/sdk/DOMModel.ts +8 -3
- package/front_end/design_system_tokens.css +5 -0
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +2 -2
- package/front_end/generated/InspectorBackendCommands.ts +5 -5
- package/front_end/generated/SupportedCSSProperties.ts +8 -2
- package/front_end/generated/protocol.ts +29 -7
- package/front_end/models/ai-utils/debug.ts +127 -22
- package/front_end/models/ai_assistance/AiConversation.ts +1 -0
- package/front_end/models/ai_assistance/README.md +1 -1
- package/front_end/models/ai_assistance/agents/AiAgent.ts +69 -11
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -1
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +4 -3
- package/front_end/models/ai_assistance/contexts/LighthouseContext.snapshot.txt +4 -2
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +6 -0
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +2 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +26 -26
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +2 -1
- package/front_end/models/ai_code_completion/ai_code_completion.ts +11 -2
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +2 -1
- package/front_end/models/ai_code_generation/ai_code_generation.ts +11 -2
- package/front_end/models/trace/LanternComputationData.ts +4 -0
- package/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +126 -1
- package/front_end/models/trace/lantern/types/Lantern.ts +3 -0
- package/front_end/models/web_mcp/WebMCPModel.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +65 -15
- package/front_end/panels/ai_assistance/ExternalHandler.ts +1 -1
- package/front_end/panels/ai_assistance/components/PermissionPrompt.ts +4 -4
- package/front_end/panels/ai_assistance/components/chatMessage.css +4 -5
- package/front_end/panels/ai_assistance/components/exploreWidget.css +3 -3
- package/front_end/panels/application/backgroundServiceView.css +2 -2
- package/front_end/panels/application/components/reportsGrid.css +1 -1
- package/front_end/panels/application/components/serviceWorkerRouterView.css +2 -2
- package/front_end/panels/application/components/trustTokensView.css +1 -1
- package/front_end/panels/application/deviceBoundSessionsView.css +1 -1
- package/front_end/panels/application/frameDetailsReportView.css +0 -4
- package/front_end/panels/application/indexedDBViews.css +0 -4
- package/front_end/panels/application/resourcesPanel.css +0 -13
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +3 -3
- package/front_end/panels/application/serviceWorkersView.css +3 -2
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +346 -286
- package/front_end/panels/comments/CommentsPane.ts +2 -11
- package/front_end/panels/common/CommentThreadWidget.ts +11 -3
- package/front_end/panels/common/CommentsOverlayWidget.ts +3 -2
- package/front_end/panels/console/consoleContextSelector.css +1 -1
- package/front_end/panels/console/consolePinPane.css +1 -1
- package/front_end/panels/console/consolePrompt.css +4 -2
- package/front_end/panels/console/consoleView.css +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +8 -19
- package/front_end/panels/elements/PropertyRenderer.ts +7 -27
- package/front_end/panels/elements/StylePropertyTreeElement.ts +61 -72
- package/front_end/panels/elements/components/cssPropertyDocsView.css +1 -1
- package/front_end/panels/elements/components/elementsBreadcrumbs.css +1 -1
- package/front_end/panels/elements/components/stylePropertyEditor.css +1 -5
- package/front_end/panels/elements/layoutPane.css +1 -1
- package/front_end/panels/elements/metricsSidebarPane.css +2 -2
- package/front_end/panels/elements/propertiesWidget.css +0 -5
- package/front_end/panels/elements/stylesSidebarPane.css +3 -2
- package/front_end/panels/emulation/deviceModeView.css +3 -3
- package/front_end/panels/event_listeners/eventListenersView.css +1 -1
- package/front_end/panels/explain/components/consoleInsight.css +2 -2
- package/front_end/panels/issues/issuesTree.css +10 -7
- package/front_end/panels/layer_viewer/layerTreeOutline.css +1 -1
- package/front_end/panels/lighthouse/LighthousePanel.ts +16 -1
- package/front_end/panels/lighthouse/lighthousePanel.css +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +10 -6
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +1 -26
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +1 -1
- package/front_end/panels/media/playerListView.css +11 -8
- package/front_end/panels/media/playerMessagesView.css +9 -5
- package/front_end/panels/network/NetworkWaterfallColumn.ts +92 -55
- package/front_end/panels/network/networkConfigView.css +3 -3
- package/front_end/panels/network/networkLogView.css +5 -4
- package/front_end/panels/network/networkManageCustomHeadersView.css +1 -1
- package/front_end/panels/network/networkTimingTable.css +4 -8
- package/front_end/panels/network/requestPayloadView.css +1 -1
- package/front_end/panels/performance_monitor/performanceMonitor.css +1 -1
- package/front_end/panels/profiler/ModuleUIStrings.ts +12 -0
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +114 -18
- package/front_end/panels/protocol_monitor/JSONEditor.css +4 -3
- package/front_end/panels/recorder/createRecordingView.css +2 -2
- package/front_end/panels/recorder/stepEditor.css +1 -1
- package/front_end/panels/recorder/stepView.css +0 -7
- package/front_end/panels/recorder/timelineSection.css +1 -1
- package/front_end/panels/screencast/screencastView.css +1 -1
- package/front_end/panels/search/searchResultsPane.css +1 -1
- package/front_end/panels/security/mainView.css +2 -2
- package/front_end/panels/security/originView.css +1 -1
- package/front_end/panels/settings/AISettingsTab.ts +1 -0
- package/front_end/panels/sources/NavigatorView.ts +120 -49
- package/front_end/panels/sources/breakpointsView.css +3 -3
- package/front_end/panels/sources/components/HeadersView.css +2 -2
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +2 -1
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +30 -10
- package/front_end/panels/timeline/TimelinePanel.ts +24 -3
- package/front_end/panels/timeline/components/metricCard.css +1 -1
- package/front_end/panels/timeline/components/networkRequestTooltip.css +2 -2
- package/front_end/panels/timeline/components/relatedInsightChips.css +1 -1
- package/front_end/panels/timeline/timelineFlameChartView.css +4 -4
- package/front_end/panels/timeline/timelineFlamechartPopover.css +2 -2
- package/front_end/panels/timeline/timelineMiniMap.css +3 -2
- package/front_end/panels/web_audio/WebAudioModel.ts +14 -5
- package/front_end/panels/web_audio/WebAudioView.ts +34 -1
- package/front_end/panels/web_audio/webAudio.css +17 -3
- package/front_end/panels/webauthn/webauthnPane.css +2 -4
- package/front_end/panels/whats_new/ReleaseNoteText.ts +19 -1
- package/front_end/panels/whats_new/ReleaseNoteView.ts +15 -1
- package/front_end/panels/whats_new/releaseNoteView.css +49 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer-replay/README.chromium +9 -1
- package/front_end/third_party/puppeteer-replay/package/lib/main.d.ts +2 -2
- package/front_end/ui/components/buttons/button.css +0 -1
- package/front_end/ui/components/diff_view/diffView.css +1 -1
- package/front_end/ui/components/markdown_view/codeBlock.css +4 -4
- package/front_end/ui/components/markdown_view/markdownView.css +3 -7
- package/front_end/ui/components/panel_feedback/panelFeedback.css +3 -2
- package/front_end/ui/components/panel_introduction_steps/panelIntroductionSteps.css +1 -1
- package/front_end/ui/components/suggestion_input/suggestionInput.css +2 -2
- package/front_end/ui/components/switch/switch.css +2 -1
- package/front_end/ui/legacy/TabbedPane.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +10 -3
- package/front_end/ui/legacy/components/inline_editor/colorSwatch.css +1 -2
- package/front_end/ui/legacy/components/perf_ui/chartViewport.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/filmStripView.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/flameChart.css +5 -3
- package/front_end/ui/legacy/components/perf_ui/overviewGrid.css +7 -4
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +0 -1
- package/front_end/ui/legacy/components/utils/imagePreview.css +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +11 -27
- package/front_end/ui/legacy/listWidget.css +1 -1
- package/front_end/ui/legacy/progressIndicator.css +1 -2
- package/front_end/ui/legacy/reportView.css +5 -2
- package/front_end/ui/legacy/searchableView.css +3 -2
- package/front_end/ui/legacy/suggestBox.css +2 -1
- package/front_end/ui/legacy/tabbedPane.css +8 -5
- package/front_end/ui/legacy/treeoutline.css +1 -1
- package/front_end/ui/legacy/viewContainers.css +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +11 -0
- package/package.json +1 -1
- package/front_end/models/ai_code_completion/debug.ts +0 -33
- package/front_end/models/ai_code_generation/debug.ts +0 -33
package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import '../../../ui/kit/kit.js';
|
|
6
6
|
|
|
7
7
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
8
|
+
import * as Buttons from '../../../ui/components/buttons/buttons.js';
|
|
8
9
|
import * as UI from '../../../ui/legacy/legacy.js';
|
|
9
10
|
import {Directives, html, render, type TemplateResult} from '../../../ui/lit/lit.js';
|
|
10
11
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
@@ -70,13 +71,16 @@ function renderChip(highlightInfo: HighlightInfo, input: ViewInput): TemplateRes
|
|
|
70
71
|
</span>
|
|
71
72
|
</button>
|
|
72
73
|
<div class="delete-highlight-container">
|
|
73
|
-
<button class="delete-highlight-button"
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
<devtools-button class="delete-highlight-button"
|
|
75
|
+
.data=${{
|
|
76
|
+
variant: Buttons.Button.Variant.ICON,
|
|
77
|
+
iconName: 'cross',
|
|
78
|
+
size: Buttons.Button.Size.MICRO,
|
|
79
|
+
title: i18nString(UIStrings.deleteHighlight),
|
|
80
|
+
jslogContext: 'linear-memory-inspector.delete-highlight',
|
|
81
|
+
} as Buttons.Button.ButtonData}
|
|
76
82
|
@click=${() => input.onDeleteHighlight(highlightInfo)}>
|
|
77
|
-
|
|
78
|
-
</devtools-icon>
|
|
79
|
-
</button>
|
|
83
|
+
</devtools-button>
|
|
80
84
|
</div>
|
|
81
85
|
</div>`;
|
|
82
86
|
// clang-format off
|
package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css
CHANGED
|
@@ -40,23 +40,7 @@
|
|
|
40
40
|
border-radius: var(--sys-shape-corner-extra-small);
|
|
41
41
|
width: var(--sys-size-11);
|
|
42
42
|
align-items: center;
|
|
43
|
-
justify-content:
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.delete-highlight-button {
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
width: var(--sys-size-7);
|
|
49
|
-
height: var(--sys-size-7);
|
|
50
|
-
border: none;
|
|
51
|
-
background-color: transparent;
|
|
52
|
-
display: flex;
|
|
53
|
-
align-items: center;
|
|
54
|
-
justify-content: center;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.delete-highlight-button:hover {
|
|
58
|
-
background-color: var(--sys-color-state-hover-on-subtle);
|
|
59
|
-
border-radius: var(--sys-shape-corner-full);
|
|
43
|
+
justify-content: flex-end;
|
|
60
44
|
}
|
|
61
45
|
|
|
62
46
|
.jump-to-highlight-button {
|
|
@@ -70,15 +54,6 @@
|
|
|
70
54
|
overflow: hidden;
|
|
71
55
|
}
|
|
72
56
|
|
|
73
|
-
.delete-highlight-button devtools-icon {
|
|
74
|
-
width: var(--sys-size-7);
|
|
75
|
-
height: var(--sys-size-7);
|
|
76
|
-
display: flex;
|
|
77
|
-
align-items: center;
|
|
78
|
-
justify-content: center;
|
|
79
|
-
border-radius: var(--sys-shape-corner-full);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
57
|
.source-code {
|
|
83
58
|
font-family: var(--source-code-font-family);
|
|
84
59
|
font-size: var(--source-code-font-size);
|
|
@@ -67,11 +67,10 @@ li.storage-group-list-item::before {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
.player-entry-frame-title {
|
|
70
|
-
|
|
71
|
-
width:
|
|
72
|
-
min-width: 125px;
|
|
70
|
+
width: var(--sys-size-21);
|
|
71
|
+
min-width: var(--sys-size-21);
|
|
73
72
|
text-overflow: ellipsis;
|
|
74
|
-
padding: 0
|
|
73
|
+
padding: 0 var(--sys-size-5);
|
|
75
74
|
border-right: var(--sys-size-1) solid var(--sys-color-divider);
|
|
76
75
|
overflow: hidden;
|
|
77
76
|
}
|
|
@@ -83,9 +82,13 @@ li.storage-group-list-item::before {
|
|
|
83
82
|
}
|
|
84
83
|
|
|
85
84
|
.player-entry-header {
|
|
86
|
-
height
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
/* 28px toolbar height (--sys-size-12) minus 1px divider border (--sys-size-1) = 27px,
|
|
86
|
+
* matching .tabbed-pane-header in the adjacent PlayerDetailView split pane. */
|
|
87
|
+
height: calc(var(--sys-size-12) - var(--sys-size-1));
|
|
88
|
+
line-height: calc(var(--sys-size-12) - var(--sys-size-1));
|
|
89
|
+
min-height: calc(var(--sys-size-12) - var(--sys-size-1));
|
|
90
|
+
/* 8px base inline padding (--sys-size-5) plus 2px optical inset (--sys-size-2) = 10px,
|
|
91
|
+
* matching the 10px cell padding of the player rows below. */
|
|
92
|
+
padding-left: calc(var(--sys-size-5) + var(--sys-size-2));
|
|
90
93
|
border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
|
|
91
94
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
.media-messages-header {
|
|
7
7
|
background-color: var(--sys-color-cdt-base-container);
|
|
8
8
|
border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
|
|
9
|
-
|
|
9
|
+
flex: none;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.media-messages-body {
|
|
@@ -14,8 +14,11 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.media-messages-level-dropdown-element {
|
|
17
|
-
height
|
|
18
|
-
|
|
17
|
+
/* 16px (--sys-size-8) + 2px (--sys-size-2) = 18px row height matching
|
|
18
|
+
* SoftDropDown.setRowHeight(18) so all 6 items (108px) fit the 108px
|
|
19
|
+
* GlassPane without vertical scrollbar clipping. */
|
|
20
|
+
height: calc(var(--sys-size-8) + var(--sys-size-2));
|
|
21
|
+
line-height: calc(var(--sys-size-8) + var(--sys-size-2));
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
.media-messages-level-dropdown-text {
|
|
@@ -24,7 +27,8 @@
|
|
|
24
27
|
|
|
25
28
|
.media-messages-level-dropdown-checkbox {
|
|
26
29
|
float: left;
|
|
27
|
-
|
|
30
|
+
/* 16px checkmark slot (--sys-size-8) plus 2px left padding (--sys-size-2) under border-box sizing. */
|
|
31
|
+
width: calc(var(--sys-size-8) + var(--sys-size-2));
|
|
28
32
|
height: 100%;
|
|
29
33
|
padding-left: var(--sys-size-2);
|
|
30
34
|
}
|
|
@@ -74,7 +78,7 @@
|
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
.status-error-field-label {
|
|
77
|
-
padding-right:
|
|
81
|
+
padding-right: var(--sys-size-5);
|
|
78
82
|
color: var(--sys-color-token-subtle);
|
|
79
83
|
}
|
|
80
84
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Copyright 2016 The Chromium Authors
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
|
-
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
4
|
|
|
6
5
|
import * as Common from '../../core/common/common.js';
|
|
7
6
|
import type * as SDK from '../../core/sdk/sdk.js';
|
|
@@ -10,6 +9,7 @@ import * as RenderCoordinator from '../../ui/components/render_coordinator/rende
|
|
|
10
9
|
import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
|
|
11
10
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
12
11
|
import * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';
|
|
12
|
+
import {Directives, html, render} from '../../ui/lit/lit.js';
|
|
13
13
|
import * as Settings from '../../ui/settings/settings.js';
|
|
14
14
|
|
|
15
15
|
import type {NetworkNode} from './NetworkDataGridNode.js';
|
|
@@ -17,10 +17,47 @@ import {RequestTimeRangeNameToColor} from './NetworkOverview.js';
|
|
|
17
17
|
import networkWaterfallColumnStyles from './networkWaterfallColumn.css.js';
|
|
18
18
|
import {RequestTimingView} from './RequestTimingView.js';
|
|
19
19
|
|
|
20
|
+
const {ref} = Directives;
|
|
21
|
+
|
|
20
22
|
const BAR_SPACING = 1;
|
|
21
23
|
|
|
24
|
+
export interface ViewInput {
|
|
25
|
+
onMouseMove: (offsetY: number, shiftKey: boolean) => void;
|
|
26
|
+
onMouseLeave: () => void;
|
|
27
|
+
onClick: (offsetY: number) => boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ViewOutput {
|
|
31
|
+
canvas?: HTMLCanvasElement;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type View = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
35
|
+
|
|
36
|
+
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
37
|
+
// clang-format off
|
|
38
|
+
render(html`
|
|
39
|
+
<style>${networkWaterfallColumnStyles}</style>
|
|
40
|
+
<canvas
|
|
41
|
+
tabindex="-1"
|
|
42
|
+
@mousemove=${(event: MouseEvent) => input.onMouseMove(event.offsetY, event.shiftKey)}
|
|
43
|
+
@mouseleave=${input.onMouseLeave}
|
|
44
|
+
@click=${(event: MouseEvent) => {
|
|
45
|
+
if (input.onClick(event.offsetY)) {
|
|
46
|
+
event.consume(true);
|
|
47
|
+
}
|
|
48
|
+
}}
|
|
49
|
+
${ref(e => {
|
|
50
|
+
output.canvas = e instanceof HTMLCanvasElement ? e : undefined;
|
|
51
|
+
})}
|
|
52
|
+
></canvas>
|
|
53
|
+
`, target);
|
|
54
|
+
// clang-format on
|
|
55
|
+
};
|
|
56
|
+
|
|
22
57
|
export class NetworkWaterfallColumn extends UI.Widget.VBox {
|
|
23
|
-
|
|
58
|
+
readonly #view: View;
|
|
59
|
+
readonly #viewOutput: ViewOutput = {};
|
|
60
|
+
private canvas!: HTMLCanvasElement;
|
|
24
61
|
private canvasPosition: DOMRect;
|
|
25
62
|
private readonly leftPadding: number;
|
|
26
63
|
private readonly fontSize: number;
|
|
@@ -45,15 +82,11 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
|
|
|
45
82
|
private readonly pathForStyle: Map<LayerStyle, Path2D>;
|
|
46
83
|
private textLayers: TextLayer[];
|
|
47
84
|
|
|
48
|
-
constructor(calculator: NetworkTimeCalculator.NetworkTimeCalculator) {
|
|
49
|
-
// TODO(allada) Make this a shadowDOM when the NetworkWaterfallColumn gets
|
|
85
|
+
constructor(calculator: NetworkTimeCalculator.NetworkTimeCalculator, view: View = DEFAULT_VIEW) {
|
|
86
|
+
// TODO(allada) Make this a shadowDOM when the NetworkWaterfallColumn gets
|
|
87
|
+
// moved into NetworkLogViewColumns.
|
|
50
88
|
super();
|
|
51
|
-
this
|
|
52
|
-
|
|
53
|
-
this.canvas = this.contentElement.createChild('canvas');
|
|
54
|
-
this.canvas.tabIndex = -1;
|
|
55
|
-
this.setDefaultFocusedElement(this.canvas);
|
|
56
|
-
this.canvasPosition = this.canvas.getBoundingClientRect();
|
|
89
|
+
this.#view = view;
|
|
57
90
|
|
|
58
91
|
this.leftPadding = 5;
|
|
59
92
|
this.fontSize = 10;
|
|
@@ -81,10 +114,6 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
|
|
|
81
114
|
|
|
82
115
|
this.eventDividers = new Map();
|
|
83
116
|
|
|
84
|
-
this.element.addEventListener('mousemove', this.onMouseMove.bind(this), true);
|
|
85
|
-
this.element.addEventListener('mouseleave', _event => this.setHoveredNode(null, false), true);
|
|
86
|
-
this.element.addEventListener('click', this.onClick.bind(this), true);
|
|
87
|
-
|
|
88
117
|
this.styleForTimeRangeName = NetworkWaterfallColumn.buildRequestTimeRangeStyle();
|
|
89
118
|
|
|
90
119
|
const resourceStyleTuple = NetworkWaterfallColumn.buildResourceTypeStyle();
|
|
@@ -93,30 +122,50 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
|
|
|
93
122
|
|
|
94
123
|
const baseLineColor = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-state-disabled');
|
|
95
124
|
this.wiskerStyle = {borderColor: baseLineColor, lineWidth: 1};
|
|
96
|
-
this.hoverDetailsStyle = {
|
|
125
|
+
this.hoverDetailsStyle = {
|
|
126
|
+
fillStyle: baseLineColor,
|
|
127
|
+
lineWidth: 1,
|
|
128
|
+
borderColor: baseLineColor,
|
|
129
|
+
};
|
|
97
130
|
|
|
98
131
|
this.pathForStyle = new Map();
|
|
99
132
|
this.textLayers = [];
|
|
133
|
+
|
|
134
|
+
this.performUpdate();
|
|
135
|
+
this.canvasPosition = this.canvas?.getBoundingClientRect() ?? new DOMRect();
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
override performUpdate(): void {
|
|
139
|
+
this.#view({
|
|
140
|
+
onMouseMove: (offsetY, shiftKey) => this.setHoveredNode(this.getNodeFromPoint(offsetY), shiftKey),
|
|
141
|
+
onMouseLeave: () => this.setHoveredNode(null, false),
|
|
142
|
+
onClick: offsetY => this.setSelectedNode(this.getNodeFromPoint(offsetY)),
|
|
143
|
+
},
|
|
144
|
+
this.#viewOutput, this.contentElement);
|
|
145
|
+
if (this.#viewOutput.canvas) {
|
|
146
|
+
this.canvas = this.#viewOutput.canvas;
|
|
147
|
+
this.setDefaultFocusedElement(this.canvas);
|
|
148
|
+
}
|
|
100
149
|
}
|
|
101
150
|
|
|
102
151
|
static buildRequestTimeRangeStyle(): Map<NetworkTimeCalculator.RequestTimeRangeNames, LayerStyle> {
|
|
103
152
|
const styleMap = new Map<NetworkTimeCalculator.RequestTimeRangeNames, LayerStyle>();
|
|
104
|
-
styleMap.set(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
styleMap.set(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
styleMap.set(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
styleMap.set(
|
|
114
|
-
|
|
115
|
-
|
|
153
|
+
styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.CONNECTING, {
|
|
154
|
+
fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.CONNECTING],
|
|
155
|
+
});
|
|
156
|
+
styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.SSL, {
|
|
157
|
+
fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.SSL],
|
|
158
|
+
});
|
|
159
|
+
styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.DNS, {
|
|
160
|
+
fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.DNS],
|
|
161
|
+
});
|
|
162
|
+
styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.PROXY, {
|
|
163
|
+
fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.PROXY],
|
|
164
|
+
});
|
|
116
165
|
styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.BLOCKING, {fillStyle: '--network-waterfall-blocking'});
|
|
117
|
-
styleMap.set(
|
|
118
|
-
|
|
119
|
-
|
|
166
|
+
styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.PUSH, {
|
|
167
|
+
fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.PUSH],
|
|
168
|
+
});
|
|
120
169
|
styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.QUEUEING, {
|
|
121
170
|
fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.QUEUEING],
|
|
122
171
|
lineWidth: 2,
|
|
@@ -128,15 +177,15 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
|
|
|
128
177
|
lineWidth: 2,
|
|
129
178
|
borderColor: '#03A9F4',
|
|
130
179
|
});
|
|
131
|
-
styleMap.set(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
styleMap.set(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
styleMap.set(
|
|
138
|
-
|
|
139
|
-
|
|
180
|
+
styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.WAITING, {
|
|
181
|
+
fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.WAITING],
|
|
182
|
+
});
|
|
183
|
+
styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.RECEIVING_PUSH, {
|
|
184
|
+
fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.RECEIVING_PUSH],
|
|
185
|
+
});
|
|
186
|
+
styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER, {
|
|
187
|
+
fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER],
|
|
188
|
+
});
|
|
140
189
|
styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_PREPARATION, {
|
|
141
190
|
fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_PREPARATION],
|
|
142
191
|
});
|
|
@@ -228,17 +277,6 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
|
|
|
228
277
|
this.update();
|
|
229
278
|
}
|
|
230
279
|
|
|
231
|
-
private onMouseMove(event: MouseEvent): void {
|
|
232
|
-
this.setHoveredNode(this.getNodeFromPoint(event.offsetY), event.shiftKey);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
private onClick(event: MouseEvent): void {
|
|
236
|
-
const handled = this.setSelectedNode(this.getNodeFromPoint(event.offsetY));
|
|
237
|
-
if (handled) {
|
|
238
|
-
event.consume(true);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
280
|
private getPopoverRequest(event: MouseEvent|KeyboardEvent): UI.PopoverHelper.PopoverRequest|null {
|
|
243
281
|
if (event instanceof KeyboardEvent) {
|
|
244
282
|
return null;
|
|
@@ -389,7 +427,7 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
|
|
|
389
427
|
this.offsetWidth = this.contentElement.offsetWidth - this.rightPadding;
|
|
390
428
|
this.offsetHeight = this.contentElement.offsetHeight;
|
|
391
429
|
this.calculator.setDisplayWidth(this.offsetWidth);
|
|
392
|
-
this.canvasPosition = this.canvas
|
|
430
|
+
this.canvasPosition = this.canvas?.getBoundingClientRect() ?? new DOMRect();
|
|
393
431
|
}
|
|
394
432
|
|
|
395
433
|
private timeToPosition(time: number): number {
|
|
@@ -585,10 +623,9 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
|
|
|
585
623
|
}
|
|
586
624
|
|
|
587
625
|
if (!this.calculator.startAtZero) {
|
|
588
|
-
const queueingRange =
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
NetworkTimeCalculator.RequestTimeRange);
|
|
626
|
+
const queueingRange = (NetworkTimeCalculator.calculateRequestTimeRanges(request, 0)
|
|
627
|
+
.find(data => data.name === NetworkTimeCalculator.RequestTimeRangeNames.TOTAL) as
|
|
628
|
+
NetworkTimeCalculator.RequestTimeRange);
|
|
592
629
|
const leftLabelWidth = labels ? context.measureText(labels.left).width : 0;
|
|
593
630
|
const leftTextPlacedInBar = leftLabelWidth < ranges.mid - ranges.start;
|
|
594
631
|
const wiskerTextPadding = 13;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
.network-config-title {
|
|
21
21
|
margin-right: var(--sys-size-8);
|
|
22
|
-
width:
|
|
22
|
+
width: var(--sys-size-21);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.network-config-fields {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.network-config-fields > span:first-of-type {
|
|
30
|
-
padding:
|
|
30
|
+
padding: var(--sys-size-2) 0;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.panel-section-separator {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
.network-config-input-validation-error {
|
|
47
47
|
color: var(--sys-color-error);
|
|
48
|
-
margin:
|
|
48
|
+
margin: var(--sys-size-3) 0;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.network-config-input-validation-error:empty {
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.network-summary-bar {
|
|
25
|
-
flex: 0 0
|
|
26
|
-
|
|
27
|
-
padding-left:
|
|
25
|
+
flex: 0 0 calc(var(--sys-size-12) - var(--sys-size-1)); /* 28px toolbar minus 1px top border */
|
|
26
|
+
align-items: center;
|
|
27
|
+
padding-left: var(--sys-size-4);
|
|
28
28
|
background-color: var(--sys-color-cdt-base-container);
|
|
29
29
|
border-top: var(--sys-size-1) solid var(--sys-color-divider);
|
|
30
30
|
white-space: nowrap;
|
|
@@ -75,7 +75,8 @@
|
|
|
75
75
|
|
|
76
76
|
.network-waterfall-header,
|
|
77
77
|
.network-log-grid.data-grid thead {
|
|
78
|
-
height
|
|
78
|
+
/* 32px (--sys-size-13) header height minus 1px (--sys-size-1) bottom border offset. */
|
|
79
|
+
height: calc(var(--sys-size-13) - var(--sys-size-1));
|
|
79
80
|
background-color: var(--sys-color-surface1);
|
|
80
81
|
}
|
|
81
82
|
|
|
@@ -5,18 +5,14 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
.network-timing-table {
|
|
8
|
-
width:
|
|
8
|
+
width: var(--sys-size-32);
|
|
9
9
|
border-spacing: 0;
|
|
10
|
-
padding-left:
|
|
11
|
-
padding-right:
|
|
10
|
+
padding-left: var(--sys-size-6);
|
|
11
|
+
padding-right: var(--sys-size-6);
|
|
12
12
|
line-height: initial;
|
|
13
13
|
table-layout: fixed;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.network-timing-start {
|
|
17
|
-
border-top: 5px solid transparent;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
16
|
.network-timing-start th span.network-timing-hidden-header {
|
|
21
17
|
height: var(--sys-size-1);
|
|
22
18
|
width: var(--sys-size-1);
|
|
@@ -237,7 +233,7 @@ tr.synthetic {
|
|
|
237
233
|
.network-timing-bar.ssl,
|
|
238
234
|
.network-timing-bar.connecting,
|
|
239
235
|
.network-timing-bar.blocking {
|
|
240
|
-
height:
|
|
236
|
+
height: var(--sys-size-5);
|
|
241
237
|
margin: auto;
|
|
242
238
|
}
|
|
243
239
|
|
|
@@ -104,6 +104,18 @@ export const UIStrings = {
|
|
|
104
104
|
* @description Text in heap snapshot loader of the Memory panel when taking a heap snapshot.
|
|
105
105
|
*/
|
|
106
106
|
loadingLocations: 'Loading locations…',
|
|
107
|
+
/**
|
|
108
|
+
* @description Text in heap snapshot loader of the Memory panel when taking a heap snapshot.
|
|
109
|
+
*/
|
|
110
|
+
loadingScopes: 'Loading scopes…',
|
|
111
|
+
/**
|
|
112
|
+
* @description Text in heap snapshot loader of the Memory panel when taking a heap snapshot.
|
|
113
|
+
*/
|
|
114
|
+
loadingScopeContextVars: 'Loading scope context vars…',
|
|
115
|
+
/**
|
|
116
|
+
* @description Text in heap snapshot loader of the Memory panel when taking a heap snapshot.
|
|
117
|
+
*/
|
|
118
|
+
loadingScopeUses: 'Loading scope uses…',
|
|
107
119
|
/**
|
|
108
120
|
* @description Text in heap snapshot loader of the Memory panel when taking a heap snapshot.
|
|
109
121
|
*/
|