chrome-devtools-frontend 1.0.1570343 → 1.0.1571573
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/prompts/README.md +18 -0
- package/agents/prompts/devtools-imports.md +47 -0
- package/agents/prompts/verification.md +27 -0
- package/docs/contributing/infrastructure.md +22 -0
- package/front_end/core/host/AidaClient.ts +1 -1
- package/front_end/core/host/UserMetrics.ts +1 -1
- package/front_end/core/root/Runtime.ts +54 -34
- package/front_end/core/sdk/CSSProperty.ts +1 -1
- package/front_end/core/sdk/CookieModel.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +1 -1
- package/front_end/core/sdk/DebuggerModel.ts +2 -21
- package/front_end/core/sdk/OverlayModel.ts +3 -2
- package/front_end/core/sdk/SourceMap.ts +0 -9
- package/front_end/core/sdk/SourceMapScopesInfo.ts +0 -24
- package/front_end/entrypoints/main/MainImpl.ts +43 -18
- package/front_end/generated/SupportedCSSProperties.js +2 -6
- package/front_end/models/ai_assistance/BuiltInAi.ts +5 -4
- package/front_end/models/issues_manager/ContrastCheckTrigger.ts +2 -2
- package/front_end/models/javascript_metadata/NativeFunctions.js +8 -0
- package/front_end/models/trace/ModelImpl.ts +0 -4
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +1 -1
- package/front_end/panels/ai_assistance/PatchWidget.ts +10 -15
- package/front_end/panels/ai_assistance/SelectWorkspaceDialog.ts +5 -4
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +3 -2
- package/front_end/panels/application/FrameDetailsView.ts +2 -1
- package/front_end/panels/application/components/ReportsGrid.ts +2 -1
- package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +3 -5
- package/front_end/panels/common/AiCodeCompletionTeaser.ts +5 -5
- package/front_end/panels/console/ConsoleInsightTeaser.ts +10 -11
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewModel.ts +1 -1
- package/front_end/panels/elements/ComputedStyleModel.ts +11 -13
- package/front_end/panels/elements/ComputedStyleWidget.ts +3 -3
- package/front_end/panels/elements/ElementsPanel.ts +5 -2
- package/front_end/panels/elements/ElementsSidebarPane.ts +1 -1
- package/front_end/panels/elements/PlatformFontsWidget.ts +1 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -1
- package/front_end/panels/emulation/DeviceModeWrapper.ts +101 -62
- package/front_end/panels/explain/components/ConsoleInsight.ts +27 -23
- package/front_end/panels/explain/components/consoleInsight.css +1 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +0 -1
- package/front_end/panels/network/RequestTimingView.ts +4 -3
- package/front_end/panels/network/components/RequestHeadersView.css +2 -2
- package/front_end/panels/network/components/RequestHeadersView.ts +7 -6
- package/front_end/panels/profiler/HeapProfileView.ts +3 -3
- package/front_end/panels/profiler/HeapSnapshotView.ts +2 -2
- package/front_end/panels/recorder/RecorderController.ts +6 -7
- package/front_end/panels/recorder/recorderController.css +1 -1
- package/front_end/panels/security/CookieControlsView.ts +2 -2
- package/front_end/panels/security/CookieReportView.ts +7 -7
- package/front_end/panels/settings/AISettingsTab.ts +5 -5
- package/front_end/panels/settings/components/SyncSection.ts +4 -3
- package/front_end/panels/sources/CallStackSidebarPane.ts +4 -1
- package/front_end/panels/sources/NavigatorView.ts +1 -1
- package/front_end/panels/sources/SourcesPanel.ts +3 -1
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +1 -1
- package/front_end/panels/timeline/ThreadAppender.ts +1 -1
- package/front_end/panels/timeline/TimelineController.ts +4 -3
- package/front_end/panels/timeline/TimelinePanel.ts +4 -3
- package/front_end/panels/whats_new/ReleaseNoteView.ts +4 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/markdown_view/CodeBlock.ts +3 -6
- package/front_end/ui/components/markdown_view/MarkdownLink.ts +3 -4
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +3 -4
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +9 -6
- package/front_end/ui/components/panel_feedback/panelFeedback.css +2 -2
- package/front_end/ui/kit/link/Link.ts +1 -14
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/ContrastOverlay.ts +5 -4
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -1
- package/package.json +1 -1
|
@@ -123,73 +123,47 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
|
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
// Resolve to a remote object to ensure the node is alive in the context.
|
|
126
127
|
const object = await node.resolveToObject();
|
|
127
128
|
if (!object) {
|
|
128
129
|
return;
|
|
129
130
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
const paddingLeft = parseFloat(styles.paddingLeft);
|
|
146
|
-
|
|
147
|
-
// The position of the frame in it's parent.
|
|
148
|
-
const rect = frame.getBoundingClientRect();
|
|
149
|
-
|
|
150
|
-
// The offset of the parent frame's content relative to the
|
|
151
|
-
// document. If there is no parent frame, the offset is 0.
|
|
152
|
-
// In case of OOPiF, there is no access to the parent frame's
|
|
153
|
-
// offset.
|
|
154
|
-
const parentFrameOffset = getFrameOffset(frame.ownerDocument.defaultView?.frameElement ?? null);
|
|
155
|
-
|
|
156
|
-
// The scroll position of the frame.
|
|
157
|
-
const scrollX = frame.ownerDocument.defaultView?.scrollX ?? 0;
|
|
158
|
-
const scrollY = frame.ownerDocument.defaultView?.scrollY ?? 0;
|
|
159
|
-
|
|
160
|
-
return {
|
|
161
|
-
x: parentFrameOffset.x + rect.left + borderLeft + paddingLeft + scrollX,
|
|
162
|
-
y: parentFrameOffset.y + rect.top + borderTop + paddingTop + scrollY,
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// The bounding client rect of the node relative to the viewport.
|
|
167
|
-
const rect = this.getBoundingClientRect();
|
|
168
|
-
const frameOffset = getFrameOffset(this.ownerDocument.defaultView?.frameElement ?? null);
|
|
169
|
-
|
|
170
|
-
// The scroll position of the frame.
|
|
171
|
-
const scrollX = this.ownerDocument.defaultView?.scrollX ?? 0;
|
|
172
|
-
const scrollY = this.ownerDocument.defaultView?.scrollY ?? 0;
|
|
173
|
-
|
|
174
|
-
// The offset of the node's content relative to the top-level
|
|
175
|
-
// document is the sum of the element offset relative to the
|
|
176
|
-
// document's viewport, the document's scroll position, and the
|
|
177
|
-
// parent's offset relative to the top-level document.
|
|
178
|
-
return JSON.stringify({
|
|
179
|
-
x: rect.left + frameOffset.x + scrollX,
|
|
180
|
-
y: rect.top + frameOffset.y + scrollY,
|
|
181
|
-
width: rect.width,
|
|
182
|
-
height: rect.height,
|
|
183
|
-
scale: 1,
|
|
184
|
-
});
|
|
185
|
-
});
|
|
186
|
-
if (!result.object) {
|
|
187
|
-
throw new Error('Clipping error: could not get object data.');
|
|
131
|
+
|
|
132
|
+
// Get the Box Model via CDP.
|
|
133
|
+
// This returns the quads relative to the target's viewport.
|
|
134
|
+
// We use the 'border' quad to include the border and padding in the screenshot,
|
|
135
|
+
// matching the 'width' and 'height' properties which are also Border Box dimensions.
|
|
136
|
+
const nodeBoxModel = await node.boxModel();
|
|
137
|
+
if (!nodeBoxModel) {
|
|
138
|
+
throw new Error(`Unable to get box model of the node: ${new Error().stack}`);
|
|
139
|
+
}
|
|
140
|
+
const nodeBorderQuad = nodeBoxModel.border;
|
|
141
|
+
|
|
142
|
+
// Get Layout Metrics to account for the Visual Viewport scroll and zoom.
|
|
143
|
+
const metrics = await node.domModel().target().pageAgent().invoke_getLayoutMetrics();
|
|
144
|
+
if (metrics.getError()) {
|
|
145
|
+
throw new Error(`Unable to get metrics: ${new Error().stack}`);
|
|
188
146
|
}
|
|
189
|
-
|
|
190
|
-
const
|
|
191
|
-
const
|
|
192
|
-
|
|
147
|
+
|
|
148
|
+
const scrollX = metrics.cssVisualViewport.pageX;
|
|
149
|
+
const scrollY = metrics.cssVisualViewport.pageY;
|
|
150
|
+
|
|
151
|
+
// Calculate the global offset for OOPiFs (Out-of-Process iframes).
|
|
152
|
+
// This accounts for the position of the target's frame within the main page.
|
|
153
|
+
const {x: oopifOffsetX, y: oopifOffsetY} = await getOopifOffset(node.domModel().target());
|
|
154
|
+
|
|
155
|
+
// Assemble the final Clip.
|
|
156
|
+
// The absolute coordinates are: Global (OOPiF) + Viewport Scroll + Local Node Position (Border Box).
|
|
157
|
+
const clip = {
|
|
158
|
+
x: oopifOffsetX + scrollX + nodeBorderQuad[0],
|
|
159
|
+
y: oopifOffsetY + scrollY + nodeBorderQuad[1],
|
|
160
|
+
width: nodeBoxModel.width,
|
|
161
|
+
height: nodeBoxModel.height,
|
|
162
|
+
scale: 1,
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// Apply Zoom factor.
|
|
166
|
+
const zoom = metrics.cssVisualViewport.zoom ?? 1;
|
|
193
167
|
clip.x *= zoom;
|
|
194
168
|
clip.y *= zoom;
|
|
195
169
|
clip.width *= zoom;
|
|
@@ -210,3 +184,68 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
|
|
|
210
184
|
return false;
|
|
211
185
|
}
|
|
212
186
|
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Calculate the offset of the "Local Root" frame relative to the "Global Root" (the main frame).
|
|
190
|
+
* This involves traversing the CDP Targets for OOPiFs.
|
|
191
|
+
*/
|
|
192
|
+
async function getOopifOffset(target: SDK.Target.Target|null): Promise<{x: number, y: number}> {
|
|
193
|
+
if (!target) {
|
|
194
|
+
return {x: 0, y: 0};
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Get the parent target. If there's no parent (we are at root) or it's not a frame, we are done.
|
|
198
|
+
const parentTarget = target.parentTarget();
|
|
199
|
+
if (!parentTarget || parentTarget.type() !== SDK.Target.Type.FRAME) {
|
|
200
|
+
return {x: 0, y: 0};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Identify the current frame's ID to find its owner in the parent.
|
|
204
|
+
const frameId = target.model(SDK.ResourceTreeModel.ResourceTreeModel)?.mainFrame?.id;
|
|
205
|
+
if (!frameId) {
|
|
206
|
+
return {x: 0, y: 0};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Get the DOMModel of the parent to query the frame owner element.
|
|
210
|
+
const parentDOMModel = parentTarget.model(SDK.DOMModel.DOMModel);
|
|
211
|
+
if (!parentDOMModel) {
|
|
212
|
+
return {x: 0, y: 0};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Retrieve the frame owner node (e.g. the <iframe> element) in the parent's document.
|
|
216
|
+
const frameOwnerDeferred = await parentDOMModel.getOwnerNodeForFrame(frameId);
|
|
217
|
+
const frameOwner = await frameOwnerDeferred?.resolvePromise();
|
|
218
|
+
if (!frameOwner) {
|
|
219
|
+
return {x: 0, y: 0};
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Get the content box of the iframe element.
|
|
223
|
+
// This is relative to the parent target's viewport.
|
|
224
|
+
const boxModel = await frameOwner.boxModel();
|
|
225
|
+
if (!boxModel) {
|
|
226
|
+
return {x: 0, y: 0};
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// content is a Quad [x1, y1, x2, y2, x3, y3, x4, y4]
|
|
230
|
+
const contentQuad = boxModel.content;
|
|
231
|
+
const iframeContentX = contentQuad[0];
|
|
232
|
+
const iframeContentY = contentQuad[1];
|
|
233
|
+
|
|
234
|
+
// Get the scroll position of the parent target to convert viewport-relative coordinates
|
|
235
|
+
// to document-relative coordinates.
|
|
236
|
+
const parentMetrics = await parentTarget.pageAgent().invoke_getLayoutMetrics();
|
|
237
|
+
if (parentMetrics.getError()) {
|
|
238
|
+
return {x: 0, y: 0};
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const scrollX = parentMetrics.cssVisualViewport.pageX;
|
|
242
|
+
const scrollY = parentMetrics.cssVisualViewport.pageY;
|
|
243
|
+
|
|
244
|
+
// Recursively add the offset of the parent target itself (if it is also an OOPiF).
|
|
245
|
+
const parentOffset = await getOopifOffset(parentTarget);
|
|
246
|
+
|
|
247
|
+
return {
|
|
248
|
+
x: iframeContentX + scrollX + parentOffset.x,
|
|
249
|
+
y: iframeContentY + scrollY + parentOffset.y,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import '../../../ui/components/spinners/spinners.js';
|
|
6
|
+
import '../../../ui/kit/kit.js';
|
|
6
7
|
|
|
7
8
|
import * as Common from '../../../core/common/common.js';
|
|
8
9
|
import * as Host from '../../../core/host/host.js';
|
|
@@ -299,9 +300,9 @@ function renderSearchButton(onSearch: ViewInput['callbacks']['onSearch']): Lit.T
|
|
|
299
300
|
|
|
300
301
|
function renderLearnMoreAboutInsights(): Lit.TemplateResult {
|
|
301
302
|
// clang-format off
|
|
302
|
-
return html`<
|
|
303
|
+
return html`<devtools-link href=${LEARN_MORE_URL} class="link" .jslogContext=${'learn-more'}>
|
|
303
304
|
${i18nString(UIStrings.learnMore)}
|
|
304
|
-
</
|
|
305
|
+
</devtools-link>`;
|
|
305
306
|
// clang-format on
|
|
306
307
|
}
|
|
307
308
|
|
|
@@ -317,15 +318,15 @@ function maybeRenderSources(
|
|
|
317
318
|
<ol class="sources-list">
|
|
318
319
|
${directCitationUrls.map((url, index) => html`
|
|
319
320
|
<li>
|
|
320
|
-
<
|
|
321
|
+
<devtools-link
|
|
321
322
|
href=${url}
|
|
322
323
|
class=${Directives.classMap({link: true, highlighted: index === highlightedCitationIndex})}
|
|
323
|
-
|
|
324
|
+
.jslogContext=${'references.console-insights'}
|
|
324
325
|
${Directives.ref(e => { output.citationLinks[index] = e as HTMLElement; })}
|
|
325
326
|
@animationend=${onCitationAnimationEnd}
|
|
326
327
|
>
|
|
327
328
|
${url}
|
|
328
|
-
</
|
|
329
|
+
</devtools-link>
|
|
329
330
|
</li>
|
|
330
331
|
`)}
|
|
331
332
|
</ol>
|
|
@@ -343,13 +344,13 @@ function maybeRenderRelatedContent(relatedUrls: string[], directCitationUrls: st
|
|
|
343
344
|
<ul class="references-list">
|
|
344
345
|
${relatedUrls.map(relatedUrl => html`
|
|
345
346
|
<li>
|
|
346
|
-
<
|
|
347
|
+
<devtools-link
|
|
347
348
|
href=${relatedUrl}
|
|
348
349
|
class="link"
|
|
349
|
-
|
|
350
|
+
.jslogContext=${'references.console-insights'}
|
|
350
351
|
>
|
|
351
352
|
${relatedUrl}
|
|
352
|
-
</
|
|
353
|
+
</devtools-link>
|
|
353
354
|
</li>
|
|
354
355
|
`)}
|
|
355
356
|
</ul>
|
|
@@ -379,10 +380,10 @@ function renderInsightSourcesList(
|
|
|
379
380
|
<div class="insight-sources">
|
|
380
381
|
<ul>
|
|
381
382
|
${Directives.repeat(sources, item => item.value, item => {
|
|
382
|
-
return html`<li><
|
|
383
|
+
return html`<li><devtools-link class="link" title="${localizeType(item.type)} ${i18nString(UIStrings.opensInNewTab)}" href="data:text/plain;charset=utf-8,${encodeURIComponent(item.value)}" .jslogContext=${'source-' + item.type}>
|
|
383
384
|
<devtools-icon name="open-externally"></devtools-icon>
|
|
384
385
|
${localizeType(item.type)}
|
|
385
|
-
</
|
|
386
|
+
</devtools-link></li>`;
|
|
386
387
|
})}
|
|
387
388
|
${isPageReloadRecommended ? html`<li class="source-disclaimer">
|
|
388
389
|
<devtools-icon name="warning"></devtools-icon>
|
|
@@ -450,28 +451,28 @@ function renderConsentReminder(noLogging: boolean): Lit.TemplateResult {
|
|
|
450
451
|
<devtools-icon name="policy" class="medium">
|
|
451
452
|
</devtools-icon>
|
|
452
453
|
</div>
|
|
453
|
-
<div>Use of this feature is subject to the <
|
|
454
|
+
<div>Use of this feature is subject to the <devtools-link
|
|
454
455
|
href=${TERMS_OF_SERVICE_URL}
|
|
455
456
|
class="link"
|
|
456
|
-
|
|
457
|
+
.jslogContext=${'terms-of-service.console-insights'}>
|
|
457
458
|
Google Terms of Service
|
|
458
|
-
</
|
|
459
|
+
</devtools-link> and <devtools-link
|
|
459
460
|
href=${PRIVACY_POLICY_URL}
|
|
460
461
|
class="link"
|
|
461
|
-
|
|
462
|
+
.jslogContext=${'privacy-policy.console-insights'}>
|
|
462
463
|
Google Privacy Policy
|
|
463
|
-
</
|
|
464
|
+
</devtools-link>
|
|
464
465
|
</div>
|
|
465
466
|
<div>
|
|
466
467
|
<devtools-icon name="warning" class="medium">
|
|
467
468
|
</devtools-icon>
|
|
468
469
|
</div>
|
|
469
470
|
<div>
|
|
470
|
-
<
|
|
471
|
+
<devtools-link
|
|
471
472
|
href=${CODE_SNIPPET_WARNING_URL}
|
|
472
473
|
class="link"
|
|
473
|
-
|
|
474
|
-
>Use generated code snippets with caution</
|
|
474
|
+
.jslogContext=${'code-snippets-explainer.console-insights'}
|
|
475
|
+
>Use generated code snippets with caution</devtools-link>
|
|
475
476
|
</div>
|
|
476
477
|
</div>`;
|
|
477
478
|
// clang-format on
|
|
@@ -513,10 +514,10 @@ function renderDisclaimer(noLogging: boolean, onDisclaimerSettingsLink: () => vo
|
|
|
513
514
|
} <button class="link" role="link" @click=${onDisclaimerSettingsLink}
|
|
514
515
|
jslog=${VisualLogging.action('open-ai-settings').track({click: true})}>
|
|
515
516
|
Open settings
|
|
516
|
-
</button> or <
|
|
517
|
-
class="link"
|
|
517
|
+
</button> or <devtools-link href=${LEARN_MORE_URL}
|
|
518
|
+
class="link" .jslogContext=${'learn-more'}>
|
|
518
519
|
learn more
|
|
519
|
-
</
|
|
520
|
+
</devtools-link>
|
|
520
521
|
</span>`;
|
|
521
522
|
// clang-format on
|
|
522
523
|
}
|
|
@@ -549,7 +550,8 @@ function renderSignInFooter(onGoToSignIn: () => void): Lit.LitTemplate {
|
|
|
549
550
|
// clang-format on
|
|
550
551
|
}
|
|
551
552
|
|
|
552
|
-
function renderConsentReminderFooter(
|
|
553
|
+
function renderConsentReminderFooter(
|
|
554
|
+
onReminderSettingsLink: () => void, onConsentReminderConfirmed: () => void): Lit.LitTemplate {
|
|
553
555
|
// clang-format off
|
|
554
556
|
return html`
|
|
555
557
|
<div class="filler"></div>
|
|
@@ -575,7 +577,9 @@ function renderConsentReminderFooter(onReminderSettingsLink: () => void, onConse
|
|
|
575
577
|
// clang-format on
|
|
576
578
|
}
|
|
577
579
|
|
|
578
|
-
function renderInsightFooter(
|
|
580
|
+
function renderInsightFooter(
|
|
581
|
+
noLogging: ViewInput['noLogging'], selectedRating: ViewInput['selectedRating'],
|
|
582
|
+
callbacks: ViewInput['callbacks']): Lit.LitTemplate {
|
|
579
583
|
// clang-format off
|
|
580
584
|
return html`
|
|
581
585
|
<div class="disclaimer">
|
|
@@ -181,7 +181,6 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
181
181
|
render(
|
|
182
182
|
// clang-format off
|
|
183
183
|
html`
|
|
184
|
-
<style>${RequestConditionsDrawer}</style>
|
|
185
184
|
<devtools-toolbar jslog=${VisualLogging.toolbar()}>
|
|
186
185
|
<devtools-checkbox
|
|
187
186
|
?checked=${input.enabled}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
6
|
+
import '../../ui/kit/kit.js';
|
|
6
7
|
|
|
7
8
|
import * as Common from '../../core/common/common.js';
|
|
8
9
|
import * as Host from '../../core/host/host.js';
|
|
@@ -500,12 +501,12 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
500
501
|
</tr>` : nothing}
|
|
501
502
|
<tr class=network-timing-footer>
|
|
502
503
|
<td colspan=1>
|
|
503
|
-
<
|
|
504
|
+
<devtools-link
|
|
504
505
|
href="https://developer.chrome.com/docs/devtools/network/reference/#timing-explanation"
|
|
505
506
|
class=devtools-link
|
|
506
|
-
|
|
507
|
+
.jslogContext=${'explanation'}>
|
|
507
508
|
${i18nString(UIStrings.explanation)}
|
|
508
|
-
</
|
|
509
|
+
</devtools-link>
|
|
509
510
|
<td></td>
|
|
510
511
|
<td class=${input.wasThrottled ? 'throttled' : ''} title=${ifDefined(throttledRequestTitle)}>
|
|
511
512
|
${input.wasThrottled ? html` <devtools-icon name=watch @click=${revealThrottled}></devtools-icon>` : nothing}
|
|
@@ -2,6 +2,7 @@
|
|
|
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
4
|
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
5
|
+
import '../../../ui/kit/kit.js';
|
|
5
6
|
|
|
6
7
|
import * as Common from '../../../core/common/common.js';
|
|
7
8
|
import * as Host from '../../../core/host/host.js';
|
|
@@ -306,22 +307,22 @@ export class RequestHeadersView extends LegacyWrapper.LegacyWrapper.WrappableCom
|
|
|
306
307
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
307
308
|
// clang-format off
|
|
308
309
|
return html`
|
|
309
|
-
<
|
|
310
|
+
<devtools-link
|
|
310
311
|
href="https://goo.gle/devtools-override"
|
|
311
312
|
class="link devtools-link"
|
|
312
|
-
|
|
313
|
+
.jslogContext=${'devtools-override'}
|
|
313
314
|
>
|
|
314
315
|
<devtools-icon name="help" class="inline-icon medium">
|
|
315
316
|
</devtools-icon>
|
|
316
|
-
</
|
|
317
|
-
<
|
|
317
|
+
</devtools-link>
|
|
318
|
+
<devtools-link
|
|
318
319
|
@click=${revealHeadersFile}
|
|
319
320
|
class="link devtools-link"
|
|
320
321
|
title=${UIStrings.revealHeaderOverrides}
|
|
321
|
-
|
|
322
|
+
.jslogContext=${'reveal-header-overrides'}
|
|
322
323
|
>
|
|
323
324
|
${fileIcon}${Persistence.NetworkPersistenceManager.HEADERS_FILENAME}
|
|
324
|
-
</
|
|
325
|
+
</devtools-link>
|
|
325
326
|
`;
|
|
326
327
|
// clang-format on
|
|
327
328
|
}
|
|
@@ -144,7 +144,7 @@ export class HeapProfileView extends ProfileView implements UI.SearchableView.Se
|
|
|
144
144
|
|
|
145
145
|
this.timelineOverview = new HeapTimelineOverview();
|
|
146
146
|
|
|
147
|
-
if (Root.Runtime.experiments.isEnabled(
|
|
147
|
+
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.SAMPLING_HEAP_PROFILER_TIMELINE)) {
|
|
148
148
|
this.timelineOverview.addEventListener(Events.IDS_RANGE_CHANGED, this.onIdsRangeChanged.bind(this));
|
|
149
149
|
this.timelineOverview.show(this.element, this.element.firstChild);
|
|
150
150
|
this.timelineOverview.start();
|
|
@@ -368,7 +368,7 @@ export class SamplingHeapProfileType extends SamplingHeapProfileTypeBase {
|
|
|
368
368
|
}
|
|
369
369
|
|
|
370
370
|
override hasTemporaryView(): boolean {
|
|
371
|
-
return Root.Runtime.experiments.isEnabled(
|
|
371
|
+
return Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.SAMPLING_HEAP_PROFILER_TIMELINE);
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
override startSampling(): void {
|
|
@@ -378,7 +378,7 @@ export class SamplingHeapProfileType extends SamplingHeapProfileTypeBase {
|
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
void heapProfilerModel.startSampling();
|
|
381
|
-
if (Root.Runtime.experiments.isEnabled(
|
|
381
|
+
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.SAMPLING_HEAP_PROFILER_TIMELINE)) {
|
|
382
382
|
this.updateTimer = window.setTimeout(() => {
|
|
383
383
|
void this.updateStats();
|
|
384
384
|
}, this.updateIntervalMs);
|
|
@@ -1337,8 +1337,8 @@ export class HeapSnapshotProfileType extends
|
|
|
1337
1337
|
}
|
|
1338
1338
|
|
|
1339
1339
|
override customContent(): Element|null {
|
|
1340
|
-
const showOptionToExposeInternalsInHeapSnapshot =
|
|
1341
|
-
Root.Runtime.
|
|
1340
|
+
const showOptionToExposeInternalsInHeapSnapshot = Root.Runtime.experiments.isEnabled(
|
|
1341
|
+
Root.Runtime.ExperimentName.SHOW_OPTION_TO_EXPOSE_INTERNALS_IN_HEAP_SNAPSHOT);
|
|
1342
1342
|
const exposeInternalsInHeapSnapshotCheckbox =
|
|
1343
1343
|
SettingsUI.SettingsUI.createSettingCheckbox(i18nString(UIStrings.exposeInternals), this.exposeInternals);
|
|
1344
1344
|
this.customContentInternal = exposeInternalsInHeapSnapshotCheckbox;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright 2023 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
|
+
import '../../ui/kit/kit.js';
|
|
4
5
|
|
|
5
6
|
import * as Common from '../../core/common/common.js';
|
|
6
7
|
import * as Host from '../../core/host/host.js';
|
|
@@ -1193,13 +1194,11 @@ export class RecorderController extends LitElement {
|
|
|
1193
1194
|
<div class="empty-state-header">${i18nString(UIStrings.header)}</div>
|
|
1194
1195
|
<div class="empty-state-description">
|
|
1195
1196
|
<span>${i18nString(UIStrings.recordingDescription)}</span>
|
|
1196
|
-
<
|
|
1197
|
+
<devtools-link
|
|
1197
1198
|
class="x-link devtools-link"
|
|
1198
1199
|
href=${RECORDER_EXPLANATION_URL}
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
.context('learn-more')}
|
|
1202
|
-
>${i18nString(UIStrings.learnMore)}</x-link>
|
|
1200
|
+
.jslogContext=${'learn-more'}
|
|
1201
|
+
>${i18nString(UIStrings.learnMore)}</devtools-link>
|
|
1203
1202
|
</div>
|
|
1204
1203
|
<devtools-button .variant=${Buttons.Button.Variant.TONAL} jslogContext=${Actions.RecorderActions.CREATE_RECORDING} @click=${this.#onCreateNewRecording}>${i18nString(UIStrings.createRecording)}</devtools-button>
|
|
1205
1204
|
</div>
|
|
@@ -1474,9 +1473,9 @@ export class RecorderController extends LitElement {
|
|
|
1474
1473
|
}
|
|
1475
1474
|
></devtools-button>
|
|
1476
1475
|
<div class="feedback">
|
|
1477
|
-
<
|
|
1476
|
+
<devtools-link class="x-link" title=${i18nString(UIStrings.sendFeedback)} href=${
|
|
1478
1477
|
FEEDBACK_URL
|
|
1479
|
-
}
|
|
1478
|
+
} .jslogContext=${'feedback'}>${i18nString(UIStrings.sendFeedback)}</devtools-link>
|
|
1480
1479
|
</div>
|
|
1481
1480
|
<div class="separator"></div>
|
|
1482
1481
|
<devtools-shortcut-dialog
|
|
@@ -304,8 +304,8 @@ const DEFAULT_VIEW: View = (input: ViewInput, _output: object, target: HTMLEleme
|
|
|
304
304
|
class="medium"
|
|
305
305
|
style="color: var(--icon-warning); margin-right: var(--sys-size-2);">
|
|
306
306
|
</devtools-icon>
|
|
307
|
-
${
|
|
308
|
-
PH1:
|
|
307
|
+
${i18nFormatStringTemplate(UIStrings.upperDeprecationWarning, {
|
|
308
|
+
PH1: html`<devtools-link class="devtools-link" href="https://privacysandbox.com/news/privacy-sandbox-update/" .jslogContext=${'privacy-sandbox-update'}>${i18nString(UIStrings.blogPostLink)}</devtools-link>`,
|
|
309
309
|
})}
|
|
310
310
|
</div>
|
|
311
311
|
<div class="body">
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
5
5
|
|
|
6
6
|
import '../../ui/legacy/components/data_grid/data_grid.js';
|
|
7
|
+
import '../../ui/kit/kit.js';
|
|
7
8
|
|
|
8
9
|
import * as Common from '../../core/common/common.js';
|
|
9
10
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
@@ -15,7 +16,6 @@ import type * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
|
15
16
|
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
16
17
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
17
18
|
import * as Lit from '../../ui/lit/lit.js';
|
|
18
|
-
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
19
19
|
import * as NetworkForward from '../network/forward/forward.js';
|
|
20
20
|
|
|
21
21
|
import cookieReportViewStyles from './cookieReportView.css.js';
|
|
@@ -187,6 +187,7 @@ const UIStrings = {
|
|
|
187
187
|
const str_ = i18n.i18n.registerUIStrings('panels/security/CookieReportView.ts', UIStrings);
|
|
188
188
|
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
189
189
|
export const i18nFormatString = uiI18n.getFormatLocalizedString.bind(undefined, str_);
|
|
190
|
+
export const i18nFormatStringTemplate = uiI18n.getFormatLocalizedStringTemplate.bind(undefined, str_);
|
|
190
191
|
|
|
191
192
|
export interface ViewInput {
|
|
192
193
|
cookieRows: IssuesManager.CookieIssue.CookieReportInfo[];
|
|
@@ -221,11 +222,10 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
221
222
|
class="medium"
|
|
222
223
|
style="color: var(--icon-warning); margin-right: var(--sys-size-2);">
|
|
223
224
|
</devtools-icon>
|
|
224
|
-
${
|
|
225
|
-
PH1:
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
i18nString(UIStrings.blogPostLink)}</x-link>`,
|
|
225
|
+
${i18nFormatStringTemplate(UIStrings.upperDeprecationWarning, {
|
|
226
|
+
PH1:
|
|
227
|
+
html`<devtools-link class="devtools-link" href="https://privacysandbox.com/news/privacy-sandbox-update/" .jslogContext=${
|
|
228
|
+
'privacy-sandbox-update'}>${i18nString(UIStrings.blogPostLink)}</devtools-link>`,
|
|
229
229
|
})}
|
|
230
230
|
</div>
|
|
231
231
|
<div class="body">
|
|
@@ -239,7 +239,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
239
239
|
<div class="report overflow-auto">
|
|
240
240
|
<div class="header">
|
|
241
241
|
<h1>${i18nString(UIStrings.title)}</h1>
|
|
242
|
-
<div class="body">${i18nString(UIStrings.body)} <
|
|
242
|
+
<div class="body">${i18nString(UIStrings.body)} <devtools-link class="devtools-link" href="https://developers.google.com/privacy-sandbox/cookies/prepare/audit-cookies" .jslogContext=${'learn-more'}>${i18nString(UIStrings.learnMoreLink)}</devtools-link></div>
|
|
243
243
|
</div>
|
|
244
244
|
${input.cookieRows.length > 0 ?
|
|
245
245
|
html`
|
|
@@ -2,6 +2,8 @@
|
|
|
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
4
|
|
|
5
|
+
import '../../ui/kit/kit.js';
|
|
6
|
+
|
|
5
7
|
import * as Common from '../../core/common/common.js';
|
|
6
8
|
import * as Host from '../../core/host/host.js';
|
|
7
9
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
@@ -348,14 +350,12 @@ export const AI_SETTINGS_TAB_DEFAULT_VIEW: View = (input, _output, target): void
|
|
|
348
350
|
<h3 class="expansion-grid-whole-row">${i18nString(UIStrings.thingsToConsider)}</h3>
|
|
349
351
|
${settingData.toConsiderSettingItems.map(item => renderSettingItem(item))}
|
|
350
352
|
<div class="expansion-grid-whole-row">
|
|
351
|
-
<
|
|
353
|
+
<devtools-link
|
|
352
354
|
href=${settingData.learnMoreLink.url}
|
|
353
355
|
class="link"
|
|
354
356
|
tabindex=${tabindex}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
})}
|
|
358
|
-
>${i18nString(UIStrings.learnMore)}</x-link>
|
|
357
|
+
.jslogContext=${settingData.learnMoreLink.linkJSLogContext}
|
|
358
|
+
>${i18nString(UIStrings.learnMore)}</devtools-link>
|
|
359
359
|
</div>
|
|
360
360
|
</div>
|
|
361
361
|
</div>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import '../../../ui/components/settings/settings.js';
|
|
6
6
|
import '../../../ui/components/tooltips/tooltips.js';
|
|
7
|
+
import '../../../ui/kit/kit.js';
|
|
7
8
|
|
|
8
9
|
import * as Common from '../../../core/common/common.js';
|
|
9
10
|
import * as Host from '../../../core/host/host.js';
|
|
@@ -179,12 +180,12 @@ const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLElement)
|
|
|
179
180
|
<div class="plan-details">
|
|
180
181
|
${getGdpSubscriptionText(input.gdpProfile)}
|
|
181
182
|
·
|
|
182
|
-
<
|
|
183
|
-
.
|
|
183
|
+
<devtools-link
|
|
184
|
+
.jslogContext=${'view-profile'}
|
|
184
185
|
class="link"
|
|
185
186
|
href=${Host.GdpClient.GOOGLE_DEVELOPER_PROGRAM_PROFILE_LINK}>
|
|
186
187
|
${i18nString(UIStrings.viewProfile)}
|
|
187
|
-
</
|
|
188
|
+
</devtools-link></div>
|
|
188
189
|
${hasReceiveBadgesCheckbox ? html`
|
|
189
190
|
<div class="setting-container" ${ref(el => {
|
|
190
191
|
output.highlightReceiveBadgesSetting = () => {
|
|
@@ -45,6 +45,7 @@ import {Directives, html, render} from '../../ui/lit/lit.js';
|
|
|
45
45
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
46
46
|
|
|
47
47
|
import callStackSidebarPaneStyles from './callStackSidebarPane.css.js';
|
|
48
|
+
import {QuickSourceView, SourcesPanel} from './SourcesPanel.js';
|
|
48
49
|
|
|
49
50
|
const UIStrings = {
|
|
50
51
|
/**
|
|
@@ -285,7 +286,9 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
|
|
|
285
286
|
if (this.maxAsyncStackChainDepth === defaultMaxAsyncStackChainDepth) {
|
|
286
287
|
this.list.selectNextItem(true /* canWrap */, false /* center */);
|
|
287
288
|
const selectedItem = this.list.selectedItem();
|
|
288
|
-
if (selectedItem
|
|
289
|
+
if (selectedItem &&
|
|
290
|
+
(UI.Context.Context.instance().flavor(QuickSourceView) ||
|
|
291
|
+
UI.Context.Context.instance().flavor(SourcesPanel))) {
|
|
289
292
|
this.activateItem(selectedItem);
|
|
290
293
|
}
|
|
291
294
|
}
|
|
@@ -179,7 +179,7 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
|
|
|
179
179
|
private authoredNode?: NavigatorGroupTreeNode;
|
|
180
180
|
private deployedNode?: NavigatorGroupTreeNode;
|
|
181
181
|
private navigatorGroupByFolderSetting: Common.Settings.Setting<boolean>;
|
|
182
|
-
private navigatorGroupByAuthoredExperiment?:
|
|
182
|
+
private navigatorGroupByAuthoredExperiment?: Root.Runtime.ExperimentName;
|
|
183
183
|
#workspace!: Workspace.Workspace.WorkspaceImpl;
|
|
184
184
|
private groupByFrame?: boolean;
|
|
185
185
|
private groupByAuthored?: boolean;
|