chrome-devtools-frontend 1.0.1380117 → 1.0.1386602
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/.stylelintrc.json +2 -1
- package/config/gni/devtools_grd_files.gni +25 -4
- package/config/gni/devtools_image_files.gni +2 -0
- package/docs/README.md +4 -0
- package/docs/contributing/issues.md +13 -10
- package/docs/get_the_code.md +4 -1
- package/docs/policy/README.md +6 -0
- package/docs/policy/slow-close.md +52 -0
- package/docs/styleguide/ux/README.md +1 -0
- package/docs/styleguide/ux/numbers.md +106 -0
- package/front_end/Images/src/cookie_off.svg +3 -0
- package/front_end/Images/src/domain.svg +3 -0
- package/front_end/core/common/Color.ts +3 -3
- package/front_end/core/common/SettingRegistration.ts +7 -0
- package/front_end/core/host/AidaClient.ts +3 -3
- package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
- package/front_end/core/host/UserMetrics.ts +0 -8
- package/front_end/core/i18n/locales/af.json +1031 -887
- package/front_end/core/i18n/locales/am.json +1036 -892
- package/front_end/core/i18n/locales/ar.json +1039 -895
- package/front_end/core/i18n/locales/as.json +1032 -888
- package/front_end/core/i18n/locales/az.json +1034 -890
- package/front_end/core/i18n/locales/be.json +1031 -887
- package/front_end/core/i18n/locales/bg.json +1031 -887
- package/front_end/core/i18n/locales/bn.json +1033 -889
- package/front_end/core/i18n/locales/bs.json +1036 -892
- package/front_end/core/i18n/locales/ca.json +1031 -887
- package/front_end/core/i18n/locales/cs.json +1030 -886
- package/front_end/core/i18n/locales/cy.json +1032 -888
- package/front_end/core/i18n/locales/da.json +1031 -887
- package/front_end/core/i18n/locales/de.json +1033 -889
- package/front_end/core/i18n/locales/el.json +1031 -887
- package/front_end/core/i18n/locales/en-GB.json +1033 -889
- package/front_end/core/i18n/locales/es-419.json +1029 -885
- package/front_end/core/i18n/locales/es.json +1032 -888
- package/front_end/core/i18n/locales/et.json +1033 -889
- package/front_end/core/i18n/locales/eu.json +1031 -887
- package/front_end/core/i18n/locales/fa.json +1035 -891
- package/front_end/core/i18n/locales/fi.json +1035 -891
- package/front_end/core/i18n/locales/fil.json +1034 -890
- package/front_end/core/i18n/locales/fr-CA.json +1031 -887
- package/front_end/core/i18n/locales/fr.json +1049 -905
- package/front_end/core/i18n/locales/gl.json +1032 -888
- package/front_end/core/i18n/locales/gu.json +1035 -891
- package/front_end/core/i18n/locales/he.json +1031 -887
- package/front_end/core/i18n/locales/hi.json +1034 -890
- package/front_end/core/i18n/locales/hr.json +1031 -887
- package/front_end/core/i18n/locales/hu.json +1033 -889
- package/front_end/core/i18n/locales/hy.json +1046 -902
- package/front_end/core/i18n/locales/id.json +1023 -879
- package/front_end/core/i18n/locales/is.json +1032 -888
- package/front_end/core/i18n/locales/it.json +1031 -887
- package/front_end/core/i18n/locales/ja.json +1042 -898
- package/front_end/core/i18n/locales/ka.json +1034 -890
- package/front_end/core/i18n/locales/kk.json +1035 -891
- package/front_end/core/i18n/locales/km.json +1035 -891
- package/front_end/core/i18n/locales/kn.json +1036 -892
- package/front_end/core/i18n/locales/ko.json +1031 -887
- package/front_end/core/i18n/locales/ky.json +1032 -888
- package/front_end/core/i18n/locales/lo.json +1030 -886
- package/front_end/core/i18n/locales/lt.json +1032 -888
- package/front_end/core/i18n/locales/lv.json +1032 -888
- package/front_end/core/i18n/locales/mk.json +1032 -888
- package/front_end/core/i18n/locales/ml.json +1033 -889
- package/front_end/core/i18n/locales/mn.json +1034 -890
- package/front_end/core/i18n/locales/mr.json +1035 -891
- package/front_end/core/i18n/locales/ms.json +1033 -889
- package/front_end/core/i18n/locales/my.json +1033 -889
- package/front_end/core/i18n/locales/ne.json +1036 -892
- package/front_end/core/i18n/locales/nl.json +1033 -889
- package/front_end/core/i18n/locales/no.json +1036 -892
- package/front_end/core/i18n/locales/or.json +1043 -899
- package/front_end/core/i18n/locales/pa.json +1030 -886
- package/front_end/core/i18n/locales/pl.json +1032 -888
- package/front_end/core/i18n/locales/pt-PT.json +1033 -889
- package/front_end/core/i18n/locales/pt.json +1033 -889
- package/front_end/core/i18n/locales/ro.json +1029 -885
- package/front_end/core/i18n/locales/ru.json +1026 -882
- package/front_end/core/i18n/locales/si.json +1031 -887
- package/front_end/core/i18n/locales/sk.json +1033 -889
- package/front_end/core/i18n/locales/sl.json +1031 -887
- package/front_end/core/i18n/locales/sq.json +1061 -917
- package/front_end/core/i18n/locales/sr-Latn.json +1033 -889
- package/front_end/core/i18n/locales/sr.json +1033 -889
- package/front_end/core/i18n/locales/sv.json +1031 -887
- package/front_end/core/i18n/locales/sw.json +1033 -889
- package/front_end/core/i18n/locales/ta.json +1058 -914
- package/front_end/core/i18n/locales/te.json +1037 -893
- package/front_end/core/i18n/locales/th.json +1032 -888
- package/front_end/core/i18n/locales/tr.json +1031 -887
- package/front_end/core/i18n/locales/uk.json +1030 -886
- package/front_end/core/i18n/locales/ur.json +1031 -887
- package/front_end/core/i18n/locales/uz.json +1023 -879
- package/front_end/core/i18n/locales/vi.json +1032 -888
- package/front_end/core/i18n/locales/zh-HK.json +1032 -888
- package/front_end/core/i18n/locales/zh-TW.json +1032 -888
- package/front_end/core/i18n/locales/zh.json +1033 -889
- package/front_end/core/i18n/locales/zu.json +1032 -888
- package/front_end/core/root/Runtime.ts +0 -1
- package/front_end/core/sdk/NetworkManager.test.ts +50 -0
- package/front_end/core/sdk/NetworkManager.ts +6 -4
- package/front_end/core/sdk/SourceMap.test.ts +5 -5
- package/front_end/core/sdk/SourceMapScopeChainEntry.test.ts +7 -2
- package/front_end/core/sdk/SourceMapScopeChainEntry.ts +2 -2
- package/front_end/core/sdk/SourceMapScopes.test.ts +112 -45
- package/front_end/core/sdk/SourceMapScopes.ts +39 -14
- package/front_end/core/sdk/SourceMapScopesInfo.test.ts +51 -50
- package/front_end/core/sdk/SourceMapScopesInfo.ts +1 -1
- package/front_end/core/sdk/sdk-meta.ts +27 -0
- package/front_end/devtools_compatibility.js +0 -1
- package/front_end/entrypoints/devtools_app/devtools_app.ts +1 -0
- package/front_end/entrypoints/inspector_main/renderingOptions.css +1 -1
- package/front_end/entrypoints/main/ExecutionContextSelector.test.ts +13 -3
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +23 -1
- package/front_end/entrypoints/main/MainImpl.ts +0 -5
- package/front_end/generated/Deprecation.ts +0 -15
- package/front_end/generated/InspectorBackendCommands.js +1 -1
- package/front_end/generated/SupportedCSSProperties.js +0 -40
- package/front_end/generated/protocol.ts +1 -0
- package/front_end/models/bindings/IgnoreListManager.ts +25 -2
- package/front_end/models/crux-manager/CrUXManager.test.ts +25 -6
- package/front_end/models/crux-manager/CrUXManager.ts +23 -4
- package/front_end/models/extensions/ExtensionServer.test.ts +14 -0
- package/front_end/models/extensions/ExtensionServer.ts +28 -15
- package/front_end/models/issues_manager/CookieIssue.ts +79 -2
- package/front_end/models/issues_manager/IssuesManager.ts +1 -1
- package/front_end/models/issues_manager/descriptions/cookieExcludePortMismatch.md +8 -0
- package/front_end/models/issues_manager/descriptions/cookieExcludeSchemeMismatch.md +7 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +14 -4
- package/front_end/models/persistence/EditFileSystemView.ts +2 -2
- package/front_end/models/persistence/editFileSystemView.css +6 -3
- package/front_end/models/persistence/workspaceSettingsTab.css +2 -2
- package/front_end/models/trace/extras/Metadata.test.ts +35 -2
- package/front_end/models/trace/extras/Metadata.ts +24 -5
- package/front_end/models/trace/extras/TraceTree.ts +28 -18
- package/front_end/models/trace/extras/URLForEntry.ts +6 -5
- package/front_end/models/trace/handlers/ImagePaintingHandler.ts +12 -0
- package/front_end/models/trace/helpers/Timing.ts +8 -0
- package/front_end/models/trace/insights/CLSCulprits.ts +11 -3
- package/front_end/models/trace/insights/DocumentLatency.ts +16 -3
- package/front_end/models/trace/insights/FontDisplay.ts +10 -3
- package/front_end/models/trace/insights/ImageDelivery.test.ts +98 -0
- package/front_end/models/trace/insights/ImageDelivery.ts +183 -0
- package/front_end/models/trace/insights/InteractionToNextPaint.ts +9 -3
- package/front_end/models/trace/insights/LCPDiscovery.ts +24 -3
- package/front_end/models/trace/insights/LCPPhases.ts +25 -3
- package/front_end/models/trace/insights/Models.ts +1 -0
- package/front_end/models/trace/insights/RenderBlocking.ts +10 -2
- package/front_end/models/trace/insights/SlowCSSSelector.ts +10 -3
- package/front_end/models/trace/insights/ThirdParties.ts +11 -3
- package/front_end/models/trace/insights/Viewport.ts +16 -3
- package/front_end/models/trace/insights/types.ts +13 -2
- package/front_end/models/trace/types/File.ts +7 -0
- package/front_end/models/trace/types/TraceEvents.ts +9 -2
- package/front_end/panels/animation/AnimationTimeline.ts +2 -4
- package/front_end/panels/application/ApplicationPanelSidebar.test.ts +0 -5
- package/front_end/panels/application/ApplicationPanelSidebar.ts +15 -21
- package/front_end/panels/application/IndexedDBViews.ts +4 -1
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +4 -1
- package/front_end/panels/application/StorageView.test.ts +1 -1
- package/front_end/panels/application/resourcesSidebar.css +1 -1
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +1 -1
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +1 -1
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +1 -1
- package/front_end/panels/browser_debugger/categorizedBreakpointsSidebarPane.css +1 -1
- package/front_end/panels/browser_debugger/xhrBreakpointsSidebarPane.css +1 -1
- package/front_end/panels/console/ConsoleViewMessage.test.ts +25 -0
- package/front_end/panels/console/ConsoleViewMessage.ts +23 -0
- package/front_end/panels/coverage/CoverageListView.ts +1 -1
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +1 -1
- package/front_end/panels/elements/ClassesPaneWidget.ts +1 -1
- package/front_end/panels/elements/ElementStatePaneWidget.test.ts +3 -2
- package/front_end/panels/elements/ElementStatePaneWidget.ts +7 -2
- package/front_end/panels/elements/ElementsSidebarPane.ts +3 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +1 -0
- package/front_end/panels/elements/LayersWidget.ts +1 -1
- package/front_end/panels/elements/PropertyMatchers.test.ts +7 -0
- package/front_end/panels/elements/PropertyMatchers.ts +3 -0
- package/front_end/panels/elements/classesPaneWidget.css +1 -1
- package/front_end/panels/emulation/DeviceModeView.ts +1 -1
- package/front_end/panels/emulation/DeviceModeWrapper.ts +1 -1
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +1 -1
- package/front_end/panels/freestyler/AiAgent.test.ts +319 -50
- package/front_end/panels/freestyler/AiAgent.ts +193 -141
- package/front_end/panels/freestyler/AiHistoryStorage.test.ts +159 -0
- package/front_end/panels/freestyler/AiHistoryStorage.ts +73 -0
- package/front_end/panels/freestyler/DrJonesFileAgent.test.ts +14 -15
- package/front_end/panels/freestyler/DrJonesFileAgent.ts +3 -14
- package/front_end/panels/freestyler/DrJonesNetworkAgent.test.ts +14 -13
- package/front_end/panels/freestyler/DrJonesNetworkAgent.ts +3 -3
- package/front_end/panels/freestyler/DrJonesPerformanceAgent.test.ts +38 -36
- package/front_end/panels/freestyler/DrJonesPerformanceAgent.ts +3 -14
- package/front_end/panels/freestyler/FreestylerAgent.test.ts +195 -14
- package/front_end/panels/freestyler/FreestylerAgent.ts +13 -18
- package/front_end/panels/freestyler/FreestylerPanel.test.ts +71 -0
- package/front_end/panels/freestyler/FreestylerPanel.ts +99 -74
- package/front_end/panels/freestyler/components/FreestylerChatUi.ts +128 -29
- package/front_end/panels/freestyler/components/UserActionRow.ts +1 -0
- package/front_end/panels/freestyler/components/freestylerChatUi.css +21 -1
- package/front_end/panels/freestyler/components/userActionRow.css +2 -1
- package/front_end/panels/freestyler/freestyler.ts +1 -0
- package/front_end/panels/issues/IssueAggregator.test.ts +50 -0
- package/front_end/panels/issues/IssueAggregator.ts +10 -10
- package/front_end/panels/issues/issuesTree.css +1 -1
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +1 -1
- package/front_end/panels/layer_viewer/Layers3DView.ts +1 -1
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +1 -1
- package/front_end/panels/layers/LayersPanel.ts +1 -1
- package/front_end/panels/lighthouse/lighthouseStartView.css +1 -1
- package/front_end/panels/media/TickingFlameChart.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +1 -1
- package/front_end/panels/network/BlockedURLsPane.ts +1 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +1 -0
- package/front_end/panels/network/NetworkLogView.test.ts +1 -1
- package/front_end/panels/network/NetworkPanel.ts +40 -32
- package/front_end/panels/network/NetworkWaterfallColumn.ts +1 -1
- package/front_end/panels/profiler/HeapProfileView.ts +9 -9
- package/front_end/panels/profiler/HeapTimelineOverview.ts +1 -1
- package/front_end/panels/profiler/IsolateSelector.ts +1 -1
- package/front_end/panels/profiler/LiveHeapProfileView.ts +3 -1
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +3 -3
- package/front_end/panels/profiler/ProfileView.ts +2 -2
- package/front_end/panels/profiler/profileLauncherView.css +1 -1
- package/front_end/panels/profiler/profilesSidebarTree.css +1 -1
- package/front_end/panels/recorder/recorderController.css +1 -1
- package/front_end/panels/security/CookieControlsTreeElement.ts +18 -0
- package/front_end/panels/security/CookieControlsView.test.ts +29 -0
- package/front_end/panels/security/CookieControlsView.ts +265 -0
- package/front_end/panels/security/CookieReportView.test.ts +157 -0
- package/front_end/panels/security/CookieReportView.ts +208 -12
- package/front_end/panels/security/SecurityPanel.ts +5 -3
- package/front_end/panels/security/SecurityPanelSidebar.ts +6 -1
- package/front_end/panels/security/cookieControlsView.css +101 -0
- package/front_end/panels/security/cookieReportView.css +26 -3
- package/front_end/panels/security/security.ts +4 -0
- package/front_end/panels/security/sidebar.css +1 -1
- package/front_end/panels/settings/KeybindsSettingsTab.ts +3 -2
- package/front_end/panels/settings/SettingsScreen.ts +5 -1
- package/front_end/panels/settings/frameworkIgnoreListSettingsTab.css +1 -1
- package/front_end/panels/settings/keybindsSettingsTab.css +6 -1
- package/front_end/panels/settings/settings-meta.ts +3 -1
- package/front_end/panels/settings/settingsScreen.css +10 -0
- package/front_end/panels/sources/CallStackSidebarPane.ts +2 -2
- package/front_end/panels/sources/NavigatorView.ts +1 -0
- package/front_end/panels/sources/navigatorTree.css +1 -1
- package/front_end/panels/sources/sourcesPanel.css +2 -2
- package/front_end/panels/timeline/AnimationsTrackAppender.ts +1 -7
- package/front_end/panels/timeline/AppenderUtils.ts +1 -1
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +38 -41
- package/front_end/panels/timeline/ExtensionTrackAppender.ts +4 -13
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +3 -4
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +6 -12
- package/front_end/panels/timeline/ServerTimingsTrackAppender.ts +1 -10
- package/front_end/panels/timeline/ThreadAppender.ts +9 -12
- package/front_end/panels/timeline/TimelineController.ts +1 -1
- package/front_end/panels/timeline/TimelineDetailsView.test.ts +3 -2
- package/front_end/panels/timeline/TimelineDetailsView.ts +18 -17
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +55 -36
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +33 -14
- package/front_end/panels/timeline/TimelineHistoryManager.test.ts +20 -15
- package/front_end/panels/timeline/TimelineHistoryManager.ts +46 -58
- package/front_end/panels/timeline/TimelineLayersView.ts +1 -1
- package/front_end/panels/timeline/TimelineLoader.ts +16 -0
- package/front_end/panels/timeline/TimelineMiniMap.ts +2 -2
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +1 -1
- package/front_end/panels/timeline/TimelinePanel.ts +145 -28
- package/front_end/panels/timeline/TimelineTreeView.ts +65 -16
- package/front_end/panels/timeline/TimelineUIUtils.ts +44 -0
- package/front_end/panels/timeline/TimingsTrackAppender.ts +6 -13
- package/front_end/panels/timeline/components/FieldSettingsDialog.test.ts +1 -0
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +6 -1
- package/front_end/panels/timeline/components/LiveMetricsView.test.ts +12 -0
- package/front_end/panels/timeline/components/LiveMetricsView.ts +13 -18
- package/front_end/panels/timeline/components/Sidebar.ts +1 -4
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.test.ts +1 -1
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +1 -1
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.test.ts +21 -35
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +16 -9
- package/front_end/panels/timeline/components/TimelineSummary.test.ts +75 -0
- package/front_end/panels/timeline/components/TimelineSummary.ts +101 -0
- package/front_end/panels/timeline/components/Utils.test.ts +49 -0
- package/front_end/panels/timeline/components/Utils.ts +2 -2
- package/front_end/panels/timeline/components/components.ts +2 -0
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.test.ts +84 -0
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +291 -0
- package/front_end/panels/timeline/components/insights/CLSCulprits.ts +17 -41
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +28 -46
- package/front_end/panels/timeline/components/insights/EventRef.ts +70 -2
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +28 -46
- package/front_end/panels/timeline/components/insights/Helpers.ts +5 -208
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +142 -0
- package/front_end/panels/timeline/components/insights/InteractionToNextPaint.ts +30 -53
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +36 -75
- package/front_end/panels/timeline/components/insights/LCPPhases.ts +15 -49
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +27 -44
- package/front_end/panels/timeline/components/insights/SidebarInsight.ts +3 -197
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +51 -74
- package/front_end/panels/timeline/components/insights/Table.ts +6 -5
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +41 -61
- package/front_end/panels/timeline/components/insights/Viewport.ts +20 -31
- package/front_end/panels/timeline/components/insights/{sidebarInsight.css → baseInsightComponent.css} +9 -9
- package/front_end/panels/timeline/components/insights/insights.ts +4 -0
- package/front_end/panels/timeline/components/insights/types.ts +0 -7
- package/front_end/panels/timeline/components/liveMetricsView.css +5 -5
- package/front_end/panels/timeline/components/timelineSummary.css +67 -0
- package/front_end/panels/timeline/docs/flame_chart_migration.md +1 -1
- package/front_end/panels/timeline/fixtures/traces/README.md +4 -0
- package/front_end/panels/timeline/fixtures/traces/image-delivery.json.gz +0 -0
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +22 -0
- package/front_end/panels/timeline/timeline-meta.ts +1 -1
- package/front_end/panels/timeline/timelineFlamechartPopover.css +14 -4
- package/front_end/panels/timeline/timelineHistoryManager.css +7 -3
- package/front_end/panels/timeline/timelinePanel.css +0 -1
- package/front_end/panels/timeline/track_appenders/CompatibilityTracksAppender.test.ts +5 -5
- package/front_end/panels/timeline/track_appenders/ExtensionTrackAppender.test.ts +5 -6
- package/front_end/panels/timeline/track_appenders/LayoutShiftsTrackAppender.test.ts +11 -2
- package/front_end/panels/timeline/track_appenders/ServerTimingsTrackAppender.test.ts +0 -9
- package/front_end/panels/timeline/track_appenders/ThreadAppender.test.ts +37 -44
- package/front_end/panels/timeline/track_appenders/TimingsTrackAppender.test.ts +44 -30
- package/front_end/panels/timeline/utils/EntryName.ts +1 -2
- package/front_end/panels/timeline/utils/Helpers.ts +19 -0
- package/front_end/panels/timeline/utils/IgnoreList.test.ts +52 -0
- package/front_end/panels/timeline/utils/IgnoreList.ts +68 -7
- package/front_end/panels/timeline/utils/SourceMapsResolver.ts +2 -0
- package/front_end/panels/webauthn/webauthnPane.css +1 -1
- package/front_end/panels/whats_new/ReleaseNote.test.ts +90 -0
- package/front_end/panels/whats_new/ReleaseNoteText.ts +52 -0
- package/front_end/panels/whats_new/ReleaseNoteView.ts +157 -0
- package/front_end/panels/whats_new/WhatsNewImpl.ts +102 -0
- package/front_end/panels/whats_new/releaseNoteView.css +121 -0
- package/front_end/panels/whats_new/resources/WNDT.md +6 -0
- package/front_end/panels/whats_new/resources/whatsnew.avif +0 -0
- package/front_end/panels/whats_new/whats_new-meta.ts +142 -0
- package/front_end/panels/whats_new/whats_new.ts +13 -0
- package/front_end/services/puppeteer/PuppeteerConnection.ts +4 -3
- package/front_end/testing/EnvironmentHelpers.ts +1 -2
- package/front_end/testing/SourceMapEncoder.ts +27 -11
- package/front_end/testing/TraceHelpers.ts +2 -1
- package/front_end/testing/TraceLoader.ts +6 -2
- package/front_end/third_party/lighthouse/README.chromium +2 -2
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1380 -1369
- package/front_end/third_party/lighthouse/locales/ar-XB.json +88 -85
- package/front_end/third_party/lighthouse/locales/ar.json +98 -95
- package/front_end/third_party/lighthouse/locales/bg.json +88 -85
- package/front_end/third_party/lighthouse/locales/ca.json +91 -88
- package/front_end/third_party/lighthouse/locales/cs.json +91 -88
- package/front_end/third_party/lighthouse/locales/da.json +94 -91
- package/front_end/third_party/lighthouse/locales/de.json +92 -89
- package/front_end/third_party/lighthouse/locales/el.json +92 -89
- package/front_end/third_party/lighthouse/locales/en-GB.json +89 -86
- package/front_end/third_party/lighthouse/locales/en-US.json +23 -20
- package/front_end/third_party/lighthouse/locales/en-XA.json +88 -85
- package/front_end/third_party/lighthouse/locales/en-XL.json +23 -20
- package/front_end/third_party/lighthouse/locales/es-419.json +92 -89
- package/front_end/third_party/lighthouse/locales/es.json +91 -88
- package/front_end/third_party/lighthouse/locales/fi.json +92 -89
- package/front_end/third_party/lighthouse/locales/fil.json +93 -90
- package/front_end/third_party/lighthouse/locales/fr.json +94 -91
- package/front_end/third_party/lighthouse/locales/he.json +97 -94
- package/front_end/third_party/lighthouse/locales/hi.json +92 -89
- package/front_end/third_party/lighthouse/locales/hr.json +90 -87
- package/front_end/third_party/lighthouse/locales/hu.json +90 -87
- package/front_end/third_party/lighthouse/locales/id.json +91 -88
- package/front_end/third_party/lighthouse/locales/it.json +90 -87
- package/front_end/third_party/lighthouse/locales/ja.json +90 -87
- package/front_end/third_party/lighthouse/locales/ko.json +90 -87
- package/front_end/third_party/lighthouse/locales/lt.json +90 -87
- package/front_end/third_party/lighthouse/locales/lv.json +91 -88
- package/front_end/third_party/lighthouse/locales/nl.json +90 -87
- package/front_end/third_party/lighthouse/locales/no.json +92 -89
- package/front_end/third_party/lighthouse/locales/pl.json +90 -87
- package/front_end/third_party/lighthouse/locales/pt-PT.json +111 -108
- package/front_end/third_party/lighthouse/locales/pt.json +97 -94
- package/front_end/third_party/lighthouse/locales/ro.json +94 -91
- package/front_end/third_party/lighthouse/locales/ru.json +93 -90
- package/front_end/third_party/lighthouse/locales/sk.json +93 -90
- package/front_end/third_party/lighthouse/locales/sl.json +91 -88
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +91 -88
- package/front_end/third_party/lighthouse/locales/sr.json +91 -88
- package/front_end/third_party/lighthouse/locales/sv.json +92 -89
- package/front_end/third_party/lighthouse/locales/ta.json +101 -98
- package/front_end/third_party/lighthouse/locales/te.json +92 -89
- package/front_end/third_party/lighthouse/locales/th.json +95 -92
- package/front_end/third_party/lighthouse/locales/tr.json +91 -88
- package/front_end/third_party/lighthouse/locales/uk.json +93 -90
- package/front_end/third_party/lighthouse/locales/vi.json +95 -92
- package/front_end/third_party/lighthouse/locales/zh-HK.json +92 -89
- package/front_end/third_party/lighthouse/locales/zh-TW.json +98 -95
- package/front_end/third_party/lighthouse/locales/zh.json +96 -93
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +8 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +10 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPResponse.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPResponse.js +4 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.js +24 -12
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DownloadBehavior.d.ts +30 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DownloadBehavior.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DownloadBehavior.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DownloadBehavior.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/common.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/common.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +49 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +118 -88
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +8 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +10 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPResponse.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPResponse.js +4 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.js +24 -12
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DownloadBehavior.d.ts +30 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DownloadBehavior.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DownloadBehavior.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DownloadBehavior.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/common.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/common.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +49 -0
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +8 -0
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +3 -1
- package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +11 -3
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +11 -0
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPResponse.ts +3 -5
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +34 -17
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/common/DownloadBehavior.ts +31 -0
- package/front_end/third_party/puppeteer/package/src/common/common.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -0
- package/front_end/ui/components/data_grid/DataGridControllerIntegrator.ts +4 -1
- package/front_end/ui/components/dialogs/ButtonDialog.test.ts +78 -0
- package/front_end/ui/components/dialogs/ButtonDialog.ts +131 -0
- package/front_end/ui/components/dialogs/Dialog.test.ts +43 -0
- package/front_end/ui/components/dialogs/Dialog.ts +64 -2
- package/front_end/ui/components/dialogs/ShortcutDialog.test.ts +15 -1
- package/front_end/ui/components/dialogs/ShortcutDialog.ts +28 -20
- package/front_end/ui/components/dialogs/buttonDialog.css +9 -0
- package/front_end/ui/components/dialogs/dialog.css +15 -0
- package/front_end/ui/components/dialogs/dialogs.ts +2 -0
- package/front_end/ui/components/dialogs/shortcutDialog.css +34 -6
- package/front_end/ui/components/docs/dialog/button_dialog.html +28 -0
- package/front_end/ui/components/docs/dialog/button_dialog.ts +29 -0
- package/front_end/ui/components/docs/performance_panel/basic.ts +1 -1
- package/front_end/ui/components/docs/performance_panel/timeline_history_manager.ts +6 -4
- package/front_end/ui/components/floating_button/FloatingButton.ts +3 -2
- package/front_end/ui/components/icon_button/fileSourceIcon.css +7 -3
- package/front_end/ui/components/issue_counter/IssueCounter.ts +15 -2
- package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownView.ts +15 -0
- package/front_end/ui/components/markdown_view/markdownView.css +1 -1
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +24 -18
- package/front_end/ui/components/switch/SwitchImpl.ts +2 -2
- package/front_end/ui/legacy/Infobar.ts +6 -0
- package/front_end/ui/legacy/InspectorView.ts +40 -0
- package/front_end/ui/legacy/ListWidget.ts +4 -2
- package/front_end/ui/legacy/ThrottledWidget.ts +2 -2
- package/front_end/ui/legacy/Toolbar.ts +3 -3
- package/front_end/ui/legacy/UIUtils.ts +8 -6
- package/front_end/ui/legacy/Widget.ts +32 -0
- package/front_end/ui/legacy/components/data_grid/DataGrid.test.ts +6 -9
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +35 -34
- package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +2 -2
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +32 -25
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewCalculator.ts +18 -4
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +80 -39
- package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +4 -4
- package/front_end/ui/legacy/components/utils/jsUtils.css +8 -0
- package/front_end/ui/legacy/filter.css +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +1 -1
- package/front_end/ui/legacy/listWidget.css +4 -1
- package/front_end/ui/legacy/reportView.css +1 -1
- package/front_end/ui/legacy/toolbar.css +3 -6
- package/front_end/ui/legacy/treeoutline.css +3 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +12 -1
- package/front_end/ui/visual_logging/LoggingDriver.test.ts +27 -1
- package/front_end/ui/visual_logging/LoggingDriver.ts +7 -4
- package/package.json +2 -3
- package/scripts/build/wasm-as.py +1 -1
- package/scripts/freestyler/auto_freestyler.js +12 -4
- package/scripts/freestyler/to_tsv.mjs +40 -0
- package/scripts/tools/update_goldens.py +11 -13
- package/front_end/panels/timeline/components/insights/SidebarInsight.test.ts +0 -72
- package/front_end/ui/components/docs/two_states_counter/basic.html +0 -27
- package/front_end/ui/components/docs/two_states_counter/basic.ts +0 -45
- package/front_end/ui/components/two_states_counter/TwoStatesCounter.test.ts +0 -73
- package/front_end/ui/components/two_states_counter/TwoStatesCounter.ts +0 -104
- package/front_end/ui/components/two_states_counter/twoStatesCounter.css +0 -37
- package/front_end/ui/components/two_states_counter/two_states_counter.ts +0 -9
@@ -5,7 +5,6 @@
|
|
5
5
|
*/
|
6
6
|
import type {Protocol} from 'devtools-protocol';
|
7
7
|
|
8
|
-
import type {CDPSession} from '../api/CDPSession.js';
|
9
8
|
import type {Frame} from '../api/Frame.js';
|
10
9
|
import {HTTPResponse, type RemoteAddress} from '../api/HTTPResponse.js';
|
11
10
|
import {ProtocolError} from '../common/Errors.js';
|
@@ -19,7 +18,6 @@ import type {CdpHTTPRequest} from './HTTPRequest.js';
|
|
19
18
|
* @internal
|
20
19
|
*/
|
21
20
|
export class CdpHTTPResponse extends HTTPResponse {
|
22
|
-
#client: CDPSession;
|
23
21
|
#request: CdpHTTPRequest;
|
24
22
|
#contentPromise: Promise<Uint8Array> | null = null;
|
25
23
|
#bodyLoadedDeferred = Deferred.create<void, Error>();
|
@@ -34,13 +32,11 @@ export class CdpHTTPResponse extends HTTPResponse {
|
|
34
32
|
#timing: Protocol.Network.ResourceTiming | null;
|
35
33
|
|
36
34
|
constructor(
|
37
|
-
client: CDPSession,
|
38
35
|
request: CdpHTTPRequest,
|
39
36
|
responsePayload: Protocol.Network.Response,
|
40
37
|
extraInfo: Protocol.Network.ResponseReceivedExtraInfoEvent | null,
|
41
38
|
) {
|
42
39
|
super();
|
43
|
-
this.#client = client;
|
44
40
|
this.#request = request;
|
45
41
|
|
46
42
|
this.#remoteAddress = {
|
@@ -128,7 +124,9 @@ export class CdpHTTPResponse extends HTTPResponse {
|
|
128
124
|
.valueOrThrow()
|
129
125
|
.then(async () => {
|
130
126
|
try {
|
131
|
-
|
127
|
+
// Use CDPSession from corresponding request to retrieve body, as it's client
|
128
|
+
// might have been updated (e.g. for an adopted OOPIF).
|
129
|
+
const response = await this.#request.client.send(
|
132
130
|
'Network.getResponseBody',
|
133
131
|
{
|
134
132
|
requestId: this.#request.id,
|
@@ -514,17 +514,12 @@ export class NetworkManager extends EventEmitter<NetworkManagerEvents> {
|
|
514
514
|
}
|
515
515
|
|
516
516
|
#handleRequestRedirect(
|
517
|
-
|
517
|
+
_client: CDPSession,
|
518
518
|
request: CdpHTTPRequest,
|
519
519
|
responsePayload: Protocol.Network.Response,
|
520
520
|
extraInfo: Protocol.Network.ResponseReceivedExtraInfoEvent | null,
|
521
521
|
): void {
|
522
|
-
const response = new CdpHTTPResponse(
|
523
|
-
client,
|
524
|
-
request,
|
525
|
-
responsePayload,
|
526
|
-
extraInfo,
|
527
|
-
);
|
522
|
+
const response = new CdpHTTPResponse(request, responsePayload, extraInfo);
|
528
523
|
request._response = response;
|
529
524
|
request._redirectChain.push(request);
|
530
525
|
response._resolveBody(
|
@@ -536,7 +531,7 @@ export class NetworkManager extends EventEmitter<NetworkManagerEvents> {
|
|
536
531
|
}
|
537
532
|
|
538
533
|
#emitResponseEvent(
|
539
|
-
|
534
|
+
_client: CDPSession,
|
540
535
|
responseReceived: Protocol.Network.ResponseReceivedEvent,
|
541
536
|
extraInfo: Protocol.Network.ResponseReceivedExtraInfoEvent | null,
|
542
537
|
): void {
|
@@ -568,7 +563,6 @@ export class NetworkManager extends EventEmitter<NetworkManagerEvents> {
|
|
568
563
|
}
|
569
564
|
|
570
565
|
const response = new CdpHTTPResponse(
|
571
|
-
client,
|
572
566
|
request,
|
573
567
|
responseReceived.response,
|
574
568
|
extraInfo,
|
@@ -627,10 +621,10 @@ export class NetworkManager extends EventEmitter<NetworkManagerEvents> {
|
|
627
621
|
event,
|
628
622
|
);
|
629
623
|
if (queuedEvents.loadingFinishedEvent) {
|
630
|
-
this.#emitLoadingFinished(queuedEvents.loadingFinishedEvent);
|
624
|
+
this.#emitLoadingFinished(client, queuedEvents.loadingFinishedEvent);
|
631
625
|
}
|
632
626
|
if (queuedEvents.loadingFailedEvent) {
|
633
|
-
this.#emitLoadingFailed(queuedEvents.loadingFailedEvent);
|
627
|
+
this.#emitLoadingFailed(client, queuedEvents.loadingFailedEvent);
|
634
628
|
}
|
635
629
|
return;
|
636
630
|
}
|
@@ -654,7 +648,7 @@ export class NetworkManager extends EventEmitter<NetworkManagerEvents> {
|
|
654
648
|
}
|
655
649
|
|
656
650
|
#onLoadingFinished(
|
657
|
-
|
651
|
+
client: CDPSession,
|
658
652
|
event: Protocol.Network.LoadingFinishedEvent,
|
659
653
|
): void {
|
660
654
|
// If the response event for this request is still waiting on a
|
@@ -665,11 +659,14 @@ export class NetworkManager extends EventEmitter<NetworkManagerEvents> {
|
|
665
659
|
if (queuedEvents) {
|
666
660
|
queuedEvents.loadingFinishedEvent = event;
|
667
661
|
} else {
|
668
|
-
this.#emitLoadingFinished(event);
|
662
|
+
this.#emitLoadingFinished(client, event);
|
669
663
|
}
|
670
664
|
}
|
671
665
|
|
672
|
-
#emitLoadingFinished(
|
666
|
+
#emitLoadingFinished(
|
667
|
+
client: CDPSession,
|
668
|
+
event: Protocol.Network.LoadingFinishedEvent,
|
669
|
+
): void {
|
673
670
|
const request = this.#networkEventManager.getRequest(event.requestId);
|
674
671
|
// For certain requestIds we never receive requestWillBeSent event.
|
675
672
|
// @see https://crbug.com/750469
|
@@ -677,6 +674,8 @@ export class NetworkManager extends EventEmitter<NetworkManagerEvents> {
|
|
677
674
|
return;
|
678
675
|
}
|
679
676
|
|
677
|
+
this.#maybeReassignOOPIFRequestClient(client, request);
|
678
|
+
|
680
679
|
// Under certain conditions we never get the Network.responseReceived
|
681
680
|
// event from protocol. @see https://crbug.com/883475
|
682
681
|
if (request.response()) {
|
@@ -687,7 +686,7 @@ export class NetworkManager extends EventEmitter<NetworkManagerEvents> {
|
|
687
686
|
}
|
688
687
|
|
689
688
|
#onLoadingFailed(
|
690
|
-
|
689
|
+
client: CDPSession,
|
691
690
|
event: Protocol.Network.LoadingFailedEvent,
|
692
691
|
): void {
|
693
692
|
// If the response event for this request is still waiting on a
|
@@ -698,17 +697,21 @@ export class NetworkManager extends EventEmitter<NetworkManagerEvents> {
|
|
698
697
|
if (queuedEvents) {
|
699
698
|
queuedEvents.loadingFailedEvent = event;
|
700
699
|
} else {
|
701
|
-
this.#emitLoadingFailed(event);
|
700
|
+
this.#emitLoadingFailed(client, event);
|
702
701
|
}
|
703
702
|
}
|
704
703
|
|
705
|
-
#emitLoadingFailed(
|
704
|
+
#emitLoadingFailed(
|
705
|
+
client: CDPSession,
|
706
|
+
event: Protocol.Network.LoadingFailedEvent,
|
707
|
+
): void {
|
706
708
|
const request = this.#networkEventManager.getRequest(event.requestId);
|
707
709
|
// For certain requestIds we never receive requestWillBeSent event.
|
708
710
|
// @see https://crbug.com/750469
|
709
711
|
if (!request) {
|
710
712
|
return;
|
711
713
|
}
|
714
|
+
this.#maybeReassignOOPIFRequestClient(client, request);
|
712
715
|
request._failureText = event.errorText;
|
713
716
|
const response = request.response();
|
714
717
|
if (response) {
|
@@ -717,4 +720,18 @@ export class NetworkManager extends EventEmitter<NetworkManagerEvents> {
|
|
717
720
|
this.#forgetRequest(request, true);
|
718
721
|
this.emit(NetworkManagerEvent.RequestFailed, request);
|
719
722
|
}
|
723
|
+
|
724
|
+
#maybeReassignOOPIFRequestClient(
|
725
|
+
client: CDPSession,
|
726
|
+
request: CdpHTTPRequest,
|
727
|
+
): void {
|
728
|
+
// Document requests for OOPIFs start in the parent frame but are adopted by their
|
729
|
+
// child frame, meaning their loadingFinished and loadingFailed events are fired on
|
730
|
+
// the child session. In this case we reassign the request CDPSession to ensure all
|
731
|
+
// subsequent actions use the correct session (e.g. retrieving response body in
|
732
|
+
// HTTPResponse).
|
733
|
+
if (client !== request.client && request.isNavigationRequest()) {
|
734
|
+
request.client = client;
|
735
|
+
}
|
736
|
+
}
|
720
737
|
}
|
@@ -552,6 +552,10 @@ export class CdpPage extends Page {
|
|
552
552
|
return this._timeoutSettings.timeout();
|
553
553
|
}
|
554
554
|
|
555
|
+
override getDefaultNavigationTimeout(): number {
|
556
|
+
return this._timeoutSettings.navigationTimeout();
|
557
|
+
}
|
558
|
+
|
555
559
|
override async queryObjects<Prototype>(
|
556
560
|
prototypeHandle: JSHandle<Prototype>,
|
557
561
|
): Promise<JSHandle<Prototype[]>> {
|
@@ -12,6 +12,7 @@ import type {
|
|
12
12
|
} from '../api/Browser.js';
|
13
13
|
|
14
14
|
import type {ConnectionTransport} from './ConnectionTransport.js';
|
15
|
+
import type {DownloadBehavior} from './DownloadBehavior.js';
|
15
16
|
import type {Viewport} from './Viewport.js';
|
16
17
|
|
17
18
|
/**
|
@@ -54,6 +55,10 @@ export interface BrowserConnectOptions {
|
|
54
55
|
* @defaultValue '\{width: 800, height: 600\}'
|
55
56
|
*/
|
56
57
|
defaultViewport?: Viewport | null;
|
58
|
+
/**
|
59
|
+
* Sets the download behavior for the context.
|
60
|
+
*/
|
61
|
+
downloadBehavior?: DownloadBehavior;
|
57
62
|
/**
|
58
63
|
* Slows down Puppeteer operations by the specified amount of milliseconds to
|
59
64
|
* aid debugging.
|
@@ -0,0 +1,31 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2024 Google Inc.
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/
|
6
|
+
|
7
|
+
/**
|
8
|
+
* @public
|
9
|
+
*/
|
10
|
+
export type DownloadPolicy = 'deny' | 'allow' | 'allowAndName' | 'default';
|
11
|
+
|
12
|
+
/**
|
13
|
+
* @public
|
14
|
+
*/
|
15
|
+
export interface DownloadBehavior {
|
16
|
+
/**
|
17
|
+
* Whether to allow all or deny all download requests, or use default behavior if
|
18
|
+
* available.
|
19
|
+
*
|
20
|
+
* @remarks
|
21
|
+
* Setting this to `allowAndName` will name all files according to their download guids.
|
22
|
+
*/
|
23
|
+
policy: DownloadPolicy;
|
24
|
+
/**
|
25
|
+
* The default path to save downloaded files to.
|
26
|
+
*
|
27
|
+
* @remarks
|
28
|
+
* Setting this is required if behavior is set to `allow` or `allowAndName`.
|
29
|
+
*/
|
30
|
+
downloadPath?: string;
|
31
|
+
}
|
@@ -84,6 +84,7 @@ export abstract class BrowserLauncher {
|
|
84
84
|
handleSIGHUP = true,
|
85
85
|
acceptInsecureCerts = false,
|
86
86
|
defaultViewport = DEFAULT_VIEWPORT,
|
87
|
+
downloadBehavior,
|
87
88
|
slowMo = 0,
|
88
89
|
timeout = 30000,
|
89
90
|
waitForInitialPage = true,
|
@@ -206,6 +207,7 @@ export abstract class BrowserLauncher {
|
|
206
207
|
[],
|
207
208
|
acceptInsecureCerts,
|
208
209
|
defaultViewport,
|
210
|
+
downloadBehavior,
|
209
211
|
browserProcess.nodeProcess,
|
210
212
|
browserCloseCallback,
|
211
213
|
options.targetFilter,
|
@@ -8,7 +8,7 @@
|
|
8
8
|
* @internal
|
9
9
|
*/
|
10
10
|
export const PUPPETEER_REVISIONS = Object.freeze({
|
11
|
-
chrome: '
|
12
|
-
'chrome-headless-shell': '
|
13
|
-
firefox: 'stable_132.0.
|
11
|
+
chrome: '131.0.6778.85',
|
12
|
+
'chrome-headless-shell': '131.0.6778.85',
|
13
|
+
firefox: 'stable_132.0.2',
|
14
14
|
});
|
@@ -104,6 +104,7 @@
|
|
104
104
|
"package/lib/esm/puppeteer/common/CustomQueryHandler.js",
|
105
105
|
"package/lib/esm/puppeteer/common/Debug.js",
|
106
106
|
"package/lib/esm/puppeteer/common/Device.js",
|
107
|
+
"package/lib/esm/puppeteer/common/DownloadBehavior.js",
|
107
108
|
"package/lib/esm/puppeteer/common/Errors.js",
|
108
109
|
"package/lib/esm/puppeteer/common/EventEmitter.js",
|
109
110
|
"package/lib/esm/puppeteer/common/FileChooser.js",
|
@@ -35,7 +35,10 @@ export class DataGridControllerIntegrator extends UI.Widget.VBox {
|
|
35
35
|
return this.#data;
|
36
36
|
}
|
37
37
|
|
38
|
-
update(data
|
38
|
+
override update(data?: Readonly<DataGridControllerData>): void {
|
39
|
+
if (!data) {
|
40
|
+
return;
|
41
|
+
}
|
39
42
|
this.#data = data;
|
40
43
|
// Setting of `dataGrid.data` is compute heavy because of the
|
41
44
|
// filtering logic. Thus, we're debouncing calls to the setter.
|
@@ -0,0 +1,78 @@
|
|
1
|
+
// Copyright 2024 The Chromium Authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
3
|
+
// found in the LICENSE file.
|
4
|
+
|
5
|
+
import * as Helpers from '../../../testing/DOMHelpers.js'; // eslint-disable-line rulesdir/es_modules_import
|
6
|
+
import * as Buttons from '../buttons/buttons.js';
|
7
|
+
import * as Coordinator from '../render_coordinator/render_coordinator.js';
|
8
|
+
|
9
|
+
import * as Dialogs from './dialogs.js';
|
10
|
+
|
11
|
+
const coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance();
|
12
|
+
|
13
|
+
describe('ButtonDialog', () => {
|
14
|
+
async function getButtonDialog(fieldToTest?: Partial<Dialogs.ButtonDialog.ButtonDialogData>) {
|
15
|
+
const defaultMinimumButtonDialogData: Dialogs.ButtonDialog.ButtonDialogData = {
|
16
|
+
openOnRender: false,
|
17
|
+
iconName: 'help',
|
18
|
+
variant: Buttons.Button.Variant.TOOLBAR,
|
19
|
+
dialogTitle: '',
|
20
|
+
};
|
21
|
+
const buttonDialog = new Dialogs.ButtonDialog.ButtonDialog();
|
22
|
+
buttonDialog.data = Object.assign(defaultMinimumButtonDialogData, fieldToTest);
|
23
|
+
|
24
|
+
Helpers.renderElementIntoDOM(buttonDialog);
|
25
|
+
await coordinator.done();
|
26
|
+
|
27
|
+
return buttonDialog;
|
28
|
+
}
|
29
|
+
|
30
|
+
function getButtonFromButtonDialog(buttonDialog: Dialogs.ButtonDialog.ButtonDialog): Buttons.Button.Button {
|
31
|
+
assert.isNotNull(buttonDialog.shadowRoot);
|
32
|
+
const button = buttonDialog.shadowRoot.querySelector('devtools-button');
|
33
|
+
if (!button) {
|
34
|
+
assert.fail('devtools-button not found');
|
35
|
+
}
|
36
|
+
assert.instanceOf(button, HTMLElement);
|
37
|
+
return button;
|
38
|
+
}
|
39
|
+
|
40
|
+
function getDialogFromButtonDialog(buttonDialog: Dialogs.ButtonDialog.ButtonDialog): Dialogs.Dialog.Dialog {
|
41
|
+
assert.isNotNull(buttonDialog.shadowRoot);
|
42
|
+
const dialog = buttonDialog.shadowRoot.querySelector('devtools-dialog');
|
43
|
+
if (!dialog) {
|
44
|
+
assert.fail('devtools-dialog not found');
|
45
|
+
}
|
46
|
+
assert.instanceOf(dialog, HTMLElement);
|
47
|
+
return dialog;
|
48
|
+
}
|
49
|
+
|
50
|
+
it('should display dialog on initial render when provided prop', async () => {
|
51
|
+
const buttonDialog = await getButtonDialog({
|
52
|
+
openOnRender: true,
|
53
|
+
});
|
54
|
+
const dialog = getDialogFromButtonDialog(buttonDialog);
|
55
|
+
|
56
|
+
assert.isTrue(dialog.hasAttribute('open'));
|
57
|
+
});
|
58
|
+
|
59
|
+
it('should not display dialog on initial render by default', async () => {
|
60
|
+
const buttonDialog = await getButtonDialog({
|
61
|
+
openOnRender: false,
|
62
|
+
});
|
63
|
+
const dialog = getDialogFromButtonDialog(buttonDialog);
|
64
|
+
|
65
|
+
assert.isFalse(dialog.hasAttribute('open'));
|
66
|
+
});
|
67
|
+
|
68
|
+
it('Opens if button is clicked', async () => {
|
69
|
+
const buttonDialog = await getButtonDialog({});
|
70
|
+
const dialog = getDialogFromButtonDialog(buttonDialog);
|
71
|
+
assert.isFalse(dialog.hasAttribute('open'));
|
72
|
+
|
73
|
+
const button = getButtonFromButtonDialog(buttonDialog);
|
74
|
+
button.click();
|
75
|
+
await coordinator.done();
|
76
|
+
assert.isTrue(dialog.hasAttribute('open'));
|
77
|
+
});
|
78
|
+
});
|
@@ -0,0 +1,131 @@
|
|
1
|
+
// Copyright 2024 The Chromium Authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
3
|
+
// found in the LICENSE file.
|
4
|
+
|
5
|
+
import type * as Buttons from '../../../ui/components/buttons/buttons.js';
|
6
|
+
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
7
|
+
import * as LitHtml from '../../../ui/lit-html/lit-html.js';
|
8
|
+
|
9
|
+
import buttonDialogStyles from './buttonDialog.css.js';
|
10
|
+
import {
|
11
|
+
type ClickOutsideDialogEvent,
|
12
|
+
type Dialog as DialogElement,
|
13
|
+
DialogHorizontalAlignment,
|
14
|
+
DialogVerticalPosition,
|
15
|
+
} from './Dialog.js';
|
16
|
+
|
17
|
+
const {html} = LitHtml;
|
18
|
+
|
19
|
+
export interface ButtonDialogData {
|
20
|
+
openOnRender?: boolean;
|
21
|
+
jslogContext?: string;
|
22
|
+
// The below are parts of ButtonData. See comments of ButtonData.
|
23
|
+
iconName: string;
|
24
|
+
variant: Buttons.Button.Variant.PRIMARY_TOOLBAR|Buttons.Button.Variant.TOOLBAR|Buttons.Button.Variant.ICON;
|
25
|
+
iconTitle?: string;
|
26
|
+
// The below are parts of DialogData. See comments of DialogData.
|
27
|
+
position?: DialogVerticalPosition;
|
28
|
+
horizontalAlignment?: DialogHorizontalAlignment;
|
29
|
+
closeOnESC?: boolean;
|
30
|
+
closeOnScroll?: boolean;
|
31
|
+
closeButton?: boolean;
|
32
|
+
dialogTitle: string;
|
33
|
+
}
|
34
|
+
|
35
|
+
export class ButtonDialog extends HTMLElement {
|
36
|
+
readonly #shadow = this.attachShadow({mode: 'open'});
|
37
|
+
readonly #renderBound = this.#render.bind(this);
|
38
|
+
|
39
|
+
#dialog: DialogElement|null = null;
|
40
|
+
#showButton: Buttons.Button.Button|null = null;
|
41
|
+
#data: ButtonDialogData|null = null;
|
42
|
+
|
43
|
+
connectedCallback(): void {
|
44
|
+
this.#shadow.adoptedStyleSheets = [buttonDialogStyles];
|
45
|
+
}
|
46
|
+
|
47
|
+
set data(data: ButtonDialogData) {
|
48
|
+
this.#data = data;
|
49
|
+
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#renderBound);
|
50
|
+
}
|
51
|
+
|
52
|
+
#showDialog(): void {
|
53
|
+
if (!this.#dialog) {
|
54
|
+
throw new Error('Dialog not found');
|
55
|
+
}
|
56
|
+
void this.#dialog.setDialogVisible(true);
|
57
|
+
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#renderBound);
|
58
|
+
}
|
59
|
+
|
60
|
+
#closeDialog(evt?: ClickOutsideDialogEvent): void {
|
61
|
+
if (!this.#dialog) {
|
62
|
+
throw new Error('Dialog not found');
|
63
|
+
}
|
64
|
+
void this.#dialog.setDialogVisible(false);
|
65
|
+
if (evt) {
|
66
|
+
evt.stopImmediatePropagation();
|
67
|
+
}
|
68
|
+
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#renderBound);
|
69
|
+
}
|
70
|
+
|
71
|
+
#render(): void {
|
72
|
+
if (!this.#data) {
|
73
|
+
throw new Error('ButtonDialog.data is not set');
|
74
|
+
}
|
75
|
+
if (!ComponentHelpers.ScheduledRender.isScheduledRender(this)) {
|
76
|
+
throw new Error('Button dialog render was not scheduled');
|
77
|
+
}
|
78
|
+
|
79
|
+
// clang-format off
|
80
|
+
LitHtml.render(
|
81
|
+
html`
|
82
|
+
<devtools-button
|
83
|
+
@click=${this.#showDialog}
|
84
|
+
on-render=${ComponentHelpers.Directives.nodeRenderedCallback(node => {
|
85
|
+
this.#showButton = node as Buttons.Button.Button;
|
86
|
+
})}
|
87
|
+
.data=${{
|
88
|
+
variant: this.#data.variant,
|
89
|
+
iconName: this.#data.iconName,
|
90
|
+
title: this.#data.iconTitle,
|
91
|
+
jslogContext: this.#data.jslogContext,
|
92
|
+
} as Buttons.Button.ButtonData}
|
93
|
+
></devtools-button>
|
94
|
+
<devtools-dialog
|
95
|
+
@clickoutsidedialog=${this.#closeDialog}
|
96
|
+
.origin=${() => {
|
97
|
+
if (!this.#showButton) {
|
98
|
+
throw new Error('Button not found');
|
99
|
+
}
|
100
|
+
return this.#showButton;
|
101
|
+
}}
|
102
|
+
.position=${this.#data.position ?? DialogVerticalPosition.BOTTOM}
|
103
|
+
.horizontalAlignment=${this.#data.horizontalAlignment ?? DialogHorizontalAlignment.RIGHT}
|
104
|
+
.closeOnESC=${this.#data.closeOnESC ?? false}
|
105
|
+
.closeOnScroll=${this.#data.closeOnScroll ?? false}
|
106
|
+
.closeButton=${this.#data.closeButton ?? false}
|
107
|
+
.dialogTitle=${this.#data.dialogTitle}
|
108
|
+
.jslogContext=${this.#data.jslogContext ?? ''}
|
109
|
+
on-render=${ComponentHelpers.Directives.nodeRenderedCallback(node => {
|
110
|
+
this.#dialog = node as DialogElement;
|
111
|
+
})}
|
112
|
+
>
|
113
|
+
<slot></slot>
|
114
|
+
</devtools-dialog>
|
115
|
+
`,
|
116
|
+
this.#shadow, {host: this});
|
117
|
+
// clang-format on
|
118
|
+
|
119
|
+
if (this.#data.openOnRender) {
|
120
|
+
this.#showDialog();
|
121
|
+
this.#data.openOnRender = false;
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
126
|
+
declare global {
|
127
|
+
interface HTMLElementTagNameMap {
|
128
|
+
'devtools-button-dialog': ButtonDialog;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
customElements.define('devtools-button-dialog', ButtonDialog);
|
@@ -5,6 +5,7 @@
|
|
5
5
|
import * as Platform from '../../../core/platform/platform.js';
|
6
6
|
import type * as WindowBoundsService from '../../../services/window_bounds/window_bounds.js';
|
7
7
|
import * as Helpers from '../../../testing/DOMHelpers.js'; // eslint-disable-line rulesdir/es_modules_import
|
8
|
+
import {describeWithLocale} from '../../../testing/EnvironmentHelpers.js';
|
8
9
|
import * as Coordinator from '../render_coordinator/render_coordinator.js';
|
9
10
|
|
10
11
|
import * as Dialogs from './dialogs.js';
|
@@ -552,6 +553,48 @@ describe('Dialog', () => {
|
|
552
553
|
}
|
553
554
|
});
|
554
555
|
});
|
556
|
+
|
557
|
+
describeWithLocale('rendering', () => {
|
558
|
+
it('do not render dialog header line if title is empty and there is no close button', async () => {
|
559
|
+
const dialog = new Dialogs.Dialog.Dialog();
|
560
|
+
dialog.closeButton = false;
|
561
|
+
dialog.dialogTitle = '';
|
562
|
+
Helpers.renderElementIntoDOM(dialog);
|
563
|
+
await coordinator.done();
|
564
|
+
|
565
|
+
assert.isNotNull(dialog.shadowRoot);
|
566
|
+
const dialogHeader = dialog.shadowRoot.querySelector('.dialog-header');
|
567
|
+
assert.notExists(dialogHeader);
|
568
|
+
});
|
569
|
+
|
570
|
+
it('should render a close button in the dialog if closeButton is true', async () => {
|
571
|
+
const dialog = new Dialogs.Dialog.Dialog();
|
572
|
+
dialog.closeButton = true;
|
573
|
+
Helpers.renderElementIntoDOM(dialog);
|
574
|
+
await coordinator.done();
|
575
|
+
|
576
|
+
assert.isNotNull(dialog.shadowRoot);
|
577
|
+
const dialogHeader = dialog.shadowRoot.querySelector('.dialog-header');
|
578
|
+
assert.exists(dialogHeader);
|
579
|
+
const closeButton = dialogHeader.querySelector('devtools-button');
|
580
|
+
assert.exists(closeButton);
|
581
|
+
});
|
582
|
+
|
583
|
+
it('should render dialog title if it is not empty', async () => {
|
584
|
+
const dialogTitle = 'Button dialog example';
|
585
|
+
const dialog = new Dialogs.Dialog.Dialog();
|
586
|
+
dialog.dialogTitle = dialogTitle;
|
587
|
+
Helpers.renderElementIntoDOM(dialog);
|
588
|
+
await coordinator.done();
|
589
|
+
|
590
|
+
assert.isNotNull(dialog.shadowRoot);
|
591
|
+
const dialogHeader = dialog.shadowRoot.querySelector('.dialog-header');
|
592
|
+
assert.exists(dialogHeader);
|
593
|
+
const dialogTitleElement = dialogHeader.querySelector('.dialog-header-text');
|
594
|
+
assert.exists(dialogTitleElement);
|
595
|
+
assert.strictEqual(dialogTitleElement.textContent, dialogTitle);
|
596
|
+
});
|
597
|
+
});
|
555
598
|
});
|
556
599
|
|
557
600
|
describe('closing the dialog with click', () => {
|