chrome-devtools-frontend 1.0.981004 → 1.0.995227
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 +2 -0
- package/config/gni/devtools_grd_files.gni +8 -7
- package/config/gni/devtools_image_files.gni +1 -0
- package/front_end/.eslintrc.js +10 -0
- package/front_end/Images/src/ic_rendering.svg +3 -0
- package/front_end/core/common/ParsedURL.ts +44 -28
- package/front_end/core/common/ResourceType.ts +1 -1
- package/front_end/core/common/SettingRegistration.ts +1 -0
- package/front_end/core/host/InspectorFrontendHost.ts +11 -10
- package/front_end/core/host/InspectorFrontendHostAPI.ts +15 -14
- package/front_end/core/host/Platform.ts +11 -2
- package/front_end/core/host/UserMetrics.ts +27 -2
- package/front_end/core/i18n/DevToolsLocale.ts +4 -0
- package/front_end/core/i18n/locales/af.json +76 -16
- package/front_end/core/i18n/locales/am.json +76 -16
- package/front_end/core/i18n/locales/ar.json +77 -17
- package/front_end/core/i18n/locales/as.json +76 -16
- package/front_end/core/i18n/locales/az.json +76 -16
- package/front_end/core/i18n/locales/be.json +75 -15
- package/front_end/core/i18n/locales/bg.json +76 -16
- package/front_end/core/i18n/locales/bn.json +76 -16
- package/front_end/core/i18n/locales/bs.json +88 -28
- package/front_end/core/i18n/locales/ca.json +76 -16
- package/front_end/core/i18n/locales/cs.json +76 -16
- package/front_end/core/i18n/locales/cy.json +76 -16
- package/front_end/core/i18n/locales/da.json +77 -17
- package/front_end/core/i18n/locales/de.json +178 -118
- package/front_end/core/i18n/locales/el.json +76 -16
- package/front_end/core/i18n/locales/en-GB.json +76 -16
- package/front_end/core/i18n/locales/en-US.json +208 -52
- package/front_end/core/i18n/locales/en-XL.json +208 -52
- package/front_end/core/i18n/locales/es-419.json +76 -16
- package/front_end/core/i18n/locales/es.json +76 -16
- package/front_end/core/i18n/locales/et.json +76 -16
- package/front_end/core/i18n/locales/eu.json +76 -16
- package/front_end/core/i18n/locales/fa.json +83 -23
- package/front_end/core/i18n/locales/fi.json +76 -16
- package/front_end/core/i18n/locales/fil.json +76 -16
- package/front_end/core/i18n/locales/fr-CA.json +76 -16
- package/front_end/core/i18n/locales/fr.json +76 -16
- package/front_end/core/i18n/locales/gl.json +76 -16
- package/front_end/core/i18n/locales/gu.json +76 -16
- package/front_end/core/i18n/locales/he.json +76 -16
- package/front_end/core/i18n/locales/hi.json +76 -16
- package/front_end/core/i18n/locales/hr.json +76 -16
- package/front_end/core/i18n/locales/hu.json +76 -16
- package/front_end/core/i18n/locales/hy.json +76 -16
- package/front_end/core/i18n/locales/id.json +79 -19
- package/front_end/core/i18n/locales/is.json +75 -15
- package/front_end/core/i18n/locales/it.json +124 -64
- package/front_end/core/i18n/locales/ja.json +76 -16
- package/front_end/core/i18n/locales/ka.json +76 -16
- package/front_end/core/i18n/locales/kk.json +76 -16
- package/front_end/core/i18n/locales/km.json +76 -16
- package/front_end/core/i18n/locales/kn.json +76 -16
- package/front_end/core/i18n/locales/ko.json +76 -16
- package/front_end/core/i18n/locales/ky.json +76 -16
- package/front_end/core/i18n/locales/lo.json +76 -16
- package/front_end/core/i18n/locales/lt.json +76 -16
- package/front_end/core/i18n/locales/lv.json +76 -16
- package/front_end/core/i18n/locales/mk.json +76 -16
- package/front_end/core/i18n/locales/ml.json +76 -16
- package/front_end/core/i18n/locales/mn.json +76 -16
- package/front_end/core/i18n/locales/mr.json +76 -16
- package/front_end/core/i18n/locales/ms.json +76 -16
- package/front_end/core/i18n/locales/my.json +78 -18
- package/front_end/core/i18n/locales/ne.json +76 -16
- package/front_end/core/i18n/locales/nl.json +77 -17
- package/front_end/core/i18n/locales/no.json +76 -16
- package/front_end/core/i18n/locales/or.json +76 -16
- package/front_end/core/i18n/locales/pa.json +76 -16
- package/front_end/core/i18n/locales/pl.json +78 -18
- package/front_end/core/i18n/locales/pt-PT.json +123 -63
- package/front_end/core/i18n/locales/pt.json +78 -18
- package/front_end/core/i18n/locales/ro.json +76 -16
- package/front_end/core/i18n/locales/ru.json +77 -17
- package/front_end/core/i18n/locales/si.json +76 -16
- package/front_end/core/i18n/locales/sk.json +76 -16
- package/front_end/core/i18n/locales/sl.json +76 -16
- package/front_end/core/i18n/locales/sq.json +76 -16
- package/front_end/core/i18n/locales/sr-Latn.json +76 -16
- package/front_end/core/i18n/locales/sr.json +76 -16
- package/front_end/core/i18n/locales/sv.json +76 -16
- package/front_end/core/i18n/locales/sw.json +76 -16
- package/front_end/core/i18n/locales/ta.json +77 -17
- package/front_end/core/i18n/locales/te.json +76 -16
- package/front_end/core/i18n/locales/th.json +76 -16
- package/front_end/core/i18n/locales/tr.json +76 -16
- package/front_end/core/i18n/locales/uk.json +76 -16
- package/front_end/core/i18n/locales/ur.json +76 -16
- package/front_end/core/i18n/locales/uz.json +77 -17
- package/front_end/core/i18n/locales/vi.json +76 -16
- package/front_end/core/i18n/locales/zh-HK.json +76 -16
- package/front_end/core/i18n/locales/zh-TW.json +76 -16
- package/front_end/core/i18n/locales/zh.json +76 -16
- package/front_end/core/i18n/locales/zu.json +76 -16
- package/front_end/core/platform/dom-utilities.ts +16 -0
- package/front_end/core/platform/platform.ts +2 -0
- package/front_end/core/protocol_client/InspectorBackend.ts +2 -1
- package/front_end/core/protocol_client/NodeURL.ts +1 -1
- package/front_end/core/root/Runtime.ts +6 -0
- package/front_end/core/sdk/AccessibilityModel.ts +7 -6
- package/front_end/core/sdk/CSSMatchedStyles.ts +71 -17
- package/front_end/core/sdk/CSSMetadata.ts +15 -0
- package/front_end/core/sdk/CSSModel.ts +9 -7
- package/front_end/core/sdk/CSSProperty.ts +97 -11
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +9 -5
- package/front_end/core/sdk/CSSSupports.ts +4 -1
- package/front_end/core/sdk/ChildTargetManager.ts +3 -1
- package/front_end/core/sdk/Connections.ts +3 -2
- package/front_end/core/sdk/ConsoleModel.ts +6 -5
- package/front_end/core/sdk/Cookie.ts +4 -2
- package/front_end/core/sdk/DOMDebuggerModel.ts +10 -6
- package/front_end/core/sdk/DOMModel.ts +2 -2
- package/front_end/core/sdk/DebuggerModel.ts +27 -5
- package/front_end/core/sdk/HeapProfilerModel.ts +2 -1
- package/front_end/core/sdk/NetworkManager.ts +13 -12
- package/front_end/core/sdk/NetworkRequest.ts +1 -1
- package/front_end/core/sdk/PageLoad.ts +3 -1
- package/front_end/core/sdk/PageResourceLoader.ts +9 -7
- package/front_end/core/sdk/ProfileTreeModel.ts +3 -2
- package/front_end/core/sdk/RemoteObject.ts +18 -6
- package/front_end/core/sdk/ResourceTreeModel.ts +17 -11
- package/front_end/core/sdk/ScreenCaptureModel.ts +3 -0
- package/front_end/core/sdk/Script.ts +4 -3
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +2 -1
- package/front_end/core/sdk/SourceMap.ts +10 -6
- package/front_end/core/sdk/SourceMapManager.ts +47 -5
- package/front_end/core/sdk/Target.ts +2 -1
- package/front_end/core/sdk/TracingModel.ts +0 -9
- package/front_end/devtools_compatibility.js +1 -0
- package/front_end/entrypoints/formatter_worker/CSSRuleParser.ts +1 -1
- package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +10 -3
- package/front_end/entrypoints/main/MainImpl.ts +22 -2
- package/front_end/generated/InspectorBackendCommands.js +85 -16
- package/front_end/generated/SupportedCSSProperties.js +21 -8
- package/front_end/generated/protocol-mapping.d.ts +4 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +174 -28
- package/front_end/legacy/legacy-defs.d.ts +0 -4
- package/front_end/legacy_test_runner/heap_profiler_test_runner/heap_profiler_test_runner.js +1 -1
- package/front_end/legacy_test_runner/test_runner/TestRunner.js +1 -0
- package/front_end/models/bindings/BreakpointManager.ts +68 -11
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +9 -2
- package/front_end/models/bindings/CompilerScriptMapping.ts +3 -2
- package/front_end/models/bindings/ContentProviderBasedProject.ts +12 -9
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +10 -8
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +8 -1
- package/front_end/models/bindings/DefaultScriptMapping.ts +8 -2
- package/front_end/models/bindings/FileUtils.ts +3 -2
- package/front_end/models/bindings/IgnoreListManager.ts +5 -5
- package/front_end/models/bindings/ResourceUtils.ts +5 -4
- package/front_end/models/emulation/EmulatedDevices.ts +17 -0
- package/front_end/models/extensions/ExtensionAPI.ts +5 -2
- package/front_end/models/extensions/ExtensionPanel.ts +2 -1
- package/front_end/models/extensions/ExtensionServer.ts +13 -8
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +0 -63
- package/front_end/models/issues_manager/CookieIssue.ts +7 -0
- package/front_end/models/issues_manager/DeprecationIssue.ts +326 -8
- package/front_end/models/issues_manager/IssuesManager.ts +4 -0
- package/front_end/models/issues_manager/descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
- package/front_end/models/issues_manager/descriptions/deprecation.md +1 -1
- package/front_end/models/logs/LogManager.ts +2 -1
- package/front_end/models/logs/NetworkLog.ts +14 -12
- package/front_end/models/persistence/Automapping.ts +17 -16
- package/front_end/models/persistence/EditFileSystemView.ts +5 -4
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +24 -24
- package/front_end/models/persistence/IsolatedFileSystem.ts +2 -2
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +7 -6
- package/front_end/models/persistence/NetworkPersistenceManager.ts +92 -54
- package/front_end/models/persistence/PersistenceImpl.ts +7 -7
- package/front_end/models/persistence/PlatformFileSystem.ts +7 -8
- package/front_end/models/persistence/WorkspaceSettingsTab.ts +3 -2
- package/front_end/models/text_utils/CodeMirrorUtils.ts +53 -0
- package/front_end/models/text_utils/text_utils.ts +2 -0
- package/front_end/models/timeline_model/TimelineModel.ts +32 -30
- package/front_end/models/timeline_model/TimelineProfileTree.ts +3 -2
- package/front_end/models/workspace/FileManager.ts +9 -6
- package/front_end/models/workspace/UISourceCode.ts +16 -14
- package/front_end/models/workspace/WorkspaceImpl.ts +40 -16
- package/front_end/panels/accessibility/AccessibilitySubPane.ts +2 -1
- package/front_end/panels/application/AppManifestView.ts +1 -1
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +5 -4
- package/front_end/panels/application/ApplicationPanelSidebar.ts +34 -30
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +5 -4
- package/front_end/panels/application/BackgroundServiceView.ts +2 -1
- package/front_end/panels/application/DatabaseQueryView.ts +2 -1
- package/front_end/panels/application/InterestGroupTreeElement.ts +3 -2
- package/front_end/panels/application/ReportingApiTreeElement.ts +3 -2
- package/front_end/panels/application/ResourcesPanel.ts +4 -3
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +6 -1
- package/front_end/panels/application/TrustTokensTreeElement.ts +3 -2
- package/front_end/panels/application/components/BackForwardCacheStrings.ts +10 -1
- package/front_end/panels/application/components/BackForwardCacheView.ts +163 -13
- package/front_end/panels/application/components/backForwardCacheView.css +15 -4
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +19 -19
- package/front_end/panels/changes/ChangesView.ts +38 -0
- package/front_end/panels/console/ConsoleFormat.ts +23 -0
- package/front_end/panels/console/ConsolePinPane.ts +7 -0
- package/front_end/panels/console/ConsolePrompt.ts +11 -1
- package/front_end/panels/console/ConsoleSidebar.ts +2 -1
- package/front_end/panels/console/ConsoleView.ts +60 -32
- package/front_end/panels/console/ConsoleViewMessage.ts +15 -28
- package/front_end/panels/console/ConsoleViewport.ts +2 -1
- package/front_end/panels/console/ErrorStackParser.ts +8 -4
- package/front_end/panels/console/consoleView.css +0 -1
- package/front_end/panels/coverage/CoverageListView.ts +1 -1
- package/front_end/panels/coverage/CoverageModel.ts +6 -6
- package/front_end/panels/coverage/CoverageView.ts +2 -1
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -1
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +7 -6
- package/front_end/panels/css_overview/components/cssOverviewStartView.css +0 -48
- package/front_end/panels/css_overview/cssOverviewCompletedView.css +5 -0
- package/front_end/panels/css_overview/cssOverviewSidebarPanel.css +2 -0
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +2 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +2 -1
- package/front_end/panels/elements/ElementStatePaneWidget.ts +4 -6
- package/front_end/panels/elements/ElementsPanel.ts +16 -5
- package/front_end/panels/elements/ImagePreviewPopover.ts +6 -4
- package/front_end/panels/elements/PropertiesWidget.ts +4 -24
- package/front_end/panels/elements/StyleEditorWidget.ts +2 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +1614 -0
- package/front_end/panels/elements/StylePropertyHighlighter.ts +2 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +20 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +97 -1675
- package/front_end/panels/elements/elements-legacy.ts +3 -3
- package/front_end/panels/elements/elements.ts +3 -0
- package/front_end/panels/elements/stylesSidebarPane.css +3 -1
- package/front_end/panels/emulation/AdvancedApp.ts +6 -2
- package/front_end/panels/emulation/DeviceModeToolbar.ts +2 -1
- package/front_end/panels/input/InputTimeline.ts +3 -2
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +0 -50
- package/front_end/panels/issues/ComboBoxOfCheckBoxes.ts +14 -2
- package/front_end/panels/issues/IssueAggregator.ts +8 -0
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/lighthouse/LighthouseController.ts +5 -1
- package/front_end/panels/lighthouse/LighthousePanel.ts +3 -1
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseTimespanView.ts +3 -3
- package/front_end/panels/network/BlockedURLsPane.ts +3 -2
- package/front_end/panels/network/NetworkConfigView.ts +6 -0
- package/front_end/panels/network/NetworkDataGridNode.ts +4 -0
- package/front_end/panels/network/NetworkLogView.ts +3 -3
- package/front_end/panels/network/RequestHTMLView.ts +1 -0
- package/front_end/panels/network/RequestHeadersView.ts +71 -10
- package/front_end/panels/network/networkLogView.css +9 -17
- package/front_end/panels/network/requestHeadersTree.css +16 -0
- package/front_end/panels/profiler/HeapSnapshotView.ts +5 -2
- package/front_end/panels/profiler/LiveHeapProfileView.ts +3 -1
- package/front_end/panels/profiler/ProfileView.ts +2 -2
- package/front_end/panels/profiler/ProfilesPanel.ts +2 -1
- package/front_end/panels/profiler/heapProfiler.css +15 -3
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +4 -2
- package/front_end/panels/screencast/ScreencastView.ts +5 -2
- package/front_end/panels/search/SearchConfig.ts +2 -1
- package/front_end/panels/settings/KeybindsSettingsTab.ts +3 -2
- package/front_end/panels/settings/SettingsScreen.ts +4 -1
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +1 -2
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +4 -4
- package/front_end/panels/sources/BreakpointEditDialog.ts +0 -1
- package/front_end/panels/sources/CSSPlugin.ts +6 -6
- package/front_end/panels/sources/CoveragePlugin.ts +2 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +4 -4
- package/front_end/panels/sources/EditingLocationHistoryManager.ts +4 -1
- package/front_end/panels/sources/NavigatorView.ts +28 -20
- package/front_end/panels/sources/SearchSourcesView.ts +2 -2
- package/front_end/panels/sources/SourcesNavigator.ts +4 -2
- package/front_end/panels/sources/SourcesPanel.ts +4 -4
- package/front_end/panels/sources/SourcesSearchScope.ts +12 -8
- package/front_end/panels/sources/SourcesView.ts +3 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
- package/front_end/panels/sources/components/HeadersView.css +17 -2
- package/front_end/panels/sources/components/HeadersView.ts +103 -1
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +9 -9
- package/front_end/panels/timeline/TimelinePanel.ts +3 -2
- package/front_end/panels/timeline/TimelineUIUtils.ts +7 -0
- package/front_end/panels/timeline/timelinePanel.css +1 -2
- package/front_end/panels/utils/utils.ts +97 -0
- package/front_end/third_party/codemirror.next/bundle.ts +27 -25
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js +2 -2
- package/front_end/third_party/codemirror.next/chunk/java.js +2 -1
- package/front_end/third_party/codemirror.next/chunk/json.js +2 -2
- package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -2
- package/front_end/third_party/codemirror.next/chunk/php.js +2 -1
- package/front_end/third_party/codemirror.next/chunk/python.js +2 -2
- package/front_end/third_party/codemirror.next/chunk/wast.js +2 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js +2 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1884 -2281
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +21 -32
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +963 -886
- package/front_end/third_party/lighthouse/report/bundle.js +3 -2
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
- package/front_end/third_party/lit-html/README.chromium +3 -3
- package/front_end/third_party/lit-html/package/README.md +1 -1
- package/front_end/third_party/lit-html/package/async-directive.d.ts +1 -1
- package/front_end/third_party/lit-html/package/async-directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/async-directive.d.ts +1 -1
- package/front_end/third_party/lit-html/package/development/async-directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/choose.d.ts +32 -0
- package/front_end/third_party/lit-html/package/development/directives/choose.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/choose.js +41 -0
- package/front_end/third_party/lit-html/package/development/directives/choose.js.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/join.d.ts +21 -0
- package/front_end/third_party/lit-html/package/development/directives/join.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/join.js +19 -0
- package/front_end/third_party/lit-html/package/development/directives/join.js.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/keyed.d.ts +23 -0
- package/front_end/third_party/lit-html/package/development/directives/keyed.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/keyed.js +39 -0
- package/front_end/third_party/lit-html/package/development/directives/keyed.js.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/map.d.ts +23 -0
- package/front_end/third_party/lit-html/package/development/directives/map.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/map.js +30 -0
- package/front_end/third_party/lit-html/package/development/directives/map.js.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/range.d.ts +24 -0
- package/front_end/third_party/lit-html/package/development/directives/range.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/range.js +13 -0
- package/front_end/third_party/lit-html/package/development/directives/range.js.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/template-content.d.ts +1 -1
- package/front_end/third_party/lit-html/package/development/directives/when.d.ts +26 -0
- package/front_end/third_party/lit-html/package/development/directives/when.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/when.js +9 -0
- package/front_end/third_party/lit-html/package/development/directives/when.js.map +1 -0
- package/front_end/third_party/lit-html/package/development/lit-html.d.ts +182 -1
- package/front_end/third_party/lit-html/package/development/lit-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/lit-html.js +187 -4
- package/front_end/third_party/lit-html/package/development/lit-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/static.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/static.js +7 -0
- package/front_end/third_party/lit-html/package/development/static.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/choose.d.ts +32 -0
- package/front_end/third_party/lit-html/package/directives/choose.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/directives/choose.js +7 -0
- package/front_end/third_party/lit-html/package/directives/choose.js.map +1 -0
- package/front_end/third_party/lit-html/package/directives/class-map.js +1 -1
- package/front_end/third_party/lit-html/package/directives/guard.js +1 -1
- package/front_end/third_party/lit-html/package/directives/join.d.ts +21 -0
- package/front_end/third_party/lit-html/package/directives/join.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/directives/join.js +7 -0
- package/front_end/third_party/lit-html/package/directives/join.js.map +1 -0
- package/front_end/third_party/lit-html/package/directives/keyed.d.ts +23 -0
- package/front_end/third_party/lit-html/package/directives/keyed.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/directives/keyed.js +7 -0
- package/front_end/third_party/lit-html/package/directives/keyed.js.map +1 -0
- package/front_end/third_party/lit-html/package/directives/map.d.ts +23 -0
- package/front_end/third_party/lit-html/package/directives/map.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/directives/map.js +7 -0
- package/front_end/third_party/lit-html/package/directives/map.js.map +1 -0
- package/front_end/third_party/lit-html/package/directives/range.d.ts +24 -0
- package/front_end/third_party/lit-html/package/directives/range.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/directives/range.js +7 -0
- package/front_end/third_party/lit-html/package/directives/range.js.map +1 -0
- package/front_end/third_party/lit-html/package/directives/ref.js +1 -1
- package/front_end/third_party/lit-html/package/directives/repeat.js +1 -1
- package/front_end/third_party/lit-html/package/directives/style-map.js +1 -1
- package/front_end/third_party/lit-html/package/directives/template-content.d.ts +1 -1
- package/front_end/third_party/lit-html/package/directives/template-content.js +1 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-html.js +1 -1
- package/front_end/third_party/lit-html/package/directives/until.js +1 -1
- package/front_end/third_party/lit-html/package/directives/when.d.ts +26 -0
- package/front_end/third_party/lit-html/package/directives/when.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/directives/when.js +7 -0
- package/front_end/third_party/lit-html/package/directives/when.js.map +1 -0
- package/front_end/third_party/lit-html/package/lit-html.d.ts +182 -1
- package/front_end/third_party/lit-html/package/lit-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/lit-html.js +1 -1
- package/front_end/third_party/lit-html/package/lit-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/package.json +25 -1
- package/front_end/third_party/lit-html/package/private-ssr-support.js +1 -1
- package/front_end/third_party/lit-html/package/static.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/static.js +1 -1
- package/front_end/third_party/lit-html/package/static.js.map +1 -1
- package/front_end/third_party/puppeteer/README.chromium +1 -1
- package/front_end/third_party/puppeteer/package/README.md +12 -13
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js +13 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js +4 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js +10 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts +4 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js +12 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/fetch.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js +7 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js +8 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js +6 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js +6 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +13 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js +4 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +10 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts +4 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +12 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +2 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +10 -6
- package/front_end/third_party/puppeteer/package/package.json +17 -17
- package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +1 -1
- package/front_end/ui/components/data_grid/DataGrid.ts +8 -9
- package/front_end/ui/components/data_grid/DataGridController.ts +3 -1
- package/front_end/ui/components/docs/panel_introduction_steps/basic.html +25 -0
- package/front_end/ui/components/docs/panel_introduction_steps/basic.ts +25 -0
- package/front_end/ui/components/input/input.ts +2 -2
- package/front_end/ui/components/linkifier/LinkifierUtils.ts +3 -1
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +4 -1
- package/front_end/ui/components/panel_introduction_steps/PanelIntroductionSteps.ts +44 -0
- package/front_end/ui/components/panel_introduction_steps/panelIntroductionSteps.css +56 -0
- package/front_end/ui/components/panel_introduction_steps/panel_introduction_steps.ts +5 -0
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +3 -4
- package/front_end/ui/components/text_editor/TextEditor.ts +1 -1
- package/front_end/ui/components/text_editor/config.ts +1 -35
- package/front_end/ui/components/text_editor/javascript.ts +8 -8
- package/front_end/ui/components/tree_outline/TreeOutline.ts +10 -9
- package/front_end/ui/components/tree_outline/treeOutline.css +1 -1
- package/front_end/ui/legacy/ARIAUtils.ts +4 -2
- package/front_end/ui/legacy/ContextMenu.ts +14 -0
- package/front_end/ui/legacy/DockController.ts +2 -1
- package/front_end/ui/legacy/SettingsUI.ts +3 -3
- package/front_end/ui/legacy/SoftContextMenu.ts +43 -14
- package/front_end/ui/legacy/Toolbar.ts +16 -0
- package/front_end/ui/legacy/Treeoutline.ts +17 -7
- package/front_end/ui/legacy/UIUtils.ts +2 -2
- package/front_end/ui/legacy/View.ts +14 -8
- package/front_end/ui/legacy/ViewManager.ts +2 -1
- package/front_end/ui/legacy/ViewRegistration.ts +6 -0
- package/front_end/ui/legacy/Widget.ts +2 -1
- package/front_end/ui/legacy/XLink.ts +8 -3
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +3 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +43 -11
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +98 -48
- package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +4 -3
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +24 -28
- package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +5 -11
- package/front_end/ui/legacy/components/inline_editor/CSSLength.ts +8 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -7
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +11 -10
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +7 -1
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +18 -9
- package/front_end/ui/legacy/components/utils/Linkifier.ts +13 -6
- package/front_end/ui/legacy/reportView.css +1 -0
- package/front_end/ui/legacy/splitWidget.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +2 -0
- package/front_end/ui/legacy/themeColors.css +1 -1
- package/front_end/ui/legacy/toolbar.css +17 -1
- package/front_end/ui/legacy/utils/focus-changed.ts +3 -1
- package/inspector_overlay/.eslintrc.js +9 -0
- package/package.json +17 -17
- package/scripts/eslint_rules/lib/check_component_naming.js +4 -0
- package/scripts/eslint_rules/lib/es_modules_import.js +6 -0
- package/scripts/eslint_rules/lib/inject_checkbox_styles.js +121 -0
- package/scripts/eslint_rules/tests/es_modules_import_test.js +12 -0
- package/scripts/eslint_rules/tests/inject_checkbox_styles_test.js +127 -0
- package/front_end/models/issues_manager/descriptions/arAttributionEventSourceTriggerDataTooLarge.md +0 -4
- package/front_end/models/issues_manager/descriptions/arAttributionTriggerDataTooLarge.md +0 -4
- package/front_end/models/issues_manager/descriptions/arInvalidAttributionData.md +0 -8
- package/front_end/models/issues_manager/descriptions/arInvalidEventSourceTriggerData.md +0 -9
- package/front_end/models/issues_manager/descriptions/arInvalidTriggerDedupKey.md +0 -5
- package/front_end/models/issues_manager/descriptions/arInvalidTriggerPriority.md +0 -5
- package/front_end/models/issues_manager/descriptions/arMissingAttributionData.md +0 -7
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
.gray-text {
|
12
12
|
color: var(--color-text-secondary);
|
13
|
-
margin: 0 0
|
13
|
+
margin: 0 0 5px 56px;
|
14
14
|
display: flex;
|
15
15
|
flex-direction: row;
|
16
16
|
align-items: center;
|
@@ -19,6 +19,11 @@
|
|
19
19
|
overflow: hidden;
|
20
20
|
}
|
21
21
|
|
22
|
+
.explanation-frames {
|
23
|
+
margin-left: 56px;
|
24
|
+
grid-column-start: span 2;
|
25
|
+
}
|
26
|
+
|
22
27
|
.help-outline-icon {
|
23
28
|
margin: 0 2px;
|
24
29
|
}
|
@@ -33,7 +38,7 @@
|
|
33
38
|
flex-shrink: 0;
|
34
39
|
}
|
35
40
|
|
36
|
-
.
|
41
|
+
.report-line {
|
37
42
|
grid-column-start: span 2;
|
38
43
|
display: flex;
|
39
44
|
align-items: center;
|
@@ -41,15 +46,17 @@
|
|
41
46
|
line-height: 28px;
|
42
47
|
}
|
43
48
|
|
44
|
-
.
|
49
|
+
.report-key {
|
45
50
|
color: var(--color-text-secondary);
|
46
51
|
min-width: auto;
|
47
52
|
overflow-wrap: break-word;
|
53
|
+
align-self: start;
|
48
54
|
}
|
49
55
|
|
50
|
-
.
|
56
|
+
.report-value {
|
51
57
|
padding: 0 6px;
|
52
58
|
overflow-wrap: break-word;
|
59
|
+
line-height: 24px;
|
53
60
|
}
|
54
61
|
|
55
62
|
.link,
|
@@ -59,3 +66,7 @@
|
|
59
66
|
cursor: pointer;
|
60
67
|
padding: 2px 0; /* adjust focus ring size */
|
61
68
|
}
|
69
|
+
|
70
|
+
.tree-outline li .selection {
|
71
|
+
margin-left: -5px;
|
72
|
+
}
|
@@ -152,11 +152,11 @@ export class XHRBreakpointsSidebarPane extends UI.Widget.VBox implements UI.Cont
|
|
152
152
|
return true;
|
153
153
|
}
|
154
154
|
|
155
|
-
private setBreakpoint(
|
156
|
-
if (this.#breakpoints.indexOf(
|
157
|
-
this.#list.refreshItem(
|
155
|
+
private setBreakpoint(breakKeyword: string): void {
|
156
|
+
if (this.#breakpoints.indexOf(breakKeyword) !== -1) {
|
157
|
+
this.#list.refreshItem(breakKeyword);
|
158
158
|
} else {
|
159
|
-
this.#breakpoints.insertWithComparator(
|
159
|
+
this.#breakpoints.insertWithComparator(breakKeyword, (a, b) => {
|
160
160
|
if (a > b) {
|
161
161
|
return 1;
|
162
162
|
}
|
@@ -251,12 +251,12 @@ export class XHRBreakpointsSidebarPane extends UI.Widget.VBox implements UI.Cont
|
|
251
251
|
return true;
|
252
252
|
}
|
253
253
|
|
254
|
-
private removeBreakpoint(
|
255
|
-
const index = this.#breakpoints.indexOf(
|
254
|
+
private removeBreakpoint(breakKeyword: string): void {
|
255
|
+
const index = this.#breakpoints.indexOf(breakKeyword);
|
256
256
|
if (index >= 0) {
|
257
257
|
this.#breakpoints.remove(index);
|
258
258
|
}
|
259
|
-
this.#breakpointElements.delete(
|
259
|
+
this.#breakpointElements.delete(breakKeyword);
|
260
260
|
this.update();
|
261
261
|
}
|
262
262
|
|
@@ -274,12 +274,12 @@ export class XHRBreakpointsSidebarPane extends UI.Widget.VBox implements UI.Cont
|
|
274
274
|
}
|
275
275
|
}
|
276
276
|
|
277
|
-
private contextMenu(
|
277
|
+
private contextMenu(breakKeyword: string, event: Event): void {
|
278
278
|
const contextMenu = new UI.ContextMenu.ContextMenu(event);
|
279
279
|
|
280
280
|
function removeBreakpoint(this: XHRBreakpointsSidebarPane): void {
|
281
|
-
SDK.DOMDebuggerModel.DOMDebuggerManager.instance().removeXHRBreakpoint(
|
282
|
-
this.removeBreakpoint(
|
281
|
+
SDK.DOMDebuggerModel.DOMDebuggerManager.instance().removeXHRBreakpoint(breakKeyword);
|
282
|
+
this.removeBreakpoint(breakKeyword);
|
283
283
|
}
|
284
284
|
|
285
285
|
function removeAllBreakpoints(this: XHRBreakpointsSidebarPane): void {
|
@@ -297,21 +297,21 @@ export class XHRBreakpointsSidebarPane extends UI.Widget.VBox implements UI.Cont
|
|
297
297
|
void contextMenu.show();
|
298
298
|
}
|
299
299
|
|
300
|
-
private checkboxClicked(
|
300
|
+
private checkboxClicked(breakKeyword: string, checked: boolean): void {
|
301
301
|
const hadFocus = this.hasFocus();
|
302
|
-
SDK.DOMDebuggerModel.DOMDebuggerManager.instance().toggleXHRBreakpoint(
|
303
|
-
this.#list.refreshItem(
|
304
|
-
this.#list.selectItem(
|
302
|
+
SDK.DOMDebuggerModel.DOMDebuggerManager.instance().toggleXHRBreakpoint(breakKeyword, !checked);
|
303
|
+
this.#list.refreshItem(breakKeyword);
|
304
|
+
this.#list.selectItem(breakKeyword);
|
305
305
|
if (hadFocus) {
|
306
306
|
this.focus();
|
307
307
|
}
|
308
308
|
}
|
309
309
|
|
310
|
-
private labelClicked(
|
311
|
-
const element = this.#breakpointElements.get(
|
310
|
+
private labelClicked(breakKeyword: string): void {
|
311
|
+
const element = this.#breakpointElements.get(breakKeyword);
|
312
312
|
const inputElement = document.createElement('span');
|
313
313
|
inputElement.classList.add('breakpoint-condition');
|
314
|
-
inputElement.textContent =
|
314
|
+
inputElement.textContent = breakKeyword;
|
315
315
|
if (element) {
|
316
316
|
this.#list.element.insertBefore(inputElement, element);
|
317
317
|
element.classList.add('hidden');
|
@@ -320,8 +320,8 @@ export class XHRBreakpointsSidebarPane extends UI.Widget.VBox implements UI.Cont
|
|
320
320
|
function finishEditing(this: XHRBreakpointsSidebarPane, accept: boolean, e: Element, text: string): void {
|
321
321
|
this.removeListElement(inputElement);
|
322
322
|
if (accept) {
|
323
|
-
SDK.DOMDebuggerModel.DOMDebuggerManager.instance().removeXHRBreakpoint(
|
324
|
-
this.removeBreakpoint(
|
323
|
+
SDK.DOMDebuggerModel.DOMDebuggerManager.instance().removeXHRBreakpoint(breakKeyword);
|
324
|
+
this.removeBreakpoint(breakKeyword);
|
325
325
|
let enabled = true;
|
326
326
|
if (element) {
|
327
327
|
const breakpointEntryElement = containerToBreakpointEntry.get(element);
|
@@ -3,8 +3,10 @@
|
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
6
|
+
import * as Host from '../../core/host/host.js';
|
6
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
7
8
|
import * as Root from '../../core/root/root.js';
|
9
|
+
import {formatCSSChangesFromDiff} from '../../panels/utils/utils.js';
|
8
10
|
import * as Diff from '../../third_party/diff/diff.js';
|
9
11
|
import * as DiffView from '../../ui/components/diff_view/diff_view.js';
|
10
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
@@ -22,6 +24,10 @@ const UIStrings = {
|
|
22
24
|
*/
|
23
25
|
revertAllChangesToCurrentFile: 'Revert all changes to current file',
|
24
26
|
/**
|
27
|
+
*@description Screen reader/tooltip label for a button in the Changes tool that copies all changes from the currently open file.
|
28
|
+
*/
|
29
|
+
copyAllChangesFromCurrentFile: 'Copy all changes from current file',
|
30
|
+
/**
|
25
31
|
*@description Text in Changes View of the Changes tab
|
26
32
|
*/
|
27
33
|
noChanges: 'No changes',
|
@@ -41,6 +47,10 @@ const UIStrings = {
|
|
41
47
|
* lines were removed (not translatable).
|
42
48
|
*/
|
43
49
|
sDeletions: '{n, plural, =1 {# deletion (-)} other {# deletions (-)}}',
|
50
|
+
/**
|
51
|
+
*@description Text for a button in the Changes tool that copies all the changes from the currently open file.
|
52
|
+
*/
|
53
|
+
copy: 'Copy',
|
44
54
|
};
|
45
55
|
const str_ = i18n.i18n.registerUIStrings('panels/changes/ChangesView.ts', UIStrings);
|
46
56
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
@@ -66,6 +76,8 @@ export class ChangesView extends UI.Widget.VBox {
|
|
66
76
|
private readonly toolbar: UI.Toolbar.Toolbar;
|
67
77
|
private readonly diffStats: UI.Toolbar.ToolbarText;
|
68
78
|
private readonly diffView: DiffView.DiffView.DiffView;
|
79
|
+
private readonly copyButton: UI.Toolbar.ToolbarButton;
|
80
|
+
private readonly copyButtonSeparator: UI.Toolbar.ToolbarSeparator;
|
69
81
|
|
70
82
|
private constructor() {
|
71
83
|
super(true);
|
@@ -98,6 +110,11 @@ export class ChangesView extends UI.Widget.VBox {
|
|
98
110
|
this.toolbar.appendToolbarItem(revertButton);
|
99
111
|
this.diffStats = new UI.Toolbar.ToolbarText('');
|
100
112
|
this.toolbar.appendToolbarItem(this.diffStats);
|
113
|
+
|
114
|
+
this.copyButton = new UI.Toolbar.ToolbarButton(
|
115
|
+
i18nString(UIStrings.copyAllChangesFromCurrentFile), 'largeicon-copy', UIStrings.copy);
|
116
|
+
this.copyButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, this.copyChanges.bind(this));
|
117
|
+
this.copyButtonSeparator = new UI.Toolbar.ToolbarSeparator();
|
101
118
|
this.toolbar.setEnabled(false);
|
102
119
|
|
103
120
|
this.hideDiff(i18nString(UIStrings.noChanges));
|
@@ -115,6 +132,13 @@ export class ChangesView extends UI.Widget.VBox {
|
|
115
132
|
|
116
133
|
private selectedUISourceCodeChanged(): void {
|
117
134
|
this.revealUISourceCode(this.changesSidebar.selectedUISourceCode());
|
135
|
+
if (this.selectedUISourceCode?.contentType() === Common.ResourceType.resourceTypes.Stylesheet) {
|
136
|
+
this.toolbar.appendToolbarItem(this.copyButtonSeparator);
|
137
|
+
this.toolbar.appendToolbarItem(this.copyButton);
|
138
|
+
} else {
|
139
|
+
this.toolbar.removeToolbarItem(this.copyButtonSeparator);
|
140
|
+
this.toolbar.removeToolbarItem(this.copyButton);
|
141
|
+
}
|
118
142
|
}
|
119
143
|
|
120
144
|
private revert(): void {
|
@@ -125,6 +149,20 @@ export class ChangesView extends UI.Widget.VBox {
|
|
125
149
|
void this.workspaceDiff.revertToOriginal(uiSourceCode);
|
126
150
|
}
|
127
151
|
|
152
|
+
private async copyChanges(): Promise<void> {
|
153
|
+
const uiSourceCode = this.selectedUISourceCode;
|
154
|
+
if (!uiSourceCode) {
|
155
|
+
return;
|
156
|
+
}
|
157
|
+
const diffResponse = await this.workspaceDiff.requestDiff(uiSourceCode, {shouldFormatDiff: true});
|
158
|
+
// Diff array with real diff will contain at least 2 lines.
|
159
|
+
if (!diffResponse || diffResponse?.diff.length < 2) {
|
160
|
+
return;
|
161
|
+
}
|
162
|
+
const changes = await formatCSSChangesFromDiff(diffResponse.diff);
|
163
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(changes);
|
164
|
+
}
|
165
|
+
|
128
166
|
private click(event: MouseEvent): void {
|
129
167
|
if (!this.selectedUISourceCode) {
|
130
168
|
return;
|
@@ -196,3 +196,26 @@ export const format = (fmt: string, args: SDK.RemoteObject.RemoteObject[]): {
|
|
196
196
|
addStringToken(fmt);
|
197
197
|
return {tokens, args: args.slice(argIndex)};
|
198
198
|
};
|
199
|
+
|
200
|
+
export const updateStyle = (currentStyle: Map<string, {value: string, priority: string}>, styleToAdd: string): void => {
|
201
|
+
const ALLOWED_PROPERTY_PREFIXES = ['background', 'border', 'color', 'font', 'line', 'margin', 'padding', 'text'];
|
202
|
+
const BLOCKED_URL_SCHEMES = ['chrome', 'resource', 'about', 'app', 'http', 'https', 'ftp', 'file'];
|
203
|
+
|
204
|
+
currentStyle.clear();
|
205
|
+
const buffer = document.createElement('span');
|
206
|
+
buffer.setAttribute('style', styleToAdd);
|
207
|
+
for (const property of buffer.style) {
|
208
|
+
if (!ALLOWED_PROPERTY_PREFIXES.some(
|
209
|
+
prefix => property.startsWith(prefix) || property.startsWith(`-webkit-${prefix}`))) {
|
210
|
+
continue;
|
211
|
+
}
|
212
|
+
const value = buffer.style.getPropertyValue(property);
|
213
|
+
if (BLOCKED_URL_SCHEMES.some(scheme => value.includes(scheme + ':'))) {
|
214
|
+
continue;
|
215
|
+
}
|
216
|
+
currentStyle.set(property, {
|
217
|
+
value,
|
218
|
+
priority: buffer.style.getPropertyPriority(property),
|
219
|
+
});
|
220
|
+
}
|
221
|
+
};
|
@@ -255,12 +255,22 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
255
255
|
return false;
|
256
256
|
}
|
257
257
|
|
258
|
-
|
258
|
+
// Change the prompt input to the history content, and scroll to the end to
|
259
|
+
// bring the full content (potentially multiple lines) into view.
|
260
|
+
const cursorPos = newText.length;
|
259
261
|
this.editor.dispatch({
|
260
262
|
changes: {from: 0, to: this.editor.state.doc.length, insert: newText},
|
261
263
|
selection: CodeMirror.EditorSelection.cursor(cursorPos),
|
262
264
|
scrollIntoView: true,
|
263
265
|
});
|
266
|
+
if (dir < 0) {
|
267
|
+
// If we are going back in history, put the cursor to the end of the first line
|
268
|
+
// so that the user can quickly go further back in history.
|
269
|
+
const firstLineBreak = newText.search(/\n|$/);
|
270
|
+
this.editor.dispatch({
|
271
|
+
selection: CodeMirror.EditorSelection.cursor(firstLineBreak),
|
272
|
+
});
|
273
|
+
}
|
264
274
|
return true;
|
265
275
|
}
|
266
276
|
|
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
7
|
+
import type * as Platform from '../../core/platform/platform.js';
|
7
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
8
9
|
import * as Protocol from '../../generated/protocol.js';
|
9
10
|
import type * as TextUtils from '../../models/text_utils/text_utils.js';
|
@@ -259,7 +260,7 @@ export class FilterTreeElement extends ConsoleSidebarTreeElement {
|
|
259
260
|
this.updateCounter();
|
260
261
|
}
|
261
262
|
|
262
|
-
private childElement(url?:
|
263
|
+
private childElement(url?: Platform.DevToolsPath.UrlString): URLGroupTreeElement {
|
263
264
|
const urlValue = url || null;
|
264
265
|
let child = this.urlTreeElements.get(urlValue);
|
265
266
|
if (child) {
|
@@ -136,10 +136,22 @@ const UIStrings = {
|
|
136
136
|
*@description Alternative title text of a setting in Console View of the Console panel
|
137
137
|
*/
|
138
138
|
selectedContextOnly: 'Selected context only',
|
139
|
+
/**
|
140
|
+
*@description Description of a setting that controls whether XMLHttpRequests are logged in the console.
|
141
|
+
*/
|
142
|
+
logXMLHttpRequests: 'Log XMLHttpRequests',
|
139
143
|
/**
|
140
144
|
*@description Tooltip text that appears on the setting when hovering over it in Console View of the Console panel
|
141
145
|
*/
|
142
146
|
eagerlyEvaluateTextInThePrompt: 'Eagerly evaluate text in the prompt',
|
147
|
+
/**
|
148
|
+
*@description Description of a setting that controls whether text typed in the console should be autocompleted from commands executed in the local console history.
|
149
|
+
*/
|
150
|
+
autocompleteFromHistory: 'Autocomplete from history',
|
151
|
+
/**
|
152
|
+
*@description Description of a setting that controls whether user activation is triggered by evaluation'.
|
153
|
+
*/
|
154
|
+
treatEvaluationAsUserActivation: 'Treat evaluation as user activation',
|
143
155
|
/**
|
144
156
|
* @description Text in Console View of the Console panel, indicating that a number of console
|
145
157
|
* messages have been hidden.
|
@@ -271,8 +283,6 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea
|
|
271
283
|
private readonly progressToolbarItem: UI.Toolbar.ToolbarItem;
|
272
284
|
private readonly groupSimilarSetting: Common.Settings.Setting<boolean>;
|
273
285
|
private readonly showCorsErrorsSetting: Common.Settings.Setting<boolean>;
|
274
|
-
private readonly preserveLogCheckbox: UI.Toolbar.ToolbarSettingCheckbox;
|
275
|
-
private readonly hideNetworkMessagesCheckbox: UI.Toolbar.ToolbarSettingCheckbox;
|
276
286
|
private readonly timestampsSetting: Common.Settings.Setting<unknown>;
|
277
287
|
private readonly consoleHistoryAutocompleteSetting: Common.Settings.Setting<boolean>;
|
278
288
|
readonly pinPane: ConsolePinPane;
|
@@ -376,15 +386,12 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea
|
|
376
386
|
this.progressToolbarItem = new UI.Toolbar.ToolbarItem(document.createElement('div'));
|
377
387
|
this.groupSimilarSetting = Common.Settings.Settings.instance().moduleSetting('consoleGroupSimilar');
|
378
388
|
this.groupSimilarSetting.addChangeListener(() => this.updateMessageList());
|
379
|
-
|
380
|
-
this.groupSimilarSetting, i18nString(UIStrings.groupSimilarMessagesInConsole));
|
389
|
+
|
381
390
|
this.showCorsErrorsSetting = Common.Settings.Settings.instance().moduleSetting('consoleShowsCorsErrors');
|
382
391
|
this.showCorsErrorsSetting.addChangeListener(() => {
|
383
392
|
Host.userMetrics.showCorsErrorsSettingChanged(this.showCorsErrorsSetting.get());
|
384
393
|
this.updateMessageList();
|
385
394
|
});
|
386
|
-
const showCorsErrorsToggle = new UI.Toolbar.ToolbarSettingCheckbox(
|
387
|
-
this.showCorsErrorsSetting, i18nString(UIStrings.showCorsErrorsInConsole));
|
388
395
|
|
389
396
|
const toolbar = new UI.Toolbar.Toolbar('console-main-toolbar', this.consoleToolbarContainer);
|
390
397
|
toolbar.makeWrappable(true);
|
@@ -422,15 +429,6 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea
|
|
422
429
|
rightToolbar.appendToolbarItem(this.filterStatusText);
|
423
430
|
rightToolbar.appendToolbarItem(this.showSettingsPaneButton);
|
424
431
|
|
425
|
-
this.preserveLogCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(
|
426
|
-
Common.Settings.Settings.instance().moduleSetting('preserveConsoleLog'),
|
427
|
-
i18nString(UIStrings.doNotClearLogOnPageReload), i18nString(UIStrings.preserveLog));
|
428
|
-
this.hideNetworkMessagesCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(
|
429
|
-
this.filter.hideNetworkMessagesSetting, this.filter.hideNetworkMessagesSetting.title(),
|
430
|
-
i18nString(UIStrings.hideNetwork));
|
431
|
-
const filterByExecutionContextCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(
|
432
|
-
this.filter.filterByExecutionContextSetting, i18nString(UIStrings.onlyShowMessagesFromTheCurrentContext),
|
433
|
-
i18nString(UIStrings.selectedContextOnly));
|
434
432
|
const monitoringXHREnabledSetting = Common.Settings.Settings.instance().moduleSetting('monitoringXHREnabled');
|
435
433
|
this.timestampsSetting = Common.Settings.Settings.instance().moduleSetting('consoleTimestampsEnabled');
|
436
434
|
this.consoleHistoryAutocompleteSetting =
|
@@ -442,26 +440,36 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea
|
|
442
440
|
|
443
441
|
UI.ARIAUtils.setAccessibleName(settingsPane.element, i18nString(UIStrings.consoleSettings));
|
444
442
|
UI.ARIAUtils.markAsGroup(settingsPane.element);
|
443
|
+
|
445
444
|
const settingsToolbarLeft = new UI.Toolbar.Toolbar('', settingsPane.element);
|
446
445
|
settingsToolbarLeft.makeVertical();
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
446
|
+
|
447
|
+
ConsoleView.appendSettingsCheckboxToToolbar(
|
448
|
+
settingsToolbarLeft, this.filter.hideNetworkMessagesSetting, this.filter.hideNetworkMessagesSetting.title(),
|
449
|
+
i18nString(UIStrings.hideNetwork));
|
450
|
+
ConsoleView.appendSettingsCheckboxToToolbar(
|
451
|
+
settingsToolbarLeft, 'preserveConsoleLog', i18nString(UIStrings.doNotClearLogOnPageReload),
|
452
|
+
i18nString(UIStrings.preserveLog));
|
453
|
+
ConsoleView.appendSettingsCheckboxToToolbar(
|
454
|
+
settingsToolbarLeft, this.filter.filterByExecutionContextSetting,
|
455
|
+
i18nString(UIStrings.onlyShowMessagesFromTheCurrentContext), i18nString(UIStrings.selectedContextOnly));
|
456
|
+
ConsoleView.appendSettingsCheckboxToToolbar(
|
457
|
+
settingsToolbarLeft, this.groupSimilarSetting, i18nString(UIStrings.groupSimilarMessagesInConsole));
|
458
|
+
ConsoleView.appendSettingsCheckboxToToolbar(
|
459
|
+
settingsToolbarLeft, this.showCorsErrorsSetting, i18nString(UIStrings.showCorsErrorsInConsole));
|
452
460
|
|
453
461
|
const settingsToolbarRight = new UI.Toolbar.Toolbar('', settingsPane.element);
|
454
462
|
settingsToolbarRight.makeVertical();
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
463
|
+
|
464
|
+
ConsoleView.appendSettingsCheckboxToToolbar(
|
465
|
+
settingsToolbarRight, monitoringXHREnabledSetting, i18nString(UIStrings.logXMLHttpRequests));
|
466
|
+
ConsoleView.appendSettingsCheckboxToToolbar(
|
467
|
+
settingsToolbarRight, 'consoleEagerEval', i18nString(UIStrings.eagerlyEvaluateTextInThePrompt));
|
468
|
+
ConsoleView.appendSettingsCheckboxToToolbar(
|
469
|
+
settingsToolbarRight, this.consoleHistoryAutocompleteSetting, i18nString(UIStrings.autocompleteFromHistory));
|
470
|
+
ConsoleView.appendSettingsCheckboxToToolbar(
|
471
|
+
settingsToolbarRight, 'consoleUserActivationEval', i18nString(UIStrings.treatEvaluationAsUserActivation));
|
472
|
+
|
465
473
|
if (!this.showSettingsPaneSetting.get()) {
|
466
474
|
settingsPane.element.classList.add('hidden');
|
467
475
|
}
|
@@ -569,6 +577,20 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea
|
|
569
577
|
IssuesManager.IssuesManager.Events.IssuesCountUpdated,
|
570
578
|
() => this.issueToolbarThrottle.schedule(async () => this.updateIssuesToolbarItem()), this);
|
571
579
|
}
|
580
|
+
static appendSettingsCheckboxToToolbar(
|
581
|
+
toolbar: UI.Toolbar.Toolbar, settingOrSetingName: Common.Settings.Setting<boolean>|string, title: string,
|
582
|
+
alternateTitle?: string): UI.Toolbar.ToolbarSettingCheckbox {
|
583
|
+
let setting: Common.Settings.Setting<boolean>;
|
584
|
+
if (typeof settingOrSetingName === 'string') {
|
585
|
+
setting = Common.Settings.Settings.instance().moduleSetting(settingOrSetingName);
|
586
|
+
} else {
|
587
|
+
setting = settingOrSetingName;
|
588
|
+
}
|
589
|
+
|
590
|
+
const checkbox = new UI.Toolbar.ToolbarSettingCheckbox(setting, title, alternateTitle);
|
591
|
+
toolbar.appendToolbarItem(checkbox);
|
592
|
+
return checkbox;
|
593
|
+
}
|
572
594
|
|
573
595
|
static instance(): ConsoleView {
|
574
596
|
if (!consoleViewInstance) {
|
@@ -759,6 +781,10 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea
|
|
759
781
|
this.scheduledRefreshPromiseForTest = this.viewportThrottler.schedule(this.invalidateViewport.bind(this));
|
760
782
|
}
|
761
783
|
|
784
|
+
getScheduledRefreshPromiseForTest(): Promise<void>|undefined {
|
785
|
+
return this.scheduledRefreshPromiseForTest;
|
786
|
+
}
|
787
|
+
|
762
788
|
private scheduleViewportRefreshForTest(_muted: boolean): void {
|
763
789
|
// This functions is sniffed in tests.
|
764
790
|
}
|
@@ -1076,7 +1102,9 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea
|
|
1076
1102
|
private async saveConsole(): Promise<void> {
|
1077
1103
|
const url = (SDK.TargetManager.TargetManager.instance().mainTarget() as SDK.Target.Target).inspectedURL();
|
1078
1104
|
const parsedURL = Common.ParsedURL.ParsedURL.fromString(url);
|
1079
|
-
const filename =
|
1105
|
+
const filename =
|
1106
|
+
Platform.StringUtilities.sprintf('%s-%d.log', parsedURL ? parsedURL.host : 'console', Date.now()) as
|
1107
|
+
Platform.DevToolsPath.RawPathString;
|
1080
1108
|
const stream = new Bindings.FileUtils.FileOutputStream();
|
1081
1109
|
|
1082
1110
|
const progressIndicator = new UI.ProgressIndicator.ProgressIndicator();
|
@@ -1692,7 +1720,7 @@ export class ConsoleViewFilter {
|
|
1692
1720
|
}
|
1693
1721
|
}
|
1694
1722
|
|
1695
|
-
addMessageURLFilter(url:
|
1723
|
+
addMessageURLFilter(url: Platform.DevToolsPath.UrlString): void {
|
1696
1724
|
if (!url) {
|
1697
1725
|
return;
|
1698
1726
|
}
|
@@ -53,7 +53,7 @@ import * as UI from '../../ui/legacy/legacy.js';
|
|
53
53
|
import objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';
|
54
54
|
import type {Chrome} from '../../../extension-api/ExtensionAPI.js'; // eslint-disable-line rulesdir/es_modules_import
|
55
55
|
|
56
|
-
import {format} from './ConsoleFormat.js';
|
56
|
+
import {format, updateStyle} from './ConsoleFormat.js';
|
57
57
|
import type {ConsoleViewportElement} from './ConsoleViewport.js';
|
58
58
|
import consoleViewStyles from './consoleView.css.js';
|
59
59
|
import {augmentErrorStackWithScriptIds, parseSourcePositionsFromErrorStack} from './ErrorStackParser.js';
|
@@ -456,7 +456,8 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
456
456
|
protected buildMessageAnchor(): HTMLElement|null {
|
457
457
|
const linkify = (message: SDK.ConsoleModel.ConsoleMessage): HTMLElement|null => {
|
458
458
|
if (message.scriptId) {
|
459
|
-
return this.linkifyScriptId(
|
459
|
+
return this.linkifyScriptId(
|
460
|
+
message.scriptId, message.url || Platform.DevToolsPath.EmptyUrlString, message.line, message.column);
|
460
461
|
}
|
461
462
|
if (message.stackTrace && message.stackTrace.callFrames.length) {
|
462
463
|
return this.linkifyStackTraceTopFrame(message.stackTrace);
|
@@ -542,7 +543,8 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
542
543
|
return toggleElement;
|
543
544
|
}
|
544
545
|
|
545
|
-
private linkifyLocation(url:
|
546
|
+
private linkifyLocation(url: Platform.DevToolsPath.UrlString, lineNumber: number, columnNumber: number): HTMLElement
|
547
|
+
|null {
|
546
548
|
const runtimeModel = this.message.runtimeModel();
|
547
549
|
if (!runtimeModel) {
|
548
550
|
return null;
|
@@ -559,8 +561,9 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
559
561
|
return this.linkifier.linkifyStackTraceTopFrame(runtimeModel.target(), stackTrace);
|
560
562
|
}
|
561
563
|
|
562
|
-
private linkifyScriptId(
|
563
|
-
|
564
|
+
private linkifyScriptId(
|
565
|
+
scriptId: Protocol.Runtime.ScriptId, url: Platform.DevToolsPath.UrlString, lineNumber: number,
|
566
|
+
columnNumber: number): HTMLElement|null {
|
564
567
|
const runtimeModel = this.message.runtimeModel();
|
565
568
|
if (!runtimeModel) {
|
566
569
|
return null;
|
@@ -925,26 +928,10 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
925
928
|
}
|
926
929
|
break;
|
927
930
|
}
|
928
|
-
case 'style':
|
931
|
+
case 'style':
|
929
932
|
// Make sure that allowed properties do not interfere with link visibility.
|
930
|
-
|
931
|
-
['background', 'border', 'color', 'font', 'line', 'margin', 'padding', 'text'];
|
932
|
-
|
933
|
-
currentStyle.clear();
|
934
|
-
const buffer = document.createElement('span');
|
935
|
-
buffer.setAttribute('style', token.value);
|
936
|
-
for (const property of buffer.style) {
|
937
|
-
if (!ALLOWED_PROPERTY_PREFIXES.some(
|
938
|
-
prefix => property.startsWith(prefix) || property.startsWith(`-webkit-${prefix}`))) {
|
939
|
-
continue;
|
940
|
-
}
|
941
|
-
currentStyle.set(property, {
|
942
|
-
value: buffer.style.getPropertyValue(property),
|
943
|
-
priority: buffer.style.getPropertyPriority(property),
|
944
|
-
});
|
945
|
-
}
|
933
|
+
updateStyle(currentStyle, token.value);
|
946
934
|
break;
|
947
|
-
}
|
948
935
|
}
|
949
936
|
}
|
950
937
|
return args;
|
@@ -1398,8 +1385,8 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
1398
1385
|
}
|
1399
1386
|
|
1400
1387
|
private async getInlineFrames(
|
1401
|
-
debuggerModel: SDK.DebuggerModel.DebuggerModel, url:
|
1402
|
-
columnNumber: number|undefined): Promise<{frames: Chrome.DevTools.FunctionInfo[]}> {
|
1388
|
+
debuggerModel: SDK.DebuggerModel.DebuggerModel, url: Platform.DevToolsPath.UrlString,
|
1389
|
+
lineNumber: number|undefined, columnNumber: number|undefined): Promise<{frames: Chrome.DevTools.FunctionInfo[]}> {
|
1403
1390
|
const debuggerWorkspaceBinding = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();
|
1404
1391
|
if (debuggerWorkspaceBinding.pluginManager) {
|
1405
1392
|
const projects = Workspace.Workspace.WorkspaceImpl.instance().projects();
|
@@ -1420,9 +1407,9 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
1420
1407
|
// Expand inline stack frames in the formatted error in the stackTrace element, inserting new elements before the
|
1421
1408
|
// insertBefore anchor.
|
1422
1409
|
private async expandInlineStackFrames(
|
1423
|
-
debuggerModel: SDK.DebuggerModel.DebuggerModel, prefix: string, suffix: string,
|
1424
|
-
lineNumber: number|undefined, columnNumber: number|undefined,
|
1425
|
-
insertBefore: HTMLElement): Promise<boolean> {
|
1410
|
+
debuggerModel: SDK.DebuggerModel.DebuggerModel, prefix: string, suffix: string,
|
1411
|
+
url: Platform.DevToolsPath.UrlString, lineNumber: number|undefined, columnNumber: number|undefined,
|
1412
|
+
stackTrace: HTMLElement, insertBefore: HTMLElement): Promise<boolean> {
|
1426
1413
|
const {frames} = await this.getInlineFrames(debuggerModel, url, lineNumber, columnNumber);
|
1427
1414
|
if (!frames.length) {
|
1428
1415
|
return false;
|
@@ -240,7 +240,8 @@ export class ConsoleViewport {
|
|
240
240
|
private updateFocusedItem(focusLastChild?: boolean): void {
|
241
241
|
const selectedElement = this.renderedElementAt(this.virtualSelectedIndex);
|
242
242
|
const changed = this.lastSelectedElement !== selectedElement;
|
243
|
-
const containerHasFocus =
|
243
|
+
const containerHasFocus =
|
244
|
+
this.contentElementInternal === Platform.DOMUtilities.deepActiveElement(this.element.ownerDocument);
|
244
245
|
if (this.lastSelectedElement && changed) {
|
245
246
|
this.lastSelectedElement.classList.remove('console-selected');
|
246
247
|
}
|
@@ -3,13 +3,16 @@
|
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
6
|
+
import type * as Platform from '../../core/platform/platform.js';
|
6
7
|
import type * as SDK from '../../core/sdk/sdk.js';
|
7
8
|
import type * as Protocol from '../../generated/protocol.js';
|
8
9
|
|
10
|
+
// TODO(crbug.com/1253323): Casts to UrlString will be removed from this file when migration to branded types is complete.
|
11
|
+
|
9
12
|
export interface ParsedErrorFrame {
|
10
13
|
line: string;
|
11
14
|
link?: {
|
12
|
-
url:
|
15
|
+
url: Platform.DevToolsPath.UrlString,
|
13
16
|
prefix: string,
|
14
17
|
suffix: string,
|
15
18
|
lineNumber?: number,
|
@@ -101,13 +104,14 @@ export function parseSourcePositionsFromErrorStack(
|
|
101
104
|
return linkInfos;
|
102
105
|
}
|
103
106
|
|
104
|
-
function parseOrScriptMatch(debuggerModel: SDK.DebuggerModel.DebuggerModel, url:
|
107
|
+
function parseOrScriptMatch(debuggerModel: SDK.DebuggerModel.DebuggerModel, url: Platform.DevToolsPath.UrlString|null):
|
108
|
+
Platform.DevToolsPath.UrlString|null {
|
105
109
|
if (!url) {
|
106
110
|
return null;
|
107
111
|
}
|
108
112
|
const parsedURL = Common.ParsedURL.ParsedURL.fromString(url);
|
109
113
|
if (parsedURL) {
|
110
|
-
return parsedURL.url;
|
114
|
+
return parsedURL.url as Platform.DevToolsPath.UrlString;
|
111
115
|
}
|
112
116
|
if (debuggerModel.scriptsForSourceURL(url).length) {
|
113
117
|
return url;
|
@@ -115,7 +119,7 @@ function parseOrScriptMatch(debuggerModel: SDK.DebuggerModel.DebuggerModel, url:
|
|
115
119
|
// nodejs stack traces contain (absolute) file paths, but v8 reports them as file: urls.
|
116
120
|
const fileUrl = new URL(url, 'file://');
|
117
121
|
if (debuggerModel.scriptsForSourceURL(fileUrl.href).length) {
|
118
|
-
return fileUrl.href;
|
122
|
+
return fileUrl.href as Platform.DevToolsPath.UrlString;
|
119
123
|
}
|
120
124
|
return null;
|
121
125
|
}
|
@@ -315,7 +315,7 @@ function getPercentageFormatter(): Intl.NumberFormat {
|
|
315
315
|
export class GridNode extends DataGrid.SortableDataGrid.SortableDataGridNode<GridNode> {
|
316
316
|
coverageInfo: URLCoverageInfo;
|
317
317
|
private lastUsedSize!: number|undefined;
|
318
|
-
private url:
|
318
|
+
private url: Platform.DevToolsPath.UrlString;
|
319
319
|
private maxSize: number;
|
320
320
|
private highlightRegExp: RegExp|null;
|
321
321
|
|