chrome-devtools-frontend 1.0.1550444 → 1.0.1553956
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/docs/styleguide/ux/components.md +34 -8
- package/eslint.config.mjs +7 -0
- package/front_end/Images/generate-css-vars.js +8 -4
- package/front_end/core/common/Settings.ts +20 -8
- package/front_end/core/host/UserMetrics.ts +3 -1
- package/front_end/core/i18n/collect-ui-strings.js +19 -10
- package/front_end/core/i18n/generate-locales-js.js +4 -4
- package/front_end/core/protocol_client/CDPConnection.ts +1 -0
- package/front_end/core/protocol_client/InspectorBackend.ts +5 -1
- package/front_end/core/root/Runtime.ts +0 -12
- package/front_end/core/sdk/DOMModel.ts +38 -3
- package/front_end/core/sdk/DebuggerModel.ts +9 -4
- package/front_end/core/sdk/IsolateManager.ts +7 -0
- package/front_end/core/sdk/PageResourceLoader.ts +3 -3
- package/front_end/core/sdk/RehydratingConnection.ts +5 -2
- package/front_end/entrypoints/main/MainImpl.ts +28 -10
- package/front_end/generated/SupportedCSSProperties.js +14 -0
- package/front_end/models/ai_assistance/AiConversation.ts +94 -4
- package/front_end/models/ai_assistance/agents/AiAgent.ts +30 -15
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +179 -41
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +5 -0
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +62 -0
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +2 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +1 -7
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +124 -12
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +125 -30
- package/front_end/models/ai_assistance/performance/AICallTree.ts +42 -0
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +12 -0
- package/front_end/models/issues_manager/Issue.ts +1 -0
- package/front_end/models/issues_manager/IssueAggregator.ts +9 -0
- package/front_end/models/issues_manager/IssuesManager.ts +5 -0
- package/front_end/models/issues_manager/PermissionElementIssue.ts +262 -0
- package/front_end/models/issues_manager/descriptions/permissionElementActivationDisabled.md +7 -0
- package/front_end/models/issues_manager/descriptions/permissionElementActivationDisabledWithOccluder.md +9 -0
- package/front_end/models/issues_manager/descriptions/permissionElementActivationDisabledWithOccluderParent.md +9 -0
- package/front_end/models/issues_manager/descriptions/permissionElementCspFrameAncestorsMissing.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementFencedFrameDisallowed.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementFontSizeTooLarge.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementFontSizeTooSmall.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementGeolocationDeprecated.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementInsetBoxShadowUnsupported.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementInvalidDisplayStyle.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementInvalidSizeValue.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementInvalidType.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementInvalidTypeActivation.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementLowContrast.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementNonOpaqueColor.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementPaddingBottomUnsupported.md +6 -0
- package/front_end/models/issues_manager/descriptions/permissionElementPaddingRightUnsupported.md +6 -0
- package/front_end/models/issues_manager/descriptions/permissionElementPermissionsPolicyBlocked.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementRegistrationFailed.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementRequestInProgress.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementSecurityChecksFailed.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementTypeNotSupported.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementUntrustedEvent.md +7 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +8 -0
- package/front_end/models/stack_trace/StackTraceModel.ts +37 -18
- package/front_end/models/trace/Processor.ts +14 -15
- package/front_end/models/trace/insights/Common.ts +2 -8
- package/front_end/models/trace/insights/types.ts +12 -2
- package/front_end/models/trace/types/TraceEvents.ts +4 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +28 -6
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +9 -23
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +78 -2
- package/front_end/panels/ai_assistance/components/CollapsibleAssistanceContentWidget.ts +71 -0
- package/front_end/panels/ai_assistance/components/PerformanceAgentFlameChart.ts +126 -0
- package/front_end/panels/ai_assistance/components/PerformanceAgentMarkdownRenderer.ts +131 -2
- package/front_end/panels/ai_assistance/components/chatView.css +28 -0
- package/front_end/panels/ai_assistance/components/collapsibleAssistanceContentWidget.css +33 -0
- package/front_end/panels/application/AppManifestView.ts +1007 -521
- package/front_end/panels/application/ApplicationPanelSidebar.ts +1 -17
- package/front_end/panels/application/ExtensionStorageItemsView.ts +3 -5
- package/front_end/panels/application/KeyValueStorageItemsView.ts +3 -2
- package/front_end/panels/application/components/BackForwardCacheView.ts +2 -2
- package/front_end/panels/application/preloading/PreloadingView.ts +46 -45
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +80 -75
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +169 -133
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +74 -93
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +142 -117
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +51 -11
- package/front_end/panels/application/preloading/components/components.ts +0 -2
- package/front_end/panels/common/Annotation.ts +184 -0
- package/front_end/panels/common/AnnotationManager.ts +148 -11
- package/front_end/panels/common/ExtensionView.ts +47 -0
- package/front_end/panels/common/PersistenceUtils.ts +22 -25
- package/front_end/panels/common/annotation.css +40 -0
- package/front_end/panels/common/common.ts +1 -0
- package/front_end/panels/console/ConsoleInsightTeaser.ts +187 -5
- package/front_end/panels/console/ConsolePinPane.ts +437 -217
- package/front_end/panels/console/ConsolePrompt.ts +32 -223
- package/front_end/panels/console/ConsoleView.ts +67 -66
- package/front_end/panels/console/ConsoleViewMessage.ts +8 -3
- package/front_end/panels/console/consoleInsightTeaser.css +23 -0
- package/front_end/panels/console/consoleView.css +1 -1
- package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +89 -0
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +2 -2
- package/front_end/panels/elements/ComputedStyleWidget.ts +16 -5
- package/front_end/panels/elements/ElementsPanel.ts +38 -12
- package/front_end/panels/elements/ElementsSidebarPane.ts +1 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +313 -353
- package/front_end/panels/elements/ElementsTreeOutline.ts +39 -13
- package/front_end/panels/elements/StylePropertyTreeElement.ts +15 -14
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/emulation/MediaQueryInspector.ts +171 -125
- package/front_end/panels/explain/components/ConsoleInsight.ts +175 -150
- package/front_end/panels/explain/components/consoleInsight.css +348 -347
- package/front_end/panels/issues/AffectedPermissionElementsView.ts +46 -0
- package/front_end/panels/issues/IssueView.ts +2 -0
- package/front_end/panels/issues/IssuesPane.ts +6 -0
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +165 -149
- package/front_end/panels/layer_viewer/Layers3DView.ts +131 -78
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +149 -100
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +90 -64
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +25 -34
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +60 -44
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +170 -151
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +50 -51
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +0 -13
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +20 -18
- package/front_end/panels/mobile_throttling/CalibrationController.ts +3 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +14 -6
- package/front_end/panels/network/NetworkItemView.ts +42 -3
- package/front_end/panels/network/NetworkLogView.ts +10 -11
- package/front_end/panels/network/NetworkPanel.ts +63 -1
- package/front_end/panels/network/RequestInitiatorView.ts +146 -113
- package/front_end/panels/network/components/RequestHeaderSection.css +51 -50
- package/front_end/panels/network/components/RequestHeaderSection.ts +81 -71
- package/front_end/panels/network/components/RequestHeadersView.css +1 -1
- package/front_end/panels/network/components/RequestHeadersView.ts +26 -11
- package/front_end/panels/network/components/RequestTrustTokensView.css +24 -14
- package/front_end/panels/network/components/RequestTrustTokensView.ts +144 -140
- package/front_end/panels/profiler/IsolateSelector.ts +2 -1
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +49 -33
- package/front_end/panels/recorder/RecorderController.ts +2 -3
- package/front_end/panels/recorder/components/ControlButton.ts +68 -34
- package/front_end/panels/recorder/components/CreateRecordingView.ts +9 -6
- package/front_end/panels/recorder/components/RecordingView.ts +81 -88
- package/front_end/panels/recorder/components/ReplaySection.ts +226 -145
- package/front_end/panels/recorder/{controllers → components}/SelectorPicker.ts +129 -52
- package/front_end/panels/recorder/components/StepEditor.ts +21 -67
- package/front_end/panels/recorder/components/StepView.ts +222 -180
- package/front_end/panels/recorder/components/TimelineSection.ts +69 -48
- package/front_end/panels/recorder/components/components.ts +2 -2
- package/front_end/panels/recorder/components/selectorPicker.css +14 -0
- package/front_end/panels/recorder/components/stepEditor.css +0 -5
- package/front_end/panels/recorder/components/stepView.css +196 -198
- package/front_end/panels/recorder/extensions/ExtensionManager.ts +4 -48
- package/front_end/panels/recorder/models/ScreenshotUtils.ts +17 -11
- package/front_end/panels/security/CookieControlsView.ts +9 -16
- package/front_end/panels/settings/components/SyncSection.ts +0 -1
- package/front_end/panels/sources/CSSPlugin.ts +3 -3
- package/front_end/panels/sources/CallStackSidebarPane.ts +60 -75
- package/front_end/panels/sources/SourcesPanel.ts +1 -11
- package/front_end/panels/sources/TabbedEditorContainer.ts +11 -8
- package/front_end/panels/sources/ThreadsSidebarPane.ts +96 -101
- package/front_end/panels/sources/threadsSidebarPane.css +6 -5
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +2 -3
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +23 -33
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +4 -3
- package/front_end/panels/timeline/TimelineFlameChartView.ts +12 -0
- package/front_end/panels/timeline/TimelinePanel.ts +3 -5
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +164 -142
- package/front_end/panels/timeline/components/InteractionBreakdown.ts +48 -28
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +18 -23
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +98 -73
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +9 -12
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +262 -291
- package/front_end/panels/timeline/components/Utils.ts +25 -0
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +210 -146
- package/front_end/panels/timeline/components/insights/CLSCulprits.ts +8 -20
- package/front_end/panels/timeline/components/insights/Cache.ts +0 -9
- package/front_end/panels/timeline/components/insights/DOMSize.ts +11 -33
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +0 -9
- package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +0 -9
- package/front_end/panels/timeline/components/insights/EventRef.ts +47 -109
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +0 -9
- package/front_end/panels/timeline/components/insights/ForcedReflow.ts +0 -9
- package/front_end/panels/timeline/components/insights/INPBreakdown.ts +0 -9
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +1 -10
- package/front_end/panels/timeline/components/insights/ImageRef.ts +112 -0
- package/front_end/panels/timeline/components/insights/InsightRenderer.ts +91 -0
- package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +0 -9
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +4 -11
- package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +0 -9
- package/front_end/panels/timeline/components/insights/ModernHTTP.ts +0 -9
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +6 -21
- package/front_end/panels/timeline/components/insights/NodeLink.ts +68 -43
- package/front_end/panels/timeline/components/insights/README.md +2 -3
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +0 -9
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +0 -9
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +0 -9
- package/front_end/panels/timeline/components/insights/Viewport.ts +7 -19
- package/front_end/panels/timeline/components/insights/baseInsightComponent.css +5 -0
- package/front_end/panels/timeline/components/insights/insights.ts +2 -0
- package/front_end/panels/timeline/components/interactionBreakdown.css +15 -13
- package/front_end/panels/timeline/enable-easter-egg.js +7 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BluetoothEmulation.d.ts +96 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BluetoothEmulation.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +87 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts +2 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js +5 -24
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BluetoothEmulation.d.ts +18 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BluetoothEmulation.js +42 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts +4 -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 +10 -0
- 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/DeviceRequestPrompt.d.ts +27 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.js +90 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts +3 -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 +3 -2
- 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/Page.d.ts +4 -1
- 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 +5 -2
- 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/BrowsingContext.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +14 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BluetoothEmulation.d.ts +18 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BluetoothEmulation.js +30 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +5 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +22 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpSession.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpSession.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts +2 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js +4 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.js +8 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +30 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +15 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +2 -13
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts +5 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.js +17 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.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/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +221 -4
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +182 -95
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BluetoothEmulation.d.ts +96 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BluetoothEmulation.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +87 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts +2 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js +4 -22
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BluetoothEmulation.d.ts +18 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BluetoothEmulation.js +38 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts +4 -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 +10 -0
- 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/DeviceRequestPrompt.d.ts +27 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.js +85 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts +3 -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 +3 -2
- 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/Page.d.ts +4 -1
- 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 +5 -2
- 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/BrowsingContext.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +14 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BluetoothEmulation.d.ts +18 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BluetoothEmulation.js +26 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +5 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +22 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpSession.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpSession.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts +2 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js +2 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.js +8 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +31 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +15 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +2 -13
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +5 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.js +16 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.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/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +221 -4
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/BluetoothEmulation.ts +103 -0
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +96 -1
- package/front_end/third_party/puppeteer/package/src/api/DeviceRequestPrompt.ts +2 -10
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/BluetoothEmulation.ts +52 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +15 -0
- package/front_end/third_party/puppeteer/package/src/bidi/DeviceRequestPrompt.ts +138 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +7 -3
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +10 -2
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +30 -2
- package/front_end/third_party/puppeteer/package/src/bidi/util.ts +8 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/BluetoothEmulation.ts +47 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +33 -3
- package/front_end/third_party/puppeteer/package/src/cdp/CdpSession.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/DeviceRequestPrompt.ts +3 -8
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +9 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +13 -0
- package/front_end/third_party/puppeteer/package/src/cdp/WebWorker.ts +8 -3
- package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +45 -1
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +20 -0
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +5 -17
- package/front_end/third_party/puppeteer/package/src/node/LaunchOptions.ts +23 -7
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +4 -0
- package/front_end/ui/components/annotations/AnnotationRepository.ts +153 -13
- package/front_end/ui/components/snackbars/Snackbars.docs.ts +0 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionTeaserPlaceholder.ts +12 -3
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +182 -0
- package/front_end/ui/components/text_editor/text_editor.ts +1 -0
- package/front_end/ui/helpers/OpenInNewTab.ts +5 -1
- package/front_end/ui/i18n/i18n.ts +9 -9
- package/front_end/ui/kit/icons/Icon.docs.ts +22 -65
- package/front_end/ui/kit/kit.ts +1 -0
- package/front_end/ui/kit/link/Link.docs.ts +15 -0
- package/front_end/ui/kit/link/Link.ts +151 -0
- package/front_end/ui/kit/link/link.css +27 -0
- package/front_end/ui/legacy/EmptyWidget.ts +6 -0
- package/front_end/ui/legacy/Floaty.ts +442 -0
- package/front_end/ui/legacy/InspectorView.ts +12 -0
- package/front_end/ui/legacy/ReportView.ts +1 -1
- package/front_end/ui/legacy/SelectMenu.docs.ts +0 -1
- package/front_end/ui/legacy/TabbedPane.ts +131 -53
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +36 -36
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +22 -37
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +31 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +2 -2
- package/front_end/ui/legacy/components/utils/Linkifier.ts +7 -11
- package/front_end/ui/legacy/floaty.css +77 -0
- package/front_end/ui/legacy/legacy.ts +2 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +6 -0
- package/inspector_overlay/loadCSS.rollup.js +5 -4
- package/package.json +2 -2
- package/front_end/panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts +0 -99
- package/front_end/panels/recorder/components/SelectButton.ts +0 -304
- package/front_end/panels/recorder/controllers/controllers.ts +0 -7
- package/front_end/ui/components/chrome_link/ChromeLink.ts +0 -76
- package/front_end/ui/components/chrome_link/chromeLink.css +0 -12
- package/front_end/ui/components/chrome_link/chrome_link.ts +0 -9
- /package/front_end/panels/recorder/components/{selectButton.css → replaySection.css} +0 -0
|
@@ -176,19 +176,6 @@ const UIStrings = {
|
|
|
176
176
|
* @description Text that appears on a button for the manifest resource type filter.
|
|
177
177
|
*/
|
|
178
178
|
manifest: 'Manifest',
|
|
179
|
-
/**
|
|
180
|
-
* @description Text in App Manifest View of the Application panel
|
|
181
|
-
*/
|
|
182
|
-
noManifestDetected: 'No manifest detected',
|
|
183
|
-
/**
|
|
184
|
-
* @description Description text on manifests in App Manifest View of the Application panel which describes the app manifest view tab
|
|
185
|
-
*/
|
|
186
|
-
manifestDescription:
|
|
187
|
-
'A manifest defines how your app appears on phone’s home screens and what the app looks like on launch.',
|
|
188
|
-
/**
|
|
189
|
-
* @description Text in App Manifest View of the Application panel
|
|
190
|
-
*/
|
|
191
|
-
appManifest: 'Manifest',
|
|
192
179
|
/**
|
|
193
180
|
* @description Text in Application Panel Sidebar of the Application panel
|
|
194
181
|
*/
|
|
@@ -1156,10 +1143,7 @@ export class AppManifestTreeElement extends ApplicationPanelTreeElement {
|
|
|
1156
1143
|
const icon = createIcon('document');
|
|
1157
1144
|
this.setLeadingIcons([icon]);
|
|
1158
1145
|
self.onInvokeElement(this.listItemElement, this.onInvoke.bind(this));
|
|
1159
|
-
|
|
1160
|
-
i18nString(UIStrings.noManifestDetected), i18nString(UIStrings.manifestDescription));
|
|
1161
|
-
const reportView = new UI.ReportView.ReportView(i18nString(UIStrings.appManifest));
|
|
1162
|
-
this.view = new AppManifestView(emptyView, reportView, new Common.Throttler.Throttler(1000));
|
|
1146
|
+
this.view = new AppManifestView();
|
|
1163
1147
|
UI.ARIAUtils.setLabel(this.listItemElement, i18nString(UIStrings.onInvokeManifestAlert));
|
|
1164
1148
|
const handleExpansion = (hasManifest: boolean): void => {
|
|
1165
1149
|
this.setExpandable(hasManifest);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Copyright 2024 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 @devtools/no-imperative-dom-api */
|
|
5
4
|
|
|
6
5
|
/*
|
|
7
6
|
* Copyright (C) 2008 Nokia Inc. All rights reserved.
|
|
@@ -74,10 +73,9 @@ export class ExtensionStorageItemsView extends KeyValueStorageItemsView {
|
|
|
74
73
|
Common.ObjectWrapper.ObjectWrapper<ExtensionStorageItemsDispatcher.EventTypes>;
|
|
75
74
|
|
|
76
75
|
constructor(extensionStorage: ExtensionStorage, view?: KeyValueStorageItemsViewFunction) {
|
|
77
|
-
super(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
this.element.classList.add('storage-view', 'table');
|
|
76
|
+
super(
|
|
77
|
+
i18nString(UIStrings.extensionStorageItems), 'extension-storage', true, view, undefined,
|
|
78
|
+
{jslog: `${VisualLogging.pane().context('extension-storage-data')}`, classes: ['storage-view', 'table']});
|
|
81
79
|
|
|
82
80
|
this.extensionStorageItemsDispatcher =
|
|
83
81
|
new Common.ObjectWrapper.ObjectWrapper<ExtensionStorageItemsDispatcher.EventTypes>();
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
32
32
|
import * as Geometry from '../../models/geometry/geometry.js';
|
|
33
33
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
34
|
+
import type {WidgetOptions} from '../../ui/legacy/Widget.js';
|
|
34
35
|
import {Directives as LitDirectives, html, nothing, render} from '../../ui/lit/lit.js';
|
|
35
36
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
36
37
|
|
|
@@ -110,7 +111,7 @@ export abstract class KeyValueStorageItemsView extends UI.Widget.VBox {
|
|
|
110
111
|
|
|
111
112
|
constructor(
|
|
112
113
|
title: string, id: string, editable: boolean, view?: View,
|
|
113
|
-
metadataView?: ApplicationComponents.StorageMetadataView.StorageMetadataView) {
|
|
114
|
+
metadataView?: ApplicationComponents.StorageMetadataView.StorageMetadataView, opts?: WidgetOptions) {
|
|
114
115
|
metadataView ??= new ApplicationComponents.StorageMetadataView.StorageMetadataView();
|
|
115
116
|
if (!view) {
|
|
116
117
|
view = (input: ViewInput, output: ViewOutput, target: HTMLElement) => {
|
|
@@ -168,7 +169,7 @@ export abstract class KeyValueStorageItemsView extends UI.Widget.VBox {
|
|
|
168
169
|
target);
|
|
169
170
|
};
|
|
170
171
|
}
|
|
171
|
-
super();
|
|
172
|
+
super(opts);
|
|
172
173
|
this.metadataView = metadataView;
|
|
173
174
|
this.#editable = editable;
|
|
174
175
|
this.#view = view;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import '../../../ui/components/chrome_link/chrome_link.js';
|
|
6
5
|
import '../../../ui/components/expandable_list/expandable_list.js';
|
|
7
6
|
import '../../../ui/components/report_view/report_view.js';
|
|
8
7
|
import '../../../ui/legacy/legacy.js';
|
|
8
|
+
import '../../../ui/kit/kit.js';
|
|
9
9
|
|
|
10
10
|
import * as Common from '../../../core/common/common.js';
|
|
11
11
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
@@ -341,7 +341,7 @@ function maybeRenderReasonContext(explanation: Protocol.Page.BackForwardCacheNot
|
|
|
341
341
|
const link = 'chrome://extensions/?id=' + explanation.context as Platform.DevToolsPath.UrlString;
|
|
342
342
|
// clang-format off
|
|
343
343
|
return html`${i18nString(UIStrings.blockingExtensionId)}
|
|
344
|
-
<devtools-
|
|
344
|
+
<devtools-link .href=${link}>${explanation.context}</devtools-link>`;
|
|
345
345
|
// clang-format on
|
|
346
346
|
}
|
|
347
347
|
return nothing;
|
|
@@ -16,7 +16,7 @@ import * as Buttons from '../../../ui/components/buttons/buttons.js';
|
|
|
16
16
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
17
17
|
import emptyWidgetStyles from '../../../ui/legacy/emptyWidget.css.js';
|
|
18
18
|
import * as UI from '../../../ui/legacy/legacy.js';
|
|
19
|
-
import {html, render} from '../../../ui/lit/lit.js';
|
|
19
|
+
import {Directives, html, render} from '../../../ui/lit/lit.js';
|
|
20
20
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
21
21
|
|
|
22
22
|
import * as PreloadingComponents from './components/components.js';
|
|
@@ -25,6 +25,8 @@ import type * as PreloadingHelper from './helper/helper.js';
|
|
|
25
25
|
import preloadingViewStyles from './preloadingView.css.js';
|
|
26
26
|
import preloadingViewDropDownStyles from './preloadingViewDropDown.css.js';
|
|
27
27
|
|
|
28
|
+
const {createRef, ref} = Directives;
|
|
29
|
+
|
|
28
30
|
const UIStrings = {
|
|
29
31
|
/**
|
|
30
32
|
* @description DropDown title for filtering preloading attempts by rule set
|
|
@@ -195,10 +197,12 @@ export class PreloadingRuleSetView extends UI.Widget.VBox {
|
|
|
195
197
|
private focusedRuleSetId: Protocol.Preload.RuleSetId|null = null;
|
|
196
198
|
|
|
197
199
|
private readonly warningsContainer: HTMLDivElement;
|
|
198
|
-
private readonly warningsView = new
|
|
200
|
+
private readonly warningsView = new PreloadingComponents.PreloadingDisabledInfobar.PreloadingDisabledInfobar();
|
|
199
201
|
private readonly hsplit: HTMLElement;
|
|
200
202
|
private readonly ruleSetGrid = new PreloadingComponents.RuleSetGrid.RuleSetGrid();
|
|
201
|
-
private readonly
|
|
203
|
+
private readonly ruleSetGridContainerRef = createRef<HTMLDivElement>();
|
|
204
|
+
private readonly ruleSetDetailsRef:
|
|
205
|
+
Directives.Ref<UI.Widget.WidgetElement<PreloadingComponents.RuleSetDetailsView.RuleSetDetailsView>>;
|
|
202
206
|
|
|
203
207
|
private shouldPrettyPrint = Common.Settings.Settings.instance().moduleSetting('auto-pretty-print-minified').get();
|
|
204
208
|
|
|
@@ -212,8 +216,9 @@ export class PreloadingRuleSetView extends UI.Widget.VBox {
|
|
|
212
216
|
SDK.PreloadingModel.PreloadingModel, SDK.PreloadingModel.Events.MODEL_UPDATED, this.render, this,
|
|
213
217
|
{scoped: true});
|
|
214
218
|
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
215
|
-
SDK.PreloadingModel.PreloadingModel, SDK.PreloadingModel.Events.WARNINGS_UPDATED,
|
|
216
|
-
|
|
219
|
+
SDK.PreloadingModel.PreloadingModel, SDK.PreloadingModel.Events.WARNINGS_UPDATED, e => {
|
|
220
|
+
Object.assign(this.warningsView, e.data);
|
|
221
|
+
}, this, {scoped: true});
|
|
217
222
|
|
|
218
223
|
// this (VBox)
|
|
219
224
|
// +- warningsContainer
|
|
@@ -232,7 +237,10 @@ export class PreloadingRuleSetView extends UI.Widget.VBox {
|
|
|
232
237
|
this.contentElement.insertBefore(this.warningsContainer, this.contentElement.firstChild);
|
|
233
238
|
this.warningsView.show(this.warningsContainer);
|
|
234
239
|
|
|
235
|
-
this.ruleSetGrid.addEventListener(
|
|
240
|
+
this.ruleSetGrid.addEventListener(
|
|
241
|
+
PreloadingComponents.RuleSetGrid.Events.SELECT, this.onRuleSetsGridCellFocused, this);
|
|
242
|
+
this.ruleSetDetailsRef =
|
|
243
|
+
createRef<UI.Widget.WidgetElement<PreloadingComponents.RuleSetDetailsView.RuleSetDetailsView>>();
|
|
236
244
|
const onPrettyPrintToggle = (): void => {
|
|
237
245
|
this.shouldPrettyPrint = !this.shouldPrettyPrint;
|
|
238
246
|
this.updateRuleSetDetails();
|
|
@@ -253,11 +261,13 @@ export class PreloadingRuleSetView extends UI.Widget.VBox {
|
|
|
253
261
|
</div>
|
|
254
262
|
</div>
|
|
255
263
|
<devtools-split-view sidebar-position="second">
|
|
256
|
-
<div slot="main">
|
|
257
|
-
${this.ruleSetGrid}
|
|
264
|
+
<div slot="main" ${ref(this.ruleSetGridContainerRef)}>
|
|
258
265
|
</div>
|
|
259
266
|
<div slot="sidebar" jslog=${VisualLogging.section('rule-set-details')}>
|
|
260
|
-
|
|
267
|
+
<devtools-widget .widgetConfig=${UI.Widget.widgetConfig(PreloadingComponents.RuleSetDetailsView.RuleSetDetailsView, {
|
|
268
|
+
ruleSet: this.getRuleSet(),
|
|
269
|
+
shouldPrettyPrint: this.shouldPrettyPrint,
|
|
270
|
+
})} ${ref(this.ruleSetDetailsRef)}></devtools-widget>
|
|
261
271
|
</div>
|
|
262
272
|
</devtools-split-view>
|
|
263
273
|
<div class="pretty-print-button" style="border-top: 1px solid var(--sys-color-divider)">
|
|
@@ -298,10 +308,12 @@ export class PreloadingRuleSetView extends UI.Widget.VBox {
|
|
|
298
308
|
}
|
|
299
309
|
|
|
300
310
|
private updateRuleSetDetails(): void {
|
|
301
|
-
const
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
|
|
311
|
+
const ruleSet = this.getRuleSet();
|
|
312
|
+
const widget = this.ruleSetDetailsRef.value?.getWidget();
|
|
313
|
+
if (widget) {
|
|
314
|
+
widget.shouldPrettyPrint = this.shouldPrettyPrint;
|
|
315
|
+
widget.ruleSet = ruleSet;
|
|
316
|
+
}
|
|
305
317
|
|
|
306
318
|
if (ruleSet === null) {
|
|
307
319
|
this.hsplit.setAttribute('sidebar-visibility', 'hidden');
|
|
@@ -310,6 +322,11 @@ export class PreloadingRuleSetView extends UI.Widget.VBox {
|
|
|
310
322
|
}
|
|
311
323
|
}
|
|
312
324
|
|
|
325
|
+
private getRuleSet(): Protocol.Preload.RuleSet|null {
|
|
326
|
+
const id = this.focusedRuleSetId;
|
|
327
|
+
return id === null ? null : this.model.getRuleSetById(id);
|
|
328
|
+
}
|
|
329
|
+
|
|
313
330
|
render(): void {
|
|
314
331
|
// Update rule sets grid
|
|
315
332
|
const countsByRuleSetId = this.model.getPreloadCountsByRuleSetId();
|
|
@@ -320,14 +337,18 @@ export class PreloadingRuleSetView extends UI.Widget.VBox {
|
|
|
320
337
|
preloadsStatusSummary: PreloadingUIUtils.preloadsStatusSummary(countsByStatus),
|
|
321
338
|
};
|
|
322
339
|
});
|
|
323
|
-
this.ruleSetGrid.
|
|
340
|
+
this.ruleSetGrid.data = {rows: ruleSetRows, pageURL: pageURL()};
|
|
324
341
|
this.contentElement.classList.toggle('empty', ruleSetRows.length === 0);
|
|
325
342
|
this.updateRuleSetDetails();
|
|
343
|
+
|
|
344
|
+
const container = this.ruleSetGridContainerRef.value;
|
|
345
|
+
if (container && this.ruleSetGrid.element.parentElement !== container) {
|
|
346
|
+
this.ruleSetGrid.show(container);
|
|
347
|
+
}
|
|
326
348
|
}
|
|
327
349
|
|
|
328
|
-
private onRuleSetsGridCellFocused(event:
|
|
329
|
-
|
|
330
|
-
this.focusedRuleSetId = focusedEvent.detail;
|
|
350
|
+
private onRuleSetsGridCellFocused(event: Common.EventTarget.EventTargetEvent<Protocol.Preload.RuleSetId>): void {
|
|
351
|
+
this.focusedRuleSetId = event.data;
|
|
331
352
|
this.render();
|
|
332
353
|
}
|
|
333
354
|
|
|
@@ -338,10 +359,6 @@ export class PreloadingRuleSetView extends UI.Widget.VBox {
|
|
|
338
359
|
getRuleSetGridForTest(): PreloadingComponents.RuleSetGrid.RuleSetGrid {
|
|
339
360
|
return this.ruleSetGrid;
|
|
340
361
|
}
|
|
341
|
-
|
|
342
|
-
getRuleSetDetailsForTest(): PreloadingComponents.RuleSetDetailsView.RuleSetDetailsView {
|
|
343
|
-
return this.ruleSetDetails;
|
|
344
|
-
}
|
|
345
362
|
}
|
|
346
363
|
|
|
347
364
|
export class PreloadingAttemptView extends UI.Widget.VBox {
|
|
@@ -351,7 +368,7 @@ export class PreloadingAttemptView extends UI.Widget.VBox {
|
|
|
351
368
|
private focusedPreloadingAttemptId: SDK.PreloadingModel.PreloadingAttemptId|null = null;
|
|
352
369
|
|
|
353
370
|
private readonly warningsContainer: HTMLDivElement;
|
|
354
|
-
private readonly warningsView = new
|
|
371
|
+
private readonly warningsView = new PreloadingComponents.PreloadingDisabledInfobar.PreloadingDisabledInfobar();
|
|
355
372
|
private readonly preloadingGrid = new PreloadingComponents.PreloadingGrid.PreloadingGrid();
|
|
356
373
|
private readonly preloadingDetails =
|
|
357
374
|
new PreloadingComponents.PreloadingDetailsReportView.PreloadingDetailsReportView();
|
|
@@ -370,8 +387,9 @@ export class PreloadingAttemptView extends UI.Widget.VBox {
|
|
|
370
387
|
SDK.PreloadingModel.PreloadingModel, SDK.PreloadingModel.Events.MODEL_UPDATED, this.render, this,
|
|
371
388
|
{scoped: true});
|
|
372
389
|
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
373
|
-
SDK.PreloadingModel.PreloadingModel, SDK.PreloadingModel.Events.WARNINGS_UPDATED,
|
|
374
|
-
|
|
390
|
+
SDK.PreloadingModel.PreloadingModel, SDK.PreloadingModel.Events.WARNINGS_UPDATED, e => {
|
|
391
|
+
Object.assign(this.warningsView, e.data);
|
|
392
|
+
}, this, {scoped: true});
|
|
375
393
|
|
|
376
394
|
// this (VBox)
|
|
377
395
|
// +- warningsContainer
|
|
@@ -515,7 +533,7 @@ export class PreloadingSummaryView extends UI.Widget.VBox {
|
|
|
515
533
|
private model: SDK.PreloadingModel.PreloadingModel;
|
|
516
534
|
|
|
517
535
|
private readonly warningsContainer: HTMLDivElement;
|
|
518
|
-
private readonly warningsView = new
|
|
536
|
+
private readonly warningsView = new PreloadingComponents.PreloadingDisabledInfobar.PreloadingDisabledInfobar();
|
|
519
537
|
private readonly usedPreloading = new PreloadingComponents.UsedPreloadingView.UsedPreloadingView();
|
|
520
538
|
|
|
521
539
|
constructor(model: SDK.PreloadingModel.PreloadingModel) {
|
|
@@ -531,8 +549,9 @@ export class PreloadingSummaryView extends UI.Widget.VBox {
|
|
|
531
549
|
SDK.PreloadingModel.PreloadingModel, SDK.PreloadingModel.Events.MODEL_UPDATED, this.render, this,
|
|
532
550
|
{scoped: true});
|
|
533
551
|
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
534
|
-
SDK.PreloadingModel.PreloadingModel, SDK.PreloadingModel.Events.WARNINGS_UPDATED,
|
|
535
|
-
|
|
552
|
+
SDK.PreloadingModel.PreloadingModel, SDK.PreloadingModel.Events.WARNINGS_UPDATED, e => {
|
|
553
|
+
Object.assign(this.warningsView, e.data);
|
|
554
|
+
}, this, {scoped: true});
|
|
536
555
|
|
|
537
556
|
this.warningsContainer = document.createElement('div');
|
|
538
557
|
this.warningsContainer.classList.add('flex-none');
|
|
@@ -715,21 +734,3 @@ class PreloadingRuleSetSelector implements
|
|
|
715
734
|
_toElement: Element|null): void {
|
|
716
735
|
}
|
|
717
736
|
}
|
|
718
|
-
|
|
719
|
-
export class PreloadingWarningsView extends UI.Widget.VBox {
|
|
720
|
-
private readonly infobar = new PreloadingComponents.PreloadingDisabledInfobar.PreloadingDisabledInfobar();
|
|
721
|
-
|
|
722
|
-
constructor() {
|
|
723
|
-
super();
|
|
724
|
-
this.registerRequiredCSS(emptyWidgetStyles);
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
override wasShown(): void {
|
|
728
|
-
super.wasShown();
|
|
729
|
-
this.contentElement.append(this.infobar);
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
onWarningsUpdated(args: Common.EventTarget.EventTargetEvent<Protocol.Preload.PreloadEnabledStateUpdatedEvent>): void {
|
|
733
|
-
this.infobar.data = args.data;
|
|
734
|
-
}
|
|
735
|
-
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Copyright 2023 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 @devtools/no-lit-render-outside-of-view */
|
|
5
4
|
|
|
6
5
|
import '../../../../ui/legacy/components/data_grid/data_grid.js';
|
|
7
6
|
|
|
@@ -10,8 +9,7 @@ import type * as Platform from '../../../../core/platform/platform.js';
|
|
|
10
9
|
import * as SDK from '../../../../core/sdk/sdk.js';
|
|
11
10
|
import type * as Protocol from '../../../../generated/protocol.js';
|
|
12
11
|
import * as Diff from '../../../../third_party/diff/diff.js';
|
|
13
|
-
import * as
|
|
14
|
-
import type * as UI from '../../../../ui/legacy/legacy.js';
|
|
12
|
+
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
15
13
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
16
14
|
|
|
17
15
|
import {capitalizedAction} from './PreloadingString.js';
|
|
@@ -88,6 +86,70 @@ class PreloadingUIUtils {
|
|
|
88
86
|
}
|
|
89
87
|
}
|
|
90
88
|
|
|
89
|
+
export interface ViewInput {
|
|
90
|
+
rows: MismatchedPreloadingGridRow[];
|
|
91
|
+
pageURL: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const DEFAULT_VIEW = (input: ViewInput, _output: Record<string, never>, target: HTMLElement): void => {
|
|
95
|
+
// clang-format off
|
|
96
|
+
render(html`
|
|
97
|
+
<devtools-data-grid striped inline>
|
|
98
|
+
<table>
|
|
99
|
+
<tr>
|
|
100
|
+
<th id="url" weight="40" sortable>
|
|
101
|
+
${i18nString(UIStrings.url)}
|
|
102
|
+
</th>
|
|
103
|
+
<th id="action" weight="15" sortable>
|
|
104
|
+
${i18nString(UIStrings.action)}
|
|
105
|
+
</th>
|
|
106
|
+
<th id="status" weight="15" sortable>
|
|
107
|
+
${i18nString(UIStrings.status)}
|
|
108
|
+
</th>
|
|
109
|
+
</tr>
|
|
110
|
+
${input.rows
|
|
111
|
+
.map(row => ({
|
|
112
|
+
row,
|
|
113
|
+
diffScore: Diff.Diff.DiffWrapper.characterScore(row.url, input.pageURL),
|
|
114
|
+
}))
|
|
115
|
+
.sort((a, b) => b.diffScore - a.diffScore)
|
|
116
|
+
.map(({row}) => html`
|
|
117
|
+
<tr>
|
|
118
|
+
<td>
|
|
119
|
+
<div>${charDiff(row.url, input.pageURL).map(diffOp => {
|
|
120
|
+
const s = diffOp[1];
|
|
121
|
+
switch (diffOp[0]) {
|
|
122
|
+
case Diff.Diff.Operation.Equal:
|
|
123
|
+
return html`<span>${s}</span>`;
|
|
124
|
+
case Diff.Diff.Operation.Insert:
|
|
125
|
+
return html`<span style=${styleMap({
|
|
126
|
+
color: 'var(--sys-color-green)',
|
|
127
|
+
'text-decoration': 'line-through'
|
|
128
|
+
})}
|
|
129
|
+
>${s}</span>`;
|
|
130
|
+
case Diff.Diff.Operation.Delete:
|
|
131
|
+
return html`<span style=${styleMap({color: 'var(--sys-color-error)'})}>${s}</span>`;
|
|
132
|
+
case Diff.Diff.Operation.Edit:
|
|
133
|
+
return html`<span style=${styleMap({
|
|
134
|
+
color: 'var(--sys-color-green',
|
|
135
|
+
'text-decoration': 'line-through'
|
|
136
|
+
})}
|
|
137
|
+
>${s}</span>`;
|
|
138
|
+
default:
|
|
139
|
+
throw new Error('unreachable');
|
|
140
|
+
}
|
|
141
|
+
})}
|
|
142
|
+
</div>
|
|
143
|
+
</td>
|
|
144
|
+
<td>${capitalizedAction(row.action)}</td>
|
|
145
|
+
<td>${PreloadingUIUtils.status(row.status)}</td>
|
|
146
|
+
</tr>
|
|
147
|
+
`)}
|
|
148
|
+
</table>
|
|
149
|
+
</devtools-data-grid>`, target);
|
|
150
|
+
// clang-format on
|
|
151
|
+
};
|
|
152
|
+
|
|
91
153
|
export interface MismatchedPreloadingGridRow {
|
|
92
154
|
action: Protocol.Preload.SpeculationAction;
|
|
93
155
|
url: string;
|
|
@@ -99,90 +161,33 @@ export interface MismatchedPreloadingGridData {
|
|
|
99
161
|
rows: MismatchedPreloadingGridRow[];
|
|
100
162
|
}
|
|
101
163
|
|
|
164
|
+
type ViewFunction = typeof DEFAULT_VIEW;
|
|
165
|
+
|
|
102
166
|
/** Grid component to show prerendering attempts. **/
|
|
103
|
-
export class MismatchedPreloadingGrid extends
|
|
104
|
-
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
167
|
+
export class MismatchedPreloadingGrid extends UI.Widget.Widget {
|
|
105
168
|
#data: MismatchedPreloadingGridData|null = null;
|
|
169
|
+
#view: ViewFunction;
|
|
106
170
|
|
|
107
|
-
|
|
108
|
-
|
|
171
|
+
constructor(element?: HTMLElement, view: typeof DEFAULT_VIEW = DEFAULT_VIEW) {
|
|
172
|
+
super(element, {classes: ['devtools-resources-mismatched-preloading-grid'], useShadowDom: true});
|
|
173
|
+
this.#view = view;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
override wasShown(): void {
|
|
177
|
+
super.wasShown();
|
|
178
|
+
this.requestUpdate();
|
|
109
179
|
}
|
|
110
180
|
|
|
111
181
|
set data(data: MismatchedPreloadingGridData) {
|
|
112
182
|
this.#data = data;
|
|
113
|
-
this
|
|
183
|
+
this.requestUpdate();
|
|
114
184
|
}
|
|
115
185
|
|
|
116
|
-
|
|
186
|
+
override performUpdate(): void {
|
|
117
187
|
if (!this.#data) {
|
|
118
188
|
return;
|
|
119
189
|
}
|
|
120
190
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
render(
|
|
124
|
-
html`<devtools-data-grid striped inline>
|
|
125
|
-
<table>
|
|
126
|
-
<tr>
|
|
127
|
-
<th id="url" weight="40" sortable>
|
|
128
|
-
${i18nString(UIStrings.url)}
|
|
129
|
-
</th>
|
|
130
|
-
<th id="action" weight="15" sortable>
|
|
131
|
-
${i18nString(UIStrings.action)}
|
|
132
|
-
</th>
|
|
133
|
-
<th id="status" weight="15" sortable>
|
|
134
|
-
${i18nString(UIStrings.status)}
|
|
135
|
-
</th>
|
|
136
|
-
</tr>
|
|
137
|
-
${
|
|
138
|
-
this.#data.rows
|
|
139
|
-
.map(row => ({
|
|
140
|
-
row,
|
|
141
|
-
diffScore: Diff.Diff.DiffWrapper.characterScore(row.url, pageURL),
|
|
142
|
-
}))
|
|
143
|
-
.sort((a, b) => b.diffScore - a.diffScore)
|
|
144
|
-
.map(({row}) => html`
|
|
145
|
-
<tr>
|
|
146
|
-
<td>
|
|
147
|
-
<div>${charDiff(row.url, pageURL).map(diffOp => {
|
|
148
|
-
const s = diffOp[1];
|
|
149
|
-
switch (diffOp[0]) {
|
|
150
|
-
case Diff.Diff.Operation.Equal:
|
|
151
|
-
return html`<span>${s}</span>`;
|
|
152
|
-
case Diff.Diff.Operation.Insert:
|
|
153
|
-
return html`<span style=${styleMap({
|
|
154
|
-
color: 'var(--sys-color-green)',
|
|
155
|
-
'text-decoration': 'line-through'
|
|
156
|
-
})}
|
|
157
|
-
>${s}</span>`;
|
|
158
|
-
case Diff.Diff.Operation.Delete:
|
|
159
|
-
return html`<span style=${styleMap({color: 'var(--sys-color-error)'})}>${s}</span>`;
|
|
160
|
-
case Diff.Diff.Operation.Edit:
|
|
161
|
-
return html`<span style=${styleMap({
|
|
162
|
-
color: 'var(--sys-color-green',
|
|
163
|
-
'text-decoration': 'line-through'
|
|
164
|
-
})}
|
|
165
|
-
>${s}</span>`;
|
|
166
|
-
default:
|
|
167
|
-
throw new Error('unreachable');
|
|
168
|
-
}
|
|
169
|
-
})}
|
|
170
|
-
</div>
|
|
171
|
-
</td>
|
|
172
|
-
<td>${capitalizedAction(row.action)}</td>
|
|
173
|
-
<td>${PreloadingUIUtils.status(row.status)}</td>
|
|
174
|
-
</tr>
|
|
175
|
-
`)}
|
|
176
|
-
</table>
|
|
177
|
-
</devtools-data-grid>`,
|
|
178
|
-
this.#shadow, {host: this});
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
customElements.define('devtools-resources-mismatched-preloading-grid', MismatchedPreloadingGrid);
|
|
183
|
-
|
|
184
|
-
declare global {
|
|
185
|
-
interface HTMLElementTagNameMap {
|
|
186
|
-
'devtools-resources-mismatched-preloading-grid': MismatchedPreloadingGrid;
|
|
191
|
+
this.#view(this.#data, {}, this.contentElement);
|
|
187
192
|
}
|
|
188
193
|
}
|