chrome-devtools-frontend 1.0.1522585 → 1.0.1525561
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS +1 -0
- package/docs/README.md +1 -0
- package/docs/policy/README.md +1 -0
- package/docs/policy/console-policy.md +144 -0
- package/docs/policy/images/console-policy1.png +0 -0
- package/docs/policy/images/console-policy2.png +0 -0
- package/docs/policy/images/console-policy3.png +0 -0
- package/docs/policy/slow-close.md +22 -19
- package/docs/ui_engineering.md +22 -0
- package/front_end/Tests.js +1 -1
- package/front_end/core/common/Color.ts +13 -9
- package/front_end/core/common/ColorConverter.ts +9 -7
- package/front_end/core/common/Gzip.ts +1 -1
- package/front_end/core/common/MapWithDefault.ts +5 -3
- package/front_end/core/common/ResourceType.ts +0 -12
- package/front_end/core/common/ReturnToPanel.ts +6 -4
- package/front_end/core/common/Trie.ts +4 -2
- package/front_end/core/host/AidaClient.ts +3 -3
- package/front_end/core/host/GdpClient.ts +7 -5
- package/front_end/core/host/InspectorFrontendHostAPI.ts +7 -5
- package/front_end/core/host/Platform.ts +5 -3
- package/front_end/core/host/UserMetrics.ts +6 -4
- package/front_end/core/platform/ArrayUtilities.ts +1 -1
- package/front_end/core/platform/StringUtilities.ts +34 -31
- package/front_end/core/root/Runtime.ts +1 -1
- package/front_end/core/sdk/CSSMetadata.ts +6 -4
- package/front_end/core/sdk/CSSPropertyParser.ts +17 -13
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +19 -13
- package/front_end/core/sdk/ChildTargetManager.ts +35 -0
- package/front_end/core/sdk/DOMModel.ts +1 -1
- package/front_end/core/sdk/EventBreakpointsModel.ts +4 -2
- package/front_end/core/sdk/HttpReasonPhraseStrings.ts +4 -2
- package/front_end/core/sdk/NetworkManager.ts +8 -48
- package/front_end/core/sdk/NetworkRequest.ts +0 -28
- package/front_end/core/sdk/PageResourceLoader.ts +1 -1
- package/front_end/core/sdk/PreloadingModel.ts +22 -18
- package/front_end/core/sdk/RehydratingConnection.ts +1 -1
- package/front_end/core/sdk/RehydratingObject.ts +1 -1
- package/front_end/core/sdk/RemoteObject.ts +1 -1
- package/front_end/core/sdk/ResourceTreeModel.ts +2 -0
- package/front_end/{models/source_map_scopes → core/sdk}/ScopeTreeCache.ts +8 -7
- package/front_end/core/sdk/ScreenCaptureModel.ts +24 -20
- package/front_end/core/sdk/Target.ts +7 -1
- package/front_end/core/sdk/TraceObject.ts +2 -2
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/formatter_worker/FormatterActions.ts +7 -0
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +15 -12
- package/front_end/entrypoints/formatter_worker/Substitute.ts +6 -4
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +24 -16
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +2 -1
- package/front_end/entrypoints/main/MainImpl.ts +6 -4
- package/front_end/generated/InspectorBackendCommands.js +2 -2
- package/front_end/generated/protocol-mapping.d.ts +3 -2
- package/front_end/generated/protocol-proxy-api.d.ts +3 -1
- package/front_end/generated/protocol.ts +7 -1
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +55 -14
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +83 -222
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +23 -0
- package/front_end/models/ai_assistance/performance/AIContext.ts +19 -4
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +4 -2
- package/front_end/models/autofill_manager/AutofillManager.ts +4 -2
- package/front_end/models/cpu_profile/CPUProfileDataModel.ts +1 -1
- package/front_end/models/crux-manager/CrUXManager.ts +1 -1
- package/front_end/models/extensions/HostUrlPattern.ts +13 -5
- package/front_end/models/formatter/FormatterWorkerPool.ts +1 -1
- package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +1 -1
- package/front_end/models/issues_manager/CookieIssue.ts +2 -2
- package/front_end/models/issues_manager/MarkdownIssueDescription.ts +1 -1
- package/front_end/models/issues_manager/SharedDictionaryIssue.ts +20 -0
- package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
- package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +8 -0
- package/front_end/models/network_time_calculator/Calculator.ts +4 -2
- package/front_end/models/network_time_calculator/RequestTimeRanges.ts +6 -4
- package/front_end/models/source_map_scopes/NamesResolver.ts +8 -8
- package/front_end/models/source_map_scopes/source_map_scopes.ts +0 -2
- package/front_end/models/text_utils/ContentProvider.ts +6 -4
- package/front_end/models/trace/extras/TraceTree.ts +1 -1
- package/front_end/models/trace/handlers/FramesHandler.ts +7 -5
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +13 -7
- package/front_end/models/trace/handlers/MetaHandler.ts +16 -14
- package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +20 -8
- package/front_end/models/trace/handlers/helpers.ts +1 -1
- package/front_end/models/trace/handlers/types.ts +23 -19
- package/front_end/models/trace/helpers/Timing.ts +4 -2
- package/front_end/models/trace/helpers/Trace.ts +8 -4
- package/front_end/models/trace/insights/DocumentLatency.ts +1 -1
- package/front_end/models/trace/insights/INPBreakdown.ts +13 -2
- package/front_end/models/trace/insights/LCPBreakdown.ts +14 -2
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +2 -2
- package/front_end/models/trace/types/File.ts +12 -8
- package/front_end/models/trace/types/Timing.ts +1 -1
- package/front_end/models/trace/types/TraceEvents.ts +37 -23
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +1 -1
- package/front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts +12 -10
- package/front_end/panels/application/KeyValueStorageItemsView.ts +31 -33
- package/front_end/panels/application/components/InterestGroupAccessGrid.ts +6 -11
- package/front_end/panels/application/components/OriginTrialTreeView.ts +7 -5
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -0
- package/front_end/panels/application/components/ReportsGrid.ts +4 -10
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +5 -13
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +3 -7
- package/front_end/panels/application/preloading/components/PreloadingString.ts +2 -2
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +3 -10
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +4 -2
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +7 -5
- package/front_end/panels/changes/ChangesSidebar.ts +105 -96
- package/front_end/panels/changes/ChangesView.ts +69 -69
- package/front_end/panels/changes/CombinedDiffView.ts +1 -1
- package/front_end/panels/changes/changesSidebar.css +3 -0
- package/front_end/panels/changes/changesView.css +4 -0
- package/front_end/panels/console/ConsoleView.ts +2 -2
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +22 -35
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
- package/front_end/panels/elements/ElementStatePaneWidget.ts +12 -0
- package/front_end/panels/elements/ElementsTreeElement.ts +9 -5
- package/front_end/panels/elements/ElementsTreeOutline.ts +11 -8
- package/front_end/panels/elements/PropertyRenderer.ts +19 -15
- package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -4
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -2
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +4 -2
- package/front_end/panels/elements/components/AdornerManager.ts +5 -3
- package/front_end/panels/lighthouse/LighthouseController.ts +5 -0
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +43 -46
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +260 -157
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +28 -21
- package/front_end/panels/media/PlayerPropertiesView.ts +1 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +2 -44
- package/front_end/panels/network/NetworkLogView.ts +6 -4
- package/front_end/panels/network/RequestPreviewView.ts +0 -7
- package/front_end/panels/network/components/RequestHeadersView.ts +0 -6
- package/front_end/panels/network/components/components.ts +0 -2
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +4 -2
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +12 -19
- package/front_end/panels/search/SearchResultsPane.ts +2 -3
- package/front_end/panels/security/IPProtectionView.ts +1 -1
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +4 -0
- package/front_end/panels/settings/emulation/utils/StructuredHeaders.ts +45 -37
- package/front_end/panels/sources/BreakpointsViewUtils.ts +11 -9
- package/front_end/panels/sources/DebuggerPlugin.ts +8 -4
- package/front_end/panels/sources/SourcesPanel.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -1
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +4 -2
- package/front_end/panels/timeline/CountersGraph.ts +12 -5
- package/front_end/panels/timeline/EasterEgg.d.ts +5 -3
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +8 -6
- package/front_end/panels/timeline/ModificationsManager.ts +5 -3
- package/front_end/panels/timeline/ThreadAppender.ts +7 -5
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +10 -8
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelinePanel.ts +10 -8
- package/front_end/panels/timeline/TimelineSelection.ts +4 -2
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -3
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +6 -4
- package/front_end/panels/timeline/components/Utils.ts +1 -1
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +5 -3
- package/front_end/panels/timeline/utils/Helpers.ts +1 -1
- package/front_end/panels/utils/utils.ts +1 -7
- package/front_end/services/trace_bounds/TraceBounds.ts +4 -2
- package/front_end/services/tracing/PerformanceTracing.ts +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
- package/front_end/third_party/codemirror.next/package.json +3 -2
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.js +8 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +28 -30
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js +27 -29
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +34 -38
- 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 +34 -38
- 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 +8 -1
- 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 +12 -14
- 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 +92 -108
- 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 +33 -39
- 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/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +5 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts +4 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +14 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.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 +12 -6
- 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/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js +24 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
- 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/PredefinedNetworkConditions.d.ts +13 -22
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.js +13 -22
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts +6 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.js +6 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.js.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 +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 +6 -3
- 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/node/PuppeteerNode.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js +5 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.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 +188 -224
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +140 -166
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.js +8 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +28 -30
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js +27 -29
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +34 -38
- 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 +34 -38
- 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 +8 -1
- 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 +12 -14
- 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 +92 -108
- 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 +33 -39
- 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/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +5 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts +4 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +15 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.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 +12 -6
- 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/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js +24 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.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/PredefinedNetworkConditions.d.ts +13 -22
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.js +13 -22
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts +6 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.js +6 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.js.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 +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 +6 -3
- 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/node/PuppeteerNode.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js +5 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.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 +188 -224
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/third_party/puppeteer/package/src/api/Dialog.ts +8 -10
- package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +27 -29
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +34 -38
- package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +17 -14
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +92 -108
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +5 -3
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +5 -1
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +28 -3
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +16 -7
- package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +28 -2
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/cdp/PredefinedNetworkConditions.ts +13 -22
- package/front_end/third_party/puppeteer/package/src/common/Device.ts +6 -8
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +6 -3
- package/front_end/third_party/puppeteer/package/src/node/PuppeteerNode.ts +5 -7
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/ui/components/chrome_link/ChromeLink.ts +4 -2
- package/front_end/ui/components/dialogs/Dialog.ts +13 -9
- package/front_end/ui/components/docs/linear_memory_inspector/basic.ts +21 -9
- package/front_end/ui/components/highlighting/HighlightElement.ts +77 -0
- package/front_end/ui/components/highlighting/HighlightManager.ts +58 -1
- package/front_end/ui/components/highlighting/highlighting.ts +2 -0
- package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +5 -3
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +5 -3
- package/front_end/ui/components/menus/SelectMenu.ts +6 -4
- package/front_end/ui/components/survey_link/SurveyLink.ts +4 -2
- package/front_end/ui/components/text_editor/config.ts +10 -6
- package/front_end/ui/components/text_editor/javascript.ts +8 -4
- package/front_end/ui/components/tooltips/Tooltip.ts +22 -5
- package/front_end/ui/legacy/ForwardedInputEventHandler.ts +4 -2
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/SettingsUI.ts +1 -5
- package/front_end/ui/legacy/Treeoutline.ts +12 -33
- package/front_end/ui/legacy/UIUtils.ts +19 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +12 -10
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +30 -32
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +25 -25
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +5 -0
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +4 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +4 -2
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +8 -6
- package/front_end/ui/legacy/components/perf_ui/PieChart.ts +6 -4
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -3
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +18 -20
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +22 -16
- package/front_end/ui/legacy/components/source_frame/xmlView.css +0 -2
- package/front_end/ui/legacy/components/utils/Linkifier.ts +6 -4
- package/front_end/ui/visual_logging/Debugging.ts +10 -6
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -3
- package/inspector_overlay/common.ts +5 -3
- package/inspector_overlay/highlight_grid_common.ts +1 -1
- package/package.json +1 -1
- package/front_end/Images/src/bundle.svg +0 -3
- package/front_end/panels/network/components/WebBundleInfoView.css +0 -27
- package/front_end/panels/network/components/WebBundleInfoView.ts +0 -95
|
@@ -54,7 +54,7 @@ export interface PreloadingGridRow {
|
|
|
54
54
|
ruleSets: Protocol.Preload.RuleSet[];
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
/** Grid component to show prerendering attempts. **/
|
|
58
58
|
export class PreloadingGrid extends LegacyWrapper.LegacyWrapper.WrappableComponent<UI.Widget.VBox> {
|
|
59
59
|
|
|
60
60
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
@@ -81,7 +81,7 @@ export class PreloadingGrid extends LegacyWrapper.LegacyWrapper.WrappableCompone
|
|
|
81
81
|
render(html`
|
|
82
82
|
<style>${preloadingGridStyles}</style>
|
|
83
83
|
<div class="preloading-container">
|
|
84
|
-
<devtools-data-grid striped
|
|
84
|
+
<devtools-data-grid striped>
|
|
85
85
|
<table>
|
|
86
86
|
<tr>
|
|
87
87
|
<th id="url" weight="40" sortable>${i18n.i18n.lockedString('URL')}</th>
|
|
@@ -97,7 +97,7 @@ export class PreloadingGrid extends LegacyWrapper.LegacyWrapper.WrappableCompone
|
|
|
97
97
|
(prerenderStatus === PreloadingStatus.FAILURE &&
|
|
98
98
|
(prefetchStatus === PreloadingStatus.READY || prefetchStatus === PreloadingStatus.SUCCESS));
|
|
99
99
|
const hasError = row.pipeline.getOriginallyTriggered().status === PreloadingStatus.FAILURE;
|
|
100
|
-
return html`<tr
|
|
100
|
+
return html`<tr @select=${() => this.dispatchEvent(new CustomEvent('select', {detail: row.id}))}>
|
|
101
101
|
<td title=${attempt.key.url}>${this.#urlShort(row, securityOrigin)}</td>
|
|
102
102
|
<td>${capitalizedAction(attempt.action)}</td>
|
|
103
103
|
<td>${row.ruleSets.length === 0 ? '' : ruleSetTagOrLocationShort(row.ruleSets[0], pageURL)}</td>
|
|
@@ -125,10 +125,6 @@ export class PreloadingGrid extends LegacyWrapper.LegacyWrapper.WrappableCompone
|
|
|
125
125
|
// clang-format on
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
#onPreloadingGridCellFocused(event: CustomEvent<HTMLElement>): void {
|
|
129
|
-
this.dispatchEvent(new CustomEvent('select', {detail: event.detail.dataset.id}));
|
|
130
|
-
}
|
|
131
|
-
|
|
132
128
|
// Shorten URL if a preloading attempt is same-origin.
|
|
133
129
|
#urlShort(row: PreloadingGridRow, securityOrigin: string|null): string {
|
|
134
130
|
const url = row.pipeline.getOriginallyTriggered().key.url;
|
|
@@ -445,7 +445,7 @@ export const PrefetchReasonDescription: Record<string, {name: () => Platform.UIS
|
|
|
445
445
|
PrefetchEvictedAfterBrowsingDataRemoved: {name: i18nLazyString(UIStrings.PrefetchEvictedAfterBrowsingDataRemoved)},
|
|
446
446
|
};
|
|
447
447
|
|
|
448
|
-
|
|
448
|
+
/** Decoding PrefetchFinalStatus prefetchAttempt to failure description. **/
|
|
449
449
|
export function prefetchFailureReason({prefetchStatus}: SDK.PreloadingModel.PrefetchAttempt): string|null {
|
|
450
450
|
// If you face an error on rolling CDP changes, see
|
|
451
451
|
// https://docs.google.com/document/d/1PnrfowsZMt62PX1EvvTp2Nqs3ji1zrklrAEe1JYbkTk
|
|
@@ -534,7 +534,7 @@ export function prefetchFailureReason({prefetchStatus}: SDK.PreloadingModel.Pref
|
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
|
|
537
|
-
|
|
537
|
+
/** Detailed failure reason for PrerenderFinalStatus. **/
|
|
538
538
|
export function prerenderFailureReason(attempt: SDK.PreloadingModel.PrerenderAttempt): string|null {
|
|
539
539
|
// If you face an error on rolling CDP changes, see
|
|
540
540
|
// https://docs.google.com/document/d/1PnrfowsZMt62PX1EvvTp2Nqs3ji1zrklrAEe1JYbkTk
|
|
@@ -63,7 +63,7 @@ export interface RuleSetGridRow {
|
|
|
63
63
|
preloadsStatusSummary: string;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
/** Grid component to show SpeculationRules rule sets. **/
|
|
67
67
|
export class RuleSetGrid extends LegacyWrapper.LegacyWrapper.WrappableComponent<UI.Widget.VBox> {
|
|
68
68
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
69
69
|
#data: RuleSetGridData|null = null;
|
|
@@ -128,7 +128,7 @@ export class RuleSetGrid extends LegacyWrapper.LegacyWrapper.WrappableComponent<
|
|
|
128
128
|
Lit.render(html`
|
|
129
129
|
<style>${ruleSetGridStyles}</style>
|
|
130
130
|
<div class="ruleset-container" jslog=${VisualLogging.pane('preloading-rules')}>
|
|
131
|
-
<devtools-data-grid striped
|
|
131
|
+
<devtools-data-grid striped>
|
|
132
132
|
<table>
|
|
133
133
|
<tr>
|
|
134
134
|
<th id="rule-set" weight="20" sortable>
|
|
@@ -143,7 +143,7 @@ export class RuleSetGrid extends LegacyWrapper.LegacyWrapper.WrappableComponent<
|
|
|
143
143
|
const revealInElements = ruleSet.backendNodeId !== undefined;
|
|
144
144
|
const revealInNetwork = ruleSet.url !== undefined && ruleSet.requestId;
|
|
145
145
|
return html`
|
|
146
|
-
<tr
|
|
146
|
+
<tr @select=${() => this.dispatchEvent(new CustomEvent('select', {detail: ruleSet.id}))}>
|
|
147
147
|
<td>
|
|
148
148
|
${revealInElements || revealInNetwork ? html`
|
|
149
149
|
<button class="link" role="link"
|
|
@@ -204,13 +204,6 @@ export class RuleSetGrid extends LegacyWrapper.LegacyWrapper.WrappableComponent<
|
|
|
204
204
|
`, this.#shadow, {host: this});
|
|
205
205
|
// clang-format on
|
|
206
206
|
}
|
|
207
|
-
|
|
208
|
-
#onRowSelected(event: CustomEvent<HTMLElement>): void {
|
|
209
|
-
const ruleSetId = event.detail.dataset.id;
|
|
210
|
-
if (ruleSetId !== undefined) {
|
|
211
|
-
this.dispatchEvent(new CustomEvent('select', {detail: ruleSetId}));
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
207
|
}
|
|
215
208
|
|
|
216
209
|
customElements.define('devtools-resources-ruleset-grid', RuleSetGrid);
|
|
@@ -138,8 +138,10 @@ export const enum UsedKind {
|
|
|
138
138
|
NO_PRELOADS = 'NoPreloads',
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
/**
|
|
142
|
+
* TODO(kenoss): Rename this class and file once https://crrev.com/c/4933567 landed.
|
|
143
|
+
* This also shows summary of speculations initiated by this page.
|
|
144
|
+
**/
|
|
143
145
|
export class UsedPreloadingView extends LegacyWrapper.LegacyWrapper.WrappableComponent<UI.Widget.VBox> {
|
|
144
146
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
145
147
|
#data: UsedPreloadingViewData = {
|
|
@@ -101,11 +101,13 @@ function maybeRetrieveContextTypes<T = unknown>(
|
|
|
101
101
|
|
|
102
102
|
let loadedSourcesModule: (typeof Sources|undefined);
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
/**
|
|
105
|
+
* The sources module is imported here because the view with id `navigator-network`
|
|
106
|
+
* is implemented by `NetworkNavigatorView` in sources. It cannot be registered
|
|
107
|
+
* in the sources module as it belongs to the shell app and thus all apps
|
|
108
|
+
* that extend from shell will have such view registered. This would cause a
|
|
109
|
+
* collision with node_app as a separate view with the same id is registered in it.
|
|
110
|
+
**/
|
|
109
111
|
async function loadSourcesModule(): Promise<typeof Sources> {
|
|
110
112
|
if (!loadedSourcesModule) {
|
|
111
113
|
loadedSourcesModule = await import('../sources/sources.js');
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
// Copyright 2017 The Chromium Authors
|
|
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
|
-
/* eslint-disable rulesdir/no-imperative-dom-api */
|
|
5
4
|
|
|
6
5
|
import * as Common from '../../core/common/common.js';
|
|
7
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
7
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
9
8
|
import * as WorkspaceDiff from '../../models/workspace_diff/workspace_diff.js';
|
|
10
|
-
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
|
11
9
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
10
|
+
import * as Lit from '../../ui/lit/lit.js';
|
|
12
11
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
13
12
|
import * as Snippets from '../snippets/snippets.js';
|
|
14
13
|
|
|
@@ -23,75 +22,129 @@ const UIStrings = {
|
|
|
23
22
|
} as const;
|
|
24
23
|
const str_ = i18n.i18n.registerUIStrings('panels/changes/ChangesSidebar.ts', UIStrings);
|
|
25
24
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
25
|
+
const {render, html, Directives: {ref}} = Lit;
|
|
26
|
+
interface ViewInput {
|
|
27
|
+
selectedSourceCode: Workspace.UISourceCode.UISourceCode|null;
|
|
28
|
+
onSelect: (uiSourceCode: Workspace.UISourceCode.UISourceCode|null) => void;
|
|
29
|
+
sourceCodes: Set<Workspace.UISourceCode.UISourceCode>;
|
|
30
|
+
}
|
|
31
|
+
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
32
|
+
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
33
|
+
const tooltip = (uiSourceCode: Workspace.UISourceCode.UISourceCode): string =>
|
|
34
|
+
uiSourceCode.contentType().isFromSourceMap() ?
|
|
35
|
+
i18nString(UIStrings.sFromSourceMap, {PH1: uiSourceCode.displayName()}) :
|
|
36
|
+
uiSourceCode.url();
|
|
37
|
+
const icon = (uiSourceCode: Workspace.UISourceCode.UISourceCode): string =>
|
|
38
|
+
Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(uiSourceCode) ? 'snippet' : 'document';
|
|
39
|
+
const configElements = new WeakMap<HTMLLIElement, Workspace.UISourceCode.UISourceCode>();
|
|
40
|
+
const onSelect = (e: UI.TreeOutline.TreeViewElement.SelectEvent): void =>
|
|
41
|
+
input.onSelect(configElements.get(e.detail) ?? null);
|
|
42
|
+
render(
|
|
43
|
+
// clang-format off
|
|
44
|
+
html`<devtools-tree
|
|
45
|
+
@selected=${onSelect}
|
|
46
|
+
navigation-variant
|
|
47
|
+
hide-overflow .template=${html`
|
|
48
|
+
<ul role="tree">
|
|
49
|
+
${input.sourceCodes.values().map(uiSourceCode => html`
|
|
50
|
+
<li
|
|
51
|
+
role="treeitem"
|
|
52
|
+
${ref(e => e instanceof HTMLLIElement && configElements.set(e, uiSourceCode))}
|
|
53
|
+
?selected=${uiSourceCode === input.selectedSourceCode}>
|
|
54
|
+
<style>${changesSidebarStyles}</style>
|
|
55
|
+
<div class=${'navigator-' + uiSourceCode.contentType().name() + '-tree-item'}>
|
|
56
|
+
<devtools-icon name=${icon(uiSourceCode)}></devtools-icon>
|
|
57
|
+
<span title=${tooltip(uiSourceCode)}>
|
|
58
|
+
<span ?hidden=${!uiSourceCode.isDirty()}>*</span>
|
|
59
|
+
${uiSourceCode.displayName()}
|
|
60
|
+
</span>
|
|
61
|
+
</div>
|
|
62
|
+
</li>`)}
|
|
63
|
+
</ul>`}></devtools-tree>`,
|
|
64
|
+
// clang-format on
|
|
65
|
+
target);
|
|
66
|
+
};
|
|
26
67
|
|
|
27
68
|
export class ChangesSidebar extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.Widget>(
|
|
28
69
|
UI.Widget.Widget) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
this
|
|
36
|
-
|
|
37
|
-
this.treeoutline.setFocusable(false);
|
|
38
|
-
this.treeoutline.setHideOverflow(true);
|
|
39
|
-
this.treeoutline.addEventListener(UI.TreeOutline.Events.ElementSelected, this.selectionChanged, this);
|
|
40
|
-
UI.ARIAUtils.markAsTablist(this.treeoutline.contentElement);
|
|
41
|
-
|
|
42
|
-
this.element.appendChild(this.treeoutline.element);
|
|
70
|
+
#workspaceDiff: WorkspaceDiff.WorkspaceDiff.WorkspaceDiffImpl|null = null;
|
|
71
|
+
readonly #view: View;
|
|
72
|
+
readonly #sourceCodes = new Set<Workspace.UISourceCode.UISourceCode>();
|
|
73
|
+
#selectedUISourceCode: Workspace.UISourceCode.UISourceCode|null = null;
|
|
74
|
+
constructor(target?: HTMLElement, view = DEFAULT_VIEW) {
|
|
75
|
+
super(target, {jslog: `${VisualLogging.pane('sidebar').track({resize: true})}`});
|
|
76
|
+
this.#view = view;
|
|
77
|
+
}
|
|
43
78
|
|
|
44
|
-
|
|
45
|
-
this
|
|
46
|
-
|
|
47
|
-
|
|
79
|
+
set workspaceDiff(workspaceDiff: WorkspaceDiff.WorkspaceDiff.WorkspaceDiffImpl) {
|
|
80
|
+
if (this.#workspaceDiff) {
|
|
81
|
+
this.#workspaceDiff.modifiedUISourceCodes().forEach(this.#removeUISourceCode.bind(this));
|
|
82
|
+
this.#workspaceDiff.removeEventListener(
|
|
83
|
+
WorkspaceDiff.WorkspaceDiff.Events.MODIFIED_STATUS_CHANGED, this.uiSourceCodeModifiedStatusChanged, this);
|
|
84
|
+
}
|
|
85
|
+
this.#workspaceDiff = workspaceDiff;
|
|
86
|
+
this.#workspaceDiff.modifiedUISourceCodes().forEach(this.#addUISourceCode.bind(this));
|
|
87
|
+
this.#workspaceDiff.addEventListener(
|
|
48
88
|
WorkspaceDiff.WorkspaceDiff.Events.MODIFIED_STATUS_CHANGED, this.uiSourceCodeModifiedStatusChanged, this);
|
|
89
|
+
this.requestUpdate();
|
|
49
90
|
}
|
|
50
91
|
|
|
51
92
|
selectedUISourceCode(): Workspace.UISourceCode.UISourceCode|null {
|
|
52
|
-
|
|
53
|
-
|
|
93
|
+
return this.#selectedUISourceCode;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
override performUpdate(): void {
|
|
97
|
+
const input: ViewInput = {
|
|
98
|
+
onSelect: uiSourceCode => this.#selectionChanged(uiSourceCode),
|
|
99
|
+
sourceCodes: this.#sourceCodes,
|
|
100
|
+
selectedSourceCode: this.#selectedUISourceCode
|
|
101
|
+
};
|
|
102
|
+
this.#view(input, {}, this.contentElement);
|
|
54
103
|
}
|
|
55
104
|
|
|
56
|
-
|
|
105
|
+
#selectionChanged(selectedUISourceCode: Workspace.UISourceCode.UISourceCode|null): void {
|
|
106
|
+
this.#selectedUISourceCode = selectedUISourceCode;
|
|
57
107
|
this.dispatchEventToListeners(Events.SELECTED_UI_SOURCE_CODE_CHANGED);
|
|
108
|
+
this.requestUpdate();
|
|
58
109
|
}
|
|
59
110
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
111
|
+
#addUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {
|
|
112
|
+
this.#sourceCodes.add(uiSourceCode);
|
|
113
|
+
uiSourceCode.addEventListener(Workspace.UISourceCode.Events.TitleChanged, this.requestUpdate, this);
|
|
114
|
+
uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyChanged, this.requestUpdate, this);
|
|
115
|
+
uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyCommitted, this.requestUpdate, this);
|
|
116
|
+
this.requestUpdate();
|
|
67
117
|
}
|
|
68
118
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
this.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
119
|
+
#removeUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {
|
|
120
|
+
uiSourceCode.removeEventListener(Workspace.UISourceCode.Events.TitleChanged, this.requestUpdate, this);
|
|
121
|
+
uiSourceCode.removeEventListener(Workspace.UISourceCode.Events.WorkingCopyChanged, this.requestUpdate, this);
|
|
122
|
+
uiSourceCode.removeEventListener(Workspace.UISourceCode.Events.WorkingCopyCommitted, this.requestUpdate, this);
|
|
123
|
+
if (uiSourceCode === this.#selectedUISourceCode) {
|
|
124
|
+
let newSelection;
|
|
125
|
+
for (const sourceCode of this.#sourceCodes.values()) {
|
|
126
|
+
if (sourceCode === uiSourceCode) {
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
newSelection = sourceCode;
|
|
79
130
|
}
|
|
131
|
+
this.#sourceCodes.delete(uiSourceCode);
|
|
132
|
+
this.#selectionChanged(newSelection ?? this.#sourceCodes.values().next().value ?? null);
|
|
133
|
+
} else {
|
|
134
|
+
this.#sourceCodes.delete(uiSourceCode);
|
|
80
135
|
}
|
|
81
|
-
|
|
82
|
-
this.treeoutline.removeChild(treeElement);
|
|
83
|
-
treeElement.dispose();
|
|
84
|
-
}
|
|
85
|
-
if (this.treeoutline.rootElement().childCount() === 0) {
|
|
86
|
-
this.treeoutline.setFocusable(false);
|
|
87
|
-
}
|
|
136
|
+
this.requestUpdate();
|
|
88
137
|
}
|
|
89
138
|
|
|
90
|
-
private
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
139
|
+
private uiSourceCodeModifiedStatusChanged(
|
|
140
|
+
event: Common.EventTarget.EventTargetEvent<WorkspaceDiff.WorkspaceDiff.ModifiedStatusChangedEvent>): void {
|
|
141
|
+
const {isModified, uiSourceCode} = event.data;
|
|
142
|
+
if (isModified) {
|
|
143
|
+
this.#addUISourceCode(uiSourceCode);
|
|
144
|
+
} else {
|
|
145
|
+
this.#removeUISourceCode(uiSourceCode);
|
|
146
|
+
}
|
|
147
|
+
this.requestUpdate();
|
|
95
148
|
}
|
|
96
149
|
}
|
|
97
150
|
|
|
@@ -102,47 +155,3 @@ export const enum Events {
|
|
|
102
155
|
export interface EventTypes {
|
|
103
156
|
[Events.SELECTED_UI_SOURCE_CODE_CHANGED]: void;
|
|
104
157
|
}
|
|
105
|
-
|
|
106
|
-
export class UISourceCodeTreeElement extends UI.TreeOutline.TreeElement {
|
|
107
|
-
uiSourceCode: Workspace.UISourceCode.UISourceCode;
|
|
108
|
-
private readonly eventListeners: Common.EventTarget.EventDescriptor[];
|
|
109
|
-
constructor(uiSourceCode: Workspace.UISourceCode.UISourceCode) {
|
|
110
|
-
super();
|
|
111
|
-
this.uiSourceCode = uiSourceCode;
|
|
112
|
-
this.listItemElement.classList.add('navigator-' + uiSourceCode.contentType().name() + '-tree-item');
|
|
113
|
-
UI.ARIAUtils.markAsTab(this.listItemElement);
|
|
114
|
-
|
|
115
|
-
let iconName: 'document'|'snippet' = 'document';
|
|
116
|
-
if (Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(this.uiSourceCode)) {
|
|
117
|
-
iconName = 'snippet';
|
|
118
|
-
}
|
|
119
|
-
const defaultIcon = IconButton.Icon.create(iconName);
|
|
120
|
-
this.setLeadingIcons([defaultIcon]);
|
|
121
|
-
|
|
122
|
-
this.eventListeners = [
|
|
123
|
-
uiSourceCode.addEventListener(Workspace.UISourceCode.Events.TitleChanged, this.updateTitle, this),
|
|
124
|
-
uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyChanged, this.updateTitle, this),
|
|
125
|
-
uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyCommitted, this.updateTitle, this),
|
|
126
|
-
];
|
|
127
|
-
|
|
128
|
-
this.updateTitle();
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
private updateTitle(): void {
|
|
132
|
-
let titleText: string = this.uiSourceCode.displayName();
|
|
133
|
-
if (this.uiSourceCode.isDirty()) {
|
|
134
|
-
titleText = '*' + titleText;
|
|
135
|
-
}
|
|
136
|
-
this.title = titleText;
|
|
137
|
-
|
|
138
|
-
let tooltip: Common.UIString.LocalizedString|string = this.uiSourceCode.url();
|
|
139
|
-
if (this.uiSourceCode.contentType().isFromSourceMap()) {
|
|
140
|
-
tooltip = i18nString(UIStrings.sFromSourceMap, {PH1: this.uiSourceCode.displayName()});
|
|
141
|
-
}
|
|
142
|
-
this.tooltip = tooltip;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
dispose(): void {
|
|
146
|
-
Common.EventTarget.removeEventListeners(this.eventListeners);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Copyright 2017 The Chromium Authors
|
|
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
|
-
/* eslint-disable rulesdir/no-imperative-dom-api */
|
|
5
4
|
|
|
6
5
|
import '../../ui/legacy/legacy.js';
|
|
7
6
|
|
|
@@ -10,6 +9,7 @@ import type * as Platform from '../../core/platform/platform.js';
|
|
|
10
9
|
import type * as Workspace from '../../models/workspace/workspace.js';
|
|
11
10
|
import * as WorkspaceDiff from '../../models/workspace_diff/workspace_diff.js';
|
|
12
11
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
12
|
+
import * as Lit from '../../ui/lit/lit.js';
|
|
13
13
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
14
14
|
|
|
15
15
|
import {ChangesSidebar, Events} from './ChangesSidebar.js';
|
|
@@ -30,93 +30,93 @@ const UIStrings = {
|
|
|
30
30
|
} as const;
|
|
31
31
|
const str_ = i18n.i18n.registerUIStrings('panels/changes/ChangesView.ts', UIStrings);
|
|
32
32
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
33
|
+
const {render, html} = Lit;
|
|
34
|
+
interface ViewInput {
|
|
35
|
+
selectedSourceCode: Workspace.UISourceCode.UISourceCode|null;
|
|
36
|
+
onSelect(sourceCode: Workspace.UISourceCode.UISourceCode|null): void;
|
|
37
|
+
workspaceDiff: WorkspaceDiff.WorkspaceDiff.WorkspaceDiffImpl;
|
|
38
|
+
}
|
|
39
|
+
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
40
|
+
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
41
|
+
const onSidebar = (sidebar: ChangesSidebar): void => {
|
|
42
|
+
sidebar.addEventListener(
|
|
43
|
+
Events.SELECTED_UI_SOURCE_CODE_CHANGED, () => input.onSelect(sidebar.selectedUISourceCode()));
|
|
44
|
+
};
|
|
45
|
+
render(
|
|
46
|
+
// clang-format off
|
|
47
|
+
html`
|
|
48
|
+
<style>${changesViewStyles}</style>
|
|
49
|
+
<devtools-split-view direction=column>
|
|
50
|
+
<div class=vbox slot="main">
|
|
51
|
+
<devtools-widget
|
|
52
|
+
?hidden=${input.workspaceDiff.modifiedUISourceCodes().length > 0}
|
|
53
|
+
.widgetConfig=${UI.Widget.widgetConfig(UI.EmptyWidget.EmptyWidget, {
|
|
54
|
+
header: i18nString(UIStrings.noChanges),
|
|
55
|
+
text: i18nString(UIStrings.changesViewDescription),
|
|
56
|
+
link: CHANGES_VIEW_URL,
|
|
57
|
+
})}>
|
|
58
|
+
</devtools-widget>
|
|
59
|
+
<div class=diff-container role=tabpanel ?hidden=${input.workspaceDiff.modifiedUISourceCodes().length === 0}>
|
|
60
|
+
<devtools-widget .widgetConfig=${UI.Widget.widgetConfig(CombinedDiffView.CombinedDiffView, {
|
|
61
|
+
selectedFileUrl: input.selectedSourceCode?.url(),
|
|
62
|
+
workspaceDiff: input.workspaceDiff
|
|
63
|
+
})}></devtools-widget>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
<devtools-widget
|
|
67
|
+
slot="sidebar"
|
|
68
|
+
.widgetConfig=${UI.Widget.widgetConfig(ChangesSidebar, {
|
|
69
|
+
workspaceDiff: input.workspaceDiff
|
|
70
|
+
})}
|
|
71
|
+
${UI.Widget.widgetRef(ChangesSidebar, onSidebar)}>
|
|
72
|
+
</devtools-widget>
|
|
73
|
+
</devtools-split-view>`,
|
|
74
|
+
// clang-format on
|
|
75
|
+
target);
|
|
76
|
+
};
|
|
33
77
|
|
|
34
78
|
export class ChangesView extends UI.Widget.VBox {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
readonly
|
|
38
|
-
private selectedUISourceCode: Workspace.UISourceCode.UISourceCode|null;
|
|
39
|
-
private readonly diffContainer: HTMLElement;
|
|
40
|
-
private readonly combinedDiffView: CombinedDiffView.CombinedDiffView;
|
|
79
|
+
readonly #workspaceDiff: WorkspaceDiff.WorkspaceDiff.WorkspaceDiffImpl;
|
|
80
|
+
#selectedUISourceCode: Workspace.UISourceCode.UISourceCode|null = null;
|
|
81
|
+
readonly #view: View;
|
|
41
82
|
|
|
42
|
-
constructor() {
|
|
43
|
-
super({
|
|
83
|
+
constructor(target?: HTMLElement, view = DEFAULT_VIEW) {
|
|
84
|
+
super(target, {
|
|
44
85
|
jslog: `${VisualLogging.panel('changes').track({resize: true})}`,
|
|
45
86
|
useShadowDom: true,
|
|
46
87
|
});
|
|
47
|
-
this.registerRequiredCSS(changesViewStyles);
|
|
48
|
-
|
|
49
|
-
const splitWidget = new UI.SplitWidget.SplitWidget(true /* vertical */, false /* sidebar on left */);
|
|
50
|
-
const mainWidget = new UI.Widget.VBox();
|
|
51
|
-
splitWidget.setMainWidget(mainWidget);
|
|
52
|
-
splitWidget.show(this.contentElement);
|
|
53
|
-
|
|
54
|
-
this.emptyWidget = new UI.EmptyWidget.EmptyWidget('', '');
|
|
55
|
-
this.emptyWidget.show(mainWidget.element);
|
|
56
|
-
|
|
57
|
-
this.workspaceDiff = WorkspaceDiff.WorkspaceDiff.workspaceDiff();
|
|
58
|
-
this.changesSidebar = new ChangesSidebar(this.workspaceDiff);
|
|
59
|
-
this.changesSidebar.addEventListener(
|
|
60
|
-
Events.SELECTED_UI_SOURCE_CODE_CHANGED, this.selectedUISourceCodeChanged, this);
|
|
61
|
-
splitWidget.setSidebarWidget(this.changesSidebar);
|
|
62
88
|
|
|
63
|
-
this
|
|
89
|
+
this.#workspaceDiff = WorkspaceDiff.WorkspaceDiff.workspaceDiff();
|
|
90
|
+
this.#view = view;
|
|
64
91
|
|
|
65
|
-
this.
|
|
66
|
-
UI.ARIAUtils.markAsTabpanel(this.diffContainer);
|
|
67
|
-
this.combinedDiffView = new CombinedDiffView.CombinedDiffView();
|
|
68
|
-
this.combinedDiffView.workspaceDiff = this.workspaceDiff;
|
|
69
|
-
this.combinedDiffView.show(this.diffContainer);
|
|
70
|
-
|
|
71
|
-
this.hideDiff();
|
|
72
|
-
this.selectedUISourceCodeChanged();
|
|
92
|
+
this.requestUpdate();
|
|
73
93
|
}
|
|
74
94
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (!selectedUISourceCode || this.selectedUISourceCode === selectedUISourceCode) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
this.selectedUISourceCode = selectedUISourceCode;
|
|
91
|
-
this.combinedDiffView.selectedFileUrl = selectedUISourceCode.url();
|
|
95
|
+
override performUpdate(): void {
|
|
96
|
+
this.#view(
|
|
97
|
+
{
|
|
98
|
+
workspaceDiff: this.#workspaceDiff,
|
|
99
|
+
selectedSourceCode: this.#selectedUISourceCode,
|
|
100
|
+
onSelect: sourceCode => {
|
|
101
|
+
this.#selectedUISourceCode = sourceCode;
|
|
102
|
+
this.requestUpdate();
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
{}, this.contentElement);
|
|
92
106
|
}
|
|
93
107
|
|
|
94
108
|
override wasShown(): void {
|
|
95
109
|
UI.Context.Context.instance().setFlavor(ChangesView, this);
|
|
96
110
|
super.wasShown();
|
|
97
|
-
this.
|
|
98
|
-
this
|
|
99
|
-
WorkspaceDiff.WorkspaceDiff.Events.MODIFIED_STATUS_CHANGED, this.
|
|
111
|
+
this.requestUpdate();
|
|
112
|
+
this.#workspaceDiff.addEventListener(
|
|
113
|
+
WorkspaceDiff.WorkspaceDiff.Events.MODIFIED_STATUS_CHANGED, this.requestUpdate, this);
|
|
100
114
|
}
|
|
101
115
|
|
|
102
116
|
override willHide(): void {
|
|
103
117
|
super.willHide();
|
|
104
118
|
UI.Context.Context.instance().setFlavor(ChangesView, null);
|
|
105
|
-
this
|
|
106
|
-
WorkspaceDiff.WorkspaceDiff.Events.MODIFIED_STATUS_CHANGED, this.
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
private hideDiff(): void {
|
|
110
|
-
this.diffContainer.style.display = 'none';
|
|
111
|
-
this.emptyWidget.header = i18nString(UIStrings.noChanges);
|
|
112
|
-
this.emptyWidget.text = i18nString(UIStrings.changesViewDescription);
|
|
113
|
-
|
|
114
|
-
this.emptyWidget.link = CHANGES_VIEW_URL;
|
|
115
|
-
this.emptyWidget.showWidget();
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
private showDiff(): void {
|
|
119
|
-
this.emptyWidget.hideWidget();
|
|
120
|
-
this.diffContainer.style.display = 'block';
|
|
119
|
+
this.#workspaceDiff.removeEventListener(
|
|
120
|
+
WorkspaceDiff.WorkspaceDiff.Events.MODIFIED_STATUS_CHANGED, this.requestUpdate, this);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
@@ -149,7 +149,7 @@ export class CombinedDiffView extends UI.Widget.Widget {
|
|
|
149
149
|
void this.#initializeModifiedUISourceCodes();
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
set selectedFileUrl(fileUrl: string) {
|
|
152
|
+
set selectedFileUrl(fileUrl: string|undefined) {
|
|
153
153
|
this.#selectedFileUrl = fileUrl;
|
|
154
154
|
this.requestUpdate();
|
|
155
155
|
void this.updateComplete.then(() => {
|
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
* found in the LICENSE file.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
@scope to (devtools-widget > *) {
|
|
7
8
|
.tree-outline li {
|
|
8
9
|
min-height: 20px;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
devtools-icon {
|
|
12
13
|
color: var(--icon-file-default);
|
|
14
|
+
margin-right: var(--sys-size-4);
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
.navigator-sm-script-tree-item devtools-icon,
|
|
@@ -46,3 +48,4 @@ devtools-icon {
|
|
|
46
48
|
color: ButtonText !important; /* stylelint-disable-line declaration-no-important */
|
|
47
49
|
}
|
|
48
50
|
}
|
|
51
|
+
}
|
|
@@ -976,7 +976,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
976
976
|
this.scheduleViewportRefresh();
|
|
977
977
|
this.consoleMessageAddedForTest(viewMessage);
|
|
978
978
|
|
|
979
|
-
|
|
979
|
+
/** Figure out whether the message should belong into this group or the parent group based on group end timestamp. **/
|
|
980
980
|
function addToGroup(viewMessage: ConsoleViewMessage, currentGroup: ConsoleGroupViewMessage): void {
|
|
981
981
|
const currentEnd = currentGroup.groupEnd();
|
|
982
982
|
if (currentEnd !== null) {
|
|
@@ -1070,7 +1070,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
1070
1070
|
|
|
1071
1071
|
this.messageAppendedForTests();
|
|
1072
1072
|
|
|
1073
|
-
|
|
1073
|
+
/** Show the group the message belongs to, and also show parent groups. **/
|
|
1074
1074
|
function showGroup(currentGroup: ConsoleGroupViewMessage|null, visibleViewMessages: ConsoleViewMessage[]): void {
|
|
1075
1075
|
if (currentGroup === null) {
|
|
1076
1076
|
return;
|