chrome-devtools-frontend 1.0.1539728 → 1.0.1541169
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/eslint.config.mjs +167 -151
- package/front_end/core/common/Debouncer.ts +2 -2
- package/front_end/core/common/Gzip.ts +1 -1
- package/front_end/core/common/Revealer.ts +5 -0
- package/front_end/core/common/Throttler.ts +3 -3
- package/front_end/core/host/GdpClient.ts +4 -0
- package/front_end/core/host/InspectorFrontendHost.ts +10 -10
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +181 -0
- package/front_end/core/protocol_client/InspectorBackend.ts +36 -203
- package/front_end/core/protocol_client/protocol_client.ts +2 -2
- package/front_end/core/sdk/DebuggerModel.ts +3 -16
- package/front_end/core/sdk/NetworkManager.ts +16 -11
- package/front_end/core/sdk/RemoteObject.ts +4 -0
- package/front_end/core/sdk/Target.ts +3 -6
- package/front_end/core/sdk/TargetManager.ts +1 -2
- package/front_end/core/sdk/sdk-meta.ts +0 -35
- package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +1 -3
- package/front_end/entrypoints/node_app/app/NodeMain.ts +3 -2
- package/front_end/entrypoints/shell/shell.ts +1 -0
- package/front_end/entrypoints/trace_app/trace_app.ts +1 -0
- package/front_end/generated/Deprecation.ts +8 -0
- package/front_end/generated/InspectorBackendCommands.ts +8 -5
- package/front_end/generated/SupportedCSSProperties.js +58 -4
- package/front_end/generated/protocol.ts +60 -4
- package/front_end/models/ai_assistance/EvaluateAction.ts +88 -5
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +121 -56
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +104 -62
- package/front_end/models/ai_assistance/injected.ts +15 -2
- package/front_end/models/ai_assistance/performance/AIQueries.ts +56 -2
- package/front_end/{panels/issues → models/issues_manager}/IssueAggregator.ts +83 -65
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/live-metrics/web-vitals-injected/README.md +1 -1
- package/front_end/models/trace/Processor.ts +5 -4
- package/front_end/models/trace/Styles.ts +1 -1
- package/front_end/models/trace/insights/types.ts +1 -1
- package/front_end/models/trace/types/TraceEvents.ts +1 -1
- package/front_end/models/workspace/IgnoreListManager.ts +41 -47
- package/front_end/models/workspace/workspace-meta.ts +40 -0
- package/front_end/panels/ai_assistance/PatchWidget.ts +22 -12
- package/front_end/panels/ai_assistance/components/ChatView.ts +1 -1
- package/front_end/panels/animation/AnimationTimeline.ts +4 -4
- package/front_end/panels/animation/AnimationUI.ts +28 -34
- package/front_end/panels/common/AiCodeCompletionDisclaimer.ts +4 -4
- package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +2 -2
- package/front_end/panels/elements/ElementsTreeElement.ts +37 -9
- package/front_end/panels/elements/LayoutPane.ts +2 -2
- package/front_end/panels/elements/PropertiesWidget.ts +3 -2
- package/front_end/panels/elements/components/AdornerManager.ts +9 -9
- package/front_end/panels/elements/layoutPane.css +5 -9
- package/front_end/panels/event_listeners/EventListenersView.ts +10 -6
- package/front_end/panels/explain/components/ConsoleInsight.ts +498 -449
- package/front_end/panels/issues/AffectedResourcesView.ts +3 -4
- package/front_end/panels/issues/CorsIssueDetailsView.ts +1 -2
- package/front_end/panels/issues/IssueView.ts +1 -1
- package/front_end/panels/issues/IssuesPane.ts +12 -15
- package/front_end/panels/issues/issues.ts +0 -2
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +3 -3
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts +2 -2
- package/front_end/panels/network/NetworkDataGridNode.ts +2 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +149 -46
- package/front_end/panels/network/RequestPayloadView.ts +2 -1
- package/front_end/panels/network/RequestTimingView.ts +17 -10
- package/front_end/panels/network/components/RequestHeadersView.ts +24 -17
- package/front_end/panels/network/network-meta.ts +11 -0
- package/front_end/panels/protocol_monitor/JSONEditor.ts +2 -2
- package/front_end/panels/recorder/RecorderController.ts +6 -7
- package/front_end/panels/recorder/models/RecordingPlayer.ts +3 -3
- package/front_end/panels/settings/components/SyncSection.ts +1 -1
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +1 -1
- package/front_end/panels/sources/BreakpointsView.ts +3 -3
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +4 -3
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +4 -3
- package/front_end/panels/sources/breakpointsView.css +1 -1
- package/front_end/panels/sources/sourcesPanel.css +2 -2
- package/front_end/panels/timeline/TimelineFlameChartView.ts +3 -3
- package/front_end/panels/timeline/TimelinePanel.ts +3 -3
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +9 -5
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +16 -10
- package/front_end/panels/timeline/components/LiveMetricsView.ts +20 -9
- package/front_end/panels/timeline/components/MetricCard.ts +4 -2
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +2 -0
- package/front_end/services/puppeteer/PuppeteerConnection.ts +2 -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/Page.d.ts +5 -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.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +1 -0
- 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 +21 -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/ExtensionTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExtensionTransport.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExtensionTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -0
- 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 +6 -0
- 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/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +29 -27
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- 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/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 +5 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +61 -26
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +5 -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.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +1 -0
- 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 +21 -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/ExtensionTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExtensionTransport.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExtensionTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -0
- 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 +6 -0
- 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/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +30 -28
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- 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 +5 -0
- package/front_end/third_party/puppeteer/package/package.json +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +32 -0
- package/front_end/third_party/puppeteer/package/src/cdp/ExtensionTransport.ts +5 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +8 -0
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +36 -43
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/dialogs/ButtonDialog.ts +15 -5
- package/front_end/ui/components/expandable_list/ExpandableList.ts +1 -1
- package/front_end/ui/components/helpers/helpers.ts +0 -2
- package/front_end/ui/components/markdown_view/MarkdownView.ts +1 -0
- package/front_end/ui/components/menus/Menu.ts +5 -3
- package/front_end/ui/components/snackbars/Snackbars.docs.ts +46 -0
- package/front_end/ui/components/survey_link/SurveyLink.docs.ts +22 -0
- package/front_end/ui/components/tree_outline/TreeOutline.ts +1 -2
- package/front_end/ui/{components/docs/context_menu/basic.ts → legacy/ContextMenu.docs.ts} +58 -25
- package/front_end/ui/legacy/SelectMenu.docs.ts +14 -0
- package/front_end/ui/legacy/UIUtils.ts +2 -1
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +3 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +558 -439
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +3 -3
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +1 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +3 -2
- package/mcp/mcp.ts +15 -1
- package/package.json +2 -1
- package/front_end/core/protocol_client/NodeURL.ts +0 -40
- package/front_end/ui/components/docs/combo_box/basic.html +0 -20
- package/front_end/ui/components/docs/combo_box/basic.ts +0 -49
- package/front_end/ui/components/docs/context_menu/basic.html +0 -45
- package/front_end/ui/components/docs/legacy_color_invert/basic.html +0 -77
- package/front_end/ui/components/docs/legacy_color_invert/basic.ts +0 -98
- package/front_end/ui/components/docs/linkifier/simple-url.html +0 -25
- package/front_end/ui/components/docs/linkifier/simple-url.ts +0 -25
- package/front_end/ui/components/docs/panel_feedback/basic.html +0 -25
- package/front_end/ui/components/docs/panel_feedback/basic.ts +0 -21
- package/front_end/ui/components/docs/panel_feedback/button.html +0 -25
- package/front_end/ui/components/docs/panel_feedback/button.ts +0 -19
- package/front_end/ui/components/docs/panel_introduction_steps/basic.html +0 -25
- package/front_end/ui/components/docs/panel_introduction_steps/basic.ts +0 -28
- package/front_end/ui/components/docs/perf_piechart/basic-with-legend.html +0 -20
- package/front_end/ui/components/docs/perf_piechart/basic-with-legend.ts +0 -20
- package/front_end/ui/components/docs/perf_piechart/basic-without-legend.html +0 -20
- package/front_end/ui/components/docs/perf_piechart/basic-without-legend.ts +0 -18
- package/front_end/ui/components/docs/snackbars/basic.html +0 -17
- package/front_end/ui/components/docs/snackbars/basic.ts +0 -50
- package/front_end/ui/components/docs/survey_link/basic.html +0 -20
- package/front_end/ui/components/docs/survey_link/basic.ts +0 -28
- package/front_end/ui/components/docs/tree_outline/basic.html +0 -33
- package/front_end/ui/components/docs/tree_outline/basic.ts +0 -38
- package/front_end/ui/components/docs/tree_outline/custom-renderers.html +0 -32
- package/front_end/ui/components/docs/tree_outline/custom-renderers.ts +0 -61
- package/front_end/ui/components/docs/tree_outline/lazy-children.html +0 -32
- package/front_end/ui/components/docs/tree_outline/lazy-children.ts +0 -91
- package/front_end/ui/components/docs/tree_outline/sample-data.ts +0 -67
- package/front_end/ui/components/helpers/directives.ts +0 -38
|
@@ -50,51 +50,49 @@ export interface IgnoreListGeneralRules {
|
|
|
50
50
|
|
|
51
51
|
export class IgnoreListManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes> implements
|
|
52
52
|
SDK.TargetManager.SDKModelObserver<SDK.DebuggerModel.DebuggerModel> {
|
|
53
|
-
readonly #
|
|
54
|
-
readonly #
|
|
55
|
-
readonly #contentScriptExecutionContexts: Set<string>;
|
|
53
|
+
readonly #settings: Common.Settings.Settings;
|
|
54
|
+
readonly #targetManager: SDK.TargetManager.TargetManager;
|
|
56
55
|
|
|
57
|
-
|
|
56
|
+
readonly #listeners = new Set<() => void>();
|
|
57
|
+
readonly #isIgnoreListedURLCache = new Map<string, boolean>();
|
|
58
|
+
readonly #contentScriptExecutionContexts = new Set<string>();
|
|
59
|
+
|
|
60
|
+
private constructor(settings: Common.Settings.Settings, targetManager: SDK.TargetManager.TargetManager) {
|
|
58
61
|
super();
|
|
62
|
+
this.#settings = settings;
|
|
63
|
+
this.#targetManager = targetManager;
|
|
59
64
|
|
|
60
|
-
|
|
65
|
+
this.#targetManager.addModelListener(
|
|
61
66
|
SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.GlobalObjectCleared,
|
|
62
67
|
this.clearCacheIfNeeded.bind(this), this);
|
|
63
|
-
|
|
68
|
+
this.#targetManager.addModelListener(
|
|
64
69
|
SDK.RuntimeModel.RuntimeModel, SDK.RuntimeModel.Events.ExecutionContextCreated, this.onExecutionContextCreated,
|
|
65
70
|
this, {scoped: true});
|
|
66
|
-
|
|
71
|
+
this.#targetManager.addModelListener(
|
|
67
72
|
SDK.RuntimeModel.RuntimeModel, SDK.RuntimeModel.Events.ExecutionContextDestroyed,
|
|
68
73
|
this.onExecutionContextDestroyed, this, {scoped: true});
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
Common.Settings.Settings.instance()
|
|
73
|
-
.moduleSetting('skip-content-scripts')
|
|
74
|
-
.addChangeListener(this.patternChanged.bind(this));
|
|
75
|
-
Common.Settings.Settings.instance()
|
|
76
|
-
.moduleSetting('automatically-ignore-list-known-third-party-scripts')
|
|
77
|
-
.addChangeListener(this.patternChanged.bind(this));
|
|
78
|
-
Common.Settings.Settings.instance()
|
|
79
|
-
.moduleSetting('enable-ignore-listing')
|
|
74
|
+
this.#settings.moduleSetting('skip-stack-frames-pattern').addChangeListener(this.patternChanged.bind(this));
|
|
75
|
+
this.#settings.moduleSetting('skip-content-scripts').addChangeListener(this.patternChanged.bind(this));
|
|
76
|
+
this.#settings.moduleSetting('automatically-ignore-list-known-third-party-scripts')
|
|
80
77
|
.addChangeListener(this.patternChanged.bind(this));
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
.addChangeListener(this.patternChanged.bind(this));
|
|
84
|
-
|
|
85
|
-
this.#listeners = new Set();
|
|
86
|
-
this.#isIgnoreListedURLCache = new Map();
|
|
87
|
-
this.#contentScriptExecutionContexts = new Set();
|
|
78
|
+
this.#settings.moduleSetting('enable-ignore-listing').addChangeListener(this.patternChanged.bind(this));
|
|
79
|
+
this.#settings.moduleSetting('skip-anonymous-scripts').addChangeListener(this.patternChanged.bind(this));
|
|
88
80
|
|
|
89
|
-
|
|
81
|
+
this.#targetManager.observeModels(SDK.DebuggerModel.DebuggerModel, this);
|
|
90
82
|
}
|
|
91
83
|
|
|
92
84
|
static instance(opts: {
|
|
93
85
|
forceNew: boolean|null,
|
|
94
|
-
|
|
86
|
+
settings?: Common.Settings.Settings,
|
|
87
|
+
targetManager?: SDK.TargetManager.TargetManager,
|
|
88
|
+
} = {
|
|
89
|
+
forceNew: null,
|
|
90
|
+
}): IgnoreListManager {
|
|
95
91
|
const {forceNew} = opts;
|
|
96
92
|
if (!ignoreListManagerInstance || forceNew) {
|
|
97
|
-
ignoreListManagerInstance = new IgnoreListManager(
|
|
93
|
+
ignoreListManagerInstance = new IgnoreListManager(
|
|
94
|
+
opts.settings ?? Common.Settings.Settings.instance(),
|
|
95
|
+
opts.targetManager ?? SDK.TargetManager.TargetManager.instance());
|
|
98
96
|
}
|
|
99
97
|
|
|
100
98
|
return ignoreListManagerInstance;
|
|
@@ -135,8 +133,7 @@ export class IgnoreListManager extends Common.ObjectWrapper.ObjectWrapper<EventT
|
|
|
135
133
|
if (this.isContentScript(event.data)) {
|
|
136
134
|
this.#contentScriptExecutionContexts.add(event.data.uniqueId);
|
|
137
135
|
if (this.skipContentScripts) {
|
|
138
|
-
for (const debuggerModel of SDK.
|
|
139
|
-
SDK.DebuggerModel.DebuggerModel)) {
|
|
136
|
+
for (const debuggerModel of this.#targetManager.models(SDK.DebuggerModel.DebuggerModel)) {
|
|
140
137
|
void this.updateIgnoredExecutionContexts(debuggerModel);
|
|
141
138
|
}
|
|
142
139
|
}
|
|
@@ -148,8 +145,7 @@ export class IgnoreListManager extends Common.ObjectWrapper.ObjectWrapper<EventT
|
|
|
148
145
|
if (this.isContentScript(event.data)) {
|
|
149
146
|
this.#contentScriptExecutionContexts.delete(event.data.uniqueId);
|
|
150
147
|
if (this.skipContentScripts) {
|
|
151
|
-
for (const debuggerModel of SDK.
|
|
152
|
-
SDK.DebuggerModel.DebuggerModel)) {
|
|
148
|
+
for (const debuggerModel of this.#targetManager.models(SDK.DebuggerModel.DebuggerModel)) {
|
|
153
149
|
void this.updateIgnoredExecutionContexts(debuggerModel);
|
|
154
150
|
}
|
|
155
151
|
}
|
|
@@ -163,8 +159,7 @@ export class IgnoreListManager extends Common.ObjectWrapper.ObjectWrapper<EventT
|
|
|
163
159
|
}
|
|
164
160
|
|
|
165
161
|
private getSkipStackFramesPatternSetting(): Common.Settings.RegExpSetting {
|
|
166
|
-
return
|
|
167
|
-
Common.Settings.RegExpSetting;
|
|
162
|
+
return this.#settings.moduleSetting('skip-stack-frames-pattern') as Common.Settings.RegExpSetting;
|
|
168
163
|
}
|
|
169
164
|
|
|
170
165
|
private setIgnoreListPatterns(debuggerModel: SDK.DebuggerModel.DebuggerModel): Promise<boolean> {
|
|
@@ -327,58 +322,57 @@ export class IgnoreListManager extends Common.ObjectWrapper.ObjectWrapper<EventT
|
|
|
327
322
|
}
|
|
328
323
|
|
|
329
324
|
get enableIgnoreListing(): boolean {
|
|
330
|
-
return
|
|
325
|
+
return this.#settings.moduleSetting('enable-ignore-listing').get();
|
|
331
326
|
}
|
|
332
327
|
|
|
333
328
|
set enableIgnoreListing(value: boolean) {
|
|
334
|
-
|
|
329
|
+
this.#settings.moduleSetting('enable-ignore-listing').set(value);
|
|
335
330
|
}
|
|
336
331
|
|
|
337
332
|
get skipContentScripts(): boolean {
|
|
338
|
-
return this.enableIgnoreListing &&
|
|
333
|
+
return this.enableIgnoreListing && this.#settings.moduleSetting('skip-content-scripts').get();
|
|
339
334
|
}
|
|
340
335
|
|
|
341
336
|
get skipAnonymousScripts(): boolean {
|
|
342
|
-
return this.enableIgnoreListing &&
|
|
343
|
-
Common.Settings.Settings.instance().moduleSetting('skip-anonymous-scripts').get();
|
|
337
|
+
return this.enableIgnoreListing && this.#settings.moduleSetting('skip-anonymous-scripts').get();
|
|
344
338
|
}
|
|
345
339
|
|
|
346
340
|
get automaticallyIgnoreListKnownThirdPartyScripts(): boolean {
|
|
347
341
|
return this.enableIgnoreListing &&
|
|
348
|
-
|
|
342
|
+
this.#settings.moduleSetting('automatically-ignore-list-known-third-party-scripts').get();
|
|
349
343
|
}
|
|
350
344
|
|
|
351
345
|
ignoreListContentScripts(): void {
|
|
352
346
|
if (!this.enableIgnoreListing) {
|
|
353
347
|
this.enableIgnoreListing = true;
|
|
354
348
|
}
|
|
355
|
-
|
|
349
|
+
this.#settings.moduleSetting('skip-content-scripts').set(true);
|
|
356
350
|
}
|
|
357
351
|
|
|
358
352
|
unIgnoreListContentScripts(): void {
|
|
359
|
-
|
|
353
|
+
this.#settings.moduleSetting('skip-content-scripts').set(false);
|
|
360
354
|
}
|
|
361
355
|
|
|
362
356
|
ignoreListAnonymousScripts(): void {
|
|
363
357
|
if (!this.enableIgnoreListing) {
|
|
364
358
|
this.enableIgnoreListing = true;
|
|
365
359
|
}
|
|
366
|
-
|
|
360
|
+
this.#settings.moduleSetting('skip-anonymous-scripts').set(true);
|
|
367
361
|
}
|
|
368
362
|
|
|
369
363
|
unIgnoreListAnonymousScripts(): void {
|
|
370
|
-
|
|
364
|
+
this.#settings.moduleSetting('skip-anonymous-scripts').set(false);
|
|
371
365
|
}
|
|
372
366
|
|
|
373
367
|
ignoreListThirdParty(): void {
|
|
374
368
|
if (!this.enableIgnoreListing) {
|
|
375
369
|
this.enableIgnoreListing = true;
|
|
376
370
|
}
|
|
377
|
-
|
|
371
|
+
this.#settings.moduleSetting('automatically-ignore-list-known-third-party-scripts').set(true);
|
|
378
372
|
}
|
|
379
373
|
|
|
380
374
|
unIgnoreListThirdParty(): void {
|
|
381
|
-
|
|
375
|
+
this.#settings.moduleSetting('automatically-ignore-list-known-third-party-scripts').set(false);
|
|
382
376
|
}
|
|
383
377
|
|
|
384
378
|
ignoreListURL(url: Platform.DevToolsPath.UrlString): void {
|
|
@@ -467,7 +461,7 @@ export class IgnoreListManager extends Common.ObjectWrapper.ObjectWrapper<EventT
|
|
|
467
461
|
this.#isIgnoreListedURLCache.clear();
|
|
468
462
|
|
|
469
463
|
const promises: Array<Promise<unknown>> = [];
|
|
470
|
-
for (const debuggerModel of
|
|
464
|
+
for (const debuggerModel of this.#targetManager.models(SDK.DebuggerModel.DebuggerModel)) {
|
|
471
465
|
promises.push(this.setIgnoreListPatterns(debuggerModel));
|
|
472
466
|
const sourceMapManager = debuggerModel.sourceMapManager();
|
|
473
467
|
for (const script of debuggerModel.scripts()) {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Copyright 2025 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as Common from '../../core/common/common.js';
|
|
6
|
+
|
|
7
|
+
Common.Settings.registerSettingExtension({
|
|
8
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
9
|
+
settingName: 'skip-stack-frames-pattern',
|
|
10
|
+
settingType: Common.Settings.SettingType.REGEX,
|
|
11
|
+
defaultValue: '/node_modules/|^node:',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
Common.Settings.registerSettingExtension({
|
|
15
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
16
|
+
settingName: 'skip-content-scripts',
|
|
17
|
+
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
18
|
+
defaultValue: true,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
Common.Settings.registerSettingExtension({
|
|
22
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
23
|
+
settingName: 'automatically-ignore-list-known-third-party-scripts',
|
|
24
|
+
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
25
|
+
defaultValue: true,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
Common.Settings.registerSettingExtension({
|
|
29
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
30
|
+
settingName: 'skip-anonymous-scripts',
|
|
31
|
+
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
32
|
+
defaultValue: false,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
Common.Settings.registerSettingExtension({
|
|
36
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
37
|
+
settingName: 'enable-ignore-listing',
|
|
38
|
+
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
39
|
+
defaultValue: true,
|
|
40
|
+
});
|
|
@@ -310,11 +310,13 @@ const DEFAULT_VIEW: View =
|
|
|
310
310
|
const iconName = input.projectType === SelectedProjectType.AUTOMATIC_DISCONNECTED ? 'folder-off' : input.projectType === SelectedProjectType.AUTOMATIC_CONNECTED ? 'folder-asterisk' : 'folder';
|
|
311
311
|
return html`
|
|
312
312
|
<div class="footer">
|
|
313
|
-
${
|
|
313
|
+
${
|
|
314
|
+
input.projectName ? html`
|
|
314
315
|
<div class="change-workspace" jslog=${VisualLogging.section('patch-widget.workspace')}>
|
|
315
316
|
<devtools-icon .name=${iconName}></devtools-icon>
|
|
316
317
|
<span class="folder-name" title=${input.projectPath}>${input.projectName}</span>
|
|
317
|
-
${
|
|
318
|
+
${
|
|
319
|
+
input.onChangeWorkspaceClick ? html`
|
|
318
320
|
<devtools-button
|
|
319
321
|
@click=${input.onChangeWorkspaceClick}
|
|
320
322
|
.jslogContext=${'change-workspace'}
|
|
@@ -323,18 +325,24 @@ const DEFAULT_VIEW: View =
|
|
|
323
325
|
.disabled=${input.patchSuggestionState === PatchSuggestionState.LOADING}
|
|
324
326
|
${Directives.ref(output.changeRef)}
|
|
325
327
|
>${lockedString(UIStringsNotTranslate.change)}</devtools-button>
|
|
326
|
-
` :
|
|
328
|
+
` :
|
|
329
|
+
nothing}
|
|
327
330
|
</div>
|
|
328
|
-
` :
|
|
331
|
+
` :
|
|
332
|
+
nothing}
|
|
329
333
|
<div class="apply-to-workspace-container" aria-live="polite">
|
|
330
|
-
${
|
|
331
|
-
|
|
334
|
+
${
|
|
335
|
+
input.patchSuggestionState === PatchSuggestionState.LOADING ?
|
|
336
|
+
html`
|
|
337
|
+
<div class="loading-text-container" jslog=${
|
|
338
|
+
VisualLogging.section('patch-widget.apply-to-workspace-loading')}>
|
|
332
339
|
<devtools-spinner></devtools-spinner>
|
|
333
340
|
<span>
|
|
334
341
|
${lockedString(UIStringsNotTranslate.applyingToWorkspace)}
|
|
335
342
|
</span>
|
|
336
343
|
</div>
|
|
337
|
-
` :
|
|
344
|
+
` :
|
|
345
|
+
html`
|
|
338
346
|
<devtools-button
|
|
339
347
|
@click=${input.onApplyToWorkspace}
|
|
340
348
|
.jslogContext=${'patch-widget.apply-to-workspace'}
|
|
@@ -342,12 +350,14 @@ const DEFAULT_VIEW: View =
|
|
|
342
350
|
${lockedString(UIStringsNotTranslate.applyToWorkspace)}
|
|
343
351
|
</devtools-button>
|
|
344
352
|
`}
|
|
345
|
-
${
|
|
353
|
+
${
|
|
354
|
+
input.patchSuggestionState === PatchSuggestionState.LOADING ? html`<devtools-button
|
|
346
355
|
@click=${input.onCancel}
|
|
347
356
|
.jslogContext=${'cancel'}
|
|
348
357
|
.variant=${Buttons.Button.Variant.OUTLINED}>
|
|
349
358
|
${lockedString(UIStringsNotTranslate.cancel)}
|
|
350
|
-
</devtools-button>` :
|
|
359
|
+
</devtools-button>` :
|
|
360
|
+
nothing}
|
|
351
361
|
<devtools-button
|
|
352
362
|
aria-details="info-tooltip"
|
|
353
363
|
.jslogContext=${'patch-widget.info-tooltip-trigger'}
|
|
@@ -356,7 +366,7 @@ const DEFAULT_VIEW: View =
|
|
|
356
366
|
></devtools-button>
|
|
357
367
|
<devtools-tooltip
|
|
358
368
|
id="info-tooltip"
|
|
359
|
-
variant
|
|
369
|
+
variant="rich"
|
|
360
370
|
>
|
|
361
371
|
<div class="info-tooltip-container">
|
|
362
372
|
${input.applyToWorkspaceTooltipText}
|
|
@@ -364,8 +374,8 @@ const DEFAULT_VIEW: View =
|
|
|
364
374
|
class="link tooltip-link"
|
|
365
375
|
role="link"
|
|
366
376
|
jslog=${VisualLogging.link('open-ai-settings').track({
|
|
367
|
-
|
|
368
|
-
|
|
377
|
+
click: true,
|
|
378
|
+
})}
|
|
369
379
|
@click=${input.onLearnMoreTooltipClick}
|
|
370
380
|
>${lockedString(UIStringsNotTranslate.learnMore)}</button>
|
|
371
381
|
</div>
|
|
@@ -1510,7 +1510,7 @@ function renderDisclamerTooltip(id: string, disclaimerText: string): Lit.Templat
|
|
|
1510
1510
|
return html`
|
|
1511
1511
|
<devtools-tooltip
|
|
1512
1512
|
id=${id}
|
|
1513
|
-
variant
|
|
1513
|
+
variant="rich"
|
|
1514
1514
|
>
|
|
1515
1515
|
<div class="info-tooltip-container">
|
|
1516
1516
|
${disclaimerText}
|
|
@@ -219,6 +219,8 @@ const DEFAULT_TOOLBAR_VIEW: ToolbarView = (input: ToolbarViewInput, output: unde
|
|
|
219
219
|
};
|
|
220
220
|
// clang-format on
|
|
221
221
|
|
|
222
|
+
const DEFAULT_DURATION = 100;
|
|
223
|
+
|
|
222
224
|
let animationTimelineInstance: AnimationTimeline;
|
|
223
225
|
export class AnimationTimeline extends UI.Widget.VBox implements
|
|
224
226
|
SDK.TargetManager.SDKModelObserver<SDK.AnimationModel.AnimationModel> {
|
|
@@ -233,7 +235,6 @@ export class AnimationTimeline extends UI.Widget.VBox implements
|
|
|
233
235
|
#clearButton!: UI.Toolbar.ToolbarButton;
|
|
234
236
|
#selectedGroup!: SDK.AnimationModel.AnimationGroup|null;
|
|
235
237
|
#renderQueue!: AnimationUI[];
|
|
236
|
-
#defaultDuration: number;
|
|
237
238
|
#duration: number;
|
|
238
239
|
#timelineControlsWidth: number;
|
|
239
240
|
readonly #nodesMap: Map<number, NodeUI>;
|
|
@@ -297,8 +298,7 @@ export class AnimationTimeline extends UI.Widget.VBox implements
|
|
|
297
298
|
i18nString(UIStrings.noEffectSelected), i18nString(UIStrings.selectAnEffectAboveToInspectAnd));
|
|
298
299
|
noEffectSelectedPlaceholder.show(timelineHint);
|
|
299
300
|
|
|
300
|
-
|
|
301
|
-
this.#duration = this.#defaultDuration;
|
|
301
|
+
this.#duration = DEFAULT_DURATION;
|
|
302
302
|
this.#nodesMap = new Map();
|
|
303
303
|
this.#uiAnimations = [];
|
|
304
304
|
this.#groupBuffer = [];
|
|
@@ -614,7 +614,7 @@ export class AnimationTimeline extends UI.Widget.VBox implements
|
|
|
614
614
|
this.#nodesMap.clear();
|
|
615
615
|
this.#animationsMap.clear();
|
|
616
616
|
this.#animationsContainer.removeChildren();
|
|
617
|
-
this.#duration =
|
|
617
|
+
this.#duration = DEFAULT_DURATION;
|
|
618
618
|
this.#timelineScrubber.classList.add('hidden');
|
|
619
619
|
this.#gridHeader.classList.remove('scrubber-enabled');
|
|
620
620
|
this.#selectedGroup = null;
|
|
@@ -32,10 +32,10 @@ const str_ = i18n.i18n.registerUIStrings('panels/animation/AnimationUI.ts', UISt
|
|
|
32
32
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
33
33
|
|
|
34
34
|
interface CachedElement {
|
|
35
|
-
group:
|
|
36
|
-
animationLine:
|
|
37
|
-
keyframePoints: Record<number,
|
|
38
|
-
keyframeRender: Record<number,
|
|
35
|
+
group: SVGElement|null;
|
|
36
|
+
animationLine: SVGElement|null;
|
|
37
|
+
keyframePoints: Record<number, SVGElement>;
|
|
38
|
+
keyframeRender: Record<number, SVGElement>;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export class AnimationUI {
|
|
@@ -43,15 +43,15 @@ export class AnimationUI {
|
|
|
43
43
|
#timeline: AnimationTimeline;
|
|
44
44
|
#keyframes?: SDK.AnimationModel.KeyframeStyle[];
|
|
45
45
|
#nameElement: HTMLElement;
|
|
46
|
-
readonly #svg:
|
|
47
|
-
#activeIntervalGroup:
|
|
48
|
-
#cachedElements: CachedElement[];
|
|
49
|
-
#movementInMs
|
|
50
|
-
#keyboardMovementRateMs
|
|
46
|
+
readonly #svg: SVGElement;
|
|
47
|
+
#activeIntervalGroup: SVGGElement;
|
|
48
|
+
#cachedElements: CachedElement[] = [];
|
|
49
|
+
#movementInMs = 0;
|
|
50
|
+
#keyboardMovementRateMs = 50;
|
|
51
51
|
#color: string;
|
|
52
52
|
#node?: SDK.DOMModel.DOMNode|null;
|
|
53
|
-
#delayLine?:
|
|
54
|
-
#endDelayLine?:
|
|
53
|
+
#delayLine?: SVGLineElement;
|
|
54
|
+
#endDelayLine?: SVGLineElement;
|
|
55
55
|
#tailGroup?: Element;
|
|
56
56
|
#mouseEventType?: Events;
|
|
57
57
|
#keyframeMoved?: number|null;
|
|
@@ -73,7 +73,7 @@ export class AnimationUI {
|
|
|
73
73
|
|
|
74
74
|
this.#svg = UI.UIUtils.createSVGChild(parentElement, 'svg', 'animation-ui');
|
|
75
75
|
this.#svg.setAttribute('height', Options.AnimationSVGHeight.toString());
|
|
76
|
-
|
|
76
|
+
this.#svg.style.marginLeft = '-' + Options.AnimationMargin + 'px';
|
|
77
77
|
this.#svg.addEventListener('contextmenu', this.onContextMenu.bind(this));
|
|
78
78
|
this.#activeIntervalGroup = UI.UIUtils.createSVGChild(this.#svg, 'g');
|
|
79
79
|
this.#activeIntervalGroup.setAttribute('jslog', `${VisualLogging.animationClip().track({drag: true})}`);
|
|
@@ -86,10 +86,6 @@ export class AnimationUI {
|
|
|
86
86
|
this.#activeIntervalGroup, this.keydownMove.bind(this, Events.ANIMATION_DRAG, null));
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
this.#cachedElements = [];
|
|
90
|
-
|
|
91
|
-
this.#movementInMs = 0;
|
|
92
|
-
this.#keyboardMovementRateMs = 50;
|
|
93
89
|
this.#color = AnimationUI.colorForAnimation(this.#animation);
|
|
94
90
|
}
|
|
95
91
|
|
|
@@ -125,19 +121,19 @@ export class AnimationUI {
|
|
|
125
121
|
this.#node = node;
|
|
126
122
|
}
|
|
127
123
|
|
|
128
|
-
private createLine(parentElement:
|
|
124
|
+
private createLine(parentElement: SVGElement, className: string): SVGLineElement {
|
|
129
125
|
const line = UI.UIUtils.createSVGChild(parentElement, 'line', className);
|
|
130
126
|
line.setAttribute('x1', Options.AnimationMargin.toString());
|
|
131
127
|
line.setAttribute('y1', Options.AnimationHeight.toString());
|
|
132
128
|
line.setAttribute('y2', Options.AnimationHeight.toString());
|
|
133
|
-
|
|
129
|
+
line.style.stroke = this.#color;
|
|
134
130
|
return line;
|
|
135
131
|
}
|
|
136
132
|
|
|
137
|
-
private drawAnimationLine(iteration: number, parentElement:
|
|
133
|
+
private drawAnimationLine(iteration: number, parentElement: SVGElement): void {
|
|
138
134
|
const cache = this.#cachedElements[iteration];
|
|
139
135
|
if (!cache.animationLine) {
|
|
140
|
-
cache.animationLine =
|
|
136
|
+
cache.animationLine = this.createLine(parentElement, 'animation-line');
|
|
141
137
|
}
|
|
142
138
|
if (!cache.animationLine) {
|
|
143
139
|
return;
|
|
@@ -147,7 +143,7 @@ export class AnimationUI {
|
|
|
147
143
|
'x2', (this.duration() * this.#timeline.pixelTimeRatio() + Options.AnimationMargin).toFixed(2));
|
|
148
144
|
}
|
|
149
145
|
|
|
150
|
-
private drawDelayLine(parentElement:
|
|
146
|
+
private drawDelayLine(parentElement: SVGElement): void {
|
|
151
147
|
if (!this.#delayLine || !this.#endDelayLine) {
|
|
152
148
|
this.#delayLine = this.createLine(parentElement, 'animation-delay-line');
|
|
153
149
|
this.#endDelayLine = this.createLine(parentElement, 'animation-delay-line');
|
|
@@ -164,7 +160,7 @@ export class AnimationUI {
|
|
|
164
160
|
this.#timeline.width(),
|
|
165
161
|
(this.delayOrStartTime() + this.duration() * this.#animation.source().iterations()) *
|
|
166
162
|
this.#timeline.pixelTimeRatio());
|
|
167
|
-
|
|
163
|
+
this.#endDelayLine.style.transform = 'translateX(' + leftMargin.toFixed(2) + 'px)';
|
|
168
164
|
this.#endDelayLine.setAttribute('x1', margin.toString());
|
|
169
165
|
this.#endDelayLine.setAttribute(
|
|
170
166
|
'x2',
|
|
@@ -179,10 +175,8 @@ export class AnimationUI {
|
|
|
179
175
|
return;
|
|
180
176
|
}
|
|
181
177
|
|
|
182
|
-
const circle =
|
|
183
|
-
|
|
184
|
-
parentElement, 'circle', keyframeIndex <= 0 ? 'animation-endpoint' : 'animation-keyframe-point') as
|
|
185
|
-
HTMLElement);
|
|
178
|
+
const circle = UI.UIUtils.createSVGChild(
|
|
179
|
+
parentElement, 'circle', keyframeIndex <= 0 ? 'animation-endpoint' : 'animation-keyframe-point');
|
|
186
180
|
circle.setAttribute('cx', x.toFixed(2));
|
|
187
181
|
circle.setAttribute('cy', Options.AnimationHeight.toString());
|
|
188
182
|
circle.style.stroke = this.#color;
|
|
@@ -221,10 +215,10 @@ export class AnimationUI {
|
|
|
221
215
|
}
|
|
222
216
|
|
|
223
217
|
private renderKeyframe(
|
|
224
|
-
iteration: number, keyframeIndex: number, parentElement:
|
|
218
|
+
iteration: number, keyframeIndex: number, parentElement: SVGElement, leftDistance: number, width: number,
|
|
225
219
|
easing: string): void {
|
|
226
|
-
function createStepLine(parentElement:
|
|
227
|
-
const line =
|
|
220
|
+
function createStepLine(parentElement: SVGElement, x: number, strokeColor: string): void {
|
|
221
|
+
const line = UI.UIUtils.createSVGChild(parentElement, 'line');
|
|
228
222
|
line.setAttribute('x1', x.toString());
|
|
229
223
|
line.setAttribute('x2', x.toString());
|
|
230
224
|
line.setAttribute('y1', Options.AnimationMargin.toString());
|
|
@@ -237,7 +231,7 @@ export class AnimationUI {
|
|
|
237
231
|
if (!cache[keyframeIndex]) {
|
|
238
232
|
const svg = bezier ? UI.UIUtils.createSVGChild(parentElement, 'path', 'animation-keyframe') :
|
|
239
233
|
UI.UIUtils.createSVGChild(parentElement, 'g', 'animation-keyframe-step');
|
|
240
|
-
cache[keyframeIndex] =
|
|
234
|
+
cache[keyframeIndex] = svg;
|
|
241
235
|
}
|
|
242
236
|
const group = cache[keyframeIndex];
|
|
243
237
|
group.tabIndex = 0;
|
|
@@ -269,14 +263,14 @@ export class AnimationUI {
|
|
|
269
263
|
const maxWidth = this.#timeline.width() - Options.AnimationMargin;
|
|
270
264
|
|
|
271
265
|
this.#svg.setAttribute('width', (maxWidth + 2 * Options.AnimationMargin).toFixed(2));
|
|
272
|
-
|
|
266
|
+
this.#activeIntervalGroup.style.transform =
|
|
273
267
|
'translateX(' + (this.delayOrStartTime() * this.#timeline.pixelTimeRatio()).toFixed(2) + 'px)';
|
|
274
268
|
|
|
275
269
|
this.#nameElement.style.transform = 'translateX(' +
|
|
276
270
|
(Math.max(this.delayOrStartTime(), 0) * this.#timeline.pixelTimeRatio() + Options.AnimationMargin).toFixed(2) +
|
|
277
271
|
'px)';
|
|
278
272
|
this.#nameElement.style.width = (this.duration() * this.#timeline.pixelTimeRatio()).toFixed(2) + 'px';
|
|
279
|
-
this.drawDelayLine(
|
|
273
|
+
this.drawDelayLine(this.#svg);
|
|
280
274
|
|
|
281
275
|
if (this.#animation.type() === 'CSSTransition') {
|
|
282
276
|
this.renderTransition();
|
|
@@ -307,7 +301,7 @@ export class AnimationUI {
|
|
|
307
301
|
}
|
|
308
302
|
|
|
309
303
|
private renderTransition(): void {
|
|
310
|
-
const activeIntervalGroup =
|
|
304
|
+
const activeIntervalGroup = this.#activeIntervalGroup;
|
|
311
305
|
if (!this.#cachedElements[0]) {
|
|
312
306
|
this.#cachedElements[0] = {animationLine: null, keyframePoints: {}, keyframeRender: {}, group: null};
|
|
313
307
|
}
|
|
@@ -326,7 +320,7 @@ export class AnimationUI {
|
|
|
326
320
|
animationLine: null,
|
|
327
321
|
keyframePoints: {},
|
|
328
322
|
keyframeRender: {},
|
|
329
|
-
group:
|
|
323
|
+
group: UI.UIUtils.createSVGChild(parentElement, 'g'),
|
|
330
324
|
};
|
|
331
325
|
}
|
|
332
326
|
const group = this.#cachedElements[iteration].group;
|
|
@@ -88,8 +88,8 @@ export const DEFAULT_SUMMARY_TOOLBAR_VIEW: View =
|
|
|
88
88
|
aria-describedby=${input.spinnerTooltipId}></devtools-spinner>
|
|
89
89
|
<devtools-tooltip
|
|
90
90
|
id=${input.spinnerTooltipId}
|
|
91
|
-
variant
|
|
92
|
-
jslogContext
|
|
91
|
+
variant="rich"
|
|
92
|
+
jslogContext="ai-code-completion-spinner-tooltip">
|
|
93
93
|
<div class="disclaimer-tooltip-container"><div class="tooltip-text">
|
|
94
94
|
${lockedString(UIStringsNotTranslate.tooltipTextForSpinner)}
|
|
95
95
|
</div></div></devtools-tooltip>
|
|
@@ -108,8 +108,8 @@ export const DEFAULT_SUMMARY_TOOLBAR_VIEW: View =
|
|
|
108
108
|
>${lockedString(UIStringsNotTranslate.relevantData)}</span>${lockedString(UIStringsNotTranslate.isSentToGoogle)}
|
|
109
109
|
<devtools-tooltip
|
|
110
110
|
id=${input.disclaimerTooltipId}
|
|
111
|
-
variant
|
|
112
|
-
jslogContext
|
|
111
|
+
variant="rich"
|
|
112
|
+
jslogContext="ai-code-completion-disclaimer"
|
|
113
113
|
${Directives.ref(el => {
|
|
114
114
|
if (el instanceof HTMLElement) {
|
|
115
115
|
output.hideTooltip = () => {
|
|
@@ -79,8 +79,8 @@ export const DEFAULT_SUMMARY_TOOLBAR_VIEW: View = (input, _output, target) => {
|
|
|
79
79
|
</span>
|
|
80
80
|
<devtools-tooltip
|
|
81
81
|
id=${input.citationsTooltipId}
|
|
82
|
-
variant
|
|
83
|
-
jslogContext
|
|
82
|
+
variant="rich"
|
|
83
|
+
jslogContext="ai-code-completion-citations"
|
|
84
84
|
><div class="citations-tooltip-container">
|
|
85
85
|
${Directives.repeat(input.citations, citation => html`<x-link
|
|
86
86
|
tabIndex="0"
|
|
@@ -45,6 +45,7 @@ import type * as Elements from '../../models/elements/elements.js';
|
|
|
45
45
|
import type * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
46
46
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
47
47
|
import * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
|
|
48
|
+
import type {DirectiveResult} from '../../third_party/lit/lib/directive.js';
|
|
48
49
|
import * as Adorners from '../../ui/components/adorners/adorners.js';
|
|
49
50
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
50
51
|
import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
|
|
@@ -351,10 +352,13 @@ export function isOpeningTag(context: TagTypeContext): context is OpeningTagCont
|
|
|
351
352
|
}
|
|
352
353
|
|
|
353
354
|
export interface ViewInput {
|
|
355
|
+
showAdAdorner: boolean;
|
|
354
356
|
adorners?: Set<Adorners.Adorner.Adorner>;
|
|
355
357
|
nodeInfo?: DocumentFragment;
|
|
356
358
|
|
|
357
359
|
onGutterClick: (e: Event) => void;
|
|
360
|
+
onAdornerAdded: (adorner: Adorners.Adorner.Adorner) => void;
|
|
361
|
+
onAdornerRemoved: (adorner: Adorners.Adorner.Adorner) => void;
|
|
358
362
|
}
|
|
359
363
|
|
|
360
364
|
export interface ViewOutput {
|
|
@@ -363,7 +367,23 @@ export interface ViewOutput {
|
|
|
363
367
|
contentElement?: HTMLElement;
|
|
364
368
|
}
|
|
365
369
|
|
|
370
|
+
function adornerRef(input: ViewInput): DirectiveResult<typeof Lit.Directives.RefDirective> {
|
|
371
|
+
let adorner: Adorners.Adorner.Adorner|undefined;
|
|
372
|
+
return ref((el?: Element) => {
|
|
373
|
+
if (adorner) {
|
|
374
|
+
input.onAdornerRemoved(adorner);
|
|
375
|
+
}
|
|
376
|
+
adorner = el as Adorners.Adorner.Adorner;
|
|
377
|
+
if (adorner) {
|
|
378
|
+
input.onAdornerAdded(adorner);
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
|
|
366
383
|
export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLElement): void => {
|
|
384
|
+
const adAdornerConfig =
|
|
385
|
+
ElementsComponents.AdornerManager.getRegisteredAdorner(ElementsComponents.AdornerManager.RegisteredAdorners.AD);
|
|
386
|
+
const hasAdorners = input.adorners || input.showAdAdorner;
|
|
367
387
|
// clang-format off
|
|
368
388
|
render(html`
|
|
369
389
|
<div ${ref(el => { output.contentElement = el as HTMLElement; })}>
|
|
@@ -372,8 +392,14 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
372
392
|
<devtools-icon name="dots-horizontal"></devtools-icon>
|
|
373
393
|
<div class="hidden" ${ref(el => { output.decorationsElement = el as HTMLElement; })}></div>
|
|
374
394
|
</div>
|
|
375
|
-
${
|
|
376
|
-
${
|
|
395
|
+
${hasAdorners? html`<div class="adorner-container ${!hasAdorners ? 'hidden': ''}">
|
|
396
|
+
${input.showAdAdorner ? html`<devtools-adorner
|
|
397
|
+
.data=${{name: adAdornerConfig.name, jslogContext: adAdornerConfig.name}}
|
|
398
|
+
aria-label=${i18nString(UIStrings.thisFrameWasIdentifiedAsAnAd)}
|
|
399
|
+
${adornerRef(input)}>
|
|
400
|
+
<span>${adAdornerConfig.name}</span>
|
|
401
|
+
</devtools-adorner>` : nothing}
|
|
402
|
+
${repeat(Array.from((input.adorners ?? new Set()).values()).sort(adornerComparator), adorner => {
|
|
377
403
|
return adorner;
|
|
378
404
|
})}
|
|
379
405
|
</div>`: nothing}
|
|
@@ -442,13 +468,6 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
442
468
|
};
|
|
443
469
|
void this.updateStyleAdorners();
|
|
444
470
|
|
|
445
|
-
if (node.isAdFrameNode()) {
|
|
446
|
-
const config = ElementsComponents.AdornerManager.getRegisteredAdorner(
|
|
447
|
-
ElementsComponents.AdornerManager.RegisteredAdorners.AD);
|
|
448
|
-
const adorner = this.adorn(config);
|
|
449
|
-
UI.Tooltip.Tooltip.install(adorner, i18nString(UIStrings.thisFrameWasIdentifiedAsAnAd));
|
|
450
|
-
}
|
|
451
|
-
|
|
452
471
|
void this.updateScrollAdorner();
|
|
453
472
|
}
|
|
454
473
|
this.expandAllButtonElement = null;
|
|
@@ -533,8 +552,17 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
533
552
|
DEFAULT_VIEW(
|
|
534
553
|
{
|
|
535
554
|
adorners: !this.isClosingTag() ? this.#adorners : undefined,
|
|
555
|
+
showAdAdorner:
|
|
556
|
+
ElementsPanel.instance().isAdornerEnabled(ElementsComponents.AdornerManager.RegisteredAdorners.AD) &&
|
|
557
|
+
this.nodeInternal.isAdFrameNode(),
|
|
536
558
|
nodeInfo: this.#nodeInfo,
|
|
537
559
|
onGutterClick: this.showContextMenu.bind(this),
|
|
560
|
+
onAdornerAdded: adorner => {
|
|
561
|
+
ElementsPanel.instance().registerAdorner(adorner);
|
|
562
|
+
},
|
|
563
|
+
onAdornerRemoved: adorner => {
|
|
564
|
+
ElementsPanel.instance().deregisterAdorner(adorner);
|
|
565
|
+
},
|
|
538
566
|
},
|
|
539
567
|
this, this.listItemElement);
|
|
540
568
|
}
|