chrome-devtools-frontend 1.0.1726686 → 1.0.1730971
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/.agents/rules/tests/test-strict-assertions-and-literal-expectations.md +1 -1
- package/.agents/rules/tests/test-view-and-presenter-isolation.md +1 -1
- package/.agents/rules/ui-and-widgets/ui-accessibility-and-semantic-html.md +1 -1
- package/.agents/rules/ui-and-widgets/ui-css-scoping-and-flex-layout.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-declarative-child-widget-composition.md +5 -5
- package/.agents/rules/ui-and-widgets/ui-lit-declarative-templates-and-directives.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-localization-and-uistrings-hygiene.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-modern-component-and-encapsulation-standards.md +3 -3
- package/.agents/rules/ui-and-widgets/ui-pure-view-and-presenter-separation.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-reactive-widget-update-lifecycle.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-view-output-and-callback-contracts.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-widget-dom-and-listener-lifecycle.md +2 -2
- package/.agents/skills/code-review/SKILL.md +63 -12
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +38 -10
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +1 -0
- package/.agents/skills/ui-widgets/SKILL.md +8 -2
- package/.agents/skills/write-ai-eval-test/SKILL.md +106 -0
- package/AUTHORS +2 -0
- package/DIR_METADATA +1 -2
- package/README.md +48 -26
- package/config/typescript/tsconfig.base.json +1 -0
- package/config/typescript/tsconfig.eslint.json +1 -0
- package/docs/contributing/changes.md +25 -0
- package/docs/ui_engineering.md +13 -4
- package/eslint.config.mjs +323 -41
- package/front_end/core/common/Color.ts +7 -7
- package/front_end/core/common/ParsedURL.ts +3 -3
- package/front_end/core/common/ResolverBase.ts +3 -3
- package/front_end/core/common/SegmentedRange.ts +3 -3
- package/front_end/core/common/SimpleHistoryManager.ts +14 -14
- package/front_end/core/common/Trie.ts +3 -3
- package/front_end/core/common/VersionController.ts +7 -7
- package/front_end/core/host/InspectorFrontendHost.ts +2 -2
- package/front_end/core/host/InspectorFrontendHostAPI.ts +9 -1
- package/front_end/core/host/InspectorFrontendHostStub.ts +1 -1
- package/front_end/core/host/UserMetrics.ts +4 -0
- package/front_end/core/host/UserMetricsEnums.ts +2 -1
- package/front_end/core/platform/StringUtilities.ts +54 -13
- package/front_end/core/platform/node/HostRuntime.ts +13 -7
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +4 -5
- package/front_end/core/root/Runtime.ts +5 -0
- package/front_end/core/sdk/AccessibilityModel.ts +5 -5
- package/front_end/core/sdk/AnimationModel.ts +17 -19
- package/front_end/core/sdk/CPUProfilerModel.ts +3 -3
- package/front_end/core/sdk/CPUThrottlingManager.ts +7 -0
- package/front_end/core/sdk/CSSMatchedStyles.ts +73 -13
- package/front_end/core/sdk/CSSMetadata.ts +7 -7
- package/front_end/core/sdk/CSSModel.ts +33 -33
- package/front_end/core/sdk/CSSProperty.ts +5 -5
- package/front_end/core/sdk/CSSRule.ts +6 -6
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +4 -4
- package/front_end/core/sdk/Connections.ts +16 -16
- package/front_end/core/sdk/ConsoleModel.ts +44 -47
- package/front_end/core/sdk/CookieParser.ts +11 -11
- package/front_end/core/sdk/EmulationModel.ts +35 -36
- package/front_end/core/sdk/EventBreakpointsModel.ts +11 -11
- package/front_end/core/sdk/FrameManager.ts +16 -16
- package/front_end/core/sdk/IsolateManager.ts +2 -2
- package/front_end/core/sdk/IssuesModel.ts +2 -2
- package/front_end/core/sdk/OverlayModel.ts +19 -19
- package/front_end/core/sdk/PageResourceLoader.ts +14 -16
- package/front_end/core/sdk/RemoteObject.ts +9 -9
- package/front_end/core/sdk/Resource.ts +2 -2
- package/front_end/core/sdk/RuntimeModel.ts +7 -7
- package/front_end/core/sdk/Script.ts +6 -6
- package/front_end/core/sdk/ServiceWorkerManager.ts +36 -10
- package/front_end/core/sdk/SourceMap.ts +18 -20
- package/front_end/core/sdk/SourceMapManager.ts +2 -2
- package/front_end/core/sdk/TargetManager.ts +2 -2
- package/front_end/devtools_compatibility.js +7 -3
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +2 -2
- package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +203 -115
- package/front_end/generated/InspectorBackendCommands.ts +1 -1
- package/front_end/generated/SupportedCSSProperties.ts +1 -3
- package/front_end/generated/protocol.ts +1 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +36 -12
- package/front_end/models/ai_assistance/AiConversation.ts +8 -2
- package/front_end/models/ai_assistance/agents/AiAgent.ts +137 -62
- package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +2 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +149 -2
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +269 -42
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +3 -0
- package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +9 -0
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +13 -2
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +23 -7
- package/front_end/models/ai_assistance/tools/Tool.ts +7 -5
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +22 -24
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +60 -60
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +24 -24
- package/front_end/models/bindings/DefaultScriptMapping.ts +8 -8
- package/front_end/models/bindings/FileUtils.ts +13 -13
- package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +3 -3
- package/front_end/models/bindings/ResourceScriptMapping.ts +23 -23
- package/front_end/models/comment_manager/CommentManager.ts +3 -3
- package/front_end/models/comment_manager/CommentThread.ts +50 -5
- package/front_end/models/cpu_profile/CPUProfileDataModel.ts +14 -14
- package/front_end/models/cpu_profile/ProfileTreeModel.ts +4 -4
- package/front_end/models/elements/StyleChanges.ts +38 -0
- package/front_end/models/emulation/EmulatedDevices.ts +12 -12
- package/front_end/models/har/HARFormat.ts +4 -4
- package/front_end/models/javascript_metadata/NativeFunctions.ts +5 -1
- package/front_end/models/lighthouse/LighthouseReporterTypes.ts +57 -3
- package/front_end/models/lighthouse/RunTypes.ts +9 -1
- package/front_end/models/logs/LogManager.ts +2 -2
- package/front_end/models/persistence/AutomaticFileSystemManager.ts +3 -0
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +24 -24
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +6 -0
- package/front_end/models/persistence/NetworkPersistenceManager.ts +8 -3
- package/front_end/models/trace/LanternComputationData.ts +37 -11
- package/front_end/models/trace/Processor.ts +2 -1
- package/front_end/models/trace/extras/TraceTree.ts +36 -10
- package/front_end/models/trace/handlers/InitiatorsHandler.ts +27 -34
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +2 -6
- package/front_end/models/trace/handlers/SamplesHandler.ts +9 -6
- package/front_end/models/workspace/FileManager.ts +6 -0
- package/front_end/panels/accessibility/ARIAAttributesView.ts +4 -4
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +8 -1
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +15 -17
- package/front_end/panels/accessibility/AccessibilitySubPane.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -5
- package/front_end/panels/ai_assistance/ExternalHandler.ts +10 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +27 -22
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +19 -23
- package/front_end/panels/ai_assistance/components/ExploreWidget.ts +2 -2
- package/front_end/panels/ai_assistance/components/PermissionPrompt.ts +23 -9
- package/front_end/panels/ai_assistance/components/chatInput.css +1 -1
- package/front_end/panels/animation/AnimationTimeline.ts +37 -17
- package/front_end/panels/animation/animationTimeline.css +19 -3
- package/front_end/panels/application/AppManifestView.ts +1 -2
- package/front_end/panels/application/ApplicationPanelSidebar.ts +143 -128
- package/front_end/panels/application/DOMStorageItemsView.ts +14 -14
- package/front_end/panels/application/DeviceBoundSessionsView.ts +10 -13
- package/front_end/panels/application/ExtensionStorageItemsView.ts +3 -4
- package/front_end/panels/application/IndexedDBViews.ts +8 -4
- package/front_end/panels/application/KeyValueStorageItemsView.ts +4 -5
- package/front_end/panels/application/PrivateVerificationTokensView.ts +53 -0
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +12 -8
- package/front_end/panels/application/ServiceWorkersView.ts +1 -2
- package/front_end/panels/application/StorageItemsToolbar.ts +3 -3
- package/front_end/panels/application/StorageView.ts +2 -2
- package/front_end/panels/application/WebMCPView.ts +91 -109
- package/front_end/panels/application/application.ts +2 -0
- package/front_end/panels/application/components/StorageMetadataView.ts +6 -6
- package/front_end/panels/application/preloading/PreloadingView.ts +70 -37
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +2 -2
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +3 -3
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +12 -0
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +10 -11
- package/front_end/panels/application/privateVerificationTokensView.css +20 -0
- package/front_end/panels/application/serviceWorkersView.css +2 -2
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +24 -24
- package/front_end/panels/changes/ChangesSidebar.ts +5 -5
- package/front_end/panels/changes/ChangesView.ts +10 -11
- package/front_end/panels/comments/CommentsPane.ts +292 -102
- package/front_end/panels/comments/commentsPane.css +93 -12
- package/front_end/panels/common/CommentThreadWidget.ts +69 -0
- package/front_end/panels/common/CommentsOverlayWidget.ts +108 -29
- package/front_end/panels/common/CommentsStatusBarPill.ts +17 -6
- package/front_end/panels/common/DOMLinkifier.ts +37 -12
- package/front_end/panels/common/ExtensionPanel.ts +13 -4
- package/front_end/panels/common/ExtensionServer.ts +27 -3
- package/front_end/panels/common/PersistenceUtils.ts +3 -3
- package/front_end/panels/common/commentThreadWidget.css +25 -1
- package/front_end/panels/common/common-meta.ts +10 -0
- package/front_end/panels/console/ConsolePinPane.ts +13 -15
- package/front_end/panels/console/ConsolePrompt.ts +173 -95
- package/front_end/panels/console/ConsoleSidebar.ts +2 -2
- package/front_end/panels/console/ConsoleView.ts +75 -79
- package/front_end/panels/console/ConsoleViewMessage.ts +52 -4
- package/front_end/panels/console/SymbolizedErrorWidget.ts +8 -4
- package/front_end/panels/console/consolePrompt.css +1 -1
- package/front_end/panels/console/consoleView.css +1 -1
- package/front_end/panels/console_counters/WarningErrorCounter.ts +3 -4
- package/front_end/panels/coverage/CoverageListView.ts +2 -2
- package/front_end/panels/coverage/CoverageView.ts +20 -5
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +4 -3
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewUnusedDeclarations.ts +8 -8
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +2 -3
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +4 -5
- package/front_end/panels/elements/AccessibilityTreeUtils.ts +6 -7
- package/front_end/panels/elements/CSSValueTraceView.ts +3 -3
- package/front_end/panels/elements/ClassesPaneWidget.ts +1 -2
- package/front_end/panels/elements/ComputedStyleWidget.ts +15 -14
- package/front_end/panels/elements/DOMTreeElementWidget.ts +5 -4
- package/front_end/panels/elements/DOMTreeWidget.ts +2 -1
- package/front_end/panels/elements/ElementStatePaneWidget.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +1 -0
- package/front_end/panels/elements/EventListenersWidget.ts +2 -2
- package/front_end/panels/elements/LayoutPane.ts +2 -2
- package/front_end/panels/elements/PlatformFontsWidget.ts +3 -3
- package/front_end/panels/elements/PropertiesWidget.ts +9 -10
- package/front_end/panels/elements/PropertyRenderer.ts +72 -11
- package/front_end/panels/elements/StandaloneStylesContainer.ts +5 -10
- package/front_end/panels/elements/StyleEditorWidget.ts +30 -16
- package/front_end/panels/elements/StylePropertiesSection.ts +93 -44
- package/front_end/panels/elements/StylePropertyTreeElement.ts +230 -302
- package/front_end/panels/elements/StylesContainer.ts +2 -3
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -13
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +66 -37
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +51 -41
- package/front_end/panels/elements/components/CSSPropertyDocsView.ts +75 -65
- package/front_end/panels/elements/components/CSSQuery.ts +112 -74
- package/front_end/panels/elements/components/CSSVariableValueView.ts +109 -68
- package/front_end/panels/elements/components/ComputedStyleProperty.ts +64 -45
- package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +35 -28
- package/front_end/panels/elements/components/QueryContainer.ts +104 -74
- package/front_end/panels/elements/components/accessibilityTreeNode.css +22 -20
- package/front_end/panels/elements/components/computedStyleProperty.css +2 -0
- package/front_end/panels/elements/components/cssHintDetailsView.css +23 -21
- package/front_end/panels/elements/components/cssPropertyDocsView.css +38 -36
- package/front_end/panels/elements/components/cssVariableValueView.css +42 -40
- package/front_end/panels/elements/components/elementsTreeExpandButton.css +5 -2
- package/front_end/panels/elements/components/queryContainer.css +23 -21
- package/front_end/panels/elements/stylesSidebarPane.css +3 -3
- package/front_end/panels/emulation/DeviceModeToolbar.ts +2 -2
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +2 -2
- package/front_end/panels/emulation/MediaQueryInspector.ts +9 -10
- package/front_end/panels/emulation/mediaQueryInspector.css +1 -1
- package/front_end/panels/event_listeners/EventListenersView.ts +2 -2
- package/front_end/panels/issues/AffectedCookiesView.ts +144 -101
- package/front_end/panels/issues/AffectedDescendantsWithinSelectElementView.ts +83 -31
- package/front_end/panels/issues/AffectedDirectivesView.ts +218 -135
- package/front_end/panels/issues/AffectedDocumentsInQuirksModeView.ts +84 -34
- package/front_end/panels/issues/AffectedElementsView.ts +86 -23
- package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +2 -2
- package/front_end/panels/issues/AffectedMetadataAllowedSitesView.ts +2 -2
- package/front_end/panels/issues/AffectedPartitioningBlobURLView.ts +36 -11
- package/front_end/panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts +135 -58
- package/front_end/panels/issues/AffectedSourcesView.ts +49 -28
- package/front_end/panels/issues/AffectedTrackingSitesView.ts +3 -4
- package/front_end/panels/issues/CorsIssueDetailsView.ts +490 -269
- package/front_end/panels/issues/GenericIssueDetailsView.ts +2 -2
- package/front_end/panels/issues/IssueKindView.ts +63 -48
- package/front_end/panels/issues/IssueView.ts +14 -18
- package/front_end/panels/issues/components/ElementsPanelLink.ts +70 -34
- package/front_end/panels/issues/components/HideIssuesMenu.ts +56 -32
- package/front_end/panels/issues/components/elementsPanelLink.css +10 -6
- package/front_end/panels/issues/components/hideIssuesMenu.css +16 -14
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/issues/issuesTree.css +4 -4
- package/front_end/panels/lighthouse/LighthouseController.ts +6 -6
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +12 -13
- package/front_end/panels/lighthouse/lighthouseStartView.css +1 -1
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +159 -161
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorView.ts +228 -0
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +32 -41
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +2 -2
- package/front_end/panels/linear_memory_inspector/linear_memory_inspector.ts +2 -0
- package/front_end/panels/media/EventDisplayTable.ts +2 -2
- package/front_end/panels/media/MainView.ts +132 -66
- package/front_end/panels/media/PlayerDetailView.ts +32 -14
- package/front_end/panels/media/PlayerListView.ts +83 -23
- package/front_end/panels/media/PlayerPropertiesView.ts +2 -2
- package/front_end/panels/media/TickingFlameChart.ts +153 -63
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +2 -2
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +615 -464
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +43 -0
- package/front_end/panels/network/EventSourceMessagesView.ts +3 -3
- package/front_end/panels/network/NetworkConfigView.ts +6 -2
- package/front_end/panels/network/NetworkDataGridNode.ts +2 -1
- package/front_end/panels/network/NetworkItemView.ts +27 -26
- package/front_end/panels/network/NetworkManageCustomHeadersView.ts +236 -97
- package/front_end/panels/network/NetworkOverview.ts +8 -10
- package/front_end/panels/network/RequestConditionsDrawer.ts +8 -4
- package/front_end/panels/network/RequestDeviceBoundSessionsView.ts +2 -4
- package/front_end/panels/network/RequestHTMLView.ts +26 -7
- package/front_end/panels/network/RequestHeadersView.ts +2 -2
- package/front_end/panels/network/RequestInitiatorView.ts +21 -22
- package/front_end/panels/network/RequestPayloadView.ts +2 -16
- package/front_end/panels/network/RequestPreviewView.ts +5 -5
- package/front_end/panels/network/RequestTimingView.ts +6 -6
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +5 -6
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +4 -3
- package/front_end/panels/network/ShowMoreDetailsWidget.ts +11 -12
- package/front_end/panels/network/SignedExchangeInfoView.ts +2 -2
- package/front_end/panels/network/networkLogView.css +2 -2
- package/front_end/panels/network/networkManageCustomHeadersView.css +27 -6
- package/front_end/panels/network/requestConditionsDrawer.css +1 -1
- package/front_end/panels/network/requestInitiatorView.css +5 -3
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -2
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +1 -2
- package/front_end/panels/profiler/HeapTimelineOverview.ts +77 -15
- package/front_end/panels/profiler/IsolateSelector.ts +258 -187
- package/front_end/panels/profiler/ProfileLauncherView.ts +7 -29
- package/front_end/panels/profiler/profileLauncherView.css +6 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +4 -5
- package/front_end/panels/recorder/ControlButton.ts +1 -1
- package/front_end/panels/recorder/RecordingListView.ts +2 -4
- package/front_end/panels/recorder/RecordingView.ts +1 -2
- package/front_end/panels/recorder/SelectorPicker.ts +2 -4
- package/front_end/panels/recorder/StepView.ts +24 -10
- package/front_end/panels/recorder/TimelineSection.ts +1 -1
- package/front_end/panels/recorder/recordingView.css +1 -1
- package/front_end/panels/screencast/ScreencastApp.ts +1 -1
- package/front_end/panels/search/SearchResultsPane.ts +11 -12
- package/front_end/panels/search/SearchView.ts +8 -10
- package/front_end/panels/security/SecurityPanel.ts +1 -8
- package/front_end/panels/security/SecurityPanelSidebar.ts +2 -2
- package/front_end/panels/security/mainView.css +1 -1
- package/front_end/panels/sensors/LocationsSettingsTab.ts +1 -2
- package/front_end/panels/settings/AISettingsTab.ts +1 -1
- package/front_end/panels/settings/BackendLinkingSettingsTab.ts +34 -20
- package/front_end/panels/settings/EditFileSystemView.ts +2 -2
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +375 -197
- package/front_end/panels/settings/KeybindsSettingsTab.ts +570 -414
- package/front_end/panels/settings/SettingsScreen.ts +312 -114
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +2 -2
- package/front_end/panels/settings/aiSettingsTab.css +1 -4
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +924 -578
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +9 -2
- package/front_end/panels/settings/emulation/devicesSettingsTab.css +39 -0
- package/front_end/panels/settings/frameworkIgnoreListSettingsTab.css +37 -8
- package/front_end/panels/settings/settingsScreen.css +0 -24
- package/front_end/panels/sources/BreakpointEditDialog.ts +9 -6
- package/front_end/panels/sources/BreakpointsView.ts +25 -4
- package/front_end/panels/sources/CallStackSidebarPane.ts +7 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -0
- package/front_end/panels/sources/GoToLineQuickOpen.ts +8 -8
- package/front_end/panels/sources/NavigatorView.ts +521 -439
- package/front_end/panels/sources/PersistenceActions.ts +11 -12
- package/front_end/panels/sources/ProfilePlugin.ts +28 -17
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +3 -4
- package/front_end/panels/sources/SourcesNavigator.ts +9 -9
- package/front_end/panels/sources/SourcesPanel.ts +2 -2
- package/front_end/panels/sources/SourcesView.ts +3 -3
- package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -2
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +2 -2
- package/front_end/panels/sources/components/HeadersView.ts +1 -2
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +5 -6
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +73 -34
- package/front_end/panels/timeline/IsolateSelector.ts +25 -37
- package/front_end/panels/timeline/StatusDialog.ts +5 -7
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +10 -13
- package/front_end/panels/timeline/TimelineDetailsView.ts +40 -21
- package/front_end/panels/timeline/TimelineEventOverview.ts +130 -34
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelineMiniMap.ts +255 -103
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +19 -11
- package/front_end/panels/timeline/TimelinePanel.ts +1 -0
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +11 -12
- package/front_end/panels/timeline/TimelineTreeView.ts +240 -122
- package/front_end/panels/timeline/TimelineUIUtils.ts +12 -0
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +5 -4
- package/front_end/panels/timeline/components/DetailsView.ts +97 -65
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +2 -2
- package/front_end/panels/timeline/components/MetricCard.ts +2 -2
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +11 -12
- package/front_end/panels/timeline/components/NetworkTrackWidget.ts +57 -50
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +2 -2
- package/front_end/panels/timeline/components/Sidebar.ts +161 -109
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +33 -12
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +3 -0
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +11 -11
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +6 -7
- package/front_end/panels/timeline/components/networkTrackWidget.css +24 -22
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +1 -1
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +15 -10
- package/front_end/panels/timeline/overlays/components/entryLabelOverlay.css +1 -1
- package/front_end/panels/timeline/timelinePanel.css +5 -0
- package/front_end/panels/timeline/timelineStatusDialog.css +1 -1
- package/front_end/panels/web_audio/WebAudioView.ts +2 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/legacy-javascript/README.chromium +2 -2
- package/front_end/third_party/legacy-javascript/lib/legacy-javascript.js +2 -2
- package/front_end/third_party/legacy-javascript/package.json +1 -1
- package/front_end/third_party/lighthouse/README.chromium +2 -2
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1983 -2022
- package/front_end/third_party/lighthouse/locales/ar-XB.json +157 -142
- package/front_end/third_party/lighthouse/locales/ar.json +157 -142
- package/front_end/third_party/lighthouse/locales/bg.json +154 -139
- package/front_end/third_party/lighthouse/locales/ca.json +157 -142
- package/front_end/third_party/lighthouse/locales/cs.json +148 -133
- package/front_end/third_party/lighthouse/locales/da.json +153 -138
- package/front_end/third_party/lighthouse/locales/de.json +152 -137
- package/front_end/third_party/lighthouse/locales/el.json +153 -138
- package/front_end/third_party/lighthouse/locales/en-GB.json +160 -145
- package/front_end/third_party/lighthouse/locales/en-US.json +239 -218
- package/front_end/third_party/lighthouse/locales/en-XL.json +239 -218
- package/front_end/third_party/lighthouse/locales/es-419.json +150 -135
- package/front_end/third_party/lighthouse/locales/es.json +149 -134
- package/front_end/third_party/lighthouse/locales/fi.json +151 -136
- package/front_end/third_party/lighthouse/locales/fil.json +154 -139
- package/front_end/third_party/lighthouse/locales/fr.json +150 -135
- package/front_end/third_party/lighthouse/locales/he.json +160 -145
- package/front_end/third_party/lighthouse/locales/hi.json +156 -141
- package/front_end/third_party/lighthouse/locales/hr.json +154 -139
- package/front_end/third_party/lighthouse/locales/hu.json +111 -96
- package/front_end/third_party/lighthouse/locales/id.json +153 -138
- package/front_end/third_party/lighthouse/locales/it.json +153 -138
- package/front_end/third_party/lighthouse/locales/ja.json +150 -135
- package/front_end/third_party/lighthouse/locales/ko.json +42 -27
- package/front_end/third_party/lighthouse/locales/lt.json +152 -137
- package/front_end/third_party/lighthouse/locales/lv.json +93 -78
- package/front_end/third_party/lighthouse/locales/nl.json +149 -134
- package/front_end/third_party/lighthouse/locales/no.json +152 -137
- package/front_end/third_party/lighthouse/locales/pl.json +153 -138
- package/front_end/third_party/lighthouse/locales/pt-PT.json +152 -137
- package/front_end/third_party/lighthouse/locales/pt.json +157 -142
- package/front_end/third_party/lighthouse/locales/ro.json +149 -134
- package/front_end/third_party/lighthouse/locales/ru.json +76 -61
- package/front_end/third_party/lighthouse/locales/sk.json +153 -138
- package/front_end/third_party/lighthouse/locales/sl.json +149 -134
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +151 -136
- package/front_end/third_party/lighthouse/locales/sr.json +151 -136
- package/front_end/third_party/lighthouse/locales/sv.json +152 -137
- package/front_end/third_party/lighthouse/locales/ta.json +156 -141
- package/front_end/third_party/lighthouse/locales/te.json +157 -142
- package/front_end/third_party/lighthouse/locales/th.json +111 -96
- package/front_end/third_party/lighthouse/locales/tr.json +153 -138
- package/front_end/third_party/lighthouse/locales/uk.json +149 -134
- package/front_end/third_party/lighthouse/locales/vi.json +162 -147
- package/front_end/third_party/lighthouse/locales/zh-HK.json +150 -135
- package/front_end/third_party/lighthouse/locales/zh-TW.json +154 -139
- package/front_end/third_party/lighthouse/locales/zh.json +152 -137
- package/front_end/third_party/lighthouse/report/bundle.d.ts +9 -8
- package/front_end/third_party/lighthouse/report/bundle.js +10 -10
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +2 -7
- package/front_end/tsconfig.compatibility.json +1 -0
- package/front_end/tsconfig.json +3 -2
- package/front_end/ui/components/dialogs/TypeToAllowDialog.ts +0 -2
- package/front_end/ui/components/dialogs/typeToAllowDialog.css +0 -4
- package/front_end/ui/components/icon_button/fileSourceIcon.css +1 -1
- package/front_end/ui/components/input/textInput.css +1 -1
- package/front_end/ui/components/lists/List.ts +26 -14
- package/front_end/ui/components/menus/menus.ts +0 -2
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +351 -138
- package/front_end/ui/components/survey_link/surveyLink.css +3 -3
- package/front_end/ui/components/switch/switch.css +6 -6
- package/front_end/ui/components/text_editor/AiCodeCompletionTeaser.ts +2 -3
- package/front_end/ui/components/text_editor/TextEditor.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +53 -4
- package/front_end/ui/components/tree_outline/treeOutline.css +7 -7
- package/front_end/ui/helpers/OpenInNewTab.ts +8 -3
- package/front_end/ui/legacy/EmptyWidget.ts +4 -4
- package/front_end/ui/legacy/ForwardedInputEventHandler.ts +2 -2
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/KeyboardShortcut.ts +7 -7
- package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +2 -2
- package/front_end/ui/legacy/TabbedPane.ts +198 -66
- package/front_end/ui/legacy/TargetCrashedScreen.ts +2 -2
- package/front_end/ui/legacy/UIUtils.ts +71 -68
- package/front_end/ui/legacy/View.ts +7 -4
- package/front_end/ui/legacy/ViewManager.ts +49 -37
- package/front_end/ui/legacy/Widget.ts +32 -12
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +2 -3
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingUI.ts +8 -8
- package/front_end/ui/legacy/components/inline_editor/BezierUI.ts +8 -9
- package/front_end/ui/legacy/components/inline_editor/LinkSwatch.ts +2 -2
- package/front_end/ui/legacy/components/inline_editor/cssAngleEditor.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/cssAngleSwatch.css +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +45 -11
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +10 -12
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +102 -29
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +148 -122
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +20 -14
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +1 -1
- package/front_end/ui/legacy/components/source_frame/FontView.ts +29 -5
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +79 -12
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +20 -2
- package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +6 -10
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +11 -11
- package/front_end/ui/legacy/components/source_frame/fontView.css +7 -0
- package/front_end/ui/legacy/components/source_frame/imageView.css +7 -0
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +14 -3
- package/front_end/ui/legacy/components/utils/Linkifier.ts +126 -2
- package/front_end/ui/legacy/emptyWidget.css +2 -1
- package/front_end/ui/legacy/inspectorCommon.css +3 -3
- package/front_end/ui/legacy/smallBubble.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +6 -0
- package/front_end/ui/lit/Directives.ts +35 -18
- package/front_end/ui/lit/lit.ts +0 -2
- package/front_end/ui/lit/render.ts +0 -7
- package/front_end/ui/visual_logging/KnownContextValues.ts +5 -0
- package/package.json +1 -1
- package/vpython.toml +8 -0
- package/vpython.toml.uv.lock +3 -0
- package/.agents/skills/review-models-core/SKILL.md +0 -73
- package/.agents/skills/review-tests/SKILL.md +0 -67
- package/.agents/skills/review-ui-widgets/SKILL.md +0 -115
- package/front_end/generated/ARIAProperties.ts +0 -2686
- package/front_end/ui/components/menus/README.md +0 -119
- package/front_end/ui/components/menus/SelectMenu.ts +0 -473
- package/front_end/ui/components/menus/selectMenu.css +0 -54
- package/front_end/ui/components/menus/selectMenuButton.css +0 -108
|
@@ -64,7 +64,7 @@ export class VersionController {
|
|
|
64
64
|
const currentVersion = VersionController.CURRENT_VERSION;
|
|
65
65
|
const minimumVersion =
|
|
66
66
|
Math.min(this.#globalVersionSetting.get(), this.#syncedVersionSetting.get(), this.#localVersionSetting.get());
|
|
67
|
-
const methodsToRun = this
|
|
67
|
+
const methodsToRun = this.#methodsToRunToUpdateVersion(minimumVersion, currentVersion);
|
|
68
68
|
console.assert(
|
|
69
69
|
// @ts-expect-error
|
|
70
70
|
this[`updateVersionFrom${currentVersion}To${currentVersion + 1}`] === undefined,
|
|
@@ -76,7 +76,7 @@ export class VersionController {
|
|
|
76
76
|
this.resetToCurrent();
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
#methodsToRunToUpdateVersion(oldVersion: number, currentVersion: number): string[] {
|
|
80
80
|
const result = [];
|
|
81
81
|
for (let i = oldVersion; i < currentVersion; ++i) {
|
|
82
82
|
result.push('updateVersionFrom' + i + 'To' + (i + 1));
|
|
@@ -85,7 +85,7 @@ export class VersionController {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
updateVersionFrom0To1(): void {
|
|
88
|
-
this
|
|
88
|
+
this.#clearBreakpointsWhenTooMany(this.#settings.createLocalSetting('breakpoints', []), 500000);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
updateVersionFrom1To2(): void {
|
|
@@ -296,11 +296,11 @@ export class VersionController {
|
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
updateVersionFrom11To12(): void {
|
|
299
|
-
this
|
|
299
|
+
this.#migrateSettingsFromLocalStorage();
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
updateVersionFrom12To13(): void {
|
|
303
|
-
this
|
|
303
|
+
this.#migrateSettingsFromLocalStorage();
|
|
304
304
|
this.#removeSetting(this.#settings.createSetting('timelineOverviewMode', ''));
|
|
305
305
|
}
|
|
306
306
|
|
|
@@ -856,7 +856,7 @@ export class VersionController {
|
|
|
856
856
|
* a setting with the new name does not yet exist.
|
|
857
857
|
* ----------------------------------------------------------------------- */
|
|
858
858
|
|
|
859
|
-
|
|
859
|
+
#migrateSettingsFromLocalStorage(): void {
|
|
860
860
|
// This step migrates all the settings except for the ones below into the browser profile.
|
|
861
861
|
const localSettings = new Set<string>([
|
|
862
862
|
'advancedSearchConfig',
|
|
@@ -887,7 +887,7 @@ export class VersionController {
|
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
889
|
|
|
890
|
-
|
|
890
|
+
#clearBreakpointsWhenTooMany(breakpointsSetting: Setting<unknown[]>, maxBreakpointsCount: number): void {
|
|
891
891
|
// If there are too many breakpoints in a storage, it is likely due to a recent bug that caused
|
|
892
892
|
// periodical breakpoints duplication leading to inspector slowness.
|
|
893
893
|
if (breakpointsSetting.get().length > maxBreakpointsCount) {
|
|
@@ -26,11 +26,11 @@ class InspectorFrontendAPIImpl {
|
|
|
26
26
|
constructor() {
|
|
27
27
|
for (const descriptor of EventDescriptors) {
|
|
28
28
|
// @ts-expect-error Dispatcher magic
|
|
29
|
-
this[descriptor[0]] = this
|
|
29
|
+
this[descriptor[0]] = this.#dispatch.bind(this, descriptor[0], descriptor[1], descriptor[2]);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
#dispatch(name: Events, signature: string[], _runOnceLoaded: boolean, ...params: string[]): void {
|
|
34
34
|
// Single argument methods get dispatched with the param.
|
|
35
35
|
if (signature.length < 2) {
|
|
36
36
|
try {
|
|
@@ -339,7 +339,15 @@ export interface InspectorFrontendHostAPI {
|
|
|
339
339
|
|
|
340
340
|
inspectElementCompleted(): void;
|
|
341
341
|
|
|
342
|
-
|
|
342
|
+
/**
|
|
343
|
+
* Opens `url` in a new tab.
|
|
344
|
+
*
|
|
345
|
+
* @param initiatorId the DevTools frame id or target id of the frame or worker that `url` came from (e.g. the
|
|
346
|
+
* frame whose script logged it to the Console), if any. The browser attributes the navigation to it, like a
|
|
347
|
+
* link clicked in that frame, which determines the `Sec-Fetch-Site` header and the `SameSite` cookies of the
|
|
348
|
+
* request. Without it, the navigation is attributed to an opaque origin, i.e. treated as cross-site.
|
|
349
|
+
*/
|
|
350
|
+
openInNewTab(url: Platform.DevToolsPath.UrlString, initiatorId?: string): void;
|
|
343
351
|
|
|
344
352
|
openSearchResultsInNewTab(query: string): void;
|
|
345
353
|
|
|
@@ -161,7 +161,7 @@ export class InspectorFrontendHostStub implements InspectorFrontendHostAPI {
|
|
|
161
161
|
void navigator.clipboard.writeText(text);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
openInNewTab(url: Platform.DevToolsPath.UrlString): void {
|
|
164
|
+
openInNewTab(url: Platform.DevToolsPath.UrlString, _initiatorId?: string): void {
|
|
165
165
|
if (Common.ParsedURL.schemeIs(url, 'javascript:')) {
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
@@ -283,6 +283,10 @@ export class UserMetrics {
|
|
|
283
283
|
50);
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
+
commentQueued(count: number): void {
|
|
287
|
+
InspectorFrontendHostInstance.recordCountHistogram('DevTools.Comments.CommentQueued', count, 1, 100, 50);
|
|
288
|
+
}
|
|
289
|
+
|
|
286
290
|
commentSharedWithAgent(count: number): void {
|
|
287
291
|
InspectorFrontendHostInstance.recordCountHistogram('DevTools.Comments.CommentSharedWithAgent', count, 1, 100, 50);
|
|
288
292
|
}
|
|
@@ -298,8 +298,9 @@ export enum PanelCodes {
|
|
|
298
298
|
'autofill-view' = 67,
|
|
299
299
|
freestyler = 68,
|
|
300
300
|
ads = 69,
|
|
301
|
+
'private-verification-tokens' = 70,
|
|
301
302
|
/* eslint-enable @typescript-eslint/naming-convention */
|
|
302
|
-
MAX_VALUE =
|
|
303
|
+
MAX_VALUE = 71,
|
|
303
304
|
}
|
|
304
305
|
|
|
305
306
|
export enum MediaTypes {
|
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
import type {Brand} from './Brand.js';
|
|
6
6
|
|
|
7
7
|
let graphemeSegmenter: Intl.Segmenter|null = null;
|
|
8
|
+
// Excludes control characters (0x00-0x1F, 0x7F) to prevent splitting \r\n, which forms a single grapheme cluster.
|
|
9
|
+
const PRINTABLE_ASCII_REGEX = /^[\x20-\x7e]*$/;
|
|
10
|
+
|
|
11
|
+
function getGraphemeSegmenter(): Intl.Segmenter {
|
|
12
|
+
if (!graphemeSegmenter) {
|
|
13
|
+
graphemeSegmenter = new Intl.Segmenter(undefined, {granularity: 'grapheme'});
|
|
14
|
+
}
|
|
15
|
+
return graphemeSegmenter;
|
|
16
|
+
}
|
|
8
17
|
|
|
9
18
|
export const escapeCharacters = (inputString: string, charsToEscape: string): string => {
|
|
10
19
|
let foundChar = false;
|
|
@@ -315,6 +324,15 @@ export const isExtendedKebabCase = (inputStr: string): boolean => {
|
|
|
315
324
|
return EXTENDED_KEBAB_CASE_REGEXP.test(inputStr);
|
|
316
325
|
};
|
|
317
326
|
|
|
327
|
+
/**
|
|
328
|
+
* Replaces any sequence of non-alphanumeric characters with a single dash, strips leading and
|
|
329
|
+
* trailing dashes, and converts letters to lowercase, leaving a kebab-case identifier usable as viewId.
|
|
330
|
+
* If the input contains only non-alphanumeric characters, returns a falsy empty string.
|
|
331
|
+
*/
|
|
332
|
+
export const sanitizeIdentifier = (id: string): Lowercase<string> => {
|
|
333
|
+
return id.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '') as Lowercase<string>;
|
|
334
|
+
};
|
|
335
|
+
|
|
318
336
|
export const toTitleCase = (inputStr: string): string => {
|
|
319
337
|
return inputStr.substring(0, 1).toUpperCase() + inputStr.substring(1);
|
|
320
338
|
};
|
|
@@ -415,8 +433,6 @@ export const trimMiddle = (str: string, maxLength: number): string => {
|
|
|
415
433
|
return str;
|
|
416
434
|
}
|
|
417
435
|
|
|
418
|
-
const segmenter = new Intl.Segmenter(undefined, {granularity: 'grapheme'});
|
|
419
|
-
|
|
420
436
|
// If the max length is so small it can't fit the ellipsis, just return the ellipsis.
|
|
421
437
|
const ellipsis = '…';
|
|
422
438
|
const ellipsisLength = 1;
|
|
@@ -429,6 +445,16 @@ export const trimMiddle = (str: string, maxLength: number): string => {
|
|
|
429
445
|
const leftCount = Math.ceil(freeSpace / 2);
|
|
430
446
|
const rightCount = Math.floor(freeSpace / 2);
|
|
431
447
|
|
|
448
|
+
// Printable ASCII characters (0x20-0x7E) cannot form multi-code-unit grapheme clusters.
|
|
449
|
+
// Checking one extra character inside each truncation boundary guarantees both slice boundaries
|
|
450
|
+
// fall between graphemes and the string contains at least maxLength + 1 graphemes.
|
|
451
|
+
if (PRINTABLE_ASCII_REGEX.test(str.slice(0, leftCount + 1)) &&
|
|
452
|
+
PRINTABLE_ASCII_REGEX.test(str.slice(str.length - rightCount - 1))) {
|
|
453
|
+
return str.slice(0, leftCount) + ellipsis + str.slice(str.length - rightCount);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
const segmenter = getGraphemeSegmenter();
|
|
457
|
+
|
|
432
458
|
let currentGraphemeCount = 0;
|
|
433
459
|
let leftEndIndex = 0;
|
|
434
460
|
|
|
@@ -475,7 +501,17 @@ export const trimEndWithMaxLength = (str: string, maxLength: number): string =>
|
|
|
475
501
|
|
|
476
502
|
const ellipsis = '…';
|
|
477
503
|
const ellipsisLength = 1;
|
|
478
|
-
|
|
504
|
+
if (maxLength <= ellipsisLength) {
|
|
505
|
+
return ellipsis;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
// Printable ASCII characters (0x20-0x7E) cannot form multi-code-unit grapheme clusters.
|
|
509
|
+
// Checking up to maxLength + 1 characters guarantees at least maxLength + 1 graphemes in O(maxLength).
|
|
510
|
+
if (PRINTABLE_ASCII_REGEX.test(str.slice(0, maxLength + 1))) {
|
|
511
|
+
return str.slice(0, maxLength - ellipsisLength) + ellipsis;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
const segmenter = getGraphemeSegmenter();
|
|
479
515
|
const iterator = segmenter.segment(str)[Symbol.iterator]();
|
|
480
516
|
|
|
481
517
|
let lastSegmentIndex = 0;
|
|
@@ -517,11 +553,11 @@ export const truncateToCodeUnitLength = (str: string, maxCodeUnits: number): str
|
|
|
517
553
|
if (str.length <= maxCodeUnits) {
|
|
518
554
|
return str;
|
|
519
555
|
}
|
|
520
|
-
if (
|
|
521
|
-
|
|
556
|
+
if (PRINTABLE_ASCII_REGEX.test(str.slice(0, maxCodeUnits + 1))) {
|
|
557
|
+
return str.slice(0, maxCodeUnits);
|
|
522
558
|
}
|
|
523
559
|
let lastSafeIndex = 0;
|
|
524
|
-
for (const {index, segment} of
|
|
560
|
+
for (const {index, segment} of getGraphemeSegmenter().segment(str)) {
|
|
525
561
|
if (index + segment.length > maxCodeUnits) {
|
|
526
562
|
break;
|
|
527
563
|
}
|
|
@@ -782,11 +818,16 @@ function isCsvFormula(value: string): boolean {
|
|
|
782
818
|
* the value with a single quote (`'`) tells spreadsheet apps to treat the
|
|
783
819
|
* cell as literal text (and they hide the leading `'` when displaying it).
|
|
784
820
|
* - Example without commas: `=SUM(A1:A2)` -> `'=SUM(A1:A2)`
|
|
785
|
-
* 2. RFC 4180
|
|
786
|
-
* If the cell also contains commas (`,`),
|
|
787
|
-
* it is wrapped in `"..."` (with inner `"`
|
|
788
|
-
* do not split the cell across columns or
|
|
821
|
+
* 2. Structural CSV quoting (RFC 4180, extended):
|
|
822
|
+
* If the cell also contains commas (`,`), semicolons (`;`), tabs, double
|
|
823
|
+
* quotes (`"`), or newlines, it is wrapped in `"..."` (with inner `"`
|
|
824
|
+
* doubled to `""`) so CSV parsers do not split the cell across columns or
|
|
825
|
+
* rows. `;` and tab are included because spreadsheet apps can use them as
|
|
826
|
+
* the column separator (for example, Excel in many locales uses `;`).
|
|
827
|
+
* Without quotes, `x;=1+1` would split into a new cell that starts with
|
|
828
|
+
* `=` and skips the `'` prefix from step 1.
|
|
789
829
|
* - Example with commas: `=SUM(1,2)` -> `"'=SUM(1,2)"`
|
|
830
|
+
* - Example with a semicolon: `x;=1+1` -> `"x;=1+1"`
|
|
790
831
|
* - Example starting with a literal quote: `"=SUM(1,2)"` -> `"""=SUM(1,2)"""`
|
|
791
832
|
* (not treated as a formula since the first character is `"`, not `=`).
|
|
792
833
|
*/
|
|
@@ -794,13 +835,13 @@ export const escapeCsvCell = function(value: string): string {
|
|
|
794
835
|
// Step 1: Prefix formula-like text with `'` so spreadsheets render it as literal text.
|
|
795
836
|
let escaped = isCsvFormula(value) ? `'${value}` : value;
|
|
796
837
|
|
|
797
|
-
// Step 2: Apply
|
|
798
|
-
//
|
|
838
|
+
// Step 2: Apply double-quoting if the cell contains quotes, any common
|
|
839
|
+
// column separator, or line breaks so the CSV structure stays intact.
|
|
799
840
|
if (escaped.includes('"')) {
|
|
800
841
|
escaped = escaped.replace(/"/g, '""');
|
|
801
842
|
return `"${escaped}"`;
|
|
802
843
|
}
|
|
803
|
-
if (
|
|
844
|
+
if (/[,;\t\r\n]/.test(escaped)) {
|
|
804
845
|
return `"${escaped}"`;
|
|
805
846
|
}
|
|
806
847
|
return escaped;
|
|
@@ -73,13 +73,19 @@ class NodeWorker implements Api.HostRuntime.Worker {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
set onerror(listener: (event: unknown) => void) {
|
|
76
|
-
void this.#workerPromise.then(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
void this.#workerPromise.then(
|
|
77
|
+
worker => {
|
|
78
|
+
worker.on('error', (error: Error) => {
|
|
79
|
+
if (!this.#disposed) {
|
|
80
|
+
listener({type: 'error', ...error, message: error.message, error});
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
(error: Error) => {
|
|
85
|
+
if (!this.#disposed) {
|
|
86
|
+
listener({type: 'error', ...error, message: error.message, error});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
83
89
|
}
|
|
84
90
|
}
|
|
85
91
|
|
|
@@ -34,9 +34,9 @@ export class DevToolsCDPConnection implements CDPConnection {
|
|
|
34
34
|
constructor(transport: ConnectionTransport) {
|
|
35
35
|
this.#transport = transport;
|
|
36
36
|
|
|
37
|
-
test.sendRawMessage = this
|
|
37
|
+
test.sendRawMessage = this.#sendRawMessageForTesting.bind(this);
|
|
38
38
|
|
|
39
|
-
this.#transport.setOnMessage(this
|
|
39
|
+
this.#transport.setOnMessage(this.#onMessage.bind(this));
|
|
40
40
|
this.#transport.setOnDisconnect(reason => {
|
|
41
41
|
this.#observers.forEach(observer => observer.onDisconnect(reason));
|
|
42
42
|
});
|
|
@@ -95,8 +95,7 @@ export class DevToolsCDPConnection implements CDPConnection {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
void {
|
|
98
|
+
#sendRawMessageForTesting(method: QualifiedName, params: Object|null, callback: Callback|null, sessionId = ''): void {
|
|
100
99
|
void this.send(method as Command, params as CommandParams<Command>, sessionId).then(response => {
|
|
101
100
|
if ('error' in response && response.error) {
|
|
102
101
|
callback?.(response.error, null);
|
|
@@ -106,7 +105,7 @@ export class DevToolsCDPConnection implements CDPConnection {
|
|
|
106
105
|
});
|
|
107
106
|
}
|
|
108
107
|
|
|
109
|
-
|
|
108
|
+
#onMessage(message: string|Object): void {
|
|
110
109
|
if (test.dumpProtocol) {
|
|
111
110
|
test.dumpProtocol('backend: ' + ((typeof message === 'string') ? message : JSON.stringify(message)));
|
|
112
111
|
}
|
|
@@ -512,6 +512,10 @@ interface DevToolsAiNaturalLanguageInterface {
|
|
|
512
512
|
enabled: boolean;
|
|
513
513
|
}
|
|
514
514
|
|
|
515
|
+
interface DevToolsPrivateVerificationTokens {
|
|
516
|
+
enabled: boolean;
|
|
517
|
+
}
|
|
518
|
+
|
|
515
519
|
/**
|
|
516
520
|
* The host configuration that we expect from the DevTools back-end.
|
|
517
521
|
*
|
|
@@ -571,6 +575,7 @@ export type HostConfig = Platform.TypeScriptUtilities.RecursivePartial<{
|
|
|
571
575
|
devToolsInstrumentationBreakpoints: DevToolsInstrumentationBreakpoints,
|
|
572
576
|
devToolsMobileSafeAreaEmulation: DevToolsMobileSafeAreaEmulation,
|
|
573
577
|
devToolsNetworkBackendLinking: DevToolsNetworkBackendLinking,
|
|
578
|
+
devToolsPrivateVerificationTokens: DevToolsPrivateVerificationTokens,
|
|
574
579
|
extensionsOnChromeUrls: ExtensionsOnChromeUrls,
|
|
575
580
|
devToolsComments: HostConfigDevToolsComments,
|
|
576
581
|
}>;
|
|
@@ -320,12 +320,12 @@ export class AccessibilityModel extends SDKModel<EventTypes> implements Protocol
|
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
nodesUpdated({nodes}: Protocol.Accessibility.NodesUpdatedEvent): void {
|
|
323
|
-
this
|
|
323
|
+
this.#createNodesFromPayload(nodes);
|
|
324
324
|
this.dispatchEventToListeners(Events.TREE_UPDATED, {});
|
|
325
325
|
return;
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
|
|
328
|
+
#createNodesFromPayload(payloadNodes: Protocol.Accessibility.AXNode[]): AccessibilityNode[] {
|
|
329
329
|
const accessibilityNodes = payloadNodes.map(node => {
|
|
330
330
|
const sdkNode = new AccessibilityNode(this, node);
|
|
331
331
|
return sdkNode;
|
|
@@ -345,7 +345,7 @@ export class AccessibilityModel extends SDKModel<EventTypes> implements Protocol
|
|
|
345
345
|
if (!node) {
|
|
346
346
|
return;
|
|
347
347
|
}
|
|
348
|
-
return this
|
|
348
|
+
return this.#createNodesFromPayload([node])[0];
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
async requestAXChildren(nodeId: Protocol.Accessibility.AXNodeId, frameId?: Protocol.Page.FrameId):
|
|
@@ -366,7 +366,7 @@ export class AccessibilityModel extends SDKModel<EventTypes> implements Protocol
|
|
|
366
366
|
this.#pendingChildRequests.set(nodeId, request);
|
|
367
367
|
const result = await request;
|
|
368
368
|
if (!result.getError()) {
|
|
369
|
-
this
|
|
369
|
+
this.#createNodesFromPayload(result.nodes);
|
|
370
370
|
this.#pendingChildRequests.delete(nodeId);
|
|
371
371
|
}
|
|
372
372
|
}
|
|
@@ -389,7 +389,7 @@ export class AccessibilityModel extends SDKModel<EventTypes> implements Protocol
|
|
|
389
389
|
if (!nodes) {
|
|
390
390
|
return null;
|
|
391
391
|
}
|
|
392
|
-
const ancestors = this
|
|
392
|
+
const ancestors = this.#createNodesFromPayload(nodes);
|
|
393
393
|
|
|
394
394
|
return ancestors;
|
|
395
395
|
}
|
|
@@ -217,16 +217,16 @@ export class AnimationModel extends SDKModel<EventTypes> {
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
const resourceTreeModel = (target.model(ResourceTreeModel) as ResourceTreeModel);
|
|
220
|
-
resourceTreeModel.addEventListener(ResourceTreeModelEvents.PrimaryPageChanged, this
|
|
220
|
+
resourceTreeModel.addEventListener(ResourceTreeModelEvents.PrimaryPageChanged, this.#reset, this);
|
|
221
221
|
|
|
222
222
|
this.#flushPendingAnimations = Common.Debouncer.debounce(() => {
|
|
223
223
|
while (this.#pendingAnimations.size) {
|
|
224
|
-
this
|
|
224
|
+
this.#matchExistingGroups(this.#createGroupFromPendingAnimations());
|
|
225
225
|
}
|
|
226
226
|
}, 100);
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
|
|
229
|
+
#reset(): void {
|
|
230
230
|
this.#animationsById.clear();
|
|
231
231
|
this.animationGroups.clear();
|
|
232
232
|
this.#pendingAnimations.clear();
|
|
@@ -299,7 +299,7 @@ export class AnimationModel extends SDKModel<EventTypes> {
|
|
|
299
299
|
this.#flushPendingAnimations();
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
|
|
302
|
+
#matchExistingGroups(incomingGroup: AnimationGroup): boolean {
|
|
303
303
|
let matchedGroup: AnimationGroup|null = null;
|
|
304
304
|
for (const group of this.animationGroups.values()) {
|
|
305
305
|
if (group.matches(incomingGroup)) {
|
|
@@ -324,7 +324,7 @@ export class AnimationModel extends SDKModel<EventTypes> {
|
|
|
324
324
|
return Boolean(matchedGroup);
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
|
|
327
|
+
#createGroupFromPendingAnimations(): AnimationGroup {
|
|
328
328
|
console.assert(this.#pendingAnimations.size > 0);
|
|
329
329
|
const firstAnimationId = this.#pendingAnimations.values().next().value as string;
|
|
330
330
|
this.#pendingAnimations.delete(firstAnimationId);
|
|
@@ -362,7 +362,7 @@ export class AnimationModel extends SDKModel<EventTypes> {
|
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
override async suspendModel(): Promise<void> {
|
|
365
|
-
await this.agent.invoke_disable().then(() => this
|
|
365
|
+
await this.agent.invoke_disable().then(() => this.#reset());
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
override async resumeModel(): Promise<void> {
|
|
@@ -429,8 +429,7 @@ export class AnimationImpl {
|
|
|
429
429
|
// from the scroll container and ends at `endOffset`px of the scroll container.
|
|
430
430
|
// This takes a percentage of the timeline range and returns the absolute
|
|
431
431
|
// pixels values as a scroll offset of the scroll container.
|
|
432
|
-
|
|
433
|
-
number {
|
|
432
|
+
#percentageToPixels(percentage: number, viewOrScrollTimeline: Protocol.Animation.ViewOrScrollTimeline): number {
|
|
434
433
|
const {startOffset, endOffset} = viewOrScrollTimeline;
|
|
435
434
|
if (startOffset === undefined || endOffset === undefined) {
|
|
436
435
|
// We don't expect this situation to occur since after an animation is started
|
|
@@ -472,9 +471,8 @@ export class AnimationImpl {
|
|
|
472
471
|
startTime(): number {
|
|
473
472
|
const viewOrScrollTimeline = this.viewOrScrollTimeline();
|
|
474
473
|
if (viewOrScrollTimeline) {
|
|
475
|
-
return this
|
|
476
|
-
|
|
477
|
-
viewOrScrollTimeline) +
|
|
474
|
+
return this.#percentageToPixels(this.playbackRate() > 0 ? this.#payload.startTime : 100 - this.#payload.startTime,
|
|
475
|
+
viewOrScrollTimeline) +
|
|
478
476
|
(this.viewOrScrollTimeline()?.startOffset ?? 0);
|
|
479
477
|
}
|
|
480
478
|
|
|
@@ -486,7 +484,7 @@ export class AnimationImpl {
|
|
|
486
484
|
iterationDuration(): number {
|
|
487
485
|
const viewOrScrollTimeline = this.viewOrScrollTimeline();
|
|
488
486
|
if (viewOrScrollTimeline) {
|
|
489
|
-
return this
|
|
487
|
+
return this.#percentageToPixels(this.source().duration(), viewOrScrollTimeline);
|
|
490
488
|
}
|
|
491
489
|
|
|
492
490
|
return this.source().duration();
|
|
@@ -523,7 +521,7 @@ export class AnimationImpl {
|
|
|
523
521
|
currentTime(): number {
|
|
524
522
|
const viewOrScrollTimeline = this.viewOrScrollTimeline();
|
|
525
523
|
if (viewOrScrollTimeline) {
|
|
526
|
-
return this
|
|
524
|
+
return this.#percentageToPixels(this.#payload.currentTime, viewOrScrollTimeline);
|
|
527
525
|
}
|
|
528
526
|
|
|
529
527
|
return this.#payload.currentTime;
|
|
@@ -564,14 +562,14 @@ export class AnimationImpl {
|
|
|
564
562
|
if (!node) {
|
|
565
563
|
throw new Error('Unable to find node');
|
|
566
564
|
}
|
|
567
|
-
this
|
|
565
|
+
this.#updateNodeStyle(duration, delay, node);
|
|
568
566
|
});
|
|
569
567
|
this.#source.durationInternal = duration;
|
|
570
568
|
this.#source.delayInternal = delay;
|
|
571
569
|
void this.#animationModel.agent.invoke_setTiming({animationId: this.id(), duration, delay});
|
|
572
570
|
}
|
|
573
571
|
|
|
574
|
-
|
|
572
|
+
#updateNodeStyle(duration: number, delay: number, node: DOMNode): void {
|
|
575
573
|
let animationPrefix;
|
|
576
574
|
if (this.type() === Protocol.Animation.AnimationType.CSSTransition) {
|
|
577
575
|
animationPrefix = 'transition-';
|
|
@@ -765,10 +763,10 @@ export class AnimationGroup {
|
|
|
765
763
|
|
|
766
764
|
release(): void {
|
|
767
765
|
this.#animationModel.animationGroups.delete(this.id());
|
|
768
|
-
this.#animationModel.releaseAnimations(this
|
|
766
|
+
this.#animationModel.releaseAnimations(this.#animationIds());
|
|
769
767
|
}
|
|
770
768
|
|
|
771
|
-
|
|
769
|
+
#animationIds(): string[] {
|
|
772
770
|
function extractId(animation: AnimationImpl): string {
|
|
773
771
|
return animation.id();
|
|
774
772
|
}
|
|
@@ -854,7 +852,7 @@ export class AnimationGroup {
|
|
|
854
852
|
return;
|
|
855
853
|
}
|
|
856
854
|
this.#paused = paused;
|
|
857
|
-
void this.#animationModel.agent.invoke_setPaused({animations: this
|
|
855
|
+
void this.#animationModel.agent.invoke_setPaused({animations: this.#animationIds(), paused});
|
|
858
856
|
}
|
|
859
857
|
|
|
860
858
|
currentTimePromise(): Promise<number> {
|
|
@@ -907,7 +905,7 @@ export class AnimationGroup {
|
|
|
907
905
|
}
|
|
908
906
|
|
|
909
907
|
rebaseTo(group: AnimationGroup): void {
|
|
910
|
-
this.#animationModel.releaseAnimations(this
|
|
908
|
+
this.#animationModel.releaseAnimations(this.#animationIds());
|
|
911
909
|
this.#animations = group.#animations;
|
|
912
910
|
this.#scrollNode = undefined;
|
|
913
911
|
}
|
|
@@ -52,7 +52,7 @@ export class CPUProfilerModel extends SDKModel<EventTypes> implements ProtocolPr
|
|
|
52
52
|
title = i18nString(UIStrings.profileD, {PH1: this.#nextAnonymousConsoleProfileNumber++});
|
|
53
53
|
this.#anonymousConsoleProfileIdToTitle.set(id, title);
|
|
54
54
|
}
|
|
55
|
-
const eventData = this
|
|
55
|
+
const eventData = this.#createEventDataFrom(id, location, title);
|
|
56
56
|
this.dispatchEventToListeners(Events.CONSOLE_PROFILE_STARTED, eventData);
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -61,11 +61,11 @@ export class CPUProfilerModel extends SDKModel<EventTypes> implements ProtocolPr
|
|
|
61
61
|
title = this.#anonymousConsoleProfileIdToTitle.get(id);
|
|
62
62
|
this.#anonymousConsoleProfileIdToTitle.delete(id);
|
|
63
63
|
}
|
|
64
|
-
const eventData = new ProfileFinishedData(this
|
|
64
|
+
const eventData = new ProfileFinishedData(this.#createEventDataFrom(id, location, title), profile);
|
|
65
65
|
this.dispatchEventToListeners(Events.CONSOLE_PROFILE_FINISHED, eventData);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
#createEventDataFrom(id: string, scriptLocation: Protocol.Debugger.Location, title?: string): EventData {
|
|
69
69
|
const debuggerLocation = Location.fromPayload(this.#debuggerModel, scriptLocation);
|
|
70
70
|
const globalId = this.target().id() + '.' + id;
|
|
71
71
|
return {
|
|
@@ -75,6 +75,7 @@ export class CPUThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Eve
|
|
|
75
75
|
|
|
76
76
|
initialize(): void {
|
|
77
77
|
this.#targetManager.observeModels(EmulationModel, this);
|
|
78
|
+
this.#calibratedCpuThrottlingSetting.addChangeListener(this.#onCalibratedCPUThrottlingSettingChanged, this);
|
|
78
79
|
this.#cpuPerformanceSetting.addChangeListener(this.#onCPUPerformanceSettingChanged, this);
|
|
79
80
|
this.#onCPUPerformanceSettingChanged();
|
|
80
81
|
}
|
|
@@ -182,6 +183,12 @@ export class CPUThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Eve
|
|
|
182
183
|
return this.calculatedCPUPerformanceTier();
|
|
183
184
|
}
|
|
184
185
|
|
|
186
|
+
#onCalibratedCPUThrottlingSettingChanged(): void {
|
|
187
|
+
if (this.#manualCPUPerformanceOverride === undefined) {
|
|
188
|
+
this.#syncCPUPerformanceTier();
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
185
192
|
#onCPUPerformanceSettingChanged(): void {
|
|
186
193
|
const val = this.#cpuPerformanceSetting.get();
|
|
187
194
|
this.#manualCPUPerformanceOverride = val === 'no-override' ? undefined : val as CPUPerformanceTier;
|