chrome-devtools-frontend 1.0.1585664 → 1.0.1586699
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/front_end/core/common/Srcset.ts +61 -0
- package/front_end/core/common/common.ts +2 -0
- package/front_end/models/ai_assistance/AiConversation.ts +6 -2
- package/front_end/models/javascript_metadata/NativeFunctions.js +2 -2
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +1 -0
- package/front_end/panels/console/PromptBuilder.ts +15 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +4 -56
- package/front_end/panels/network/components/RequestHeadersView.ts +85 -153
- package/front_end/panels/sources/CallStackSidebarPane.ts +3 -7
- package/front_end/panels/utils/utils.ts +13 -5
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js +7 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +7 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js +7 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/common/util.ts +9 -8
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +31 -14
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +90 -77
- package/package.json +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
export const enum TokenType {
|
|
6
|
+
LITERAL = 0,
|
|
7
|
+
URL = 1
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface Token {
|
|
11
|
+
type: TokenType;
|
|
12
|
+
value: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Parsing of
|
|
17
|
+
* https://html.spec.whatwg.org/multipage/images.html#srcset-attribute and href
|
|
18
|
+
* attributes to identify URLs vs other text in the srcset.
|
|
19
|
+
*
|
|
20
|
+
* Note: this is probably not spec compliant.
|
|
21
|
+
*/
|
|
22
|
+
export function parseSrcset(value: string): Token[] {
|
|
23
|
+
const result: Token[] = [];
|
|
24
|
+
let i = 0;
|
|
25
|
+
while (value.length) {
|
|
26
|
+
if (i++ > 0) {
|
|
27
|
+
result.push({value: ' ', type: TokenType.LITERAL});
|
|
28
|
+
}
|
|
29
|
+
value = value.trim();
|
|
30
|
+
let url = '';
|
|
31
|
+
let descriptor = '';
|
|
32
|
+
const indexOfSpace = value.search(/\s/);
|
|
33
|
+
if (indexOfSpace === -1) {
|
|
34
|
+
url = value;
|
|
35
|
+
} else if (indexOfSpace > 0 && value[indexOfSpace - 1] === ',') {
|
|
36
|
+
url = value.substring(0, indexOfSpace);
|
|
37
|
+
} else {
|
|
38
|
+
url = value.substring(0, indexOfSpace);
|
|
39
|
+
const indexOfComma = value.indexOf(',', indexOfSpace);
|
|
40
|
+
if (indexOfComma !== -1) {
|
|
41
|
+
descriptor = value.substring(indexOfSpace, indexOfComma + 1);
|
|
42
|
+
} else {
|
|
43
|
+
descriptor = value.substring(indexOfSpace);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (url) {
|
|
48
|
+
if (url.endsWith(',')) {
|
|
49
|
+
result.push({value: url.substring(0, url.length - 1), type: TokenType.URL});
|
|
50
|
+
result.push({type: TokenType.LITERAL, value: ','});
|
|
51
|
+
} else {
|
|
52
|
+
result.push({value: url, type: TokenType.URL});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (descriptor) {
|
|
56
|
+
result.push({type: TokenType.LITERAL, value: descriptor});
|
|
57
|
+
}
|
|
58
|
+
value = value.substring(url.length + descriptor.length);
|
|
59
|
+
}
|
|
60
|
+
return result;
|
|
61
|
+
}
|
|
@@ -29,6 +29,7 @@ import * as SegmentedRange from './SegmentedRange.js';
|
|
|
29
29
|
import * as SettingRegistration from './SettingRegistration.js';
|
|
30
30
|
import * as Settings from './Settings.js';
|
|
31
31
|
import * as SimpleHistoryManager from './SimpleHistoryManager.js';
|
|
32
|
+
import * as Srcset from './Srcset.js';
|
|
32
33
|
import * as StringOutputStream from './StringOutputStream.js';
|
|
33
34
|
import * as TextDictionary from './TextDictionary.js';
|
|
34
35
|
import * as Throttler from './Throttler.js';
|
|
@@ -68,6 +69,7 @@ export {
|
|
|
68
69
|
SettingRegistration,
|
|
69
70
|
Settings,
|
|
70
71
|
SimpleHistoryManager,
|
|
72
|
+
Srcset,
|
|
71
73
|
StringOutputStream,
|
|
72
74
|
TextDictionary,
|
|
73
75
|
Throttler,
|
|
@@ -456,16 +456,20 @@ Time: ${micros(time)}`;
|
|
|
456
456
|
},
|
|
457
457
|
options.multimodalInput,
|
|
458
458
|
)) {
|
|
459
|
+
// Add to history if relevant
|
|
459
460
|
if (shouldAddToHistory(data)) {
|
|
460
461
|
void this.addHistoryItem(data);
|
|
461
462
|
}
|
|
463
|
+
// Always yield the data
|
|
464
|
+
yield data;
|
|
465
|
+
|
|
466
|
+
// If we change the context
|
|
467
|
+
// requery with the specialized agent.
|
|
462
468
|
if (data.type === ResponseType.CONTEXT_CHANGE) {
|
|
463
469
|
this.setContext(data.context);
|
|
464
470
|
yield* this.#runAgent(initialQuery, options);
|
|
465
471
|
return;
|
|
466
472
|
}
|
|
467
|
-
|
|
468
|
-
yield data;
|
|
469
473
|
}
|
|
470
474
|
}
|
|
471
475
|
|
|
@@ -6624,8 +6624,8 @@ export const NativeFunctions = [
|
|
|
6624
6624
|
signatures: [["type","?eventInitDict"]]
|
|
6625
6625
|
},
|
|
6626
6626
|
{
|
|
6627
|
-
name: "
|
|
6628
|
-
signatures: [["
|
|
6627
|
+
name: "getValueRange",
|
|
6628
|
+
signatures: [["start","end"]]
|
|
6629
6629
|
},
|
|
6630
6630
|
{
|
|
6631
6631
|
name: "getBoxQuads",
|
|
@@ -9,6 +9,7 @@ import * as Formatter from '../../models/formatter/formatter.js';
|
|
|
9
9
|
import * as Logs from '../../models/logs/logs.js';
|
|
10
10
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
11
11
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
12
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
|
12
13
|
|
|
13
14
|
import type {ConsoleViewMessage} from './ConsoleViewMessage.js';
|
|
14
15
|
|
|
@@ -85,7 +86,7 @@ export class PromptBuilder {
|
|
|
85
86
|
|
|
86
87
|
const relatedCode = sourceCode?.text ? formatRelatedCode(sourceCode) : '';
|
|
87
88
|
const relatedRequest = request ? formatNetworkRequest(request) : '';
|
|
88
|
-
const stacktrace = sourcesTypes.includes(SourceType.STACKTRACE) ? formatStackTrace(this.#consoleMessage) : '';
|
|
89
|
+
const stacktrace = sourcesTypes.includes(SourceType.STACKTRACE) ? await formatStackTrace(this.#consoleMessage) : '';
|
|
89
90
|
|
|
90
91
|
const message = formatConsoleMessage(this.#consoleMessage);
|
|
91
92
|
|
|
@@ -290,14 +291,25 @@ export function formatConsoleMessage(message: ConsoleViewMessage): string {
|
|
|
290
291
|
* This formats the stacktrace from the console message which might or might not
|
|
291
292
|
* match the content of stacktrace(s) in the console message arguments.
|
|
292
293
|
*/
|
|
293
|
-
|
|
294
|
+
async function formatStackTrace(message: ConsoleViewMessage): Promise<string> {
|
|
294
295
|
const previewContainer = message.contentElement().querySelector('.stack-preview-container');
|
|
295
296
|
|
|
296
297
|
if (!previewContainer) {
|
|
297
298
|
return '';
|
|
298
299
|
}
|
|
299
300
|
|
|
300
|
-
const
|
|
301
|
+
const widget =
|
|
302
|
+
UI.Widget.Widget.get(previewContainer) as Components.JSPresentationUtils.StackTracePreviewContent | undefined;
|
|
303
|
+
if (!widget) {
|
|
304
|
+
return '';
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
await widget.updateComplete;
|
|
308
|
+
|
|
309
|
+
// TODO(crbug.com/433162438): Get the `StackTrace` from the widget and render that instead
|
|
310
|
+
// of crawling the DOM. `StackTrace` is source mapped and has ignore listing.
|
|
311
|
+
|
|
312
|
+
const preview = widget.contentElement.querySelector('.stack-preview-container') as HTMLElement;
|
|
301
313
|
|
|
302
314
|
const nodes = preview.childTextNodes();
|
|
303
315
|
// Gets application-level source mapped stack trace taking the ignore list
|
|
@@ -634,64 +634,12 @@ function renderTitle(
|
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
636
|
|
|
637
|
-
|
|
638
|
-
LITERAL = 0,
|
|
639
|
-
LINK = 1
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
interface SrcsetToken {
|
|
643
|
-
type: SrcsetTokenType;
|
|
644
|
-
value: string;
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
// FIXME: find a home for this in SDK.
|
|
648
|
-
function parseSrcset(value: string): SrcsetToken[] {
|
|
649
|
-
const result: SrcsetToken[] = [];
|
|
650
|
-
let i = 0;
|
|
651
|
-
while (value.length) {
|
|
652
|
-
if (i++ > 0) {
|
|
653
|
-
result.push({value: ' ', type: SrcsetTokenType.LITERAL});
|
|
654
|
-
}
|
|
655
|
-
value = value.trim();
|
|
656
|
-
let url = '';
|
|
657
|
-
let descriptor = '';
|
|
658
|
-
const indexOfSpace = value.search(/\s/);
|
|
659
|
-
if (indexOfSpace === -1) {
|
|
660
|
-
url = value;
|
|
661
|
-
} else if (indexOfSpace > 0 && value[indexOfSpace - 1] === ',') {
|
|
662
|
-
url = value.substring(0, indexOfSpace);
|
|
663
|
-
} else {
|
|
664
|
-
url = value.substring(0, indexOfSpace);
|
|
665
|
-
const indexOfComma = value.indexOf(',', indexOfSpace);
|
|
666
|
-
if (indexOfComma !== -1) {
|
|
667
|
-
descriptor = value.substring(indexOfSpace, indexOfComma + 1);
|
|
668
|
-
} else {
|
|
669
|
-
descriptor = value.substring(indexOfSpace);
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
if (url) {
|
|
674
|
-
if (url.endsWith(',')) {
|
|
675
|
-
result.push({value: url.substring(0, url.length - 1), type: SrcsetTokenType.LINK});
|
|
676
|
-
result.push({type: SrcsetTokenType.LITERAL, value: ','});
|
|
677
|
-
} else {
|
|
678
|
-
result.push({value: url, type: SrcsetTokenType.LINK});
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
if (descriptor) {
|
|
682
|
-
result.push({type: SrcsetTokenType.LITERAL, value: descriptor});
|
|
683
|
-
}
|
|
684
|
-
value = value.substring(url.length + descriptor.length);
|
|
685
|
-
}
|
|
686
|
-
return result;
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
function renderLinkifiedSrcset(tokens: SrcsetToken[], node: SDK.DOMModel.DOMNode): Lit.TemplateResult {
|
|
637
|
+
function renderLinkifiedSrcset(tokens: Common.Srcset.Token[], node: SDK.DOMModel.DOMNode): Lit.TemplateResult {
|
|
690
638
|
return html`${repeat(tokens, token => {
|
|
691
639
|
switch (token.type) {
|
|
692
|
-
case
|
|
640
|
+
case Common.Srcset.TokenType.URL:
|
|
693
641
|
return renderLinkifiedValue(token.value, node);
|
|
694
|
-
case
|
|
642
|
+
case Common.Srcset.TokenType.LITERAL:
|
|
695
643
|
return token.value;
|
|
696
644
|
}
|
|
697
645
|
})}`;
|
|
@@ -849,7 +797,7 @@ function renderAttribute(
|
|
|
849
797
|
Boolean(updateRecord?.isAttributeModified(name) && hasText),
|
|
850
798
|
DOM_UPDATE_ANIMATION_CLASS_NAME)} ${valueRelationRefDirective} ${withEntitiesRef}>
|
|
851
799
|
${valueType === ValueType.SRC ? renderLinkifiedValue(value, node) : nothing}
|
|
852
|
-
${valueType === ValueType.SRCSET ? renderLinkifiedSrcset(parseSrcset(value), node) : nothing}
|
|
800
|
+
${valueType === ValueType.SRCSET ? renderLinkifiedSrcset(Common.Srcset.parseSrcset(value), node) : nothing}
|
|
853
801
|
</span>"` :
|
|
854
802
|
nothing}</span>`;
|
|
855
803
|
// clang-format on
|
|
@@ -195,6 +195,7 @@ export class RequestHeadersView extends LegacyWrapper.LegacyWrapper.WrappableCom
|
|
|
195
195
|
// clang-format off
|
|
196
196
|
render(html`
|
|
197
197
|
<style>${requestHeadersViewStyles}</style>
|
|
198
|
+
<style>${Input.checkboxStyles}</style>
|
|
198
199
|
${this.#renderGeneralSection()}
|
|
199
200
|
${this.#renderEarlyHintsHeaders()}
|
|
200
201
|
${this.#renderResponseHeaders()}
|
|
@@ -216,31 +217,22 @@ export class RequestHeadersView extends LegacyWrapper.LegacyWrapper.WrappableCom
|
|
|
216
217
|
};
|
|
217
218
|
|
|
218
219
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
forceOpen: this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.EARLY_HINTS,
|
|
230
|
-
loggingContext: 'early-hints-headers',
|
|
231
|
-
} as CategoryData}
|
|
232
|
-
aria-label=${i18nString(UIStrings.earlyHintsHeaders)}
|
|
233
|
-
>
|
|
234
|
-
${this.#showResponseHeadersText ?
|
|
235
|
-
this.#renderRawHeaders(this.#request.responseHeadersText, true) : html`
|
|
220
|
+
return renderCategory({
|
|
221
|
+
onToggleRawHeaders: toggleShowRaw,
|
|
222
|
+
name: 'early-hints-headers',
|
|
223
|
+
title: i18nString(UIStrings.earlyHintsHeaders),
|
|
224
|
+
headerCount: this.#request.earlyHintsHeaders.length,
|
|
225
|
+
checked: undefined,
|
|
226
|
+
additionalContent: undefined,
|
|
227
|
+
forceOpen: this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.EARLY_HINTS,
|
|
228
|
+
loggingContext: 'early-hints-headers',
|
|
229
|
+
contents: this.#showResponseHeadersText ? this.#renderRawHeaders(this.#request.responseHeadersText, true) : html`
|
|
236
230
|
<devtools-early-hints-header-section .data=${{
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
`
|
|
241
|
-
|
|
242
|
-
`;
|
|
243
|
-
// clang-format on
|
|
231
|
+
request: this.#request,
|
|
232
|
+
toReveal: this.#toReveal,
|
|
233
|
+
} as ResponseHeaderSectionData}></devtools-early-hints-header-section>
|
|
234
|
+
`
|
|
235
|
+
});
|
|
244
236
|
}
|
|
245
237
|
|
|
246
238
|
#renderResponseHeaders(): Lit.LitTemplate {
|
|
@@ -253,32 +245,25 @@ export class RequestHeadersView extends LegacyWrapper.LegacyWrapper.WrappableCom
|
|
|
253
245
|
void this.render();
|
|
254
246
|
};
|
|
255
247
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
loggingContext: 'response-headers',
|
|
269
|
-
} as CategoryData}
|
|
270
|
-
aria-label=${i18nString(UIStrings.responseHeaders)}
|
|
271
|
-
>
|
|
272
|
-
${this.#showResponseHeadersText ?
|
|
273
|
-
this.#renderRawHeaders(this.#request.responseHeadersText, true) : html`
|
|
248
|
+
return renderCategory({
|
|
249
|
+
onToggleRawHeaders: toggleShowRaw,
|
|
250
|
+
name: 'response-headers',
|
|
251
|
+
title: i18nString(UIStrings.responseHeaders),
|
|
252
|
+
headerCount: this.#request.sortedResponseHeaders.length,
|
|
253
|
+
checked: this.#request.responseHeadersText ? this.#showResponseHeadersText : undefined,
|
|
254
|
+
additionalContent: this.#renderHeaderOverridesLink(),
|
|
255
|
+
forceOpen: this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.RESPONSE,
|
|
256
|
+
loggingContext: 'response-headers',
|
|
257
|
+
contents: this.#showResponseHeadersText ?
|
|
258
|
+
this.#renderRawHeaders(this.#request.responseHeadersText, true) :
|
|
259
|
+
html`
|
|
274
260
|
<devtools-response-header-section .data=${{
|
|
275
261
|
request: this.#request,
|
|
276
262
|
toReveal: this.#toReveal,
|
|
277
|
-
} as ResponseHeaderSectionData} jslog=${
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
// clang-format on
|
|
263
|
+
} as ResponseHeaderSectionData} jslog=${
|
|
264
|
+
VisualLogging.section('response-headers')}></devtools-response-header-section>
|
|
265
|
+
`
|
|
266
|
+
});
|
|
282
267
|
}
|
|
283
268
|
|
|
284
269
|
#renderHeaderOverridesLink(): Lit.LitTemplate {
|
|
@@ -348,31 +333,22 @@ export class RequestHeadersView extends LegacyWrapper.LegacyWrapper.WrappableCom
|
|
|
348
333
|
void this.render();
|
|
349
334
|
};
|
|
350
335
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
loggingContext: 'request-headers',
|
|
363
|
-
} as CategoryData}
|
|
364
|
-
aria-label=${i18nString(UIStrings.requestHeaders)}
|
|
365
|
-
>
|
|
366
|
-
${(this.#showRequestHeadersText && requestHeadersText) ?
|
|
367
|
-
this.#renderRawHeaders(requestHeadersText, false) : html`
|
|
336
|
+
return renderCategory({
|
|
337
|
+
onToggleRawHeaders: toggleShowRaw,
|
|
338
|
+
name: 'request-headers',
|
|
339
|
+
title: i18nString(UIStrings.requestHeaders),
|
|
340
|
+
headerCount: this.#request.requestHeaders().length,
|
|
341
|
+
checked: requestHeadersText ? this.#showRequestHeadersText : undefined,
|
|
342
|
+
forceOpen: this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.REQUEST,
|
|
343
|
+
loggingContext: 'request-headers',
|
|
344
|
+
contents: (this.#showRequestHeadersText && requestHeadersText) ?
|
|
345
|
+
this.#renderRawHeaders(requestHeadersText, false) :
|
|
346
|
+
html`
|
|
368
347
|
<devtools-widget .widgetConfig=${UI.Widget.widgetConfig(RequestHeaderSection, {
|
|
369
348
|
request: this.#request,
|
|
370
349
|
toReveal: this.#toReveal,
|
|
371
|
-
})} jslog=${VisualLogging.section('request-headers')}></devtools-widget
|
|
372
|
-
|
|
373
|
-
</devtools-request-headers-category>
|
|
374
|
-
`;
|
|
375
|
-
// clang-format on
|
|
350
|
+
})} jslog=${VisualLogging.section('request-headers')}></devtools-widget>`
|
|
351
|
+
});
|
|
376
352
|
}
|
|
377
353
|
|
|
378
354
|
#renderRawHeaders(rawHeadersText: string, forResponseHeaders: boolean): Lit.TemplateResult {
|
|
@@ -466,19 +442,13 @@ export class RequestHeadersView extends LegacyWrapper.LegacyWrapper.WrappableCom
|
|
|
466
442
|
|
|
467
443
|
const statusText = [this.#request.statusCode, this.#request.getInferredStatusText(), comment].join(' ');
|
|
468
444
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
forceOpen: this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.GENERAL,
|
|
477
|
-
loggingContext: 'general',
|
|
478
|
-
} as CategoryData}
|
|
479
|
-
aria-label=${i18nString(UIStrings.general)}
|
|
480
|
-
>
|
|
481
|
-
<div jslog=${VisualLogging.section('general')}>
|
|
445
|
+
return renderCategory({
|
|
446
|
+
name: 'general',
|
|
447
|
+
title: i18nString(UIStrings.general),
|
|
448
|
+
forceOpen: this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.GENERAL,
|
|
449
|
+
loggingContext: 'general',
|
|
450
|
+
// clang-format off
|
|
451
|
+
contents: html`<div jslog=${VisualLogging.section('general')}>
|
|
482
452
|
${this.#renderGeneralRow(i18nString(UIStrings.requestUrl), this.#request.url(), 'request-url')}
|
|
483
453
|
${this.#request.statusCode? this.#renderGeneralRow(i18nString(UIStrings.requestMethod),
|
|
484
454
|
this.#request.requestMethod, 'request-method') : Lit.nothing}
|
|
@@ -488,9 +458,7 @@ export class RequestHeadersView extends LegacyWrapper.LegacyWrapper.WrappableCom
|
|
|
488
458
|
this.#request.remoteAddress(), 'remote-address') : Lit.nothing}
|
|
489
459
|
${this.#request.referrerPolicy()? this.#renderGeneralRow(i18nString(UIStrings.referrerPolicy),
|
|
490
460
|
String(this.#request.referrerPolicy()), 'referrer-policy') : Lit.nothing}
|
|
491
|
-
</div
|
|
492
|
-
</devtools-request-headers-category>
|
|
493
|
-
`;
|
|
461
|
+
</div>`});
|
|
494
462
|
// clang-format on
|
|
495
463
|
}
|
|
496
464
|
|
|
@@ -522,87 +490,53 @@ export class RequestHeadersView extends LegacyWrapper.LegacyWrapper.WrappableCom
|
|
|
522
490
|
}
|
|
523
491
|
}
|
|
524
492
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
forceOpen
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
545
|
-
#expandedSetting?: Common.Settings.Setting<boolean>;
|
|
546
|
-
#title: Common.UIString.LocalizedString = Common.UIString.LocalizedEmptyString;
|
|
547
|
-
#headerCount?: number = undefined;
|
|
548
|
-
#checked: boolean|undefined = undefined;
|
|
549
|
-
#additionalContent: Lit.LitTemplate|undefined = undefined;
|
|
550
|
-
#forceOpen: boolean|undefined = undefined;
|
|
551
|
-
#loggingContext = '';
|
|
552
|
-
|
|
553
|
-
set data(data: CategoryData) {
|
|
554
|
-
this.#title = data.title;
|
|
555
|
-
this.#expandedSetting =
|
|
556
|
-
Common.Settings.Settings.instance().createSetting('request-info-' + data.name + '-category-expanded', true);
|
|
557
|
-
this.#headerCount = data.headerCount;
|
|
558
|
-
this.#checked = data.checked;
|
|
559
|
-
this.#additionalContent = data.additionalContent;
|
|
560
|
-
this.#forceOpen = data.forceOpen;
|
|
561
|
-
this.#loggingContext = data.loggingContext;
|
|
562
|
-
this.#render();
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
#onCheckboxToggle(): void {
|
|
566
|
-
this.dispatchEvent(new ToggleRawHeadersEvent());
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
#render(): void {
|
|
570
|
-
const isOpen = (this.#expandedSetting ? this.#expandedSetting.get() : true) || this.#forceOpen;
|
|
571
|
-
// Disabled until https://crbug.com/1079231 is fixed.
|
|
572
|
-
// clang-format off
|
|
573
|
-
render(html`
|
|
574
|
-
<style>${requestHeadersViewStyles}</style>
|
|
575
|
-
<style>${Input.checkboxStyles}</style>
|
|
576
|
-
<details ?open=${isOpen} @toggle=${this.#onToggle}>
|
|
493
|
+
function renderCategory(data: {
|
|
494
|
+
name: string,
|
|
495
|
+
title: Common.UIString.LocalizedString,
|
|
496
|
+
contents: Lit.LitTemplate,
|
|
497
|
+
loggingContext: string,
|
|
498
|
+
headerCount?: number,
|
|
499
|
+
checked?: boolean,
|
|
500
|
+
additionalContent?: Lit.LitTemplate,
|
|
501
|
+
forceOpen?: boolean,
|
|
502
|
+
onToggleRawHeaders?: () => void,
|
|
503
|
+
}): Lit.LitTemplate {
|
|
504
|
+
const expandedSetting =
|
|
505
|
+
Common.Settings.Settings.instance().createSetting('request-info-' + data.name + '-category-expanded', true);
|
|
506
|
+
|
|
507
|
+
const isOpen = (expandedSetting ? expandedSetting.get() : true) || data.forceOpen;
|
|
508
|
+
// Disabled until https://crbug.com/1079231 is fixed.
|
|
509
|
+
// clang-format off
|
|
510
|
+
return html`
|
|
511
|
+
<details ?open=${isOpen} @toggle=${onToggle} aria-label=${data.title}>
|
|
577
512
|
<summary
|
|
578
513
|
class="header"
|
|
579
|
-
@keydown=${
|
|
580
|
-
jslog=${VisualLogging.sectionHeader().track({click: true}).context(
|
|
514
|
+
@keydown=${onSummaryKeyDown}
|
|
515
|
+
jslog=${VisualLogging.sectionHeader().track({click: true}).context(data.loggingContext)}
|
|
581
516
|
>
|
|
582
517
|
<div class="header-grid-container">
|
|
583
518
|
<div>
|
|
584
|
-
${
|
|
585
|
-
html`<span class="header-count"> (${
|
|
519
|
+
${data.title}${data.headerCount !== undefined ?
|
|
520
|
+
html`<span class="header-count"> (${data.headerCount})</span>` :
|
|
586
521
|
Lit.nothing
|
|
587
522
|
}
|
|
588
523
|
</div>
|
|
589
524
|
<div class="hide-when-closed">
|
|
590
|
-
${
|
|
591
|
-
<devtools-checkbox .checked=${
|
|
525
|
+
${data.checked !== undefined ? html`
|
|
526
|
+
<devtools-checkbox .checked=${data.checked} @change=${data.onToggleRawHeaders}
|
|
592
527
|
jslog=${VisualLogging.toggle('raw-headers').track({change: true})}>
|
|
593
528
|
${i18nString(UIStrings.raw)}
|
|
594
529
|
</devtools-checkbox>` : Lit.nothing}
|
|
595
530
|
</div>
|
|
596
|
-
<div class="hide-when-closed">${
|
|
531
|
+
<div class="hide-when-closed">${data.additionalContent}</div>
|
|
597
532
|
</div>
|
|
598
533
|
</summary>
|
|
599
|
-
|
|
534
|
+
${data.contents}
|
|
600
535
|
</details>
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
}
|
|
536
|
+
`;
|
|
537
|
+
// clang-format on
|
|
604
538
|
|
|
605
|
-
|
|
539
|
+
function onSummaryKeyDown(event: KeyboardEvent): void {
|
|
606
540
|
if (!event.target) {
|
|
607
541
|
return;
|
|
608
542
|
}
|
|
@@ -621,17 +555,15 @@ export class Category extends HTMLElement {
|
|
|
621
555
|
}
|
|
622
556
|
}
|
|
623
557
|
|
|
624
|
-
|
|
625
|
-
|
|
558
|
+
function onToggle(event: Event): void {
|
|
559
|
+
expandedSetting?.set((event.target as HTMLDetailsElement).open);
|
|
626
560
|
}
|
|
627
561
|
}
|
|
628
562
|
|
|
629
563
|
customElements.define('devtools-request-headers', RequestHeadersView);
|
|
630
|
-
customElements.define('devtools-request-headers-category', Category);
|
|
631
564
|
|
|
632
565
|
declare global {
|
|
633
566
|
interface HTMLElementTagNameMap {
|
|
634
567
|
'devtools-request-headers': RequestHeadersView;
|
|
635
|
-
'devtools-request-headers-category': Category;
|
|
636
568
|
}
|
|
637
569
|
}
|
|
@@ -253,15 +253,12 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
|
|
|
253
253
|
|
|
254
254
|
let {maxAsyncStackChainDepth} = this;
|
|
255
255
|
let hasMore = false;
|
|
256
|
-
let previousFragment: StackTrace.StackTrace.Fragment = this.#stackTrace.syncFragment;
|
|
257
256
|
for (const asyncFragment of this.#stackTrace.asyncFragments) {
|
|
258
|
-
items.push(Item.createForAsyncHeader(
|
|
257
|
+
items.push(Item.createForAsyncHeader(this.#stackTrace, asyncFragment));
|
|
259
258
|
for (const frame of asyncFragment.frames) {
|
|
260
259
|
items.push(Item.createForFrame(frame));
|
|
261
260
|
}
|
|
262
261
|
|
|
263
|
-
previousFragment = asyncFragment;
|
|
264
|
-
|
|
265
262
|
if (--maxAsyncStackChainDepth <= 0) {
|
|
266
263
|
hasMore = asyncFragment !== this.#stackTrace.asyncFragments.at(-1);
|
|
267
264
|
break;
|
|
@@ -546,9 +543,8 @@ export class Item {
|
|
|
546
543
|
}
|
|
547
544
|
|
|
548
545
|
static createForAsyncHeader(
|
|
549
|
-
|
|
550
|
-
const description = UI.UIUtils.
|
|
551
|
-
fragment.description, previousFragment.frames.map(f => ({functionName: f.name ?? ''})));
|
|
546
|
+
stackTrace: StackTrace.StackTrace.StackTrace, fragment: StackTrace.StackTrace.AsyncFragment): Item {
|
|
547
|
+
const description = UI.UIUtils.asyncFragmentLabel(stackTrace, fragment);
|
|
552
548
|
const item = new Item(description);
|
|
553
549
|
item.isAsyncHeader = true;
|
|
554
550
|
return item;
|
|
@@ -151,12 +151,20 @@ export class PanelUtils {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
if (type === Common.ResourceType.resourceTypes.Image) {
|
|
154
|
+
// clang-format off
|
|
154
155
|
return html`<div class="image icon">
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
<img
|
|
157
|
+
class="image-network-icon-preview"
|
|
158
|
+
title=${iconTitleForRequest(request)}
|
|
159
|
+
alt=${iconTitleForRequest(request)}
|
|
160
|
+
${ref(el => {
|
|
161
|
+
if (el) {
|
|
162
|
+
void request.populateImageSource(el as HTMLImageElement);
|
|
163
|
+
}
|
|
164
|
+
})}
|
|
165
|
+
/>
|
|
166
|
+
</div>`;
|
|
167
|
+
// clang-format on
|
|
160
168
|
}
|
|
161
169
|
|
|
162
170
|
// Exclude Manifest here because it has mimeType:application/json but it has its own icon
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: https://chromium.googlesource.com/chromium/src
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: 649f914735bb39cbd9bfe68673921ced1cc2e71f
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Name: Puppeteer Core
|
|
2
2
|
Short Name: Puppeteer Core
|
|
3
3
|
URL: https://github.com/puppeteer/puppeteer/tree/main/packages/puppeteer-core
|
|
4
|
-
Version: 24.37.
|
|
4
|
+
Version: 24.37.4
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
License File: LICENSE
|
|
7
|
-
Revision:
|
|
7
|
+
Revision: c771d9cc0c6c3611532e18d89291c2d734f736ab
|
|
8
8
|
Security Critical: no
|
|
9
9
|
Shipped: yes
|
|
10
10
|
Update Mechanism: Autoroll
|
|
@@ -267,7 +267,7 @@ class FrameManager extends EventEmitter_js_1.EventEmitter {
|
|
|
267
267
|
frame.updateClient(target._session());
|
|
268
268
|
}
|
|
269
269
|
this.setupEventListeners(target._session());
|
|
270
|
-
void this.initialize(target._session(), frame);
|
|
270
|
+
void this.initialize(target._session(), frame).catch(util_js_1.debugError);
|
|
271
271
|
}
|
|
272
272
|
_deviceRequestPromptManager(client) {
|
|
273
273
|
let manager = this.#deviceRequestPromptManagerMap.get(client);
|