chrome-devtools-frontend 1.0.1565595 → 1.0.1567721
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/contributing/performance.md +24 -0
- package/front_end/Images/src/lock-person.svg +1 -0
- package/front_end/core/common/Base64.ts +21 -2
- package/front_end/core/common/ResourceType.ts +7 -0
- package/front_end/core/host/InspectorFrontendHostStub.ts +3 -0
- package/front_end/core/host/UserMetrics.ts +20 -0
- package/front_end/core/root/Runtime.ts +5 -0
- package/front_end/core/sdk/DOMModel.ts +32 -2
- package/front_end/core/sdk/NetworkManager.ts +16 -3
- package/front_end/core/sdk/ResourceTreeModel.ts +11 -6
- package/front_end/entrypoints/main/MainImpl.ts +1 -7
- package/front_end/generated/Deprecation.ts +0 -8
- package/front_end/generated/InspectorBackendCommands.ts +10 -1
- package/front_end/generated/SupportedCSSProperties.js +48 -62
- package/front_end/generated/protocol-mapping.d.ts +4 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +203 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +98 -105
- package/front_end/models/emulation/DeviceModeModel.ts +1 -1
- package/front_end/models/formatter/FormatterWorkerPool.ts +8 -6
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -9
- package/front_end/models/persistence/PersistenceImpl.ts +8 -0
- package/front_end/models/text_utils/TextUtils.snapshot.txt +83 -0
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +0 -1
- package/front_end/panels/ai_assistance/components/ArtifactsViewer.ts +28 -4
- package/front_end/panels/ai_assistance/components/ChatView.ts +52 -169
- package/front_end/panels/ai_assistance/components/CollapsibleAssistanceContentWidget.ts +27 -8
- package/front_end/panels/ai_assistance/components/PerformanceAgentMarkdownRenderer.ts +19 -4
- package/front_end/panels/application/ApplicationPanelSidebar.ts +29 -0
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +12 -0
- package/front_end/panels/application/DeviceBoundSessionsModel.ts +169 -0
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +219 -0
- package/front_end/panels/application/DeviceBoundSessionsView.ts +1096 -0
- package/front_end/panels/application/ResourcesPanel.ts +19 -0
- package/front_end/panels/application/application.ts +6 -0
- package/front_end/panels/application/deviceBoundSessionsView.css +27 -0
- package/front_end/panels/common/AiCodeGenerationUpgradeDialog.ts +115 -0
- package/front_end/panels/common/aiCodeGenerationUpgradeDialog.css +79 -0
- package/front_end/panels/common/common.ts +1 -0
- package/front_end/panels/console/ConsoleInsightTeaser.ts +41 -8
- package/front_end/panels/console/ConsoleViewMessage.ts +20 -13
- package/front_end/panels/elements/ElementsTreeOutline.ts +13 -0
- package/front_end/panels/elements/MetricsSidebarPane.ts +3 -1
- package/front_end/panels/issues/AffectedSourcesView.ts +0 -1
- package/front_end/panels/issues/IssuesPane.ts +0 -4
- package/front_end/panels/network/RequestTimingView.ts +5 -20
- package/front_end/panels/network/networkTimingTable.css +5 -5
- package/front_end/panels/recorder/components/StepEditor.ts +15 -8
- package/front_end/panels/security/SecurityPanelSidebar.ts +0 -1
- package/front_end/panels/settings/AISettingsTab.ts +31 -2
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +8 -6
- package/front_end/panels/sources/UISourceCodeFrame.ts +9 -3
- package/front_end/panels/timeline/TimelinePanel.ts +12 -4
- package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +1 -1
- 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/api/Browser.d.ts +9 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +8 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +33 -31
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.js +1 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +7 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js +11 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Cookie.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- 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.d.ts +13 -4
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +62 -42
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +9 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +8 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +33 -31
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.js +1 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +7 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +11 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Cookie.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +2 -2
- 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/lib/types.d.ts +13 -4
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +11 -3
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +9 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +3 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +3 -5
- package/front_end/third_party/puppeteer/package/src/bidi/core/UserContext.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +43 -45
- package/front_end/third_party/puppeteer/package/src/cdp/WebWorker.ts +3 -11
- package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +12 -0
- package/front_end/third_party/puppeteer/package/src/common/Cookie.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/revisions.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/source-map-scopes-codec/README.chromium +2 -5
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/scopes.d.ts +130 -0
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/scopes.d.ts.map +1 -0
- package/front_end/third_party/source-map-scopes-codec/package/deno.json +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/package.json +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.ts +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.ts +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/codec.js +4 -0
- package/front_end/third_party/source-map-scopes-codec/package/src/codec.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/codec.ts +4 -0
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +30 -13
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +35 -17
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.ts +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.ts +2 -2
- package/front_end/third_party/source-map-scopes-codec/package/src/mod.ts +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/scopes.js +7 -0
- package/front_end/third_party/source-map-scopes-codec/package/src/scopes.js.map +1 -0
- package/front_end/third_party/source-map-scopes-codec/package/src/util.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +8 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +4 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +13 -0
- package/mcp/mcp.ts +1 -0
- package/package.json +1 -2
- package/front_end/third_party/source-map-scopes-codec/package/src/scopes-tsconfig.json +0 -8
- /package/front_end/third_party/source-map-scopes-codec/package/src/{scopes.d.ts → scopes.ts} +0 -0
|
@@ -13,6 +13,8 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
|
13
13
|
|
|
14
14
|
import {ApplicationPanelSidebar, StorageCategoryView} from './ApplicationPanelSidebar.js';
|
|
15
15
|
import {CookieItemsView} from './CookieItemsView.js';
|
|
16
|
+
import type {DeviceBoundSessionsModel} from './DeviceBoundSessionsModel.js';
|
|
17
|
+
import {DeviceBoundSessionsView} from './DeviceBoundSessionsView.js';
|
|
16
18
|
import {DOMStorageItemsView} from './DOMStorageItemsView.js';
|
|
17
19
|
import type {DOMStorage} from './DOMStorageModel.js';
|
|
18
20
|
import {ExtensionStorageItemsView} from './ExtensionStorageItemsView.js';
|
|
@@ -33,6 +35,7 @@ export class ResourcesPanel extends UI.Panel.PanelWithSidebar {
|
|
|
33
35
|
private domStorageView: DOMStorageItemsView|null;
|
|
34
36
|
private extensionStorageView: ExtensionStorageItemsView|null;
|
|
35
37
|
private cookieView: CookieItemsView|null;
|
|
38
|
+
private deviceBoundSessionsView: DeviceBoundSessionsView|null;
|
|
36
39
|
private readonly sidebar: ApplicationPanelSidebar;
|
|
37
40
|
|
|
38
41
|
private constructor() {
|
|
@@ -58,6 +61,7 @@ export class ResourcesPanel extends UI.Panel.PanelWithSidebar {
|
|
|
58
61
|
this.extensionStorageView = null;
|
|
59
62
|
|
|
60
63
|
this.cookieView = null;
|
|
64
|
+
this.deviceBoundSessionsView = null;
|
|
61
65
|
|
|
62
66
|
this.sidebar = new ApplicationPanelSidebar(this);
|
|
63
67
|
this.sidebar.show(this.panelSidebarElement());
|
|
@@ -206,6 +210,21 @@ export class ResourcesPanel extends UI.Panel.PanelWithSidebar {
|
|
|
206
210
|
}
|
|
207
211
|
});
|
|
208
212
|
}
|
|
213
|
+
|
|
214
|
+
showDeviceBoundSession(model: DeviceBoundSessionsModel, site: string, sessionId?: string): void {
|
|
215
|
+
if (!this.deviceBoundSessionsView) {
|
|
216
|
+
this.deviceBoundSessionsView = new DeviceBoundSessionsView();
|
|
217
|
+
}
|
|
218
|
+
this.deviceBoundSessionsView.showSession(model, site, sessionId);
|
|
219
|
+
this.showView(this.deviceBoundSessionsView);
|
|
220
|
+
}
|
|
221
|
+
showDeviceBoundSessionDefault(model: DeviceBoundSessionsModel, title: string, description: string): void {
|
|
222
|
+
if (!this.deviceBoundSessionsView) {
|
|
223
|
+
this.deviceBoundSessionsView = new DeviceBoundSessionsView();
|
|
224
|
+
}
|
|
225
|
+
this.deviceBoundSessionsView.showDefault(model, title, description);
|
|
226
|
+
this.showView(this.deviceBoundSessionsView);
|
|
227
|
+
}
|
|
209
228
|
}
|
|
210
229
|
|
|
211
230
|
export class ResourceRevealer implements Common.Revealer.Revealer<SDK.Resource.Resource> {
|
|
@@ -8,6 +8,9 @@ import * as BackgroundServiceModel from './BackgroundServiceModel.js';
|
|
|
8
8
|
import * as BackgroundServiceView from './BackgroundServiceView.js';
|
|
9
9
|
import * as BounceTrackingMitigationsTreeElement from './BounceTrackingMitigationsTreeElement.js';
|
|
10
10
|
import * as CookieItemsView from './CookieItemsView.js';
|
|
11
|
+
import * as DeviceBoundSessionsModel from './DeviceBoundSessionsModel.js';
|
|
12
|
+
import * as DeviceBoundSessionsTreeElement from './DeviceBoundSessionsTreeElement.js';
|
|
13
|
+
import * as DeviceBoundSessionsView from './DeviceBoundSessionsView.js';
|
|
11
14
|
import * as DOMStorageItemsView from './DOMStorageItemsView.js';
|
|
12
15
|
import * as DOMStorageModel from './DOMStorageModel.js';
|
|
13
16
|
import * as ExtensionStorageItemsView from './ExtensionStorageItemsView.js';
|
|
@@ -45,6 +48,9 @@ export {
|
|
|
45
48
|
BackgroundServiceView,
|
|
46
49
|
BounceTrackingMitigationsTreeElement,
|
|
47
50
|
CookieItemsView,
|
|
51
|
+
DeviceBoundSessionsModel,
|
|
52
|
+
DeviceBoundSessionsTreeElement,
|
|
53
|
+
DeviceBoundSessionsView,
|
|
48
54
|
DOMStorageItemsView,
|
|
49
55
|
DOMStorageModel,
|
|
50
56
|
ExtensionStorageItemsView,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 The Chromium Authors
|
|
3
|
+
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
.device-bound-session-grid-wrapper {
|
|
7
|
+
padding: 0 20px 5px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.device-bound-session-grid-wrapper devtools-data-grid {
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.device-bound-session-view-wrapper, .device-bound-session-sidebar {
|
|
15
|
+
overflow-y: auto;
|
|
16
|
+
scroll-behavior: smooth;
|
|
17
|
+
padding-bottom: 20px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.device-bound-session-no-events-wrapper, .device-bound-session-no-event-details {
|
|
21
|
+
padding: 0 20px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.device-bound-sessions-toolbar {
|
|
25
|
+
background-color: var(--sys-color-cdt-base-container);
|
|
26
|
+
border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
|
|
27
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
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
|
+
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
5
|
+
|
|
6
|
+
import * as Host from '../../core/host/host.js';
|
|
7
|
+
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
|
+
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
9
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
|
10
|
+
import * as Lit from '../../ui/lit/lit.js';
|
|
11
|
+
|
|
12
|
+
import styles from './aiCodeGenerationUpgradeDialog.css.js';
|
|
13
|
+
|
|
14
|
+
const {html} = Lit;
|
|
15
|
+
|
|
16
|
+
const UIStringsNotTranslate = {
|
|
17
|
+
/**
|
|
18
|
+
* @description Header text for the upgrade notice dialog.
|
|
19
|
+
*/
|
|
20
|
+
codeCompletionJustGotBetter: 'Code completion just got better',
|
|
21
|
+
/**
|
|
22
|
+
* @description First item in the description
|
|
23
|
+
*/
|
|
24
|
+
asYouType: 'As you type, DevTools generates code suggestions to help you code faster.',
|
|
25
|
+
/**
|
|
26
|
+
* @description Second item in the description
|
|
27
|
+
*/
|
|
28
|
+
describeCodeInComment:
|
|
29
|
+
'In Console and Sources, you can now describe the code you need in a comment, then press Ctrl+I to generate it.',
|
|
30
|
+
/**
|
|
31
|
+
* @description Second item in the description
|
|
32
|
+
*/
|
|
33
|
+
describeCodeInCommentForMacOs:
|
|
34
|
+
'In Console and Sources, you can now describe the code you need in a comment, then press Cmd+I to generate it.',
|
|
35
|
+
/**
|
|
36
|
+
* @description Text for the manage in settings button in the upgrade notice dialog.
|
|
37
|
+
*/
|
|
38
|
+
manageInSettings: 'Manage in settings',
|
|
39
|
+
/**
|
|
40
|
+
* @description Text for the got it button in the upgrade notice dialog.
|
|
41
|
+
*/
|
|
42
|
+
gotIt: 'Got it',
|
|
43
|
+
} as const;
|
|
44
|
+
|
|
45
|
+
const lockedString = i18n.i18n.lockedString;
|
|
46
|
+
|
|
47
|
+
export class AiCodeGenerationUpgradeDialog {
|
|
48
|
+
static show(): void {
|
|
49
|
+
const dialog = new UI.Dialog.Dialog();
|
|
50
|
+
dialog.setAriaLabel(lockedString(UIStringsNotTranslate.codeCompletionJustGotBetter));
|
|
51
|
+
// clang-format off
|
|
52
|
+
Lit.render(html`
|
|
53
|
+
<div class="ai-code-generation-upgrade-dialog">
|
|
54
|
+
<style>
|
|
55
|
+
${styles}
|
|
56
|
+
</style>
|
|
57
|
+
<header>
|
|
58
|
+
<div class="header-icon-container">
|
|
59
|
+
<devtools-icon name="pen-spark"></devtools-icon>
|
|
60
|
+
</div>
|
|
61
|
+
<h2 tabindex="-1">
|
|
62
|
+
${lockedString(UIStringsNotTranslate.codeCompletionJustGotBetter)}
|
|
63
|
+
</h2>
|
|
64
|
+
</header>
|
|
65
|
+
<main class="reminder-container">
|
|
66
|
+
<div class="reminder-item">
|
|
67
|
+
<devtools-icon class="reminder-icon" name="code"></devtools-icon>
|
|
68
|
+
<span>${lockedString(UIStringsNotTranslate.asYouType)}</span>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="reminder-item">
|
|
71
|
+
<devtools-icon class="reminder-icon" name="text-analysis"></devtools-icon>
|
|
72
|
+
<span>
|
|
73
|
+
${Host.Platform.isMac() ?
|
|
74
|
+
lockedString(UIStringsNotTranslate.describeCodeInCommentForMacOs) :
|
|
75
|
+
lockedString(UIStringsNotTranslate.describeCodeInComment)}
|
|
76
|
+
</span>
|
|
77
|
+
</div>
|
|
78
|
+
</main>
|
|
79
|
+
<footer>
|
|
80
|
+
<div class="right-buttons">
|
|
81
|
+
<devtools-button
|
|
82
|
+
@click=${() => {
|
|
83
|
+
void UI.ViewManager.ViewManager.instance().showView('chrome-ai');
|
|
84
|
+
}}
|
|
85
|
+
.jslogContext=${'ai-code-generation-upgrade-dialog.manage-in-settings'}
|
|
86
|
+
.variant=${Buttons.Button.Variant.OUTLINED}
|
|
87
|
+
aria-label=${lockedString(UIStringsNotTranslate.manageInSettings)}>
|
|
88
|
+
${lockedString(UIStringsNotTranslate.manageInSettings)}
|
|
89
|
+
</devtools-button>
|
|
90
|
+
<devtools-button
|
|
91
|
+
@click=${() => {
|
|
92
|
+
dialog.hide();
|
|
93
|
+
}}
|
|
94
|
+
.jslogContext=${'ai-code-generation-upgrade-dialog.continue'}
|
|
95
|
+
.variant=${Buttons.Button.Variant.PRIMARY}>
|
|
96
|
+
${lockedString(UIStringsNotTranslate.gotIt)}
|
|
97
|
+
</devtools-button>
|
|
98
|
+
</div>
|
|
99
|
+
</footer>
|
|
100
|
+
</div>`, dialog.contentElement);
|
|
101
|
+
// clang-format on
|
|
102
|
+
|
|
103
|
+
dialog.setOutsideClickCallback(ev => {
|
|
104
|
+
ev.consume(true); // true = preventDefault()
|
|
105
|
+
dialog.hide();
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
dialog.setSizeBehavior(UI.GlassPane.SizeBehavior.MEASURE_CONTENT);
|
|
109
|
+
dialog.setDimmed(true);
|
|
110
|
+
dialog.show();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
private constructor() {
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 The Chromium Authors
|
|
3
|
+
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
.ai-code-generation-upgrade-dialog {
|
|
9
|
+
width: var(--sys-size-33);
|
|
10
|
+
padding: var(--sys-size-9);
|
|
11
|
+
|
|
12
|
+
header {
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: var(--sys-size-8);
|
|
15
|
+
margin-bottom: var(--sys-size-6);
|
|
16
|
+
align-items: center;
|
|
17
|
+
|
|
18
|
+
h2 {
|
|
19
|
+
margin: 0;
|
|
20
|
+
color: var(--sys-color-on-surface);
|
|
21
|
+
font: var(--sys-typescale-headline5);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.header-icon-container {
|
|
25
|
+
background: linear-gradient(
|
|
26
|
+
135deg,
|
|
27
|
+
var(--sys-color-gradient-primary),
|
|
28
|
+
var(--sys-color-gradient-tertiary)
|
|
29
|
+
);
|
|
30
|
+
border-radius: var(--sys-size-4);
|
|
31
|
+
min-height: var(--sys-size-14);
|
|
32
|
+
min-width: var(--sys-size-14);
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
|
|
37
|
+
devtools-icon {
|
|
38
|
+
width: var(--sys-size-9);
|
|
39
|
+
height: var(--sys-size-9);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.reminder-container {
|
|
45
|
+
border-radius: var(--sys-size-6);
|
|
46
|
+
background-color: var(--sys-color-surface4);
|
|
47
|
+
padding: var(--sys-size-9);
|
|
48
|
+
gap: var(--sys-size-6);
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
|
|
52
|
+
.reminder-item {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: row;
|
|
55
|
+
align-items: center;
|
|
56
|
+
gap: var(--sys-size-5);
|
|
57
|
+
font: var(--sys-typescale-body4-regular);
|
|
58
|
+
|
|
59
|
+
devtools-icon.reminder-icon {
|
|
60
|
+
width: var(--sys-size-8);
|
|
61
|
+
height: var(--sys-size-8);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
footer {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: row;
|
|
69
|
+
align-items: flex-start;
|
|
70
|
+
justify-content: flex-end;
|
|
71
|
+
margin-top: var(--sys-size-8);
|
|
72
|
+
min-width: var(--sys-size-28);
|
|
73
|
+
|
|
74
|
+
.right-buttons {
|
|
75
|
+
display: flex;
|
|
76
|
+
gap: var(--sys-size-5);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -96,6 +96,7 @@ export class TypeToAllowDialog {
|
|
|
96
96
|
|
|
97
97
|
export {AiCodeCompletionTeaser} from './AiCodeCompletionTeaser.js';
|
|
98
98
|
export * as AiCodeGenerationTeaser from './AiCodeGenerationTeaser.js';
|
|
99
|
+
export {AiCodeGenerationUpgradeDialog} from './AiCodeGenerationUpgradeDialog.js';
|
|
99
100
|
export {AnnotationManager} from './AnnotationManager.js';
|
|
100
101
|
export {FreDialog} from './FreDialog.js';
|
|
101
102
|
export {GdpSignUpDialog} from './GdpSignUpDialog.js';
|
|
@@ -11,6 +11,7 @@ import * as Root from '../../core/root/root.js';
|
|
|
11
11
|
import * as Protocol from '../../generated/protocol.js';
|
|
12
12
|
import * as AiAssistanceModel from '../../models/ai_assistance/ai_assistance.js';
|
|
13
13
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
14
|
+
import type * as Tooltips from '../../ui/components/tooltips/tooltips.js';
|
|
14
15
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
15
16
|
import * as Lit from '../../ui/lit/lit.js';
|
|
16
17
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -20,7 +21,7 @@ import consoleInsightTeaserStyles from './consoleInsightTeaser.css.js';
|
|
|
20
21
|
import {ConsoleViewMessage} from './ConsoleViewMessage.js';
|
|
21
22
|
import {PromptBuilder} from './PromptBuilder.js';
|
|
22
23
|
|
|
23
|
-
const {render, html} = Lit;
|
|
24
|
+
const {render, html, Directives: {ref}} = Lit;
|
|
24
25
|
|
|
25
26
|
const BUILT_IN_AI_DOCUMENTATION = 'https://developer.chrome.com/docs/ai/built-in';
|
|
26
27
|
|
|
@@ -153,6 +154,10 @@ interface ViewInput {
|
|
|
153
154
|
isForWarning: boolean;
|
|
154
155
|
}
|
|
155
156
|
|
|
157
|
+
interface ViewOutput {
|
|
158
|
+
tooltip?: Tooltips.Tooltip.Tooltip;
|
|
159
|
+
}
|
|
160
|
+
|
|
156
161
|
function renderNoModel(input: ViewInput): Lit.TemplateResult {
|
|
157
162
|
// clang-format off
|
|
158
163
|
return html`
|
|
@@ -347,7 +352,7 @@ function renderTeaser(input: ViewInput): Lit.TemplateResult {
|
|
|
347
352
|
// clang-format on
|
|
348
353
|
}
|
|
349
354
|
|
|
350
|
-
export const DEFAULT_VIEW = (input: ViewInput,
|
|
355
|
+
export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLElement): void => {
|
|
351
356
|
if (input.isInactive) {
|
|
352
357
|
render(Lit.nothing, target);
|
|
353
358
|
return;
|
|
@@ -357,8 +362,11 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLE
|
|
|
357
362
|
render(html`
|
|
358
363
|
<style>${consoleInsightTeaserStyles}</style>
|
|
359
364
|
<devtools-tooltip
|
|
365
|
+
${ref(element => {
|
|
366
|
+
output.tooltip = element as Tooltips.Tooltip.Tooltip;
|
|
367
|
+
})}
|
|
360
368
|
id=${'teaser-' + input.uuid}
|
|
361
|
-
hover-delay=
|
|
369
|
+
hover-delay=1000
|
|
362
370
|
variant="rich"
|
|
363
371
|
vertical-distance-increase=-6
|
|
364
372
|
prefer-span-left
|
|
@@ -407,6 +415,8 @@ export class ConsoleInsightTeaser extends UI.Widget.Widget {
|
|
|
407
415
|
#state: State;
|
|
408
416
|
#eventListeners: Common.EventTarget.EventDescriptor[] = [];
|
|
409
417
|
#isForWarning: boolean;
|
|
418
|
+
#callShowTooltip = false;
|
|
419
|
+
#startTime = 0;
|
|
410
420
|
|
|
411
421
|
constructor(uuid: string, consoleViewMessage: ConsoleViewMessage, element?: HTMLElement, view?: View) {
|
|
412
422
|
super(element);
|
|
@@ -420,6 +430,7 @@ export class ConsoleInsightTeaser extends UI.Widget.Widget {
|
|
|
420
430
|
this.#boundOnSessionCreation = this.#onSessionCreation.bind(this);
|
|
421
431
|
this.#builtInAi = AiAssistanceModel.BuiltInAi.BuiltInAi.instance();
|
|
422
432
|
this.#state = this.#builtInAi.hasSession() ? State.READY : State.NO_MODEL;
|
|
433
|
+
this.#callShowTooltip = true;
|
|
423
434
|
this.requestUpdate();
|
|
424
435
|
}
|
|
425
436
|
|
|
@@ -571,11 +582,18 @@ export class ConsoleInsightTeaser extends UI.Widget.Widget {
|
|
|
571
582
|
}
|
|
572
583
|
}
|
|
573
584
|
|
|
574
|
-
abortTeaserGeneration():
|
|
585
|
+
abortTeaserGeneration(): {okToRemove: boolean} {
|
|
575
586
|
if (this.#abortController) {
|
|
576
587
|
this.#abortController.abort();
|
|
577
588
|
}
|
|
578
589
|
if (this.#state === State.GENERATING || this.#state === State.PARTIAL_TEASER) {
|
|
590
|
+
if (this.#startTime) {
|
|
591
|
+
if (this.#mainText) {
|
|
592
|
+
Host.userMetrics.consoleInsightTeaserAbortedAfterFirstCharacter(performance.now() - this.#startTime);
|
|
593
|
+
} else {
|
|
594
|
+
Host.userMetrics.consoleInsightTeaserAbortedBeforeFirstCharacter(performance.now() - this.#startTime);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
579
597
|
this.#mainText = '';
|
|
580
598
|
this.#state = State.READY;
|
|
581
599
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.InsightTeaserGenerationAborted);
|
|
@@ -584,6 +602,7 @@ export class ConsoleInsightTeaser extends UI.Widget.Widget {
|
|
|
584
602
|
clearTimeout(this.#timeoutId);
|
|
585
603
|
}
|
|
586
604
|
Common.EventTarget.removeEventListeners(this.#eventListeners);
|
|
605
|
+
return {okToRemove: this.#state !== State.TEASER};
|
|
587
606
|
}
|
|
588
607
|
|
|
589
608
|
setInactive(isInactive: boolean): void {
|
|
@@ -604,7 +623,7 @@ export class ConsoleInsightTeaser extends UI.Widget.Widget {
|
|
|
604
623
|
this.#state = State.GENERATING;
|
|
605
624
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.InsightTeaserGenerationStarted);
|
|
606
625
|
this.#timeoutId = setTimeout(this.#setSlow.bind(this), SLOW_GENERATION_CUTOFF_MILLISECONDS);
|
|
607
|
-
|
|
626
|
+
this.#startTime = performance.now();
|
|
608
627
|
let teaserText = '';
|
|
609
628
|
let firstChunkReceived = false;
|
|
610
629
|
try {
|
|
@@ -615,7 +634,7 @@ export class ConsoleInsightTeaser extends UI.Widget.Widget {
|
|
|
615
634
|
this.requestUpdate();
|
|
616
635
|
if (!firstChunkReceived) {
|
|
617
636
|
firstChunkReceived = true;
|
|
618
|
-
Host.userMetrics.consoleInsightTeaserFirstChunkGenerated(performance.now() - startTime);
|
|
637
|
+
Host.userMetrics.consoleInsightTeaserFirstChunkGenerated(performance.now() - this.#startTime);
|
|
619
638
|
}
|
|
620
639
|
}
|
|
621
640
|
} catch (err) {
|
|
@@ -633,7 +652,13 @@ export class ConsoleInsightTeaser extends UI.Widget.Widget {
|
|
|
633
652
|
}
|
|
634
653
|
|
|
635
654
|
clearTimeout(this.#timeoutId);
|
|
636
|
-
|
|
655
|
+
const duration = performance.now() - this.#startTime;
|
|
656
|
+
Host.userMetrics.consoleInsightTeaserGenerated(duration);
|
|
657
|
+
if (teaserText.length > 300) {
|
|
658
|
+
Host.userMetrics.consoleInsightLongTeaserGenerated(duration);
|
|
659
|
+
} else {
|
|
660
|
+
Host.userMetrics.consoleInsightShortTeaserGenerated(duration);
|
|
661
|
+
}
|
|
637
662
|
this.#state = State.TEASER;
|
|
638
663
|
this.#mainText = teaserText;
|
|
639
664
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.InsightTeaserGenerationCompleted);
|
|
@@ -669,6 +694,7 @@ export class ConsoleInsightTeaser extends UI.Widget.Widget {
|
|
|
669
694
|
}
|
|
670
695
|
|
|
671
696
|
override performUpdate(): Promise<void>|void {
|
|
697
|
+
const output: ViewOutput = {};
|
|
672
698
|
this.#view(
|
|
673
699
|
{
|
|
674
700
|
onTellMeMoreClick: this.#onTellMeMoreClick.bind(this),
|
|
@@ -685,7 +711,14 @@ export class ConsoleInsightTeaser extends UI.Widget.Widget {
|
|
|
685
711
|
state: this.#state,
|
|
686
712
|
isForWarning: this.#isForWarning,
|
|
687
713
|
},
|
|
688
|
-
|
|
714
|
+
output, this.contentElement);
|
|
715
|
+
if (this.#callShowTooltip && output.tooltip?.hasAttribute('popover')) {
|
|
716
|
+
// The ConsoleInsightTeaser is created on hover, which means the tooltip's
|
|
717
|
+
// event listener is created after the hover event is received. We therefore
|
|
718
|
+
// explicitly call `showTooltip()`, otherwise the tooltip wouldn't show up.
|
|
719
|
+
output.tooltip.showTooltip();
|
|
720
|
+
}
|
|
721
|
+
this.#callShowTooltip = false;
|
|
689
722
|
}
|
|
690
723
|
|
|
691
724
|
override wasShown(): void {
|
|
@@ -402,9 +402,6 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
402
402
|
|
|
403
403
|
wasShown(): void {
|
|
404
404
|
this.isVisibleInternal = true;
|
|
405
|
-
if (this.elementInternal) {
|
|
406
|
-
this.#teaser?.show(this.elementInternal, this.consoleRowWrapper);
|
|
407
|
-
}
|
|
408
405
|
}
|
|
409
406
|
|
|
410
407
|
onResize(): void {
|
|
@@ -413,7 +410,6 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
413
410
|
willHide(): void {
|
|
414
411
|
this.isVisibleInternal = false;
|
|
415
412
|
this.cachedHeight = this.element().offsetHeight;
|
|
416
|
-
this.#teaser?.detach();
|
|
417
413
|
}
|
|
418
414
|
|
|
419
415
|
isVisible(): boolean {
|
|
@@ -1410,14 +1406,31 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
1410
1406
|
}
|
|
1411
1407
|
|
|
1412
1408
|
#startTeaserGeneration(): void {
|
|
1413
|
-
if (this
|
|
1414
|
-
|
|
1409
|
+
if (!this.elementInternal) {
|
|
1410
|
+
return;
|
|
1411
|
+
}
|
|
1412
|
+
if (this.shouldShowTeaser()) {
|
|
1413
|
+
if (!this.#teaser) {
|
|
1414
|
+
const uuid = crypto.randomUUID();
|
|
1415
|
+
this.elementInternal.setAttribute('aria-details', `teaser-${uuid}`);
|
|
1416
|
+
this.#teaser = new ConsoleInsightTeaser(uuid, this);
|
|
1417
|
+
this.#teaser.show(this.elementInternal, this.consoleRowWrapper);
|
|
1418
|
+
}
|
|
1415
1419
|
this.#teaser.maybeGenerateTeaser();
|
|
1420
|
+
} else { // Removes teaser if preferences have changed
|
|
1421
|
+
this.#teaser?.detach();
|
|
1422
|
+
this.#teaser = undefined;
|
|
1416
1423
|
}
|
|
1417
1424
|
}
|
|
1418
1425
|
|
|
1419
1426
|
#abortTeaserGeneration(): void {
|
|
1420
|
-
this.#teaser
|
|
1427
|
+
if (this.#teaser) {
|
|
1428
|
+
const {okToRemove} = this.#teaser.abortTeaserGeneration();
|
|
1429
|
+
if (okToRemove) {
|
|
1430
|
+
this.#teaser.detach();
|
|
1431
|
+
this.#teaser = undefined;
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1421
1434
|
}
|
|
1422
1435
|
|
|
1423
1436
|
toMessageElement(): HTMLElement {
|
|
@@ -1450,12 +1463,6 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
1450
1463
|
this.consoleRowWrapper = this.elementInternal.createChild('div');
|
|
1451
1464
|
this.consoleRowWrapper.classList.add('console-row-wrapper');
|
|
1452
1465
|
|
|
1453
|
-
if (this.shouldShowTeaser()) {
|
|
1454
|
-
const uuid = crypto.randomUUID();
|
|
1455
|
-
this.elementInternal.setAttribute('aria-details', `teaser-${uuid}`);
|
|
1456
|
-
this.#teaser = new ConsoleInsightTeaser(uuid, this);
|
|
1457
|
-
}
|
|
1458
|
-
|
|
1459
1466
|
if (this.message.isGroupStartMessage()) {
|
|
1460
1467
|
this.elementInternal.classList.add('console-group-title');
|
|
1461
1468
|
}
|
|
@@ -96,6 +96,8 @@ interface ViewInput {
|
|
|
96
96
|
deindentSingleNode: boolean;
|
|
97
97
|
currentHighlightedNode: SDK.DOMModel.DOMNode|null;
|
|
98
98
|
|
|
99
|
+
selectedNode: SDK.DOMModel.DOMNode|null;
|
|
100
|
+
|
|
99
101
|
onSelectedNodeChanged:
|
|
100
102
|
(event: Common.EventTarget.EventTargetEvent<{node: SDK.DOMModel.DOMNode | null, focus: boolean}>) => void;
|
|
101
103
|
onElementsTreeUpdated: (event: Common.EventTarget.EventTargetEvent<SDK.DOMModel.DOMNode[]>) => void;
|
|
@@ -172,6 +174,9 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
172
174
|
output.elementsTreeOutline.rootElement()) as ElementsTreeElement;
|
|
173
175
|
treeElement = output.elementsTreeOutline.createTreeElementFor(input.currentHighlightedNode);
|
|
174
176
|
}
|
|
177
|
+
if (input.selectedNode) {
|
|
178
|
+
output.elementsTreeOutline.selectDOMNode(input.selectedNode);
|
|
179
|
+
}
|
|
175
180
|
|
|
176
181
|
output.highlightedTreeElement = treeElement;
|
|
177
182
|
output.elementsTreeOutline.setHoverEffect(treeElement);
|
|
@@ -320,6 +325,7 @@ export class DOMTreeWidget extends UI.Widget.Widget {
|
|
|
320
325
|
deindentSingleNode: this.deindentSingleNode,
|
|
321
326
|
|
|
322
327
|
currentHighlightedNode: this.#currentHighlightedNode,
|
|
328
|
+
selectedNode: this.selectedDOMNode(),
|
|
323
329
|
onElementsTreeUpdated: this.onElementsTreeUpdated.bind(this),
|
|
324
330
|
onSelectedNodeChanged: event => {
|
|
325
331
|
this.#clearHighlightedNode();
|
|
@@ -1523,6 +1529,7 @@ export class ElementsTreeOutline extends
|
|
|
1523
1529
|
domModel.addEventListener(SDK.DOMModel.Events.AttrRemoved, this.attributeRemoved, this);
|
|
1524
1530
|
domModel.addEventListener(SDK.DOMModel.Events.CharacterDataModified, this.characterDataModified, this);
|
|
1525
1531
|
domModel.addEventListener(SDK.DOMModel.Events.DocumentUpdated, this.documentUpdated, this);
|
|
1532
|
+
domModel.addEventListener(SDK.DOMModel.Events.DocumentURLChanged, this.documentURLChanged, this);
|
|
1526
1533
|
domModel.addEventListener(SDK.DOMModel.Events.ChildNodeCountUpdated, this.childNodeCountUpdated, this);
|
|
1527
1534
|
domModel.addEventListener(SDK.DOMModel.Events.DistributedNodesChanged, this.distributedNodesChanged, this);
|
|
1528
1535
|
domModel.addEventListener(
|
|
@@ -1538,6 +1545,7 @@ export class ElementsTreeOutline extends
|
|
|
1538
1545
|
domModel.removeEventListener(SDK.DOMModel.Events.AttrRemoved, this.attributeRemoved, this);
|
|
1539
1546
|
domModel.removeEventListener(SDK.DOMModel.Events.CharacterDataModified, this.characterDataModified, this);
|
|
1540
1547
|
domModel.removeEventListener(SDK.DOMModel.Events.DocumentUpdated, this.documentUpdated, this);
|
|
1548
|
+
domModel.removeEventListener(SDK.DOMModel.Events.DocumentURLChanged, this.documentURLChanged, this);
|
|
1541
1549
|
domModel.removeEventListener(SDK.DOMModel.Events.ChildNodeCountUpdated, this.childNodeCountUpdated, this);
|
|
1542
1550
|
domModel.removeEventListener(SDK.DOMModel.Events.DistributedNodesChanged, this.distributedNodesChanged, this);
|
|
1543
1551
|
domModel.removeEventListener(
|
|
@@ -1595,6 +1603,11 @@ export class ElementsTreeOutline extends
|
|
|
1595
1603
|
this.updateModifiedNodesSoon();
|
|
1596
1604
|
}
|
|
1597
1605
|
|
|
1606
|
+
private documentURLChanged(event: Common.EventTarget.EventTargetEvent<SDK.DOMModel.DOMDocument>): void {
|
|
1607
|
+
this.addUpdateRecord(event.data).charDataModified();
|
|
1608
|
+
this.updateModifiedNodesSoon();
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1598
1611
|
private nodeInserted(event: Common.EventTarget.EventTargetEvent<SDK.DOMModel.DOMNode>): void {
|
|
1599
1612
|
const node = event.data;
|
|
1600
1613
|
this.addUpdateRecord((node.parentNode as SDK.DOMModel.DOMNode)).nodeInserted(node);
|
|
@@ -341,7 +341,9 @@ export class MetricsSidebarPane extends ElementsSidebarPane {
|
|
|
341
341
|
|
|
342
342
|
previousBox = boxElement;
|
|
343
343
|
}
|
|
344
|
-
|
|
344
|
+
if (previousBox) {
|
|
345
|
+
metricsElement.appendChild(previousBox);
|
|
346
|
+
}
|
|
345
347
|
metricsElement.addEventListener('mouseover', this.highlightDOMNode.bind(this, false, 'all'), false);
|
|
346
348
|
metricsElement.addEventListener('mouseleave', this.highlightDOMNode.bind(this, false, 'all'), false);
|
|
347
349
|
this.contentElement.removeChildren();
|
|
@@ -44,7 +44,6 @@ export class AffectedSourcesView extends AffectedResourcesView {
|
|
|
44
44
|
// 'click' neither 'keydown' if that key is the 'Enter' key.
|
|
45
45
|
// Also, this element has a context menu, so we should be able to
|
|
46
46
|
// track when the user use the context menu too.
|
|
47
|
-
// TODO(crbug.com/1108503): Add some mechanism to be able to add telemetry to this element.
|
|
48
47
|
const anchorElement =
|
|
49
48
|
Components.Linkifier.Linkifier.linkifyURL(url as Platform.DevToolsPath.UrlString, linkifierURLOptions);
|
|
50
49
|
anchorElement.setAttribute('jslog', `${VisualLogging.link('source-location').track({click: true})}`);
|
|
@@ -270,7 +270,6 @@ export class IssuesPane extends UI.Widget.VBox {
|
|
|
270
270
|
thirdPartySetting, i18nString(UIStrings.includeCookieIssuesCausedBy),
|
|
271
271
|
i18nString(UIStrings.includeThirdpartyCookieIssues));
|
|
272
272
|
rightToolbar.appendToolbarItem(this.#showThirdPartyCheckbox);
|
|
273
|
-
this.setDefaultFocusedElement(this.#showThirdPartyCheckbox.element);
|
|
274
273
|
|
|
275
274
|
rightToolbar.appendSeparator();
|
|
276
275
|
const issueCounter = new IssueCounter.IssueCounter.IssueCounter();
|
|
@@ -459,9 +458,6 @@ export class IssuesPane extends UI.Widget.VBox {
|
|
|
459
458
|
}
|
|
460
459
|
} else {
|
|
461
460
|
this.#issuesTree.element.hidden = true;
|
|
462
|
-
if (this.#showThirdPartyCheckbox) {
|
|
463
|
-
this.setDefaultFocusedElement(this.#showThirdPartyCheckbox.element);
|
|
464
|
-
}
|
|
465
461
|
// We alreay know that issesCount is zero here.
|
|
466
462
|
const hasOnlyThirdPartyIssues =
|
|
467
463
|
this.#issuesManager.numberOfAllStoredIssues() - this.#issuesManager.numberOfThirdPartyCookiePhaseoutIssues() >
|
|
@@ -374,9 +374,9 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
374
374
|
if (!target?.classList.contains('network-fetch-timing-bar-clickable')) {
|
|
375
375
|
return;
|
|
376
376
|
}
|
|
377
|
-
const
|
|
378
|
-
target.
|
|
379
|
-
if (!
|
|
377
|
+
const isExpanded = target.ariaExpanded === 'true';
|
|
378
|
+
target.ariaExpanded = isExpanded ? 'false' : 'true';
|
|
379
|
+
if (!isExpanded) {
|
|
380
380
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.NetworkPanelServiceWorkerRespondWith);
|
|
381
381
|
}
|
|
382
382
|
};
|
|
@@ -454,8 +454,8 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
454
454
|
<tr>
|
|
455
455
|
${isClickable(range) ? html`<td
|
|
456
456
|
tabindex=0
|
|
457
|
-
role=
|
|
458
|
-
aria-
|
|
457
|
+
role=button
|
|
458
|
+
aria-expanded=false
|
|
459
459
|
@click=${onActivate}
|
|
460
460
|
@keydown=${onActivate}
|
|
461
461
|
class=network-fetch-timing-bar-clickable>
|
|
@@ -589,21 +589,6 @@ export class RequestTimingView extends UI.Widget.VBox {
|
|
|
589
589
|
this.#view(input, {}, this.contentElement);
|
|
590
590
|
}
|
|
591
591
|
|
|
592
|
-
private onToggleFetchDetails(fetchDetailsElement: Element, event: Event): void {
|
|
593
|
-
if (!event.target) {
|
|
594
|
-
return;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
const target = (event.target as Element);
|
|
598
|
-
if (target.classList.contains('network-fetch-timing-bar-clickable')) {
|
|
599
|
-
const expanded = target.getAttribute('aria-checked') === 'true';
|
|
600
|
-
target.setAttribute('aria-checked', String(!expanded));
|
|
601
|
-
|
|
602
|
-
fetchDetailsElement.classList.toggle('network-fetch-timing-bar-details-collapsed');
|
|
603
|
-
fetchDetailsElement.classList.toggle('network-fetch-timing-bar-details-expanded');
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
|
|
607
592
|
#fetchDetailsTree(): UI.TreeOutline.TreeOutlineInShadow|undefined {
|
|
608
593
|
if (!this.#request?.fetchedViaServiceWorker) {
|
|
609
594
|
return undefined;
|