chrome-devtools-frontend 1.0.950971 → 1.0.952403
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/config/gni/devtools_grd_files.gni +6 -3
- package/extension-api/ExtensionAPI.d.ts +1 -1
- package/front_end/.eslintrc.js +6 -0
- package/front_end/Tests.js +10 -0
- package/front_end/core/common/App.ts +0 -3
- package/front_end/core/common/AppProvider.ts +0 -3
- package/front_end/core/common/JavaScriptMetaData.ts +0 -3
- package/front_end/core/common/QueryParamHandler.ts +0 -3
- package/front_end/core/common/Runnable.ts +0 -3
- package/front_end/core/common/SimpleHistoryManager.ts +0 -3
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/i18n/locales/en-US.json +186 -183
- package/front_end/core/i18n/locales/en-XL.json +186 -183
- package/front_end/core/root/Runtime.ts +4 -12
- package/front_end/core/sdk/CSSRule.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +12 -37
- package/front_end/core/sdk/OverlayModel.ts +18 -34
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +0 -12
- package/front_end/core/sdk/PageResourceLoader.ts +2 -1
- package/front_end/core/sdk/RuntimeModel.ts +0 -1
- package/front_end/core/sdk/SourceMap.ts +1 -1
- package/front_end/core/sdk/TracingManager.ts +0 -3
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +39 -39
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +54 -54
- package/front_end/entrypoints/formatter_worker/ESTreeWalker.ts +20 -20
- package/front_end/entrypoints/formatter_worker/FormattedContentBuilder.ts +54 -54
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +145 -144
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +40 -40
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +65 -70
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +203 -204
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +109 -108
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +18 -18
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +30 -30
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +25 -25
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +52 -55
- package/front_end/entrypoints/main/MainImpl.ts +49 -49
- package/front_end/entrypoints/node_app/NodeConnectionsPanel.ts +43 -43
- package/front_end/entrypoints/node_app/NodeMain.ts +38 -38
- package/front_end/generated/InspectorBackendCommands.js +5 -1
- package/front_end/generated/protocol.d.ts +16 -0
- package/front_end/legacy/legacy-defs.d.ts +0 -21
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +0 -3
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +1 -2
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -4
- package/front_end/models/bindings/FileUtils.ts +0 -4
- package/front_end/models/bindings/IgnoreListManager.ts +1 -2
- package/front_end/models/bindings/NetworkProject.ts +1 -2
- package/front_end/models/extensions/ExtensionAPI.ts +2 -2
- package/front_end/models/extensions/ExtensionTraceProvider.ts +0 -3
- package/front_end/models/heap_snapshot_model/HeapSnapshotModel.ts +1 -1
- package/front_end/models/issues_manager/ClientHintIssue.ts +95 -0
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +6 -6
- package/front_end/models/issues_manager/ContrastCheckTrigger.ts +15 -15
- package/front_end/models/issues_manager/CorsIssue.ts +9 -9
- package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +5 -5
- package/front_end/models/issues_manager/DeprecationIssue.ts +7 -7
- package/front_end/models/issues_manager/GenericIssue.ts +5 -5
- package/front_end/models/issues_manager/HeavyAdIssue.ts +5 -5
- package/front_end/models/issues_manager/Issue.ts +10 -10
- package/front_end/models/issues_manager/IssueResolver.ts +11 -10
- package/front_end/models/issues_manager/IssuesManager.ts +61 -56
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +4 -4
- package/front_end/models/issues_manager/MixedContentIssue.ts +7 -7
- package/front_end/models/issues_manager/NavigatorUserAgentIssue.ts +7 -7
- package/front_end/models/issues_manager/QuirksModeIssue.ts +4 -4
- package/front_end/models/issues_manager/SameSiteCookieIssue.ts +17 -18
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +5 -5
- package/front_end/models/issues_manager/SourceFrameIssuesManager.ts +32 -31
- package/front_end/models/issues_manager/TrustedWebActivityIssue.ts +5 -5
- package/front_end/models/issues_manager/WasmCrossOriginModuleSharingIssue.ts +5 -5
- package/front_end/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
- package/front_end/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md +4 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/timeline_model/TimelineModel.ts +1 -1
- package/front_end/models/timeline_model/TracingLayerTree.ts +0 -1
- package/front_end/panels/accessibility/ARIAMetadata.ts +0 -1
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +2 -2
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -2
- package/front_end/panels/animation/AnimationTimeline.ts +0 -1
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +3 -4
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +0 -2
- package/front_end/panels/application/StorageView.ts +2 -6
- package/front_end/panels/application/{BackForwardCacheStrings.ts → components/BackForwardCacheStrings.ts} +2 -2
- package/front_end/panels/application/{BackForwardCacheView.ts → components/BackForwardCacheView.ts} +96 -62
- package/front_end/panels/application/components/EndpointsGrid.ts +12 -12
- package/front_end/panels/application/components/FrameDetailsView.ts +108 -110
- package/front_end/panels/application/components/OriginTrialTreeView.ts +45 -45
- package/front_end/panels/application/components/PermissionsPolicySection.ts +19 -19
- package/front_end/panels/application/components/ReportsGrid.ts +30 -30
- package/front_end/panels/application/components/StackTrace.ts +48 -47
- package/front_end/panels/application/components/TrustTokensView.ts +31 -31
- package/front_end/panels/application/{backForwardCacheView.css → components/backForwardCacheView.css} +9 -0
- package/front_end/panels/application/components/components.ts +2 -0
- package/front_end/panels/console/ConsoleView.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -25
- package/front_end/panels/console/consoleView.css +5 -0
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +41 -52
- package/front_end/panels/css_overview/CSSOverviewController.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +18 -27
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +6 -6
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +4 -4
- package/front_end/panels/elements/ComputedStyleModel.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +1 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +2 -6
- package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +17 -17
- package/front_end/panels/elements/components/AdornerManager.ts +21 -21
- package/front_end/panels/elements/components/AdornerSettingsPane.ts +14 -14
- package/front_end/panels/elements/components/CSSQuery.ts +16 -16
- package/front_end/panels/elements/components/ComputedStyleProperty.ts +14 -14
- package/front_end/panels/elements/components/ComputedStyleTrace.ts +15 -15
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +78 -78
- package/front_end/panels/elements/components/ElementsPanelLink.ts +16 -16
- package/front_end/panels/elements/components/LayoutPane.ts +47 -47
- package/front_end/panels/elements/components/NodeText.ts +18 -18
- package/front_end/panels/elements/components/QueryContainer.ts +40 -40
- package/front_end/panels/elements/components/StylePropertyEditor.ts +18 -18
- package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +4 -4
- package/front_end/panels/event_listeners/EventListenersUtils.ts +2 -1
- package/front_end/panels/issues/AffectedBlockedByResponseView.ts +4 -4
- package/front_end/panels/issues/AffectedCookiesView.ts +4 -5
- package/front_end/panels/issues/AffectedDirectivesView.ts +19 -19
- package/front_end/panels/issues/AffectedDocumentsInQuirksModeView.ts +7 -8
- package/front_end/panels/issues/AffectedElementsView.ts +4 -4
- package/front_end/panels/issues/AffectedElementsWithLowContrastView.ts +7 -8
- package/front_end/panels/issues/AffectedHeavyAdView.ts +8 -8
- package/front_end/panels/issues/AffectedResourcesView.ts +25 -26
- package/front_end/panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts +8 -8
- package/front_end/panels/issues/AffectedSourcesView.ts +4 -4
- package/front_end/panels/issues/AffectedTrustedWebActivityIssueDetailsView.ts +4 -4
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +17 -17
- package/front_end/panels/issues/CSPViolationsListView.ts +22 -23
- package/front_end/panels/issues/CSPViolationsView.ts +17 -17
- package/front_end/panels/issues/ComboBoxOfCheckBoxes.ts +13 -13
- package/front_end/panels/issues/CorsIssueDetailsView.ts +23 -23
- package/front_end/panels/issues/GenericIssueDetailsView.ts +4 -4
- package/front_end/panels/issues/HiddenIssuesRow.ts +7 -7
- package/front_end/panels/issues/IssueAggregator.ts +95 -95
- package/front_end/panels/issues/IssueKindView.ts +14 -14
- package/front_end/panels/issues/IssueView.ts +98 -98
- package/front_end/panels/issues/IssuesPane.ts +102 -102
- package/front_end/panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts +5 -5
- package/front_end/panels/issues/components/HideIssuesMenu.ts +10 -10
- package/front_end/panels/layer_viewer/Layers3DView.ts +3 -9
- package/front_end/panels/lighthouse/LighthouseController.ts +4 -5
- package/front_end/panels/media/PlayerListView.ts +160 -97
- package/front_end/panels/media/PlayerMessagesView.ts +1 -0
- package/front_end/panels/media/TickingFlameChart.ts +1 -2
- package/front_end/panels/media/playerListView.css +58 -0
- package/front_end/panels/network/NetworkLogView.ts +2 -6
- package/front_end/panels/network/NetworkLogViewColumns.ts +1 -1
- package/front_end/panels/network/NetworkWaterfallColumn.ts +2 -4
- package/front_end/panels/network/components/RequestTrustTokensView.ts +40 -40
- package/front_end/panels/network/components/WebBundleInfoView.ts +9 -9
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +92 -37
- package/front_end/panels/performance_monitor/performanceMonitor.css +32 -0
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +0 -1
- package/front_end/panels/profiler/HeapSnapshotView.ts +1 -2
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +2 -2
- package/front_end/panels/search/SearchConfig.ts +0 -6
- package/front_end/panels/security/SecurityModel.ts +2 -4
- package/front_end/panels/security/SecurityPanel.ts +2 -2
- package/front_end/panels/settings/KeybindsSettingsTab.ts +4 -0
- package/front_end/panels/settings/components/SyncSection.ts +14 -14
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +96 -96
- package/front_end/panels/sources/BreakpointEditDialog.ts +4 -3
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +2 -2
- package/front_end/panels/sources/NavigatorView.ts +4 -10
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +2 -3
- package/front_end/panels/sources/SourceMapNamesResolver.ts +3 -3
- package/front_end/panels/sources/SourcesPanel.ts +1 -3
- package/front_end/panels/sources/SourcesView.ts +0 -3
- package/front_end/panels/sources/TabbedEditorContainer.ts +1 -4
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +2 -5
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +0 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -2
- package/front_end/panels/timeline/TimelineLoader.ts +0 -3
- package/front_end/panels/timeline/TimelinePanel.ts +2 -3
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +1 -1
- package/front_end/panels/timeline/components/WebVitalsLane.ts +77 -76
- package/front_end/panels/timeline/components/WebVitalsTimeline.ts +133 -133
- package/front_end/panels/timeline/components/WebVitalsTooltip.ts +9 -9
- package/front_end/panels/webauthn/WebauthnPane.ts +203 -205
- package/front_end/third_party/codemirror.next/bundle.ts +3 -3
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +10 -1
- package/front_end/third_party/codemirror.next/codemirror.next.js +2 -1
- package/front_end/third_party/codemirror.next/package.json +3 -3
- package/front_end/third_party/diff/DiffWrapper.ts +7 -0
- package/front_end/third_party/puppeteer/package/README.md +11 -11
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts +9 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js +21 -12
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EvalTypes.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts +50 -11
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js +70 -33
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts +12 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js +25 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts +2 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts +39 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +36 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts +3 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts +46 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js +124 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts +27 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js +144 -74
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts +5 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js +43 -17
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js +101 -34
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +2 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts +9 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +24 -17
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +7 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +50 -11
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +70 -34
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts +12 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js +26 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +2 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +39 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +38 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts +3 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js +4 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts +46 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js +120 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +27 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +144 -75
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +12 -14
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +5 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js +3 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +10 -12
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +43 -20
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +104 -40
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/web.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +173 -36
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/ui/components/adorners/Adorner.ts +2 -2
- package/front_end/ui/components/buttons/Button.ts +9 -9
- package/front_end/ui/components/data_grid/DataGrid.ts +64 -64
- package/front_end/ui/components/data_grid/DataGridController.ts +22 -22
- package/front_end/ui/components/data_grid/DataGridUtils.ts +3 -0
- package/front_end/ui/components/diff_view/DiffView.ts +6 -6
- package/front_end/ui/components/expandable_list/ExpandableList.ts +5 -5
- package/front_end/ui/components/icon_button/Icon.ts +4 -4
- package/front_end/ui/components/icon_button/IconButton.ts +4 -4
- package/front_end/ui/components/issue_counter/IssueCounter.ts +3 -3
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +11 -11
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +50 -50
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +6 -6
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +4 -4
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +12 -12
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +11 -11
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +40 -39
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +18 -18
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
- package/front_end/ui/components/linkifier/LinkifierImpl.ts +4 -4
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +5 -5
- package/front_end/ui/components/markdown_view/MarkdownLink.ts +2 -2
- package/front_end/ui/components/markdown_view/MarkdownView.ts +4 -5
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +2 -2
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +2 -2
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +4 -4
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +22 -22
- package/front_end/ui/components/report_view/ReportView.ts +16 -16
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +14 -14
- package/front_end/ui/components/settings/SettingCheckbox.ts +5 -5
- package/front_end/ui/components/survey_link/SurveyLink.ts +8 -8
- package/front_end/ui/components/text_editor/TextEditor.ts +9 -9
- package/front_end/ui/components/text_editor/cursor_tooltip.ts +7 -1
- package/front_end/ui/components/text_prompt/TextPrompt.ts +18 -18
- package/front_end/ui/components/tree_outline/TreeOutline.ts +69 -70
- package/front_end/ui/legacy/ContextFlavorListener.ts +0 -4
- package/front_end/ui/legacy/ContextMenu.ts +2 -3
- package/front_end/ui/legacy/InspectorView.ts +1 -1
- package/front_end/ui/legacy/ReportView.ts +3 -4
- package/front_end/ui/legacy/SearchableView.ts +14 -6
- package/front_end/ui/legacy/SplitWidget.ts +2 -3
- package/front_end/ui/legacy/SuggestBox.ts +0 -3
- package/front_end/ui/legacy/TextPrompt.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/XLink.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +2 -2
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +9 -9
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +7 -7
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +1 -5
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +13 -13
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +2 -2
- package/front_end/ui/legacy/components/utils/Linkifier.ts +2 -2
- package/front_end/ui/legacy/themeColors.css +2 -0
- package/front_end/ui/legacy/theme_support/theme_support_impl.ts +42 -4
- package/package.json +1 -1
- package/scripts/eslint_rules/lib/use_private_class_members.js +41 -0
- package/scripts/eslint_rules/tests/use_private_class_members_test.js +62 -0
- package/scripts/migration/class-fields/migrate.js +2 -3
- package/scripts/migration/class-fields/migrate.sh +1 -3
- package/scripts/migration/class-fields/package.json +1 -1
- package/config/gni/all_devtools_files.gni +0 -255
- package/scripts/build/devtools_file_hashes.py +0 -82
- package/scripts/devtools_run/devtools_run_cli +0 -49
- package/scripts/devtools_run/package.json +0 -13
- package/scripts/unzip.py +0 -20
- package/scripts/visualize_deps/jquery_svg.html +0 -57
- package/scripts/visualize_deps/run_visualize.js +0 -119
|
@@ -35,14 +35,16 @@ export class ResizeEvent extends Event {
|
|
|
35
35
|
this.data = numBytesPerPage;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
|
|
39
|
+
const BYTE_GROUP_MARGIN = 8;
|
|
40
|
+
const BYTE_GROUP_SIZE = 4;
|
|
41
|
+
|
|
38
42
|
export class LinearMemoryViewer extends HTMLElement {
|
|
39
43
|
static readonly litTagName = LitHtml.literal`devtools-linear-memory-inspector-viewer`;
|
|
40
44
|
|
|
41
|
-
private static readonly BYTE_GROUP_MARGIN = 8;
|
|
42
|
-
private static readonly BYTE_GROUP_SIZE = 4;
|
|
43
45
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
44
46
|
|
|
45
|
-
readonly #resizeObserver = new ResizeObserver(() => this
|
|
47
|
+
readonly #resizeObserver = new ResizeObserver(() => this.#resize());
|
|
46
48
|
#isObservingResize = false;
|
|
47
49
|
|
|
48
50
|
#memory = new Uint8Array();
|
|
@@ -50,7 +52,7 @@ export class LinearMemoryViewer extends HTMLElement {
|
|
|
50
52
|
#memoryOffset = 0;
|
|
51
53
|
|
|
52
54
|
#numRows = 1;
|
|
53
|
-
#numBytesInRow =
|
|
55
|
+
#numBytesInRow = BYTE_GROUP_SIZE;
|
|
54
56
|
|
|
55
57
|
#focusOnByte = true;
|
|
56
58
|
|
|
@@ -69,11 +71,11 @@ export class LinearMemoryViewer extends HTMLElement {
|
|
|
69
71
|
this.#address = data.address;
|
|
70
72
|
this.#memoryOffset = data.memoryOffset;
|
|
71
73
|
this.#focusOnByte = data.focus;
|
|
72
|
-
this
|
|
74
|
+
this.#update();
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
connectedCallback(): void {
|
|
76
|
-
ComponentHelpers.SetCSSProperty.set(this, '--byte-group-margin', `${
|
|
78
|
+
ComponentHelpers.SetCSSProperty.set(this, '--byte-group-margin', `${BYTE_GROUP_MARGIN}px`);
|
|
77
79
|
this.#shadow.adoptedStyleSheets = [linearMemoryViewerStyles];
|
|
78
80
|
}
|
|
79
81
|
|
|
@@ -82,14 +84,14 @@ export class LinearMemoryViewer extends HTMLElement {
|
|
|
82
84
|
this.#resizeObserver.disconnect();
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
|
|
86
|
-
this
|
|
87
|
-
this
|
|
88
|
-
this
|
|
89
|
-
this
|
|
87
|
+
#update(): void {
|
|
88
|
+
this.#updateDimensions();
|
|
89
|
+
this.#render();
|
|
90
|
+
this.#focusOnView();
|
|
91
|
+
this.#engageResizeObserver();
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
|
|
94
|
+
#focusOnView(): void {
|
|
93
95
|
if (this.#focusOnByte) {
|
|
94
96
|
const view = this.#shadow.querySelector<HTMLDivElement>('.view');
|
|
95
97
|
if (view) {
|
|
@@ -98,15 +100,15 @@ export class LinearMemoryViewer extends HTMLElement {
|
|
|
98
100
|
}
|
|
99
101
|
}
|
|
100
102
|
|
|
101
|
-
|
|
102
|
-
this
|
|
103
|
+
#resize(): void {
|
|
104
|
+
this.#update();
|
|
103
105
|
this.dispatchEvent(new ResizeEvent(this.#numBytesInRow * this.#numRows));
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
/** Recomputes the number of rows and (byte) columns that fit into the current view. */
|
|
107
|
-
|
|
109
|
+
#updateDimensions(): void {
|
|
108
110
|
if (this.clientWidth === 0 || this.clientHeight === 0 || !this.shadowRoot) {
|
|
109
|
-
this.#numBytesInRow =
|
|
111
|
+
this.#numBytesInRow = BYTE_GROUP_SIZE;
|
|
110
112
|
this.#numRows = 1;
|
|
111
113
|
return;
|
|
112
114
|
}
|
|
@@ -126,7 +128,7 @@ export class LinearMemoryViewer extends HTMLElement {
|
|
|
126
128
|
const rowElement = this.shadowRoot.querySelector('.row');
|
|
127
129
|
|
|
128
130
|
if (!firstByteCell || !textCell || !divider || !rowElement) {
|
|
129
|
-
this.#numBytesInRow =
|
|
131
|
+
this.#numBytesInRow = BYTE_GROUP_SIZE;
|
|
130
132
|
this.#numRows = 1;
|
|
131
133
|
return;
|
|
132
134
|
}
|
|
@@ -134,8 +136,7 @@ export class LinearMemoryViewer extends HTMLElement {
|
|
|
134
136
|
// Calculate the width required for each (unsplittable) group of bytes.
|
|
135
137
|
const byteCellWidth = firstByteCell.getBoundingClientRect().width;
|
|
136
138
|
const textCellWidth = textCell.getBoundingClientRect().width;
|
|
137
|
-
const groupWidth =
|
|
138
|
-
LinearMemoryViewer.BYTE_GROUP_SIZE * (byteCellWidth + textCellWidth) + LinearMemoryViewer.BYTE_GROUP_MARGIN;
|
|
139
|
+
const groupWidth = BYTE_GROUP_SIZE * (byteCellWidth + textCellWidth) + BYTE_GROUP_MARGIN;
|
|
139
140
|
|
|
140
141
|
// Calculate the width to fill.
|
|
141
142
|
const dividerWidth = divider.getBoundingClientRect().width;
|
|
@@ -144,16 +145,16 @@ export class LinearMemoryViewer extends HTMLElement {
|
|
|
144
145
|
const widthToFill = this.clientWidth - 1 -
|
|
145
146
|
(firstByteCell.getBoundingClientRect().left - this.getBoundingClientRect().left) - dividerWidth;
|
|
146
147
|
if (widthToFill < groupWidth) {
|
|
147
|
-
this.#numBytesInRow =
|
|
148
|
+
this.#numBytesInRow = BYTE_GROUP_SIZE;
|
|
148
149
|
this.#numRows = 1;
|
|
149
150
|
return;
|
|
150
151
|
}
|
|
151
152
|
|
|
152
|
-
this.#numBytesInRow = Math.floor(widthToFill / groupWidth) *
|
|
153
|
+
this.#numBytesInRow = Math.floor(widthToFill / groupWidth) * BYTE_GROUP_SIZE;
|
|
153
154
|
this.#numRows = Math.floor(this.clientHeight / rowElement.clientHeight);
|
|
154
155
|
}
|
|
155
156
|
|
|
156
|
-
|
|
157
|
+
#engageResizeObserver(): void {
|
|
157
158
|
if (!this.#resizeObserver || this.#isObservingResize) {
|
|
158
159
|
return;
|
|
159
160
|
}
|
|
@@ -162,17 +163,17 @@ export class LinearMemoryViewer extends HTMLElement {
|
|
|
162
163
|
this.#isObservingResize = true;
|
|
163
164
|
}
|
|
164
165
|
|
|
165
|
-
|
|
166
|
+
#render(): void {
|
|
166
167
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
167
168
|
// clang-format off
|
|
168
169
|
render(html`
|
|
169
|
-
<div class="view" tabindex="0" @keydown=${this
|
|
170
|
-
${this
|
|
170
|
+
<div class="view" tabindex="0" @keydown=${this.#onKeyDown}>
|
|
171
|
+
${this.#renderView()}
|
|
171
172
|
</div>
|
|
172
173
|
`, this.#shadow, {host: this});
|
|
173
174
|
}
|
|
174
175
|
|
|
175
|
-
|
|
176
|
+
#onKeyDown(event: Event): void {
|
|
176
177
|
const keyboardEvent = event as KeyboardEvent;
|
|
177
178
|
let newAddress = undefined;
|
|
178
179
|
if (keyboardEvent.code === 'ArrowUp') {
|
|
@@ -195,15 +196,15 @@ export class LinearMemoryViewer extends HTMLElement {
|
|
|
195
196
|
}
|
|
196
197
|
}
|
|
197
198
|
|
|
198
|
-
|
|
199
|
+
#renderView(): LitHtml.TemplateResult {
|
|
199
200
|
const itemTemplates = [];
|
|
200
201
|
for (let i = 0; i < this.#numRows; ++i) {
|
|
201
|
-
itemTemplates.push(this
|
|
202
|
+
itemTemplates.push(this.#renderRow(i));
|
|
202
203
|
}
|
|
203
204
|
return html`${itemTemplates}`;
|
|
204
205
|
}
|
|
205
206
|
|
|
206
|
-
|
|
207
|
+
#renderRow(row: number): LitHtml.TemplateResult {
|
|
207
208
|
const {startIndex, endIndex} = {startIndex: row * this.#numBytesInRow, endIndex: (row + 1) * this.#numBytesInRow};
|
|
208
209
|
|
|
209
210
|
const classMap = {
|
|
@@ -214,18 +215,18 @@ export class LinearMemoryViewer extends HTMLElement {
|
|
|
214
215
|
<div class="row">
|
|
215
216
|
<span class=${LitHtml.Directives.classMap(classMap)}>${toHexString({number: startIndex + this.#memoryOffset, pad: 8, prefix: false})}</span>
|
|
216
217
|
<span class="divider"></span>
|
|
217
|
-
${this
|
|
218
|
+
${this.#renderByteValues(startIndex, endIndex)}
|
|
218
219
|
<span class="divider"></span>
|
|
219
|
-
${this
|
|
220
|
+
${this.#renderCharacterValues(startIndex, endIndex)}
|
|
220
221
|
</div>
|
|
221
222
|
`;
|
|
222
223
|
}
|
|
223
224
|
|
|
224
|
-
|
|
225
|
+
#renderByteValues(startIndex: number, endIndex: number): LitHtml.TemplateResult {
|
|
225
226
|
const cells = [];
|
|
226
227
|
for (let i = startIndex; i < endIndex; ++i) {
|
|
227
228
|
// Add margin after each group of bytes of size byteGroupSize.
|
|
228
|
-
const addMargin = i !== startIndex && (i - startIndex) %
|
|
229
|
+
const addMargin = i !== startIndex && (i - startIndex) % BYTE_GROUP_SIZE === 0;
|
|
229
230
|
const selected = i === this.#address - this.#memoryOffset;
|
|
230
231
|
const classMap = {
|
|
231
232
|
'cell': true,
|
|
@@ -236,13 +237,13 @@ export class LinearMemoryViewer extends HTMLElement {
|
|
|
236
237
|
const isSelectableCell = i < this.#memory.length;
|
|
237
238
|
const byteValue = isSelectableCell ? html`${toHexString({number: this.#memory[i], pad: 2, prefix: false})}` : '';
|
|
238
239
|
const actualIndex = i + this.#memoryOffset;
|
|
239
|
-
const onSelectedByte = isSelectableCell ? this
|
|
240
|
+
const onSelectedByte = isSelectableCell ? this.#onSelectedByte.bind(this, actualIndex) : '';
|
|
240
241
|
cells.push(html`<span class=${LitHtml.Directives.classMap(classMap)} @click=${onSelectedByte}>${byteValue}</span>`);
|
|
241
242
|
}
|
|
242
243
|
return html`${cells}`;
|
|
243
244
|
}
|
|
244
245
|
|
|
245
|
-
|
|
246
|
+
#renderCharacterValues(startIndex: number, endIndex: number): LitHtml.TemplateResult {
|
|
246
247
|
const cells = [];
|
|
247
248
|
for (let i = startIndex; i < endIndex; ++i) {
|
|
248
249
|
const classMap = {
|
|
@@ -251,21 +252,21 @@ export class LinearMemoryViewer extends HTMLElement {
|
|
|
251
252
|
selected: this.#address - this.#memoryOffset === i,
|
|
252
253
|
};
|
|
253
254
|
const isSelectableCell = i < this.#memory.length;
|
|
254
|
-
const value = isSelectableCell ? html`${this
|
|
255
|
-
const onSelectedByte = isSelectableCell ? this
|
|
255
|
+
const value = isSelectableCell ? html`${this.#toAscii(this.#memory[i])}` : '';
|
|
256
|
+
const onSelectedByte = isSelectableCell ? this.#onSelectedByte.bind(this, i + this.#memoryOffset) : '';
|
|
256
257
|
cells.push(html`<span class=${LitHtml.Directives.classMap(classMap)} @click=${onSelectedByte}>${value}</span>`);
|
|
257
258
|
}
|
|
258
259
|
return html`${cells}`;
|
|
259
260
|
}
|
|
260
261
|
|
|
261
|
-
|
|
262
|
+
#toAscii(byte: number): string {
|
|
262
263
|
if (byte >= 20 && byte <= 0x7F) {
|
|
263
264
|
return String.fromCharCode(byte);
|
|
264
265
|
}
|
|
265
266
|
return '.';
|
|
266
267
|
}
|
|
267
268
|
|
|
268
|
-
|
|
269
|
+
#onSelectedByte(index: number): void {
|
|
269
270
|
this.dispatchEvent(new ByteSelectedEvent(index));
|
|
270
271
|
}
|
|
271
272
|
}
|
|
@@ -108,33 +108,33 @@ export class ValueInterpreterDisplay extends HTMLElement {
|
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
this
|
|
111
|
+
this.#render();
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
#render(): void {
|
|
115
115
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
116
116
|
// clang-format off
|
|
117
117
|
render(html`
|
|
118
118
|
<div class="value-types">
|
|
119
|
-
${SORTED_VALUE_TYPES.map(type => this.#valueTypes.has(type) ? this
|
|
119
|
+
${SORTED_VALUE_TYPES.map(type => this.#valueTypes.has(type) ? this.#showValue(type) : '')}
|
|
120
120
|
</div>
|
|
121
121
|
`, this.#shadow, {host: this},
|
|
122
122
|
);
|
|
123
123
|
// clang-format on
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
#showValue(type: ValueType): LitHtml.TemplateResult {
|
|
127
127
|
if (isNumber(type)) {
|
|
128
|
-
return this
|
|
128
|
+
return this.#renderNumberValues(type);
|
|
129
129
|
}
|
|
130
130
|
if (isPointer(type)) {
|
|
131
|
-
return this
|
|
131
|
+
return this.#renderPointerValue(type);
|
|
132
132
|
}
|
|
133
133
|
throw new Error(`No known way to format ${type}`);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
|
|
137
|
-
const unsignedValue = this
|
|
136
|
+
#renderPointerValue(type: ValueType): LitHtml.TemplateResult {
|
|
137
|
+
const unsignedValue = this.#parse({type, signed: false});
|
|
138
138
|
const address = getPointerAddress(type, this.#buffer, this.#endianness);
|
|
139
139
|
const jumpDisabled = Number.isNaN(address) || BigInt(address) >= BigInt(this.#memoryLength);
|
|
140
140
|
const buttonTitle = jumpDisabled ? i18nString(UIStrings.addressOutOfRange) : i18nString(UIStrings.jumpToPointer);
|
|
@@ -149,7 +149,7 @@ export class ValueInterpreterDisplay extends HTMLElement {
|
|
|
149
149
|
${
|
|
150
150
|
html`
|
|
151
151
|
<button class="jump-to-button" data-jump="true" title=${buttonTitle} ?disabled=${jumpDisabled}
|
|
152
|
-
@click=${this
|
|
152
|
+
@click=${this.#onJumpToAddressClicked.bind(this, Number(address))}>
|
|
153
153
|
<${IconButton.Icon.Icon.litTagName} .data=${
|
|
154
154
|
{iconName: 'link_icon', color: iconColor, width: '14px'} as IconButton.Icon.IconWithName}>
|
|
155
155
|
</${IconButton.Icon.Icon.litTagName}>
|
|
@@ -160,11 +160,11 @@ export class ValueInterpreterDisplay extends HTMLElement {
|
|
|
160
160
|
// clang-format on
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
#onJumpToAddressClicked(address: number): void {
|
|
164
164
|
this.dispatchEvent(new JumpToPointerAddressEvent(address));
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
|
|
167
|
+
#renderNumberValues(type: ValueType): LitHtml.TemplateResult {
|
|
168
168
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
169
169
|
// clang-format off
|
|
170
170
|
return html`
|
|
@@ -174,7 +174,7 @@ export class ValueInterpreterDisplay extends HTMLElement {
|
|
|
174
174
|
data-mode-settings="true"
|
|
175
175
|
class="chrome-select"
|
|
176
176
|
style="border: none; background-color: transparent; cursor: pointer; color: var(--color-text-secondary);"
|
|
177
|
-
@change=${this
|
|
177
|
+
@change=${this.#onValueTypeModeChange.bind(this, type)}>
|
|
178
178
|
${VALUE_TYPE_MODE_LIST.filter(x => isValidMode(type, x)).map(mode => {
|
|
179
179
|
return html`
|
|
180
180
|
<option value=${mode} .selected=${this.#valueTypeModeConfig.get(type) === mode}>${
|
|
@@ -183,14 +183,14 @@ export class ValueInterpreterDisplay extends HTMLElement {
|
|
|
183
183
|
})}
|
|
184
184
|
</select>
|
|
185
185
|
</div>
|
|
186
|
-
${this
|
|
186
|
+
${this.#renderSignedAndUnsigned(type)}
|
|
187
187
|
`;
|
|
188
188
|
// clang-format on
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
|
|
192
|
-
const unsignedValue = this
|
|
193
|
-
const signedValue = this
|
|
191
|
+
#renderSignedAndUnsigned(type: ValueType): LitHtml.TemplateResult {
|
|
192
|
+
const unsignedValue = this.#parse({type, signed: false});
|
|
193
|
+
const signedValue = this.#parse({type, signed: true});
|
|
194
194
|
const mode = this.#valueTypeModeConfig.get(type);
|
|
195
195
|
const showSignedAndUnsigned =
|
|
196
196
|
signedValue !== unsignedValue && mode !== ValueTypeMode.Hexadecimal && mode !== ValueTypeMode.Octal;
|
|
@@ -224,14 +224,14 @@ export class ValueInterpreterDisplay extends HTMLElement {
|
|
|
224
224
|
`;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
|
|
227
|
+
#onValueTypeModeChange(type: ValueType, event: Event): void {
|
|
228
228
|
event.preventDefault();
|
|
229
229
|
const select = event.target as HTMLInputElement;
|
|
230
230
|
const mode = select.value as ValueTypeMode;
|
|
231
231
|
this.dispatchEvent(new ValueTypeModeChangedEvent(type, mode));
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
#parse(data: {type: ValueType, signed?: boolean}): string {
|
|
235
235
|
const mode = this.#valueTypeModeConfig.get(data.type);
|
|
236
236
|
return format(
|
|
237
237
|
{buffer: this.#buffer, type: data.type, endianness: this.#endianness, signed: data.signed || false, mode});
|
|
@@ -70,10 +70,10 @@ export class ValueInterpreterSettings extends HTMLElement {
|
|
|
70
70
|
|
|
71
71
|
set data(data: ValueInterpreterSettingsData) {
|
|
72
72
|
this.#valueTypes = data.valueTypes;
|
|
73
|
-
this
|
|
73
|
+
this.#render();
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
#render(): void {
|
|
77
77
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
78
78
|
// clang-format off
|
|
79
79
|
render(html`
|
|
@@ -82,14 +82,14 @@ export class ValueInterpreterSettings extends HTMLElement {
|
|
|
82
82
|
return html`
|
|
83
83
|
<div class="value-types-selection">
|
|
84
84
|
<span class="group">${valueTypeGroupToLocalizedString(group)}</span>
|
|
85
|
-
${this
|
|
85
|
+
${this.#plotTypeSelections(group)}
|
|
86
86
|
</div>
|
|
87
87
|
`;})}
|
|
88
88
|
</div>
|
|
89
89
|
`, this.#shadow, {host: this});
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
#plotTypeSelections(group: ValueTypeGroup): LitHtml.TemplateResult {
|
|
93
93
|
const types = GROUP_TO_TYPES.get(group);
|
|
94
94
|
if (!types) {
|
|
95
95
|
throw new Error(`Unknown group ${group}`);
|
|
@@ -98,13 +98,13 @@ export class ValueInterpreterSettings extends HTMLElement {
|
|
|
98
98
|
${types.map(type => {
|
|
99
99
|
return html`
|
|
100
100
|
<label class="type-label" title=${valueTypeToLocalizedString(type)}>
|
|
101
|
-
<input data-input="true" type="checkbox" .checked=${this.#valueTypes.has(type)} @change=${(e: Event): void => this
|
|
101
|
+
<input data-input="true" type="checkbox" .checked=${this.#valueTypes.has(type)} @change=${(e: Event): void => this.#onTypeToggle(type, e)}>
|
|
102
102
|
<span data-title="true">${valueTypeToLocalizedString(type)}</span>
|
|
103
103
|
</label>
|
|
104
104
|
`;})}`;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
#onTypeToggle(type: ValueType, event: Event): void {
|
|
108
108
|
const checkbox = event.target as HTMLInputElement;
|
|
109
109
|
this.dispatchEvent(new TypeToggleEvent(type, checkbox.checked));
|
|
110
110
|
}
|
|
@@ -45,14 +45,14 @@ export class Linkifier extends HTMLElement {
|
|
|
45
45
|
throw new Error('Cannot construct a Linkifier without providing a valid string URL.');
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
this
|
|
48
|
+
this.#render();
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
connectedCallback(): void {
|
|
52
52
|
this.#shadow.adoptedStyleSheets = [linkifierImplStyles];
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
#onLinkActivation(event: Event): void {
|
|
56
56
|
event.preventDefault();
|
|
57
57
|
const linkifierClickEvent = new LinkifierClick({
|
|
58
58
|
url: this.#url,
|
|
@@ -62,12 +62,12 @@ export class Linkifier extends HTMLElement {
|
|
|
62
62
|
this.dispatchEvent(linkifierClickEvent);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
async #render(): Promise<void> {
|
|
66
66
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
67
67
|
await coordinator.write(() => {
|
|
68
68
|
// clang-format off
|
|
69
69
|
// eslint-disable-next-line rulesdir/ban_a_tags_in_lit_html
|
|
70
|
-
LitHtml.render(LitHtml.html`<a class="link" href=${this.#url} @click=${this
|
|
70
|
+
LitHtml.render(LitHtml.html`<a class="link" href=${this.#url} @click=${this.#onLinkActivation}><slot>${LinkifierUtils.linkText(this.#url, this.#lineNumber)}</slot></a>`, this.#shadow, { host: this});
|
|
71
71
|
// clang-format on
|
|
72
72
|
});
|
|
73
73
|
}
|
|
@@ -40,10 +40,10 @@ export class MarkdownImage extends HTMLElement {
|
|
|
40
40
|
const markdownImage = getMarkdownImage(key);
|
|
41
41
|
this.#imageData = markdownImage;
|
|
42
42
|
this.#imageTitle = title;
|
|
43
|
-
this
|
|
43
|
+
this.#render();
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
#getIconComponent(): LitHtml.TemplateResult {
|
|
47
47
|
if (!this.#imageData) {
|
|
48
48
|
return LitHtml.html``;
|
|
49
49
|
}
|
|
@@ -54,7 +54,7 @@ export class MarkdownImage extends HTMLElement {
|
|
|
54
54
|
`;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
#getImageComponent(): LitHtml.TemplateResult {
|
|
58
58
|
if (!this.#imageData) {
|
|
59
59
|
return LitHtml.html``;
|
|
60
60
|
}
|
|
@@ -64,12 +64,12 @@ export class MarkdownImage extends HTMLElement {
|
|
|
64
64
|
`;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
#render(): void {
|
|
68
68
|
if (!this.#imageData) {
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
71
|
const {isIcon} = this.#imageData;
|
|
72
|
-
const imageComponent = isIcon ? this
|
|
72
|
+
const imageComponent = isIcon ? this.#getIconComponent() : this.#getImageComponent();
|
|
73
73
|
LitHtml.render(imageComponent, this.#shadow, {host: this});
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -36,10 +36,10 @@ export class MarkdownLink extends HTMLElement {
|
|
|
36
36
|
const markdownLink = getMarkdownLink(key);
|
|
37
37
|
this.#linkText = title;
|
|
38
38
|
this.#linkUrl = markdownLink;
|
|
39
|
-
this
|
|
39
|
+
this.#render();
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
#render(): void {
|
|
43
43
|
// clang-format off
|
|
44
44
|
const output = LitHtml.html`
|
|
45
45
|
<x-link class="devtools-link" href=${this.#linkUrl}>${this.#linkText}</x-link>
|
|
@@ -32,14 +32,14 @@ export class MarkdownView extends HTMLElement {
|
|
|
32
32
|
|
|
33
33
|
set data(data: MarkdownViewData) {
|
|
34
34
|
this.#tokenData = data.tokens;
|
|
35
|
-
this
|
|
35
|
+
this.#update();
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
this
|
|
38
|
+
#update(): void {
|
|
39
|
+
this.#render();
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
#render(): void {
|
|
43
43
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
44
44
|
// clang-format off
|
|
45
45
|
render(html`
|
|
@@ -69,7 +69,6 @@ const renderChildTokens = (token: any): string => {
|
|
|
69
69
|
const unescape = (text: string): string => {
|
|
70
70
|
// Unescape will get rid of the escaping done by Marked to avoid double escaping due to escaping it also with Lit-html
|
|
71
71
|
// Table taken from: front_end/third_party/marked/package/src/helpers.js
|
|
72
|
-
/** @type {Map<string,string>} */
|
|
73
72
|
const escapeReplacements = new Map<string, string>([
|
|
74
73
|
['&', '&'],
|
|
75
74
|
['<', '<'],
|
|
@@ -26,7 +26,7 @@ export interface FeedbackButtonData {
|
|
|
26
26
|
export class FeedbackButton extends HTMLElement {
|
|
27
27
|
static readonly litTagName = LitHtml.literal`devtools-feedback-button`;
|
|
28
28
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
29
|
-
readonly #boundRender = this
|
|
29
|
+
readonly #boundRender = this.#render.bind(this);
|
|
30
30
|
|
|
31
31
|
#props: FeedbackButtonData = {
|
|
32
32
|
feedbackUrl: '',
|
|
@@ -41,7 +41,7 @@ export class FeedbackButton extends HTMLElement {
|
|
|
41
41
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(this.#props.feedbackUrl);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
#render(): void {
|
|
45
45
|
if (!ComponentHelpers.ScheduledRender.isScheduledRender(this)) {
|
|
46
46
|
throw new Error('FeedbackButton render was not scheduled');
|
|
47
47
|
}
|
|
@@ -42,7 +42,7 @@ export interface PanelFeedbackData {
|
|
|
42
42
|
export class PanelFeedback extends HTMLElement {
|
|
43
43
|
static readonly litTagName = LitHtml.literal`devtools-panel-feedback`;
|
|
44
44
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
45
|
-
readonly #boundRender = this
|
|
45
|
+
readonly #boundRender = this.#render.bind(this);
|
|
46
46
|
|
|
47
47
|
#props: PanelFeedbackData = {
|
|
48
48
|
feedbackUrl: '',
|
|
@@ -59,7 +59,7 @@ export class PanelFeedback extends HTMLElement {
|
|
|
59
59
|
ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
#render(): void {
|
|
63
63
|
if (!ComponentHelpers.ScheduledRender.isScheduledRender(this)) {
|
|
64
64
|
throw new Error('PanelFeedback render was not scheduled');
|
|
65
65
|
}
|
|
@@ -50,17 +50,17 @@ export class PreviewToggle extends HTMLElement {
|
|
|
50
50
|
this.#feedbackURL = data.feedbackURL;
|
|
51
51
|
this.#experiment = data.experiment;
|
|
52
52
|
this.#onChangeCallback = data.onChangeCallback;
|
|
53
|
-
this
|
|
53
|
+
this.#render();
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
#render(): void {
|
|
57
57
|
const checked = Root.Runtime.experiments.isEnabled(this.#experiment);
|
|
58
58
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
59
59
|
// clang-format off
|
|
60
60
|
render(
|
|
61
61
|
html`
|
|
62
62
|
<div class="experiment-preview">
|
|
63
|
-
<input type="checkbox" ?checked=${checked} @change=${this
|
|
63
|
+
<input type="checkbox" ?checked=${checked} @change=${this.#checkboxChanged} aria-label=${this.#name}/>
|
|
64
64
|
<${IconButton.Icon.Icon.litTagName} .data=${{
|
|
65
65
|
iconName: 'ic_preview_feature',
|
|
66
66
|
width: '16px',
|
|
@@ -81,7 +81,7 @@ export class PreviewToggle extends HTMLElement {
|
|
|
81
81
|
// clang-format on
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
#checkboxChanged(event: Event): void {
|
|
85
85
|
const checked = (event.target as HTMLInputElement).checked;
|
|
86
86
|
Root.Runtime.experiments.setEnabled(this.#experiment, checked);
|
|
87
87
|
this.#onChangeCallback?.(checked);
|