chrome-devtools-frontend 1.0.1713292 → 1.0.1716465
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/AUTHORS +1 -0
- package/DIR_METADATA +0 -4
- package/eslint.config.mjs +2 -0
- package/front_end/core/host/Platform.ts +37 -0
- package/front_end/core/host/UserMetricsEnums.ts +5 -2
- package/front_end/core/platform/browser/HostRuntime.ts +3 -3
- package/front_end/core/sdk/CSSProperty.ts +2 -1
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +4 -1
- package/front_end/core/sdk/DebuggerModel.ts +26 -11
- package/front_end/core/sdk/PageFunctions.ts +7 -2
- package/front_end/core/sdk/ResourceTreeModel.ts +9 -0
- package/front_end/core/sdk/RuntimeModel.ts +6 -3
- package/front_end/core/sdk/SDKSettings.ts +7 -0
- package/front_end/core/sdk/ServerSentEventsProtocol.ts +4 -2
- package/front_end/core/sdk/SourceMap.ts +0 -5
- package/front_end/core/sdk/SourceMapFunctionRanges.ts +4 -1
- package/front_end/core/sdk/SourceMapScopesInfo.ts +8 -18
- package/front_end/devtools_compatibility.js +5 -2
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +56 -6
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +29 -6
- package/front_end/entrypoints/main/MainImpl.ts +6 -14
- package/front_end/generated/Deprecation.ts +8 -7
- package/front_end/generated/InspectorBackendCommands.ts +4 -3
- package/front_end/generated/protocol-mapping.d.ts +10 -0
- package/front_end/generated/protocol-proxy-api.d.ts +8 -0
- package/front_end/generated/protocol.ts +14 -2
- package/front_end/models/ai_assistance/AiAgent2.ts +0 -1
- package/front_end/models/ai_assistance/README.md +2 -2
- package/front_end/models/ai_assistance/agents/AiAgent.ts +179 -13
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +7 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +11 -16
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
- package/front_end/models/ai_assistance/skills/SkillRegistry.ts +0 -2
- package/front_end/models/ai_assistance/skills/lighthouse.md +28 -9
- package/front_end/models/ai_assistance/skills/performance.md +10 -6
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +0 -3
- package/front_end/models/ai_assistance/tools/RecordPerformanceTrace.ts +1 -1
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +12 -0
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +1 -1
- package/front_end/models/ai_assistance/tools/Tool.ts +11 -2
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +25 -11
- package/front_end/models/bindings/DefaultScriptMapping.ts +8 -2
- package/front_end/models/bindings/SourceMapStepping.ts +66 -5
- package/front_end/models/comment_manager/CommentManager.ts +8 -0
- package/front_end/models/emulation/DeviceModeModel.ts +4 -19
- package/front_end/models/formatter/ScriptFormatter.ts +6 -7
- package/front_end/models/javascript_metadata/NativeFunctions.ts +18 -58
- package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +9 -12
- package/front_end/models/trace/LanternComputationData.ts +9 -14
- package/front_end/models/trace/ModelImpl.ts +1 -1
- package/front_end/models/trace/extras/TraceTree.ts +44 -13
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +1 -1
- package/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +2 -2
- package/front_end/models/trace/handlers/Threads.ts +1 -1
- package/front_end/models/trace/handlers/helpers.ts +1 -1
- package/front_end/models/trace/helpers/SamplesIntegrator.ts +71 -59
- package/front_end/models/trace/insights/CLSCulprits.ts +2 -2
- package/front_end/models/trace/insights/Common.ts +3 -2
- package/front_end/models/trace/insights/ImageDelivery.ts +3 -2
- package/front_end/models/trace/insights/RenderBlocking.ts +28 -6
- package/front_end/models/trace/lantern/core/NetworkAnalyzer.ts +12 -20
- package/front_end/models/trace/lantern/graph/CPUNode.ts +26 -7
- package/front_end/models/trace/lantern/graph/PageDependencyGraph.ts +27 -2
- package/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +8 -2
- package/front_end/models/trace/lantern/simulation/Simulator.ts +5 -2
- package/front_end/models/trace/lantern/simulation/TCPConnection.ts +1 -1
- package/front_end/models/trace/lantern/types/Lantern.ts +10 -0
- package/front_end/models/trace/types/File.ts +3 -3
- package/front_end/models/trace/types/Overlays.ts +4 -3
- package/front_end/models/trace/types/TraceEvents.ts +39 -35
- package/front_end/models/workspace/IgnoreListManager.ts +38 -6
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +5 -3
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +34 -4
- package/front_end/panels/ai_assistance/README.md +55 -14
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +4 -6
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +0 -8
- package/front_end/panels/application/FrameDetailsView.ts +84 -0
- package/front_end/panels/application/ResourcesPanel.ts +3 -4
- package/front_end/panels/application/WebMCPView.ts +5 -5
- package/front_end/panels/application/preloading/PreloadingView.ts +6 -3
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +5 -2
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +5 -2
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +7 -3
- package/front_end/panels/comments/CommentsPane.ts +65 -23
- package/front_end/panels/comments/commentsPane.css +11 -0
- package/front_end/panels/common/CommentThreadWidget.ts +129 -18
- package/front_end/panels/common/CommentsOverlayWidget.ts +33 -9
- package/front_end/panels/common/CommentsStatusBarPill.ts +8 -39
- package/front_end/panels/common/ExtensionServer.ts +84 -26
- package/front_end/panels/console/PromptBuilder.ts +5 -2
- package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +1 -118
- package/front_end/panels/elements/DOMPath.ts +38 -5
- package/front_end/panels/elements/DOMTreeContextMenu.ts +13 -8
- package/front_end/panels/elements/{ElementsTreeElement.ts → DOMTreeElementWidget.ts} +110 -472
- package/front_end/panels/elements/DOMTreeWidget.ts +74 -1253
- package/front_end/panels/elements/StylePropertiesSection.ts +3 -3
- package/front_end/panels/elements/StylePropertyTreeElement.ts +2 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +3 -1
- package/front_end/panels/elements/{elementsTreeOutline.css → domTreeWidget.css} +3 -178
- package/front_end/panels/elements/elements.ts +3 -6
- package/front_end/panels/emulation/DeviceModeToolbar.ts +0 -8
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +13 -17
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryViewer.ts +234 -182
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryViewer.css +63 -56
- package/front_end/panels/media/PlayerPropertiesView.ts +4 -4
- package/front_end/panels/network/RequestPreviewView.ts +2 -6
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +5 -2
- package/front_end/panels/profiler/HeapSnapshotView.ts +5 -2
- package/front_end/panels/profiler/ProfilesPanel.ts +2 -6
- package/front_end/panels/protocol_monitor/JSONEditor.ts +10 -3
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +6 -5
- package/front_end/panels/recorder/RecorderPanel.ts +2 -1
- package/front_end/panels/recorder/RecordingView.ts +1 -1
- package/front_end/panels/recorder/StepView.ts +5 -3
- package/front_end/panels/recorder/stepView.css +4 -0
- package/front_end/panels/security/SecurityPanel.ts +163 -100
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +36 -19
- package/front_end/panels/sources/DebuggerPlugin.ts +129 -82
- package/front_end/panels/sources/EditorHistory.ts +172 -0
- package/front_end/panels/sources/Plugin.ts +2 -2
- package/front_end/panels/sources/SnippetsPlugin.ts +20 -6
- package/front_end/panels/sources/SourcesPanel.ts +58 -8
- package/front_end/panels/sources/SourcesView.ts +135 -127
- package/front_end/panels/sources/TabbedEditorContainer.ts +262 -420
- package/front_end/panels/sources/UISourceCodeFrame.ts +9 -7
- package/front_end/panels/sources/sources-meta.ts +26 -63
- package/front_end/panels/sources/sources.ts +2 -0
- package/front_end/panels/sources/tabbedEditorContainer.css +98 -0
- package/front_end/panels/timeline/README.md +3 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +8 -13
- package/front_end/panels/timeline/components/DetailsView.ts +4 -4
- package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -2
- package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +5 -8
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +22 -36
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +9 -0
- package/front_end/panels/timeline/timelineFlameChartView.css +1 -42
- package/front_end/panels/whats_new/ReleaseNoteText.ts +8 -8
- package/front_end/panels/whats_new/resources/WNDT.md +5 -5
- 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 +337 -161
- package/front_end/third_party/legacy-javascript/package.json +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +77 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +474 -358
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts +15 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js +27 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts +13 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.js +38 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +20 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js +9 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserContext.js +6 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ExposedFunction.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ExposedFunction.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js +9 -8
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js +9 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/UserPrompt.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/UserPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/util.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/util.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +11 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.js +9 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js +7 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebWorker.js +9 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +9 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts +8 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.d.ts +24 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.js +30 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/CustomQueryHandler.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/CustomQueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/util.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +7 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts +10 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js +7 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +77 -0
- package/front_end/third_party/puppeteer/package/package.json +7 -7
- package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +30 -0
- package/front_end/third_party/puppeteer/package/src/api/HTTPResponse.ts +41 -0
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +20 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +2 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Realm.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/util.ts +3 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +9 -2
- package/front_end/third_party/puppeteer/package/src/cdp/EmulationManager.ts +10 -3
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +11 -2
- package/front_end/third_party/puppeteer/package/src/cdp/WebWorker.ts +19 -2
- package/front_end/third_party/puppeteer/package/src/cdp/utils.ts +6 -1
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +10 -2
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +9 -0
- package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +35 -0
- package/front_end/third_party/puppeteer/package/src/common/CustomQueryHandler.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/injected/util.ts +6 -2
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +7 -2
- package/front_end/third_party/puppeteer/package/src/node/NodeWebSocketTransport.ts +12 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +105 -39
- package/front_end/ui/comments/CommentOverlayManager.ts +37 -15
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +1 -2
- package/front_end/ui/components/text_editor/config.ts +32 -26
- package/front_end/ui/legacy/InspectorView.ts +13 -12
- package/front_end/ui/legacy/ProgressIndicator.ts +18 -0
- package/front_end/ui/legacy/SearchableView.ts +406 -308
- package/front_end/ui/legacy/SplitWidget.ts +30 -11
- package/front_end/ui/legacy/StackPane.ts +1 -2
- package/front_end/ui/legacy/StackedPane.ts +1 -2
- package/front_end/ui/legacy/TabbedPane.ts +19 -3
- package/front_end/ui/legacy/Toolbar.ts +2 -2
- package/front_end/ui/legacy/UIUtils.ts +1 -46
- package/front_end/ui/legacy/View.ts +5 -5
- package/front_end/ui/legacy/ViewManager.ts +8 -14
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +4 -0
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +98 -65
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +59 -26
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +165 -56
- package/front_end/ui/legacy/components/source_frame/imageView.css +27 -25
- package/front_end/ui/legacy/components/source_frame/resourceSourceFrame.css +8 -6
- package/front_end/ui/legacy/components/source_frame/source_frame-meta.ts +3 -5
- package/front_end/ui/legacy/inspectorCommon.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +0 -91
- package/front_end/ui/settings/SourcesSettings.ts +62 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/package.json +1 -1
- package/front_end/models/ai_assistance/skills/accessibility.md +0 -33
- package/front_end/panels/common/commentsStatusBarPill.css +0 -13
- package/front_end/panels/elements/ShortcutTreeElement.ts +0 -172
- package/front_end/panels/elements/TopLayerContainer.ts +0 -54
package/AUTHORS
CHANGED
|
@@ -53,6 +53,7 @@ Han Xu <suyanhanx@gmail.com>
|
|
|
53
53
|
Helmut Januschka <helmut@januschka.com>
|
|
54
54
|
Henry Lim <henry@limhenry.xyz>
|
|
55
55
|
Hojeong Park <parkhj062@gmail.com>
|
|
56
|
+
Hubert Gajewski <hubert@hubertgajewski.com>
|
|
56
57
|
Ivan Akulov <gxoptg@gmail.com>
|
|
57
58
|
Jacky Hu <flameddd@gmail.com>
|
|
58
59
|
Jake Mulhern <mulherje@gmail.com>
|
package/DIR_METADATA
CHANGED
|
@@ -4,11 +4,9 @@ buganizer_public: {
|
|
|
4
4
|
}
|
|
5
5
|
agentic_review: {
|
|
6
6
|
capability_groups: {
|
|
7
|
-
name: "core-review"
|
|
8
7
|
review_capability_skills: [".agents/skills/code-review/SKILL.md"]
|
|
9
8
|
}
|
|
10
9
|
capability_groups: {
|
|
11
|
-
name: "typescript-and-models"
|
|
12
10
|
path_expression: ["front_end/.*\\.ts", ".*BUILD\\.gn", ".*\\.gni"]
|
|
13
11
|
path_expression_exclusion: [".*\\.test\\.ts"]
|
|
14
12
|
review_capability_skills: [
|
|
@@ -20,7 +18,6 @@ agentic_review: {
|
|
|
20
18
|
]
|
|
21
19
|
}
|
|
22
20
|
capability_groups: {
|
|
23
|
-
name: "ui-and-widgets"
|
|
24
21
|
path_expression: ["front_end/(panels|ui)/.*\\.(ts|css)"]
|
|
25
22
|
path_expression_exclusion: [".*\\.test\\.ts"]
|
|
26
23
|
review_capability_skills: [
|
|
@@ -29,7 +26,6 @@ agentic_review: {
|
|
|
29
26
|
]
|
|
30
27
|
}
|
|
31
28
|
capability_groups: {
|
|
32
|
-
name: "tests"
|
|
33
29
|
path_expression: [".*\\.test\\.ts", "test/.*\\.ts"]
|
|
34
30
|
review_capability_skills: [
|
|
35
31
|
".agents/skills/devtools-testing-guidance/SKILL.md",
|
package/eslint.config.mjs
CHANGED
|
@@ -61,6 +61,7 @@ export default defineConfig([
|
|
|
61
61
|
'scripts/deps/tests/fixtures',
|
|
62
62
|
'scripts/gn_deps_verifier/tests/fixtures',
|
|
63
63
|
'test/**/fixtures/',
|
|
64
|
+
'test/ai_evals/eval_data/',
|
|
64
65
|
'test/e2e/**/*.js',
|
|
65
66
|
'test/shared/**/*.js',
|
|
66
67
|
'extensions/cxx_debugging/tests/inputs/',
|
|
@@ -375,6 +376,7 @@ export default defineConfig([
|
|
|
375
376
|
'error',
|
|
376
377
|
{
|
|
377
378
|
argsIgnorePattern: '^_',
|
|
379
|
+
ignoreUsingDeclarations: true,
|
|
378
380
|
},
|
|
379
381
|
],
|
|
380
382
|
|
|
@@ -69,3 +69,40 @@ export function fontFamily(): string {
|
|
|
69
69
|
export function setFontFamilyForTests(family: string): void {
|
|
70
70
|
_fontFamily = family;
|
|
71
71
|
}
|
|
72
|
+
|
|
73
|
+
let _isRemoteDevtoolsFrontend: boolean|undefined;
|
|
74
|
+
let _locationForTest: string|undefined;
|
|
75
|
+
|
|
76
|
+
export function setLocationForTest(url: string|undefined): void {
|
|
77
|
+
_locationForTest = url;
|
|
78
|
+
_isRemoteDevtoolsFrontend = undefined;
|
|
79
|
+
_isCustomDevtoolsFrontend = undefined;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function isRemoteDevtoolsFrontend(): boolean {
|
|
83
|
+
if (typeof _isRemoteDevtoolsFrontend === 'undefined') {
|
|
84
|
+
const location = (globalThis as unknown as {location?: {toString(): string}}).location;
|
|
85
|
+
const url = _locationForTest ?? (location ? location.toString() : '');
|
|
86
|
+
_isRemoteDevtoolsFrontend = url.startsWith('devtools://devtools-remote/');
|
|
87
|
+
}
|
|
88
|
+
return _isRemoteDevtoolsFrontend ?? false;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
let _isCustomDevtoolsFrontend: boolean|undefined;
|
|
92
|
+
|
|
93
|
+
export function isCustomDevtoolsFrontend(): boolean {
|
|
94
|
+
if (typeof _isCustomDevtoolsFrontend === 'undefined') {
|
|
95
|
+
const location = (globalThis as unknown as {location?: {toString(): string}}).location;
|
|
96
|
+
const url = _locationForTest ?? (location ? location.toString() : '');
|
|
97
|
+
_isCustomDevtoolsFrontend = url.startsWith('devtools://devtools/custom/');
|
|
98
|
+
}
|
|
99
|
+
return _isCustomDevtoolsFrontend ?? false;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function setIsRemoteDevtoolsFrontendForTest(isRemote: boolean|undefined): void {
|
|
103
|
+
_isRemoteDevtoolsFrontend = isRemote;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function setIsCustomDevtoolsFrontendForTest(isCustom: boolean|undefined): void {
|
|
107
|
+
_isCustomDevtoolsFrontend = isCustom;
|
|
108
|
+
}
|
|
@@ -633,9 +633,12 @@ export enum IssueCreated {
|
|
|
633
633
|
'CorsIssue::LocalNetworkAccessPermissionDenied' = 111,
|
|
634
634
|
'SRIMessageSignatureIssue::ValidationFailedIntegrityMismatch' = 112,
|
|
635
635
|
'ElementAccessibilityIssue::InteractiveContentSummaryDescendant' = 113,
|
|
636
|
-
'
|
|
636
|
+
'GenericIssue::AutofillAndManualTextPolicyControlledFeaturesInfo' = 114,
|
|
637
|
+
'GenericIssue::AutofillPolicyControlledFeatureInfo' = 115,
|
|
638
|
+
'GenericIssue::ManualTextPolicyControlledFeatureInfo' = 116,
|
|
639
|
+
'CorsIssue::InvalidLocalNetworkAccess' = 118,
|
|
637
640
|
/* eslint-enable @typescript-eslint/naming-convention */
|
|
638
|
-
MAX_VALUE =
|
|
641
|
+
MAX_VALUE = 119,
|
|
639
642
|
}
|
|
640
643
|
|
|
641
644
|
export enum DeveloperResourceLoaded {
|
|
@@ -95,17 +95,17 @@ async function saveScreenshot(options: Api.HostRuntime.ScreenshotOptions): Promi
|
|
|
95
95
|
const contentTop = options.clip.visiblePageRectTop * scale;
|
|
96
96
|
|
|
97
97
|
canvas = new OffscreenCanvas(
|
|
98
|
-
Math.
|
|
98
|
+
Math.round(screenRectWidth),
|
|
99
99
|
// Cap the height to not hit the GPU limit.
|
|
100
100
|
// https://crbug.com/1260828
|
|
101
|
-
Math.min(1 << 14, Math.
|
|
101
|
+
Math.min(1 << 14, Math.round(screenRectHeight)),
|
|
102
102
|
);
|
|
103
103
|
const ctx = canvas.getContext('2d', {willReadFrequently: true});
|
|
104
104
|
if (!ctx) {
|
|
105
105
|
throw new Error('Could not get 2d context from canvas.');
|
|
106
106
|
}
|
|
107
107
|
ctx.imageSmoothingEnabled = false;
|
|
108
|
-
ctx.drawImage(pageImage, Math.
|
|
108
|
+
ctx.drawImage(pageImage, Math.round(contentLeft), Math.round(contentTop));
|
|
109
109
|
} else {
|
|
110
110
|
canvas = new OffscreenCanvas(
|
|
111
111
|
pageImage.naturalWidth,
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
} from './CSSPropertyParser.js';
|
|
21
21
|
import {CSSWideKeywordMatcher} from './CSSPropertyParserMatchers.js';
|
|
22
22
|
import type {CSSStyleDeclaration} from './CSSStyleDeclaration.js';
|
|
23
|
+
import {textEditorIndentSettingDescriptor} from './SDKSettings.js';
|
|
23
24
|
|
|
24
25
|
export const enum Events {
|
|
25
26
|
LOCAL_VALUE_UPDATED = 'localValueUpdated',
|
|
@@ -221,7 +222,7 @@ export class CSSProperty extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
221
222
|
const range = this.range.relativeTo(this.ownerStyle.range.startLine, this.ownerStyle.range.startColumn);
|
|
222
223
|
const indentation = this.ownerStyle.cssText ?
|
|
223
224
|
this.detectIndentation(this.ownerStyle.cssText) :
|
|
224
|
-
this.ownerStyle.cssModel().target().targetManager().settings.
|
|
225
|
+
this.ownerStyle.cssModel().target().targetManager().settings.resolve(textEditorIndentSettingDescriptor).get();
|
|
225
226
|
const endIndentation = this.ownerStyle.cssText ? indentation.substring(0, this.ownerStyle.range.endColumn) : '';
|
|
226
227
|
const text = new TextUtils.Text.Text(this.ownerStyle.cssText || '');
|
|
227
228
|
const newStyleText = text.replaceRange(range, Platform.StringUtilities.sprintf(';%s;', propertyText));
|
|
@@ -85,7 +85,10 @@ export class BaseVariableMatcher extends BaseVariableMatcherBase {
|
|
|
85
85
|
return null;
|
|
86
86
|
}
|
|
87
87
|
const nameNode = args[0][0];
|
|
88
|
-
|
|
88
|
+
// Skip the first comma and closing parenthesis, preserving commas in the fallback.
|
|
89
|
+
const fallback = args.length > 1 ?
|
|
90
|
+
Array.from(ASTUtils.stripComments(ASTUtils.siblings(nameNode.nextSibling))).slice(1, -1) :
|
|
91
|
+
undefined;
|
|
89
92
|
|
|
90
93
|
if (!isVariableNameNode(nameNode, matching.ast)) {
|
|
91
94
|
return null;
|
|
@@ -134,10 +134,14 @@ export const enum StepMode {
|
|
|
134
134
|
STEP_OVER = 'StepOver',
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
/**
|
|
137
|
+
/**
|
|
138
|
+
* A CDP step command. `ranges` is passed as `skipList` to stepInto/stepOver, and ignored for stepOut. `enterRanges` is
|
|
139
|
+
* passed as `enterRanges` to stepOver: functions within them are entered as if by stepInto.
|
|
140
|
+
*/
|
|
138
141
|
export interface AutoStep {
|
|
139
142
|
readonly command: StepMode;
|
|
140
143
|
readonly ranges: readonly LocationRange[];
|
|
144
|
+
readonly enterRanges?: readonly LocationRange[];
|
|
141
145
|
}
|
|
142
146
|
|
|
143
147
|
/**
|
|
@@ -478,20 +482,25 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
478
482
|
this.#issueStep(step, breakOnAsyncCall);
|
|
479
483
|
}
|
|
480
484
|
|
|
481
|
-
#issueStep({command, ranges}: AutoStep, breakOnAsyncCall = false): void {
|
|
482
|
-
const
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
485
|
+
#issueStep({command, ranges, enterRanges}: AutoStep, breakOnAsyncCall = false): void {
|
|
486
|
+
const toProtocolRange = ({start, end}: LocationRange): Protocol.Debugger.LocationRange => ({
|
|
487
|
+
scriptId: start.scriptId,
|
|
488
|
+
start: {lineNumber: start.lineNumber, columnNumber: start.columnNumber},
|
|
489
|
+
end: {lineNumber: end.lineNumber, columnNumber: end.columnNumber},
|
|
490
|
+
});
|
|
491
|
+
const skipList = sortAndMergeRanges(ranges.map(toProtocolRange));
|
|
488
492
|
switch (command) {
|
|
489
493
|
case StepMode.STEP_INTO:
|
|
490
494
|
void this.agent.invoke_stepInto({breakOnAsyncCall, skipList});
|
|
491
495
|
break;
|
|
492
|
-
case StepMode.STEP_OVER:
|
|
493
|
-
|
|
496
|
+
case StepMode.STEP_OVER: {
|
|
497
|
+
const request: Protocol.Debugger.StepOverRequest = {skipList};
|
|
498
|
+
if (enterRanges?.length) {
|
|
499
|
+
request.enterRanges = sortAndMergeRanges(enterRanges.map(toProtocolRange));
|
|
500
|
+
}
|
|
501
|
+
void this.agent.invoke_stepOver(request);
|
|
494
502
|
break;
|
|
503
|
+
}
|
|
495
504
|
case StepMode.STEP_OUT:
|
|
496
505
|
void this.agent.invoke_stepOut();
|
|
497
506
|
break;
|
|
@@ -500,6 +509,11 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
500
509
|
|
|
501
510
|
resume(): void {
|
|
502
511
|
this.#stepContext = null;
|
|
512
|
+
this.#resumeBackend();
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/** Resumes without touching the step context. */
|
|
516
|
+
#resumeBackend(): void {
|
|
503
517
|
void this.agent.invoke_resume({terminateOnResume: false});
|
|
504
518
|
this.#isPausing = false;
|
|
505
519
|
}
|
|
@@ -682,7 +696,8 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
|
682
696
|
if (this.#synchronizeBreakpointsCallback && script) {
|
|
683
697
|
await this.#synchronizeBreakpointsCallback(script);
|
|
684
698
|
}
|
|
685
|
-
|
|
699
|
+
// V8 continues an in-progress step after an instrumentation pause, so keep the step context.
|
|
700
|
+
this.#resumeBackend();
|
|
686
701
|
return;
|
|
687
702
|
}
|
|
688
703
|
|
|
@@ -109,7 +109,12 @@ export function toggleClassAndInjectStyleRule(this: Element, pseudoElementName:
|
|
|
109
109
|
const classNamePrefix = '__web-inspector-hide';
|
|
110
110
|
const classNameSuffix = '-shortcut__';
|
|
111
111
|
const styleTagId = '__web-inspector-hide-shortcut-style__';
|
|
112
|
-
|
|
112
|
+
let pseudoElementNameEscaped = '';
|
|
113
|
+
if (pseudoElementName) {
|
|
114
|
+
pseudoElementNameEscaped = pseudoElementName.replace(/[^a-zA-Z0-9-]/g, function(c) {
|
|
115
|
+
return '_' + c.charCodeAt(0).toString(16) + '_';
|
|
116
|
+
});
|
|
117
|
+
}
|
|
113
118
|
const className = classNamePrefix + pseudoElementNameEscaped + classNameSuffix;
|
|
114
119
|
this.classList.toggle(className, hidden);
|
|
115
120
|
|
|
@@ -117,7 +122,7 @@ export function toggleClassAndInjectStyleRule(this: Element, pseudoElementName:
|
|
|
117
122
|
while (localRoot.parentNode) {
|
|
118
123
|
localRoot = (localRoot.parentNode as Element);
|
|
119
124
|
}
|
|
120
|
-
if (localRoot.nodeType === Node.DOCUMENT_NODE) {
|
|
125
|
+
if (localRoot.nodeType === 9 /* Node.DOCUMENT_NODE */) {
|
|
121
126
|
localRoot = document.head;
|
|
122
127
|
}
|
|
123
128
|
|
|
@@ -1097,6 +1097,15 @@ export class ResourceTreeFrame {
|
|
|
1097
1097
|
return response.originTrials;
|
|
1098
1098
|
}
|
|
1099
1099
|
|
|
1100
|
+
async getSpellCheckCustomDictionary(): Promise<string[]> {
|
|
1101
|
+
const response =
|
|
1102
|
+
await this.resourceTreeModel().target().pageAgent().invoke_getSpellCheckCustomDictionary({frameId: this.#id});
|
|
1103
|
+
if (response.getError()) {
|
|
1104
|
+
return [];
|
|
1105
|
+
}
|
|
1106
|
+
return response.words;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1100
1109
|
setCreationStackTrace(creationStackTraceData: {
|
|
1101
1110
|
creationStackTrace: Protocol.Runtime.StackTrace|null,
|
|
1102
1111
|
creationStackTraceTarget: Target,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
ScopeRemoteObject,
|
|
21
21
|
} from './RemoteObject.js';
|
|
22
22
|
import {SDKModel} from './SDKModel.js';
|
|
23
|
-
import {customFormattersSettingDescriptor} from './SDKSettings.js';
|
|
23
|
+
import {customFormattersSettingDescriptor, textEditorIndentSettingDescriptor} from './SDKSettings.js';
|
|
24
24
|
import {Capability, type Target, Type} from './Target.js';
|
|
25
25
|
|
|
26
26
|
export class RuntimeModel extends SDKModel<EventTypes> {
|
|
@@ -303,8 +303,11 @@ export class RuntimeModel extends SDKModel<EventTypes> {
|
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
const indent =
|
|
307
|
-
|
|
306
|
+
const indent = this.target()
|
|
307
|
+
.targetManager()
|
|
308
|
+
.context.get(Common.Settings.Settings)
|
|
309
|
+
.resolve(textEditorIndentSettingDescriptor)
|
|
310
|
+
.get();
|
|
308
311
|
void object
|
|
309
312
|
.callFunctionJSON(toStringForClipboard, [{
|
|
310
313
|
value: {
|
|
@@ -346,3 +346,10 @@ export const preserveNetworkLogSettingDescriptor: Common.Settings.SettingDescrip
|
|
|
346
346
|
type: Common.Settings.SettingType.BOOLEAN,
|
|
347
347
|
defaultValue: false,
|
|
348
348
|
};
|
|
349
|
+
|
|
350
|
+
export const textEditorIndentSettingDescriptor: Common.Settings.SettingDescriptor<string> = {
|
|
351
|
+
name: 'text-editor-indent',
|
|
352
|
+
type: Common.Settings.SettingType.ENUM,
|
|
353
|
+
defaultValue: ' ',
|
|
354
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
355
|
+
};
|
|
@@ -95,8 +95,10 @@ export class ServerSentEventsParser {
|
|
|
95
95
|
this.#data += '\n';
|
|
96
96
|
}
|
|
97
97
|
if (fieldName === 'id') {
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
const id = this.#line.substring(fieldValueStart);
|
|
99
|
+
if (!id.includes('\0')) {
|
|
100
|
+
this.#id = id;
|
|
101
|
+
}
|
|
100
102
|
}
|
|
101
103
|
// Ignore all other fields. Also ignore "retry", we won't forward that to the backend.
|
|
102
104
|
}
|
|
@@ -900,11 +900,6 @@ export class SourceMap {
|
|
|
900
900
|
[];
|
|
901
901
|
}
|
|
902
902
|
|
|
903
|
-
/** See {@link SourceMapScopesInfo.hasOutlinedFunctions}. False without encoded scopes. */
|
|
904
|
-
hasOutlinedFunctions(): boolean {
|
|
905
|
-
return this.hasEncodedScopeInfo() && (this.#scopesInfo?.hasOutlinedFunctions() ?? false);
|
|
906
|
-
}
|
|
907
|
-
|
|
908
903
|
/** See {@link SourceMapScopesInfo.outlinedFunctionRanges}. Empty without encoded scopes. */
|
|
909
904
|
outlinedFunctionRanges(generatedLine: number, generatedColumn: number): PositionRange[] {
|
|
910
905
|
return this.hasEncodedScopeInfo() ? this.#scopesInfo?.outlinedFunctionRanges(generatedLine, generatedColumn) ?? [] :
|
|
@@ -77,8 +77,11 @@ function validateStartBeforeEnd(ranges: NamedFunctionRange[]): void {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
function createScopeFrom(range: NamedFunctionRange, parent?: ScopesCodec.OriginalScope): ScopesCodec.OriginalScope {
|
|
80
|
+
// Copy only known fields: ranges can come from extensions and may carry extra properties.
|
|
80
81
|
return {
|
|
81
|
-
|
|
82
|
+
start: range.start,
|
|
83
|
+
end: range.end,
|
|
84
|
+
name: typeof range.name === 'string' ? range.name : String(range.name ?? ''),
|
|
82
85
|
kind: 'Function',
|
|
83
86
|
isStackFrame: true,
|
|
84
87
|
parent,
|
|
@@ -613,21 +613,11 @@ export class SourceMapScopesInfo {
|
|
|
613
613
|
return result;
|
|
614
614
|
}
|
|
615
615
|
|
|
616
|
-
/**
|
|
617
|
-
* @returns true, iff any generated function is outlined, i.e. marked as "hidden" but with a definition (see
|
|
618
|
-
* {@link GeneratedFrameKind.OUTLINED}). Hidden functions without a definition are compiler helpers.
|
|
619
|
-
*/
|
|
620
|
-
hasOutlinedFunctions(): boolean {
|
|
621
|
-
const hasOutlined = (ranges: ScopesCodec.GeneratedRange[]): boolean =>
|
|
622
|
-
ranges.some(range => (range.isStackFrame && range.isHidden && range.originalScope !== undefined) ||
|
|
623
|
-
hasOutlined(range.children));
|
|
624
|
-
return hasOutlined(this.#generatedRanges);
|
|
625
|
-
}
|
|
626
|
-
|
|
627
616
|
/**
|
|
628
617
|
* @returns the outlined parts of the authored function at the position: the hidden generated functions whose
|
|
629
|
-
* original scope lies within that function's original scope (see {@link GeneratedFrameKind.OUTLINED})
|
|
630
|
-
* Includes the outlined part the position itself is in, if
|
|
618
|
+
* original scope lies within that function's original scope (see {@link GeneratedFrameKind.OUTLINED}),
|
|
619
|
+
* but not within a nested authored function. Includes the outlined part the position itself is in, if
|
|
620
|
+
* any. Sorted by start position.
|
|
631
621
|
*/
|
|
632
622
|
outlinedFunctionRanges(generatedLine: number, generatedColumn: number): PositionRange[] {
|
|
633
623
|
const rangeChain = this.#findGeneratedRangeChain(generatedLine, generatedColumn);
|
|
@@ -635,17 +625,17 @@ export class SourceMapScopesInfo {
|
|
|
635
625
|
if (!functionScope) {
|
|
636
626
|
return [];
|
|
637
627
|
}
|
|
638
|
-
const isWithinFunction = (scope: ScopesCodec.OriginalScope|undefined): boolean =>
|
|
639
|
-
scope !== undefined && (scope === functionScope || isWithinFunction(scope.parent));
|
|
640
628
|
const result: PositionRange[] = [];
|
|
641
|
-
|
|
629
|
+
const walk = (ranges: ScopesCodec.GeneratedRange[]): void => {
|
|
642
630
|
for (const range of ranges) {
|
|
643
|
-
if (range.isStackFrame && range.isHidden &&
|
|
631
|
+
if (range.isStackFrame && range.isHidden && range.originalScope &&
|
|
632
|
+
this.#findFunctionScopeInOriginalScopeChain(range.originalScope) === functionScope) {
|
|
644
633
|
result.push({start: range.start, end: range.end});
|
|
645
634
|
}
|
|
646
635
|
walk(range.children);
|
|
647
636
|
}
|
|
648
|
-
}
|
|
637
|
+
};
|
|
638
|
+
walk(this.#generatedRanges);
|
|
649
639
|
return result;
|
|
650
640
|
}
|
|
651
641
|
|
|
@@ -1006,8 +1006,11 @@
|
|
|
1006
1006
|
'CorsIssue::LocalNetworkAccessPermissionDenied': 111,
|
|
1007
1007
|
'SRIMessageSignatureIssue::ValidationFailedIntegrityMismatch': 112,
|
|
1008
1008
|
'ElementAccessibilityIssue::InteractiveContentSummaryDescendant': 113,
|
|
1009
|
-
'
|
|
1010
|
-
|
|
1009
|
+
'GenericIssue::AutofillAndManualTextPolicyControlledFeaturesInfo': 114,
|
|
1010
|
+
'GenericIssue::AutofillPolicyControlledFeatureInfo': 115,
|
|
1011
|
+
'GenericIssue::ManualTextPolicyControlledFeatureInfo': 116,
|
|
1012
|
+
'CorsIssue::InvalidLocalNetworkAccess': 118,
|
|
1013
|
+
MAX_VALUE: 119,
|
|
1011
1014
|
},
|
|
1012
1015
|
DeveloperResourceLoaded: {
|
|
1013
1016
|
LOAD_THROUGH_PAGE_VIA_TARGET: 0,
|
|
@@ -13,6 +13,7 @@ const cssTrimEnd = (tokenValue: string): string => {
|
|
|
13
13
|
|
|
14
14
|
export class CSSFormatter {
|
|
15
15
|
readonly #builder: FormattedContentBuilder;
|
|
16
|
+
#text!: string;
|
|
16
17
|
#toOffset!: number;
|
|
17
18
|
#fromOffset!: number;
|
|
18
19
|
#lineEndings!: number[];
|
|
@@ -29,6 +30,7 @@ export class CSSFormatter {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
format(text: string, lineEndings: number[], fromOffset: number, toOffset: number): void {
|
|
33
|
+
this.#text = text;
|
|
32
34
|
this.#lineEndings = lineEndings;
|
|
33
35
|
this.#fromOffset = fromOffset;
|
|
34
36
|
this.#toOffset = toOffset;
|
|
@@ -41,6 +43,48 @@ export class CSSFormatter {
|
|
|
41
43
|
this.#builder.setEnforceSpaceBetweenWords(oldEnforce);
|
|
42
44
|
}
|
|
43
45
|
|
|
46
|
+
#isSelectorPseudoColon(colonOffset: number): boolean {
|
|
47
|
+
let parenDepth = 0;
|
|
48
|
+
for (let i = colonOffset + 1; i < this.#toOffset; ++i) {
|
|
49
|
+
const ch = this.#text[i];
|
|
50
|
+
if (ch === '/' && this.#text[i + 1] === '*') {
|
|
51
|
+
const commentEnd = this.#text.indexOf('*/', i + 2);
|
|
52
|
+
if (commentEnd === -1) {
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
i = commentEnd + 1;
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
if (ch === '\'' || ch === '"') {
|
|
59
|
+
const quote = ch;
|
|
60
|
+
for (++i; i < this.#toOffset; ++i) {
|
|
61
|
+
if (this.#text[i] === '\\') {
|
|
62
|
+
++i;
|
|
63
|
+
} else if (this.#text[i] === quote) {
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (ch === '(') {
|
|
70
|
+
++parenDepth;
|
|
71
|
+
} else if (ch === ')') {
|
|
72
|
+
if (parenDepth === 0) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
--parenDepth;
|
|
76
|
+
} else if (parenDepth === 0) {
|
|
77
|
+
if (ch === '{') {
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
if (ch === ';' || ch === '}') {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
|
|
44
88
|
#tokenCallback(token: string, type: string|null, startPosition: number): void {
|
|
45
89
|
// startPosition is relative to the start of the CSS block.
|
|
46
90
|
// Convert it to an absolute document offset to match this.#lineEndings.
|
|
@@ -87,14 +131,20 @@ export class CSSFormatter {
|
|
|
87
131
|
this.#builder.decreaseNestingLevel();
|
|
88
132
|
this.#state.afterClosingBrace = true;
|
|
89
133
|
this.#state.inPropertyValue = false;
|
|
90
|
-
} else if (token === ':' && !this.#state.inPropertyValue && this.#state.seenProperty) {
|
|
91
|
-
this.#builder.addToken(token, startPosition);
|
|
92
|
-
this.#builder.addSoftSpace();
|
|
93
|
-
this.#state.eatWhitespace = true;
|
|
94
|
-
this.#state.inPropertyValue = true;
|
|
95
134
|
this.#state.seenProperty = false;
|
|
96
|
-
|
|
135
|
+
} else if (token === ':' && !this.#state.inPropertyValue && this.#state.seenProperty) {
|
|
136
|
+
if (this.#isSelectorPseudoColon(startPosition)) {
|
|
137
|
+
this.#state.seenProperty = false;
|
|
138
|
+
} else {
|
|
139
|
+
this.#builder.addToken(token, startPosition);
|
|
140
|
+
this.#builder.addSoftSpace();
|
|
141
|
+
this.#state.eatWhitespace = true;
|
|
142
|
+
this.#state.inPropertyValue = true;
|
|
143
|
+
this.#state.seenProperty = false;
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
97
146
|
} else if (token === '{') {
|
|
147
|
+
this.#state.seenProperty = false;
|
|
98
148
|
this.#builder.addSoftSpace();
|
|
99
149
|
this.#builder.addToken(token, startPosition);
|
|
100
150
|
this.#builder.addNewLine();
|
|
@@ -102,7 +102,26 @@ export class HTMLFormatter {
|
|
|
102
102
|
this.#builder.addNewLine();
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
#afterCloseTag(
|
|
105
|
+
#afterCloseTag(element: FormatterElement): void {
|
|
106
|
+
if (!this.#model) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (!element.children.length && element !== this.#model.document()) {
|
|
111
|
+
const nextToken = this.#model.peekToken();
|
|
112
|
+
if (nextToken) {
|
|
113
|
+
if (isTextToken(nextToken)) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const followingToken = this.#model.peekToken(1);
|
|
117
|
+
if (Platform.StringUtilities.isWhitespace(nextToken.value) && !/[\r\n]/.test(nextToken.value) &&
|
|
118
|
+
followingToken && isTextToken(followingToken)) {
|
|
119
|
+
this.#model.nextToken();
|
|
120
|
+
this.#builder.addToken(nextToken.value, nextToken.startOffset);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
106
125
|
this.#builder.addNewLine();
|
|
107
126
|
}
|
|
108
127
|
|
|
@@ -239,6 +258,12 @@ function hasTokenInSet(tokenTypes: Set<string>, type: string): boolean {
|
|
|
239
258
|
return tokenTypes.has(type) || tokenTypes.has(`xml-${type}`);
|
|
240
259
|
}
|
|
241
260
|
|
|
261
|
+
function isTextToken(token: Token): boolean {
|
|
262
|
+
return !Platform.StringUtilities.isWhitespace(token.value) && !hasTokenInSet(token.type, 'tag') &&
|
|
263
|
+
!hasTokenInSet(token.type, 'attribute') && !hasTokenInSet(token.type, 'bracket') &&
|
|
264
|
+
!hasTokenInSet(token.type, 'comment') && !hasTokenInSet(token.type, 'meta');
|
|
265
|
+
}
|
|
266
|
+
|
|
242
267
|
export class HTMLModel {
|
|
243
268
|
#state: ParseState = ParseState.INITIAL;
|
|
244
269
|
readonly #document: FormatterElement;
|
|
@@ -275,9 +300,7 @@ export class HTMLModel {
|
|
|
275
300
|
if (element && (hasTokenInSet(token.type, 'comment') || hasTokenInSet(token.type, 'meta'))) {
|
|
276
301
|
element.hasComments = true;
|
|
277
302
|
}
|
|
278
|
-
if (element &&
|
|
279
|
-
!hasTokenInSet(token.type, 'attribute') && !hasTokenInSet(token.type, 'bracket') &&
|
|
280
|
-
!hasTokenInSet(token.type, 'comment') && !hasTokenInSet(token.type, 'meta')) {
|
|
303
|
+
if (element && isTextToken(token)) {
|
|
281
304
|
element.hasContent = true;
|
|
282
305
|
}
|
|
283
306
|
if (element && (element.name === 'script' || element.name === 'style') &&
|
|
@@ -497,8 +520,8 @@ export class HTMLModel {
|
|
|
497
520
|
this.#stack.push(newElement);
|
|
498
521
|
}
|
|
499
522
|
|
|
500
|
-
peekToken(): Token|null {
|
|
501
|
-
return this.#tokenIndex < this.#tokens.length ? this.#tokens[this.#tokenIndex] : null;
|
|
523
|
+
peekToken(offset = 0): Token|null {
|
|
524
|
+
return this.#tokenIndex + offset < this.#tokens.length ? this.#tokens[this.#tokenIndex + offset] : null;
|
|
502
525
|
}
|
|
503
526
|
|
|
504
527
|
nextToken(): Token|null {
|
|
@@ -144,15 +144,6 @@ const WINDOW_LOCAL_STORAGE: Common.Settings.SettingsBackingStore = {
|
|
|
144
144
|
clear: () => window.localStorage.clear(),
|
|
145
145
|
};
|
|
146
146
|
|
|
147
|
-
let isCustomDevtoolsFrontendInternal: boolean;
|
|
148
|
-
|
|
149
|
-
function isCustomDevtoolsFrontend(): boolean {
|
|
150
|
-
if (typeof isCustomDevtoolsFrontendInternal === 'undefined') {
|
|
151
|
-
isCustomDevtoolsFrontendInternal = window.location.toString().startsWith('devtools://devtools/custom/');
|
|
152
|
-
}
|
|
153
|
-
return isCustomDevtoolsFrontendInternal;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
147
|
export class MainImpl {
|
|
157
148
|
#readyForTestPromise = Promise.withResolvers<void>();
|
|
158
149
|
#veStartPromise!: Promise<void>;
|
|
@@ -309,11 +300,12 @@ export class MainImpl {
|
|
|
309
300
|
} {
|
|
310
301
|
this.#initializeExperiments();
|
|
311
302
|
let storagePrefix = '';
|
|
312
|
-
if (isCustomDevtoolsFrontend()) {
|
|
303
|
+
if (Host.Platform.isCustomDevtoolsFrontend()) {
|
|
313
304
|
storagePrefix = '__custom__';
|
|
314
|
-
} else if (
|
|
315
|
-
|
|
316
|
-
|
|
305
|
+
} else if (Host.Platform.isRemoteDevtoolsFrontend()) {
|
|
306
|
+
storagePrefix = '__remote__';
|
|
307
|
+
} else if (!Root.Runtime.Runtime.queryParam('can_dock') &&
|
|
308
|
+
Boolean(Root.Runtime.Runtime.queryParam('debugFrontend')) && !Host.InspectorFrontendHost.isUnderTest()) {
|
|
317
309
|
storagePrefix = '__bundled__';
|
|
318
310
|
}
|
|
319
311
|
|
|
@@ -669,7 +661,7 @@ export class MainImpl {
|
|
|
669
661
|
|
|
670
662
|
#redispatchClipboardEvent(event: Event): void {
|
|
671
663
|
const eventCopy = new CustomEvent('clipboard-' + event.type, {bubbles: true, composed: true});
|
|
672
|
-
// @ts-expect-error Used in
|
|
664
|
+
// @ts-expect-error Used in DOMTreeWidget
|
|
673
665
|
eventCopy['original'] = event;
|
|
674
666
|
const document = event.target && (event.target as HTMLElement).ownerDocument;
|
|
675
667
|
const target = document ? UI.DOMUtilities.deepActiveElement(document) : null;
|
|
@@ -242,6 +242,10 @@ export const UIStrings = {
|
|
|
242
242
|
* @description A deprecation warning shown in the DevTools Issues tab. It's shown when a video conferencing website uses a non-standard API for controlling the crypto method used, but is not having an effect because the desired behavior is already enabled-by-default.
|
|
243
243
|
*/
|
|
244
244
|
RTCConstraintEnableDtlsSrtpTrue: "The constraint `DtlsSrtpKeyAgreement` is removed. You have specified a `true` value for this constraint, which had no effect, but you can remove this constraint for tidiness.",
|
|
245
|
+
/**
|
|
246
|
+
* @description Warning displayed to developers when the non-standard RTCPeerConnection.createDTMFSender() method is used. Developers should use the standard RTCRtpSender.dtmf attribute instead.
|
|
247
|
+
*/
|
|
248
|
+
RTCPeerConnectionCreateDTMFSender: "RTCPeerConnection.createDTMFSender() is deprecated and will be removed. Please use RTCRtpSender.dtmf instead.",
|
|
245
249
|
/**
|
|
246
250
|
* @description WebRTC is set of JavaScript APIs for sending and receiving data, audio and video. getStats() is a method used to obtain network and quality metrics. There are two versions of this method, one is being deprecated because it is non-standard.
|
|
247
251
|
*/
|
|
@@ -254,10 +258,6 @@ export const UIStrings = {
|
|
|
254
258
|
* @description A deprecation warning shown in the DevTools Issues tab. The placeholder is always the noun 'SharedArrayBuffer' which refers to a JavaScript construct.
|
|
255
259
|
*/
|
|
256
260
|
SharedArrayBufferConstructedWithoutIsolation: "`SharedArrayBuffer` will require cross-origin isolation. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.",
|
|
257
|
-
/**
|
|
258
|
-
* @description A deprecation warning shown in the DevTools Issues tab. It's shown when one of the Shared Storage APIs like `sharedStorage.set()`, `sharedStorage.worklet.addModule()`, `sharedStorage.selectURL()`, etc., along with `<img sharedstoragewritable>`, `<iframe sharedstoragewritable>`, or `fetch(url, {sharedStorageWritable: true})` are used.
|
|
259
|
-
*/
|
|
260
|
-
SharedStorage: "The Shared Storage API is deprecated and will be removed in a future release.",
|
|
261
261
|
/**
|
|
262
262
|
* @description A deprecation warning shown in the DevTools Issues tab. It's shown when the `document.requestStorageAccessFor` API is called. The placeholder will always be the string `document.requestStorageAccessFor`.
|
|
263
263
|
*/
|
|
@@ -427,6 +427,10 @@ export const DEPRECATIONS_METADATA: Partial<Record<string, DeprecationDescriptor
|
|
|
427
427
|
"RTCConstraintEnableDtlsSrtpTrue": {
|
|
428
428
|
"milestone": 97
|
|
429
429
|
},
|
|
430
|
+
"RTCPeerConnectionCreateDTMFSender": {
|
|
431
|
+
"chromeStatusFeature": 5160724576993280,
|
|
432
|
+
"milestone": 160
|
|
433
|
+
},
|
|
430
434
|
"RTCPeerConnectionGetStatsLegacyNonCompliant": {
|
|
431
435
|
"chromeStatusFeature": 4631626228695040,
|
|
432
436
|
"milestone": 117
|
|
@@ -444,9 +448,6 @@ export const DEPRECATIONS_METADATA: Partial<Record<string, DeprecationDescriptor
|
|
|
444
448
|
"SharedArrayBufferConstructedWithoutIsolation": {
|
|
445
449
|
"milestone": 106
|
|
446
450
|
},
|
|
447
|
-
"SharedStorage": {
|
|
448
|
-
"chromeStatusFeature": 5076349064708096
|
|
449
|
-
},
|
|
450
451
|
"StorageAccessAPI_requestStorageAccessFor_Method": {
|
|
451
452
|
"chromeStatusFeature": 5162221567082496
|
|
452
453
|
},
|