chrome-devtools-frontend 1.0.1537268 → 1.0.1537860
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/.env.template +9 -0
- package/docs/get_the_code.md +27 -0
- package/front_end/core/common/SettingRegistration.ts +10 -7
- package/front_end/core/common/Settings.ts +3 -0
- package/front_end/core/sdk/sdk-meta.ts +8 -2
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +4 -3
- package/front_end/generated/SupportedCSSProperties.js +1 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +23 -7
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +110 -5
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +50 -45
- package/front_end/models/cpu_profile/ProfileTreeModel.ts +7 -7
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +1 -1
- package/front_end/panels/application/StorageView.ts +3 -2
- package/front_end/panels/application/components/BackForwardCacheView.ts +34 -51
- package/front_end/panels/application/components/OriginTrialTreeView.ts +83 -80
- package/front_end/panels/application/components/backForwardCacheView.css +4 -0
- package/front_end/panels/application/components/badge.css +8 -0
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +2 -2
- package/front_end/panels/application/preloading/components/PreloadingString.ts +27 -0
- package/front_end/panels/autofill/AutofillView.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +11 -9
- package/front_end/panels/coverage/CoverageView.ts +1 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +1 -1
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +1 -1
- package/front_end/panels/elements/ElementStatePaneWidget.ts +1 -1
- package/front_end/panels/elements/EventListenersWidget.ts +1 -2
- package/front_end/panels/elements/PropertiesWidget.ts +1 -1
- package/front_end/panels/network/NetworkConfigView.ts +2 -1
- package/front_end/panels/network/NetworkPanel.ts +5 -4
- package/front_end/panels/network/RequestCookiesView.ts +2 -1
- package/front_end/panels/profiler/HeapSnapshotView.ts +3 -2
- package/front_end/panels/sensors/SensorsView.ts +4 -3
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +8 -6
- package/front_end/panels/settings/KeybindsSettingsTab.ts +3 -2
- package/front_end/panels/settings/SettingsScreen.ts +2 -1
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +1 -1
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +2 -1
- package/front_end/panels/sources/SourcesPanel.ts +2 -1
- package/front_end/panels/sources/sources-meta.ts +8 -1
- package/front_end/panels/timeline/TimelinePanel.ts +4 -3
- package/front_end/panels/timeline/TimelineUIUtils.ts +4 -20
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -0
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +2 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/adorners/Adorner.ts +2 -1
- package/front_end/ui/components/buttons/Button.docs.ts +195 -0
- package/front_end/ui/components/settings/SettingCheckbox.ts +49 -14
- package/front_end/ui/components/settings/settingCheckbox.css +6 -1
- package/front_end/ui/components/spinners/Spinners.docs.ts +13 -0
- package/front_end/ui/components/tooltips/Tooltip.docs.ts +76 -0
- package/front_end/ui/legacy/FilterBar.ts +1 -2
- package/front_end/ui/legacy/RadioButton.docs.ts +41 -0
- package/front_end/ui/legacy/SelectMenu.docs.ts +98 -0
- package/front_end/ui/legacy/Toolbar.ts +4 -6
- package/front_end/ui/legacy/UIUtils.ts +114 -1
- package/front_end/ui/legacy/Widget.ts +62 -34
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +125 -0
- package/front_end/ui/legacy/components/settings_ui/settings_ui.ts +8 -0
- package/front_end/ui/legacy/legacy.ts +0 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/package.json +1 -1
- package/front_end/models/trace/lantern/testing/MetricTestUtils.ts +0 -62
- package/front_end/models/trace/lantern/testing/testing.ts +0 -5
- package/front_end/ui/components/docs/button/basic.html +0 -44
- package/front_end/ui/components/docs/button/basic.ts +0 -175
- package/front_end/ui/components/docs/radio_button/basic.html +0 -23
- package/front_end/ui/components/docs/radio_button/basic.ts +0 -50
- package/front_end/ui/components/docs/select_menu/basic.html +0 -19
- package/front_end/ui/components/docs/select_menu/basic.ts +0 -95
- package/front_end/ui/components/docs/select_menu/wide-option.html +0 -38
- package/front_end/ui/components/docs/select_menu/wide-option.ts +0 -43
- package/front_end/ui/components/docs/spinners/basic.html +0 -17
- package/front_end/ui/components/docs/spinners/basic.ts +0 -22
- package/front_end/ui/components/docs/tooltip/basic.html +0 -20
- package/front_end/ui/components/docs/tooltip/basic.ts +0 -82
- package/front_end/ui/legacy/SettingsUI.ts +0 -240
|
@@ -10,6 +10,7 @@ import * as Protocol from '../../generated/protocol.js';
|
|
|
10
10
|
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
|
11
11
|
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
12
12
|
import * as CookieTable from '../../ui/legacy/components/cookie_table/cookie_table.js';
|
|
13
|
+
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
13
14
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
14
15
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
15
16
|
|
|
@@ -104,7 +105,7 @@ export class RequestCookiesView extends UI.Widget.Widget {
|
|
|
104
105
|
titleText.textContent = i18nString(UIStrings.requestCookies);
|
|
105
106
|
UI.Tooltip.Tooltip.install(titleText, i18nString(UIStrings.cookiesThatWereSentToTheServerIn));
|
|
106
107
|
|
|
107
|
-
const requestCookiesCheckbox =
|
|
108
|
+
const requestCookiesCheckbox = SettingsUI.SettingsUI.createSettingCheckbox(
|
|
108
109
|
i18nString(UIStrings.showFilteredOutRequestCookies), this.showFilteredOutCookiesSetting);
|
|
109
110
|
requestCookiesCheckbox.addEventListener('change', () => {
|
|
110
111
|
this.refreshRequestCookiesView();
|
|
@@ -16,6 +16,7 @@ import * as HeapSnapshotModel from '../../models/heap_snapshot_model/heap_snapsh
|
|
|
16
16
|
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
|
17
17
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
18
18
|
import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
|
|
19
|
+
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
19
20
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
20
21
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
21
22
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -1339,7 +1340,7 @@ export class HeapSnapshotProfileType extends
|
|
|
1339
1340
|
const showOptionToExposeInternalsInHeapSnapshot =
|
|
1340
1341
|
Root.Runtime.experiments.isEnabled('show-option-tp-expose-internals-in-heap-snapshot');
|
|
1341
1342
|
const exposeInternalsInHeapSnapshotCheckbox =
|
|
1342
|
-
|
|
1343
|
+
SettingsUI.SettingsUI.createSettingCheckbox(i18nString(UIStrings.exposeInternals), this.exposeInternals);
|
|
1343
1344
|
this.customContentInternal = exposeInternalsInHeapSnapshotCheckbox;
|
|
1344
1345
|
return showOptionToExposeInternalsInHeapSnapshot ? exposeInternalsInHeapSnapshotCheckbox : null;
|
|
1345
1346
|
}
|
|
@@ -1549,7 +1550,7 @@ export class TrackingHeapSnapshotProfileType extends
|
|
|
1549
1550
|
}
|
|
1550
1551
|
|
|
1551
1552
|
override customContent(): Element|null {
|
|
1552
|
-
const checkboxSetting =
|
|
1553
|
+
const checkboxSetting = SettingsUI.SettingsUI.createSettingCheckbox(
|
|
1553
1554
|
i18nString(UIStrings.recordAllocationStacksExtra), this.recordAllocationStacksSettingInternal);
|
|
1554
1555
|
this.customContentInternal = (checkboxSetting);
|
|
1555
1556
|
return checkboxSetting;
|
|
@@ -8,6 +8,7 @@ import * as Host from '../../core/host/host.js';
|
|
|
8
8
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
9
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
10
10
|
import * as Geometry from '../../models/geometry/geometry.js';
|
|
11
|
+
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
11
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
12
13
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
13
14
|
import * as MobileThrottling from '../mobile_throttling/mobile_throttling.js';
|
|
@@ -549,7 +550,7 @@ export class SensorsView extends UI.Widget.VBox {
|
|
|
549
550
|
|
|
550
551
|
private createPressureSection(): void {
|
|
551
552
|
const container = this.contentElement.createChild('div', 'pressure-section');
|
|
552
|
-
const control =
|
|
553
|
+
const control = SettingsUI.SettingsUI.createControlForSetting(
|
|
553
554
|
Common.Settings.Settings.instance().moduleSetting('emulation.cpu-pressure'),
|
|
554
555
|
i18nString(UIStrings.forcesSelectedPressureStateEmulation));
|
|
555
556
|
|
|
@@ -798,7 +799,7 @@ export class SensorsView extends UI.Widget.VBox {
|
|
|
798
799
|
|
|
799
800
|
private appendTouchControl(): void {
|
|
800
801
|
const container = this.contentElement.createChild('div', 'touch-section');
|
|
801
|
-
const control =
|
|
802
|
+
const control = SettingsUI.SettingsUI.createControlForSetting(
|
|
802
803
|
Common.Settings.Settings.instance().moduleSetting('emulation.touch'),
|
|
803
804
|
i18nString(UIStrings.forcesTouchInsteadOfClick));
|
|
804
805
|
|
|
@@ -809,7 +810,7 @@ export class SensorsView extends UI.Widget.VBox {
|
|
|
809
810
|
|
|
810
811
|
private appendIdleEmulator(): void {
|
|
811
812
|
const container = this.contentElement.createChild('div', 'idle-section');
|
|
812
|
-
const control =
|
|
813
|
+
const control = SettingsUI.SettingsUI.createControlForSetting(
|
|
813
814
|
Common.Settings.Settings.instance().moduleSetting('emulation.idle-detection'),
|
|
814
815
|
i18nString(UIStrings.forcesSelectedIdleStateEmulation));
|
|
815
816
|
|
|
@@ -8,6 +8,7 @@ import '../../ui/components/cards/cards.js';
|
|
|
8
8
|
import * as Common from '../../core/common/common.js';
|
|
9
9
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
10
10
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
11
|
+
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
11
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
12
13
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
13
14
|
|
|
@@ -112,7 +113,7 @@ export class FrameworkIgnoreListSettingsTab extends UI.Widget.VBox implements
|
|
|
112
113
|
const enabledSetting = Common.Settings.Settings.instance().moduleSetting('enable-ignore-listing');
|
|
113
114
|
const enableIgnoreListing = this.contentElement.createChild('div', 'enable-ignore-listing');
|
|
114
115
|
enableIgnoreListing.appendChild(
|
|
115
|
-
|
|
116
|
+
SettingsUI.SettingsUI.createSettingCheckbox(i18nString(UIStrings.enableIgnoreListing), enabledSetting));
|
|
116
117
|
UI.Tooltip.Tooltip.install(enableIgnoreListing, i18nString(UIStrings.enableIgnoreListingTooltip));
|
|
117
118
|
|
|
118
119
|
const enableIgnoreListingCard = settingsContent.createChild('devtools-card');
|
|
@@ -123,14 +124,15 @@ export class FrameworkIgnoreListSettingsTab extends UI.Widget.VBox implements
|
|
|
123
124
|
generalExclusionGroup.classList.add('general-exclusion-group');
|
|
124
125
|
const ignoreListContentScripts =
|
|
125
126
|
generalExclusionGroup.createChild('div', 'ignore-list-option')
|
|
126
|
-
.appendChild(
|
|
127
|
+
.appendChild(SettingsUI.SettingsUI.createSettingCheckbox(
|
|
127
128
|
i18nString(UIStrings.ignoreListContentScripts),
|
|
128
129
|
Common.Settings.Settings.instance().moduleSetting('skip-content-scripts')));
|
|
129
130
|
|
|
130
131
|
const automaticallyIgnoreListContainer = generalExclusionGroup.createChild('div', 'ignore-list-option');
|
|
131
|
-
const automaticallyIgnoreList =
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
const automaticallyIgnoreList =
|
|
133
|
+
automaticallyIgnoreListContainer.appendChild(SettingsUI.SettingsUI.createSettingCheckbox(
|
|
134
|
+
i18nString(UIStrings.automaticallyIgnoreListKnownThirdPartyScripts),
|
|
135
|
+
Common.Settings.Settings.instance().moduleSetting('automatically-ignore-list-known-third-party-scripts')));
|
|
134
136
|
|
|
135
137
|
const automaticallyIgnoreLinkButton = new Buttons.Button.Button();
|
|
136
138
|
automaticallyIgnoreLinkButton.data = {
|
|
@@ -148,7 +150,7 @@ export class FrameworkIgnoreListSettingsTab extends UI.Widget.VBox implements
|
|
|
148
150
|
|
|
149
151
|
const ignoreListAnonymousScripts =
|
|
150
152
|
generalExclusionGroup.createChild('div', 'ignore-list-option')
|
|
151
|
-
.appendChild(
|
|
153
|
+
.appendChild(SettingsUI.SettingsUI.createSettingCheckbox(
|
|
152
154
|
i18nString(UIStrings.ignoreListAnonymousScripts),
|
|
153
155
|
Common.Settings.Settings.instance().moduleSetting('skip-anonymous-scripts')));
|
|
154
156
|
|
|
@@ -11,6 +11,7 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
11
11
|
import * as Platform from '../../core/platform/platform.js';
|
|
12
12
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
13
13
|
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
|
14
|
+
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
14
15
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
15
16
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
16
17
|
|
|
@@ -126,8 +127,8 @@ export class KeybindsSettingsTab extends UI.Widget.VBox implements UI.ListContro
|
|
|
126
127
|
const keybindsSetSetting = Common.Settings.Settings.instance().moduleSetting('active-keybind-set');
|
|
127
128
|
const userShortcutsSetting = Common.Settings.Settings.instance().moduleSetting('user-shortcuts');
|
|
128
129
|
keybindsSetSetting.addChangeListener(this.update, this);
|
|
129
|
-
const keybindsSetSelect =
|
|
130
|
-
|
|
130
|
+
const keybindsSetSelect = SettingsUI.SettingsUI.createControlForSetting(
|
|
131
|
+
keybindsSetSetting, i18nString(UIStrings.matchShortcutsFromPreset));
|
|
131
132
|
|
|
132
133
|
const card = settingsContent.createChild('devtools-card');
|
|
133
134
|
card.heading = i18nString(UIStrings.shortcuts);
|
|
@@ -14,6 +14,7 @@ import * as Root from '../../core/root/root.js';
|
|
|
14
14
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
15
15
|
import type * as Cards from '../../ui/components/cards/cards.js';
|
|
16
16
|
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
|
17
|
+
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
17
18
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
18
19
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
19
20
|
import {html, render} from '../../ui/lit/lit.js';
|
|
@@ -355,7 +356,7 @@ export class GenericSettingsTab extends UI.Widget.VBox implements SettingsTab {
|
|
|
355
356
|
const sectionElement = document.createElement('div');
|
|
356
357
|
for (const settingRegistration of settings) {
|
|
357
358
|
const setting = Common.Settings.Settings.instance().moduleSetting(settingRegistration.settingName);
|
|
358
|
-
const settingControl =
|
|
359
|
+
const settingControl = SettingsUI.SettingsUI.createControlForSetting(setting);
|
|
359
360
|
if (settingControl) {
|
|
360
361
|
this.settingToControl.set(setting, settingControl);
|
|
361
362
|
sectionElement.appendChild(settingControl);
|
|
@@ -61,7 +61,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
61
61
|
<input
|
|
62
62
|
class="harmony-input"
|
|
63
63
|
jslog=${VisualLogging.textField().track({keydown: 'Enter', change: true}).context(input.excludePatternSetting.name)}
|
|
64
|
-
${UI.
|
|
64
|
+
${UI.UIUtils.bindToSetting(input.excludePatternSetting)}
|
|
65
65
|
id="workspace-setting-folder-exclude-pattern"></input>
|
|
66
66
|
</div>
|
|
67
67
|
<div class="mappings-info">${i18nString(UIStrings.mappingsAreInferredAutomatically)}</div>
|
|
@@ -255,6 +255,7 @@ export class AiCodeCompletionPlugin extends Plugin {
|
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
#removeAiCodeCompletionCitationsToolbar(): void {
|
|
258
|
+
this.#aiCodeCompletionCitationsToolbar?.detach();
|
|
258
259
|
if (this.#editor) {
|
|
259
260
|
this.#editor.dispatch({
|
|
260
261
|
effects: SourceFrame.SourceFrame.removeSourceFrameInfobar.of(
|
|
@@ -300,7 +301,7 @@ export class AiCodeCompletionPlugin extends Plugin {
|
|
|
300
301
|
this.#aiCodeCompletion?.remove();
|
|
301
302
|
this.#aiCodeCompletion = undefined;
|
|
302
303
|
this.#aiCodeCompletionCitations = [];
|
|
303
|
-
this.#
|
|
304
|
+
this.#aiCodeCompletionDisclaimer?.detach();
|
|
304
305
|
this.#aiCodeCompletionDisclaimer = undefined;
|
|
305
306
|
this.#removeAiCodeCompletionCitationsToolbar();
|
|
306
307
|
this.#aiCodeCompletionCitationsToolbar = undefined;
|
|
@@ -44,6 +44,7 @@ import * as Breakpoints from '../../models/breakpoints/breakpoints.js';
|
|
|
44
44
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
45
45
|
import * as PanelCommon from '../../panels/common/common.js';
|
|
46
46
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
47
|
+
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
47
48
|
import type * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
48
49
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
49
50
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -921,7 +922,7 @@ export class SourcesPanel extends UI.Panel.Panel implements
|
|
|
921
922
|
|
|
922
923
|
const label = i18nString(UIStrings.pauseOnCaughtExceptions);
|
|
923
924
|
const setting = Common.Settings.Settings.instance().moduleSetting('pause-on-caught-exception');
|
|
924
|
-
debugToolbarDrawer.appendChild(
|
|
925
|
+
debugToolbarDrawer.appendChild(SettingsUI.SettingsUI.createSettingCheckbox(label, setting));
|
|
925
926
|
|
|
926
927
|
return debugToolbarDrawer;
|
|
927
928
|
}
|
|
@@ -396,7 +396,11 @@ const UIStrings = {
|
|
|
396
396
|
/**
|
|
397
397
|
* @description Title of a setting under the Sources category in Settings
|
|
398
398
|
*/
|
|
399
|
-
wasmAutoStepping: '
|
|
399
|
+
wasmAutoStepping: 'Wasm auto-stepping bytecode',
|
|
400
|
+
/**
|
|
401
|
+
* @description Tooltip text for a setting that controls Wasm will try to skip wasm bytecode
|
|
402
|
+
*/
|
|
403
|
+
wasmAutoSteppingInfo: 'When debugging Wasm with debug information, try to skip wasm bytecode',
|
|
400
404
|
/**
|
|
401
405
|
* @description Title of a setting under the Sources category in Settings
|
|
402
406
|
*/
|
|
@@ -1850,6 +1854,9 @@ Common.Settings.registerSettingExtension({
|
|
|
1850
1854
|
title: i18nLazyString(UIStrings.disableWasmAutoStepping),
|
|
1851
1855
|
},
|
|
1852
1856
|
],
|
|
1857
|
+
learnMore: {
|
|
1858
|
+
tooltip: i18nLazyString(UIStrings.wasmAutoSteppingInfo),
|
|
1859
|
+
}
|
|
1853
1860
|
});
|
|
1854
1861
|
|
|
1855
1862
|
UI.ViewManager.registerLocationResolver({
|
|
@@ -57,6 +57,7 @@ import * as Dialogs from '../../ui/components/dialogs/dialogs.js';
|
|
|
57
57
|
import * as LegacyWrapper from '../../ui/components/legacy_wrapper/legacy_wrapper.js';
|
|
58
58
|
import * as Snackbars from '../../ui/components/snackbars/snackbars.js';
|
|
59
59
|
import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
|
|
60
|
+
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
60
61
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
61
62
|
import * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';
|
|
62
63
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -1290,7 +1291,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1290
1291
|
this.cpuThrottlingSelect = MobileThrottling.ThrottlingManager.throttlingManager().createCPUThrottlingSelector();
|
|
1291
1292
|
cpuThrottlingPane.append(this.cpuThrottlingSelect.control.element);
|
|
1292
1293
|
|
|
1293
|
-
this.settingsPane.append(
|
|
1294
|
+
this.settingsPane.append(SettingsUI.SettingsUI.createSettingCheckbox(
|
|
1294
1295
|
this.captureSelectorStatsSetting.title(), this.captureSelectorStatsSetting,
|
|
1295
1296
|
i18nString(UIStrings.capturesSelectorStats)));
|
|
1296
1297
|
|
|
@@ -1298,11 +1299,11 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1298
1299
|
networkThrottlingPane.append(i18nString(UIStrings.network));
|
|
1299
1300
|
networkThrottlingPane.append(this.createNetworkConditionsSelectToolbarItem().element);
|
|
1300
1301
|
|
|
1301
|
-
this.settingsPane.append(
|
|
1302
|
+
this.settingsPane.append(SettingsUI.SettingsUI.createSettingCheckbox(
|
|
1302
1303
|
this.captureLayersAndPicturesSetting.title(), this.captureLayersAndPicturesSetting,
|
|
1303
1304
|
i18nString(UIStrings.capturesAdvancedPaint)));
|
|
1304
1305
|
|
|
1305
|
-
this.settingsPane.append(
|
|
1306
|
+
this.settingsPane.append(SettingsUI.SettingsUI.createSettingCheckbox(
|
|
1306
1307
|
this.disableCaptureJSProfileSetting.title(), this.disableCaptureJSProfileSetting,
|
|
1307
1308
|
i18nString(UIStrings.disablesJavascriptSampling)));
|
|
1308
1309
|
|
|
@@ -732,26 +732,6 @@ export class TimelineUIUtils {
|
|
|
732
732
|
break;
|
|
733
733
|
}
|
|
734
734
|
|
|
735
|
-
case Trace.Types.Events.Name.COMPILE_SCRIPT:
|
|
736
|
-
case Trace.Types.Events.Name.CACHE_SCRIPT:
|
|
737
|
-
case Trace.Types.Events.Name.EVALUATE_SCRIPT: {
|
|
738
|
-
const url = unsafeEventData['url'];
|
|
739
|
-
if (url) {
|
|
740
|
-
const {lineNumber} = Trace.Helpers.Trace.getZeroIndexedLineAndColumnForEvent(event);
|
|
741
|
-
details = this.linkifyLocation({
|
|
742
|
-
scriptId: null,
|
|
743
|
-
url,
|
|
744
|
-
lineNumber: lineNumber || 0,
|
|
745
|
-
columnNumber: 0,
|
|
746
|
-
target,
|
|
747
|
-
isFreshOrEnhanced,
|
|
748
|
-
linkifier,
|
|
749
|
-
omitOrigin: true,
|
|
750
|
-
});
|
|
751
|
-
}
|
|
752
|
-
break;
|
|
753
|
-
}
|
|
754
|
-
|
|
755
735
|
case Trace.Types.Events.Name.BACKGROUND_DESERIALIZE:
|
|
756
736
|
case Trace.Types.Events.Name.STREAMING_COMPILE_SCRIPT: {
|
|
757
737
|
const url = unsafeEventData['url'];
|
|
@@ -1710,6 +1690,7 @@ export class TimelineUIUtils {
|
|
|
1710
1690
|
return {callFrames} as Protocol.Runtime.StackTrace;
|
|
1711
1691
|
}
|
|
1712
1692
|
|
|
1693
|
+
/** This renders a stack trace... and other cool stuff. */
|
|
1713
1694
|
static async generateCauses(
|
|
1714
1695
|
event: Trace.Types.Events.Event, contentHelper: TimelineDetailsContentHelper,
|
|
1715
1696
|
parsedTrace: Trace.TraceModel.ParsedTrace): Promise<void> {
|
|
@@ -2478,6 +2459,9 @@ export class TimelineDetailsContentHelper {
|
|
|
2478
2459
|
if (!this.#linkifier) {
|
|
2479
2460
|
return;
|
|
2480
2461
|
}
|
|
2462
|
+
|
|
2463
|
+
// We resolve the original function name here. StackTracePreviewContent uses
|
|
2464
|
+
// Linkifier to resolve the source code location.
|
|
2481
2465
|
const resolvedStackTrace: Protocol.Runtime.StackTrace = structuredClone(stackTrace);
|
|
2482
2466
|
let currentResolvedStackTrace: Protocol.Runtime.StackTrace|undefined = resolvedStackTrace;
|
|
2483
2467
|
while (currentResolvedStackTrace) {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
5
|
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
6
6
|
|
|
7
|
+
import '../../../ui/components/settings/settings.js';
|
|
7
8
|
import '../../../ui/components/icon_button/icon_button.js';
|
|
8
9
|
import './FieldSettingsDialog.js';
|
|
9
10
|
import './NetworkThrottlingSelector.js';
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
import '../../../ui/components/settings/settings.js';
|
|
6
|
+
|
|
5
7
|
import * as Common from '../../../core/common/common.js';
|
|
6
8
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
7
9
|
import * as Platform from '../../../core/platform/platform.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: https://chromium.googlesource.com/chromium/src
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: b60591ec8cb7d0c80f2661ee8fbbfef966d86046
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import type * as Platform from '../../../core/platform/platform.js';
|
|
7
7
|
import {html, render} from '../../../ui/lit/lit.js';
|
|
8
|
+
import * as UI from '../../legacy/legacy.js';
|
|
8
9
|
import * as VisualElements from '../../visual_logging/visual_logging.js';
|
|
9
10
|
|
|
10
11
|
import adornerStyles from './adorner.css.js';
|
|
@@ -37,7 +38,7 @@ export class Adorner extends HTMLElement {
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
override cloneNode(deep?: boolean): Node {
|
|
40
|
-
const node =
|
|
41
|
+
const node = UI.UIUtils.cloneCustomElement(this, deep);
|
|
41
42
|
node.data = {name: this.name, content: this.#content, jslogContext: this.#jslogContext};
|
|
42
43
|
return node;
|
|
43
44
|
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
// Copyright 2021 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 {Button, FloatingButton} from './buttons.js';
|
|
6
|
+
|
|
7
|
+
export async function render(container: HTMLElement) {
|
|
8
|
+
const style = document.createElement('style');
|
|
9
|
+
style.textContent = `
|
|
10
|
+
#container > div {
|
|
11
|
+
width: 80%;
|
|
12
|
+
padding: var(--sys-size-11);
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
flex-wrap: wrap;
|
|
16
|
+
gap: var(--sys-size-5);
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
container.appendChild(style);
|
|
20
|
+
|
|
21
|
+
const appendSection = (headerText: string, sectionElement: HTMLElement) => {
|
|
22
|
+
const header = document.createElement('header');
|
|
23
|
+
header.textContent = headerText;
|
|
24
|
+
container.appendChild(header);
|
|
25
|
+
container.appendChild(sectionElement);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const buttonsSection = document.createElement('div');
|
|
29
|
+
const primarySection = document.createElement('div');
|
|
30
|
+
const tonalSection = document.createElement('div');
|
|
31
|
+
const outlineSection = document.createElement('div');
|
|
32
|
+
const textSection = document.createElement('div');
|
|
33
|
+
const iconSection = document.createElement('div');
|
|
34
|
+
const floatingSection = document.createElement('div');
|
|
35
|
+
|
|
36
|
+
appendSection('Buttons', buttonsSection);
|
|
37
|
+
appendSection('Primary buttons', primarySection);
|
|
38
|
+
appendSection('Tonal buttons', tonalSection);
|
|
39
|
+
appendSection('Outlined buttons', outlineSection);
|
|
40
|
+
appendSection('Text buttons', textSection);
|
|
41
|
+
appendSection('Icon buttons', iconSection);
|
|
42
|
+
appendSection('Floating buttons', floatingSection);
|
|
43
|
+
|
|
44
|
+
const DEFAULT_TEXT = 'Default';
|
|
45
|
+
const WITH_ICON_TEXT = 'With icon';
|
|
46
|
+
const MICRO_TEXT = 'Micro';
|
|
47
|
+
// Buttons
|
|
48
|
+
{
|
|
49
|
+
const primaryButton = new Button.Button();
|
|
50
|
+
primaryButton.data = {
|
|
51
|
+
variant: Button.Variant.PRIMARY,
|
|
52
|
+
};
|
|
53
|
+
primaryButton.innerText = 'Primary button';
|
|
54
|
+
buttonsSection.appendChild(primaryButton);
|
|
55
|
+
|
|
56
|
+
const tonalButton = new Button.Button();
|
|
57
|
+
tonalButton.data = {
|
|
58
|
+
variant: Button.Variant.TONAL,
|
|
59
|
+
};
|
|
60
|
+
tonalButton.innerText = 'Tonal button';
|
|
61
|
+
buttonsSection.appendChild(tonalButton);
|
|
62
|
+
|
|
63
|
+
const outlinedButton = new Button.Button();
|
|
64
|
+
outlinedButton.data = {
|
|
65
|
+
variant: Button.Variant.OUTLINED,
|
|
66
|
+
};
|
|
67
|
+
outlinedButton.innerText = 'Outlined button';
|
|
68
|
+
buttonsSection.appendChild(outlinedButton);
|
|
69
|
+
|
|
70
|
+
const textButton = new Button.Button();
|
|
71
|
+
textButton.data = {
|
|
72
|
+
variant: Button.Variant.TEXT,
|
|
73
|
+
};
|
|
74
|
+
textButton.innerText = 'Text button';
|
|
75
|
+
buttonsSection.appendChild(textButton);
|
|
76
|
+
|
|
77
|
+
const iconButton = new Button.Button();
|
|
78
|
+
iconButton.data = {
|
|
79
|
+
variant: Button.Variant.ICON,
|
|
80
|
+
iconName: 'gear',
|
|
81
|
+
};
|
|
82
|
+
buttonsSection.appendChild(iconButton);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Primary buttons
|
|
86
|
+
{
|
|
87
|
+
const primaryDefault = new Button.Button();
|
|
88
|
+
primaryDefault.data = {
|
|
89
|
+
variant: Button.Variant.PRIMARY,
|
|
90
|
+
};
|
|
91
|
+
primaryDefault.innerText = DEFAULT_TEXT;
|
|
92
|
+
primarySection.appendChild(primaryDefault);
|
|
93
|
+
|
|
94
|
+
const primaryWithIcon = new Button.Button();
|
|
95
|
+
primaryWithIcon.innerText = WITH_ICON_TEXT;
|
|
96
|
+
primaryWithIcon.data = {
|
|
97
|
+
variant: Button.Variant.PRIMARY,
|
|
98
|
+
iconName: 'plus',
|
|
99
|
+
};
|
|
100
|
+
primarySection.appendChild(primaryWithIcon);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Tonal buttons
|
|
104
|
+
{
|
|
105
|
+
const tonalDefault = new Button.Button();
|
|
106
|
+
tonalDefault.data = {
|
|
107
|
+
variant: Button.Variant.TONAL,
|
|
108
|
+
};
|
|
109
|
+
tonalDefault.innerText = DEFAULT_TEXT;
|
|
110
|
+
tonalSection.appendChild(tonalDefault);
|
|
111
|
+
|
|
112
|
+
const tonalWithIcon = new Button.Button();
|
|
113
|
+
tonalWithIcon.innerText = WITH_ICON_TEXT;
|
|
114
|
+
|
|
115
|
+
tonalWithIcon.data = {
|
|
116
|
+
variant: Button.Variant.PRIMARY,
|
|
117
|
+
iconName: 'plus',
|
|
118
|
+
};
|
|
119
|
+
tonalSection.appendChild(tonalWithIcon);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Outlined buttons
|
|
123
|
+
{
|
|
124
|
+
const outlinedDefault = new Button.Button();
|
|
125
|
+
outlinedDefault.data = {
|
|
126
|
+
variant: Button.Variant.OUTLINED,
|
|
127
|
+
};
|
|
128
|
+
outlinedDefault.innerText = DEFAULT_TEXT;
|
|
129
|
+
outlineSection.appendChild(outlinedDefault);
|
|
130
|
+
|
|
131
|
+
const outlinedWithIcon = new Button.Button();
|
|
132
|
+
outlinedWithIcon.innerText = WITH_ICON_TEXT;
|
|
133
|
+
outlinedWithIcon.data = {
|
|
134
|
+
variant: Button.Variant.OUTLINED,
|
|
135
|
+
iconName: 'plus',
|
|
136
|
+
};
|
|
137
|
+
outlineSection.appendChild(outlinedWithIcon);
|
|
138
|
+
|
|
139
|
+
const outlinedMicro = new Button.Button();
|
|
140
|
+
outlinedMicro.innerText = MICRO_TEXT;
|
|
141
|
+
outlinedMicro.data = {
|
|
142
|
+
variant: Button.Variant.OUTLINED,
|
|
143
|
+
size: Button.Size.MICRO,
|
|
144
|
+
};
|
|
145
|
+
outlineSection.appendChild(outlinedMicro);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Text buttons
|
|
149
|
+
{
|
|
150
|
+
const textDefault = new Button.Button();
|
|
151
|
+
textDefault.innerText = DEFAULT_TEXT;
|
|
152
|
+
textDefault.data = {
|
|
153
|
+
variant: Button.Variant.TEXT,
|
|
154
|
+
};
|
|
155
|
+
textSection.appendChild(textDefault);
|
|
156
|
+
|
|
157
|
+
const textWithIcon = new Button.Button();
|
|
158
|
+
textWithIcon.innerText = WITH_ICON_TEXT;
|
|
159
|
+
|
|
160
|
+
textWithIcon.data = {
|
|
161
|
+
variant: Button.Variant.TEXT,
|
|
162
|
+
iconName: 'plus',
|
|
163
|
+
};
|
|
164
|
+
textSection.appendChild(textWithIcon);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Icon buttons
|
|
168
|
+
{
|
|
169
|
+
const iconDefault = new Button.Button();
|
|
170
|
+
iconDefault.data = {
|
|
171
|
+
variant: Button.Variant.ICON,
|
|
172
|
+
iconName: 'gear',
|
|
173
|
+
};
|
|
174
|
+
iconSection.appendChild(iconDefault);
|
|
175
|
+
|
|
176
|
+
const iconToggle = new Button.Button();
|
|
177
|
+
iconToggle.data = {
|
|
178
|
+
variant: Button.Variant.ICON_TOGGLE,
|
|
179
|
+
iconName: 'gear',
|
|
180
|
+
toggledIconName: 'gear',
|
|
181
|
+
toggled: true,
|
|
182
|
+
toggleType: Button.ToggleType.PRIMARY,
|
|
183
|
+
};
|
|
184
|
+
const toggledWithLabel = document.createElement('span');
|
|
185
|
+
toggledWithLabel.textContent = '(Toggle)';
|
|
186
|
+
iconSection.appendChild(iconToggle);
|
|
187
|
+
iconSection.appendChild(toggledWithLabel);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Floating buttons
|
|
191
|
+
{
|
|
192
|
+
const floatingButton = FloatingButton.create('smart-assistant', 'Ask AI!');
|
|
193
|
+
floatingSection.appendChild(floatingButton);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
5
5
|
|
|
6
|
+
import '../tooltips/tooltips.js';
|
|
6
7
|
import './SettingDeprecationWarning.js';
|
|
8
|
+
import '../../legacy/legacy.js';
|
|
7
9
|
|
|
8
10
|
import type * as Common from '../../../core/common/common.js';
|
|
9
11
|
import * as Host from '../../../core/host/host.js';
|
|
@@ -66,23 +68,56 @@ export class SettingCheckbox extends HTMLElement {
|
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
const learnMore = this.#setting.learnMore();
|
|
69
|
-
if (learnMore
|
|
70
|
-
const
|
|
71
|
+
if (learnMore) {
|
|
72
|
+
const jsLogContext = `${this.#setting.name}-documentation`;
|
|
71
73
|
const data: Buttons.Button.ButtonData = {
|
|
72
|
-
iconName: '
|
|
74
|
+
iconName: 'info',
|
|
73
75
|
variant: Buttons.Button.Variant.ICON,
|
|
74
76
|
size: Buttons.Button.Size.SMALL,
|
|
75
|
-
jslogContext:
|
|
76
|
-
title: i18nString(UIStrings.learnMore),
|
|
77
|
-
};
|
|
78
|
-
const handleClick = (event: MouseEvent): void => {
|
|
79
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(url);
|
|
80
|
-
event.consume();
|
|
77
|
+
jslogContext: jsLogContext,
|
|
81
78
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
|
|
80
|
+
const url = learnMore.url;
|
|
81
|
+
if (learnMore.tooltip) {
|
|
82
|
+
const id = `${this.#setting.name}-information`;
|
|
83
|
+
// clang-format off
|
|
84
|
+
return html`
|
|
85
|
+
<devtools-button
|
|
86
|
+
class="info-icon"
|
|
87
|
+
aria-details=${id}
|
|
88
|
+
.data=${data}
|
|
89
|
+
></devtools-button>
|
|
90
|
+
<devtools-tooltip id=${id} variant="rich">
|
|
91
|
+
<span>${learnMore.tooltip()}</span><br />
|
|
92
|
+
${url
|
|
93
|
+
? html`<x-link
|
|
94
|
+
href=${url}
|
|
95
|
+
class="link"
|
|
96
|
+
jslog=${VisualLogging.link(jsLogContext).track({
|
|
97
|
+
click: true,
|
|
98
|
+
})}
|
|
99
|
+
>${i18nString(UIStrings.learnMore)}</x-link
|
|
100
|
+
>`
|
|
101
|
+
: Lit.nothing}
|
|
102
|
+
</devtools-tooltip>
|
|
103
|
+
`;
|
|
104
|
+
// clang-format on
|
|
105
|
+
}
|
|
106
|
+
if (url) {
|
|
107
|
+
const handleClick = (event: MouseEvent): void => {
|
|
108
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(url);
|
|
109
|
+
event.consume();
|
|
110
|
+
};
|
|
111
|
+
data.iconName = 'help';
|
|
112
|
+
data.title = i18nString(UIStrings.learnMore);
|
|
113
|
+
// clang-format off
|
|
114
|
+
return html`<devtools-button
|
|
115
|
+
class="info-icon"
|
|
116
|
+
@click=${handleClick}
|
|
117
|
+
.data=${data}
|
|
118
|
+
></devtools-button>`;
|
|
119
|
+
// clang-format on
|
|
120
|
+
}
|
|
86
121
|
}
|
|
87
122
|
|
|
88
123
|
return undefined;
|
|
@@ -102,7 +137,7 @@ export class SettingCheckbox extends HTMLElement {
|
|
|
102
137
|
}
|
|
103
138
|
|
|
104
139
|
const icon = this.icon();
|
|
105
|
-
const title = `${this.#setting.learnMore() ? this.#setting.learnMore()?.tooltip() : ''}`;
|
|
140
|
+
const title = `${this.#setting.learnMore() ? this.#setting.learnMore()?.tooltip?.() : ''}`;
|
|
106
141
|
const disabledReasons = this.#setting.disabledReasons();
|
|
107
142
|
const reason = disabledReasons.length ?
|
|
108
143
|
html`
|
|
@@ -35,7 +35,7 @@ p {
|
|
|
35
35
|
height: var(--sys-size-9);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
38
|
+
.info-icon {
|
|
39
39
|
cursor: pointer;
|
|
40
40
|
position: relative;
|
|
41
41
|
margin-left: var(--sys-size-2);
|
|
@@ -43,3 +43,8 @@ p {
|
|
|
43
43
|
width: var(--sys-size-9);
|
|
44
44
|
height: var(--sys-size-9);
|
|
45
45
|
}
|
|
46
|
+
|
|
47
|
+
.link {
|
|
48
|
+
color: var(--text-link);
|
|
49
|
+
text-decoration: underline;
|
|
50
|
+
}
|