chrome-devtools-frontend 1.0.1689415 → 1.0.1690116
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/eslint.config.mjs +8 -2
- package/front_end/core/common/Object.ts +10 -4
- package/front_end/core/i18n/collect-ui-strings.js +5 -5
- package/front_end/core/i18n/generate-locales-js.js +1 -1
- package/front_end/core/i18n/i18n.ts +6 -0
- package/front_end/core/root/Runtime.ts +0 -5
- package/front_end/core/sdk/CSSMetadata.ts +3 -5
- package/front_end/core/sdk/DOMModel.ts +46 -11
- package/front_end/core/sdk/EmulationModel.ts +18 -0
- package/front_end/core/sdk/SDKSettings.ts +9 -0
- package/front_end/core/sdk/Script.ts +0 -1
- package/front_end/core/sdk/SecurityOrigin.ts +135 -25
- package/front_end/core/sdk/Target.ts +1 -5
- package/front_end/models/ai_assistance/AiUtils.ts +0 -10
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +6 -10
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +0 -1
- package/front_end/models/ai_assistance/injected.ts +0 -2
- package/front_end/models/javascript_metadata/NativeFunctions.ts +1 -1
- package/front_end/models/trace/insights/CLSCulprits.ts +1 -2
- package/front_end/models/trace/insights/Cache.ts +1 -3
- package/front_end/models/trace/insights/CharacterSet.ts +1 -3
- package/front_end/models/trace/insights/DOMSize.ts +1 -3
- package/front_end/models/trace/insights/DocumentLatency.ts +1 -3
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -3
- package/front_end/models/trace/insights/FontDisplay.ts +1 -2
- package/front_end/models/trace/insights/ForcedReflow.ts +1 -2
- package/front_end/models/trace/insights/INPBreakdown.ts +1 -3
- package/front_end/models/trace/insights/ImageDelivery.ts +1 -3
- package/front_end/models/trace/insights/LCPBreakdown.ts +1 -3
- package/front_end/models/trace/insights/LCPDiscovery.ts +1 -3
- package/front_end/models/trace/insights/LegacyJavaScript.ts +1 -3
- package/front_end/models/trace/insights/ModernHTTP.ts +1 -2
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -2
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -3
- package/front_end/models/trace/insights/SlowCSSSelector.ts +1 -3
- package/front_end/models/trace/insights/ThirdParties.ts +1 -3
- package/front_end/models/trace/insights/Viewport.ts +1 -2
- package/front_end/panels/accessibility/ARIAAttributesView.ts +1 -1
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +3 -3
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -2
- package/front_end/panels/accessibility/AccessibilityStrings.ts +7 -3
- package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +2 -2
- package/front_end/panels/ai_assistance/components/AccessibilityAgentMarkdownRenderer.ts +1 -3
- package/front_end/panels/animation/AnimationGroupPreviewUI.ts +1 -1
- package/front_end/panels/animation/AnimationTimeline.ts +1 -1
- package/front_end/panels/animation/AnimationUI.ts +1 -1
- package/front_end/panels/application/AppManifestView.ts +6 -2
- package/front_end/panels/application/ApplicationPanelSidebar.ts +2 -4
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +1 -1
- package/front_end/panels/application/FrameDetailsView.ts +1 -1
- package/front_end/panels/application/IndexedDBViews.ts +3 -2
- package/front_end/panels/application/ReportingApiTreeElement.ts +1 -1
- package/front_end/panels/application/ReportingApiView.ts +2 -2
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +1 -1
- package/front_end/panels/application/ServiceWorkersView.ts +1 -1
- package/front_end/panels/application/StorageBucketsTreeElement.ts +1 -1
- package/front_end/panels/application/StorageItemsToolbar.ts +6 -2
- package/front_end/panels/application/StorageView.ts +9 -8
- package/front_end/panels/application/TrustTokensTreeElement.ts +1 -1
- package/front_end/panels/application/WebMCPView.ts +2 -1
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +1 -1
- package/front_end/panels/application/components/CrashReportContextGrid.ts +1 -1
- package/front_end/panels/application/components/EndpointsGrid.ts +1 -1
- package/front_end/panels/application/components/ReportsGrid.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +1 -1
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +7 -2
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +2 -0
- package/front_end/panels/autofill/AutofillView.ts +2 -2
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -3
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +1 -1
- package/front_end/panels/changes/ChangesSidebar.ts +56 -15
- package/front_end/panels/changes/ChangesView.ts +1 -1
- package/front_end/panels/console/ConsolePrompt.ts +6 -2
- package/front_end/panels/console/ConsoleSidebar.ts +6 -2
- package/front_end/panels/elements/ElementsTreeElement.ts +12 -0
- package/front_end/panels/elements/ElementsTreeOutline.ts +400 -128
- package/front_end/panels/elements/PropertyRenderer.ts +22 -15
- package/front_end/panels/elements/StandaloneStylesContainer.ts +6 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +75 -26
- package/front_end/panels/elements/StylesSidebarPane.ts +6 -2
- package/front_end/panels/elements/elementsTreeOutline.css +4 -0
- package/front_end/panels/emulation/DeviceModeView.ts +6 -1
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +6 -2
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +6 -2
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +7 -2
- package/front_end/panels/layer_viewer/Layers3DView.ts +8 -1
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +6 -2
- package/front_end/panels/lighthouse/lighthousePanel.css +5 -5
- package/front_end/panels/lighthouse/lighthouseStartView.css +13 -13
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +6 -2
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +6 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +6 -2
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +25 -54
- package/front_end/panels/network/NetworkLogView.ts +8 -3
- package/front_end/panels/network/components/RequestHeadersView.css +5 -0
- package/front_end/panels/network/networkLogView.css +4 -0
- package/front_end/panels/network/requestInitiatorViewTree.css +2 -0
- package/front_end/panels/performance_monitor/performanceMonitor.css +3 -3
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +7 -2
- package/front_end/panels/profiler/HeapProfileView.ts +7 -2
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +8 -4
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +8 -4
- package/front_end/panels/profiler/HeapSnapshotView.ts +15 -6
- package/front_end/panels/profiler/HeapTimelineOverview.ts +6 -2
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +12 -5
- package/front_end/panels/profiler/ProfileLauncherView.ts +6 -2
- package/front_end/panels/profiler/profilesPanel.css +8 -9
- package/front_end/panels/profiler/profilesSidebarTree.css +13 -13
- package/front_end/panels/protocol_monitor/JSONEditor.css +2 -2
- package/front_end/panels/protocol_monitor/JSONEditor.ts +6 -1
- package/front_end/panels/protocol_monitor/protocolMonitor.css +2 -2
- package/front_end/panels/sources/SourcesView.ts +7 -2
- package/front_end/panels/sources/TabbedEditorContainer.ts +6 -2
- package/front_end/panels/sources/UISourceCodeFrame.ts +10 -3
- package/front_end/panels/timeline/AnimationsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/AnnotationHelpers.ts +9 -9
- package/front_end/panels/timeline/CountersGraph.ts +8 -8
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +3 -3
- package/front_end/panels/timeline/ExtensionTrackAppender.ts +1 -1
- package/front_end/panels/timeline/GPUTrackAppender.ts +1 -1
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/IsolateSelector.ts +2 -2
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +3 -3
- package/front_end/panels/timeline/NetworkTrackAppender.ts +1 -1
- package/front_end/panels/timeline/StatusDialog.ts +5 -6
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +4 -4
- package/front_end/panels/timeline/ThreadAppender.ts +12 -14
- package/front_end/panels/timeline/TimelineController.ts +5 -8
- package/front_end/panels/timeline/TimelineDetailsView.ts +13 -9
- package/front_end/panels/timeline/TimelineEventOverview.ts +4 -4
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +17 -17
- package/front_end/panels/timeline/TimelineFlameChartView.ts +8 -3
- package/front_end/panels/timeline/TimelineHistoryManager.ts +8 -8
- package/front_end/panels/timeline/TimelineLoader.ts +1 -1
- package/front_end/panels/timeline/TimelineMiniMap.ts +7 -2
- package/front_end/panels/timeline/TimelinePanel.ts +57 -59
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +27 -27
- package/front_end/panels/timeline/TimelineTreeView.ts +46 -44
- package/front_end/panels/timeline/TimelineUIUtils.ts +142 -116
- package/front_end/panels/timeline/TimingsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/TrackConfigBanner.ts +4 -4
- package/front_end/panels/timeline/UIDevtoolsUtils.ts +15 -15
- package/front_end/panels/timeline/components/insights/Table.ts +1 -1
- package/front_end/panels/timeline/enable-easter-egg.js +1 -1
- package/front_end/panels/timeline/timeline-meta.ts +30 -30
- package/front_end/panels/timeline/timelineFlameChartView.css +10 -10
- package/front_end/panels/timeline/timelineFlamechartPopover.css +5 -5
- package/front_end/panels/timeline/timelineHistoryManager.css +7 -7
- package/front_end/panels/timeline/timelinePaintProfiler.css +2 -2
- package/front_end/panels/timeline/utils/IgnoreList.ts +4 -4
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +12 -3
- package/front_end/ui/comments/CommentOverlayManager.ts +9 -1
- package/front_end/ui/components/buttons/Button.docs.ts +1 -1
- package/front_end/ui/components/buttons/button.css +21 -0
- package/front_end/ui/components/report_view/ReportView.docs.ts +1 -1
- package/front_end/ui/components/snackbars/Snackbars.docs.ts +1 -1
- package/front_end/ui/components/spinners/Spinner.ts +1 -1
- package/front_end/ui/components/spinners/Spinners.docs.ts +1 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +1 -2
- package/front_end/ui/components/switch/Switch.docs.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +10 -8
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +2 -1
- package/front_end/ui/components/text_editor/ExecutionPositionHighlighter.ts +2 -2
- package/front_end/ui/components/text_editor/TextEditor.ts +19 -0
- package/front_end/ui/components/text_editor/config.ts +109 -96
- package/front_end/ui/components/text_editor/cursor_tooltip.ts +1 -1
- package/front_end/ui/components/text_editor/theme.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.docs.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +1 -1
- package/front_end/ui/components/tree_outline/TreeOutlineUtils.ts +4 -1
- package/front_end/ui/kit/cards/Card.ts +1 -1
- package/front_end/ui/kit/icons/Icon.ts +1 -1
- package/front_end/ui/kit/link/Link.docs.ts +1 -1
- package/front_end/ui/kit/link/Link.ts +1 -1
- package/front_end/ui/legacy/ContextMenu.docs.ts +1 -1
- package/front_end/ui/legacy/Dialog.ts +10 -2
- package/front_end/ui/legacy/FilterBar.ts +6 -1
- package/front_end/ui/legacy/RadioButton.docs.ts +1 -1
- package/front_end/ui/legacy/SelectMenu.docs.ts +1 -1
- package/front_end/ui/legacy/Slider.docs.ts +1 -1
- package/front_end/ui/legacy/SplitWidget.ts +5 -1
- package/front_end/ui/legacy/TabbedPane.ts +5 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +6 -1
- package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +6 -2
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +6 -1
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +6 -2
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +2 -0
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +6 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +6 -2
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +8 -4
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +8 -3
- package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +6 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +7 -2
- package/package.json +2 -2
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
|
-
import type * as Platform from '../../../core/platform/platform.js';
|
|
7
6
|
import * as Protocol from '../../../generated/protocol.js';
|
|
8
7
|
import type * as Handlers from '../handlers/handlers.js';
|
|
9
8
|
import * as Helpers from '../helpers/helpers.js';
|
|
@@ -49,8 +48,7 @@ export const UIStrings = {
|
|
|
49
48
|
} as const;
|
|
50
49
|
|
|
51
50
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/Cache.ts', UIStrings);
|
|
52
|
-
export const i18nString:
|
|
53
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
51
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
54
52
|
|
|
55
53
|
export type CacheInsightModel = InsightModel<typeof UIStrings, {
|
|
56
54
|
requests: Array<{
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
|
-
import type * as Platform from '../../../core/platform/platform.js';
|
|
7
6
|
import type * as Handlers from '../handlers/handlers.js';
|
|
8
7
|
import type * as Types from '../types/types.js';
|
|
9
8
|
|
|
@@ -54,8 +53,7 @@ export const UIStrings = {
|
|
|
54
53
|
} as const;
|
|
55
54
|
|
|
56
55
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/CharacterSet.ts', UIStrings);
|
|
57
|
-
export const i18nString:
|
|
58
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
56
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
59
57
|
|
|
60
58
|
const CHARSET_HTTP_REGEX = /charset\s*=\s*[a-zA-Z0-9\-_:.()]{2,}/i;
|
|
61
59
|
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import type * as Common from '../../../core/common/common.js';
|
|
6
6
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
7
|
-
import type * as Platform from '../../../core/platform/platform.js';
|
|
8
7
|
import * as Handlers from '../handlers/handlers.js';
|
|
9
8
|
import * as Helpers from '../helpers/helpers.js';
|
|
10
9
|
import * as Types from '../types/types.js';
|
|
@@ -73,8 +72,7 @@ export const UIStrings = {
|
|
|
73
72
|
} as const;
|
|
74
73
|
|
|
75
74
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/DOMSize.ts', UIStrings);
|
|
76
|
-
export const i18nString:
|
|
77
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
75
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
78
76
|
|
|
79
77
|
const DOM_SIZE_DURATION_THRESHOLD = Helpers.Timing.milliToMicro(Types.Timing.Milli(40));
|
|
80
78
|
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
|
-
import type * as Platform from '../../../core/platform/platform.js';
|
|
7
6
|
import type * as Handlers from '../handlers/handlers.js';
|
|
8
7
|
import * as Helpers from '../helpers/helpers.js';
|
|
9
8
|
import * as Types from '../types/types.js';
|
|
@@ -72,8 +71,7 @@ export const UIStrings = {
|
|
|
72
71
|
} as const;
|
|
73
72
|
|
|
74
73
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/DocumentLatency.ts', UIStrings);
|
|
75
|
-
export const i18nString:
|
|
76
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
74
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
77
75
|
|
|
78
76
|
// Due to the way that DevTools throttling works we cannot see if server response took less than ~570ms.
|
|
79
77
|
// We set our failure threshold to 600ms to avoid those false positives but we want devs to shoot for 100ms.
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
|
-
import type * as Platform from '../../../core/platform/platform.js';
|
|
7
6
|
import * as Extras from '../extras/extras.js';
|
|
8
7
|
import type * as Handlers from '../handlers/handlers.js';
|
|
9
8
|
import * as Helpers from '../helpers/helpers.js';
|
|
@@ -43,8 +42,7 @@ export const UIStrings = {
|
|
|
43
42
|
} as const;
|
|
44
43
|
|
|
45
44
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/DuplicatedJavaScript.ts', UIStrings);
|
|
46
|
-
export const i18nString:
|
|
47
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
45
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
48
46
|
|
|
49
47
|
export type DuplicatedJavaScriptInsightModel = InsightModel<typeof UIStrings, {
|
|
50
48
|
duplication: Extras.ScriptDuplication.ScriptDuplication,
|
|
@@ -41,8 +41,7 @@ export const UIStrings = {
|
|
|
41
41
|
} as const;
|
|
42
42
|
|
|
43
43
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/FontDisplay.ts', UIStrings);
|
|
44
|
-
export const i18nString:
|
|
45
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
44
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
46
45
|
|
|
47
46
|
export interface RemoteFont {
|
|
48
47
|
name?: string;
|
|
@@ -51,8 +51,7 @@ export const UIStrings = {
|
|
|
51
51
|
} as const;
|
|
52
52
|
|
|
53
53
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/ForcedReflow.ts', UIStrings);
|
|
54
|
-
export const i18nString:
|
|
55
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
54
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
56
55
|
|
|
57
56
|
export type ForcedReflowInsightModel = InsightModel<typeof UIStrings, {
|
|
58
57
|
topLevelFunctionCallData: ForcedReflowAggregatedData | undefined,
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
|
-
import type * as Platform from '../../../core/platform/platform.js';
|
|
7
6
|
import * as Handlers from '../handlers/handlers.js';
|
|
8
7
|
import * as Helpers from '../helpers/helpers.js';
|
|
9
8
|
import type * as Types from '../types/types.js';
|
|
@@ -55,8 +54,7 @@ export const UIStrings = {
|
|
|
55
54
|
} as const;
|
|
56
55
|
|
|
57
56
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/INPBreakdown.ts', UIStrings);
|
|
58
|
-
export const i18nString:
|
|
59
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
57
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
60
58
|
|
|
61
59
|
export type INPBreakdownInsightModel = InsightModel<typeof UIStrings, {
|
|
62
60
|
longestInteractionEvent?: Types.Events.SyntheticInteractionPair,
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
|
-
import type * as Platform from '../../../core/platform/platform.js';
|
|
7
6
|
import type * as Handlers from '../handlers/handlers.js';
|
|
8
7
|
import * as Helpers from '../helpers/helpers.js';
|
|
9
8
|
import type * as Types from '../types/types.js';
|
|
@@ -69,8 +68,7 @@ export const UIStrings = {
|
|
|
69
68
|
} as const;
|
|
70
69
|
|
|
71
70
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/ImageDelivery.ts', UIStrings);
|
|
72
|
-
export const i18nString:
|
|
73
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
71
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
74
72
|
|
|
75
73
|
/**
|
|
76
74
|
* Even JPEGs with lots of detail can usually be compressed down to <1 byte per pixel
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import type * as Common from '../../../core/common/common.js';
|
|
6
6
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
7
|
-
import type * as Platform from '../../../core/platform/platform.js';
|
|
8
7
|
import * as Handlers from '../handlers/handlers.js';
|
|
9
8
|
import * as Helpers from '../helpers/helpers.js';
|
|
10
9
|
import * as Types from '../types/types.js';
|
|
@@ -64,8 +63,7 @@ export const UIStrings = {
|
|
|
64
63
|
noLcp: 'No LCP detected',
|
|
65
64
|
} as const;
|
|
66
65
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/LCPBreakdown.ts', UIStrings);
|
|
67
|
-
export const i18nString:
|
|
68
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
66
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
69
67
|
|
|
70
68
|
/** A TraceWindow plus its UIString. **/
|
|
71
69
|
export type Subpart = Types.Timing.TraceWindowMicro&{label: Common.UIString.LocalizedString};
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
|
-
import type * as Platform from '../../../core/platform/platform.js';
|
|
7
6
|
import * as Handlers from '../handlers/handlers.js';
|
|
8
7
|
import * as Helpers from '../helpers/helpers.js';
|
|
9
8
|
import * as Types from '../types/types.js';
|
|
@@ -65,8 +64,7 @@ export const UIStrings = {
|
|
|
65
64
|
} as const;
|
|
66
65
|
|
|
67
66
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/LCPDiscovery.ts', UIStrings);
|
|
68
|
-
export const i18nString:
|
|
69
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
67
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
70
68
|
|
|
71
69
|
export function isLCPDiscoveryInsight(model: InsightModel): model is LCPDiscoveryInsightModel {
|
|
72
70
|
return model.insightKey === 'LCPDiscovery';
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
|
-
import type * as Platform from '../../../core/platform/platform.js';
|
|
7
6
|
import * as LegacyJavaScriptLib from '../../../third_party/legacy-javascript/legacy-javascript.js';
|
|
8
7
|
import type * as Handlers from '../handlers/handlers.js';
|
|
9
8
|
import * as Helpers from '../helpers/helpers.js';
|
|
@@ -45,8 +44,7 @@ export const UIStrings = {
|
|
|
45
44
|
} as const;
|
|
46
45
|
|
|
47
46
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/LegacyJavaScript.ts', UIStrings);
|
|
48
|
-
export const i18nString:
|
|
49
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
47
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
50
48
|
|
|
51
49
|
export interface PatternMatchResult {
|
|
52
50
|
name: string;
|
|
@@ -44,8 +44,7 @@ export const UIStrings = {
|
|
|
44
44
|
} as const;
|
|
45
45
|
|
|
46
46
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/ModernHTTP.ts', UIStrings);
|
|
47
|
-
export const i18nString:
|
|
48
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
47
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
49
48
|
|
|
50
49
|
export type ModernHTTPInsightModel = InsightModel<typeof UIStrings, {
|
|
51
50
|
http1Requests: Types.Events.SyntheticNetworkRequest[],
|
|
@@ -108,8 +108,7 @@ export const UIStrings = {
|
|
|
108
108
|
} as const;
|
|
109
109
|
|
|
110
110
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/NetworkDependencyTree.ts', UIStrings);
|
|
111
|
-
export const i18nString:
|
|
112
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
111
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
113
112
|
|
|
114
113
|
// XHRs are fetched at High priority, but we exclude them, as they are unlikely to be critical
|
|
115
114
|
// Images are also non-critical.
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
|
-
import type * as Platform from '../../../core/platform/platform.js';
|
|
7
6
|
import * as Protocol from '../../../generated/protocol.js';
|
|
8
7
|
import * as Handlers from '../handlers/handlers.js';
|
|
9
8
|
import * as Helpers from '../helpers/helpers.js';
|
|
@@ -46,8 +45,7 @@ export const UIStrings = {
|
|
|
46
45
|
} as const;
|
|
47
46
|
|
|
48
47
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/RenderBlocking.ts', UIStrings);
|
|
49
|
-
export const i18nString:
|
|
50
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
48
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
51
49
|
|
|
52
50
|
export function isRenderBlockingInsight(insight: InsightModel): insight is RenderBlockingInsightModel {
|
|
53
51
|
return insight.insightKey === 'RenderBlocking';
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
|
-
import type * as Platform from '../../../core/platform/platform.js';
|
|
7
6
|
import type * as Handlers from '../handlers/handlers.js';
|
|
8
7
|
import * as Helpers from '../helpers/helpers.js';
|
|
9
8
|
import * as Types from '../types/types.js';
|
|
@@ -63,8 +62,7 @@ export const UIStrings = {
|
|
|
63
62
|
} as const;
|
|
64
63
|
|
|
65
64
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/SlowCSSSelector.ts', UIStrings);
|
|
66
|
-
export const i18nString:
|
|
67
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
65
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
68
66
|
const slowCSSSelectorThreshold = 500; // 500us threshold for slow selectors
|
|
69
67
|
|
|
70
68
|
export type SlowCSSSelectorInsightModel = InsightModel<typeof UIStrings, {
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
|
-
import type * as Platform from '../../../core/platform/platform.js';
|
|
7
6
|
import * as ThirdPartyWeb from '../../../third_party/third-party-web/third-party-web.js';
|
|
8
7
|
import * as Extras from '../extras/extras.js';
|
|
9
8
|
import * as Handlers from '../handlers/handlers.js';
|
|
@@ -47,8 +46,7 @@ export const UIStrings = {
|
|
|
47
46
|
} as const;
|
|
48
47
|
|
|
49
48
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/ThirdParties.ts', UIStrings);
|
|
50
|
-
export const i18nString:
|
|
51
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
49
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
52
50
|
|
|
53
51
|
export type ThirdPartiesInsightModel = InsightModel<typeof UIStrings, {
|
|
54
52
|
/** The entity for this navigation's URL. Any other entity is from a third party. */
|
|
@@ -34,8 +34,7 @@ export const UIStrings = {
|
|
|
34
34
|
} as const;
|
|
35
35
|
|
|
36
36
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/Viewport.ts', UIStrings);
|
|
37
|
-
export const i18nString:
|
|
38
|
-
Platform.UIString.LocalizedString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
37
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
39
38
|
|
|
40
39
|
export type ViewportInsightModel = InsightModel<typeof UIStrings, {
|
|
41
40
|
mobileOptimized: boolean | null,
|
|
@@ -108,7 +108,7 @@ export class ARIAAttributesPane extends AccessibilitySubPane<ShadowRoot> {
|
|
|
108
108
|
readonly #view: View;
|
|
109
109
|
#attributeBeingEdited: SDK.DOMModel.Attribute|null = null;
|
|
110
110
|
|
|
111
|
-
constructor(view = DEFAULT_VIEW) {
|
|
111
|
+
constructor(view: View = DEFAULT_VIEW) {
|
|
112
112
|
super({
|
|
113
113
|
title: i18nString(UIStrings.ariaAttributes),
|
|
114
114
|
viewId: 'aria-attributes',
|
|
@@ -421,10 +421,10 @@ export function teardownScript(): void {
|
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
-
export const INJECTED_SCRIPT_SOURCE = `(${injectedScript.toString()})(${
|
|
425
|
-
JSON.stringify(AnnouncementApi.JS_TRIGGERED)});`;
|
|
424
|
+
export const INJECTED_SCRIPT_SOURCE: string = `(${injectedScript.toString()})(${
|
|
425
|
+
JSON.stringify(AnnouncementApi.ARIA_LIVE)}, ${JSON.stringify(AnnouncementApi.JS_TRIGGERED)});`;
|
|
426
426
|
|
|
427
|
-
export const TEARDOWN_SCRIPT_SOURCE = `(${teardownScript.toString()})();`;
|
|
427
|
+
export const TEARDOWN_SCRIPT_SOURCE: string = `(${teardownScript.toString()})();`;
|
|
428
428
|
|
|
429
429
|
export function checkForBlockedPayload(payload: unknown): string|null {
|
|
430
430
|
if (typeof payload !== 'string') {
|
|
@@ -280,7 +280,6 @@ export class AXNodePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
280
280
|
appendNameElement(name: string): void {
|
|
281
281
|
const nameElement = document.createElement('span');
|
|
282
282
|
if (name in AXAttributes) {
|
|
283
|
-
// @ts-expect-error TS can't cast name here but we checked it's valid.
|
|
284
283
|
const attribute = AXAttributes[name];
|
|
285
284
|
nameElement.textContent = attribute.name();
|
|
286
285
|
UI.Tooltip.Tooltip.install(nameElement, attribute.description());
|
|
@@ -361,7 +360,7 @@ export const TypeStyles: Record<string, string> = {
|
|
|
361
360
|
valueUndefined: 'ax-value-undefined',
|
|
362
361
|
};
|
|
363
362
|
|
|
364
|
-
export const StringProperties = new Set<Protocol.Accessibility.AXValueType>([
|
|
363
|
+
export const StringProperties: Set<Protocol.Accessibility.AXValueType> = new Set<Protocol.Accessibility.AXValueType>([
|
|
365
364
|
Protocol.Accessibility.AXValueType.String,
|
|
366
365
|
Protocol.Accessibility.AXValueType.ComputedString,
|
|
367
366
|
Protocol.Accessibility.AXValueType.IdrefList,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
6
|
+
import type * as Protocol from '../../generated/protocol.js';
|
|
6
7
|
const UIStrings = {
|
|
7
8
|
/**
|
|
8
9
|
* @description Text to indicate something is not enabled.
|
|
@@ -468,7 +469,8 @@ const UIStrings = {
|
|
|
468
469
|
} as const;
|
|
469
470
|
const str_ = i18n.i18n.registerUIStrings('panels/accessibility/AccessibilityStrings.ts', UIStrings);
|
|
470
471
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
471
|
-
export const AXAttributes
|
|
472
|
+
export const AXAttributes: Record<
|
|
473
|
+
string, {name: i18n.LazyLocalizeString, description: i18n.LazyLocalizeString, group?: string}> = {
|
|
472
474
|
disabled: {
|
|
473
475
|
name: i18nLazyString(UIStrings.disabled),
|
|
474
476
|
description: i18nLazyString(UIStrings.ifTrueThisElementCurrentlyCannot),
|
|
@@ -648,7 +650,8 @@ export const AXAttributes = {
|
|
|
648
650
|
},
|
|
649
651
|
};
|
|
650
652
|
|
|
651
|
-
export const AXSourceTypes
|
|
653
|
+
export const AXSourceTypes: Record<Protocol.Accessibility.AXValueSourceType,
|
|
654
|
+
{name: i18n.LazyLocalizeString, description: i18n.LazyLocalizeString}> = {
|
|
652
655
|
attribute: {name: i18nLazyString(UIStrings.fromAttribute), description: i18nLazyString(UIStrings.valueFromAttribute)},
|
|
653
656
|
implicit: {
|
|
654
657
|
name: i18nLazyString(UIStrings.implicit),
|
|
@@ -664,7 +667,8 @@ export const AXSourceTypes = {
|
|
|
664
667
|
{name: i18nLazyString(UIStrings.relatedElement), description: i18nLazyString(UIStrings.valueFromRelatedElement)},
|
|
665
668
|
};
|
|
666
669
|
|
|
667
|
-
export const AXNativeSourceTypes
|
|
670
|
+
export const AXNativeSourceTypes: Record<Protocol.Accessibility.AXValueNativeSourceType,
|
|
671
|
+
{name: i18n.LazyLocalizeString, description: i18n.LazyLocalizeString}> = {
|
|
668
672
|
description: {
|
|
669
673
|
name: i18nLazyString(UIStrings.fromDescription),
|
|
670
674
|
description: i18nLazyString(UIStrings.valueFromDescriptionElement),
|
|
@@ -45,8 +45,8 @@ export class AIv2MarkdownRenderer extends MarkdownView.MarkdownView.MarkdownInsi
|
|
|
45
45
|
if (!this.options.mainDocumentURL) {
|
|
46
46
|
return true;
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
return SDK.SecurityOrigin.SecurityOrigin.create(this.options.mainDocumentURL)
|
|
49
|
+
.isSameOriginWith(node.securityOrigin());
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
#revealableLink(revealable: unknown, label: string): Lit.LitTemplate {
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import type * as Platform from '../../../core/platform/platform.js';
|
|
6
6
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
7
7
|
import type * as Protocol from '../../../generated/protocol.js';
|
|
8
|
-
import * as AiAssistanceModel from '../../../models/ai_assistance/ai_assistance.js';
|
|
9
8
|
import type * as Marked from '../../../third_party/marked/marked.js';
|
|
10
9
|
import * as Lit from '../../../ui/lit/lit.js';
|
|
11
10
|
import * as PanelsCommon from '../../common/common.js';
|
|
@@ -35,8 +34,7 @@ export class AccessibilityAgentMarkdownRenderer extends MarkdownRendererWithCode
|
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
#isSameOrigin(node: SDK.DOMModel.DOMNode): boolean {
|
|
38
|
-
|
|
39
|
-
return AiAssistanceModel.AiUtils.isSameOrigin(this.mainDocumentURL, nodeDocumentURL);
|
|
37
|
+
return SDK.SecurityOrigin.SecurityOrigin.create(this.mainDocumentURL).isSameOriginWith(node.securityOrigin());
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
override templateForToken(token: Marked.Marked.MarkedToken): Lit.LitTemplate|null {
|
|
@@ -160,7 +160,7 @@ export class AnimationGroupPreviewUI extends UI.Widget.Widget {
|
|
|
160
160
|
#paused = false;
|
|
161
161
|
#focusable = false;
|
|
162
162
|
|
|
163
|
-
constructor(config: AnimationGroupPreviewConfig, view = DEFAULT_VIEW) {
|
|
163
|
+
constructor(config: AnimationGroupPreviewConfig, view: View = DEFAULT_VIEW) {
|
|
164
164
|
super();
|
|
165
165
|
this.#view = view;
|
|
166
166
|
this.#config = config;
|
|
@@ -1181,7 +1181,7 @@ export class AnimationTimeline extends UI.Widget.VBox implements
|
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
1183
|
|
|
1184
|
-
export const GlobalPlaybackRates = [1, 0.25, 0.1];
|
|
1184
|
+
export const GlobalPlaybackRates: number[] = [1, 0.25, 0.1];
|
|
1185
1185
|
|
|
1186
1186
|
const enum ControlState {
|
|
1187
1187
|
PLAY = 'play-outline',
|
|
@@ -501,7 +501,7 @@ export const Options = {
|
|
|
501
501
|
GridCanvasHeight: 40,
|
|
502
502
|
};
|
|
503
503
|
|
|
504
|
-
export const Colors = new Map<string, Common.Color.Color|null>([
|
|
504
|
+
export const Colors: Map<string, Common.Color.Color|null> = new Map<string, Common.Color.Color|null>([
|
|
505
505
|
['Purple', Common.Color.parse('#9C27B0')],
|
|
506
506
|
['Light Blue', Common.Color.parse('#03A9F4')],
|
|
507
507
|
['Deep Orange', Common.Color.parse('#FF5722')],
|
|
@@ -1116,8 +1116,12 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
1116
1116
|
// clang-format on
|
|
1117
1117
|
};
|
|
1118
1118
|
|
|
1119
|
-
|
|
1120
|
-
|
|
1119
|
+
const AppManifestViewBase: Common.ObjectWrapper.EventMixin<EventTypes, typeof UI.Widget.VBox> =
|
|
1120
|
+
Common.ObjectWrapper.eventMixin(
|
|
1121
|
+
UI.Widget.VBox,
|
|
1122
|
+
);
|
|
1123
|
+
|
|
1124
|
+
export class AppManifestView extends AppManifestViewBase implements SDK.TargetManager.Observer {
|
|
1121
1125
|
private registeredListeners: Common.EventTarget.EventDescriptor[];
|
|
1122
1126
|
private target?: SDK.Target.Target;
|
|
1123
1127
|
private resourceTreeModel?: SDK.ResourceTreeModel.ResourceTreeModel|null;
|
|
@@ -381,10 +381,8 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
381
381
|
this.applicationTreeElement.appendChild(this.serviceWorkersTreeElement);
|
|
382
382
|
this.storageTreeElement = new StorageTreeElement(panel);
|
|
383
383
|
this.applicationTreeElement.appendChild(this.storageTreeElement);
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
this.applicationTreeElement.appendChild(this.webMcpTreeElement);
|
|
387
|
-
}
|
|
384
|
+
this.webMcpTreeElement = new WebMCPTreeElement(panel);
|
|
385
|
+
this.applicationTreeElement.appendChild(this.webMcpTreeElement);
|
|
388
386
|
|
|
389
387
|
if (Root.Runtime.hostConfig.devToolsAdsPanel?.enabled) {
|
|
390
388
|
const adsTreeElement = new ApplicationPanelTreeElement(panel, i18nString(UIStrings.ads), false, 'ads');
|
|
@@ -18,7 +18,7 @@ const UIStrings = {
|
|
|
18
18
|
bounceTrackingMitigations: 'Bounce tracking mitigations',
|
|
19
19
|
} as const;
|
|
20
20
|
const str_ = i18n.i18n.registerUIStrings('panels/application/BounceTrackingMitigationsTreeElement.ts', UIStrings);
|
|
21
|
-
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
21
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
22
22
|
|
|
23
23
|
export class BounceTrackingMitigationsTreeElement extends ApplicationPanelTreeElement {
|
|
24
24
|
private view?: ApplicationComponents.BounceTrackingMitigationsView.BounceTrackingMitigationsView;
|
|
@@ -846,7 +846,7 @@ export class FrameDetailsReportView extends UI.Widget.Widget {
|
|
|
846
846
|
#adScriptAncestry: Protocol.Network.AdAncestry|null = null;
|
|
847
847
|
#view: View;
|
|
848
848
|
|
|
849
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
849
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
850
850
|
super(element, {useShadowDom: true});
|
|
851
851
|
this.#protocolMonitorExperimentEnabled =
|
|
852
852
|
Root.Runtime.experiments.isEnabled(Root.ExperimentNames.ExperimentName.PROTOCOL_MONITOR);
|
|
@@ -450,7 +450,7 @@ export class IDBDataView extends UI.View.SimpleView {
|
|
|
450
450
|
readonly #view: IDBDataViewView;
|
|
451
451
|
|
|
452
452
|
constructor(model: IndexedDBModel, databaseId: DatabaseId, objectStore: ObjectStore, index: Index|null,
|
|
453
|
-
refreshObjectStoreCallback: () => void, view = IDB_DATA_VIEW_DEFAULT_VIEW) {
|
|
453
|
+
refreshObjectStoreCallback: () => void, view: IDBDataViewView = IDB_DATA_VIEW_DEFAULT_VIEW) {
|
|
454
454
|
super({
|
|
455
455
|
title: i18nString(UIStrings.idb),
|
|
456
456
|
viewId: 'idb',
|
|
@@ -704,7 +704,8 @@ export class ObjectPropertiesSectionWidget extends UI.Widget.Widget {
|
|
|
704
704
|
#objectTree: ObjectUI.ObjectPropertiesSection.ObjectTree|null = null;
|
|
705
705
|
readonly #view: ObjectPropertiesSectionWidgetView;
|
|
706
706
|
|
|
707
|
-
constructor(element?: HTMLElement,
|
|
707
|
+
constructor(element?: HTMLElement,
|
|
708
|
+
view: ObjectPropertiesSectionWidgetView = OBJECT_PROPERTIES_SECTION_WIDGET_DEFAULT_VIEW) {
|
|
708
709
|
super(element);
|
|
709
710
|
this.#view = view;
|
|
710
711
|
}
|
|
@@ -23,7 +23,7 @@ const UIStrings = {
|
|
|
23
23
|
crashReportContext: 'Crash Report Context',
|
|
24
24
|
} as const;
|
|
25
25
|
const str_ = i18n.i18n.registerUIStrings('panels/application/ReportingApiTreeElement.ts', UIStrings);
|
|
26
|
-
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
26
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
27
27
|
|
|
28
28
|
export class ReportingApiTreeElement extends ApplicationPanelTreeElement {
|
|
29
29
|
private view?: ReportingApiView;
|
|
@@ -42,7 +42,7 @@ const UIStrings = {
|
|
|
42
42
|
clickToDisplayBody: 'Click on any report to display its body',
|
|
43
43
|
} as const;
|
|
44
44
|
const str_ = i18n.i18n.registerUIStrings('panels/application/ReportingApiView.ts', UIStrings);
|
|
45
|
-
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
45
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
46
46
|
|
|
47
47
|
const REPORTING_API_EXPLANATION_URL =
|
|
48
48
|
'https://developer.chrome.com/docs/capabilities/web-apis/reporting-api' as Platform.DevToolsPath.UrlString;
|
|
@@ -117,7 +117,7 @@ export class ReportingApiView extends UI.Widget.VBox implements
|
|
|
117
117
|
#reports: Protocol.Network.ReportingApiReport[] = [];
|
|
118
118
|
#focusedReport?: Protocol.Network.ReportingApiReport;
|
|
119
119
|
|
|
120
|
-
constructor(view = DEFAULT_VIEW) {
|
|
120
|
+
constructor(view: (input: ViewInput, output: undefined, target: HTMLElement) => void = DEFAULT_VIEW) {
|
|
121
121
|
super();
|
|
122
122
|
this.#view = view;
|
|
123
123
|
this.#endpoints = new Map();
|
|
@@ -120,7 +120,7 @@ export class ServiceWorkerUpdateCycleView extends UI.Widget.Widget {
|
|
|
120
120
|
private expandedRows = new Set<string>();
|
|
121
121
|
#view: View;
|
|
122
122
|
|
|
123
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
123
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
124
124
|
super(element);
|
|
125
125
|
this.#view = view;
|
|
126
126
|
this.rows = [];
|
|
@@ -768,7 +768,7 @@ export class Section extends UI.Widget.VBox {
|
|
|
768
768
|
private readonly throttler: Common.Throttler.Throttler;
|
|
769
769
|
#view: SectionView;
|
|
770
770
|
|
|
771
|
-
constructor(element: HTMLElement, view = DEFAULT_SECTION_VIEW) {
|
|
771
|
+
constructor(element: HTMLElement, view: SectionView = DEFAULT_SECTION_VIEW) {
|
|
772
772
|
super(element);
|
|
773
773
|
this.fingerprint = null;
|
|
774
774
|
this.clientInfoCache = new Map();
|
|
@@ -40,7 +40,7 @@ const UIStrings = {
|
|
|
40
40
|
'On this page you can view and delete storage buckets, and their associated `Storage APIs`.',
|
|
41
41
|
} as const;
|
|
42
42
|
const str_ = i18n.i18n.registerUIStrings('panels/application/StorageBucketsTreeElement.ts', UIStrings);
|
|
43
|
-
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
43
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
44
44
|
|
|
45
45
|
export class StorageBucketsTreeParentElement extends ExpandableApplicationPanelTreeElement {
|
|
46
46
|
private bucketTreeElements = new Set<StorageBucketsTreeElement>();
|
|
@@ -95,8 +95,12 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: object, target: HTMLElem
|
|
|
95
95
|
|
|
96
96
|
export type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
Common.ObjectWrapper.eventMixin
|
|
98
|
+
const StorageItemsToolbarBase: Common.ObjectWrapper.EventMixin<StorageItemsToolbar.EventTypes, typeof UI.Widget.VBox> =
|
|
99
|
+
Common.ObjectWrapper.eventMixin(
|
|
100
|
+
UI.Widget.VBox,
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
export class StorageItemsToolbar extends StorageItemsToolbarBase {
|
|
100
104
|
filterRegex: RegExp|null;
|
|
101
105
|
#metadataView: ApplicationComponents.StorageMetadataView.StorageMetadataView|undefined;
|
|
102
106
|
readonly #view: View;
|
|
@@ -151,13 +151,14 @@ const UIStrings = {
|
|
|
151
151
|
sessionStorage: 'Session storage',
|
|
152
152
|
} as const;
|
|
153
153
|
|
|
154
|
-
export const storagePieColors
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
]
|
|
154
|
+
export const storagePieColors: Map<Protocol.Storage.StorageType, string> =
|
|
155
|
+
new Map<Protocol.Storage.StorageType, string>([
|
|
156
|
+
[Protocol.Storage.StorageType.Cache_storage, 'rgb(229, 113, 113)'], // red
|
|
157
|
+
[Protocol.Storage.StorageType.Cookies, 'rgb(239, 196, 87)'], // yellow
|
|
158
|
+
[Protocol.Storage.StorageType.Indexeddb, 'rgb(155, 127, 230)'], // purple
|
|
159
|
+
[Protocol.Storage.StorageType.Local_storage, 'rgb(116, 178, 102)'], // green
|
|
160
|
+
[Protocol.Storage.StorageType.Service_workers, 'rgb(255, 167, 36)'], // orange
|
|
161
|
+
]);
|
|
161
162
|
|
|
162
163
|
const str_ = i18n.i18n.registerUIStrings('panels/application/StorageView.ts', UIStrings);
|
|
163
164
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -704,7 +705,7 @@ export class StorageView extends UI.Widget.VBox {
|
|
|
704
705
|
}
|
|
705
706
|
}
|
|
706
707
|
|
|
707
|
-
export const AllStorageTypes = [
|
|
708
|
+
export const AllStorageTypes: Protocol.Storage.StorageType[] = [
|
|
708
709
|
Protocol.Storage.StorageType.Cache_storage,
|
|
709
710
|
Protocol.Storage.StorageType.Cookies,
|
|
710
711
|
Protocol.Storage.StorageType.Indexeddb,
|