chrome-devtools-frontend 1.0.1587905 → 1.0.1589336
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/ui_engineering.md +2 -2
- package/front_end/core/common/AppProvider.ts +1 -2
- package/front_end/core/common/Color.ts +19 -20
- package/front_end/core/common/ParsedURL.ts +3 -3
- package/front_end/core/common/Progress.ts +5 -5
- package/front_end/core/common/Settings.ts +2 -2
- package/front_end/core/dom_extension/DOMExtension.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostStub.ts +1 -11
- package/front_end/core/host/UserMetrics.ts +1 -1
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +2 -2
- package/front_end/core/sdk/CSSMatchedStyles.ts +1 -1
- package/front_end/core/sdk/CSSProperty.ts +38 -0
- package/front_end/core/sdk/CSSRule.ts +4 -9
- package/front_end/core/sdk/ChildTargetManager.ts +1 -1
- package/front_end/core/sdk/CookieModel.ts +0 -1
- package/front_end/core/sdk/DOMModel.ts +42 -6
- package/front_end/core/sdk/EmulationModel.ts +3 -3
- package/front_end/core/sdk/NetworkRequest.ts +1 -1
- package/front_end/core/sdk/PageResourceLoader.ts +11 -6
- package/front_end/core/sdk/PerformanceMetricsModel.ts +2 -2
- package/front_end/core/sdk/PreloadingModel.ts +15 -6
- package/front_end/core/sdk/ResourceTreeModel.ts +2 -6
- package/front_end/core/sdk/SourceMap.ts +2 -3
- package/front_end/core/sdk/SourceMapManager.ts +1 -2
- package/front_end/entrypoint_template.html +1 -1
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +6 -16
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +4 -2
- package/front_end/entrypoints/main/main-meta.ts +0 -3
- package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +0 -2
- package/front_end/generated/InspectorBackendCommands.ts +6 -4
- package/front_end/generated/SupportedCSSProperties.js +46 -0
- 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 +50 -0
- package/front_end/models/ai_assistance/AiConversation.ts +20 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +7 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +28 -26
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +3 -5
- package/front_end/models/computed_style/ComputedStyleModel.ts +2 -1
- package/front_end/models/emulation/DeviceModeModel.ts +0 -3
- package/front_end/models/emulation/EmulatedDevices.ts +0 -2
- package/front_end/models/extensions/ExtensionAPI.ts +2 -2
- package/front_end/models/har/Importer.ts +0 -1
- package/front_end/models/har/Log.ts +2 -11
- package/front_end/models/javascript_metadata/NativeFunctions.js +5 -21
- package/front_end/models/logs/NetworkLog.ts +0 -2
- package/front_end/models/network_time_calculator/NetworkTimeCalculator.ts +4 -1
- package/front_end/models/text_utils/TextUtils.ts +0 -9
- package/front_end/models/trace/LanternComputationData.ts +1 -6
- package/front_end/models/trace/helpers/Trace.ts +1 -4
- package/front_end/models/trace/lantern/types/Lantern.ts +6 -6
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +7 -6
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +15 -26
- package/front_end/panels/application/BackgroundServiceView.ts +0 -2
- package/front_end/panels/application/DeviceBoundSessionsModel.ts +0 -1
- package/front_end/panels/application/IndexedDBViews.ts +19 -23
- package/front_end/panels/application/OriginTrialTreeView.ts +3 -3
- package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
- package/front_end/panels/application/preloading/PreloadingView.ts +18 -0
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.css +12 -0
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +3 -3
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +3 -4
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +76 -19
- package/front_end/panels/common/aiCodeGenerationTeaser.css +11 -0
- package/front_end/panels/console/ConsoleSidebar.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +4 -0
- package/front_end/panels/console/ConsoleViewMessage.ts +3 -3
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +32 -32
- package/front_end/panels/elements/ElementsPanel.ts +12 -4
- package/front_end/panels/elements/ElementsTreeElement.ts +9 -1
- package/front_end/panels/elements/ImagePreviewPopover.ts +0 -2
- package/front_end/panels/elements/MarkerDecorator.ts +0 -2
- package/front_end/panels/elements/PropertiesWidget.ts +62 -61
- package/front_end/panels/elements/StylePropertiesSection.ts +32 -3
- package/front_end/panels/elements/StylePropertyTreeElement.ts +15 -20
- package/front_end/panels/elements/StylesSidebarPane.ts +25 -90
- package/front_end/panels/elements/elementsPanel.css +6 -2
- package/front_end/panels/emulation/emulation-meta.ts +0 -2
- package/front_end/panels/event_listeners/EventListenersUtils.ts +0 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +0 -5
- package/front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts +1 -3
- package/front_end/panels/media/EventDisplayTable.ts +0 -2
- package/front_end/panels/media/PlayerMessagesView.ts +4 -6
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +18 -6
- package/front_end/panels/network/EventSourceMessagesView.ts +0 -2
- package/front_end/panels/network/NetworkLogViewColumns.ts +0 -2
- package/front_end/panels/network/NetworkManageCustomHeadersView.ts +3 -1
- package/front_end/panels/network/NetworkWaterfallColumn.ts +1 -2
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +113 -128
- package/front_end/panels/network/RequestInitiatorView.ts +74 -69
- package/front_end/panels/network/RequestPayloadView.ts +6 -3
- package/front_end/panels/network/ResourceChunkView.ts +0 -2
- package/front_end/panels/network/components/ResponseHeaderSection.ts +3 -1
- package/front_end/panels/network/network-meta.ts +0 -2
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +1 -9
- package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +0 -2
- package/front_end/panels/profiler/LiveHeapProfileView.ts +0 -12
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +14 -1
- package/front_end/panels/profiler/ProfileView.ts +0 -35
- package/front_end/panels/profiler/profiler-meta.ts +0 -1
- package/front_end/panels/recorder/components/StepView.ts +0 -1
- package/front_end/panels/screencast/ScreencastView.ts +2 -2
- package/front_end/panels/search/SearchResultsPane.ts +3 -2
- package/front_end/panels/security/SecurityPanel.ts +0 -1
- package/front_end/panels/sensors/LocationsSettingsTab.ts +27 -9
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +1 -1
- package/front_end/panels/settings/SettingsScreen.ts +1 -2
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +2 -2
- package/front_end/panels/settings/emulation/utils/UserAgentMetadata.ts +1 -1
- package/front_end/panels/settings/settings-meta.ts +0 -3
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +6 -0
- package/front_end/panels/sources/CSSPlugin.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -5
- package/front_end/panels/sources/sources-meta.ts +0 -9
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +1 -1
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +5 -2
- package/front_end/panels/timeline/TimelinePanel.ts +0 -7
- package/front_end/panels/timeline/TimelineTreeView.ts +8 -10
- package/front_end/panels/timeline/TimelineUIUtils.ts +11 -3
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +0 -1
- package/front_end/panels/timeline/utils/Treemap.ts +0 -4
- package/front_end/panels/whats_new/whats_new-meta.ts +0 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/highlighting/HighlightManager.ts +1 -2
- package/front_end/ui/components/highlighting/MarkupHighlight.ts +1 -12
- package/front_end/ui/components/icon_button/IconButton.ts +2 -2
- package/front_end/ui/components/issue_counter/IssueCounter.ts +6 -6
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +4 -0
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +11 -6
- package/front_end/ui/legacy/ContextMenu.ts +1 -17
- package/front_end/ui/legacy/EmptyWidget.ts +4 -4
- package/front_end/ui/legacy/Fragment.ts +2 -4
- package/front_end/ui/legacy/SoftContextMenu.ts +1 -15
- package/front_end/ui/legacy/TabbedPane.ts +2 -2
- package/front_end/ui/legacy/Treeoutline.ts +16 -9
- package/front_end/ui/legacy/UIUtils.ts +1 -4
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +6 -3
- package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +32 -28
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +31 -6
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +0 -2
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +0 -1
- package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +0 -2
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +3 -2
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +3 -3
- package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ import '../../ui/components/report_view/report_view.js';
|
|
|
7
7
|
import '../../ui/legacy/legacy.js';
|
|
8
8
|
|
|
9
9
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
10
|
+
import type * as Platform from '../../core/platform/platform.js';
|
|
10
11
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
11
12
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
12
13
|
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
|
@@ -322,42 +323,37 @@ export class IDBDataView extends UI.View.SimpleView {
|
|
|
322
323
|
const columns = ([] as DataGrid.DataGrid.ColumnDescriptor[]);
|
|
323
324
|
|
|
324
325
|
// Create column defaults so that we avoid repetition below.
|
|
325
|
-
const columnDefaults = {
|
|
326
|
-
title: undefined,
|
|
327
|
-
titleDOMFragment: undefined,
|
|
326
|
+
const columnDefaults: Partial<DataGrid.DataGrid.ColumnDescriptor> = {
|
|
328
327
|
sortable: false,
|
|
329
|
-
sort: undefined,
|
|
330
|
-
align: undefined,
|
|
331
|
-
width: undefined,
|
|
332
|
-
fixedWidth: undefined,
|
|
333
|
-
editable: undefined,
|
|
334
|
-
nonSelectable: undefined,
|
|
335
|
-
longText: undefined,
|
|
336
|
-
disclosure: undefined,
|
|
337
|
-
weight: undefined,
|
|
338
|
-
allowInSortByEvenWhenHidden: undefined,
|
|
339
|
-
dataType: undefined,
|
|
340
|
-
defaultWeight: undefined,
|
|
341
328
|
};
|
|
342
|
-
columns.push(
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
329
|
+
columns.push({
|
|
330
|
+
...columnDefaults,
|
|
331
|
+
id: 'number',
|
|
332
|
+
title: '#' as Platform.UIString.LocalizedString,
|
|
333
|
+
sortable: false,
|
|
334
|
+
width: '50px',
|
|
335
|
+
});
|
|
336
|
+
columns.push({
|
|
346
337
|
...columnDefaults,
|
|
347
338
|
id: 'key',
|
|
348
339
|
titleDOMFragment: this.keyColumnHeaderFragment(i18nString(UIStrings.keyString), keyPath),
|
|
349
340
|
sortable: false,
|
|
350
|
-
}
|
|
341
|
+
});
|
|
351
342
|
if (this.isIndex) {
|
|
352
|
-
columns.push(
|
|
343
|
+
columns.push({
|
|
353
344
|
...columnDefaults,
|
|
354
345
|
id: 'primary-key',
|
|
355
346
|
titleDOMFragment: this.keyColumnHeaderFragment(i18nString(UIStrings.primaryKey), this.objectStore.keyPath),
|
|
356
347
|
sortable: false,
|
|
357
|
-
}
|
|
348
|
+
});
|
|
358
349
|
}
|
|
359
350
|
const title = i18nString(UIStrings.valueString);
|
|
360
|
-
columns.push(
|
|
351
|
+
columns.push({
|
|
352
|
+
...columnDefaults,
|
|
353
|
+
id: 'value',
|
|
354
|
+
title,
|
|
355
|
+
sortable: false,
|
|
356
|
+
});
|
|
361
357
|
|
|
362
358
|
const dataGrid = new DataGrid.DataGrid.DataGridImpl({
|
|
363
359
|
displayName: i18nString(UIStrings.indexedDb),
|
|
@@ -98,7 +98,7 @@ function renderOriginTrialTree(originTrial: Protocol.Page.OriginTrial): LitTempl
|
|
|
98
98
|
${i18nString(UIStrings.tokens, {PH1: originTrial.tokensWithStatus.length})}
|
|
99
99
|
</devtools-adorner>`
|
|
100
100
|
: nothing}
|
|
101
|
-
<ul role="group"
|
|
101
|
+
<ul role="group">
|
|
102
102
|
${originTrial.tokensWithStatus.length > 1 ?
|
|
103
103
|
originTrial.tokensWithStatus.map(renderTokenNode) :
|
|
104
104
|
renderTokenDetailsNodes(originTrial.tokensWithStatus[0])}
|
|
@@ -117,7 +117,7 @@ function renderTokenNode(token: Protocol.Page.OriginTrialTokenWithStatus): LitTe
|
|
|
117
117
|
<devtools-adorner class="token-status-badge badge-${success ? 'success' : 'error'}">
|
|
118
118
|
${token.status}
|
|
119
119
|
</devtools-adorner>
|
|
120
|
-
<ul role="group"
|
|
120
|
+
<ul role="group">
|
|
121
121
|
${renderTokenDetailsNodes(token)}
|
|
122
122
|
</ul>
|
|
123
123
|
</li>`;
|
|
@@ -151,7 +151,7 @@ function renderRawTokenTextNode(tokenText: string): LitTemplate {
|
|
|
151
151
|
return html`
|
|
152
152
|
<li role="treeitem">
|
|
153
153
|
${i18nString(UIStrings.rawTokenText)}
|
|
154
|
-
<ul role="group"
|
|
154
|
+
<ul role="group">
|
|
155
155
|
<li role="treeitem">
|
|
156
156
|
<div style="overflow-wrap: break-word;">
|
|
157
157
|
${tokenText}
|
|
@@ -374,6 +374,7 @@ export class PreloadingAttemptView extends UI.Widget.VBox {
|
|
|
374
374
|
private readonly preloadingDetails =
|
|
375
375
|
new PreloadingComponents.PreloadingDetailsReportView.PreloadingDetailsReportView();
|
|
376
376
|
private readonly ruleSetSelector: PreloadingRuleSetSelector;
|
|
377
|
+
private clearButton: UI.Toolbar.ToolbarButton;
|
|
377
378
|
|
|
378
379
|
constructor(model: SDK.PreloadingModel.PreloadingModel) {
|
|
379
380
|
super({
|
|
@@ -415,6 +416,23 @@ export class PreloadingAttemptView extends UI.Widget.VBox {
|
|
|
415
416
|
|
|
416
417
|
const toolbar = vbox.contentElement.createChild('devtools-toolbar', 'preloading-toolbar');
|
|
417
418
|
toolbar.setAttribute('jslog', `${VisualLogging.toolbar()}`);
|
|
419
|
+
|
|
420
|
+
// Clear button first (leftmost)
|
|
421
|
+
this.clearButton =
|
|
422
|
+
new UI.Toolbar.ToolbarButton('Clear speculative loads', 'clear', undefined, 'clear-speculative-loads');
|
|
423
|
+
this.clearButton.addEventListener(UI.Toolbar.ToolbarButton.Events.CLICK, () => {
|
|
424
|
+
const model =
|
|
425
|
+
SDK.TargetManager.TargetManager.instance().scopeTarget()?.model(SDK.PreloadingModel.PreloadingModel);
|
|
426
|
+
if (!model) {
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
model.reset();
|
|
431
|
+
this.ruleSetSelector.select(null);
|
|
432
|
+
});
|
|
433
|
+
toolbar.appendToolbarItem(this.clearButton);
|
|
434
|
+
|
|
435
|
+
// Rule set dropdown
|
|
418
436
|
this.ruleSetSelector = new PreloadingRuleSetSelector(() => this.render());
|
|
419
437
|
toolbar.appendToolbarItem(this.ruleSetSelector.item());
|
|
420
438
|
|
|
@@ -4,11 +4,19 @@
|
|
|
4
4
|
* found in the LICENSE file.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
:host {
|
|
8
|
+
height: 100%;
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
.placeholder {
|
|
8
12
|
display: flex;
|
|
9
13
|
height: 100%;
|
|
10
14
|
}
|
|
11
15
|
|
|
16
|
+
.ruleset-header-container {
|
|
17
|
+
flex-shrink: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
12
20
|
.ruleset-header {
|
|
13
21
|
padding: 4px 8px;
|
|
14
22
|
white-space: nowrap;
|
|
@@ -20,3 +28,7 @@
|
|
|
20
28
|
.ruleset-header devtools-icon {
|
|
21
29
|
vertical-align: sub;
|
|
22
30
|
}
|
|
31
|
+
|
|
32
|
+
.text-editor-container {
|
|
33
|
+
overflow: auto;
|
|
34
|
+
}
|
|
@@ -49,7 +49,7 @@ export const DEFAULT_VIEW = (input: ViewInput|null, _output: object, target: HTM
|
|
|
49
49
|
<style>${UI.inspectorCommonStyles}</style>
|
|
50
50
|
${input
|
|
51
51
|
? html`
|
|
52
|
-
<div class="
|
|
52
|
+
<div class="ruleset-header-container">
|
|
53
53
|
<div class="ruleset-header" id="ruleset-url">${input.url}</div>
|
|
54
54
|
${input.errorMessage ? html`
|
|
55
55
|
<div class="ruleset-header">
|
|
@@ -59,8 +59,8 @@ export const DEFAULT_VIEW = (input: ViewInput|null, _output: object, target: HTM
|
|
|
59
59
|
</div>
|
|
60
60
|
` : nothing}
|
|
61
61
|
</div>
|
|
62
|
-
<div class="text-
|
|
63
|
-
<devtools-text-editor .
|
|
62
|
+
<div class="text-editor-container">
|
|
63
|
+
<devtools-text-editor .state=${input.editorState}></devtools-text-editor>
|
|
64
64
|
</div>`
|
|
65
65
|
: html`
|
|
66
66
|
<div class="placeholder">
|
|
@@ -237,7 +237,8 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
237
237
|
jslog-context=${category}
|
|
238
238
|
aria-checked=${breakpoints.some(breakpoint => breakpoint.enabled())
|
|
239
239
|
? breakpoints.some(breakpoint => !breakpoint.enabled()) ? 'mixed' : true
|
|
240
|
-
: false}
|
|
240
|
+
: false}
|
|
241
|
+
?open=${shouldExpandCategory(breakpoints) || input.userExpandedCategories.has(category)}>
|
|
241
242
|
<style>${categorizedBreakpointsSidebarPaneStyles}</style>
|
|
242
243
|
<devtools-checkbox
|
|
243
244
|
class="small"
|
|
@@ -248,9 +249,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
248
249
|
?checked=${!breakpoints.some(breakpoint => !breakpoint.enabled())}
|
|
249
250
|
@change=${(e: Event) => onCheckboxClicked(e, category)}
|
|
250
251
|
>${getLocalizedCategory(category)}</devtools-checkbox>
|
|
251
|
-
<ul
|
|
252
|
-
role="group"
|
|
253
|
-
?hidden=${!shouldExpandCategory(breakpoints) && !input.userExpandedCategories.has(category)}>
|
|
252
|
+
<ul role="group">
|
|
254
253
|
${breakpoints.map(breakpoint => html`
|
|
255
254
|
<li @select=${() => input.onItemSelected(breakpoint)}
|
|
256
255
|
role="treeitem"
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
import '../../ui/components/tooltips/tooltips.js';
|
|
5
5
|
|
|
6
|
+
import * as Common from '../../core/common/common.js';
|
|
6
7
|
import * as Host from '../../core/host/host.js';
|
|
7
8
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
9
|
import * as Root from '../../core/root/root.js';
|
|
@@ -15,6 +16,10 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
|
15
16
|
import styles from './aiCodeGenerationTeaser.css.js';
|
|
16
17
|
|
|
17
18
|
const UIStringsNotTranslate = {
|
|
19
|
+
/**
|
|
20
|
+
* @description Text for teaser to generate code.
|
|
21
|
+
*/
|
|
22
|
+
toGenerateCode: 'to generate code',
|
|
18
23
|
/**
|
|
19
24
|
* @description Text for teaser to generate code.
|
|
20
25
|
*/
|
|
@@ -26,11 +31,7 @@ const UIStringsNotTranslate = {
|
|
|
26
31
|
/**
|
|
27
32
|
* @description Text for teaser to learn how data is being used.
|
|
28
33
|
*/
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @description Text for teaser to learn how data is being used in Mac.
|
|
32
|
-
*/
|
|
33
|
-
cmdOneTimeDisclaimerToLearnHowYourDataIsBeingUsed: 'cmd+. to learn how your data is being used.',
|
|
34
|
+
toLearnHowYourDataIsBeingUsed: 'to learn how your data is being used.',
|
|
34
35
|
/**
|
|
35
36
|
* @description Aria label for teaser to generate code.
|
|
36
37
|
*/
|
|
@@ -42,9 +43,13 @@ const UIStringsNotTranslate = {
|
|
|
42
43
|
/**
|
|
43
44
|
* @description Text for teaser when generating suggestion.
|
|
44
45
|
*/
|
|
45
|
-
generating: 'Generating... (
|
|
46
|
+
generating: 'Generating... (',
|
|
47
|
+
/**
|
|
48
|
+
* @description Text for teaser when generating suggestion.
|
|
49
|
+
*/
|
|
50
|
+
toCancel: ' to cancel)',
|
|
46
51
|
/**
|
|
47
|
-
* @description
|
|
52
|
+
* @description Text for teaser when generating suggestion.
|
|
48
53
|
*/
|
|
49
54
|
generatingAriaLabel: 'Generating. Press escape to cancel.',
|
|
50
55
|
/**
|
|
@@ -67,6 +72,26 @@ const UIStringsNotTranslate = {
|
|
|
67
72
|
* @description Text for teaser when suggestion has been generated.
|
|
68
73
|
*/
|
|
69
74
|
toAccept: 'to accept',
|
|
75
|
+
/**
|
|
76
|
+
* @description Text for teaser keys.
|
|
77
|
+
*/
|
|
78
|
+
ctrl: 'ctrl',
|
|
79
|
+
/**
|
|
80
|
+
* @description Text for teaser keys.
|
|
81
|
+
*/
|
|
82
|
+
cmd: 'cmd',
|
|
83
|
+
/**
|
|
84
|
+
* @description Text for teaser keys.
|
|
85
|
+
*/
|
|
86
|
+
i: 'i',
|
|
87
|
+
/**
|
|
88
|
+
* @description Text for teaser keys.
|
|
89
|
+
*/
|
|
90
|
+
period: '.',
|
|
91
|
+
/**
|
|
92
|
+
* @description Text for teaser keys.
|
|
93
|
+
*/
|
|
94
|
+
esc: 'esc',
|
|
70
95
|
/**
|
|
71
96
|
* @description Text for tooltip shown on hovering over "Relevant Data" in the disclaimer text for AI code generation in Console panel.
|
|
72
97
|
*/
|
|
@@ -126,6 +151,7 @@ export interface ViewInput {
|
|
|
126
151
|
noLogging: boolean;
|
|
127
152
|
onManageInSettingsTooltipClick: (event: Event) => void;
|
|
128
153
|
showDataUsageTeaser: boolean;
|
|
154
|
+
showDiscoveryTeaser: boolean;
|
|
129
155
|
// TODO(b/472268298): Remove ContextFlavor explicitly and pass required values
|
|
130
156
|
panel?: AiCodeCompletion.AiCodeCompletion.ContextFlavor;
|
|
131
157
|
}
|
|
@@ -151,23 +177,35 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
151
177
|
render(nothing, target);
|
|
152
178
|
return;
|
|
153
179
|
}
|
|
154
|
-
|
|
155
|
-
lockedString(UIStringsNotTranslate.ctrlItoGenerateCode);
|
|
180
|
+
|
|
156
181
|
const toLearnHowYourDataIsBeingUsedScreenReaderOnly = Host.Platform.isMac() ?
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
182
|
+
UIStringsNotTranslate.pressCmdPeriodToLearnHowYourDataIsBeingUsed :
|
|
183
|
+
UIStringsNotTranslate.pressCtrlPeriodToLearnHowYourDataIsBeingUsed;
|
|
184
|
+
const screenReaderText = (Host.Platform.isMac() ? UIStringsNotTranslate.cmdItoGenerateCode :
|
|
185
|
+
UIStringsNotTranslate.ctrlItoGenerateCode) +
|
|
186
|
+
' ' + toLearnHowYourDataIsBeingUsedScreenReaderOnly;
|
|
187
|
+
|
|
188
|
+
const cmdOrCtrl =
|
|
189
|
+
Host.Platform.isMac() ? lockedString(UIStringsNotTranslate.cmd) : lockedString(UIStringsNotTranslate.ctrl);
|
|
190
|
+
const toGenerateCode = html`<span class="ai-code-generation-keyboard-action">
|
|
191
|
+
<span>${cmdOrCtrl}</span>
|
|
192
|
+
<span>${lockedString(UIStringsNotTranslate.i)}</span>
|
|
193
|
+
</span> ${lockedString(UIStringsNotTranslate.toGenerateCode)}`;
|
|
194
|
+
const toLearnHowYourDataIsBeingUsedVisible = html`<span class="ai-code-generation-keyboard-action">
|
|
195
|
+
<span>${cmdOrCtrl}</span>
|
|
196
|
+
<span>${lockedString(UIStringsNotTranslate.period)}</span>
|
|
197
|
+
</span> ${lockedString(UIStringsNotTranslate.toLearnHowYourDataIsBeingUsed)}`;
|
|
198
|
+
const teaserText = input.showDataUsageTeaser ?
|
|
199
|
+
html`${toGenerateCode}. ${toLearnHowYourDataIsBeingUsedVisible}` :
|
|
200
|
+
toGenerateCode;
|
|
201
|
+
|
|
162
202
|
const tooltipDisclaimerText = getTooltipDisclaimerText(input.noLogging, input.panel);
|
|
163
203
|
|
|
164
204
|
// clang-format off
|
|
165
205
|
teaserLabel = html`<div class="ai-code-generation-teaser-trigger">
|
|
166
|
-
<span aria-
|
|
167
|
-
${input.showDataUsageTeaser ?
|
|
168
|
-
html`<span aria-hidden="true">${'. ' + toLearnHowYourDataIsBeingUsedVisible}</span>` : nothing}
|
|
206
|
+
<span aria-hidden="true">${teaserText}</span>
|
|
169
207
|
<span class="ai-code-generation-teaser-screen-reader-only" aria-atomic="true" aria-live="assertive">
|
|
170
|
-
${
|
|
208
|
+
${lockedString(screenReaderText)}
|
|
171
209
|
</span>
|
|
172
210
|
<devtools-button
|
|
173
211
|
.data=${{
|
|
@@ -214,6 +252,10 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
214
252
|
}
|
|
215
253
|
|
|
216
254
|
case AiCodeGenerationTeaserDisplayState.DISCOVERY: {
|
|
255
|
+
if (!input.showDiscoveryTeaser) {
|
|
256
|
+
teaserLabel = nothing;
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
217
259
|
const newBadge = UI.UIUtils.maybeCreateNewBadge(PROMOTION_ID);
|
|
218
260
|
teaserLabel = newBadge ?
|
|
219
261
|
html`${lockedString(UIStringsNotTranslate.writeACommentToGenerateCode)} ${newBadge}` :
|
|
@@ -226,7 +268,11 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
226
268
|
// clang-format off
|
|
227
269
|
teaserLabel = html`
|
|
228
270
|
<div class="ai-code-generation-teaser-screen-reader-only">${teaserAriaLabel}</div>
|
|
229
|
-
<span class="ai-code-generation-spinner" aria-hidden="true"
|
|
271
|
+
<span class="ai-code-generation-spinner" aria-hidden="true">
|
|
272
|
+
${lockedString(UIStringsNotTranslate.generating)}
|
|
273
|
+
<span class="ai-code-generation-keyboard-action"><span>${lockedString(UIStringsNotTranslate.esc)}</span></span>
|
|
274
|
+
${lockedString(UIStringsNotTranslate.toCancel)}
|
|
275
|
+
</span>
|
|
230
276
|
<span class="ai-code-generation-timer" aria-hidden="true" ${Directives.ref(el => {
|
|
231
277
|
if (el) {
|
|
232
278
|
output.setTimerText = (text: string) => {
|
|
@@ -275,7 +321,9 @@ export class AiCodeGenerationTeaser extends UI.Widget.Widget {
|
|
|
275
321
|
#panel?: AiCodeCompletion.AiCodeCompletion.ContextFlavor;
|
|
276
322
|
#timerIntervalId?: number;
|
|
277
323
|
#loadStartTime?: number;
|
|
324
|
+
#aiCodeGenerationUsedSetting = Common.Settings.Settings.instance().createSetting('ai-code-generation-used', false);
|
|
278
325
|
static #showDataUsageTeaser = true;
|
|
326
|
+
static #discoveryTeaserShownInSession = false;
|
|
279
327
|
|
|
280
328
|
constructor(view?: View) {
|
|
281
329
|
super();
|
|
@@ -294,6 +342,8 @@ export class AiCodeGenerationTeaser extends UI.Widget.Widget {
|
|
|
294
342
|
disclaimerTooltipId: this.#disclaimerTooltipId,
|
|
295
343
|
noLogging: this.#noLogging,
|
|
296
344
|
showDataUsageTeaser: AiCodeGenerationTeaser.#showDataUsageTeaser,
|
|
345
|
+
showDiscoveryTeaser:
|
|
346
|
+
!this.#aiCodeGenerationUsedSetting.get() && !AiCodeGenerationTeaser.#discoveryTeaserShownInSession,
|
|
297
347
|
panel: this.#panel,
|
|
298
348
|
},
|
|
299
349
|
this.#viewOutput, this.contentElement);
|
|
@@ -315,6 +365,9 @@ export class AiCodeGenerationTeaser extends UI.Widget.Widget {
|
|
|
315
365
|
if (this.#displayState === AiCodeGenerationTeaserDisplayState.TRIGGER) {
|
|
316
366
|
AiCodeGenerationTeaser.#showDataUsageTeaser = false;
|
|
317
367
|
}
|
|
368
|
+
if (this.#displayState === AiCodeGenerationTeaserDisplayState.DISCOVERY) {
|
|
369
|
+
AiCodeGenerationTeaser.#discoveryTeaserShownInSession = true;
|
|
370
|
+
}
|
|
318
371
|
this.#displayState = displayState;
|
|
319
372
|
this.requestUpdate();
|
|
320
373
|
if (this.#displayState === AiCodeGenerationTeaserDisplayState.LOADING) {
|
|
@@ -369,4 +422,8 @@ export class AiCodeGenerationTeaser extends UI.Widget.Widget {
|
|
|
369
422
|
showTooltip(): void {
|
|
370
423
|
this.#viewOutput.showTooltip?.();
|
|
371
424
|
}
|
|
425
|
+
|
|
426
|
+
static setDiscoveryTeaserShownInSessionForTest(value: boolean): void {
|
|
427
|
+
AiCodeGenerationTeaser.#discoveryTeaserShownInSession = value;
|
|
428
|
+
}
|
|
372
429
|
}
|
|
@@ -30,6 +30,17 @@
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
.ai-code-generation-keyboard-action {
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
gap: var(--sys-size-2);
|
|
36
|
+
|
|
37
|
+
span {
|
|
38
|
+
border: var(--sys-size-1) solid var(--sys-color-neutral-outline);
|
|
39
|
+
border-radius: var(--sys-shape-corner-extra-small);
|
|
40
|
+
padding: 0 var(--sys-size-3);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
33
44
|
.ai-code-generation-teaser-generated {
|
|
34
45
|
display: inline-flex;
|
|
35
46
|
gap: var(--sys-size-2);
|
|
@@ -101,7 +101,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
101
101
|
n: group.messageCount
|
|
102
102
|
})}
|
|
103
103
|
${group.messageCount === 0 ? nothing : html`
|
|
104
|
-
<ul role="group"
|
|
104
|
+
<ul role="group">
|
|
105
105
|
${group.urlGroups.values().map(urlGroup => html`
|
|
106
106
|
<li
|
|
107
107
|
@select=${() => input.onSelectionChanged(urlGroup.filter)}
|
|
@@ -42,6 +42,7 @@ import * as Root from '../../core/root/root.js';
|
|
|
42
42
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
43
43
|
import * as Protocol from '../../generated/protocol.js';
|
|
44
44
|
import * as AiCodeCompletion from '../../models/ai_code_completion/ai_code_completion.js';
|
|
45
|
+
import * as AiCodeGeneration from '../../models/ai_code_generation/ai_code_generation.js';
|
|
45
46
|
import * as Bindings from '../../models/bindings/bindings.js';
|
|
46
47
|
import * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
47
48
|
import * as Logs from '../../models/logs/logs.js';
|
|
@@ -566,6 +567,9 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
566
567
|
}],
|
|
567
568
|
stopSequences: ['\n\n'],
|
|
568
569
|
},
|
|
570
|
+
generationContext: {
|
|
571
|
+
additionalPreambleContext: AiCodeGeneration.AiCodeGeneration.additionalContextForConsole,
|
|
572
|
+
},
|
|
569
573
|
onFeatureEnabled: () => {
|
|
570
574
|
this.setupAiCodeCompletion();
|
|
571
575
|
},
|
|
@@ -252,9 +252,9 @@ export const concatErrorDescriptionAndIssueSummary = (description: string, issue
|
|
|
252
252
|
return description;
|
|
253
253
|
};
|
|
254
254
|
|
|
255
|
-
// This value reflects the 18px min-height of .console-message
|
|
256
|
-
//
|
|
257
|
-
const defaultConsoleRowHeight =
|
|
255
|
+
// This value reflects the 18px min-height of .console-message.
|
|
256
|
+
// Keep in sync with consoleView.css.
|
|
257
|
+
const defaultConsoleRowHeight = 18;
|
|
258
258
|
|
|
259
259
|
const parameterToRemoteObject = (runtimeModel: SDK.RuntimeModel.RuntimeModel|null):
|
|
260
260
|
(parameter?: SDK.RemoteObject.RemoteObject|Protocol.Runtime.RemoteObject|string) => SDK.RemoteObject.RemoteObject =>
|
|
@@ -277,7 +277,7 @@ export class ColorSwatchPopoverIcon extends Common.ObjectWrapper.ObjectWrapper<C
|
|
|
277
277
|
return;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
this.swatch.color
|
|
280
|
+
this.swatch.renderColor(color);
|
|
281
281
|
this.dispatchEventToListeners(ColorSwatchPopoverIconEvents.COLOR_CHANGED, color);
|
|
282
282
|
}
|
|
283
283
|
|
|
@@ -48,7 +48,6 @@ import * as Lit from '../../ui/lit/lit.js';
|
|
|
48
48
|
import * as ElementsComponents from './components/components.js';
|
|
49
49
|
import computedStyleWidgetStyles from './computedStyleWidget.css.js';
|
|
50
50
|
import {ImagePreviewPopover} from './ImagePreviewPopover.js';
|
|
51
|
-
import {PlatformFontsWidget} from './PlatformFontsWidget.js';
|
|
52
51
|
import {categorizePropertyName, type Category, DefaultCategoryOrder} from './PropertyNameCategories.js';
|
|
53
52
|
import {Renderer, rendererBase, type RenderingContext, StringRenderer, URLRenderer} from './PropertyRenderer.js';
|
|
54
53
|
import {StylePropertiesSection} from './StylePropertiesSection.js';
|
|
@@ -208,8 +207,8 @@ class ColorRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.ColorMatc
|
|
|
208
207
|
}
|
|
209
208
|
|
|
210
209
|
const swatch = new InlineEditor.ColorSwatch.ColorSwatch();
|
|
211
|
-
swatch.
|
|
212
|
-
swatch.color
|
|
210
|
+
swatch.setReadonly(true);
|
|
211
|
+
swatch.renderColor(color);
|
|
213
212
|
const valueElement = document.createElement('span');
|
|
214
213
|
valueElement.textContent = match.text;
|
|
215
214
|
|
|
@@ -265,12 +264,12 @@ type ComputedStyleData = {
|
|
|
265
264
|
interface ComputedStyleWidgetInput {
|
|
266
265
|
computedStylesTree: TreeOutline.TreeOutline.TreeOutline<ComputedStyleData>;
|
|
267
266
|
hasMatches: boolean;
|
|
268
|
-
computedStyleModel?: ComputedStyleModule.ComputedStyleModel.ComputedStyleModel;
|
|
269
267
|
showInheritedComputedStylePropertiesSetting: Common.Settings.Setting<boolean>;
|
|
270
268
|
groupComputedStylesSetting: Common.Settings.Setting<boolean>;
|
|
271
269
|
onFilterChanged: (event: CustomEvent<string>) => void;
|
|
272
270
|
filterText: string;
|
|
273
271
|
onRegexToggled: () => void;
|
|
272
|
+
includeToolbar: boolean;
|
|
274
273
|
}
|
|
275
274
|
|
|
276
275
|
type View = (input: ComputedStyleWidgetInput, output: null, target: HTMLElement) => void;
|
|
@@ -279,29 +278,30 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
279
278
|
// clang-format off
|
|
280
279
|
render(html`
|
|
281
280
|
<style>${computedStyleWidgetStyles}</style>
|
|
282
|
-
|
|
283
|
-
<
|
|
284
|
-
<devtools-toolbar-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
281
|
+
${input.includeToolbar ? html`
|
|
282
|
+
<div class="styles-sidebar-pane-toolbar">
|
|
283
|
+
<devtools-toolbar class="styles-pane-toolbar" role="presentation">
|
|
284
|
+
<devtools-toolbar-input
|
|
285
|
+
type="filter"
|
|
286
|
+
autofocus
|
|
287
|
+
?regex=${true}
|
|
288
|
+
value=${input.filterText}
|
|
289
|
+
@change=${input.onFilterChanged}
|
|
290
|
+
@regextoggle=${input.onRegexToggled}
|
|
291
|
+
></devtools-toolbar-input>
|
|
292
|
+
<devtools-checkbox
|
|
293
|
+
title=${i18nString(UIStrings.showAll)}
|
|
294
|
+
${bindToSetting(input.showInheritedComputedStylePropertiesSetting)}
|
|
295
|
+
>${i18nString(UIStrings.showAll)}</devtools-checkbox>
|
|
296
|
+
<devtools-checkbox
|
|
297
|
+
title=${i18nString(UIStrings.group)}
|
|
298
|
+
${bindToSetting(input.groupComputedStylesSetting)}
|
|
299
|
+
>${i18nString(UIStrings.group)}</devtools-checkbox>
|
|
300
|
+
</devtools-toolbar>
|
|
301
|
+
</div>
|
|
302
|
+
` : Lit.nothing}
|
|
302
303
|
${input.computedStylesTree}
|
|
303
304
|
${!input.hasMatches ? html`<div class="gray-info-message">${i18nString(UIStrings.noMatchingProperty)}</div>` : ''}
|
|
304
|
-
${input.computedStyleModel ? html`<devtools-widget .widgetConfig=${UI.Widget.widgetConfig(PlatformFontsWidget, { sharedModel: input.computedStyleModel})}></devtools-widget>` : ''}
|
|
305
305
|
`, target);
|
|
306
306
|
// clang-format on
|
|
307
307
|
};
|
|
@@ -321,6 +321,7 @@ export class ComputedStyleWidget extends UI.Widget.VBox {
|
|
|
321
321
|
readonly #view: View;
|
|
322
322
|
#filterText = '';
|
|
323
323
|
#isRegex = false;
|
|
324
|
+
#includeToolbar = true;
|
|
324
325
|
|
|
325
326
|
constructor() {
|
|
326
327
|
super({useShadowDom: true});
|
|
@@ -355,14 +356,13 @@ export class ComputedStyleWidget extends UI.Widget.VBox {
|
|
|
355
356
|
this.#computedStylesTree.classList.toggle('computed-narrow', isNarrow);
|
|
356
357
|
}
|
|
357
358
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
super.wasShown();
|
|
359
|
+
get includeToolbar(): boolean {
|
|
360
|
+
return this.#includeToolbar;
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
363
|
+
set includeToolbar(x: boolean) {
|
|
364
|
+
this.#includeToolbar = x;
|
|
365
|
+
this.requestUpdate();
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
/**
|
|
@@ -372,8 +372,8 @@ export class ComputedStyleWidget extends UI.Widget.VBox {
|
|
|
372
372
|
this.#view(
|
|
373
373
|
{
|
|
374
374
|
computedStylesTree: this.#computedStylesTree,
|
|
375
|
+
includeToolbar: this.#includeToolbar,
|
|
375
376
|
hasMatches,
|
|
376
|
-
computedStyleModel: this.#computedStyleModel,
|
|
377
377
|
showInheritedComputedStylePropertiesSetting: this.showInheritedComputedStylePropertiesSetting,
|
|
378
378
|
groupComputedStylesSetting: this.groupComputedStylesSetting,
|
|
379
379
|
onFilterChanged: this.onFilterChanged.bind(this),
|
|
@@ -59,6 +59,7 @@ import {DOMTreeWidget, type ElementsTreeOutline} from './ElementsTreeOutline.js'
|
|
|
59
59
|
import {LayoutPane} from './LayoutPane.js';
|
|
60
60
|
import type {MarkerDecorator} from './MarkerDecorator.js';
|
|
61
61
|
import {MetricsSidebarPane} from './MetricsSidebarPane.js';
|
|
62
|
+
import {PlatformFontsWidget} from './PlatformFontsWidget.js';
|
|
62
63
|
import {
|
|
63
64
|
Events as StylesSidebarPaneEvents,
|
|
64
65
|
StylesSidebarPane,
|
|
@@ -312,8 +313,6 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
312
313
|
|
|
313
314
|
UI.Context.Context.instance().addFlavorChangeListener(
|
|
314
315
|
StylesSidebarPane, this.evaluateTrackingComputedStyleUpdatesForNode, this);
|
|
315
|
-
UI.Context.Context.instance().addFlavorChangeListener(
|
|
316
|
-
ComputedStyleWidget, this.evaluateTrackingComputedStyleUpdatesForNode, this);
|
|
317
316
|
|
|
318
317
|
this.stylesWidget = new StylesSidebarPane(this.#computedStyleModel);
|
|
319
318
|
this.#computedStyleWidget = new ComputedStyleWidget();
|
|
@@ -372,7 +371,7 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
372
371
|
return;
|
|
373
372
|
}
|
|
374
373
|
|
|
375
|
-
const isComputedStyleWidgetVisible =
|
|
374
|
+
const isComputedStyleWidgetVisible = this.#computedStyleWidget.isShowing();
|
|
376
375
|
const isStylesTabVisible = Boolean(UI.Context.Context.instance().flavor(StylesSidebarPane));
|
|
377
376
|
const shouldTrackComputedStyleUpdates = isComputedStyleWidgetVisible ||
|
|
378
377
|
(isStylesTabVisible && Root.Runtime.hostConfig.devToolsAnimationStylesInStylesTab?.enabled);
|
|
@@ -550,6 +549,7 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
550
549
|
super.wasShown();
|
|
551
550
|
UI.Context.Context.instance().setFlavor(ElementsPanel, this);
|
|
552
551
|
this.#domTreeWidget.show(this.domTreeContainer);
|
|
552
|
+
this.evaluateTrackingComputedStyleUpdatesForNode();
|
|
553
553
|
|
|
554
554
|
if (Annotations.AnnotationRepository.annotationsEnabled()) {
|
|
555
555
|
void PanelCommon.AnnotationManager.instance().resolveAnnotationsOfType(Annotations.AnnotationType.ELEMENT_NODE);
|
|
@@ -558,6 +558,7 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
558
558
|
|
|
559
559
|
override willHide(): void {
|
|
560
560
|
SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight();
|
|
561
|
+
this.evaluateTrackingComputedStyleUpdatesForNode();
|
|
561
562
|
this.#domTreeWidget.detach();
|
|
562
563
|
super.willHide();
|
|
563
564
|
UI.Context.Context.instance().setFlavor(ElementsPanel, null);
|
|
@@ -1116,10 +1117,16 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
1116
1117
|
this.setupTextSelectionHack(matchedStylePanesWrapper.element);
|
|
1117
1118
|
|
|
1118
1119
|
const computedStylePanesWrapper = new UI.Widget.VBox();
|
|
1119
|
-
computedStylePanesWrapper.element.classList.add('style-panes-wrapper');
|
|
1120
|
+
computedStylePanesWrapper.element.classList.add('style-panes-wrapper', 'computed-styles-pane-wrapper');
|
|
1120
1121
|
computedStylePanesWrapper.element.setAttribute('jslog', `${VisualLogging.pane('computed').track({resize: true})}`);
|
|
1122
|
+
this.#computedStyleWidget.element.classList.add('computed-styles-wrapper');
|
|
1121
1123
|
this.#computedStyleWidget.show(computedStylePanesWrapper.element);
|
|
1122
1124
|
|
|
1125
|
+
const platformFontsWidget = new PlatformFontsWidget();
|
|
1126
|
+
platformFontsWidget.element.classList.add('platform-fonts-wrapper');
|
|
1127
|
+
platformFontsWidget.sharedModel = this.#computedStyleModel;
|
|
1128
|
+
platformFontsWidget.show(computedStylePanesWrapper.element);
|
|
1129
|
+
|
|
1123
1130
|
const stylesSplitWidget = new UI.SplitWidget.SplitWidget(
|
|
1124
1131
|
true /* isVertical */, true /* secondIsSidebar */, 'elements.styles.sidebar.width', 100);
|
|
1125
1132
|
stylesSplitWidget.setMainWidget(matchedStylePanesWrapper);
|
|
@@ -1162,6 +1169,7 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
1162
1169
|
|
|
1163
1170
|
const tabSelected = (event: Common.EventTarget.EventTargetEvent<UI.TabbedPane.EventData>): void => {
|
|
1164
1171
|
const {tabId} = event.data;
|
|
1172
|
+
this.evaluateTrackingComputedStyleUpdatesForNode();
|
|
1165
1173
|
if (tabId === SidebarPaneTabId.COMPUTED) {
|
|
1166
1174
|
computedStylePanesWrapper.show(computedView.element);
|
|
1167
1175
|
showMetricsWidgetInComputedPane();
|