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
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
6
6
|
|
|
7
7
|
import '../../../ui/components/icon_button/icon_button.js';
|
|
8
|
-
import '../../../ui/
|
|
8
|
+
import '../../../ui/legacy/legacy.js';
|
|
9
9
|
|
|
10
10
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
11
11
|
import * as Protocol from '../../../generated/protocol.js';
|
|
12
12
|
import * as Adorners from '../../../ui/components/adorners/adorners.js';
|
|
13
13
|
import type * as TreeOutline from '../../../ui/components/tree_outline/tree_outline.js';
|
|
14
|
+
import * as UI from '../../../ui/legacy/legacy.js';
|
|
14
15
|
import * as Lit from '../../../ui/lit/lit.js';
|
|
15
16
|
|
|
16
17
|
import badgeStyles from './badge.css.js';
|
|
@@ -77,36 +78,24 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
77
78
|
export interface BadgeData {
|
|
78
79
|
badgeContent: string;
|
|
79
80
|
style: 'error'|'success'|'secondary';
|
|
81
|
+
additionalClass?: string;
|
|
80
82
|
}
|
|
81
83
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
this.#adorner.data = {
|
|
94
|
-
name: 'badge',
|
|
95
|
-
content: adornerContent,
|
|
96
|
-
};
|
|
97
|
-
this.#adorner.classList.add(`badge-${data.style}`);
|
|
98
|
-
|
|
99
|
-
Lit.render(
|
|
100
|
-
html`
|
|
101
|
-
<style>${badgeStyles}</style>
|
|
102
|
-
${this.#adorner}
|
|
103
|
-
`,
|
|
104
|
-
this.#shadow, {host: this});
|
|
84
|
+
function createBadge(data: BadgeData): Adorners.Adorner.Adorner {
|
|
85
|
+
const adorner = new Adorners.Adorner.Adorner();
|
|
86
|
+
const adornerContent = document.createElement('span');
|
|
87
|
+
adornerContent.textContent = data.badgeContent;
|
|
88
|
+
adorner.data = {
|
|
89
|
+
name: 'badge',
|
|
90
|
+
content: adornerContent,
|
|
91
|
+
};
|
|
92
|
+
adorner.classList.add(`badge-${data.style}`);
|
|
93
|
+
if (data.additionalClass) {
|
|
94
|
+
adorner.classList.add(data.additionalClass);
|
|
105
95
|
}
|
|
96
|
+
return adorner;
|
|
106
97
|
}
|
|
107
98
|
|
|
108
|
-
customElements.define('devtools-resources-origin-trial-tree-view-badge', Badge);
|
|
109
|
-
|
|
110
99
|
type TreeNode<DataType> = TreeOutline.TreeOutlineUtils.TreeNode<DataType>;
|
|
111
100
|
|
|
112
101
|
/**
|
|
@@ -118,51 +107,46 @@ type TreeNode<DataType> = TreeOutline.TreeOutlineUtils.TreeNode<DataType>;
|
|
|
118
107
|
**/
|
|
119
108
|
export type OriginTrialTreeNodeData = Protocol.Page.OriginTrial|Protocol.Page.OriginTrialTokenWithStatus|string;
|
|
120
109
|
|
|
121
|
-
function constructOriginTrialTree(originTrial: Protocol.Page.OriginTrial):
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
originTrial.tokensWithStatus.map(constructTokenNode) :
|
|
127
|
-
constructTokenDetailsNodes(originTrial.tokensWithStatus[0]),
|
|
128
|
-
renderer: (node: TreeNode<OriginTrialTreeNodeData>) => {
|
|
129
|
-
const trial = node.treeNodeData as Protocol.Page.OriginTrial;
|
|
130
|
-
const tokenCountBadge = html`
|
|
131
|
-
<devtools-resources-origin-trial-tree-view-badge .data=${{
|
|
132
|
-
badgeContent: i18nString(UIStrings.tokens, {PH1: trial.tokensWithStatus.length}),
|
|
133
|
-
style: 'secondary',
|
|
134
|
-
} as BadgeData}></devtools-resources-origin-trial-tree-view-badge>
|
|
135
|
-
`;
|
|
110
|
+
function constructOriginTrialTree(originTrial: Protocol.Page.OriginTrial): Lit.LitTemplate {
|
|
111
|
+
const tokenCountBadge = createBadge({
|
|
112
|
+
badgeContent: i18nString(UIStrings.tokens, {PH1: originTrial.tokensWithStatus.length}),
|
|
113
|
+
style: 'secondary',
|
|
114
|
+
});
|
|
136
115
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
116
|
+
// clang-format off
|
|
117
|
+
return html`
|
|
118
|
+
<li role="treeitem">
|
|
119
|
+
${originTrial.trialName}
|
|
120
|
+
<style>${badgeStyles}</style>
|
|
121
|
+
${createBadge({
|
|
122
|
+
badgeContent: originTrial.status,
|
|
123
|
+
style: originTrial.status === Protocol.Page.OriginTrialStatus.Enabled ? 'success' : 'error',
|
|
124
|
+
})}
|
|
125
|
+
${originTrial.tokensWithStatus.length > 1 ? tokenCountBadge : Lit.nothing}
|
|
126
|
+
<ul role="group" hidden>
|
|
127
|
+
${originTrial.tokensWithStatus.length > 1 ?
|
|
128
|
+
originTrial.tokensWithStatus.map(constructTokenNode) :
|
|
129
|
+
constructTokenDetailsNodes(originTrial.tokensWithStatus[0])}
|
|
130
|
+
</ul>
|
|
131
|
+
</li>`;
|
|
132
|
+
// clang-format on
|
|
147
133
|
}
|
|
148
134
|
|
|
149
|
-
function constructTokenNode(token: Protocol.Page.OriginTrialTokenWithStatus):
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
},
|
|
165
|
-
};
|
|
135
|
+
function constructTokenNode(token: Protocol.Page.OriginTrialTokenWithStatus): Lit.LitTemplate {
|
|
136
|
+
const statusBadge = createBadge({
|
|
137
|
+
badgeContent: token.status,
|
|
138
|
+
style: token.status === Protocol.Page.OriginTrialTokenStatus.Success ? 'success' : 'error',
|
|
139
|
+
additionalClass: 'token-status-badge',
|
|
140
|
+
});
|
|
141
|
+
// Only display token status for convenience when the node is not expanded.
|
|
142
|
+
// clang-format off
|
|
143
|
+
return html`
|
|
144
|
+
<li role="treeitem">
|
|
145
|
+
${i18nString(UIStrings.token)} ${statusBadge}
|
|
146
|
+
<ul role="group" hidden>
|
|
147
|
+
${constructTokenDetailsNodes(token)}
|
|
148
|
+
</ul>
|
|
149
|
+
</li>`;
|
|
166
150
|
}
|
|
167
151
|
|
|
168
152
|
interface TokenField {
|
|
@@ -170,46 +154,38 @@ interface TokenField {
|
|
|
170
154
|
value: Lit.TemplateResult;
|
|
171
155
|
}
|
|
172
156
|
|
|
173
|
-
function renderTokenDetails(
|
|
157
|
+
function renderTokenDetails(token: Protocol.Page.OriginTrialTokenWithStatus): Lit.TemplateResult {
|
|
174
158
|
return html`
|
|
175
|
-
<
|
|
176
|
-
|
|
177
|
-
|
|
159
|
+
<li role="treeitem">
|
|
160
|
+
<devtools-resources-origin-trial-token-rows .data=${token}>
|
|
161
|
+
</devtools-resources-origin-trial-token-rows>
|
|
162
|
+
</li>`;
|
|
178
163
|
}
|
|
179
164
|
|
|
180
165
|
function constructTokenDetailsNodes(token: Protocol.Page.OriginTrialTokenWithStatus):
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
constructRawTokenTextNode(token.rawTokenText),
|
|
189
|
-
];
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
function constructRawTokenTextNode(tokenText: string): TreeNode<OriginTrialTreeNodeData> {
|
|
193
|
-
return {
|
|
194
|
-
treeNodeData: i18nString(UIStrings.rawTokenText),
|
|
195
|
-
id: 'TokenRawTextContainerNode#' + tokenText,
|
|
196
|
-
children: async () => [{
|
|
197
|
-
treeNodeData: tokenText,
|
|
198
|
-
id: 'TokenRawTextNode#' + tokenText,
|
|
199
|
-
renderer: (data: TreeNode<OriginTrialTreeNodeData>) => {
|
|
200
|
-
const tokenText = data.treeNodeData as string;
|
|
201
|
-
return html`
|
|
202
|
-
<div style="overflow-wrap: break-word;">
|
|
203
|
-
${tokenText}
|
|
204
|
-
</div>
|
|
205
|
-
`;
|
|
206
|
-
},
|
|
207
|
-
}],
|
|
208
|
-
};
|
|
166
|
+
Lit.LitTemplate {
|
|
167
|
+
// clang-format off
|
|
168
|
+
return html`
|
|
169
|
+
${renderTokenDetails(token)}
|
|
170
|
+
${constructRawTokenTextNode(token.rawTokenText)}
|
|
171
|
+
`;
|
|
172
|
+
// clang-format on
|
|
209
173
|
}
|
|
210
174
|
|
|
211
|
-
function
|
|
212
|
-
|
|
175
|
+
function constructRawTokenTextNode(tokenText: string): Lit.LitTemplate {
|
|
176
|
+
// clang-format off
|
|
177
|
+
return html`
|
|
178
|
+
<li role="treeitem">
|
|
179
|
+
${i18nString(UIStrings.rawTokenText)}
|
|
180
|
+
<ul role="group" hidden>
|
|
181
|
+
<li role="treeitem">
|
|
182
|
+
<div style="overflow-wrap: break-word;">
|
|
183
|
+
${tokenText}
|
|
184
|
+
</div>
|
|
185
|
+
</li>
|
|
186
|
+
</ul>
|
|
187
|
+
</li>`;
|
|
188
|
+
// clang-format on
|
|
213
189
|
}
|
|
214
190
|
|
|
215
191
|
export interface OriginTrialTokenRowsData {
|
|
@@ -225,8 +201,8 @@ export class OriginTrialTokenRows extends HTMLElement {
|
|
|
225
201
|
{dateStyle: 'long', timeStyle: 'long'},
|
|
226
202
|
);
|
|
227
203
|
|
|
228
|
-
set data(data:
|
|
229
|
-
this.#tokenWithStatus = data
|
|
204
|
+
set data(data: Protocol.Page.OriginTrialTokenWithStatus) {
|
|
205
|
+
this.#tokenWithStatus = data;
|
|
230
206
|
this.#setTokenFields();
|
|
231
207
|
}
|
|
232
208
|
|
|
@@ -234,6 +210,14 @@ export class OriginTrialTokenRows extends HTMLElement {
|
|
|
234
210
|
this.#render();
|
|
235
211
|
}
|
|
236
212
|
|
|
213
|
+
override cloneNode(): HTMLElement {
|
|
214
|
+
const clone = UI.UIUtils.cloneCustomElement(this);
|
|
215
|
+
if (this.#tokenWithStatus) {
|
|
216
|
+
clone.data = this.#tokenWithStatus;
|
|
217
|
+
}
|
|
218
|
+
return clone;
|
|
219
|
+
}
|
|
220
|
+
|
|
237
221
|
#renderTokenField = (fieldValue: string, hasError?: boolean): Lit.TemplateResult => html`
|
|
238
222
|
<div class=${ifDefined(hasError ? 'error-text' : undefined)}>
|
|
239
223
|
${fieldValue}
|
|
@@ -290,10 +274,11 @@ export class OriginTrialTokenRows extends HTMLElement {
|
|
|
290
274
|
{
|
|
291
275
|
name: i18nString(UIStrings.status),
|
|
292
276
|
value: html`
|
|
293
|
-
<
|
|
277
|
+
<style>${badgeStyles}</style>
|
|
278
|
+
${createBadge({
|
|
294
279
|
badgeContent: this.#tokenWithStatus.status,
|
|
295
280
|
style: this.#tokenWithStatus.status === Protocol.Page.OriginTrialTokenStatus.Success ? 'success' : 'error',
|
|
296
|
-
}
|
|
281
|
+
})}`,
|
|
297
282
|
},
|
|
298
283
|
...this.#parsedTokenDetails,
|
|
299
284
|
];
|
|
@@ -307,7 +292,9 @@ export class OriginTrialTokenRows extends HTMLElement {
|
|
|
307
292
|
|
|
308
293
|
Lit.render(
|
|
309
294
|
html`
|
|
310
|
-
<style
|
|
295
|
+
<style>
|
|
296
|
+
${originTrialTokenRowsStyles}
|
|
297
|
+
</style>
|
|
311
298
|
<div class="content">
|
|
312
299
|
${tokenDetailRows}
|
|
313
300
|
</div>
|
|
@@ -322,45 +309,57 @@ export interface OriginTrialTreeViewData {
|
|
|
322
309
|
trials: Protocol.Page.OriginTrial[];
|
|
323
310
|
}
|
|
324
311
|
|
|
325
|
-
|
|
326
|
-
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
312
|
+
type View = (input: OriginTrialTreeViewData, output: undefined, target: HTMLElement) => void;
|
|
327
313
|
|
|
328
|
-
|
|
329
|
-
|
|
314
|
+
const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
315
|
+
if (!input.trials.length) {
|
|
316
|
+
// clang-format off
|
|
317
|
+
Lit.render(html`
|
|
318
|
+
<style>${originTrialTreeViewStyles}</style>
|
|
319
|
+
<span class="status-badge">
|
|
320
|
+
<devtools-icon class="medium" name="clear"></devtools-icon>
|
|
321
|
+
<span>${i18nString(UIStrings.noTrialTokens)}</span>
|
|
322
|
+
</span>`, target);
|
|
323
|
+
// clang-format on
|
|
324
|
+
return;
|
|
330
325
|
}
|
|
331
326
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
<
|
|
338
|
-
<
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
327
|
+
// clang-format off
|
|
328
|
+
Lit.render(html`
|
|
329
|
+
<style>
|
|
330
|
+
${originTrialTreeViewStyles}
|
|
331
|
+
</style>
|
|
332
|
+
<devtools-tree .template=${html`
|
|
333
|
+
<ul role="tree">
|
|
334
|
+
${input.trials.map(constructOriginTrialTree)}
|
|
335
|
+
</ul>
|
|
336
|
+
`}>
|
|
337
|
+
</devtools-tree>
|
|
338
|
+
`, target);
|
|
339
|
+
// clang-format on
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
export class OriginTrialTreeView extends UI.Widget.Widget {
|
|
343
|
+
#data: OriginTrialTreeViewData = {trials: []};
|
|
344
|
+
#view: View;
|
|
345
|
+
|
|
346
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
347
|
+
super(element, {useShadowDom: true});
|
|
348
|
+
this.#view = view;
|
|
349
|
+
}
|
|
344
350
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
<devtools-tree-outline .data=${{
|
|
349
|
-
tree: trials.map(constructOriginTrialTree),
|
|
350
|
-
defaultRenderer,
|
|
351
|
-
} as TreeOutline.TreeOutline.TreeOutlineData < OriginTrialTreeNodeData >}>
|
|
352
|
-
</devtools-tree-outline>
|
|
353
|
-
`,
|
|
354
|
-
this.#shadow, {host: this});
|
|
351
|
+
set data(data: OriginTrialTreeViewData) {
|
|
352
|
+
this.#data = data;
|
|
353
|
+
this.requestUpdate();
|
|
355
354
|
}
|
|
356
|
-
}
|
|
357
355
|
|
|
358
|
-
|
|
356
|
+
override performUpdate(): void {
|
|
357
|
+
this.#view(this.#data, undefined, this.contentElement);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
359
360
|
|
|
360
361
|
declare global {
|
|
361
362
|
interface HTMLElementTagNameMap {
|
|
362
|
-
'devtools-resources-origin-trial-tree-view': OriginTrialTreeView;
|
|
363
363
|
'devtools-resources-origin-trial-token-rows': OriginTrialTokenRows;
|
|
364
|
-
'devtools-resources-origin-trial-tree-view-badge': Badge;
|
|
365
364
|
}
|
|
366
365
|
}
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
* found in the LICENSE file.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
devtools-report-value {
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
.inline-icon {
|
|
8
12
|
vertical-align: sub;
|
|
9
13
|
}
|
|
@@ -73,6 +77,10 @@ devtools-report-value:has(devtools-tree-outline) {
|
|
|
73
77
|
margin-left: var(--sys-size-7);
|
|
74
78
|
}
|
|
75
79
|
|
|
80
|
+
.cache-status-section:focus-visible {
|
|
81
|
+
outline: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
76
84
|
.tree-outline li .selection {
|
|
77
85
|
margin-left: -5px;
|
|
78
86
|
}
|
|
@@ -20,6 +20,14 @@
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/* Use mono-space source code font to assist reading of adorner content */
|
|
23
|
-
:host {
|
|
23
|
+
:host devtools-adorner {
|
|
24
24
|
font-family: var(--source-code-font-family);
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
.token-status-badge {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[aria-expanded='false'] .token-status-badge {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
}
|
|
@@ -16,7 +16,7 @@ import type * as UI from '../../../../ui/legacy/legacy.js';
|
|
|
16
16
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
17
17
|
|
|
18
18
|
import preloadingGridStyles from './preloadingGrid.css.js';
|
|
19
|
-
import {capitalizedAction, composedStatus, ruleSetTagOrLocationShort} from './PreloadingString.js';
|
|
19
|
+
import {capitalizedAction, composedStatus, ruleSetTagOrLocationShort, sortOrder} from './PreloadingString.js';
|
|
20
20
|
|
|
21
21
|
const {PreloadingStatus} = SDK.PreloadingModel;
|
|
22
22
|
|
|
@@ -100,7 +100,7 @@ export class PreloadingGrid extends LegacyWrapper.LegacyWrapper.WrappableCompone
|
|
|
100
100
|
<td title=${attempt.key.url}>${this.#urlShort(row, securityOrigin)}</td>
|
|
101
101
|
<td>${capitalizedAction(attempt.action)}</td>
|
|
102
102
|
<td>${row.ruleSets.length === 0 ? '' : ruleSetTagOrLocationShort(row.ruleSets[0], pageURL)}</td>
|
|
103
|
-
<td>
|
|
103
|
+
<td data-value=${sortOrder(attempt)}>
|
|
104
104
|
<div style=${styleMap({color: hasWarning ? 'var(--sys-color-orange-bright)'
|
|
105
105
|
: hasError ? 'var(--sys-color-error)'
|
|
106
106
|
: 'var(--sys-color-on-surface)'})}>
|
|
@@ -741,6 +741,33 @@ export function capitalizedAction(action: Protocol.Preload.SpeculationAction): C
|
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
743
|
|
|
744
|
+
export function sortOrder(attempt: SDK.PreloadingModel.PreloadingAttempt): number {
|
|
745
|
+
switch (attempt.status) {
|
|
746
|
+
case SDK.PreloadingModel.PreloadingStatus.NOT_TRIGGERED:
|
|
747
|
+
return 0;
|
|
748
|
+
case SDK.PreloadingModel.PreloadingStatus.NOT_SUPPORTED:
|
|
749
|
+
return 1;
|
|
750
|
+
case SDK.PreloadingModel.PreloadingStatus.PENDING:
|
|
751
|
+
return 2;
|
|
752
|
+
case SDK.PreloadingModel.PreloadingStatus.RUNNING:
|
|
753
|
+
return 3;
|
|
754
|
+
case SDK.PreloadingModel.PreloadingStatus.READY:
|
|
755
|
+
return 4;
|
|
756
|
+
case SDK.PreloadingModel.PreloadingStatus.SUCCESS:
|
|
757
|
+
return 5;
|
|
758
|
+
case SDK.PreloadingModel.PreloadingStatus.FAILURE: {
|
|
759
|
+
switch (attempt.action) {
|
|
760
|
+
case Protocol.Preload.SpeculationAction.Prefetch:
|
|
761
|
+
return 6;
|
|
762
|
+
case Protocol.Preload.SpeculationAction.Prerender:
|
|
763
|
+
return 7;
|
|
764
|
+
case Protocol.Preload.SpeculationAction.PrerenderUntilScript:
|
|
765
|
+
return 8;
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
|
|
744
771
|
export function status(status: SDK.PreloadingModel.PreloadingStatus): string {
|
|
745
772
|
// See content/public/browser/preloading.h PreloadingAttemptOutcome.
|
|
746
773
|
switch (status) {
|
|
@@ -20,7 +20,7 @@ import autofillViewStyles from './autofillView.css.js';
|
|
|
20
20
|
|
|
21
21
|
const {html, render, Directives: {styleMap}} = Lit;
|
|
22
22
|
const {FillingStrategy} = Protocol.Autofill;
|
|
23
|
-
const {bindToSetting} = UI.
|
|
23
|
+
const {bindToSetting} = UI.UIUtils;
|
|
24
24
|
|
|
25
25
|
const UIStrings = {
|
|
26
26
|
/**
|
|
@@ -126,10 +126,9 @@ const str_ = i18n.i18n.registerUIStrings('panels/browser_debugger/CategorizedBre
|
|
|
126
126
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
127
127
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
128
128
|
|
|
129
|
-
const {html, render
|
|
129
|
+
const {html, render} = Lit;
|
|
130
130
|
|
|
131
131
|
interface ViewOutput {
|
|
132
|
-
defaultFocus: Element|undefined;
|
|
133
132
|
userExpandedCategories: Set<SDK.CategorizedBreakpoint.Category>;
|
|
134
133
|
}
|
|
135
134
|
interface ViewInput {
|
|
@@ -211,53 +210,49 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
211
210
|
style="flex: 1;"
|
|
212
211
|
></devtools-toolbar-input>
|
|
213
212
|
</devtools-toolbar>
|
|
214
|
-
<devtools-tree
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
`}>
|
|
258
|
-
</devtools-tree>`,
|
|
259
|
-
// clang-format on
|
|
260
|
-
target);
|
|
213
|
+
<devtools-tree autofocus .template=${html`
|
|
214
|
+
<ul role="tree">
|
|
215
|
+
${filteredCategories.map(([category, breakpoints]) => html`
|
|
216
|
+
<li @expand=${(e: UI.TreeOutline.TreeViewElement.ExpandEvent) => onExpand(category, e)}
|
|
217
|
+
role="treeitem"
|
|
218
|
+
jslog-context=${category}
|
|
219
|
+
aria-checked=${breakpoints.some(breakpoint => breakpoint.enabled())
|
|
220
|
+
? breakpoints.some(breakpoint => !breakpoint.enabled()) ? 'mixed' : true
|
|
221
|
+
: false}>
|
|
222
|
+
<style>${categorizedBreakpointsSidebarPaneStyles}</style>
|
|
223
|
+
<devtools-checkbox
|
|
224
|
+
class="small"
|
|
225
|
+
tabIndex=-1
|
|
226
|
+
title=${getLocalizedCategory(category)}
|
|
227
|
+
?indeterminate=${breakpoints.some(breakpoint => !breakpoint.enabled()) &&
|
|
228
|
+
breakpoints.some(breakpoint => breakpoint.enabled())}
|
|
229
|
+
?checked=${!breakpoints.some(breakpoint => !breakpoint.enabled())}
|
|
230
|
+
@change=${(e: Event) => onCheckboxClicked(e, category)}
|
|
231
|
+
>${getLocalizedCategory(category)}</devtools-checkbox>
|
|
232
|
+
<ul
|
|
233
|
+
role="group"
|
|
234
|
+
?hidden=${!shouldExpandCategory(breakpoints) && !input.userExpandedCategories.has(category)}>
|
|
235
|
+
${breakpoints.map(breakpoint => html`
|
|
236
|
+
<li
|
|
237
|
+
role="treeitem"
|
|
238
|
+
aria-checked=${breakpoint.enabled()}
|
|
239
|
+
jslog-context=${Platform.StringUtilities.toKebabCase(breakpoint.name)}>
|
|
240
|
+
<div ?hidden=${breakpoint !== input.highlightedItem} class="breakpoint-hit-marker"></div>
|
|
241
|
+
<devtools-checkbox
|
|
242
|
+
class=${classes(breakpoint)}
|
|
243
|
+
tabIndex=-1
|
|
244
|
+
title=${Sources.CategorizedBreakpointL10n.getLocalizedBreakpointName(breakpoint.name)}
|
|
245
|
+
?checked=${breakpoint.enabled()}
|
|
246
|
+
aria-description=${breakpoint === input.highlightedItem ? i18nString(UIStrings.breakpointHit)
|
|
247
|
+
: Lit.nothing}
|
|
248
|
+
@change=${(e: Event) => onCheckboxClicked(e, breakpoint)}
|
|
249
|
+
>${Sources.CategorizedBreakpointL10n.getLocalizedBreakpointName(breakpoint.name)}</devtools-checkbox>
|
|
250
|
+
</li>`)}
|
|
251
|
+
</ul>
|
|
252
|
+
</li>`)}
|
|
253
|
+
</ul>`}>
|
|
254
|
+
</devtools-tree>`, target);
|
|
255
|
+
// clang-format on
|
|
261
256
|
};
|
|
262
257
|
|
|
263
258
|
export abstract class CategorizedBreakpointsSidebarPane extends UI.Widget.VBox {
|
|
@@ -341,11 +336,7 @@ export abstract class CategorizedBreakpointsSidebarPane extends UI.Widget.VBox {
|
|
|
341
336
|
highlightedItem: this.#highlightedItem,
|
|
342
337
|
userExpandedCategories: this.#userExpandedCategories,
|
|
343
338
|
};
|
|
344
|
-
const that = this;
|
|
345
339
|
const output: ViewOutput = {
|
|
346
|
-
set defaultFocus(e: Element|undefined) {
|
|
347
|
-
that.setDefaultFocusedElement(e ?? null);
|
|
348
|
-
},
|
|
349
340
|
userExpandedCategories: this.#userExpandedCategories,
|
|
350
341
|
};
|
|
351
342
|
this.#view(input, output, this.contentElement);
|
|
@@ -51,6 +51,7 @@ import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
|
|
51
51
|
import * as IssueCounter from '../../ui/components/issue_counter/issue_counter.js';
|
|
52
52
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
53
53
|
import objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';
|
|
54
|
+
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
54
55
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
55
56
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
56
57
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -470,29 +471,30 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
470
471
|
const preserveConsoleLogSetting = Common.Settings.Settings.instance().moduleSetting('preserve-console-log');
|
|
471
472
|
const userActivationEvalSetting = Common.Settings.Settings.instance().moduleSetting('console-user-activation-eval');
|
|
472
473
|
settingsPane.append(
|
|
473
|
-
|
|
474
|
+
SettingsUI.SettingsUI.createSettingCheckbox(
|
|
474
475
|
i18nString(UIStrings.hideNetwork), this.filter.hideNetworkMessagesSetting,
|
|
475
476
|
this.filter.hideNetworkMessagesSetting.title()),
|
|
476
|
-
|
|
477
|
-
|
|
477
|
+
SettingsUI.SettingsUI.createSettingCheckbox(
|
|
478
|
+
i18nString(UIStrings.logXMLHttpRequests), monitoringXHREnabledSetting),
|
|
479
|
+
SettingsUI.SettingsUI.createSettingCheckbox(
|
|
478
480
|
i18nString(UIStrings.preserveLog), preserveConsoleLogSetting,
|
|
479
481
|
i18nString(UIStrings.doNotClearLogOnPageReload)),
|
|
480
|
-
|
|
482
|
+
SettingsUI.SettingsUI.createSettingCheckbox(
|
|
481
483
|
consoleEagerEvalSetting.title(), consoleEagerEvalSetting,
|
|
482
484
|
i18nString(UIStrings.eagerlyEvaluateTextInThePrompt)),
|
|
483
|
-
|
|
485
|
+
SettingsUI.SettingsUI.createSettingCheckbox(
|
|
484
486
|
i18nString(UIStrings.selectedContextOnly), this.filter.filterByExecutionContextSetting,
|
|
485
487
|
i18nString(UIStrings.onlyShowMessagesFromTheCurrentContext)),
|
|
486
|
-
|
|
488
|
+
SettingsUI.SettingsUI.createSettingCheckbox(
|
|
487
489
|
this.consoleHistoryAutocompleteSetting.title(), this.consoleHistoryAutocompleteSetting,
|
|
488
490
|
i18nString(UIStrings.autocompleteFromHistory)),
|
|
489
|
-
|
|
491
|
+
SettingsUI.SettingsUI.createSettingCheckbox(
|
|
490
492
|
this.groupSimilarSetting.title(), this.groupSimilarSetting,
|
|
491
493
|
i18nString(UIStrings.groupSimilarMessagesInConsole)),
|
|
492
|
-
|
|
494
|
+
SettingsUI.SettingsUI.createSettingCheckbox(
|
|
493
495
|
userActivationEvalSetting.title(), userActivationEvalSetting,
|
|
494
496
|
i18nString(UIStrings.treatEvaluationAsUserActivation)),
|
|
495
|
-
|
|
497
|
+
SettingsUI.SettingsUI.createSettingCheckbox(
|
|
496
498
|
this.showCorsErrorsSetting.title(), this.showCorsErrorsSetting,
|
|
497
499
|
i18nString(UIStrings.showCorsErrorsInConsole)),
|
|
498
500
|
);
|
|
@@ -126,8 +126,7 @@ const str_ = i18n.i18n.registerUIStrings('panels/coverage/CoverageView.ts', UISt
|
|
|
126
126
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
127
127
|
const i18nTemplate = unboundI18nTemplate.bind(undefined, str_);
|
|
128
128
|
const {ref} = Directives;
|
|
129
|
-
const {bindToAction} = UI.UIUtils;
|
|
130
|
-
const {bindToSetting} = UI.SettingsUI;
|
|
129
|
+
const {bindToAction, bindToSetting} = UI.UIUtils;
|
|
131
130
|
const {widgetConfig} = UI.Widget;
|
|
132
131
|
|
|
133
132
|
let coverageViewInstance: CoverageView|undefined;
|