chrome-devtools-frontend 1.0.1736236 → 1.0.1738725
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/rules/ui-and-widgets/ui-css-scoping-and-flex-layout.md +1 -1
- package/.agents/skills/version-control/SKILL.md +63 -11
- package/docs/devtools-protocol.md +3 -1
- package/eslint.config.mjs +0 -6
- package/front_end/core/host/AidaClient.ts +14 -36
- package/front_end/core/host/AidaGcaTranslation.ts +8 -5
- package/front_end/core/root/Runtime.ts +0 -5
- package/front_end/design_system_tokens.css +1 -0
- package/front_end/entrypoints/main/GlobalAiButton.ts +2 -9
- package/front_end/entrypoints/main/MainImpl.ts +0 -4
- package/front_end/generated/SupportedCSSProperties.ts +8 -23
- package/front_end/models/ai-utils/AiUtils.ts +1 -5
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -18
- package/front_end/models/ai_assistance/contexts/FileContext.ts +1 -2
- package/front_end/models/ai_assistance/tools/ListSources.ts +3 -1
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +0 -6
- package/front_end/models/javascript_metadata/NativeFunctions.ts +9 -5
- package/front_end/models/trace/EventsSerializer.ts +0 -8
- package/front_end/models/workspace/UISourceCode.ts +30 -8
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +1 -7
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +15 -34
- package/front_end/panels/ai_assistance/components/ChatView.ts +2 -16
- package/front_end/panels/ai_assistance/components/chatView.css +0 -32
- package/front_end/panels/ai_assistance/components/walkthroughView.css +1 -1
- package/front_end/panels/animation/AnimationTimeline.ts +1 -1
- package/front_end/panels/animation/animationTimeline.css +5 -3
- package/front_end/panels/application/PrivateVerificationTokensView.ts +114 -26
- package/front_end/panels/application/ResourcesPanel.ts +1 -0
- package/front_end/panels/application/backgroundServiceView.css +2 -2
- package/front_end/panels/application/components/permissionsPolicySection.css +0 -4
- package/front_end/panels/application/frameDetailsReportView.css +0 -7
- package/front_end/panels/application/indexedDBViews.css +3 -3
- package/front_end/panels/application/privateVerificationTokensView.css +6 -0
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +1 -1
- package/front_end/panels/application/serviceWorkersView.css +2 -2
- package/front_end/panels/comments/CommentsPane.ts +1 -1
- package/front_end/panels/comments/commentsPane.css +1 -1
- package/front_end/panels/common/common.ts +0 -1
- package/front_end/panels/console/ConsoleView.ts +11 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +5 -1
- package/front_end/panels/console/consolePinPane.css +1 -1
- package/front_end/panels/console/consoleView.css +5 -4
- package/front_end/panels/elements/DOMTreeWidget.ts +47 -5
- package/front_end/panels/elements/layoutPane.css +0 -1
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +1 -0
- package/front_end/panels/emulation/deviceModeView.css +0 -1
- package/front_end/panels/issues/issuesTree.css +2 -2
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +34 -17
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +39 -17
- package/front_end/panels/layer_viewer/Layers3DView.ts +34 -13
- package/front_end/panels/layer_viewer/layerDetailsView.css +1 -1
- package/front_end/panels/layer_viewer/layers3DView.css +0 -4
- package/front_end/panels/media/playerListView.css +0 -18
- package/front_end/panels/media/playerPropertiesView.css +1 -1
- package/front_end/panels/network/NetworkWaterfallColumn.ts +22 -10
- package/front_end/panels/network/RequestPreviewView.ts +182 -63
- package/front_end/panels/network/SignedExchangeInfoView.ts +242 -158
- package/front_end/panels/network/networkConfigView.css +1 -1
- package/front_end/panels/network/networkLogView.css +2 -1
- package/front_end/panels/network/networkPanel.css +0 -5
- package/front_end/panels/network/networkTimingTable.css +1 -1
- package/front_end/panels/network/signedExchangeInfoView.css +12 -8
- package/front_end/panels/performance_monitor/performanceMonitor.css +2 -2
- package/front_end/panels/profiler/IsolateSelector.ts +31 -10
- package/front_end/panels/profiler/profilesPanel.css +0 -8
- package/front_end/panels/protocol_monitor/JSONEditor.css +1 -1
- package/front_end/panels/screencast/screencastView.css +2 -2
- package/front_end/panels/security/SecurityPanel.ts +474 -418
- package/front_end/panels/security/SecurityPanelSidebar.ts +68 -48
- package/front_end/panels/security/lockIcon.css +52 -50
- package/front_end/panels/security/mainView.css +149 -145
- package/front_end/panels/security/originView.css +117 -115
- package/front_end/panels/sensors/LocationsSettingsTab.ts +2 -50
- package/front_end/panels/sensors/locationsSettingsTab.css +1 -21
- package/front_end/panels/settings/AISettingsTab.ts +1 -2
- package/front_end/panels/settings/SettingsScreen.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +31 -6
- package/front_end/panels/sources/NavigatorView.ts +105 -31
- package/front_end/panels/sources/breakpointsView.css +2 -1
- package/front_end/panels/sources/scopeChainSidebarPane.css +1 -1
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +1 -0
- package/front_end/panels/timeline/TimelineLayersView.ts +108 -46
- package/front_end/panels/timeline/TimelinePanel.ts +4 -2
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +1 -1
- package/front_end/panels/timeline/components/networkRequestDetails.css +1 -1
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +0 -7
- package/front_end/panels/web_audio/webAudio.css +1 -2
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
- package/front_end/panels/whats_new/ReleaseNoteText.ts +6 -6
- package/front_end/panels/whats_new/resources/WNDT.md +6 -6
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +45 -4
- package/front_end/ui/comments/CommentOverlayManager.ts +45 -12
- package/front_end/ui/components/buttons/FloatingButton.ts +2 -6
- package/front_end/ui/components/buttons/button.css +2 -2
- package/front_end/ui/components/buttons/floatingButton.css +0 -44
- package/front_end/ui/components/icon_button/iconButton.css +1 -1
- package/front_end/ui/components/markdown_view/markdownView.css +1 -1
- package/front_end/ui/legacy/ContextMenu.ts +7 -5
- package/front_end/ui/legacy/InspectorDrawerView.ts +1 -0
- package/front_end/ui/legacy/InspectorView.ts +5 -1
- package/front_end/ui/legacy/PopoverHelper.ts +1 -0
- package/front_end/ui/legacy/RootView.ts +9 -3
- package/front_end/ui/legacy/SplitWidget.ts +1 -0
- package/front_end/ui/legacy/Treeoutline.ts +9 -0
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +130 -137
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/SwatchPopoverHelper.ts +1 -0
- package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/cssAngleEditor.css +3 -1
- package/front_end/ui/legacy/components/inline_editor/cssShadowEditor.css +7 -6
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +2 -0
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +2 -2
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +1 -10
- package/front_end/ui/legacy/filter.css +1 -1
- package/front_end/ui/legacy/infobar.css +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +2 -2
- package/front_end/ui/legacy/inspectorDrawerTabbedPane.css +3 -3
- package/front_end/ui/legacy/listWidget.css +2 -7
- package/front_end/ui/legacy/softDropDownButton.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +2 -1
- package/front_end/ui/legacy/treeoutline.css +3 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +133 -0
- package/front_end/ui/visual_logging/LoggingEvents.ts +1 -1
- package/package.json +1 -1
- package/front_end/Images/geminiInDevTools.png +0 -0
- package/front_end/Images/geminiInDevTools_2x.png +0 -0
- package/front_end/generated/InspectorBackendCommands.ts +0 -1690
- package/front_end/generated/protocol-mapping.d.ts +0 -5986
- package/front_end/generated/protocol-proxy-api.d.ts +0 -5452
- package/front_end/generated/protocol.ts +0 -23364
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +0 -193
- package/front_end/panels/common/geminiRebrandPromoDialog.css +0 -47
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// Copyright 2020 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
|
-
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
6
4
|
|
|
7
5
|
/*
|
|
8
6
|
* Copyright (C) 2009 Apple Inc. All rights reserved.
|
|
@@ -35,6 +33,7 @@
|
|
|
35
33
|
*/
|
|
36
34
|
import '../data_grid/data_grid.js';
|
|
37
35
|
import '../../../components/buttons/buttons.js';
|
|
36
|
+
import '../../../kit/kit.js';
|
|
38
37
|
|
|
39
38
|
import * as Common from '../../../../core/common/common.js';
|
|
40
39
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
@@ -43,8 +42,7 @@ import * as SDK from '../../../../core/sdk/sdk.js';
|
|
|
43
42
|
import type * as Protocol from '../../../../generated/protocol.js';
|
|
44
43
|
import * as IssuesManager from '../../../../models/issues_manager/issues_manager.js';
|
|
45
44
|
import * as NetworkForward from '../../../../panels/network/forward/forward.js';
|
|
46
|
-
import {
|
|
47
|
-
import {Directives, html, nothing, render} from '../../../lit/lit.js';
|
|
45
|
+
import {Directives, html, type LitTemplate, nothing, render} from '../../../lit/lit.js';
|
|
48
46
|
import * as UI from '../../legacy.js';
|
|
49
47
|
import dataGridAiButtonStyles from '../data_grid/dataGridAiButton.css.js';
|
|
50
48
|
|
|
@@ -68,7 +66,7 @@ export interface ViewInput {
|
|
|
68
66
|
aiButtonTitle?: string;
|
|
69
67
|
onAiButtonClick?: (cookie: CookieData, event: Event) => void;
|
|
70
68
|
}
|
|
71
|
-
type
|
|
69
|
+
export type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
72
70
|
type AttributeWithIcon = SDK.Cookie.Attribute.NAME|SDK.Cookie.Attribute.VALUE|SDK.Cookie.Attribute.DOMAIN|
|
|
73
71
|
SDK.Cookie.Attribute.PATH|SDK.Cookie.Attribute.SECURE|SDK.Cookie.Attribute.SAME_SITE;
|
|
74
72
|
|
|
@@ -81,7 +79,7 @@ type CookieData = Partial<Record<Exclude<SDK.Cookie.Attribute, BooleanAttributes
|
|
|
81
79
|
}&{
|
|
82
80
|
key?: string,
|
|
83
81
|
flagged?: boolean,
|
|
84
|
-
|
|
82
|
+
iconTitles?: Partial<Record<AttributeWithIcon, string>>,
|
|
85
83
|
priorityValue?: number,
|
|
86
84
|
expiresTooltip?: string,
|
|
87
85
|
dirty?: boolean,
|
|
@@ -192,6 +190,120 @@ function isFlagAttribute(attribute: SDK.Cookie.Attribute): attribute is BooleanA
|
|
|
192
190
|
return attribute === SDK.Cookie.Attribute.HTTP_ONLY || attribute === SDK.Cookie.Attribute.SECURE;
|
|
193
191
|
}
|
|
194
192
|
|
|
193
|
+
function renderIcon(title: string|undefined): LitTemplate {
|
|
194
|
+
if (title === undefined) {
|
|
195
|
+
return nothing;
|
|
196
|
+
}
|
|
197
|
+
return html`<devtools-icon name="info" class="small" title=${title}></devtools-icon>`;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
201
|
+
// clang-format off
|
|
202
|
+
render(html`
|
|
203
|
+
<style>${cookiesTableStyles}</style>
|
|
204
|
+
<devtools-data-grid
|
|
205
|
+
name=${input.editable ? i18nString(UIStrings.editableCookies) : i18nString(UIStrings.cookies)}
|
|
206
|
+
id="cookies-table"
|
|
207
|
+
striped
|
|
208
|
+
?inline=${input.renderInline}
|
|
209
|
+
?deletable=${input.deletable}
|
|
210
|
+
@create=${(e: CustomEvent<CookieData>) => input.onCreate(e.detail)}
|
|
211
|
+
@refresh=${input.onRefresh}
|
|
212
|
+
@deselect=${() => input.onSelect(undefined)}
|
|
213
|
+
>
|
|
214
|
+
<table>
|
|
215
|
+
${input.showAiButton ? html`<style>${dataGridAiButtonStyles}</style>` : nothing}
|
|
216
|
+
<tr>
|
|
217
|
+
<th id=${SDK.Cookie.Attribute.NAME} sortable ?disclosure=${input.editable} ?editable=${input.editable} long weight="24">
|
|
218
|
+
${i18nString(UIStrings.name)}
|
|
219
|
+
</th>
|
|
220
|
+
<th id=${SDK.Cookie.Attribute.VALUE} sortable ?editable=${input.editable} long weight="34">
|
|
221
|
+
${i18nString(UIStrings.value)}
|
|
222
|
+
</th>
|
|
223
|
+
<th id=${SDK.Cookie.Attribute.DOMAIN} sortable weight="7" ?editable=${input.editable}>
|
|
224
|
+
${i18nString(UIStrings.domain)}
|
|
225
|
+
</th>
|
|
226
|
+
<th id=${SDK.Cookie.Attribute.PATH} sortable weight="7" ?editable=${input.editable}>
|
|
227
|
+
${i18nString(UIStrings.path)}
|
|
228
|
+
</th>
|
|
229
|
+
<th id=${SDK.Cookie.Attribute.EXPIRES} sortable weight="7" ?editable=${input.editable}>
|
|
230
|
+
Expires / Max-Age
|
|
231
|
+
</th>
|
|
232
|
+
<th id=${SDK.Cookie.Attribute.SIZE} sortable align="right" weight="7">
|
|
233
|
+
${i18nString(UIStrings.size)}
|
|
234
|
+
</th>
|
|
235
|
+
<th id=${SDK.Cookie.Attribute.HTTP_ONLY} sortable align="center" weight="7" ?editable=${input.editable} type="boolean">
|
|
236
|
+
HttpOnly
|
|
237
|
+
</th>
|
|
238
|
+
<th id=${SDK.Cookie.Attribute.SECURE} sortable align="center" weight="7" ?editable=${input.editable} type="boolean">
|
|
239
|
+
${i18nString(UIStrings.secure)}
|
|
240
|
+
</th>
|
|
241
|
+
<th id=${SDK.Cookie.Attribute.SAME_SITE} sortable weight="7" ?editable=${input.editable}>
|
|
242
|
+
SameSite
|
|
243
|
+
</th>
|
|
244
|
+
<th id=${SDK.Cookie.Attribute.PARTITION_KEY_SITE} sortable weight="7" ?editable=${input.editable}>
|
|
245
|
+
${i18nString(UIStrings.partitionKeySite)}
|
|
246
|
+
</th>
|
|
247
|
+
<th id=${SDK.Cookie.Attribute.HAS_CROSS_SITE_ANCESTOR} sortable align="center" weight="7" ?editable=${input.editable} type="boolean">
|
|
248
|
+
Cross Site
|
|
249
|
+
</th>
|
|
250
|
+
<th id=${SDK.Cookie.Attribute.PRIORITY} sortable weight="7" ?editable=${input.editable}>
|
|
251
|
+
${i18nString(UIStrings.priority)}
|
|
252
|
+
</th>
|
|
253
|
+
${input.schemeBindingEnabled ? html`
|
|
254
|
+
<th id=${SDK.Cookie.Attribute.SOURCE_SCHEME} sortable align="center" weight="7" ?editable=${input.editable} type="string">
|
|
255
|
+
SourceScheme
|
|
256
|
+
</th>` : nothing}
|
|
257
|
+
${input.portBindingEnabled ? html`
|
|
258
|
+
<th id=${SDK.Cookie.Attribute.SOURCE_PORT} sortable align="center" weight="7" ?editable=${input.editable} type="number">
|
|
259
|
+
SourcePort
|
|
260
|
+
</th>` : nothing}
|
|
261
|
+
</tr>
|
|
262
|
+
${repeat(input.data, cookie => cookie.key, cookie => {
|
|
263
|
+
const isHttpOnly = Boolean(cookie['http-only']);
|
|
264
|
+
return html`
|
|
265
|
+
<tr ?selected=${cookie.key === input.selectedKey}
|
|
266
|
+
?inactive=${cookie.inactive}
|
|
267
|
+
?dirty=${cookie.dirty}
|
|
268
|
+
?highlighted=${cookie.flagged}
|
|
269
|
+
@edit=${(e: CustomEvent<{columnId: string, valueBeforeEditing: string|boolean, newText: string|boolean}>) =>
|
|
270
|
+
input.onEdit(cookie, e.detail.columnId, e.detail.valueBeforeEditing, e.detail.newText)}
|
|
271
|
+
@delete=${()=> input.onDelete(cookie)}
|
|
272
|
+
@contextmenu=${(e: CustomEvent<UI.ContextMenu.ContextMenu>) => input.onContextMenu(cookie, e.detail)}
|
|
273
|
+
@select=${() => input.onSelect(cookie.key)}>
|
|
274
|
+
<td>${input.showAiButton ? html`
|
|
275
|
+
<span class="ai-button-container">
|
|
276
|
+
<devtools-floating-button
|
|
277
|
+
icon-name="smart-assistant"
|
|
278
|
+
title=${ifDefined(isHttpOnly ? i18nString(UIStrings.httpOnlyCookiesCannotBeAdded) : input.aiButtonTitle)}
|
|
279
|
+
?disabled=${isHttpOnly}
|
|
280
|
+
@click=${(e: Event) => !isHttpOnly && input.onAiButtonClick?.(cookie, e)}
|
|
281
|
+
></devtools-floating-button>
|
|
282
|
+
</span>
|
|
283
|
+
` : nothing}${renderIcon(cookie.iconTitles?.name)}${cookie.name}</td>
|
|
284
|
+
<td>${cookie.value}</td>
|
|
285
|
+
<td>${renderIcon(cookie.iconTitles?.domain)}${cookie.domain}</td>
|
|
286
|
+
<td>${renderIcon(cookie.iconTitles?.path)}${cookie.path}</td>
|
|
287
|
+
<td title=${ifDefined(cookie.expiresTooltip)}>${cookie.expires}</td>
|
|
288
|
+
<td>${cookie.size}</td>
|
|
289
|
+
<td data-value=${isHttpOnly}></td>
|
|
290
|
+
<td data-value=${Boolean(cookie.secure)}>${renderIcon(cookie.iconTitles?.secure)}</td>
|
|
291
|
+
<td>${renderIcon(cookie.iconTitles?.['same-site'])}${cookie['same-site']}</td>
|
|
292
|
+
<td>${cookie['partition-key-site']}</td>
|
|
293
|
+
<td data-value=${Boolean(cookie['has-cross-site-ancestor'])}></td>
|
|
294
|
+
<td data-value=${ifDefined(cookie.priorityValue)}>${cookie.priority}</td>
|
|
295
|
+
${input.schemeBindingEnabled ? html`
|
|
296
|
+
<td title=${i18nString(UIStrings.sourceSchemeTooltip)}>${cookie['source-scheme']}</td>` : nothing}
|
|
297
|
+
${input.portBindingEnabled ? html`
|
|
298
|
+
<td title=${i18nString(UIStrings.sourcePortTooltip)}>${cookie['source-port']}</td>` : nothing}
|
|
299
|
+
</tr>`;
|
|
300
|
+
})}
|
|
301
|
+
${input.editable ? html`<tr placeholder></tr>` : nothing}
|
|
302
|
+
</table>
|
|
303
|
+
</devtools-data-grid>`, target, {container: {classes: ['cookies-table']}});
|
|
304
|
+
// clang-format on
|
|
305
|
+
};
|
|
306
|
+
|
|
195
307
|
export interface CookiesTableData {
|
|
196
308
|
cookies: SDK.Cookie.Cookie[];
|
|
197
309
|
cookieToBlockedReasons?: ReadonlyMap<SDK.Cookie.Cookie, SDK.CookieModel.BlockedReason[]>;
|
|
@@ -213,128 +325,17 @@ export class CookiesTable extends UI.Widget.VBox {
|
|
|
213
325
|
#cookieDomain: string;
|
|
214
326
|
private cookieToBlockedReasons: ReadonlyMap<SDK.Cookie.Cookie, SDK.CookieModel.BlockedReason[]>|null;
|
|
215
327
|
private cookieToExemptionReason: ReadonlyMap<SDK.Cookie.Cookie, SDK.CookieModel.ExemptionReason>|null;
|
|
216
|
-
private readonly view:
|
|
328
|
+
private readonly view: View;
|
|
217
329
|
private selectedKey?: string;
|
|
218
330
|
#editable: boolean;
|
|
219
331
|
private renderInline: boolean;
|
|
220
332
|
private readonly schemeBindingEnabled: boolean;
|
|
221
333
|
private readonly portBindingEnabled: boolean;
|
|
222
|
-
constructor(
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
deleteCallback?: ((arg0: SDK.Cookie.Cookie, arg1: () => void) => void), view?: ViewFunction) {
|
|
334
|
+
constructor(element?: HTMLElement, renderInline?: boolean,
|
|
335
|
+
saveCallback?: ((arg0: SDK.Cookie.Cookie, arg1: SDK.Cookie.Cookie|null) => Promise<boolean>),
|
|
336
|
+
refreshCallback?: (() => void), selectedCallback?: ((arg0: SDK.Cookie.Cookie|null) => void),
|
|
337
|
+
deleteCallback?: ((arg0: SDK.Cookie.Cookie, arg1: () => void) => void), view: View = DEFAULT_VIEW) {
|
|
227
338
|
super(element);
|
|
228
|
-
if (!view) {
|
|
229
|
-
view = (input, _, target) => {
|
|
230
|
-
// clang-format off
|
|
231
|
-
render(html`
|
|
232
|
-
<devtools-data-grid
|
|
233
|
-
name=${input.editable ? i18nString(UIStrings.editableCookies) : i18nString(UIStrings.cookies)}
|
|
234
|
-
id="cookies-table"
|
|
235
|
-
striped
|
|
236
|
-
?inline=${input.renderInline}
|
|
237
|
-
?deletable=${input.deletable}
|
|
238
|
-
@create=${(e: CustomEvent<CookieData>) => input.onCreate(e.detail)}
|
|
239
|
-
@refresh=${input.onRefresh}
|
|
240
|
-
@deselect=${() => input.onSelect(undefined)}
|
|
241
|
-
>
|
|
242
|
-
<table>
|
|
243
|
-
${input.showAiButton ? html`<style>${dataGridAiButtonStyles}</style>` : nothing}
|
|
244
|
-
<tr>
|
|
245
|
-
<th id=${SDK.Cookie.Attribute.NAME} sortable ?disclosure=${input.editable} ?editable=${input.editable} long weight="24">
|
|
246
|
-
${i18nString(UIStrings.name)}
|
|
247
|
-
</th>
|
|
248
|
-
<th id=${SDK.Cookie.Attribute.VALUE} sortable ?editable=${input.editable} long weight="34">
|
|
249
|
-
${i18nString(UIStrings.value)}
|
|
250
|
-
</th>
|
|
251
|
-
<th id=${SDK.Cookie.Attribute.DOMAIN} sortable weight="7" ?editable=${input.editable}>
|
|
252
|
-
${i18nString(UIStrings.domain)}
|
|
253
|
-
</th>
|
|
254
|
-
<th id=${SDK.Cookie.Attribute.PATH} sortable weight="7" ?editable=${input.editable}>
|
|
255
|
-
${i18nString(UIStrings.path)}
|
|
256
|
-
</th>
|
|
257
|
-
<th id=${SDK.Cookie.Attribute.EXPIRES} sortable weight="7" ?editable=${input.editable}>
|
|
258
|
-
Expires / Max-Age
|
|
259
|
-
</th>
|
|
260
|
-
<th id=${SDK.Cookie.Attribute.SIZE} sortable align="right" weight="7">
|
|
261
|
-
${i18nString(UIStrings.size)}
|
|
262
|
-
</th>
|
|
263
|
-
<th id=${SDK.Cookie.Attribute.HTTP_ONLY} sortable align="center" weight="7" ?editable=${input.editable} type="boolean">
|
|
264
|
-
HttpOnly
|
|
265
|
-
</th>
|
|
266
|
-
<th id=${SDK.Cookie.Attribute.SECURE} sortable align="center" weight="7" ?editable=${input.editable} type="boolean">
|
|
267
|
-
${i18nString(UIStrings.secure)}
|
|
268
|
-
</th>
|
|
269
|
-
<th id=${SDK.Cookie.Attribute.SAME_SITE} sortable weight="7" ?editable=${input.editable}>
|
|
270
|
-
SameSite
|
|
271
|
-
</th>
|
|
272
|
-
<th id=${SDK.Cookie.Attribute.PARTITION_KEY_SITE} sortable weight="7" ?editable=${input.editable}>
|
|
273
|
-
${i18nString(UIStrings.partitionKeySite)}
|
|
274
|
-
</th>
|
|
275
|
-
<th id=${SDK.Cookie.Attribute.HAS_CROSS_SITE_ANCESTOR} sortable align="center" weight="7" ?editable=${input.editable} type="boolean">
|
|
276
|
-
Cross Site
|
|
277
|
-
</th>
|
|
278
|
-
<th id=${SDK.Cookie.Attribute.PRIORITY} sortable weight="7" ?editable=${input.editable}>
|
|
279
|
-
${i18nString(UIStrings.priority)}
|
|
280
|
-
</th>
|
|
281
|
-
${input.schemeBindingEnabled ? html`
|
|
282
|
-
<th id=${SDK.Cookie.Attribute.SOURCE_SCHEME} sortable align="center" weight="7" ?editable=${input.editable} type="string">
|
|
283
|
-
SourceScheme
|
|
284
|
-
</th>` : ''}
|
|
285
|
-
${input.portBindingEnabled ? html`
|
|
286
|
-
<th id=${SDK.Cookie.Attribute.SOURCE_PORT} sortable align="center" weight="7" ?editable=${input.editable} type="number">
|
|
287
|
-
SourcePort
|
|
288
|
-
</th>` : ''}
|
|
289
|
-
</tr>
|
|
290
|
-
${repeat(this.data, cookie => cookie.key, cookie => {
|
|
291
|
-
const isHttpOnly = Boolean(cookie['http-only']);
|
|
292
|
-
return html`
|
|
293
|
-
<tr ?selected=${cookie.key === input.selectedKey}
|
|
294
|
-
?inactive=${cookie.inactive}
|
|
295
|
-
?dirty=${cookie.dirty}
|
|
296
|
-
?highlighted=${cookie.flagged}
|
|
297
|
-
@edit=${(e: CustomEvent<{columnId: string, valueBeforeEditing: string|boolean, newText: string|boolean}>) =>
|
|
298
|
-
input.onEdit(cookie, e.detail.columnId, e.detail.valueBeforeEditing, e.detail.newText)}
|
|
299
|
-
@delete=${()=> input.onDelete(cookie)}
|
|
300
|
-
@contextmenu=${(e: CustomEvent<UI.ContextMenu.ContextMenu>) => input.onContextMenu(cookie, e.detail)}
|
|
301
|
-
@select=${() => input.onSelect(cookie.key)}>
|
|
302
|
-
<td>${input.showAiButton ? html`
|
|
303
|
-
<span class="ai-button-container">
|
|
304
|
-
<devtools-floating-button
|
|
305
|
-
icon-name=${Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled ? 'spark' : 'smart-assistant'}
|
|
306
|
-
title=${ifDefined(isHttpOnly ? i18nString(UIStrings.httpOnlyCookiesCannotBeAdded) : input.aiButtonTitle)}
|
|
307
|
-
?disabled=${isHttpOnly}
|
|
308
|
-
@click=${(e: Event) => !isHttpOnly && input.onAiButtonClick?.(cookie, e)}
|
|
309
|
-
></devtools-floating-button>
|
|
310
|
-
</span>
|
|
311
|
-
` : nothing}${cookie.icons?.name}${cookie.name}</td>
|
|
312
|
-
<td>${cookie.value}</td>
|
|
313
|
-
<td>${cookie.icons?.domain}${cookie.domain}</td>
|
|
314
|
-
<td>${cookie.icons?.path}${cookie.path}</td>
|
|
315
|
-
<td title=${ifDefined(cookie.expiresTooltip)}>${cookie.expires}</td>
|
|
316
|
-
<td>${cookie.size}</td>
|
|
317
|
-
<td data-value=${isHttpOnly}></td>
|
|
318
|
-
<td data-value=${Boolean(cookie.secure)}>${cookie.icons?.secure}</td>
|
|
319
|
-
<td>${cookie.icons?.['same-site']}${cookie['same-site']}</td>
|
|
320
|
-
<td>${cookie['partition-key-site']}</td>
|
|
321
|
-
<td data-value=${Boolean(cookie['has-cross-site-ancestor'])}></td>
|
|
322
|
-
<td data-value=${ifDefined(cookie.priorityValue)}>${cookie.priority}</td>
|
|
323
|
-
${input.schemeBindingEnabled ? html`
|
|
324
|
-
<td title=${i18nString(UIStrings.sourceSchemeTooltip)}>${cookie['source-scheme']}</td>` : ''}
|
|
325
|
-
${input.portBindingEnabled ? html`
|
|
326
|
-
<td title=${i18nString(UIStrings.sourcePortTooltip)}>${cookie['source-port']}</td>` : ''}
|
|
327
|
-
</tr>`;
|
|
328
|
-
})}
|
|
329
|
-
${input.editable ? html`<tr placeholder><tr>` : ''}
|
|
330
|
-
</table>
|
|
331
|
-
</devtools-data-grid>`, target, {host: target});
|
|
332
|
-
// clang-format on
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
this.registerRequiredCSS(cookiesTableStyles);
|
|
336
|
-
|
|
337
|
-
this.element.classList.add('cookies-table');
|
|
338
339
|
|
|
339
340
|
this.#saveCallback = saveCallback;
|
|
340
341
|
this.#refreshCallback = refreshCallback;
|
|
@@ -472,7 +473,7 @@ export class CookiesTable extends UI.Widget.VBox {
|
|
|
472
473
|
} :
|
|
473
474
|
undefined,
|
|
474
475
|
};
|
|
475
|
-
this.view(input, undefined, this.
|
|
476
|
+
this.view(input, undefined, this.contentElement);
|
|
476
477
|
}
|
|
477
478
|
|
|
478
479
|
private onSelect(key: string|undefined): void {
|
|
@@ -621,24 +622,16 @@ export class CookiesTable extends UI.Widget.VBox {
|
|
|
621
622
|
for (const blockedReason of blockedReasons) {
|
|
622
623
|
data.flagged = true;
|
|
623
624
|
const attribute = (blockedReason.attribute || SDK.Cookie.Attribute.NAME) as AttributeWithIcon;
|
|
624
|
-
data.
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
data.icons[attribute].classList.add('small');
|
|
629
|
-
data.icons[attribute].title = blockedReason.uiString;
|
|
630
|
-
} else if (data.icons[attribute]) {
|
|
631
|
-
data.icons[attribute].title += '\n' + blockedReason.uiString;
|
|
632
|
-
}
|
|
625
|
+
data.iconTitles = data.iconTitles || {};
|
|
626
|
+
const existingTitle = data.iconTitles[attribute];
|
|
627
|
+
data.iconTitles[attribute] =
|
|
628
|
+
existingTitle === undefined ? blockedReason.uiString : existingTitle + '\n' + blockedReason.uiString;
|
|
633
629
|
}
|
|
634
630
|
const exemptionReason = this.cookieToExemptionReason?.get(cookie)?.uiString;
|
|
635
631
|
if (exemptionReason) {
|
|
636
|
-
data.
|
|
632
|
+
data.iconTitles = data.iconTitles || {};
|
|
637
633
|
data.flagged = true;
|
|
638
|
-
data.
|
|
639
|
-
data.icons.name.name = 'info';
|
|
640
|
-
data.icons.name.classList.add('small');
|
|
641
|
-
data.icons.name.title = exemptionReason;
|
|
634
|
+
data.iconTitles.name = exemptionReason;
|
|
642
635
|
}
|
|
643
636
|
data.key = cookie.key();
|
|
644
637
|
return data;
|
|
@@ -40,7 +40,7 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
40
40
|
const maxRange = 20;
|
|
41
41
|
const defaultUnit = 'px';
|
|
42
42
|
const sliderThumbRadius = 6;
|
|
43
|
-
const canvasSize =
|
|
43
|
+
const canvasSize = 80;
|
|
44
44
|
|
|
45
45
|
export interface CSSShadowModel {
|
|
46
46
|
setInset(inset: boolean): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
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 */
|
|
4
5
|
|
|
5
6
|
import * as Common from '../../../../core/common/common.js';
|
|
6
7
|
import * as Platform from '../../../../core/platform/platform.js';
|
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
background-color: var(--sys-color-cdt-base-container);
|
|
26
26
|
border: 0.5em solid var(--sys-color-neutral-outline);
|
|
27
27
|
border-radius: 9em;
|
|
28
|
-
box-shadow:
|
|
28
|
+
box-shadow:
|
|
29
|
+
var(--drop-shadow),
|
|
30
|
+
inset 0 0 var(--sys-size-7) var(--box-shadow-outline-color);
|
|
29
31
|
transform: translateX(-3em);
|
|
30
32
|
}
|
|
31
33
|
|
|
@@ -27,20 +27,20 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.shadow-editor-field.shadow-editor-blur-field {
|
|
30
|
-
margin-top: var(--sys-size-
|
|
30
|
+
margin-top: var(--sys-size-13);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.shadow-editor-2D-slider {
|
|
34
34
|
position: absolute;
|
|
35
|
-
height:
|
|
36
|
-
width:
|
|
35
|
+
height: var(--sys-size-19);
|
|
36
|
+
width: var(--sys-size-19);
|
|
37
37
|
border: var(--sys-size-1) solid var(--divider-line);
|
|
38
38
|
border-radius: var(--sys-size-2);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.shadow-editor-label {
|
|
42
42
|
display: inline-block;
|
|
43
|
-
width:
|
|
43
|
+
width: var(--sys-size-17);
|
|
44
44
|
height: var(--sys-size-11);
|
|
45
45
|
line-height: var(--sys-size-11);
|
|
46
46
|
margin-right: var(--sys-size-5);
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
|
|
50
50
|
.shadow-editor-button-left,
|
|
51
51
|
.shadow-editor-button-right {
|
|
52
|
-
width
|
|
52
|
+
/* Match half of the combined width of the text input (--sys-size-17), gap (--sys-size-5), and 2D/range slider (--sys-size-19) below. */
|
|
53
|
+
width: calc((var(--sys-size-17) + var(--sys-size-5) + var(--sys-size-19)) / 2);
|
|
53
54
|
height: var(--sys-size-11);
|
|
54
55
|
padding: 3px 7px;
|
|
55
56
|
line-height: var(--sys-size-8);
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
.shadow-editor-text-input {
|
|
94
|
-
width:
|
|
95
|
+
width: var(--sys-size-17);
|
|
95
96
|
margin-right: var(--sys-size-5);
|
|
96
97
|
text-align: right;
|
|
97
98
|
box-shadow: var(--legacy-focus-ring-inactive-shadow);
|
|
@@ -395,6 +395,8 @@ export class FlameChart extends FlameChartBase implements NetworkTimeCalculator.
|
|
|
395
395
|
this.canvas = this.viewportElement.createChild('canvas', 'fill');
|
|
396
396
|
if (optionalConfig.canvasVELogContext) {
|
|
397
397
|
const context = VisualLogging.canvas(optionalConfig.canvasVELogContext).track({
|
|
398
|
+
click: true,
|
|
399
|
+
drag: true,
|
|
398
400
|
hover: true,
|
|
399
401
|
});
|
|
400
402
|
this.canvas.setAttribute('jslog', `${context}`);
|
|
@@ -129,22 +129,13 @@ devtools-text-prompt {
|
|
|
129
129
|
background: var(--sys-color-state-disabled-container);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
.quickpick-description {
|
|
133
|
-
flex: none;
|
|
134
|
-
overflow: hidden;
|
|
135
|
-
text-overflow: ellipsis;
|
|
136
|
-
color: var(--sys-color-state-disabled);
|
|
137
|
-
padding-left: 15px;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
132
|
@media (forced-colors: active) {
|
|
141
133
|
.filtered-list-widget {
|
|
142
134
|
forced-color-adjust: none;
|
|
143
135
|
border-color: ButtonText;
|
|
144
136
|
}
|
|
145
137
|
|
|
146
|
-
.filtered-list-widget-item
|
|
147
|
-
.quickpick-description {
|
|
138
|
+
.filtered-list-widget-item {
|
|
148
139
|
color: ButtonText;
|
|
149
140
|
}
|
|
150
141
|
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
flex-direction: column;
|
|
32
32
|
align-items: center;
|
|
33
33
|
height: auto;
|
|
34
|
-
width:
|
|
34
|
+
width: 100%;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
devtools-toolbar.collapsed-vertical-drawer-toolbar-content {
|
|
@@ -48,8 +48,8 @@ devtools-toolbar.collapsed-vertical-drawer-toolbar-content .toolbar-button {
|
|
|
48
48
|
margin: 0 auto;
|
|
49
49
|
padding: 0;
|
|
50
50
|
padding-right: var(--sys-size-1);
|
|
51
|
-
width:
|
|
52
|
-
height:
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: var(--toolbar-height);
|
|
53
53
|
display: flex;
|
|
54
54
|
align-items: center;
|
|
55
55
|
justify-content: center;
|
|
@@ -100,17 +100,12 @@
|
|
|
100
100
|
flex-direction: row;
|
|
101
101
|
align-items: center;
|
|
102
102
|
justify-content: flex-start;
|
|
103
|
-
padding:
|
|
103
|
+
padding: var(--sys-size-3);
|
|
104
104
|
gap: var(--sys-size-6);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
.editor-buttons > button {
|
|
108
|
-
flex: none;
|
|
109
|
-
margin-right: 10px;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
107
|
.editor-content input {
|
|
113
|
-
margin-right:
|
|
108
|
+
margin-right: var(--sys-size-5);
|
|
114
109
|
}
|
|
115
110
|
|
|
116
111
|
.editor-content input.error-input {
|
|
@@ -187,8 +187,9 @@ ol.tree-outline:not(.hide-selection-when-blurred, .elements-tree-outline) li.sel
|
|
|
187
187
|
&::before {
|
|
188
188
|
flex-shrink: 0;
|
|
189
189
|
overflow: hidden;
|
|
190
|
-
|
|
191
|
-
margin-
|
|
190
|
+
/* Shift 20px mask left by 2px to center its glyph in the 16px slot. */
|
|
191
|
+
margin-right: var(--sys-size-2);
|
|
192
|
+
margin-left: calc(-1 * var(--sys-size-2));
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
& .selection {
|