chrome-devtools-frontend 1.0.982087 → 1.0.995629
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 +39 -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 +4 -4
- package/front_end/core/host/InspectorFrontendHostAPI.ts +7 -6
- 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 +193 -52
- package/front_end/core/i18n/locales/en-XL.json +193 -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/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 +79 -14
- 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 +158 -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/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 +31 -30
- package/front_end/models/timeline_model/TimelineProfileTree.ts +3 -2
- 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/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/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 +57 -31
- package/front_end/panels/console/ConsoleViewMessage.ts +12 -9
- 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/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/input/InputTimeline.ts +1 -1
- 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/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 +1 -1
- 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 +2 -0
- package/front_end/panels/profiler/LiveHeapProfileView.ts +3 -1
- package/front_end/panels/profiler/ProfilesPanel.ts +2 -1
- package/front_end/panels/profiler/heapProfiler.css +15 -3
- package/front_end/panels/screencast/ScreencastView.ts +1 -1
- package/front_end/panels/search/SearchConfig.ts +2 -1
- package/front_end/panels/settings/KeybindsSettingsTab.ts +3 -2
- 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.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +9 -9
- package/front_end/panels/timeline/TimelinePanel.ts +1 -1
- 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/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_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/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 +12 -7
- package/front_end/ui/legacy/components/utils/Linkifier.ts +7 -5
- 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 +1 -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
@@ -814,8 +814,8 @@ export class BackgroundServiceTreeElement extends ApplicationPanelTreeElement {
|
|
814
814
|
}
|
815
815
|
}
|
816
816
|
|
817
|
-
get itemURL():
|
818
|
-
return `background-service://${this.serviceName}
|
817
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
818
|
+
return `background-service://${this.serviceName}` as Platform.DevToolsPath.UrlString;
|
819
819
|
}
|
820
820
|
|
821
821
|
onselect(selectedByUser?: boolean): boolean {
|
@@ -848,8 +848,8 @@ export class DatabaseTreeElement extends ApplicationPanelTreeElement {
|
|
848
848
|
this.setLeadingIcons([icon]);
|
849
849
|
}
|
850
850
|
|
851
|
-
get itemURL():
|
852
|
-
return 'database://' + encodeURI(this.database.name);
|
851
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
852
|
+
return 'database://' + encodeURI(this.database.name) as Platform.DevToolsPath.UrlString;
|
853
853
|
}
|
854
854
|
|
855
855
|
onselect(selectedByUser?: boolean): boolean {
|
@@ -886,8 +886,9 @@ export class DatabaseTableTreeElement extends ApplicationPanelTreeElement {
|
|
886
886
|
this.setLeadingIcons([icon]);
|
887
887
|
}
|
888
888
|
|
889
|
-
get itemURL():
|
890
|
-
return 'database://' + encodeURI(this.database.name) + '/' + encodeURI(this.tableName)
|
889
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
890
|
+
return 'database://' + encodeURI(this.database.name) + '/' + encodeURI(this.tableName) as
|
891
|
+
Platform.DevToolsPath.UrlString;
|
891
892
|
}
|
892
893
|
|
893
894
|
onselect(selectedByUser?: boolean): boolean {
|
@@ -907,8 +908,8 @@ export class ServiceWorkersTreeElement extends ApplicationPanelTreeElement {
|
|
907
908
|
this.setLeadingIcons([icon]);
|
908
909
|
}
|
909
910
|
|
910
|
-
get itemURL():
|
911
|
-
return 'service-workers://';
|
911
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
912
|
+
return 'service-workers://' as Platform.DevToolsPath.UrlString;
|
912
913
|
}
|
913
914
|
|
914
915
|
onselect(selectedByUser?: boolean): boolean {
|
@@ -930,8 +931,8 @@ export class AppManifestTreeElement extends ApplicationPanelTreeElement {
|
|
930
931
|
this.setLeadingIcons([icon]);
|
931
932
|
}
|
932
933
|
|
933
|
-
get itemURL():
|
934
|
-
return 'manifest://';
|
934
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
935
|
+
return 'manifest://' as Platform.DevToolsPath.UrlString;
|
935
936
|
}
|
936
937
|
|
937
938
|
onselect(selectedByUser?: boolean): boolean {
|
@@ -953,8 +954,8 @@ export class ClearStorageTreeElement extends ApplicationPanelTreeElement {
|
|
953
954
|
this.setLeadingIcons([icon]);
|
954
955
|
}
|
955
956
|
|
956
|
-
get itemURL():
|
957
|
-
return 'clear-storage://';
|
957
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
958
|
+
return 'clear-storage://' as Platform.DevToolsPath.UrlString;
|
958
959
|
}
|
959
960
|
|
960
961
|
onselect(selectedByUser?: boolean): boolean {
|
@@ -1101,8 +1102,9 @@ export class IDBDatabaseTreeElement extends ApplicationPanelTreeElement {
|
|
1101
1102
|
this.model.addEventListener(IndexedDBModelEvents.DatabaseNamesRefreshed, this.refreshIndexedDB, this);
|
1102
1103
|
}
|
1103
1104
|
|
1104
|
-
get itemURL():
|
1105
|
-
return 'indexedDB://' + this.databaseId.securityOrigin + '/' + this.databaseId.name
|
1105
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
1106
|
+
return 'indexedDB://' + this.databaseId.securityOrigin + '/' + this.databaseId.name as
|
1107
|
+
Platform.DevToolsPath.UrlString;
|
1106
1108
|
}
|
1107
1109
|
|
1108
1110
|
onattach(): void {
|
@@ -1215,8 +1217,9 @@ export class IDBObjectStoreTreeElement extends ApplicationPanelTreeElement {
|
|
1215
1217
|
this.setLeadingIcons([icon]);
|
1216
1218
|
}
|
1217
1219
|
|
1218
|
-
get itemURL():
|
1219
|
-
return 'indexedDB://' + this.databaseId.securityOrigin + '/' + this.databaseId.name + '/' + this.objectStore.name
|
1220
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
1221
|
+
return 'indexedDB://' + this.databaseId.securityOrigin + '/' + this.databaseId.name + '/' + this.objectStore.name as
|
1222
|
+
Platform.DevToolsPath.UrlString;
|
1220
1223
|
}
|
1221
1224
|
|
1222
1225
|
onattach(): void {
|
@@ -1351,9 +1354,9 @@ export class IDBIndexTreeElement extends ApplicationPanelTreeElement {
|
|
1351
1354
|
this.refreshObjectStore = refreshObjectStore;
|
1352
1355
|
}
|
1353
1356
|
|
1354
|
-
get itemURL():
|
1357
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
1355
1358
|
return 'indexedDB://' + this.databaseId.securityOrigin + '/' + this.databaseId.name + '/' + this.objectStore.name +
|
1356
|
-
'/' + this.index.name;
|
1359
|
+
'/' + this.index.name as Platform.DevToolsPath.UrlString;
|
1357
1360
|
}
|
1358
1361
|
|
1359
1362
|
markNeedsRefresh(): void {
|
@@ -1420,8 +1423,9 @@ export class DOMStorageTreeElement extends ApplicationPanelTreeElement {
|
|
1420
1423
|
this.setLeadingIcons([icon]);
|
1421
1424
|
}
|
1422
1425
|
|
1423
|
-
get itemURL():
|
1424
|
-
return 'storage://' + this.domStorage.securityOrigin + '/' +
|
1426
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
1427
|
+
return 'storage://' + this.domStorage.securityOrigin + '/' +
|
1428
|
+
(this.domStorage.isLocalStorage ? 'local' : 'session') as Platform.DevToolsPath.UrlString;
|
1425
1429
|
}
|
1426
1430
|
|
1427
1431
|
onselect(selectedByUser?: boolean): boolean {
|
@@ -1456,8 +1460,8 @@ export class CookieTreeElement extends ApplicationPanelTreeElement {
|
|
1456
1460
|
this.setLeadingIcons([icon]);
|
1457
1461
|
}
|
1458
1462
|
|
1459
|
-
get itemURL():
|
1460
|
-
return 'cookies://' + this.cookieDomainInternal;
|
1463
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
1464
|
+
return 'cookies://' + this.cookieDomainInternal as Platform.DevToolsPath.UrlString;
|
1461
1465
|
}
|
1462
1466
|
|
1463
1467
|
cookieDomain(): string {
|
@@ -1804,14 +1808,14 @@ export class FrameTreeElement extends ApplicationPanelTreeElement {
|
|
1804
1808
|
}
|
1805
1809
|
}
|
1806
1810
|
|
1807
|
-
get itemURL():
|
1811
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
1808
1812
|
// This is used to persist over reloads/navigation which frame was selected.
|
1809
1813
|
// A frame's title can change on DevTools refresh, so we resort to using
|
1810
1814
|
// the URL instead (even though it is not guaranteed to be unique).
|
1811
1815
|
if (this.frame.isTopFrame()) {
|
1812
|
-
return 'frame://';
|
1816
|
+
return 'frame://' as Platform.DevToolsPath.UrlString;
|
1813
1817
|
}
|
1814
|
-
return 'frame://' + encodeURI(this.frame.url);
|
1818
|
+
return 'frame://' + encodeURI(this.frame.url) as Platform.DevToolsPath.UrlString;
|
1815
1819
|
}
|
1816
1820
|
|
1817
1821
|
onselect(selectedByUser?: boolean): boolean {
|
@@ -1965,7 +1969,7 @@ export class FrameResourceTreeElement extends ApplicationPanelTreeElement {
|
|
1965
1969
|
return resourceToFrameResourceTreeElement.get(resource);
|
1966
1970
|
}
|
1967
1971
|
|
1968
|
-
get itemURL():
|
1972
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
1969
1973
|
return this.resource.url;
|
1970
1974
|
}
|
1971
1975
|
|
@@ -2082,8 +2086,8 @@ class FrameWindowTreeElement extends ApplicationPanelTreeElement {
|
|
2082
2086
|
return false;
|
2083
2087
|
}
|
2084
2088
|
|
2085
|
-
get itemURL():
|
2086
|
-
return this.targetInfo.url;
|
2089
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
2090
|
+
return this.targetInfo.url as Platform.DevToolsPath.UrlString;
|
2087
2091
|
}
|
2088
2092
|
}
|
2089
2093
|
|
@@ -2111,7 +2115,7 @@ class WorkerTreeElement extends ApplicationPanelTreeElement {
|
|
2111
2115
|
return false;
|
2112
2116
|
}
|
2113
2117
|
|
2114
|
-
get itemURL():
|
2115
|
-
return this.targetInfo.url;
|
2118
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
2119
|
+
return this.targetInfo.url as Platform.DevToolsPath.UrlString;
|
2116
2120
|
}
|
2117
2121
|
}
|
@@ -3,6 +3,7 @@
|
|
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 * as UI from '../../ui/legacy/legacy.js';
|
7
8
|
|
8
9
|
import type {ResourcesPanel} from './ResourcesPanel.js';
|
@@ -16,7 +17,7 @@ export class ApplicationPanelTreeElement extends UI.TreeOutline.TreeElement {
|
|
16
17
|
UI.ARIAUtils.setAccessibleName(this.listItemElement, title);
|
17
18
|
}
|
18
19
|
|
19
|
-
get itemURL():
|
20
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
20
21
|
throw new Error('Unimplemented Method');
|
21
22
|
}
|
22
23
|
|
@@ -25,7 +26,7 @@ export class ApplicationPanelTreeElement extends UI.TreeOutline.TreeElement {
|
|
25
26
|
return false;
|
26
27
|
}
|
27
28
|
|
28
|
-
const path:
|
29
|
+
const path: Platform.DevToolsPath.UrlString[] = [];
|
29
30
|
for (let el: UI.TreeOutline.TreeElement|null = this; el; el = el.parent) {
|
30
31
|
const url = el instanceof ApplicationPanelTreeElement && el.itemURL;
|
31
32
|
if (!url) {
|
@@ -56,8 +57,8 @@ export class ExpandableApplicationPanelTreeElement extends ApplicationPanelTreeE
|
|
56
57
|
this.categoryLink = null;
|
57
58
|
}
|
58
59
|
|
59
|
-
get itemURL():
|
60
|
-
return 'category://' + this.categoryName;
|
60
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
61
|
+
return 'category://' + this.categoryName as Platform.DevToolsPath.UrlString;
|
61
62
|
}
|
62
63
|
|
63
64
|
setLink(link: string): void {
|
@@ -29,6 +29,7 @@
|
|
29
29
|
|
30
30
|
import * as Common from '../../core/common/common.js';
|
31
31
|
import * as i18n from '../../core/i18n/i18n.js';
|
32
|
+
import * as Platform from '../../core/platform/platform.js';
|
32
33
|
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
33
34
|
import * as UI from '../../ui/legacy/legacy.js';
|
34
35
|
|
@@ -159,7 +160,7 @@ export class DatabaseQueryView extends Common.ObjectWrapper.eventMixin<EventType
|
|
159
160
|
|
160
161
|
const selectedElement = index >= 0 ? this.queryResults[index] : null;
|
161
162
|
const changed = this.lastSelectedElement !== selectedElement;
|
162
|
-
const containerHasFocus = this.queryWrapper === this.element.ownerDocument
|
163
|
+
const containerHasFocus = this.queryWrapper === Platform.DOMUtilities.deepActiveElement(this.element.ownerDocument);
|
163
164
|
|
164
165
|
if (selectedElement && (changed || containerHasFocus) && this.element.hasFocus()) {
|
165
166
|
if (!selectedElement.hasFocus()) {
|
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
import * as Host from '../../core/host/host.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 UI from '../../ui/legacy/legacy.js';
|
9
10
|
|
@@ -35,8 +36,8 @@ export class InterestGroupTreeElement extends ApplicationPanelTreeElement {
|
|
35
36
|
this.view = new InterestGroupStorageView(this);
|
36
37
|
}
|
37
38
|
|
38
|
-
get itemURL():
|
39
|
-
return 'interest-groups://';
|
39
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
40
|
+
return 'interest-groups://' as Platform.DevToolsPath.UrlString;
|
40
41
|
}
|
41
42
|
|
42
43
|
async getInterestGroupDetails(owner: string, name: string): Promise<Protocol.Storage.InterestGroupDetails|null> {
|
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
import * as Host from '../../core/host/host.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 UI from '../../ui/legacy/legacy.js';
|
8
9
|
|
9
10
|
import {ApplicationPanelTreeElement} from './ApplicationPanelTreeElement.js';
|
@@ -28,8 +29,8 @@ export class ReportingApiTreeElement extends ApplicationPanelTreeElement {
|
|
28
29
|
this.setLeadingIcons([icon]);
|
29
30
|
}
|
30
31
|
|
31
|
-
get itemURL():
|
32
|
-
return 'reportingApi://';
|
32
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
33
|
+
return 'reportingApi://' as Platform.DevToolsPath.UrlString;
|
33
34
|
}
|
34
35
|
|
35
36
|
onselect(selectedByUser?: boolean): boolean {
|
@@ -3,6 +3,7 @@
|
|
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 * as SDK from '../../core/sdk/sdk.js';
|
7
8
|
import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
8
9
|
import * as UI from '../../ui/legacy/legacy.js';
|
@@ -20,7 +21,7 @@ import {StorageItemsView} from './StorageItemsView.js';
|
|
20
21
|
let resourcesPanelInstance: ResourcesPanel;
|
21
22
|
|
22
23
|
export class ResourcesPanel extends UI.Panel.PanelWithSidebar {
|
23
|
-
private readonly resourcesLastSelectedItemSetting: Common.Settings.Setting<
|
24
|
+
private readonly resourcesLastSelectedItemSetting: Common.Settings.Setting<Platform.DevToolsPath.UrlString[]>;
|
24
25
|
visibleView: UI.Widget.Widget|null;
|
25
26
|
private pendingViewPromise: Promise<UI.Widget.Widget>|null;
|
26
27
|
private categoryView: StorageCategoryView|null;
|
@@ -90,11 +91,11 @@ export class ResourcesPanel extends UI.Panel.PanelWithSidebar {
|
|
90
91
|
this.sidebar.focus();
|
91
92
|
}
|
92
93
|
|
93
|
-
lastSelectedItemPath():
|
94
|
+
lastSelectedItemPath(): Platform.DevToolsPath.UrlString[] {
|
94
95
|
return this.resourcesLastSelectedItemSetting.get();
|
95
96
|
}
|
96
97
|
|
97
|
-
setLastSelectedItemPath(path:
|
98
|
+
setLastSelectedItemPath(path: Platform.DevToolsPath.UrlString[]): void {
|
98
99
|
this.resourcesLastSelectedItemSetting.set(path);
|
99
100
|
}
|
100
101
|
|
@@ -480,7 +480,12 @@ export class DataGridNode extends DataGrid.DataGrid.DataGridNode<DataGridNode> {
|
|
480
480
|
tooltip = i18nString(UIStrings.varyHeaderWarning);
|
481
481
|
}
|
482
482
|
}
|
483
|
-
|
483
|
+
const parentElement = cell.parentElement;
|
484
|
+
let gridNode;
|
485
|
+
if (parentElement && this.dataGrid) {
|
486
|
+
gridNode = this.dataGrid.elementToDataGridNode.get(parentElement);
|
487
|
+
}
|
488
|
+
DataGrid.DataGrid.DataGridImpl.setElementText(cell, value || '', /* longText= */ true, gridNode);
|
484
489
|
UI.Tooltip.Tooltip.install(cell, tooltip);
|
485
490
|
return cell;
|
486
491
|
}
|
@@ -3,6 +3,7 @@
|
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
5
|
import * as i18n from '../../core/i18n/i18n.js';
|
6
|
+
import type * as Platform from '../../core/platform/platform.js';
|
6
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
7
8
|
import * as UI from '../../ui/legacy/legacy.js';
|
8
9
|
|
@@ -32,8 +33,8 @@ export class TrustTokensTreeElement extends ApplicationPanelTreeElement {
|
|
32
33
|
this.setLeadingIcons([icon]);
|
33
34
|
}
|
34
35
|
|
35
|
-
get itemURL():
|
36
|
-
return 'trustTokens://';
|
36
|
+
get itemURL(): Platform.DevToolsPath.UrlString {
|
37
|
+
return 'trustTokens://' as Platform.DevToolsPath.UrlString;
|
37
38
|
}
|
38
39
|
|
39
40
|
onselect(selectedByUser?: boolean): boolean {
|
@@ -502,6 +502,14 @@ const UIStrings = {
|
|
502
502
|
*/
|
503
503
|
embedderExtensionSentMessageToCachedFrame:
|
504
504
|
'Extensions with long-lived connection attempted to send messages to frames in back/forward cache.',
|
505
|
+
/**
|
506
|
+
* @description Description text for not restored reason ErrorDocument.
|
507
|
+
*/
|
508
|
+
errorDocument: 'Back/forward cache is disabled due to a document error.',
|
509
|
+
/**
|
510
|
+
* @description Description text for not restored reason ErrorDocument.
|
511
|
+
*/
|
512
|
+
fencedFramesEmbedder: 'Pages using FencedFrames cannot be stored in bfcache.',
|
505
513
|
};
|
506
514
|
|
507
515
|
const str_ = i18n.i18n.registerUIStrings('panels/application/components/BackForwardCacheStrings.ts', UIStrings);
|
@@ -544,7 +552,6 @@ export const NotRestoredReasonDescription = {
|
|
544
552
|
'UserAgentOverrideDiffers': {name: i18nLazyString(UIStrings.userAgentOverrideDiffers)},
|
545
553
|
'ForegroundCacheLimit': {name: i18nLazyString(UIStrings.foregroundCacheLimit)},
|
546
554
|
'BackForwardCacheDisabledForDelegate': {name: i18nLazyString(UIStrings.backForwardCacheDisabledForDelegate)},
|
547
|
-
'OptInUnloadHeaderNotPresent': {name: i18nLazyString(UIStrings.unloadHandlerExistsInMainFrame)},
|
548
555
|
'UnloadHandlerExistsInMainFrame': {name: i18nLazyString(UIStrings.unloadHandlerExistsInMainFrame)},
|
549
556
|
'UnloadHandlerExistsInSubFrame': {name: i18nLazyString(UIStrings.unloadHandlerExistsInSubFrame)},
|
550
557
|
'ServiceWorkerUnregistration': {name: i18nLazyString(UIStrings.serviceWorkerUnregistration)},
|
@@ -639,4 +646,6 @@ export const NotRestoredReasonDescription = {
|
|
639
646
|
'EmbedderExtensionMessagingForOpenPort': {name: i18nLazyString(UIStrings.embedderExtensionMessagingForOpenPort)},
|
640
647
|
'EmbedderExtensionSentMessageToCachedFrame':
|
641
648
|
{name: i18nLazyString(UIStrings.embedderExtensionSentMessageToCachedFrame)},
|
649
|
+
'ErrorDocument': {name: i18nLazyString(UIStrings.errorDocument)},
|
650
|
+
'FencedFramesEmbedder': {name: i18nLazyString(UIStrings.fencedFramesEmbedder)},
|
642
651
|
};
|
@@ -7,6 +7,7 @@ import * as i18n from '../../../core/i18n/i18n.js';
|
|
7
7
|
import * as Buttons from '../../../ui/components/buttons/buttons.js';
|
8
8
|
import * as SDK from '../../../core/sdk/sdk.js';
|
9
9
|
import * as LitHtml from '../../../ui/lit-html/lit-html.js';
|
10
|
+
import * as Root from '../../../core/root/root.js';
|
10
11
|
import * as ReportView from '../../../ui/components/report_view/report_view.js';
|
11
12
|
import * as UI from '../../../ui/legacy/legacy.js';
|
12
13
|
import * as Protocol from '../../../generated/protocol.js';
|
@@ -14,6 +15,7 @@ import * as IconButton from '../../../ui/components/icon_button/icon_button.js';
|
|
14
15
|
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
15
16
|
import * as Coordinator from '../../../ui/components/render_coordinator/render_coordinator.js';
|
16
17
|
import * as ChromeLink from '../../../ui/components/chrome_link/chrome_link.js';
|
18
|
+
import * as ExpandableList from '../../../ui/components/expandable_list/expandable_list.js';
|
17
19
|
|
18
20
|
import {NotRestoredReasonDescription} from './BackForwardCacheStrings.js';
|
19
21
|
import backForwardCacheViewStyles from './backForwardCacheView.css.js';
|
@@ -102,7 +104,32 @@ const UIStrings = {
|
|
102
104
|
* @description Text that precedes displaying a link to the extension which blocked the page from being eligible for back/forward cache.
|
103
105
|
*/
|
104
106
|
blockingExtensionId: 'Extension id: ',
|
107
|
+
/**
|
108
|
+
* @description Label for the 'Frames' section of the back/forward cache view, which shows a frame tree of the
|
109
|
+
* page with reasons why the frames can't be cached.
|
110
|
+
*/
|
111
|
+
framesTitle: 'Frames',
|
112
|
+
/**
|
113
|
+
* @description Top level summary of the total number of issues found in a single frame.
|
114
|
+
*/
|
115
|
+
issuesInSingleFrame: '{n, plural, =1 {# issue found in 1 frame.} other {# issues found in 1 frame.}}',
|
116
|
+
/**
|
117
|
+
* @description Top level summary of the total number of issues found and the number of frames they were found in.
|
118
|
+
* 'm' is never less than 2.
|
119
|
+
* @example {3} m
|
120
|
+
*/
|
121
|
+
issuesInMultipleFrames: '{n, plural, =1 {# issue found in {m} frames.} other {# issues found in {m} frames.}}',
|
122
|
+
/**
|
123
|
+
* @description Shows the number of frames with a particular issue.
|
124
|
+
*/
|
125
|
+
framesPerIssue: '{n, plural, =1 {# frame} other {# frames}}',
|
126
|
+
/**
|
127
|
+
*@description Title for a frame in the frame tree that doesn't have a URL. Placeholder indicates which number frame with a blank URL it is.
|
128
|
+
*@example {3} PH1
|
129
|
+
*/
|
130
|
+
blankURLTitle: 'Blank URL [{PH1}]',
|
105
131
|
};
|
132
|
+
|
106
133
|
const str_ = i18n.i18n.registerUIStrings('panels/application/components/BackForwardCacheView.ts', UIStrings);
|
107
134
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
108
135
|
|
@@ -226,7 +253,7 @@ export class BackForwardCacheView extends HTMLElement {
|
|
226
253
|
// as the browser navigates to another unrelated page and goes back to the current page.
|
227
254
|
// We chose "chrome://terms" because it must be cross-site.
|
228
255
|
// Ideally, We want to have our own testing page like "chrome: //bfcache-test".
|
229
|
-
void resourceTreeModel.navigate('chrome://terms');
|
256
|
+
void resourceTreeModel.navigate('chrome://terms' as Platform.DevToolsPath.UrlString);
|
230
257
|
}
|
231
258
|
}
|
232
259
|
|
@@ -249,14 +276,15 @@ export class BackForwardCacheView extends HTMLElement {
|
|
249
276
|
// clang-format off
|
250
277
|
return LitHtml.html`
|
251
278
|
${this.#renderBackForwardCacheStatus(this.#frame.backForwardCacheDetails.restoredFromCache)}
|
252
|
-
<div class='
|
253
|
-
<div class='
|
279
|
+
<div class='report-line'>
|
280
|
+
<div class='report-key'>
|
254
281
|
${i18nString(UIStrings.url)}
|
255
282
|
</div>
|
256
|
-
<div class='
|
283
|
+
<div class='report-value'>
|
257
284
|
${this.#frame.url}
|
258
285
|
</div>
|
259
286
|
</div>
|
287
|
+
${this.#maybeRenderFrameTree(this.#frame.backForwardCacheDetails.explanationsTree)}
|
260
288
|
<${ReportView.ReportView.ReportSection.litTagName}>
|
261
289
|
<${Buttons.Button.Button.litTagName}
|
262
290
|
.disabled=${isTestRunning || isTestingForbidden}
|
@@ -271,7 +299,8 @@ export class BackForwardCacheView extends HTMLElement {
|
|
271
299
|
</${ReportView.ReportView.ReportSection.litTagName}>
|
272
300
|
<${ReportView.ReportView.ReportSectionDivider.litTagName}>
|
273
301
|
</${ReportView.ReportView.ReportSectionDivider.litTagName}>
|
274
|
-
|
302
|
+
${this.#maybeRenderExplanations(this.#frame.backForwardCacheDetails.explanations,
|
303
|
+
this.#frame.backForwardCacheDetails.explanationsTree)}
|
275
304
|
<${ReportView.ReportView.ReportSection.litTagName}>
|
276
305
|
<x-link href="https://web.dev/bfcache/" class="link">
|
277
306
|
${i18nString(UIStrings.learnMore)}
|
@@ -281,6 +310,81 @@ export class BackForwardCacheView extends HTMLElement {
|
|
281
310
|
// clang-format on
|
282
311
|
}
|
283
312
|
|
313
|
+
#maybeRenderFrameTree(explanationTree: Protocol.Page.BackForwardCacheNotRestoredExplanationTree|
|
314
|
+
undefined): LitHtml.TemplateResult|{} {
|
315
|
+
if (!explanationTree || (explanationTree.explanations.length === 0 && explanationTree.children.length === 0) ||
|
316
|
+
!Root.Runtime.experiments.isEnabled('bfcacheDisplayTree')) {
|
317
|
+
return LitHtml.nothing;
|
318
|
+
}
|
319
|
+
const treeOutline = new UI.TreeOutline.TreeOutlineInShadow();
|
320
|
+
treeOutline.registerCSSFiles([backForwardCacheViewStyles]);
|
321
|
+
const urlTreeElement = new UI.TreeOutline.TreeElement();
|
322
|
+
treeOutline.appendChild(urlTreeElement);
|
323
|
+
const {frameCount, issueCount} = this.#maybeAddFrameSubTree(urlTreeElement, {blankCount: 1}, explanationTree);
|
324
|
+
// The translation pipeline does not support nested plurals. We avoid this
|
325
|
+
// here by pulling out the logic for one of the plurals into code instead.
|
326
|
+
if (frameCount === 1) {
|
327
|
+
urlTreeElement.title = i18nString(UIStrings.issuesInSingleFrame, {n: issueCount});
|
328
|
+
} else {
|
329
|
+
urlTreeElement.title = i18nString(UIStrings.issuesInMultipleFrames, {n: issueCount, m: frameCount});
|
330
|
+
}
|
331
|
+
// The first element is always the root, so expand it by default (and override its icon).
|
332
|
+
const topFrameElement = urlTreeElement.childAt(0);
|
333
|
+
if (topFrameElement) {
|
334
|
+
topFrameElement.expand();
|
335
|
+
topFrameElement.setLeadingIcons([UI.Icon.Icon.create('mediumicon-frame')]);
|
336
|
+
}
|
337
|
+
return LitHtml.html`
|
338
|
+
<div class='report-line'>
|
339
|
+
<div class='report-key'>
|
340
|
+
${i18nString(UIStrings.framesTitle)}
|
341
|
+
</div>
|
342
|
+
<div class='report-value'>
|
343
|
+
${treeOutline.element}
|
344
|
+
</div>
|
345
|
+
</div>`;
|
346
|
+
}
|
347
|
+
|
348
|
+
// Potentially adds a subtree of the frame tree, if there are any issues. Returns a tuple of how many frames were added,
|
349
|
+
// and how many issues there were in total over all those frames.
|
350
|
+
#maybeAddFrameSubTree(
|
351
|
+
root: UI.TreeOutline.TreeElement, nextBlankURLCount: {blankCount: number},
|
352
|
+
explanationTree: Protocol.Page.BackForwardCacheNotRestoredExplanationTree|
|
353
|
+
undefined): {frameCount: number, issueCount: number} {
|
354
|
+
if (!explanationTree || (explanationTree.explanations.length === 0 && explanationTree.children.length === 0)) {
|
355
|
+
return {frameCount: 0, issueCount: 0};
|
356
|
+
}
|
357
|
+
const icon = UI.Icon.Icon.create('mediumicon-frame-embedded');
|
358
|
+
let issuecount = explanationTree.explanations.length;
|
359
|
+
let framecount = 0;
|
360
|
+
let treeElementURL: string;
|
361
|
+
if (explanationTree.url.length > 0) {
|
362
|
+
treeElementURL = explanationTree.url;
|
363
|
+
} else {
|
364
|
+
treeElementURL = i18nString(UIStrings.blankURLTitle, {PH1: String(nextBlankURLCount.blankCount)});
|
365
|
+
nextBlankURLCount.blankCount += 1;
|
366
|
+
}
|
367
|
+
const urlTreeElement = new UI.TreeOutline.TreeElement();
|
368
|
+
root.appendChild(urlTreeElement);
|
369
|
+
urlTreeElement.setLeadingIcons([icon]);
|
370
|
+
explanationTree.explanations.forEach(explanation => {
|
371
|
+
urlTreeElement.appendChild(new UI.TreeOutline.TreeElement(explanation.reason));
|
372
|
+
});
|
373
|
+
explanationTree.children.forEach(child => {
|
374
|
+
const counts = this.#maybeAddFrameSubTree(urlTreeElement, nextBlankURLCount, child);
|
375
|
+
framecount += counts.frameCount;
|
376
|
+
issuecount += counts.issueCount;
|
377
|
+
});
|
378
|
+
if (issuecount > 0) {
|
379
|
+
urlTreeElement.title = '(' + String(issuecount) + ') ' + treeElementURL;
|
380
|
+
framecount += 1;
|
381
|
+
} else if (framecount === 0) {
|
382
|
+
root.removeChild(urlTreeElement);
|
383
|
+
}
|
384
|
+
|
385
|
+
return {frameCount: framecount, issueCount: issuecount};
|
386
|
+
}
|
387
|
+
|
284
388
|
#renderBackForwardCacheStatus(status: boolean|undefined): LitHtml.TemplateResult {
|
285
389
|
switch (status) {
|
286
390
|
case true:
|
@@ -327,8 +431,32 @@ export class BackForwardCacheView extends HTMLElement {
|
|
327
431
|
// clang-format on
|
328
432
|
}
|
329
433
|
|
330
|
-
#
|
331
|
-
|
434
|
+
#buildReasonToFramesMap(
|
435
|
+
explanationTree: Protocol.Page.BackForwardCacheNotRestoredExplanationTree,
|
436
|
+
nextBlankURLCount: {blankCount: number},
|
437
|
+
outputMap: Map<Protocol.Page.BackForwardCacheNotRestoredReason, string[]>): void {
|
438
|
+
let url = explanationTree.url;
|
439
|
+
if (url.length === 0) {
|
440
|
+
url = i18nString(UIStrings.blankURLTitle, {PH1: String(nextBlankURLCount.blankCount)});
|
441
|
+
nextBlankURLCount.blankCount += 1;
|
442
|
+
}
|
443
|
+
explanationTree.explanations.forEach(explanation => {
|
444
|
+
let frames: string[]|undefined = outputMap.get(explanation.reason);
|
445
|
+
if (frames === undefined) {
|
446
|
+
frames = [url];
|
447
|
+
outputMap.set(explanation.reason, frames);
|
448
|
+
} else {
|
449
|
+
frames.push(url);
|
450
|
+
}
|
451
|
+
});
|
452
|
+
explanationTree.children.map(child => {
|
453
|
+
this.#buildReasonToFramesMap(child, nextBlankURLCount, outputMap);
|
454
|
+
});
|
455
|
+
}
|
456
|
+
|
457
|
+
#maybeRenderExplanations(
|
458
|
+
explanations: Protocol.Page.BackForwardCacheNotRestoredExplanation[],
|
459
|
+
explanationTree: Protocol.Page.BackForwardCacheNotRestoredExplanationTree|undefined): LitHtml.TemplateResult|{} {
|
332
460
|
if (explanations.length === 0) {
|
333
461
|
return LitHtml.nothing;
|
334
462
|
}
|
@@ -340,19 +468,24 @@ export class BackForwardCacheView extends HTMLElement {
|
|
340
468
|
const circumstantial = explanations.filter(
|
341
469
|
explanation => explanation.type === Protocol.Page.BackForwardCacheNotRestoredReasonType.Circumstantial);
|
342
470
|
|
471
|
+
const reasonToFramesMap: Map<Protocol.Page.BackForwardCacheNotRestoredReason, string[]> = new Map();
|
472
|
+
if (explanationTree) {
|
473
|
+
this.#buildReasonToFramesMap(explanationTree, {blankCount: 1}, reasonToFramesMap);
|
474
|
+
}
|
343
475
|
// Disabled until https://crbug.com/1079231 is fixed.
|
344
476
|
// clang-format off
|
345
477
|
return LitHtml.html`
|
346
|
-
${this.#renderExplanations(i18nString(UIStrings.pageSupportNeeded), i18nString(UIStrings.pageSupportNeededExplanation), pageSupportNeeded)}
|
347
|
-
${this.#renderExplanations(i18nString(UIStrings.supportPending), i18nString(UIStrings.supportPendingExplanation), supportPending)}
|
348
|
-
${this.#renderExplanations(i18nString(UIStrings.circumstantial), i18nString(UIStrings.circumstantialExplanation), circumstantial)}
|
478
|
+
${this.#renderExplanations(i18nString(UIStrings.pageSupportNeeded), i18nString(UIStrings.pageSupportNeededExplanation), pageSupportNeeded, reasonToFramesMap)}
|
479
|
+
${this.#renderExplanations(i18nString(UIStrings.supportPending), i18nString(UIStrings.supportPendingExplanation), supportPending, reasonToFramesMap)}
|
480
|
+
${this.#renderExplanations(i18nString(UIStrings.circumstantial), i18nString(UIStrings.circumstantialExplanation), circumstantial, reasonToFramesMap)}
|
349
481
|
`;
|
350
482
|
// clang-format on
|
351
483
|
}
|
352
484
|
|
353
485
|
#renderExplanations(
|
354
486
|
category: Platform.UIString.LocalizedString, explainerText: Platform.UIString.LocalizedString,
|
355
|
-
explanations: Protocol.Page.BackForwardCacheNotRestoredExplanation[]
|
487
|
+
explanations: Protocol.Page.BackForwardCacheNotRestoredExplanation[],
|
488
|
+
reasonToFramesMap: Map<Protocol.Page.BackForwardCacheNotRestoredReason, string[]>): LitHtml.TemplateResult {
|
356
489
|
// Disabled until https://crbug.com/1079231 is fixed.
|
357
490
|
// clang-format off
|
358
491
|
return LitHtml.html`
|
@@ -369,7 +502,7 @@ export class BackForwardCacheView extends HTMLElement {
|
|
369
502
|
</${IconButton.Icon.Icon.litTagName}>
|
370
503
|
</div>
|
371
504
|
</${ReportView.ReportView.ReportSectionHeader.litTagName}>
|
372
|
-
${explanations.map(explanation => this.#renderReason(explanation))}
|
505
|
+
${explanations.map(explanation => this.#renderReason(explanation, reasonToFramesMap.get(explanation.reason)))}
|
373
506
|
` : LitHtml.nothing}
|
374
507
|
`;
|
375
508
|
// clang-format on
|
@@ -389,7 +522,23 @@ export class BackForwardCacheView extends HTMLElement {
|
|
389
522
|
return LitHtml.nothing;
|
390
523
|
}
|
391
524
|
|
392
|
-
#
|
525
|
+
#renderFramesPerReason(frames: string[]|undefined): LitHtml.TemplateResult|{} {
|
526
|
+
if (frames === undefined || frames.length === 0 || !Root.Runtime.experiments.isEnabled('bfcacheDisplayTree')) {
|
527
|
+
return LitHtml.nothing;
|
528
|
+
}
|
529
|
+
const rows = [LitHtml.html`<div>${i18nString(UIStrings.framesPerIssue, {n: frames.length})}</div>`];
|
530
|
+
rows.push(...frames.map(url => LitHtml.html`<div class='text-ellipsis' title=${url}>${url}</div>`));
|
531
|
+
return LitHtml.html`
|
532
|
+
<div class='explanation-frames'>
|
533
|
+
<${ExpandableList.ExpandableList.ExpandableList.litTagName} .data=${
|
534
|
+
{rows} as
|
535
|
+
ExpandableList.ExpandableList.ExpandableListData}></${ExpandableList.ExpandableList.ExpandableList.litTagName}>
|
536
|
+
</div>
|
537
|
+
`;
|
538
|
+
}
|
539
|
+
|
540
|
+
#renderReason(explanation: Protocol.Page.BackForwardCacheNotRestoredExplanation, frames: string[]|undefined):
|
541
|
+
LitHtml.TemplateResult {
|
393
542
|
// clang-format off
|
394
543
|
return LitHtml.html`
|
395
544
|
<${ReportView.ReportView.ReportSection.litTagName}>
|
@@ -413,6 +562,7 @@ export class BackForwardCacheView extends HTMLElement {
|
|
413
562
|
<div class='gray-text'>
|
414
563
|
${explanation.reason}
|
415
564
|
</div>
|
565
|
+
${this.#renderFramesPerReason(frames)}
|
416
566
|
`;
|
417
567
|
// clang-format on
|
418
568
|
}
|