chrome-devtools-frontend 1.0.1536371 → 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/host/AidaClient.ts +64 -5
- package/front_end/core/host/DispatchHttpRequestClient.ts +62 -0
- package/front_end/core/host/GdpClient.ts +8 -57
- package/front_end/core/host/host.ts +2 -0
- package/front_end/core/protocol_client/CDPConnection.ts +10 -8
- package/front_end/core/protocol_client/InspectorBackend.ts +36 -42
- package/front_end/core/sdk/EnhancedTracesParser.ts +20 -5
- package/front_end/core/sdk/RehydratingConnection.ts +112 -4
- package/front_end/core/sdk/RehydratingObject.ts +8 -0
- package/front_end/core/sdk/TraceObject.ts +5 -1
- 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/javascript_metadata/NativeFunctions.js +1 -1
- package/front_end/models/trace/types/File.ts +9 -0
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -9
- package/front_end/panels/ai_assistance/components/ChatView.ts +58 -70
- package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -6
- package/front_end/panels/application/StorageView.ts +3 -2
- package/front_end/panels/application/components/BackForwardCacheView.ts +96 -108
- package/front_end/panels/application/components/FrameDetailsView.ts +8 -11
- package/front_end/panels/application/components/OriginTrialTreeView.ts +136 -137
- package/front_end/panels/application/components/backForwardCacheView.css +8 -0
- package/front_end/panels/application/components/badge.css +9 -1
- 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/browser_debugger/CategorizedBreakpointsSidebarPane.ts +44 -53
- 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/recorder/RecorderController.ts +1 -2
- package/front_end/panels/recorder/components/CreateRecordingView.ts +153 -129
- package/front_end/panels/sensors/SensorsView.ts +4 -3
- package/front_end/panels/settings/AISettingsTab.ts +162 -171
- 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 +5 -8
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +1 -1
- package/front_end/panels/settings/aiSettingsTab.css +151 -148
- package/front_end/panels/settings/settings-meta.ts +1 -2
- package/front_end/panels/sources/AddSourceMapURLDialog.ts +23 -26
- 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 +64 -14
- package/front_end/panels/timeline/TimelineUIUtils.ts +4 -20
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +33 -34
- 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 +2 -2
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +9 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +13 -1
- 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/BrowserContext.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +2 -2
- 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 -1
- 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/bidi/core/Realm.d.ts +1 -12
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +2 -2
- 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 +6 -1
- 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/BrowserContext.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +2 -2
- 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 +3 -1
- 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/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +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/disposable.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.js.map +1 -1
- 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 +28 -3
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +21 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +9 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +13 -1
- 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/BrowserContext.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +2 -2
- 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 -1
- 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/bidi/core/Realm.d.ts +1 -12
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +2 -2
- 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 +6 -1
- 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/BrowserContext.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +2 -2
- 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 +3 -1
- 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/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.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 +28 -3
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +13 -1
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +7 -2
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +14 -1
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +8 -5
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +5 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +8 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +11 -2
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +3 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +5 -5
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/disposable.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/util.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/util/version.ts +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/text_editor/AiCodeCompletionProvider.ts +280 -0
- package/front_end/ui/components/text_editor/text_editor.ts +1 -0
- package/front_end/ui/components/tooltips/Tooltip.docs.ts +76 -0
- package/front_end/ui/components/tooltips/Tooltip.ts +1 -1
- package/front_end/ui/legacy/Dialog.ts +0 -1
- 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/XLink.ts +0 -3
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +9 -0
- 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/components/utils/Linkifier.ts +9 -3
- package/front_end/ui/legacy/legacy.ts +0 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +4 -1
- package/mcp/mcp.ts +5 -0
- package/package.json +1 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatterBounds.snapshot.txt +0 -4
- 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/breadcrumbs_perf/initial-breadcrumb-perf.html +0 -20
- package/front_end/ui/components/docs/breadcrumbs_perf/initial-breadcrumb-perf.ts +0 -25
- package/front_end/ui/components/docs/breadcrumbs_perf/nested-breadcrumbs-perf.html +0 -20
- package/front_end/ui/components/docs/breadcrumbs_perf/nested-breadcrumbs-perf.ts +0 -36
- 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 -254
|
@@ -129,7 +129,7 @@ export class CSSOverviewSidebarPanel extends UI.Widget.VBox {
|
|
|
129
129
|
this.requestUpdate();
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
#select(id: string, shouldFocus = false): Promise<
|
|
132
|
+
#select(id: string, shouldFocus = false): Promise<void> {
|
|
133
133
|
this.#selectedId = id;
|
|
134
134
|
this.requestUpdate();
|
|
135
135
|
this.#onItemSelected(id, shouldFocus);
|
|
@@ -17,7 +17,7 @@ import {DeveloperResourcesListView} from './DeveloperResourcesListView.js';
|
|
|
17
17
|
import developerResourcesViewStyles from './developerResourcesView.css.js';
|
|
18
18
|
|
|
19
19
|
const {widgetConfig} = UI.Widget;
|
|
20
|
-
const {bindToSetting} = UI.
|
|
20
|
+
const {bindToSetting} = UI.UIUtils;
|
|
21
21
|
|
|
22
22
|
const UIStrings = {
|
|
23
23
|
/**
|
|
@@ -12,7 +12,7 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
|
12
12
|
import {ElementsPanel} from './ElementsPanel.js';
|
|
13
13
|
import elementStatePaneWidgetStyles from './elementStatePaneWidget.css.js';
|
|
14
14
|
|
|
15
|
-
const {bindToSetting} = UI.
|
|
15
|
+
const {bindToSetting} = UI.UIUtils;
|
|
16
16
|
|
|
17
17
|
const UIStrings = {
|
|
18
18
|
/**
|
|
@@ -39,8 +39,7 @@ import {html, render} from '../../ui/lit/lit.js';
|
|
|
39
39
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
40
40
|
import * as EventListeners from '../event_listeners/event_listeners.js';
|
|
41
41
|
|
|
42
|
-
const {bindToSetting} = UI.
|
|
43
|
-
const {bindToAction} = UI.UIUtils;
|
|
42
|
+
const {bindToAction, bindToSetting} = UI.UIUtils;
|
|
44
43
|
|
|
45
44
|
const UIStrings = {
|
|
46
45
|
/**
|
|
@@ -8,6 +8,7 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
8
8
|
import * as Platform from '../../core/platform/platform.js';
|
|
9
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
10
10
|
import * as Protocol from '../../generated/protocol.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';
|
|
@@ -208,7 +209,7 @@ export class NetworkConfigView extends UI.Widget.VBox {
|
|
|
208
209
|
|
|
209
210
|
private createCacheSection(): void {
|
|
210
211
|
const section = this.createSection(i18nString(UIStrings.caching), 'network-config-disable-cache');
|
|
211
|
-
section.appendChild(
|
|
212
|
+
section.appendChild(SettingsUI.SettingsUI.createSettingCheckbox(
|
|
212
213
|
i18nString(UIStrings.disableCache), Common.Settings.Settings.instance().moduleSetting('cache-disabled')));
|
|
213
214
|
}
|
|
214
215
|
|
|
@@ -48,6 +48,7 @@ import type * as PanelCommon from '../../panels/common/common.js';
|
|
|
48
48
|
import * as NetworkForward from '../../panels/network/forward/forward.js';
|
|
49
49
|
import * as Tracing from '../../services/tracing/tracing.js';
|
|
50
50
|
import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
|
|
51
|
+
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
51
52
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
52
53
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
53
54
|
import * as MobileThrottling from '../mobile_throttling/mobile_throttling.js';
|
|
@@ -259,17 +260,17 @@ export class NetworkPanel extends UI.Panel.Panel implements
|
|
|
259
260
|
|
|
260
261
|
const settingsPane = panel.contentElement.createChild('div', 'network-settings-pane');
|
|
261
262
|
settingsPane.append(
|
|
262
|
-
|
|
263
|
+
SettingsUI.SettingsUI.createSettingCheckbox(
|
|
263
264
|
i18nString(UIStrings.useLargeRequestRows), this.networkLogLargeRowsSetting,
|
|
264
265
|
i18nString(UIStrings.showMoreInformationInRequestRows)),
|
|
265
|
-
|
|
266
|
+
SettingsUI.SettingsUI.createSettingCheckbox(
|
|
266
267
|
i18nString(UIStrings.groupByFrame),
|
|
267
268
|
Common.Settings.Settings.instance().moduleSetting('network.group-by-frame'),
|
|
268
269
|
i18nString(UIStrings.groupRequestsByTopLevelRequest)),
|
|
269
|
-
|
|
270
|
+
SettingsUI.SettingsUI.createSettingCheckbox(
|
|
270
271
|
i18nString(UIStrings.showOverview), this.networkLogShowOverviewSetting,
|
|
271
272
|
i18nString(UIStrings.showOverviewOfNetworkRequests)),
|
|
272
|
-
|
|
273
|
+
SettingsUI.SettingsUI.createSettingCheckbox(
|
|
273
274
|
i18nString(UIStrings.captureScreenshots), this.networkRecordFilmStripSetting,
|
|
274
275
|
i18nString(UIStrings.captureScreenshotsWhenLoadingA)),
|
|
275
276
|
|
|
@@ -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;
|
|
@@ -1072,7 +1072,7 @@ export class RecorderController extends LitElement {
|
|
|
1072
1072
|
} else if (this.currentPage === Pages.CREATE_RECORDING_PAGE) {
|
|
1073
1073
|
if (this.#createRecordingView) {
|
|
1074
1074
|
this.#shortcutHelper.handleShortcut(() => {
|
|
1075
|
-
this.#createRecordingView?.
|
|
1075
|
+
this.#createRecordingView?.startRecording();
|
|
1076
1076
|
});
|
|
1077
1077
|
}
|
|
1078
1078
|
} else if (this.isRecording) {
|
|
@@ -1242,7 +1242,6 @@ export class RecorderController extends LitElement {
|
|
|
1242
1242
|
class="recording-view"
|
|
1243
1243
|
.widgetConfig=${UI.Widget.widgetConfig(Components.CreateRecordingView.CreateRecordingView, {
|
|
1244
1244
|
recorderSettings: this.#recorderSettings,
|
|
1245
|
-
defaultRecordingName: this.#recorderSettings.defaultTitle,
|
|
1246
1245
|
onRecordingStarted: this.#onRecordingStarted.bind(this),
|
|
1247
1246
|
onRecordingCancelled: this.onRecordingCancelled.bind(this),
|
|
1248
1247
|
})}
|
|
@@ -17,7 +17,7 @@ import * as Actions from '../recorder-actions/recorder-actions.js';
|
|
|
17
17
|
|
|
18
18
|
import createRecordingViewStyles from './createRecordingView.css.js';
|
|
19
19
|
|
|
20
|
-
const {html, Directives: {
|
|
20
|
+
const {html, Directives: {ref, createRef, repeat}} = Lit;
|
|
21
21
|
|
|
22
22
|
const UIStrings = {
|
|
23
23
|
/**
|
|
@@ -103,91 +103,74 @@ const str_ = i18n.i18n.registerUIStrings(
|
|
|
103
103
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
104
104
|
|
|
105
105
|
export interface ViewInput {
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
name: string;
|
|
107
|
+
selectorAttribute: string;
|
|
108
|
+
selectorTypes: Array<{
|
|
109
|
+
selectorType: Models.Schema.SelectorType,
|
|
110
|
+
checked: boolean,
|
|
111
|
+
}>;
|
|
108
112
|
error?: Error;
|
|
109
|
-
|
|
113
|
+
onRecordingStarted: () => void;
|
|
110
114
|
onRecordingCancelled: () => void;
|
|
111
|
-
|
|
115
|
+
onErrorReset: () => void;
|
|
116
|
+
onUpdate: (update: {
|
|
117
|
+
selectorType: Models.Schema.SelectorType,
|
|
118
|
+
checked: boolean,
|
|
119
|
+
}|{
|
|
120
|
+
name: string,
|
|
121
|
+
}|{
|
|
122
|
+
selectorAttribute: string,
|
|
123
|
+
}) => void;
|
|
112
124
|
}
|
|
113
125
|
|
|
114
126
|
export interface ViewOutput {
|
|
115
127
|
focusInput?: () => void;
|
|
116
|
-
triggerFormSubmission?: () => void;
|
|
117
128
|
}
|
|
118
129
|
|
|
119
130
|
export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLElement): void => {
|
|
120
|
-
const {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
],
|
|
131
|
-
[
|
|
132
|
-
Models.Schema.SelectorType.Pierce,
|
|
133
|
-
i18nString(UIStrings.selectorTypePierce),
|
|
134
|
-
],
|
|
135
|
-
]);
|
|
136
|
-
function getSelectorTypes(): Models.Schema.SelectorType[] {
|
|
137
|
-
const selectorTypeElements = target.querySelectorAll(
|
|
138
|
-
'.selector-type input[type=checkbox]',
|
|
139
|
-
);
|
|
140
|
-
const selectorTypesToRecord: Models.Schema.SelectorType[] = [];
|
|
141
|
-
for (const selectorType of selectorTypeElements) {
|
|
142
|
-
const checkbox = selectorType as HTMLInputElement;
|
|
143
|
-
const checkboxValue = checkbox.value as Models.Schema.SelectorType;
|
|
144
|
-
if (checkbox.checked) {
|
|
145
|
-
selectorTypesToRecord.push(checkboxValue);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return selectorTypesToRecord;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
const selectorAttributeInputRef = createRef<HTMLInputElement>();
|
|
152
|
-
|
|
153
|
-
function getSelectorAttribute(): string|undefined {
|
|
154
|
-
const selectorAttribute = selectorAttributeInputRef.value?.value.trim();
|
|
155
|
-
if (!selectorAttribute) {
|
|
156
|
-
return undefined;
|
|
157
|
-
}
|
|
158
|
-
return selectorAttribute;
|
|
159
|
-
}
|
|
131
|
+
const {
|
|
132
|
+
name,
|
|
133
|
+
selectorAttribute,
|
|
134
|
+
selectorTypes,
|
|
135
|
+
error,
|
|
136
|
+
onUpdate,
|
|
137
|
+
onRecordingStarted,
|
|
138
|
+
onRecordingCancelled,
|
|
139
|
+
onErrorReset
|
|
140
|
+
} = input;
|
|
160
141
|
|
|
161
142
|
const nameInputRef = createRef<HTMLInputElement>();
|
|
162
143
|
|
|
163
|
-
function handleStartRecording(): void {
|
|
164
|
-
startRecording(nameInputRef.value?.value ?? '', getSelectorTypes(), getSelectorAttribute());
|
|
165
|
-
}
|
|
166
|
-
|
|
167
144
|
const onKeyDown = (event: KeyboardEvent): void => {
|
|
168
145
|
if (error) {
|
|
169
|
-
|
|
146
|
+
onErrorReset();
|
|
170
147
|
}
|
|
171
148
|
|
|
172
149
|
const keyboardEvent = event;
|
|
173
150
|
if (keyboardEvent.key === 'Enter') {
|
|
174
|
-
|
|
151
|
+
onRecordingStarted();
|
|
175
152
|
event.stopPropagation();
|
|
176
153
|
event.preventDefault();
|
|
177
154
|
}
|
|
178
155
|
};
|
|
179
156
|
|
|
180
|
-
const onInputFocus = (): void => {
|
|
181
|
-
nameInputRef.value?.select();
|
|
182
|
-
};
|
|
183
|
-
|
|
184
157
|
output.focusInput = () => {
|
|
185
158
|
nameInputRef.value?.focus();
|
|
186
159
|
};
|
|
187
160
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
161
|
+
const selectorTypeToLabel = new Map([
|
|
162
|
+
[Models.Schema.SelectorType.ARIA, i18nString(UIStrings.selectorTypeARIA)],
|
|
163
|
+
[Models.Schema.SelectorType.CSS, i18nString(UIStrings.selectorTypeCSS)],
|
|
164
|
+
[Models.Schema.SelectorType.Text, i18nString(UIStrings.selectorTypeText)],
|
|
165
|
+
[
|
|
166
|
+
Models.Schema.SelectorType.XPath,
|
|
167
|
+
i18nString(UIStrings.selectorTypeXPath),
|
|
168
|
+
],
|
|
169
|
+
[
|
|
170
|
+
Models.Schema.SelectorType.Pierce,
|
|
171
|
+
i18nString(UIStrings.selectorTypePierce),
|
|
172
|
+
],
|
|
173
|
+
]);
|
|
191
174
|
|
|
192
175
|
// clang-format off
|
|
193
176
|
Lit.render(
|
|
@@ -215,13 +198,16 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
215
198
|
UIStrings.recordingName,
|
|
216
199
|
)}</label>
|
|
217
200
|
<input
|
|
218
|
-
value=${
|
|
219
|
-
@focus=${
|
|
201
|
+
value=${name}
|
|
202
|
+
@focus=${() => nameInputRef.value?.select()}
|
|
220
203
|
@keydown=${onKeyDown}
|
|
221
204
|
jslog=${VisualLogging.textField('user-flow-name').track({change: true})}
|
|
222
205
|
class="devtools-text-input"
|
|
223
206
|
id="user-flow-name"
|
|
224
207
|
${ref(nameInputRef)}
|
|
208
|
+
@input=${(e:Event) => onUpdate({
|
|
209
|
+
name: (e.target as HTMLInputElement).value.trim()
|
|
210
|
+
})}
|
|
225
211
|
/>
|
|
226
212
|
<label class="row-label" for="selector-attribute">
|
|
227
213
|
<span>${i18nString(UIStrings.selectorAttribute)}</span>
|
|
@@ -234,13 +220,15 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
234
220
|
</x-link>
|
|
235
221
|
</label>
|
|
236
222
|
<input
|
|
237
|
-
value=${
|
|
223
|
+
value=${selectorAttribute}
|
|
238
224
|
placeholder="data-testid"
|
|
239
225
|
@keydown=${onKeyDown}
|
|
240
226
|
jslog=${VisualLogging.textField('selector-attribute').track({change: true})}
|
|
241
227
|
class="devtools-text-input"
|
|
242
228
|
id="selector-attribute"
|
|
243
|
-
|
|
229
|
+
@input=${(e:Event) => onUpdate({
|
|
230
|
+
selectorAttribute: (e.target as HTMLInputElement).value.trim()
|
|
231
|
+
})}
|
|
244
232
|
/>
|
|
245
233
|
<label class="row-label">
|
|
246
234
|
<span>${i18nString(UIStrings.selectorTypes)}</span>
|
|
@@ -253,37 +241,34 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
253
241
|
</x-link>
|
|
254
242
|
</label>
|
|
255
243
|
<div class="checkbox-container">
|
|
256
|
-
${
|
|
257
|
-
const checked =
|
|
258
|
-
recorderSettings?.getSelectorByType(selectorType);
|
|
244
|
+
${repeat(selectorTypes, item => {
|
|
259
245
|
return html`
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
246
|
+
<label class="checkbox-label selector-type">
|
|
247
|
+
<input
|
|
248
|
+
@keydown=${onKeyDown}
|
|
249
|
+
.value=${item.selectorType}
|
|
250
|
+
jslog=${VisualLogging.toggle().track({click: true}).context(`selector-${item.selectorType}`)}
|
|
251
|
+
?checked=${item.checked}
|
|
252
|
+
type="checkbox"
|
|
253
|
+
@change=${(e:Event) => onUpdate({
|
|
254
|
+
selectorType: item.selectorType,
|
|
255
|
+
checked: (e.target as HTMLInputElement).checked
|
|
256
|
+
})}
|
|
257
|
+
/>
|
|
258
|
+
${selectorTypeToLabel.get(item.selectorType) || item.selectorType}
|
|
259
|
+
</label>
|
|
260
|
+
`;
|
|
271
261
|
})}
|
|
272
262
|
</div>
|
|
273
|
-
|
|
274
263
|
${
|
|
275
264
|
error &&
|
|
276
|
-
html`
|
|
277
|
-
<div class="error" role="alert">
|
|
278
|
-
${error.message}
|
|
279
|
-
</div>
|
|
280
|
-
`
|
|
265
|
+
html` <div class="error" role="alert"> ${error.message} </div>`
|
|
281
266
|
}
|
|
282
267
|
</div>
|
|
283
268
|
<div class="footer">
|
|
284
269
|
<div class="controls">
|
|
285
270
|
<devtools-control-button
|
|
286
|
-
@click=${
|
|
271
|
+
@click=${onRecordingStarted}
|
|
287
272
|
.label=${i18nString(UIStrings.startRecording)}
|
|
288
273
|
.shape=${'circle'}
|
|
289
274
|
jslog=${VisualLogging.action(Actions.RecorderActions.START_RECORDING).track({click: true})}
|
|
@@ -302,15 +287,33 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
302
287
|
|
|
303
288
|
export class CreateRecordingView extends UI.Widget.Widget {
|
|
304
289
|
#error?: Error;
|
|
290
|
+
#name = '';
|
|
291
|
+
#selectorAttribute = '';
|
|
292
|
+
#selectorTypes: Array<{
|
|
293
|
+
selectorType: Models.Schema.SelectorType,
|
|
294
|
+
checked: boolean,
|
|
295
|
+
}> = [];
|
|
305
296
|
#view: typeof DEFAULT_VIEW;
|
|
306
297
|
#output: ViewOutput = {};
|
|
298
|
+
#recorderSettings?: Models.RecorderSettings.RecorderSettings;
|
|
307
299
|
|
|
308
300
|
onRecordingStarted:
|
|
309
301
|
(data: {name: string, selectorTypesToRecord: Models.Schema.SelectorType[], selectorAttribute?: string}) => void =
|
|
310
302
|
() => {};
|
|
311
303
|
onRecordingCancelled = (): void => {};
|
|
312
|
-
|
|
313
|
-
|
|
304
|
+
|
|
305
|
+
set recorderSettings(value: Models.RecorderSettings.RecorderSettings) {
|
|
306
|
+
this.#recorderSettings = value;
|
|
307
|
+
this.#name = this.#recorderSettings.defaultTitle;
|
|
308
|
+
this.#selectorAttribute = this.#recorderSettings.selectorAttribute;
|
|
309
|
+
this.#selectorTypes = Object.values(Models.Schema.SelectorType).map(selectorType => {
|
|
310
|
+
return {
|
|
311
|
+
selectorType,
|
|
312
|
+
checked: this.#recorderSettings?.getSelectorByType(selectorType) ?? true,
|
|
313
|
+
};
|
|
314
|
+
}),
|
|
315
|
+
this.requestUpdate();
|
|
316
|
+
}
|
|
314
317
|
|
|
315
318
|
constructor(element?: HTMLElement, view?: typeof DEFAULT_VIEW) {
|
|
316
319
|
super(element, {useShadowDom: true});
|
|
@@ -323,57 +326,78 @@ export class CreateRecordingView extends UI.Widget.Widget {
|
|
|
323
326
|
void this.updateComplete.then(() => this.#output.focusInput?.());
|
|
324
327
|
}
|
|
325
328
|
|
|
326
|
-
|
|
327
|
-
this.#
|
|
329
|
+
startRecording(): void {
|
|
330
|
+
if (!this.#recorderSettings) {
|
|
331
|
+
throw new Error('settings not set');
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
if (!this.#name.trim()) {
|
|
335
|
+
this.#error = new Error(i18nString(UIStrings.recordingNameIsRequired));
|
|
336
|
+
this.requestUpdate();
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
const selectorTypesToRecord = this.#selectorTypes.filter(item => item.checked).map(item => item.selectorType);
|
|
341
|
+
|
|
342
|
+
if (!selectorTypesToRecord.includes(Models.Schema.SelectorType.CSS) &&
|
|
343
|
+
!selectorTypesToRecord.includes(Models.Schema.SelectorType.XPath) &&
|
|
344
|
+
!selectorTypesToRecord.includes(Models.Schema.SelectorType.Pierce)) {
|
|
345
|
+
this.#error = new Error(i18nString(UIStrings.includeNecessarySelectors));
|
|
346
|
+
this.requestUpdate();
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
for (const selectorType of Object.values(Models.Schema.SelectorType)) {
|
|
351
|
+
this.#recorderSettings.setSelectorByType(
|
|
352
|
+
selectorType,
|
|
353
|
+
selectorTypesToRecord.includes(selectorType),
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
const selectorAttribute = this.#selectorAttribute.trim();
|
|
358
|
+
if (selectorAttribute) {
|
|
359
|
+
this.#recorderSettings.selectorAttribute = selectorAttribute;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
this.onRecordingStarted({
|
|
363
|
+
name: this.#name,
|
|
364
|
+
selectorTypesToRecord,
|
|
365
|
+
selectorAttribute: this.#selectorAttribute ? this.#selectorAttribute : undefined,
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
Badges.UserBadges.instance().recordAction(Badges.BadgeAction.RECORDER_RECORDING_STARTED);
|
|
328
369
|
}
|
|
329
370
|
|
|
330
371
|
override performUpdate(): void {
|
|
331
372
|
this.#view(
|
|
332
373
|
{
|
|
333
|
-
|
|
334
|
-
|
|
374
|
+
name: this.#name,
|
|
375
|
+
selectorAttribute: this.#selectorAttribute,
|
|
376
|
+
selectorTypes: this.#selectorTypes,
|
|
335
377
|
error: this.#error,
|
|
336
378
|
onRecordingCancelled: this.onRecordingCancelled,
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
if (!selectorTypesToRecord.includes(Models.Schema.SelectorType.CSS) &&
|
|
350
|
-
!selectorTypesToRecord.includes(Models.Schema.SelectorType.XPath) &&
|
|
351
|
-
!selectorTypesToRecord.includes(Models.Schema.SelectorType.Pierce)) {
|
|
352
|
-
this.#error = new Error(i18nString(UIStrings.includeNecessarySelectors));
|
|
353
|
-
this.requestUpdate();
|
|
354
|
-
return;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
for (const selectorType of Object.values(Models.Schema.SelectorType)) {
|
|
358
|
-
this.recorderSettings.setSelectorByType(
|
|
359
|
-
selectorType,
|
|
360
|
-
selectorTypesToRecord.includes(selectorType),
|
|
361
|
-
);
|
|
379
|
+
onUpdate: update => {
|
|
380
|
+
if ('name' in update) {
|
|
381
|
+
this.#name = update.name;
|
|
382
|
+
} else if ('selectorAttribute' in update) {
|
|
383
|
+
this.#selectorAttribute = update.selectorAttribute;
|
|
384
|
+
} else {
|
|
385
|
+
this.#selectorTypes = this.#selectorTypes.map(item => {
|
|
386
|
+
if (item.selectorType === update.selectorType) {
|
|
387
|
+
return {
|
|
388
|
+
...item,
|
|
389
|
+
checked: update.checked,
|
|
390
|
+
};
|
|
362
391
|
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
});
|
|
373
|
-
|
|
374
|
-
Badges.UserBadges.instance().recordAction(Badges.BadgeAction.RECORDER_RECORDING_STARTED);
|
|
375
|
-
},
|
|
376
|
-
resetError: () => {
|
|
392
|
+
return item;
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
this.requestUpdate();
|
|
396
|
+
},
|
|
397
|
+
onRecordingStarted: (): void => {
|
|
398
|
+
this.startRecording();
|
|
399
|
+
},
|
|
400
|
+
onErrorReset: () => {
|
|
377
401
|
this.#error = undefined;
|
|
378
402
|
this.requestUpdate();
|
|
379
403
|
},
|
|
@@ -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
|
|