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
@@ -352,6 +352,7 @@ export class ContextMenu extends SubMenu {
|
|
352
352
|
private readonly handlers: Map<number, () => void>;
|
353
353
|
idInternal: number;
|
354
354
|
private softMenu?: SoftContextMenu;
|
355
|
+
private contextMenuLabel?: string;
|
355
356
|
|
356
357
|
constructor(event: Event, options: ContextMenuOptions = {}) {
|
357
358
|
super(null);
|
@@ -440,6 +441,9 @@ export class ContextMenu extends SubMenu {
|
|
440
441
|
this.softMenu = new SoftContextMenu(
|
441
442
|
(menuObject as SoftContextMenuDescriptor[]), this.itemSelected.bind(this), undefined, this.onSoftMenuClosed);
|
442
443
|
this.softMenu.show((ownerDocument as Document), new AnchorBox(this.x, this.y, 0, 0));
|
444
|
+
if (this.contextMenuLabel) {
|
445
|
+
this.softMenu.setContextMenuElementLabel(this.contextMenuLabel);
|
446
|
+
}
|
443
447
|
} else {
|
444
448
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.showContextMenuAtPoint(
|
445
449
|
this.x, this.y, menuObject, (ownerDocument as Document));
|
@@ -457,6 +461,10 @@ export class ContextMenu extends SubMenu {
|
|
457
461
|
}
|
458
462
|
}
|
459
463
|
|
464
|
+
setContextMenuLabel(label: string): void {
|
465
|
+
this.contextMenuLabel = label;
|
466
|
+
}
|
467
|
+
|
460
468
|
setX(x: number): void {
|
461
469
|
this.x = x;
|
462
470
|
}
|
@@ -504,6 +512,12 @@ export class ContextMenu extends SubMenu {
|
|
504
512
|
this.pendingTargets.push(target);
|
505
513
|
}
|
506
514
|
|
515
|
+
markAsMenuItemCheckBox(): void {
|
516
|
+
if (this.softMenu) {
|
517
|
+
this.softMenu.markAsMenuItemCheckBox();
|
518
|
+
}
|
519
|
+
}
|
520
|
+
|
507
521
|
private static pendingMenu: ContextMenu|null = null;
|
508
522
|
private static useSoftMenu = false;
|
509
523
|
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
@@ -31,6 +31,7 @@
|
|
31
31
|
import * as Common from '../../core/common/common.js';
|
32
32
|
import * as Host from '../../core/host/host.js';
|
33
33
|
import * as i18n from '../../core/i18n/i18n.js';
|
34
|
+
import * as Platform from '../../core/platform/platform.js';
|
34
35
|
|
35
36
|
import type {ActionDelegate} from './ActionRegistration.js';
|
36
37
|
import type {Context} from './Context.js';
|
@@ -162,7 +163,7 @@ export class DockController extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
162
163
|
this.lastDockStateSetting.set(this.dockSideInternal);
|
163
164
|
}
|
164
165
|
|
165
|
-
this.savedFocus =
|
166
|
+
this.savedFocus = Platform.DOMUtilities.deepActiveElement(document);
|
166
167
|
const eventData = {from: this.dockSideInternal, to: dockSide};
|
167
168
|
this.dispatchEventToListeners(Events.BeforeDockSideChanged, eventData);
|
168
169
|
console.timeStamp('DockController.setIsDocked');
|
@@ -143,11 +143,11 @@ export const bindCheckbox = function(inputElement: Element, setting: Common.Sett
|
|
143
143
|
|
144
144
|
export const createCustomSetting = function(name: string, element: Element): Element {
|
145
145
|
const p = document.createElement('p');
|
146
|
-
|
147
|
-
const label =
|
146
|
+
p.classList.add('settings-select');
|
147
|
+
const label = p.createChild('label');
|
148
148
|
label.textContent = name;
|
149
149
|
ARIAUtils.bindLabelToControl(label, element);
|
150
|
-
|
150
|
+
p.appendChild(element);
|
151
151
|
return p;
|
152
152
|
};
|
153
153
|
|
@@ -38,6 +38,7 @@ import {Icon} from './Icon.js';
|
|
38
38
|
import * as ThemeSupport from './theme_support/theme_support.js';
|
39
39
|
import {createTextChild, ElementFocusRestorer} from './UIUtils.js';
|
40
40
|
import softContextMenuStyles from './softContextMenu.css.legacy.js';
|
41
|
+
import {InspectorView} from './InspectorView.js';
|
41
42
|
|
42
43
|
const UIStrings = {
|
43
44
|
/**
|
@@ -75,7 +76,7 @@ export class SoftContextMenu {
|
|
75
76
|
private glassPane?: GlassPane;
|
76
77
|
private contextMenuElement?: HTMLElement;
|
77
78
|
private focusRestorer?: ElementFocusRestorer;
|
78
|
-
private
|
79
|
+
private hideOnUserMouseDownUnlessInMenu?: ((event: Event) => void);
|
79
80
|
private activeSubMenuElement?: HTMLElement;
|
80
81
|
private subMenu?: SoftContextMenu;
|
81
82
|
private onMenuClosed?: () => void;
|
@@ -122,7 +123,7 @@ export class SoftContextMenu {
|
|
122
123
|
this.focusRestorer = new ElementFocusRestorer(this.contextMenuElement);
|
123
124
|
|
124
125
|
if (!this.parentMenu) {
|
125
|
-
this.
|
126
|
+
this.hideOnUserMouseDownUnlessInMenu = (event: Event): void => {
|
126
127
|
// If a user clicks on any submenu, prevent the menu system from closing.
|
127
128
|
let subMenu: (SoftContextMenu|undefined) = this.subMenu;
|
128
129
|
while (subMenu) {
|
@@ -135,13 +136,37 @@ export class SoftContextMenu {
|
|
135
136
|
this.discard();
|
136
137
|
event.consume(true);
|
137
138
|
};
|
138
|
-
|
139
|
-
|
140
|
-
|
139
|
+
|
140
|
+
this.document.body.addEventListener('mousedown', this.hideOnUserMouseDownUnlessInMenu, false);
|
141
|
+
|
142
|
+
// To reliably get resize events when 1) the browser window is resized,
|
143
|
+
// 2) DevTools is undocked and resized and 3) DevTools is docked &
|
144
|
+
// resized, we have to use ResizeObserver.
|
145
|
+
const devToolsElem = InspectorView.maybeGetInspectorViewInstance()?.element;
|
146
|
+
if (devToolsElem) {
|
147
|
+
// The resize-observer will fire immediately upon starting observation.
|
148
|
+
// So we have to ignore that first fire, and then the moment we get a
|
149
|
+
// second, we know that it's been resized so we can act accordingly.
|
150
|
+
let firedOnce = false;
|
151
|
+
const observer = new ResizeObserver(() => {
|
152
|
+
if (firedOnce) {
|
153
|
+
// observer.disconnect();
|
154
|
+
// this.discard();
|
155
|
+
return;
|
156
|
+
}
|
157
|
+
firedOnce = true;
|
158
|
+
});
|
159
|
+
observer.observe(devToolsElem);
|
141
160
|
}
|
142
161
|
}
|
143
162
|
}
|
144
163
|
|
164
|
+
setContextMenuElementLabel(label: string): void {
|
165
|
+
if (this.contextMenuElement) {
|
166
|
+
ARIAUtils.setAccessibleName(this.contextMenuElement, label);
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
145
170
|
discard(): void {
|
146
171
|
if (this.subMenu) {
|
147
172
|
this.subMenu.discard();
|
@@ -152,14 +177,11 @@ export class SoftContextMenu {
|
|
152
177
|
if (this.glassPane) {
|
153
178
|
this.glassPane.hide();
|
154
179
|
delete this.glassPane;
|
155
|
-
if (this.
|
180
|
+
if (this.hideOnUserMouseDownUnlessInMenu) {
|
156
181
|
if (this.document) {
|
157
|
-
this.document.body.removeEventListener('mousedown', this.
|
158
|
-
if (this.document.defaultView) {
|
159
|
-
this.document.defaultView.removeEventListener('resize', this.hideOnUserGesture, false);
|
160
|
-
}
|
182
|
+
this.document.body.removeEventListener('mousedown', this.hideOnUserMouseDownUnlessInMenu, false);
|
161
183
|
}
|
162
|
-
delete this.
|
184
|
+
delete this.hideOnUserMouseDownUnlessInMenu;
|
163
185
|
}
|
164
186
|
}
|
165
187
|
if (this.parentMenu) {
|
@@ -397,9 +419,7 @@ export class SoftContextMenu {
|
|
397
419
|
|
398
420
|
this.highlightedMenuItemElement = menuItemElement;
|
399
421
|
if (this.highlightedMenuItemElement) {
|
400
|
-
|
401
|
-
this.highlightedMenuItemElement.classList.add('force-white-icons');
|
402
|
-
}
|
422
|
+
this.highlightedMenuItemElement.classList.add('force-white-icons');
|
403
423
|
this.highlightedMenuItemElement.classList.add('soft-context-menu-item-mouse-over');
|
404
424
|
const detailsForElement = this.detailsForElementMap.get(this.highlightedMenuItemElement);
|
405
425
|
if (detailsForElement && detailsForElement.customElement) {
|
@@ -518,6 +538,15 @@ export class SoftContextMenu {
|
|
518
538
|
keyboardEvent.consume(true);
|
519
539
|
}
|
520
540
|
}
|
541
|
+
|
542
|
+
markAsMenuItemCheckBox(): void {
|
543
|
+
if (!this.contextMenuElement) {
|
544
|
+
return;
|
545
|
+
}
|
546
|
+
for (const child of this.contextMenuElement.children) {
|
547
|
+
ARIAUtils.markAsMenuItemCheckBox(child);
|
548
|
+
}
|
549
|
+
}
|
521
550
|
}
|
522
551
|
export interface SoftContextMenuDescriptor {
|
523
552
|
type: string;
|
@@ -335,6 +335,18 @@ export class Toolbar {
|
|
335
335
|
this.appendToolbarItem(new ToolbarText(text));
|
336
336
|
}
|
337
337
|
|
338
|
+
removeToolbarItem(itemToRemove: ToolbarItem): void {
|
339
|
+
const updatedItems = [];
|
340
|
+
for (const item of this.items) {
|
341
|
+
if (item === itemToRemove) {
|
342
|
+
item.element.remove();
|
343
|
+
} else {
|
344
|
+
updatedItems.push(item);
|
345
|
+
}
|
346
|
+
}
|
347
|
+
this.items = updatedItems;
|
348
|
+
}
|
349
|
+
|
338
350
|
removeToolbarItems(): void {
|
339
351
|
for (const item of this.items) {
|
340
352
|
item.toolbar = null;
|
@@ -787,6 +799,10 @@ export class ToolbarToggle extends ToolbarButton {
|
|
787
799
|
setToggleWithRedColor(toggleWithRedColor: boolean): void {
|
788
800
|
this.element.classList.toggle('toolbar-toggle-with-red-color', toggleWithRedColor);
|
789
801
|
}
|
802
|
+
|
803
|
+
setToggleWithDot(toggleWithDot: boolean): void {
|
804
|
+
this.element.classList.toggle('toolbar-toggle-with-dot', toggleWithDot);
|
805
|
+
}
|
790
806
|
}
|
791
807
|
|
792
808
|
export class ToolbarMenuButton extends ToolbarButton {
|
@@ -442,6 +442,7 @@ export class TreeElement {
|
|
442
442
|
expanded: boolean;
|
443
443
|
selected: boolean;
|
444
444
|
private expandable!: boolean;
|
445
|
+
#expandRecursively: boolean = true;
|
445
446
|
private collapsible: boolean;
|
446
447
|
toggleOnClick: boolean;
|
447
448
|
button: HTMLButtonElement|null;
|
@@ -846,6 +847,14 @@ export class TreeElement {
|
|
846
847
|
}
|
847
848
|
}
|
848
849
|
|
850
|
+
isExpandRecursively(): boolean {
|
851
|
+
return this.#expandRecursively;
|
852
|
+
}
|
853
|
+
|
854
|
+
setExpandRecursively(expandRecursively: boolean): void {
|
855
|
+
this.#expandRecursively = expandRecursively;
|
856
|
+
}
|
857
|
+
|
849
858
|
isCollapsible(): boolean {
|
850
859
|
return this.collapsible;
|
851
860
|
}
|
@@ -1044,16 +1053,17 @@ export class TreeElement {
|
|
1044
1053
|
maxDepth = 3;
|
1045
1054
|
}
|
1046
1055
|
|
1047
|
-
|
1048
|
-
|
1056
|
+
do {
|
1057
|
+
if (item.isExpandRecursively()) {
|
1058
|
+
await item.populateIfNeeded();
|
1049
1059
|
|
1050
|
-
|
1051
|
-
|
1060
|
+
if (depth < maxDepth) {
|
1061
|
+
item.expand();
|
1062
|
+
}
|
1052
1063
|
}
|
1053
|
-
|
1054
|
-
item = item.traverseNextTreeElement(false, this, (depth >= maxDepth), info);
|
1064
|
+
item = item.traverseNextTreeElement(!item.isExpandRecursively(), this, true, info);
|
1055
1065
|
depth += info.depthChange;
|
1056
|
-
}
|
1066
|
+
} while (item !== null);
|
1057
1067
|
}
|
1058
1068
|
|
1059
1069
|
collapseOrAscend(altKey: boolean): boolean {
|
@@ -345,7 +345,7 @@ export function isEditing(): boolean {
|
|
345
345
|
return true;
|
346
346
|
}
|
347
347
|
|
348
|
-
const focused =
|
348
|
+
const focused = Platform.DOMUtilities.deepActiveElement(document);
|
349
349
|
if (!focused) {
|
350
350
|
return false;
|
351
351
|
}
|
@@ -645,7 +645,7 @@ export class ElementFocusRestorer {
|
|
645
645
|
private previous: HTMLElement|null;
|
646
646
|
constructor(element: Element) {
|
647
647
|
this.element = (element as HTMLElement | null);
|
648
|
-
this.previous = (
|
648
|
+
this.previous = (Platform.DOMUtilities.deepActiveElement(element.ownerDocument) as HTMLElement | null);
|
649
649
|
(element as HTMLElement).focus();
|
650
650
|
}
|
651
651
|
|
@@ -2,15 +2,18 @@
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
|
+
import type * as Platform from '../../core/platform/platform.js';
|
6
|
+
|
5
7
|
import type {TabbedPane} from './TabbedPane.js';
|
6
8
|
import type {ToolbarItem, ToolbarMenuButton} from './Toolbar.js';
|
7
9
|
import {ViewManager} from './ViewManager.js';
|
8
10
|
import type {Widget} from './Widget.js';
|
9
11
|
import {VBox} from './Widget.js';
|
12
|
+
|
10
13
|
export interface View {
|
11
14
|
viewId(): string;
|
12
15
|
|
13
|
-
title():
|
16
|
+
title(): Platform.UIString.LocalizedString;
|
14
17
|
|
15
18
|
isCloseable(): boolean;
|
16
19
|
|
@@ -26,18 +29,21 @@ export interface View {
|
|
26
29
|
}
|
27
30
|
|
28
31
|
export class SimpleView extends VBox implements View {
|
29
|
-
|
30
|
-
|
32
|
+
readonly #title: Platform.UIString.LocalizedString;
|
33
|
+
readonly #viewId: string;
|
34
|
+
|
35
|
+
constructor(title: Platform.UIString.LocalizedString, isWebComponent?: boolean, viewId?: string) {
|
31
36
|
super(isWebComponent);
|
32
|
-
this
|
37
|
+
this.#title = title;
|
38
|
+
this.#viewId = viewId ?? title;
|
33
39
|
}
|
34
40
|
|
35
41
|
viewId(): string {
|
36
|
-
return this
|
42
|
+
return this.#viewId;
|
37
43
|
}
|
38
44
|
|
39
|
-
title():
|
40
|
-
return this
|
45
|
+
title(): Platform.UIString.LocalizedString {
|
46
|
+
return this.#title;
|
41
47
|
}
|
42
48
|
|
43
49
|
isCloseable(): boolean {
|
@@ -53,7 +59,7 @@ export class SimpleView extends VBox implements View {
|
|
53
59
|
}
|
54
60
|
|
55
61
|
widget(): Promise<Widget> {
|
56
|
-
return
|
62
|
+
return Promise.resolve(this);
|
57
63
|
}
|
58
64
|
|
59
65
|
revealView(): Promise<void> {
|
@@ -15,7 +15,7 @@ import type {ToolbarItem} from './Toolbar.js';
|
|
15
15
|
import {Toolbar, ToolbarMenuButton} from './Toolbar.js';
|
16
16
|
import {createTextChild} from './UIUtils.js';
|
17
17
|
import type {TabbedViewLocation, View, ViewLocation, ViewLocationResolver} from './View.js';
|
18
|
-
import {getRegisteredLocationResolvers, getRegisteredViewExtensions, maybeRemoveViewExtension, registerLocationResolver, registerViewExtension, ViewLocationCategoryValues, ViewLocationValues, ViewPersistence, type ViewRegistration} from './ViewRegistration.js';
|
18
|
+
import {getRegisteredLocationResolvers, getRegisteredViewExtensions, maybeRemoveViewExtension, registerLocationResolver, registerViewExtension, ViewLocationCategoryValues, ViewLocationValues, ViewPersistence, type ViewRegistration, resetViewRegistration} from './ViewRegistration.js';
|
19
19
|
import type {Widget, WidgetElement} from './Widget.js';
|
20
20
|
import {VBox} from './Widget.js';
|
21
21
|
import viewContainersStyles from './viewContainers.css.legacy.js';
|
@@ -914,4 +914,5 @@ export {
|
|
914
914
|
getRegisteredLocationResolvers,
|
915
915
|
registerLocationResolver,
|
916
916
|
ViewLocationCategoryValues,
|
917
|
+
resetViewRegistration,
|
917
918
|
};
|
@@ -158,6 +158,12 @@ export function getRegisteredLocationResolvers(): Array<LocationResolverRegistra
|
|
158
158
|
return registeredLocationResolvers;
|
159
159
|
}
|
160
160
|
|
161
|
+
export function resetViewRegistration(): void {
|
162
|
+
registeredViewExtensions.length = 0;
|
163
|
+
registeredLocationResolvers.length = 0;
|
164
|
+
viewLocationNameSet.clear();
|
165
|
+
}
|
166
|
+
|
161
167
|
// TODO(crbug.com/1181019)
|
162
168
|
export const ViewLocationCategoryValues = {
|
163
169
|
ELEMENTS: 'Elements',
|
@@ -29,6 +29,7 @@
|
|
29
29
|
*/
|
30
30
|
|
31
31
|
import * as DOMExtension from '../../core/dom_extension/dom_extension.js';
|
32
|
+
import * as Platform from '../../core/platform/platform.js';
|
32
33
|
import * as Helpers from '../components/helpers/helpers.js';
|
33
34
|
|
34
35
|
import {Constraints, Size} from './Geometry.js';
|
@@ -677,7 +678,7 @@ export class WidgetFocusRestorer {
|
|
677
678
|
private previous: HTMLElement|null;
|
678
679
|
constructor(widget: Widget) {
|
679
680
|
this.widget = widget;
|
680
|
-
this.previous = (widget.element.ownerDocument
|
681
|
+
this.previous = (Platform.DOMUtilities.deepActiveElement(widget.element.ownerDocument) as HTMLElement | null);
|
681
682
|
widget.focus();
|
682
683
|
}
|
683
684
|
|
@@ -34,6 +34,7 @@ import * as Common from '../../../../core/common/common.js';
|
|
34
34
|
import * as Host from '../../../../core/host/host.js';
|
35
35
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
36
36
|
import * as Platform from '../../../../core/platform/platform.js';
|
37
|
+
import * as Root from '../../../../core/root/root.js';
|
37
38
|
import * as SDK from '../../../../core/sdk/sdk.js';
|
38
39
|
import * as IconButton from '../../../components/icon_button/icon_button.js';
|
39
40
|
import * as UI from '../../legacy.js';
|
@@ -174,6 +175,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
174
175
|
};
|
175
176
|
private closeButton?: UI.Toolbar.ToolbarButton;
|
176
177
|
private paletteContainerMutable?: boolean;
|
178
|
+
private eyeDropperExperimentEnabled?: boolean;
|
177
179
|
private shadesCloseHandler?: (() => void);
|
178
180
|
private dragElement?: HTMLElement;
|
179
181
|
private dragHotSpotX?: number;
|
@@ -441,7 +443,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
441
443
|
data: unknown,
|
442
444
|
}): void {
|
443
445
|
if (event.data) {
|
444
|
-
this.toggleColorPicker(false);
|
446
|
+
void this.toggleColorPicker(false);
|
445
447
|
}
|
446
448
|
}
|
447
449
|
|
@@ -1161,7 +1163,15 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
1161
1163
|
this.dragHeight = this.colorElement.offsetHeight;
|
1162
1164
|
this.colorDragElementHeight = this.colorDragElement.offsetHeight / 2;
|
1163
1165
|
this.innerSetColor(undefined, undefined, undefined /* colorName */, undefined, ChangeSource.Model);
|
1164
|
-
this.
|
1166
|
+
this.eyeDropperExperimentEnabled =
|
1167
|
+
Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.EYEDROPPER_COLOR_PICKER);
|
1168
|
+
// When flag is turned on, eye dropper is not turned on by default.
|
1169
|
+
// This is because the global change of the cursor into a dropper will disturb the user.
|
1170
|
+
if (!this.eyeDropperExperimentEnabled) {
|
1171
|
+
void this.toggleColorPicker(true);
|
1172
|
+
} else {
|
1173
|
+
this.colorPickerButton.setToggled(false);
|
1174
|
+
}
|
1165
1175
|
|
1166
1176
|
if (this.contrastDetails && this.contrastDetailsBackgroundColorPickedToggledBound) {
|
1167
1177
|
this.contrastDetails.addEventListener(
|
@@ -1171,7 +1181,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
1171
1181
|
}
|
1172
1182
|
|
1173
1183
|
willHide(): void {
|
1174
|
-
this.toggleColorPicker(false);
|
1184
|
+
void this.toggleColorPicker(false);
|
1175
1185
|
if (this.contrastDetails && this.contrastDetailsBackgroundColorPickedToggledBound) {
|
1176
1186
|
this.contrastDetails.removeEventListener(
|
1177
1187
|
ContrastDetailsEvents.BackgroundColorPickerWillBeToggled,
|
@@ -1179,7 +1189,9 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
1179
1189
|
}
|
1180
1190
|
}
|
1181
1191
|
|
1182
|
-
private toggleColorPicker(enabled?: boolean): void {
|
1192
|
+
private async toggleColorPicker(enabled?: boolean): Promise<void> {
|
1193
|
+
const eyeDropperExperimentEnabled = this.eyeDropperExperimentEnabled;
|
1194
|
+
|
1183
1195
|
if (enabled === undefined) {
|
1184
1196
|
enabled = !this.colorPickerButton.toggled();
|
1185
1197
|
}
|
@@ -1191,13 +1203,33 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
|
|
1191
1203
|
this.contrastDetails.toggleBackgroundColorPicker(false);
|
1192
1204
|
}
|
1193
1205
|
|
1194
|
-
|
1195
|
-
if (
|
1196
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1206
|
+
// With the old color picker, colors can only be picked up within the page.
|
1207
|
+
if (!eyeDropperExperimentEnabled) {
|
1208
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.setEyeDropperActive(enabled);
|
1209
|
+
if (enabled) {
|
1210
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
1211
|
+
Host.InspectorFrontendHostAPI.Events.EyeDropperPickedColor, this.colorPickedBound);
|
1212
|
+
} else {
|
1213
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(
|
1214
|
+
Host.InspectorFrontendHostAPI.Events.EyeDropperPickedColor, this.colorPickedBound);
|
1215
|
+
}
|
1216
|
+
} else if (eyeDropperExperimentEnabled && enabled) {
|
1217
|
+
// Use EyeDropper API, can pick up colors outside the browser window,
|
1218
|
+
// Note: The current EyeDropper API is not designed to pick up colors continuously.
|
1219
|
+
// Wait for TypeScript to support the definition of EyeDropper API:
|
1220
|
+
// https://github.com/microsoft/TypeScript/issues/48638
|
1221
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
1222
|
+
const eyeDropper = new (<any>window).EyeDropper();
|
1223
|
+
|
1224
|
+
try {
|
1225
|
+
const hexColor = await eyeDropper.open();
|
1226
|
+
const color = Common.Color.Color.parse(hexColor.sRGBHex);
|
1227
|
+
this.innerSetColor(color?.hsva(), '', undefined /* colorName */, undefined, ChangeSource.Other);
|
1228
|
+
} catch (error) {
|
1229
|
+
console.error(error);
|
1230
|
+
}
|
1231
|
+
|
1232
|
+
this.colorPickerButton.setToggled(false);
|
1201
1233
|
}
|
1202
1234
|
}
|
1203
1235
|
|