chrome-devtools-frontend 1.0.1618066 → 1.0.1621064
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/checklist/README.md +8 -7
- package/eslint.config.mjs +7 -0
- package/front_end/core/sdk/NetworkManager.ts +23 -2
- package/front_end/core/sdk/ServerSentEventsProtocol.ts +1 -1
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +119 -13
- package/front_end/generated/InspectorBackendCommands.ts +6 -6
- package/front_end/generated/SupportedCSSProperties.js +100 -100
- package/front_end/generated/protocol-mapping.d.ts +1 -9
- package/front_end/generated/protocol-proxy-api.d.ts +1 -9
- package/front_end/generated/protocol.ts +5 -0
- package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +512 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +65 -85
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +9 -16
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +21 -4
- package/front_end/models/bindings/SymbolizedError.ts +69 -2
- package/front_end/models/javascript_metadata/NativeFunctions.js +2 -2
- package/front_end/models/stack_trace/DetailedErrorStackParser.ts +11 -3
- package/front_end/models/stack_trace/ErrorStackParser.ts +18 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +84 -2
- package/front_end/panels/ai_assistance/components/WalkthroughUtils.ts +1 -1
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +9 -2
- package/front_end/panels/application/WebMCPView.ts +212 -89
- package/front_end/panels/application/webMCPView.css +260 -199
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +9 -5
- package/front_end/panels/changes/ChangesSidebar.ts +2 -2
- package/front_end/panels/changes/ChangesView.ts +4 -7
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -19
- package/front_end/panels/coverage/CoverageView.ts +4 -5
- package/front_end/panels/elements/ElementsPanel.ts +9 -12
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +19 -20
- package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +29 -29
- package/front_end/panels/elements/components/QueryContainer.ts +5 -6
- package/front_end/panels/elements/components/components.ts +0 -2
- package/front_end/panels/emulation/MediaQueryInspector.ts +4 -7
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +47 -66
- package/front_end/panels/network/RequestConditionsDrawer.ts +6 -4
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +6 -9
- package/front_end/panels/protocol_monitor/JSONEditor.ts +2 -2
- package/front_end/panels/search/SearchView.ts +4 -7
- package/front_end/panels/sources/DebuggerPausedMessage.ts +18 -22
- package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -4
- package/front_end/panels/web_audio/WebAudioView.ts +5 -4
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/icon_button/iconButton.css +1 -0
- package/front_end/ui/components/lists/list.css +4 -0
- package/front_end/ui/legacy/ViewRegistration.ts +2 -2
- package/front_end/ui/legacy/Widget.ts +9 -2
- package/front_end/ui/legacy/components/utils/Linkifier.ts +32 -11
- package/front_end/ui/visual_logging/KnownContextValues.ts +17 -0
- package/package.json +1 -1
- package/front_end/Images/src/dots-circle.svg +0 -10
- package/front_end/panels/elements/components/Helper.ts +0 -35
|
@@ -5,236 +5,297 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
@scope to (devtools-widget > *) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
.webmcp-view {
|
|
9
|
+
height: 100%;
|
|
10
|
+
width: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.call-log,
|
|
14
|
+
.tool-list {
|
|
15
|
+
height: 100%;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
overflow: auto;
|
|
19
|
+
padding: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.empty-view-scroller {
|
|
23
|
+
flex: auto;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
devtools-data-grid {
|
|
27
|
+
flex: auto;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.data-grid {
|
|
31
|
+
th {
|
|
32
|
+
height: 26px;
|
|
11
33
|
}
|
|
12
34
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
height: 100%;
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
overflow: auto;
|
|
19
|
-
padding: 0;
|
|
35
|
+
td {
|
|
36
|
+
vertical-align: middle;
|
|
20
37
|
}
|
|
21
38
|
|
|
22
|
-
.
|
|
23
|
-
|
|
39
|
+
tr.status-cancelled {
|
|
40
|
+
color: var(--sys-color-on-surface-light);
|
|
24
41
|
}
|
|
25
42
|
|
|
26
|
-
|
|
27
|
-
|
|
43
|
+
tr.status-error {
|
|
44
|
+
color: var(--sys-color-error);
|
|
28
45
|
}
|
|
29
46
|
|
|
30
|
-
.
|
|
31
|
-
|
|
32
|
-
height: 26px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
td {
|
|
36
|
-
vertical-align: middle;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
tr.status-cancelled {
|
|
40
|
-
color: var(--sys-color-on-surface-light);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
tr.status-error {
|
|
44
|
-
color: var(--sys-color-error);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
tr.selected {
|
|
48
|
-
background-color: var(--sys-color-tonal-container);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
tbody tr.selected.status-error,
|
|
52
|
-
tbody tr.selected.status-error.revealed {
|
|
53
|
-
background-color: var(--sys-color-error-container);
|
|
54
|
-
color: var(--sys-color-error);
|
|
55
|
-
}
|
|
47
|
+
tr.selected {
|
|
48
|
+
background-color: var(--sys-color-tonal-container);
|
|
56
49
|
}
|
|
57
50
|
|
|
58
|
-
.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
padding: 0 5px;
|
|
63
|
-
line-height: 22px;
|
|
64
|
-
overflow: hidden;
|
|
65
|
-
align-items: center;
|
|
66
|
-
flex: none;
|
|
67
|
-
color: var(--sys-color-on-surface);
|
|
68
|
-
border-bottom: 1px solid var(--sys-color-divider);
|
|
51
|
+
tbody tr.selected.status-error,
|
|
52
|
+
tbody tr.selected.status-error.revealed {
|
|
53
|
+
background-color: var(--sys-color-error-container);
|
|
54
|
+
color: var(--sys-color-error);
|
|
69
55
|
}
|
|
70
56
|
|
|
71
|
-
.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
57
|
+
tbody tr:hover .run-tool-action-button,
|
|
58
|
+
tbody tr:focus-within .run-tool-action-button,
|
|
59
|
+
&:focus-within tbody tr.selected .run-tool-action-button {
|
|
60
|
+
display: flex;
|
|
75
61
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
.label {
|
|
93
|
-
color: var(--sys-color-on-surface-subtle);
|
|
94
|
-
white-space: nowrap;
|
|
95
|
-
padding: var(--sys-size-6) 0;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.value {
|
|
99
|
-
user-select: text;
|
|
100
|
-
|
|
101
|
-
&.source-code {
|
|
102
|
-
color: var(--sys-color-token-attribute);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
padding: var(--sys-size-6) 0;
|
|
106
|
-
color: var(--sys-color-on-surface);
|
|
107
|
-
overflow-wrap: anywhere;
|
|
108
|
-
|
|
109
|
-
&:has(> .stack-preview-container) {
|
|
110
|
-
padding: var(--sys-size-4) 0;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&.tool-origin-container {
|
|
114
|
-
display: flex;
|
|
115
|
-
align-items: center;
|
|
116
|
-
gap: var(--sys-size-4);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.tool-origin-node {
|
|
120
|
-
display: flex;
|
|
121
|
-
align-items: center;
|
|
122
|
-
cursor: default;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.show-element {
|
|
127
|
-
height: 1lh;
|
|
128
|
-
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.section-title {
|
|
65
|
+
display: flex;
|
|
66
|
+
gap: var(--sys-size-2);
|
|
67
|
+
background-color: var(--sys-color-surface1);
|
|
68
|
+
padding: 0 var(--sys-size-3);
|
|
69
|
+
line-height: var(--sys-size-10);
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
align-items: center;
|
|
72
|
+
flex: none;
|
|
73
|
+
color: var(--sys-color-on-surface);
|
|
74
|
+
border-bottom: 1px solid var(--sys-color-divider);
|
|
75
|
+
|
|
76
|
+
devtools-button {
|
|
77
|
+
margin: calc(-1 * var(--sys-size-1)) 0;
|
|
129
78
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.status-cell {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: var(--sys-size-3);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.name-cell {
|
|
88
|
+
display: flex;
|
|
89
|
+
gap: var(--sys-size-5);
|
|
90
|
+
align-items: center;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.run-tool-action-button {
|
|
94
|
+
display: none;
|
|
95
|
+
width: var(--sys-size-8);
|
|
96
|
+
height: var(--sys-size-8);
|
|
97
|
+
padding: 0;
|
|
98
|
+
border: none;
|
|
99
|
+
background-color: transparent;
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
align-items: center;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
flex-shrink: 0;
|
|
104
|
+
|
|
105
|
+
devtools-icon {
|
|
106
|
+
width: var(--sys-size-7);
|
|
107
|
+
height: var(--sys-size-7);
|
|
108
|
+
color: var(--sys-color-primary);
|
|
136
109
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.tool-details {
|
|
113
|
+
height: 100%;
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
overflow: hidden;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.tool-details-grid {
|
|
120
|
+
display: grid;
|
|
121
|
+
grid-template-columns: min-content 1fr;
|
|
122
|
+
gap: var(--sys-size-6);
|
|
123
|
+
padding: calc(0.5*var(--sys-size-6)) var(--sys-size-8);
|
|
124
|
+
align-items: flex-start;
|
|
125
|
+
overflow-y: auto;
|
|
126
|
+
|
|
127
|
+
.label {
|
|
128
|
+
color: var(--sys-color-on-surface-subtle);
|
|
129
|
+
white-space: nowrap;
|
|
130
|
+
padding: var(--sys-size-3) 0;
|
|
147
131
|
}
|
|
148
132
|
|
|
149
|
-
.
|
|
150
|
-
|
|
151
|
-
}
|
|
133
|
+
.value {
|
|
134
|
+
user-select: text;
|
|
152
135
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
136
|
+
&.source-code {
|
|
137
|
+
color: var(--sys-color-token-property-special);
|
|
138
|
+
}
|
|
156
139
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
align-items: flex-start;
|
|
161
|
-
gap: 8px;
|
|
162
|
-
}
|
|
140
|
+
padding: var(--sys-size-3) 0;
|
|
141
|
+
color: var(--sys-color-on-surface);
|
|
142
|
+
overflow-wrap: anywhere;
|
|
163
143
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
overflow: hidden;
|
|
168
|
-
text-overflow: ellipsis;
|
|
169
|
-
min-width: 0;
|
|
170
|
-
flex: 1;
|
|
171
|
-
}
|
|
144
|
+
&:has(> .stack-preview-container) {
|
|
145
|
+
padding: var(--sys-size-4) 0;
|
|
146
|
+
}
|
|
172
147
|
|
|
173
|
-
|
|
174
|
-
.tool-name-container icon-button {
|
|
175
|
-
flex-shrink: 0;
|
|
176
|
-
height: 0;
|
|
177
|
-
overflow: visible;
|
|
148
|
+
&.tool-origin-container {
|
|
178
149
|
display: flex;
|
|
179
150
|
align-items: center;
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
.tool-description {
|
|
183
|
-
color: var(--sys-color-on-surface);
|
|
184
|
-
white-space: nowrap;
|
|
185
|
-
overflow: hidden;
|
|
186
|
-
text-overflow: ellipsis;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
devtools-toolbar-input {
|
|
190
|
-
flex-grow: 1;
|
|
191
|
-
flex-shrink: 1;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.toolbar-text.status-error-text {
|
|
195
|
-
color: var(--sys-color-error);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.toolbar-text.status-cancelled-text {
|
|
199
|
-
color: var(--sys-color-on-surface-light);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.call-details-tabbed-pane {
|
|
203
|
-
flex: auto;
|
|
204
|
-
border-bottom: 1px solid var(--sys-color-divider);
|
|
205
|
-
}
|
|
151
|
+
gap: var(--sys-size-4);
|
|
152
|
+
}
|
|
206
153
|
|
|
207
|
-
|
|
154
|
+
.tool-origin-node {
|
|
208
155
|
display: flex;
|
|
209
|
-
|
|
210
|
-
|
|
156
|
+
align-items: center;
|
|
157
|
+
cursor: default;
|
|
158
|
+
}
|
|
211
159
|
}
|
|
212
160
|
|
|
213
|
-
.
|
|
214
|
-
|
|
215
|
-
flex: auto;
|
|
216
|
-
overflow: auto;
|
|
161
|
+
.show-element {
|
|
162
|
+
height: 1lh;
|
|
217
163
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
devtools-list {
|
|
167
|
+
flex: 1 1 auto;
|
|
168
|
+
margin: 0;
|
|
169
|
+
padding: var(--sys-size-4) 0;
|
|
170
|
+
box-sizing: border-box;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.tool-item {
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-direction: column;
|
|
176
|
+
padding: var(--sys-size-5) var(--sys-size-4);
|
|
177
|
+
gap: var(--sys-size-3);
|
|
178
|
+
width: 100%;
|
|
179
|
+
box-sizing: border-box;
|
|
180
|
+
border-bottom: 1px solid var(--sys-color-divider);
|
|
181
|
+
|
|
182
|
+
&:hover {
|
|
183
|
+
background-color: var(--sys-color-state-hover-on-subtle);
|
|
222
184
|
}
|
|
223
185
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
border-bottom: 1px solid var(--sys-color-divider);
|
|
186
|
+
&.selected {
|
|
187
|
+
background-color: var(--sys-color-tonal-container);
|
|
227
188
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.tool-name-container {
|
|
192
|
+
display: flex;
|
|
193
|
+
justify-content: space-between;
|
|
194
|
+
align-items: center;
|
|
195
|
+
gap: var(--sys-size-5);
|
|
196
|
+
|
|
197
|
+
.tool-icons {
|
|
198
|
+
display: flex;
|
|
199
|
+
gap: var(--sys-size-2);
|
|
200
|
+
align-items: center;
|
|
234
201
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
202
|
+
/* stylelint-disable-next-line selector-type-no-unknown */
|
|
203
|
+
icon-button {
|
|
204
|
+
flex-shrink: 0;
|
|
205
|
+
display: flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
cursor: pointer;
|
|
239
208
|
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.tool-name.source-code {
|
|
212
|
+
color: var(--sys-color-token-property-special);
|
|
213
|
+
white-space: nowrap;
|
|
214
|
+
overflow: hidden;
|
|
215
|
+
text-overflow: ellipsis;
|
|
216
|
+
min-width: 0;
|
|
217
|
+
flex: 1;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.tool-description {
|
|
221
|
+
color: var(--sys-color-on-surface);
|
|
222
|
+
white-space: nowrap;
|
|
223
|
+
overflow: hidden;
|
|
224
|
+
text-overflow: ellipsis;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
devtools-toolbar-input {
|
|
228
|
+
flex-grow: 1;
|
|
229
|
+
flex-shrink: 1;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.toolbar-text.status-error-text {
|
|
233
|
+
color: var(--sys-color-error);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.toolbar-text.status-cancelled-text {
|
|
237
|
+
color: var(--sys-color-on-surface-light);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.call-details-tabbed-pane {
|
|
241
|
+
flex: auto;
|
|
242
|
+
border-bottom: 1px solid var(--sys-color-divider);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.call-payload-view {
|
|
246
|
+
display: flex;
|
|
247
|
+
flex-direction: column;
|
|
248
|
+
height: 100%;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.call-payload-content {
|
|
252
|
+
padding: var(--sys-size-5);
|
|
253
|
+
flex: auto;
|
|
254
|
+
overflow: auto;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.payload-value.error-text {
|
|
258
|
+
color: var(--sys-color-error);
|
|
259
|
+
white-space: pre-wrap;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.sidebar-tool-details {
|
|
263
|
+
flex: none;
|
|
264
|
+
border-bottom: 1px solid var(--sys-color-divider);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.call-to-action {
|
|
268
|
+
background-color: var(--sys-color-neutral-container);
|
|
269
|
+
padding: 8px;
|
|
270
|
+
border-radius: 5px;
|
|
271
|
+
margin: 4px;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.call-to-action-body {
|
|
275
|
+
padding: 6px 0;
|
|
276
|
+
margin-left: 9.5px;
|
|
277
|
+
border-left: 2px solid var(--issue-color-yellow);
|
|
278
|
+
padding-left: 18px;
|
|
279
|
+
line-height: 20px;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.call-to-action .explanation {
|
|
283
|
+
font-weight: bold;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.inline-icon {
|
|
287
|
+
vertical-align: middle;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.json-editor-widget {
|
|
291
|
+
flex: auto;
|
|
292
|
+
/* extend the JSON editor padding to match the details grid */
|
|
293
|
+
padding-left: calc(var(--sys-size-8) - 1em);
|
|
294
|
+
min-height: 0;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.webmcp-run-tool-button {
|
|
298
|
+
align-self: flex-end;
|
|
299
|
+
margin: var(--sys-size-6) var(--sys-size-8);
|
|
300
|
+
}
|
|
240
301
|
}
|
|
@@ -141,10 +141,11 @@ interface ViewInput {
|
|
|
141
141
|
highlightedItem: SDK.CategorizedBreakpoint.CategorizedBreakpoint|null;
|
|
142
142
|
categories: Map<SDK.CategorizedBreakpoint.Category, SDK.CategorizedBreakpoint.CategorizedBreakpoint[]>;
|
|
143
143
|
sortedCategoryNames: SDK.CategorizedBreakpoint.Category[];
|
|
144
|
+
jslog?: string;
|
|
144
145
|
}
|
|
145
146
|
|
|
146
|
-
export type View =
|
|
147
|
-
export const DEFAULT_VIEW = (input
|
|
147
|
+
export type View = (input: ViewInput, output: undefined, target: HTMLElement|DocumentFragment) => void;
|
|
148
|
+
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
148
149
|
const shouldExpandCategory = (breakpoints: SDK.CategorizedBreakpoint.CategorizedBreakpoint[]): boolean =>
|
|
149
150
|
Boolean(input.filterText) || (input.highlightedItem && breakpoints.includes(input.highlightedItem)) ||
|
|
150
151
|
breakpoints.some(breakpoint => breakpoint.enabled());
|
|
@@ -250,12 +251,13 @@ export const DEFAULT_VIEW = (input: ViewInput, output: undefined, target: HTMLEl
|
|
|
250
251
|
</ul>
|
|
251
252
|
</li>`)}
|
|
252
253
|
</ul>`}>
|
|
253
|
-
</devtools-tree>`, target);
|
|
254
|
+
</devtools-tree>`, target, {container: {attributes: {jslog: input.jslog}}});
|
|
254
255
|
// clang-format on
|
|
255
256
|
};
|
|
256
257
|
|
|
257
|
-
export abstract class CategorizedBreakpointsSidebarPane extends UI.Widget.VBox {
|
|
258
|
+
export abstract class CategorizedBreakpointsSidebarPane extends UI.Widget.VBox<ShadowRoot> {
|
|
258
259
|
readonly #viewId: string;
|
|
260
|
+
readonly #jslog: string;
|
|
259
261
|
// A layout test reaches into this
|
|
260
262
|
private readonly categories =
|
|
261
263
|
new Map<SDK.CategorizedBreakpoint.Category, SDK.CategorizedBreakpoint.CategorizedBreakpoint[]>();
|
|
@@ -267,8 +269,9 @@ export abstract class CategorizedBreakpointsSidebarPane extends UI.Widget.VBox {
|
|
|
267
269
|
constructor(
|
|
268
270
|
breakpoints: SDK.CategorizedBreakpoint.CategorizedBreakpoint[], jslog: string, viewId: string,
|
|
269
271
|
view = DEFAULT_VIEW) {
|
|
270
|
-
super({useShadowDom:
|
|
272
|
+
super({useShadowDom: 'pure'});
|
|
271
273
|
this.#view = view;
|
|
274
|
+
this.#jslog = jslog;
|
|
272
275
|
this.#viewId = viewId;
|
|
273
276
|
|
|
274
277
|
for (const breakpoint of breakpoints) {
|
|
@@ -348,6 +351,7 @@ export abstract class CategorizedBreakpointsSidebarPane extends UI.Widget.VBox {
|
|
|
348
351
|
override performUpdate(): void {
|
|
349
352
|
const input: ViewInput = {
|
|
350
353
|
filterText: this.#filterText,
|
|
354
|
+
jslog: this.#jslog,
|
|
351
355
|
onFilterChanged: this.#onFilterChanged.bind(this),
|
|
352
356
|
onBreakpointChange: this.onBreakpointChanged.bind(this),
|
|
353
357
|
onItemSelected: this.#onItemSelected.bind(this),
|
|
@@ -60,7 +60,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
60
60
|
</li>`)}
|
|
61
61
|
</ul>`}></devtools-tree>`,
|
|
62
62
|
// clang-format on
|
|
63
|
-
target);
|
|
63
|
+
target, {container: {attributes: {jslog: `${VisualLogging.pane('sidebar').track({resize: true})}`}}});
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
export class ChangesSidebar extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.Widget>(
|
|
@@ -70,7 +70,7 @@ export class ChangesSidebar extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
70
70
|
readonly #sourceCodes = new Set<Workspace.UISourceCode.UISourceCode>();
|
|
71
71
|
#selectedUISourceCode: Workspace.UISourceCode.UISourceCode|null = null;
|
|
72
72
|
constructor(target?: HTMLElement, view = DEFAULT_VIEW) {
|
|
73
|
-
super(target
|
|
73
|
+
super(target);
|
|
74
74
|
this.#view = view;
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -39,7 +39,7 @@ interface ViewInput {
|
|
|
39
39
|
onSelect(sourceCode: Workspace.UISourceCode.UISourceCode|null): void;
|
|
40
40
|
workspaceDiff: WorkspaceDiff.WorkspaceDiff.WorkspaceDiffImpl;
|
|
41
41
|
}
|
|
42
|
-
type View = (input: ViewInput, output: object, target:
|
|
42
|
+
type View = (input: ViewInput, output: object, target: DocumentFragment) => void;
|
|
43
43
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
44
44
|
render(
|
|
45
45
|
// clang-format off
|
|
@@ -70,19 +70,16 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
70
70
|
</devtools-widget>
|
|
71
71
|
</devtools-split-view>`,
|
|
72
72
|
// clang-format on
|
|
73
|
-
target);
|
|
73
|
+
target, {container: {attributes: {jslog: `${VisualLogging.panel('changes').track({resize: true})}`}}});
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
export class ChangesView extends UI.Widget.VBox {
|
|
76
|
+
export class ChangesView extends UI.Widget.VBox<ShadowRoot> {
|
|
77
77
|
readonly #workspaceDiff: WorkspaceDiff.WorkspaceDiff.WorkspaceDiffImpl;
|
|
78
78
|
#selectedUISourceCode: Workspace.UISourceCode.UISourceCode|null = null;
|
|
79
79
|
readonly #view: View;
|
|
80
80
|
|
|
81
81
|
constructor(target?: HTMLElement, view = DEFAULT_VIEW) {
|
|
82
|
-
super(target, {
|
|
83
|
-
jslog: `${VisualLogging.panel('changes').track({resize: true})}`,
|
|
84
|
-
useShadowDom: true,
|
|
85
|
-
});
|
|
82
|
+
super(target, {useShadowDom: 'pure'});
|
|
86
83
|
|
|
87
84
|
this.#workspaceDiff = WorkspaceDiff.WorkspaceDiff.workspaceDiff();
|
|
88
85
|
this.#view = view;
|
|
@@ -238,24 +238,6 @@ export const getMessageForElement = (element: Element): ConsoleViewMessage|undef
|
|
|
238
238
|
return elementToMessage.get(element);
|
|
239
239
|
};
|
|
240
240
|
|
|
241
|
-
/**
|
|
242
|
-
* Combines the error description (essentially the `Error#stack` property value)
|
|
243
|
-
* with the `issueSummary`.
|
|
244
|
-
*
|
|
245
|
-
* @param description the `description` property of the `Error` remote object.
|
|
246
|
-
* @param issueSummary the optional `issueSummary` of the `exceptionMetaData`.
|
|
247
|
-
* @returns the enriched description.
|
|
248
|
-
* @see https://goo.gle/devtools-reduce-network-noise-design
|
|
249
|
-
*/
|
|
250
|
-
export const concatErrorDescriptionAndIssueSummary = (description: string, issueSummary: string): string => {
|
|
251
|
-
// Insert the issue summary right after the error message.
|
|
252
|
-
const pos = description.indexOf('\n');
|
|
253
|
-
const prefix = pos === -1 ? description : description.substring(0, pos);
|
|
254
|
-
const suffix = pos === -1 ? '' : description.substring(pos);
|
|
255
|
-
description = `${prefix}. ${issueSummary}${suffix}`;
|
|
256
|
-
return description;
|
|
257
|
-
};
|
|
258
|
-
|
|
259
241
|
// This value reflects the 18px min-height of .console-message.
|
|
260
242
|
// Keep in sync with consoleView.css.
|
|
261
243
|
const defaultConsoleRowHeight = 18;
|
|
@@ -1948,7 +1930,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
1948
1930
|
|
|
1949
1931
|
const issueSummary = exceptionDetails?.exceptionMetaData?.issueSummary;
|
|
1950
1932
|
if (typeof issueSummary === 'string') {
|
|
1951
|
-
string = concatErrorDescriptionAndIssueSummary(string, issueSummary);
|
|
1933
|
+
string = StackTrace.ErrorStackParser.concatErrorDescriptionAndIssueSummary(string, issueSummary);
|
|
1952
1934
|
}
|
|
1953
1935
|
|
|
1954
1936
|
const linkInfos = StackTrace.ErrorStackParser.parseSourcePositionsFromErrorStack(runtimeModel, string);
|
|
@@ -153,7 +153,7 @@ export interface CoverageViewOutput {
|
|
|
153
153
|
focusResults: () => void;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
export type View = (input: CoverageViewInput, output: CoverageViewOutput, target:
|
|
156
|
+
export type View = (input: CoverageViewInput, output: CoverageViewOutput, target: DocumentFragment) => void;
|
|
157
157
|
|
|
158
158
|
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
159
159
|
// clang-format off
|
|
@@ -234,7 +234,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
234
234
|
<div class="coverage-message">
|
|
235
235
|
${input.statusMessage}
|
|
236
236
|
</div>
|
|
237
|
-
</div>`, target);
|
|
237
|
+
</div>`, target, {container: {attributes: {jslog: `${VisualLogging.panel('coverage').track({resize: true})}`}}});
|
|
238
238
|
// clang-format on
|
|
239
239
|
};
|
|
240
240
|
|
|
@@ -282,7 +282,7 @@ function renderReloadPromptPage(message: Common.UIString.LocalizedString, classN
|
|
|
282
282
|
// clang-format on
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
export class CoverageView extends UI.Widget.VBox {
|
|
285
|
+
export class CoverageView extends UI.Widget.VBox<ShadowRoot> {
|
|
286
286
|
#model: CoverageModel|null;
|
|
287
287
|
#decorationManager: CoverageDecorationManager|null;
|
|
288
288
|
readonly #coverageTypeComboBoxSetting: Common.Settings.Setting<number>;
|
|
@@ -303,8 +303,7 @@ export class CoverageView extends UI.Widget.VBox {
|
|
|
303
303
|
|
|
304
304
|
constructor(view: View = DEFAULT_VIEW) {
|
|
305
305
|
super({
|
|
306
|
-
|
|
307
|
-
useShadowDom: true,
|
|
306
|
+
useShadowDom: 'pure',
|
|
308
307
|
delegatesFocus: true,
|
|
309
308
|
});
|
|
310
309
|
this.registerRequiredCSS(coverageViewStyles);
|