chrome-devtools-frontend 1.0.1684555 → 1.0.1689415
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/.agents/skills/gerrit-cli/SKILL.md +29 -8
- package/.agents/skills/gerrit-cli/references/commands.md +51 -18
- package/.agents/skills/gerrit-cli/references/workflows.md +6 -6
- package/.agents/skills/gerrit-cli/scripts/import_upstream.py +43 -70
- package/config/typescript/tsconfig.base.json +1 -0
- package/config/typescript/tsconfig.eslint.json +9 -0
- package/docs/contributing/issues.md +1 -1
- package/docs/styleguide/ux/writing.md +2 -2
- package/eslint.config.mjs +18 -10
- package/front_end/core/common/Base64.ts +1 -1
- package/front_end/core/common/Color.ts +28 -6
- package/front_end/core/common/ColorConverter.ts +12 -0
- package/front_end/core/common/Console.ts +2 -1
- package/front_end/core/common/Object.ts +2 -2
- package/front_end/core/common/ResourceType.ts +12 -13
- package/front_end/core/common/Revealer.ts +1 -1
- package/front_end/core/common/Settings.ts +2 -2
- package/front_end/core/common/TextDictionary.ts +2 -2
- package/front_end/core/common/Throttler.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -2
- package/front_end/core/host/UserMetrics.ts +51 -37
- package/front_end/core/host/host.ts +1 -1
- package/front_end/core/i18n/i18nImpl.ts +1 -1
- package/front_end/core/platform/HostRuntime.ts +3 -3
- package/front_end/core/platform/KeyboardUtilities.ts +1 -1
- package/front_end/core/protocol_client/InspectorBackend.ts +7 -6
- package/front_end/core/root/Runtime.ts +4 -2
- package/front_end/core/sdk/AnimationModel.ts +1 -1
- package/front_end/core/sdk/CPUThrottlingManager.ts +198 -0
- package/front_end/core/sdk/CSSMetadata.ts +11 -6
- package/front_end/core/sdk/CSSPropertyParser.ts +5 -3
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +90 -59
- package/front_end/core/sdk/ConsoleModel.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +3 -3
- package/front_end/core/sdk/DebuggerModel.ts +1 -1
- package/front_end/core/sdk/EmulationModel.ts +5 -0
- package/front_end/core/sdk/LayerTreeBase.ts +1 -1
- package/front_end/core/sdk/NetworkManager.ts +1 -1
- package/front_end/core/sdk/README.md +40 -0
- package/front_end/core/sdk/RehydratingConnection.ts +1 -1
- package/front_end/core/sdk/RemoteObject.ts +1 -1
- package/front_end/core/sdk/ResourceTreeModel.ts +2 -2
- package/front_end/core/sdk/SDKModel.ts +1 -1
- package/front_end/core/sdk/SDKSettings.ts +6 -0
- package/front_end/core/sdk/Script.ts +2 -1
- package/front_end/core/sdk/SecurityOrigin.ts +48 -0
- package/front_end/core/sdk/ServiceWorkerManager.ts +75 -17
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/core/text_utils/ContentData.ts +1 -1
- package/front_end/entrypoints/formatter_worker/FormattedContentBuilder.ts +3 -1
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +1 -1
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +2 -2
- package/front_end/entrypoints/formatter_worker/Substitute.ts +1 -1
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +1 -1
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +1 -1
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +1 -1
- package/front_end/entrypoints/inspector_main/nodeIcon.css +1 -1
- package/front_end/entrypoints/inspector_main/outermostTargetSelector.css +3 -3
- package/front_end/entrypoints/inspector_main/renderingOptions.css +3 -3
- package/front_end/entrypoints/js_app/js_app.ts +25 -9
- package/front_end/entrypoints/node_app/app/nodeConnectionsPanel.css +5 -5
- package/front_end/entrypoints/node_app/node_app.ts +1 -1
- package/front_end/generated/ARIAProperties.ts +39 -1
- package/front_end/generated/InspectorBackendCommands.ts +2 -1
- package/front_end/generated/SupportedCSSProperties.ts +60 -119
- package/front_end/generated/protocol-mapping.d.ts +9 -0
- package/front_end/generated/protocol-proxy-api.d.ts +7 -0
- package/front_end/generated/protocol.ts +12 -2
- package/front_end/models/ai_assistance/AiAgent2.ts +13 -7
- package/front_end/models/ai_assistance/AiConversation.ts +8 -17
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +2 -2
- package/front_end/models/ai_assistance/AiUtils.ts +16 -0
- package/front_end/models/ai_assistance/EvaluateAction.ts +1 -1
- package/front_end/models/ai_assistance/README.md +1 -1
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +2 -3
- package/front_end/models/ai_assistance/agents/AiAgent.ts +29 -6
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +4 -3
- package/front_end/models/ai_assistance/agents/FileAgent.ts +2 -2
- package/front_end/models/ai_assistance/agents/NetworkAgent.ts +2 -2
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +7 -5
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +9 -7
- package/front_end/models/ai_assistance/ai_assistance.ts +8 -0
- package/front_end/models/ai_assistance/contexts/AccessibilityContext.ts +16 -1
- package/front_end/models/ai_assistance/contexts/FileContext.ts +6 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +150 -325
- package/front_end/models/ai_assistance/injected.ts +5 -3
- package/front_end/models/ai_assistance/performance/AIContext.ts +1 -1
- package/front_end/models/ai_assistance/skills/README.md +1 -1
- package/front_end/models/ai_assistance/skills/accessibility.md +19 -10
- package/front_end/models/ai_assistance/skills/network.md +13 -7
- package/front_end/models/ai_assistance/skills/performance.md +22 -16
- package/front_end/models/ai_assistance/skills/sources.md +13 -7
- package/front_end/models/ai_assistance/skills/storage.md +19 -18
- package/front_end/models/ai_assistance/skills/styling.md +30 -37
- package/front_end/models/ai_assistance/tools/CookieUtils.ts +120 -0
- package/front_end/models/ai_assistance/tools/DOMStorageUtils.ts +53 -4
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +8 -32
- package/front_end/models/ai_assistance/tools/GetCookieValues.ts +146 -0
- package/front_end/models/ai_assistance/tools/GetDetailedCallTree.ts +11 -9
- package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +17 -5
- package/front_end/models/ai_assistance/tools/GetFunctionCode.ts +12 -11
- package/front_end/models/ai_assistance/tools/GetInsightDetails.ts +11 -11
- package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +3 -2
- package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +3 -3
- package/front_end/models/ai_assistance/tools/GetResourceContent.ts +12 -12
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +3 -2
- package/front_end/models/ai_assistance/tools/GetStorageBreakdown.ts +132 -0
- package/front_end/models/ai_assistance/tools/GetStorageValues.ts +17 -4
- package/front_end/models/ai_assistance/tools/GetStyles.ts +3 -3
- package/front_end/models/ai_assistance/tools/GetTraceEventByKey.ts +9 -8
- package/front_end/models/ai_assistance/tools/GetTraceMainThreadSummary.ts +13 -14
- package/front_end/models/ai_assistance/tools/GetTraceNetworkSummary.ts +12 -10
- package/front_end/models/ai_assistance/tools/ListCookies.ts +93 -0
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +15 -6
- package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +3 -3
- package/front_end/models/ai_assistance/tools/ListSources.ts +5 -3
- package/front_end/models/ai_assistance/tools/ListStorageKeys.ts +16 -4
- package/front_end/models/ai_assistance/tools/RecordPerformanceTrace.ts +3 -2
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +4 -3
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +9 -9
- package/front_end/models/ai_assistance/tools/SelectTraceEventByKey.ts +9 -8
- package/front_end/models/ai_assistance/tools/Tool.ts +21 -11
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +41 -8
- package/front_end/models/badges/AiExplorerBadge.ts +3 -3
- package/front_end/models/badges/CodeWhispererBadge.ts +2 -2
- package/front_end/models/badges/DOMDetectiveBadge.ts +3 -3
- package/front_end/models/badges/SpeedsterBadge.ts +3 -3
- package/front_end/models/badges/StarterBadge.ts +4 -4
- package/front_end/models/bindings/CompilerScriptMapping.ts +11 -2
- package/front_end/models/bindings/ContentProviderBasedProject.ts +3 -2
- package/front_end/models/breakpoints/BreakpointManager.ts +1 -1
- package/front_end/models/emulation/EmulatedDevices.ts +2 -2
- package/front_end/models/formatter/FormatterWorkerPool.ts +2 -2
- package/front_end/models/formatter/ScriptFormatter.ts +1 -2
- package/front_end/models/geometry/GeometryImpl.ts +2 -2
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +1 -1
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +3 -2
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +5 -5
- package/front_end/models/issues_manager/GenericIssue.ts +18 -18
- package/front_end/models/issues_manager/StylesheetLoadingIssue.ts +1 -1
- package/front_end/models/javascript_metadata/{NativeFunctions.js → NativeFunctions.ts} +25 -9
- package/front_end/models/live-metrics/LiveMetrics.ts +9 -3
- package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +58 -6
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +2 -62
- package/front_end/models/network_time_calculator/RequestTimeRanges.ts +2 -2
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +5 -0
- package/front_end/models/persistence/IsolatedFileSystem.ts +1 -1
- package/front_end/models/persistence/NetworkPersistenceManager.ts +35 -6
- package/front_end/models/stack_trace/StackTraceImpl.ts +2 -2
- package/front_end/models/trace/LanternComputationData.ts +2 -3
- package/front_end/models/trace/extras/StackTraceForEvent.ts +3 -2
- package/front_end/models/trace/extras/ThirdParties.ts +9 -9
- package/front_end/models/trace/handlers/AsyncJSCallsHandler.ts +7 -4
- package/front_end/models/trace/handlers/FramesHandler.ts +3 -3
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +2 -2
- package/front_end/models/trace/handlers/SamplesHandler.ts +4 -2
- package/front_end/models/trace/handlers/UserInteractionsHandler.ts +1 -1
- package/front_end/models/trace/handlers/WarningsHandler.ts +2 -2
- package/front_end/models/trace/helpers/Network.ts +3 -3
- package/front_end/models/trace/helpers/Trace.ts +1 -1
- package/front_end/models/trace/insights/CLSCulprits.ts +2 -1
- package/front_end/models/trace/insights/Cache.ts +3 -1
- package/front_end/models/trace/insights/CharacterSet.ts +3 -1
- package/front_end/models/trace/insights/DOMSize.ts +3 -1
- package/front_end/models/trace/insights/DocumentLatency.ts +3 -1
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +3 -1
- package/front_end/models/trace/insights/FontDisplay.ts +2 -1
- package/front_end/models/trace/insights/ForcedReflow.ts +2 -1
- package/front_end/models/trace/insights/INPBreakdown.ts +3 -1
- package/front_end/models/trace/insights/ImageDelivery.ts +3 -1
- package/front_end/models/trace/insights/LCPBreakdown.ts +3 -1
- package/front_end/models/trace/insights/LCPDiscovery.ts +3 -1
- package/front_end/models/trace/insights/LegacyJavaScript.ts +3 -1
- package/front_end/models/trace/insights/ModernHTTP.ts +2 -1
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +2 -1
- package/front_end/models/trace/insights/RenderBlocking.ts +5 -4
- package/front_end/models/trace/insights/SlowCSSSelector.ts +3 -1
- package/front_end/models/trace/insights/ThirdParties.ts +5 -3
- package/front_end/models/trace/insights/Viewport.ts +2 -1
- package/front_end/models/trace/lantern/simulation/Constants.ts +34 -2
- package/front_end/models/trace/lantern/simulation/DNSCache.ts +1 -1
- package/front_end/models/trace/types/TraceEvents.ts +8 -3
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +2 -1
- package/front_end/models/workspace/WorkspaceImpl.ts +18 -2
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +686 -2
- package/front_end/panels/accessibility/accessibilityNode.css +4 -4
- package/front_end/panels/accessibility/accessibilityProperties.css +1 -1
- package/front_end/panels/accessibility/accessibilitySidebarView.css +2 -2
- package/front_end/panels/accessibility/axBreadcrumbs.css +13 -13
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +14 -14
- package/front_end/panels/ai_assistance/ExternalHandler.ts +1 -1
- package/front_end/panels/ai_assistance/aiAssistancePanel.css +1 -1
- package/front_end/panels/ai_assistance/components/ChatInput.ts +3 -2
- package/front_end/panels/ai_assistance/components/ChatView.ts +1 -1
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +1 -1
- package/front_end/panels/ai_assistance/components/ExploreWidget.ts +1 -1
- package/front_end/panels/ai_assistance/components/chatInput.css +12 -12
- package/front_end/panels/ai_assistance/components/chatMessage.css +16 -16
- package/front_end/panels/ai_assistance/components/chatView.css +2 -2
- package/front_end/panels/ai_assistance/components/exploreWidget.css +1 -1
- package/front_end/panels/ai_assistance/components/exportForAgentsDialog.css +4 -0
- package/front_end/panels/ai_assistance/components/walkthroughView.css +6 -6
- package/front_end/panels/animation/animationTimeline.css +62 -62
- package/front_end/panels/application/ApplicationPanelSidebar.ts +6 -1
- package/front_end/panels/application/BackgroundServiceView.ts +290 -252
- package/front_end/panels/application/WebMCPView.ts +15 -7
- package/front_end/panels/application/appManifestView.css +5 -5
- package/front_end/panels/application/backgroundServiceView.css +18 -2
- package/front_end/panels/application/components/AdsView.ts +100 -4
- package/front_end/panels/application/components/adsView.css +8 -5
- package/front_end/panels/application/components/backForwardCacheView.css +5 -5
- package/front_end/panels/application/components/bounceTrackingMitigationsView.css +1 -1
- package/front_end/panels/application/components/endpointsGrid.css +1 -1
- package/front_end/panels/application/components/permissionsPolicySection.css +1 -1
- package/front_end/panels/application/components/protocolHandlersView.css +6 -6
- package/front_end/panels/application/components/reportsGrid.css +1 -1
- package/front_end/panels/application/components/serviceWorkerRouterView.css +4 -4
- package/front_end/panels/application/components/trustTokensView.css +7 -7
- package/front_end/panels/application/cookieItemsView.css +3 -3
- package/front_end/panels/application/deviceBoundSessionsView.css +3 -3
- package/front_end/panels/application/frameDetailsReportView.css +11 -11
- package/front_end/panels/application/indexedDBViews.css +7 -7
- package/front_end/panels/application/originTrialTokenRows.css +2 -2
- package/front_end/panels/application/originTrialTreeView.css +3 -3
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.css +2 -2
- package/front_end/panels/application/preloading/components/preloadingDetailsReportView.css +1 -1
- package/front_end/panels/application/preloading/components/preloadingDisabledInfobar.css +2 -2
- package/front_end/panels/application/preloading/components/preloadingGrid.css +2 -2
- package/front_end/panels/application/preloading/components/usedPreloadingView.css +7 -7
- package/front_end/panels/application/preloading/preloadingView.css +1 -1
- package/front_end/panels/application/preloading/preloadingViewDropDown.css +3 -3
- package/front_end/panels/application/serviceWorkerCacheViews.css +5 -5
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +12 -12
- package/front_end/panels/application/serviceWorkersView.css +15 -16
- package/front_end/panels/application/storageView.css +5 -5
- package/front_end/panels/application/webMCPView.css +9 -9
- package/front_end/panels/autofill/autofillView.css +4 -4
- package/front_end/panels/browser_debugger/categorizedBreakpointsSidebarPane.css +4 -4
- package/front_end/panels/browser_debugger/domBreakpointsSidebarPane.css +5 -3
- package/front_end/panels/browser_debugger/xhrBreakpointsSidebarPane.css +4 -4
- package/front_end/panels/changes/changesSidebar.css +1 -1
- package/front_end/panels/changes/changesView.css +1 -1
- package/front_end/panels/changes/combinedDiffView.css +1 -1
- package/front_end/panels/common/CPUThrottlingOption.ts +5 -10
- package/front_end/panels/common/badgeNotification.css +2 -2
- package/front_end/panels/common/domLinkifier.css +1 -1
- package/front_end/panels/common/gdpSignUpDialog.css +3 -3
- package/front_end/panels/common/geminiRebrandPromoDialog.css +1 -1
- package/front_end/panels/console/ConsolePrompt.ts +6 -3
- package/front_end/panels/console/ConsoleView.ts +6 -3
- package/front_end/panels/console/ConsoleViewMessage.ts +3 -1
- package/front_end/panels/console/console-meta.ts +5 -24
- package/front_end/panels/console/consoleContextSelector.css +2 -2
- package/front_end/panels/console/consolePinPane.css +9 -9
- package/front_end/panels/console/consolePrompt.css +5 -5
- package/front_end/panels/console/consoleView.css +39 -39
- package/front_end/panels/coverage/coverageListView.css +2 -2
- package/front_end/panels/css_overview/cssOverviewCompletedView.css +34 -34
- package/front_end/panels/css_overview/cssOverviewProcessingView.css +5 -5
- package/front_end/panels/css_overview/cssOverviewSidebarPanel.css +1 -1
- package/front_end/panels/css_overview/cssOverviewStartView.css +17 -17
- package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +209 -62
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +4 -4
- package/front_end/panels/elements/DOMTreeContextMenu.ts +59 -54
- package/front_end/panels/elements/ElementsPanel.ts +1 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +130 -94
- package/front_end/panels/elements/ElementsTreeOutline.ts +1751 -363
- package/front_end/panels/elements/ShortcutTreeElement.ts +6 -3
- package/front_end/panels/elements/StylePropertiesSection.ts +65 -8
- package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +143 -8
- package/front_end/panels/elements/classesPaneWidget.css +6 -6
- package/front_end/panels/elements/components/stylePropertyEditor.css +7 -7
- package/front_end/panels/elements/computedStyleWidget.css +1 -1
- package/front_end/panels/elements/elementStatePaneWidget.css +8 -8
- package/front_end/panels/elements/elements-meta.ts +14 -0
- package/front_end/panels/elements/elementsPanel.css +4 -4
- package/front_end/panels/elements/elementsTreeOutline.css +222 -38
- package/front_end/panels/elements/layersWidget.css +4 -4
- package/front_end/panels/elements/layoutPane.css +18 -18
- package/front_end/panels/elements/metricsSidebarPane.css +11 -11
- package/front_end/panels/elements/platformFontsWidget.css +5 -5
- package/front_end/panels/elements/propertiesWidget.css +2 -2
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +20 -20
- package/front_end/panels/elements/stylesSidebarPane.css +37 -20
- package/front_end/panels/emulation/deviceModeView.css +49 -49
- package/front_end/panels/emulation/mediaQueryInspector.css +18 -18
- package/front_end/panels/event_listeners/eventListenersView.css +1 -1
- package/front_end/panels/explain/components/consoleInsight.css +29 -29
- package/front_end/panels/issues/components/elementsPanelLink.css +2 -2
- package/front_end/panels/issues/components/hideIssuesMenu.css +1 -1
- package/front_end/panels/issues/issuesPane.css +2 -2
- package/front_end/panels/issues/issuesTree.css +50 -50
- package/front_end/panels/layer_viewer/Layers3DView.ts +9 -10
- package/front_end/panels/layer_viewer/layerDetailsView.css +1 -1
- package/front_end/panels/layer_viewer/layerTreeOutline.css +2 -2
- package/front_end/panels/layer_viewer/layers3DView.css +1 -1
- package/front_end/panels/layer_viewer/paintProfiler.css +1 -1
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +2 -2
- package/front_end/panels/media/playerListView.css +9 -9
- package/front_end/panels/media/playerMessagesView.css +8 -8
- package/front_end/panels/media/playerPropertiesView.css +6 -6
- package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +1 -1
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +9 -9
- package/front_end/panels/network/NetworkDataGridNode.ts +1 -0
- package/front_end/panels/network/NetworkPanel.ts +9 -4
- package/front_end/panels/network/RequestConditionsDrawer.ts +12 -12
- package/front_end/panels/network/RequestPayloadView.ts +78 -26
- package/front_end/panels/network/binaryResourceView.css +1 -1
- package/front_end/panels/network/components/EditableSpan.css +3 -3
- package/front_end/panels/network/components/HeaderSectionRow.css +14 -14
- package/front_end/panels/network/components/RequestHeaderSection.css +7 -7
- package/front_end/panels/network/components/RequestHeadersView.css +18 -18
- package/front_end/panels/network/components/RequestTrustTokensView.css +1 -1
- package/front_end/panels/network/network-meta.ts +9 -9
- package/front_end/panels/network/networkConfigView.css +11 -11
- package/front_end/panels/network/networkLogView.css +35 -35
- package/front_end/panels/network/networkManageCustomHeadersView.css +1 -1
- package/front_end/panels/network/networkPanel.css +7 -7
- package/front_end/panels/network/networkTimingTable.css +13 -13
- package/front_end/panels/network/requestConditionsDrawer.css +4 -4
- package/front_end/panels/network/requestCookiesView.css +5 -5
- package/front_end/panels/network/requestDeviceBoundSessionsView.css +1 -1
- package/front_end/panels/network/requestHTMLView.css +1 -1
- package/front_end/panels/network/requestHeadersTree.css +19 -19
- package/front_end/panels/network/requestInitiatorView.css +1 -1
- package/front_end/panels/network/requestInitiatorViewTree.css +3 -3
- package/front_end/panels/network/requestPayloadTree.css +5 -5
- package/front_end/panels/network/requestPayloadView.css +1 -1
- package/front_end/panels/network/resourceChunkView.css +3 -3
- package/front_end/panels/network/signedExchangeInfoTree.css +6 -6
- package/front_end/panels/profiler/heapProfiler.css +15 -15
- package/front_end/panels/profiler/profileLauncherView.css +10 -10
- package/front_end/panels/recorder/RecordingView.ts +1 -1
- package/front_end/panels/recorder/StepEditor.ts +86 -7
- package/front_end/panels/recorder/TimelineSection.ts +2 -1
- package/front_end/panels/recorder/createRecordingView.css +17 -17
- package/front_end/panels/recorder/extensionView.css +5 -5
- package/front_end/panels/recorder/injected/RecordingClient.ts +1 -1
- package/front_end/panels/recorder/models/SchemaUtils.ts +2 -2
- package/front_end/panels/recorder/models/ScreenshotStorage.ts +1 -1
- package/front_end/panels/recorder/recorderPanel.css +7 -7
- package/front_end/panels/recorder/recordingListView.css +12 -12
- package/front_end/panels/recorder/recordingView.css +47 -47
- package/front_end/panels/recorder/stepEditor.css +2 -2
- package/front_end/panels/recorder/stepView.css +20 -20
- package/front_end/panels/recorder/timelineSection.css +9 -9
- package/front_end/panels/screencast/screencastView.css +12 -12
- package/front_end/panels/search/searchResultsPane.css +10 -10
- package/front_end/panels/search/searchView.css +9 -9
- package/front_end/panels/security/SecurityPanel.ts +84 -54
- package/front_end/panels/security/mainView.css +26 -26
- package/front_end/panels/security/originView.css +15 -15
- package/front_end/panels/sensors/locationsSettingsTab.css +6 -6
- package/front_end/panels/sensors/sensors.css +28 -28
- package/front_end/panels/settings/components/syncSection.css +5 -5
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +13 -13
- package/front_end/panels/settings/emulation/devicesSettingsTab.css +16 -16
- package/front_end/panels/settings/frameworkIgnoreListSettingsTab.css +2 -2
- package/front_end/panels/settings/keybindsSettingsTab.css +2 -2
- package/front_end/panels/settings/settingsScreen.css +5 -5
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -1
- package/front_end/panels/sources/breakpointEditDialog.css +9 -9
- package/front_end/panels/sources/breakpointsView.css +25 -25
- package/front_end/panels/sources/callStackSidebarPane.css +10 -10
- package/front_end/panels/sources/components/HeadersView.css +6 -6
- package/front_end/panels/sources/debuggerPausedMessage.css +4 -4
- package/front_end/panels/sources/dialog.css +2 -2
- package/front_end/panels/sources/navigatorTree.css +2 -2
- package/front_end/panels/sources/navigatorView.css +2 -2
- package/front_end/panels/sources/scopeChainSidebarPane.css +1 -1
- package/front_end/panels/sources/sourcesNavigator.css +1 -1
- package/front_end/panels/sources/sourcesPanel.css +2 -2
- package/front_end/panels/sources/sourcesView.css +1 -1
- package/front_end/panels/sources/threadsSidebarPane.css +5 -5
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +8 -8
- package/front_end/panels/timeline/TimelineDetailsView.ts +9 -21
- package/front_end/panels/timeline/TimelineFlameChartView.ts +3 -5
- package/front_end/panels/timeline/TimelineMiniMap.ts +3 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/breadcrumbsUI.css +3 -3
- package/front_end/panels/timeline/components/exportTraceOptions.css +1 -1
- package/front_end/panels/timeline/components/fieldSettingsDialog.css +13 -13
- package/front_end/panels/timeline/components/ignoreListSetting.css +3 -3
- package/front_end/panels/timeline/components/liveMetricsView.css +39 -39
- package/front_end/panels/timeline/components/metricCard.css +20 -20
- package/front_end/panels/timeline/components/networkRequestDetails.css +9 -9
- package/front_end/panels/timeline/components/networkRequestTooltip.css +14 -14
- package/front_end/panels/timeline/components/networkTrackWidget.css +2 -2
- package/front_end/panels/timeline/components/originMap.css +4 -4
- package/front_end/panels/timeline/components/relatedInsightChips.css +1 -1
- package/front_end/panels/timeline/components/sidebarAnnotationsTab.css +4 -4
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +5 -5
- package/front_end/panels/timeline/components/sidebarSingleInsightSet.css +1 -1
- package/front_end/panels/timeline/components/timelineSummary.css +4 -4
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +4 -4
- package/front_end/panels/timeline/overlays/components/EntriesLinkOverlay.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +6 -6
- package/front_end/panels/timeline/overlays/components/TimeRangeOverlay.ts +1 -1
- package/front_end/panels/timeline/thirdPartyTreeView.css +5 -5
- package/front_end/panels/timeline/timeline-meta.ts +0 -6
- package/front_end/panels/timeline/timelineDetailsView.css +11 -11
- package/front_end/panels/timeline/timelinePanel.css +20 -20
- package/front_end/panels/timeline/timelineTreeView.css +8 -8
- package/front_end/panels/webauthn/webauthnPane.css +6 -6
- package/front_end/panels/whats_new/ReleaseNoteText.ts +2 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/i18n/i18n-impl.ts +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +15 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +42 -8
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js +15 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts +14 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.js +23 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/Poller.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/Poller.js +77 -6
- package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/Poller.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +15 -1
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +16 -2
- package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +36 -1
- package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/injected/Poller.ts +86 -6
- 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/web-vitals/README.chromium +2 -2
- package/front_end/third_party/web-vitals/package/README.md +22 -7
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +6 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +30 -3
- package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.d.ts +14 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.js +19 -13
- package/front_end/third_party/web-vitals/package/dist/modules/lib/bindReporter.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/doubleRAF.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +3 -3
- package/front_end/third_party/web-vitals/package/dist/modules/lib/softNavs.js +3 -1
- package/front_end/third_party/web-vitals/package/dist/modules/types/lcp.d.ts +15 -1
- package/front_end/third_party/web-vitals/package/package.json +1 -2
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +9 -2
- package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +36 -5
- package/front_end/third_party/web-vitals/package/src/lib/InteractionManager.ts +21 -15
- package/front_end/third_party/web-vitals/package/src/lib/doubleRAF.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/softNavs.ts +4 -1
- package/front_end/third_party/web-vitals/package/src/types/lcp.ts +16 -1
- package/front_end/third_party/web-vitals/rebuild.sh +3 -3
- package/front_end/ui/comments/CommentAnchorResolver.ts +15 -4
- package/front_end/ui/comments/commentsOverlay.css +6 -5
- package/front_end/ui/components/adorners/Adorner.ts +1 -1
- package/front_end/ui/components/adorners/adorner.css +6 -6
- package/front_end/ui/components/buttons/FloatingButton.ts +1 -1
- package/front_end/ui/components/buttons/button.css +9 -9
- package/front_end/ui/components/buttons/floatingButton.css +2 -2
- package/front_end/ui/components/buttons/textButton.css +12 -12
- package/front_end/ui/components/dialogs/Dialog.ts +1 -1
- package/front_end/ui/components/dialogs/dialog.css +1 -1
- package/front_end/ui/components/diff_view/diffView.css +3 -3
- package/front_end/ui/components/expandable_list/expandableList.css +9 -9
- package/front_end/ui/components/highlighting/HighlightElement.ts +1 -1
- package/front_end/ui/components/highlighting/HighlightManager.ts +4 -0
- package/front_end/ui/components/icon_button/iconButton.css +2 -2
- package/front_end/ui/components/input/checkbox.css +8 -8
- package/front_end/ui/components/input/textInput.css +3 -3
- package/front_end/ui/components/issue_counter/issueLinkIcon.css +2 -2
- package/front_end/ui/components/linkifier/linkifierImpl.css +1 -1
- package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +1 -1
- package/front_end/ui/components/markdown_view/codeBlock.css +2 -2
- package/front_end/ui/components/markdown_view/markdownView.css +7 -7
- package/front_end/ui/components/menus/menuGroup.css +2 -2
- package/front_end/ui/components/menus/menuItem.css +2 -2
- package/front_end/ui/components/menus/selectMenu.css +2 -2
- package/front_end/ui/components/menus/selectMenuButton.css +4 -4
- package/front_end/ui/components/panel_feedback/panelFeedback.css +15 -15
- package/front_end/ui/components/panel_feedback/previewToggle.css +2 -2
- package/front_end/ui/components/panel_introduction_steps/panelIntroductionSteps.css +7 -7
- package/front_end/ui/components/report_view/report.css +3 -3
- package/front_end/ui/components/report_view/reportSectionDivider.css +1 -1
- package/front_end/ui/components/report_view/reportValue.css +1 -1
- package/front_end/ui/components/request_link_icon/requestLinkIcon.css +2 -2
- package/front_end/ui/components/settings/settingCheckbox.css +6 -6
- package/front_end/ui/components/text_editor/TextEditor.ts +3 -1
- package/front_end/ui/components/text_editor/config.ts +16 -4
- package/front_end/ui/kit/icons/icon.css +4 -4
- package/front_end/ui/kit/link/link.css +1 -1
- package/front_end/ui/legacy/ActionRegistration.ts +23 -23
- package/front_end/ui/legacy/Dialog.ts +1 -1
- package/front_end/ui/legacy/DockController.ts +3 -3
- package/front_end/ui/legacy/EmptyWidget.ts +13 -34
- package/front_end/ui/legacy/FilterBar.ts +4 -4
- package/front_end/ui/legacy/Infobar.ts +2 -2
- package/front_end/ui/legacy/InspectorDrawerView.ts +6 -6
- package/front_end/ui/legacy/InspectorView.ts +19 -26
- package/front_end/ui/legacy/ListWidget.ts +7 -7
- package/front_end/ui/legacy/PlusButton.ts +1 -3
- package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +6 -6
- package/front_end/ui/legacy/SearchableView.ts +16 -16
- package/front_end/ui/legacy/SoftContextMenu.ts +8 -8
- package/front_end/ui/legacy/SoftDropDown.ts +1 -1
- package/front_end/ui/legacy/SuggestBox.ts +2 -2
- package/front_end/ui/legacy/TabbedPane.ts +10 -10
- package/front_end/ui/legacy/TargetCrashedScreen.ts +2 -2
- package/front_end/ui/legacy/Toolbar.ts +5 -5
- package/front_end/ui/legacy/Treeoutline.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +80 -20
- package/front_end/ui/legacy/ViewManager.ts +1 -1
- package/front_end/ui/legacy/ViewRegistration.ts +7 -7
- package/front_end/ui/legacy/Widget.ts +5 -5
- package/front_end/ui/legacy/checkboxTextLabel.css +3 -3
- package/front_end/ui/legacy/components/color_picker/ColorFormatSpec.ts +16 -0
- package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +1 -0
- package/front_end/ui/legacy/components/color_picker/spectrum.css +90 -90
- package/front_end/ui/legacy/components/cookie_table/cookiesTable.css +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +26 -28
- package/front_end/ui/legacy/components/data_grid/ShowMoreDataGridNode.ts +3 -7
- package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +13 -13
- package/front_end/ui/legacy/components/inline_editor/colorSwatch.css +7 -7
- package/front_end/ui/legacy/components/inline_editor/cssAngleEditor.css +5 -5
- package/front_end/ui/legacy/components/inline_editor/cssShadowEditor.css +18 -18
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +104 -86
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +8 -6
- package/front_end/ui/legacy/components/object_ui/objectPopover.css +4 -4
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +6 -6
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +28 -11
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +0 -4
- package/front_end/ui/legacy/components/perf_ui/chartViewport.css +4 -4
- package/front_end/ui/legacy/components/perf_ui/filmStripView.css +6 -6
- package/front_end/ui/legacy/components/perf_ui/flameChart.css +7 -7
- package/front_end/ui/legacy/components/perf_ui/overviewGrid.css +11 -11
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +6 -6
- package/front_end/ui/legacy/components/perf_ui/timelineGrid.css +5 -5
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +3 -3
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/imageView.css +1 -1
- package/front_end/ui/legacy/components/source_frame/jsonView.css +1 -1
- package/front_end/ui/legacy/components/source_frame/resourceSourceFrame.css +1 -1
- package/front_end/ui/legacy/components/source_frame/xmlTree.css +3 -3
- package/front_end/ui/legacy/components/utils/imagePreview.css +1 -1
- package/front_end/ui/legacy/components/utils/jsUtils.css +10 -10
- package/front_end/ui/legacy/dropTarget.css +2 -2
- package/front_end/ui/legacy/emptyWidget.css +6 -0
- package/front_end/ui/legacy/filter.css +19 -19
- package/front_end/ui/legacy/infobar.css +2 -2
- package/front_end/ui/legacy/inspectorCommon.css +67 -67
- package/front_end/ui/legacy/inspectorDrawerTabbedPane.css +1 -1
- package/front_end/ui/legacy/listWidget.css +5 -5
- package/front_end/ui/legacy/progressIndicator.css +4 -4
- package/front_end/ui/legacy/reportView.css +7 -7
- package/front_end/ui/legacy/searchableView.css +5 -5
- package/front_end/ui/legacy/smallBubble.css +3 -3
- package/front_end/ui/legacy/softContextMenu.css +4 -4
- package/front_end/ui/legacy/softDropDownButton.css +1 -1
- package/front_end/ui/legacy/splitWidget.css +9 -31
- package/front_end/ui/legacy/suggestBox.css +4 -4
- package/front_end/ui/legacy/tabbedPane.css +17 -17
- package/front_end/ui/legacy/textPrompt.css +2 -2
- package/front_end/ui/legacy/toolbar.css +4 -4
- package/front_end/ui/legacy/treeoutline.css +14 -14
- package/front_end/ui/legacy/viewContainers.css +6 -6
- package/front_end/ui/settings/ConsoleSettings.ts +34 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +12 -0
- package/inspector_overlay/common.ts +12 -12
- package/inspector_overlay/css_grid_label_helpers.ts +16 -17
- package/inspector_overlay/drag_resize_handler.ts +2 -2
- package/inspector_overlay/highlight_common.ts +11 -13
- package/inspector_overlay/highlight_container_query.ts +2 -2
- package/inspector_overlay/highlight_flex_common.ts +6 -7
- package/inspector_overlay/highlight_grid_common.ts +3 -3
- package/inspector_overlay/highlight_isolated_element.ts +12 -3
- package/inspector_overlay/highlight_scroll_snap.ts +2 -2
- package/inspector_overlay/loadCSS.rollup.js +0 -1
- package/inspector_overlay/testing/InspectorOverlayHelpers.ts +13 -13
- package/inspector_overlay/tool_green_dev_anchors.ts +3 -3
- package/inspector_overlay/tool_highlight.ts +9 -9
- package/inspector_overlay/tool_paused.ts +4 -4
- package/inspector_overlay/tool_persistent.ts +11 -11
- package/inspector_overlay/tool_screenshot.ts +7 -7
- package/inspector_overlay/tool_source_order.ts +4 -4
- package/inspector_overlay/tool_viewport_size.ts +3 -3
- package/inspector_overlay/tool_window_controls.ts +4 -4
- package/mcp/mcp.ts +1 -0
- package/package.json +2 -2
- package/front_end/generated/protocol-tsconfig.json +0 -10
- package/front_end/panels/js_timeline/DIR_METADATA +0 -3
- package/front_end/panels/js_timeline/js_timeline-meta.ts +0 -193
- package/front_end/panels/js_timeline/js_timeline.ts +0 -1
- /package/front_end/entrypoints/{formatter_worker/FormatterActions.ts → formatter_actions/formatter_actions.ts} +0 -0
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
type Match,
|
|
22
22
|
matchDeclaration,
|
|
23
23
|
matcherBase,
|
|
24
|
+
type MatcherClass,
|
|
24
25
|
type SyntaxTree,
|
|
25
26
|
tokenizeDeclaration,
|
|
26
27
|
} from './CSSPropertyParser.js';
|
|
@@ -56,12 +57,13 @@ export class BaseVariableMatch implements Match {
|
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
|
|
60
|
+
const BaseVariableMatcherBase: MatcherClass<BaseVariableMatch> = matcherBase(BaseVariableMatch);
|
|
59
61
|
// This matcher provides matching for var() functions and basic computedText support. Computed text is resolved by a
|
|
60
62
|
// callback. This matcher is intended to be used directly only in environments where CSSMatchedStyles is not available.
|
|
61
63
|
// A more ergonomic version of this matcher exists in VariableMatcher, which uses CSSMatchedStyles to correctly resolve
|
|
62
64
|
// variable references automatically.
|
|
63
65
|
// clang-format off
|
|
64
|
-
export class BaseVariableMatcher extends
|
|
66
|
+
export class BaseVariableMatcher extends BaseVariableMatcherBase {
|
|
65
67
|
// clang-format on
|
|
66
68
|
readonly #computedTextCallback: (match: BaseVariableMatch, matching: BottomUpTreeMatching) => string | null;
|
|
67
69
|
constructor(computedTextCallback: (match: BaseVariableMatch, matching: BottomUpTreeMatching) => string | null) {
|
|
@@ -114,8 +116,9 @@ export class VariableMatch extends BaseVariableMatch {
|
|
|
114
116
|
}
|
|
115
117
|
}
|
|
116
118
|
|
|
119
|
+
const VariableMatcherBase: MatcherClass<VariableMatch> = matcherBase(VariableMatch);
|
|
117
120
|
// clang-format off
|
|
118
|
-
export class VariableMatcher extends
|
|
121
|
+
export class VariableMatcher extends VariableMatcherBase {
|
|
119
122
|
// clang-format on
|
|
120
123
|
constructor(readonly matchedStyles: CSSMatchedStyles, readonly style: CSSStyleDeclaration) {
|
|
121
124
|
super();
|
|
@@ -144,8 +147,9 @@ export class VariableNameMatch implements Match {
|
|
|
144
147
|
}
|
|
145
148
|
}
|
|
146
149
|
|
|
150
|
+
const VariableNameMatcherBase: MatcherClass<VariableNameMatch> = matcherBase(VariableNameMatch);
|
|
147
151
|
// clang-format off
|
|
148
|
-
export class VariableNameMatcher extends
|
|
152
|
+
export class VariableNameMatcher extends VariableNameMatcherBase {
|
|
149
153
|
// clang-format on
|
|
150
154
|
constructor(readonly matchedStyles: CSSMatchedStyles, readonly style: CSSStyleDeclaration) {
|
|
151
155
|
super();
|
|
@@ -270,10 +274,11 @@ export function defaultValueForCSSType(type: string|null): string|null {
|
|
|
270
274
|
|
|
271
275
|
export const RAW_STRING_TYPE = 'raw-string';
|
|
272
276
|
|
|
277
|
+
const AttributeMatcherBase: MatcherClass<AttributeMatch> = matcherBase(AttributeMatch);
|
|
273
278
|
// This matcher provides matching for attr() functions and basic computedText support. Computed text is resolved by a
|
|
274
279
|
// callback.
|
|
275
280
|
// clang-format off
|
|
276
|
-
export class AttributeMatcher extends
|
|
281
|
+
export class AttributeMatcher extends AttributeMatcherBase {
|
|
277
282
|
// clang-format on
|
|
278
283
|
constructor(
|
|
279
284
|
private readonly matchedStyles: CSSMatchedStyles,
|
|
@@ -347,8 +352,9 @@ export class BinOpMatch implements Match {
|
|
|
347
352
|
}
|
|
348
353
|
}
|
|
349
354
|
|
|
355
|
+
const BinOpMatcherBase: MatcherClass<BinOpMatch> = matcherBase(BinOpMatch);
|
|
350
356
|
// clang-format off
|
|
351
|
-
export class BinOpMatcher extends
|
|
357
|
+
export class BinOpMatcher extends BinOpMatcherBase {
|
|
352
358
|
// clang-format on
|
|
353
359
|
override accepts(): boolean {
|
|
354
360
|
return true;
|
|
@@ -372,8 +378,9 @@ export class TextMatch implements Match {
|
|
|
372
378
|
}
|
|
373
379
|
}
|
|
374
380
|
|
|
381
|
+
const TextMatcherBase: MatcherClass<TextMatch> = matcherBase(TextMatch);
|
|
375
382
|
// clang-format off
|
|
376
|
-
export class TextMatcher extends
|
|
383
|
+
export class TextMatcher extends TextMatcherBase {
|
|
377
384
|
// clang-format on
|
|
378
385
|
override accepts(): boolean {
|
|
379
386
|
return true;
|
|
@@ -399,8 +406,9 @@ export class AngleMatch implements Match {
|
|
|
399
406
|
}
|
|
400
407
|
}
|
|
401
408
|
|
|
409
|
+
const AngleMatcherBase: MatcherClass<AngleMatch> = matcherBase(AngleMatch);
|
|
402
410
|
// clang-format off
|
|
403
|
-
export class AngleMatcher extends
|
|
411
|
+
export class AngleMatcher extends AngleMatcherBase {
|
|
404
412
|
// clang-format on
|
|
405
413
|
override accepts(propertyName: string): boolean {
|
|
406
414
|
return cssMetadata().isAngleAwareProperty(propertyName);
|
|
@@ -435,8 +443,9 @@ export class ColorMixMatch implements Match {
|
|
|
435
443
|
}
|
|
436
444
|
}
|
|
437
445
|
|
|
446
|
+
const ColorMixMatcherBase: MatcherClass<ColorMixMatch> = matcherBase(ColorMixMatch);
|
|
438
447
|
// clang-format off
|
|
439
|
-
export class ColorMixMatcher extends
|
|
448
|
+
export class ColorMixMatcher extends ColorMixMatcherBase {
|
|
440
449
|
// clang-format on
|
|
441
450
|
override accepts(propertyName: string): boolean {
|
|
442
451
|
return cssMetadata().isColorAwareProperty(propertyName);
|
|
@@ -497,8 +506,9 @@ export class ContrastColorMatch implements Match {
|
|
|
497
506
|
}
|
|
498
507
|
}
|
|
499
508
|
|
|
509
|
+
const ContrastColorMatcherBase: MatcherClass<ContrastColorMatch> = matcherBase(ContrastColorMatch);
|
|
500
510
|
// clang-format off
|
|
501
|
-
export class ContrastColorMatcher extends
|
|
511
|
+
export class ContrastColorMatcher extends ContrastColorMatcherBase {
|
|
502
512
|
// clang-format on
|
|
503
513
|
override accepts(propertyName: string): boolean {
|
|
504
514
|
return cssMetadata().isColorAwareProperty(propertyName);
|
|
@@ -527,8 +537,9 @@ export class URLMatch implements Match {
|
|
|
527
537
|
}
|
|
528
538
|
}
|
|
529
539
|
|
|
540
|
+
const URLMatcherBase: MatcherClass<URLMatch> = matcherBase(URLMatch);
|
|
530
541
|
// clang-format off
|
|
531
|
-
export class URLMatcher extends
|
|
542
|
+
export class URLMatcher extends URLMatcherBase {
|
|
532
543
|
// clang-format on
|
|
533
544
|
override matches(node: CodeMirror.SyntaxNode, matching: BottomUpTreeMatching): URLMatch|null {
|
|
534
545
|
if (node.name !== 'CallLiteral') {
|
|
@@ -557,8 +568,9 @@ export class LinearGradientMatch implements Match {
|
|
|
557
568
|
}
|
|
558
569
|
}
|
|
559
570
|
|
|
571
|
+
const LinearGradientMatcherBase: MatcherClass<LinearGradientMatch> = matcherBase(LinearGradientMatch);
|
|
560
572
|
// clang-format off
|
|
561
|
-
export class LinearGradientMatcher extends
|
|
573
|
+
export class LinearGradientMatcher extends LinearGradientMatcherBase {
|
|
562
574
|
// clang-format on
|
|
563
575
|
override matches(node: CodeMirror.SyntaxNode, matching: BottomUpTreeMatching): Match|null {
|
|
564
576
|
const text = matching.ast.text(node);
|
|
@@ -579,15 +591,16 @@ interface RelativeColor {
|
|
|
579
591
|
|
|
580
592
|
export class ColorMatch implements Match {
|
|
581
593
|
computedText: (() => string | null)|undefined;
|
|
582
|
-
constructor(
|
|
583
|
-
|
|
584
|
-
|
|
594
|
+
constructor(readonly text: string, readonly node: CodeMirror.SyntaxNode,
|
|
595
|
+
private readonly currentColorCallback?: () => string | null,
|
|
596
|
+
readonly relativeColor?: RelativeColor|undefined) {
|
|
585
597
|
this.computedText = currentColorCallback;
|
|
586
598
|
}
|
|
587
599
|
}
|
|
588
600
|
|
|
601
|
+
const ColorMatcherBase: MatcherClass<ColorMatch> = matcherBase(ColorMatch);
|
|
589
602
|
// clang-format off
|
|
590
|
-
export class ColorMatcher extends
|
|
603
|
+
export class ColorMatcher extends ColorMatcherBase {
|
|
591
604
|
constructor(private readonly currentColorCallback?: () => string|null) {
|
|
592
605
|
super();
|
|
593
606
|
}
|
|
@@ -724,8 +737,9 @@ export class RelativeColorChannelMatch implements Match {
|
|
|
724
737
|
}
|
|
725
738
|
}
|
|
726
739
|
|
|
740
|
+
const RelativeColorChannelMatcherBase: MatcherClass<RelativeColorChannelMatch> = matcherBase(RelativeColorChannelMatch);
|
|
727
741
|
// clang-format off
|
|
728
|
-
export class RelativeColorChannelMatcher extends
|
|
742
|
+
export class RelativeColorChannelMatcher extends RelativeColorChannelMatcherBase {
|
|
729
743
|
// clang-format on
|
|
730
744
|
override accepts(propertyName: string): boolean {
|
|
731
745
|
return cssMetadata().isColorAwareProperty(propertyName);
|
|
@@ -747,8 +761,9 @@ export class LightDarkColorMatch implements Match {
|
|
|
747
761
|
}
|
|
748
762
|
}
|
|
749
763
|
|
|
764
|
+
const LightDarkColorMatcherBase: MatcherClass<LightDarkColorMatch> = matcherBase(LightDarkColorMatch);
|
|
750
765
|
// clang-format off
|
|
751
|
-
export class LightDarkColorMatcher extends
|
|
766
|
+
export class LightDarkColorMatcher extends LightDarkColorMatcherBase {
|
|
752
767
|
// clang-format on
|
|
753
768
|
constructor(readonly style: CSSStyleDeclaration) {
|
|
754
769
|
super();
|
|
@@ -776,8 +791,9 @@ export class AutoBaseMatch implements Match {
|
|
|
776
791
|
}
|
|
777
792
|
}
|
|
778
793
|
|
|
794
|
+
const AutoBaseMatcherBase: MatcherClass<AutoBaseMatch> = matcherBase(AutoBaseMatch);
|
|
779
795
|
// clang-format off
|
|
780
|
-
export class AutoBaseMatcher extends
|
|
796
|
+
export class AutoBaseMatcher extends AutoBaseMatcherBase {
|
|
781
797
|
// clang-format on
|
|
782
798
|
override matches(node: CodeMirror.SyntaxNode, matching: BottomUpTreeMatching): AutoBaseMatch|null {
|
|
783
799
|
if (node.name !== 'CallExpression' || matching.ast.text(node.getChild('Callee')) !== '-internal-auto-base') {
|
|
@@ -817,8 +833,9 @@ export class LinkableNameMatch implements Match {
|
|
|
817
833
|
}
|
|
818
834
|
}
|
|
819
835
|
|
|
836
|
+
const LinkableNameMatcherBase: MatcherClass<LinkableNameMatch> = matcherBase(LinkableNameMatch);
|
|
820
837
|
// clang-format off
|
|
821
|
-
export class LinkableNameMatcher extends
|
|
838
|
+
export class LinkableNameMatcher extends LinkableNameMatcherBase {
|
|
822
839
|
// clang-format on
|
|
823
840
|
private static isLinkableNameProperty(propertyName: string): propertyName is LinkableNameProperties {
|
|
824
841
|
const names: string[] = [
|
|
@@ -833,29 +850,30 @@ export class LinkableNameMatcher extends matcherBase(LinkableNameMatch) {
|
|
|
833
850
|
return names.includes(propertyName);
|
|
834
851
|
}
|
|
835
852
|
|
|
836
|
-
static readonly identifierAnimationLonghandMap
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
853
|
+
static readonly identifierAnimationLonghandMap: Map<string, AnimationLonghandPart> =
|
|
854
|
+
new Map<string, AnimationLonghandPart>(
|
|
855
|
+
Object.entries({
|
|
856
|
+
normal: AnimationLonghandPart.DIRECTION,
|
|
857
|
+
alternate: AnimationLonghandPart.DIRECTION,
|
|
858
|
+
reverse: AnimationLonghandPart.DIRECTION,
|
|
859
|
+
'alternate-reverse': AnimationLonghandPart.DIRECTION,
|
|
860
|
+
none: AnimationLonghandPart.FILL_MODE,
|
|
861
|
+
forwards: AnimationLonghandPart.FILL_MODE,
|
|
862
|
+
backwards: AnimationLonghandPart.FILL_MODE,
|
|
863
|
+
both: AnimationLonghandPart.FILL_MODE,
|
|
864
|
+
running: AnimationLonghandPart.PLAY_STATE,
|
|
865
|
+
paused: AnimationLonghandPart.PLAY_STATE,
|
|
866
|
+
infinite: AnimationLonghandPart.ITERATION_COUNT,
|
|
867
|
+
linear: AnimationLonghandPart.EASING_FUNCTION,
|
|
868
|
+
ease: AnimationLonghandPart.EASING_FUNCTION,
|
|
869
|
+
'ease-in': AnimationLonghandPart.EASING_FUNCTION,
|
|
870
|
+
'ease-out': AnimationLonghandPart.EASING_FUNCTION,
|
|
871
|
+
'ease-in-out': AnimationLonghandPart.EASING_FUNCTION,
|
|
872
|
+
steps: AnimationLonghandPart.EASING_FUNCTION,
|
|
873
|
+
'step-start': AnimationLonghandPart.EASING_FUNCTION,
|
|
874
|
+
'step-end': AnimationLonghandPart.EASING_FUNCTION,
|
|
875
|
+
}),
|
|
876
|
+
);
|
|
859
877
|
|
|
860
878
|
private matchAnimationNameInShorthand(node: CodeMirror.SyntaxNode, matching: BottomUpTreeMatching): LinkableNameMatch|
|
|
861
879
|
null {
|
|
@@ -949,8 +967,9 @@ export class BezierMatch implements Match {
|
|
|
949
967
|
}
|
|
950
968
|
}
|
|
951
969
|
|
|
970
|
+
const BezierMatcherBase: MatcherClass<BezierMatch> = matcherBase(BezierMatch);
|
|
952
971
|
// clang-format off
|
|
953
|
-
export class BezierMatcher extends
|
|
972
|
+
export class BezierMatcher extends BezierMatcherBase {
|
|
954
973
|
// clang-format on
|
|
955
974
|
override accepts(propertyName: string): boolean {
|
|
956
975
|
return cssMetadata().isBezierAwareProperty(propertyName);
|
|
@@ -975,8 +994,9 @@ export class StringMatch implements Match {
|
|
|
975
994
|
}
|
|
976
995
|
}
|
|
977
996
|
|
|
997
|
+
const StringMatcherBase: MatcherClass<StringMatch> = matcherBase(StringMatch);
|
|
978
998
|
// clang-format off
|
|
979
|
-
export class StringMatcher extends
|
|
999
|
+
export class StringMatcher extends StringMatcherBase {
|
|
980
1000
|
// clang-format on
|
|
981
1001
|
override matches(node: CodeMirror.SyntaxNode, matching: BottomUpTreeMatching): Match|null {
|
|
982
1002
|
return node.name === 'StringLiteral' ? new StringMatch(matching.ast.text(node), node) : null;
|
|
@@ -992,8 +1012,9 @@ export class ShadowMatch implements Match {
|
|
|
992
1012
|
}
|
|
993
1013
|
}
|
|
994
1014
|
|
|
1015
|
+
const ShadowMatcherBase: MatcherClass<ShadowMatch> = matcherBase(ShadowMatch);
|
|
995
1016
|
// clang-format off
|
|
996
|
-
export class ShadowMatcher extends
|
|
1017
|
+
export class ShadowMatcher extends ShadowMatcherBase {
|
|
997
1018
|
// clang-format on
|
|
998
1019
|
override accepts(propertyName: string): boolean {
|
|
999
1020
|
return cssMetadata().isShadowProperty(propertyName);
|
|
@@ -1017,10 +1038,11 @@ export class LengthMatch implements Match {
|
|
|
1017
1038
|
}
|
|
1018
1039
|
}
|
|
1019
1040
|
|
|
1041
|
+
const LengthMatcherBase: MatcherClass<LengthMatch> = matcherBase(LengthMatch);
|
|
1020
1042
|
// clang-format off
|
|
1021
|
-
export class LengthMatcher extends
|
|
1043
|
+
export class LengthMatcher extends LengthMatcherBase {
|
|
1022
1044
|
// clang-format on
|
|
1023
|
-
static readonly LENGTH_UNITS = new Set([
|
|
1045
|
+
static readonly LENGTH_UNITS: Set<string> = new Set([
|
|
1024
1046
|
'em', 'ex', 'ch', 'cap', 'ic', 'lh', 'rem', 'rex', 'rch', 'rlh', 'ric', 'rcap', 'pt', 'pc',
|
|
1025
1047
|
'in', 'cm', 'mm', 'Q', 'vw', 'vh', 'vi', 'vb', 'vmin', 'vmax', 'dvw', 'dvh', 'dvi', 'dvb',
|
|
1026
1048
|
'dvmin', 'dvmax', 'svw', 'svh', 'svi', 'svb', 'svmin', 'svmax', 'lvw', 'lvh', 'lvi', 'lvb', 'lvmin', 'lvmax',
|
|
@@ -1079,8 +1101,9 @@ export class MathFunctionMatch extends BaseFunctionMatch<MathFunction> {
|
|
|
1079
1101
|
}
|
|
1080
1102
|
}
|
|
1081
1103
|
|
|
1104
|
+
const MathFunctionMatcherBase: MatcherClass<MathFunctionMatch> = matcherBase(MathFunctionMatch);
|
|
1082
1105
|
// clang-format off
|
|
1083
|
-
export class MathFunctionMatcher extends
|
|
1106
|
+
export class MathFunctionMatcher extends MathFunctionMatcherBase {
|
|
1084
1107
|
// clang-format on
|
|
1085
1108
|
private static getFunctionType(callee: string|null): MathFunction|null {
|
|
1086
1109
|
const maybeFunc = callee as MathFunction | null;
|
|
@@ -1125,8 +1148,9 @@ export class MathFunctionMatcher extends matcherBase(MathFunctionMatch) {
|
|
|
1125
1148
|
|
|
1126
1149
|
export class CustomFunctionMatch extends BaseFunctionMatch<string> {}
|
|
1127
1150
|
|
|
1151
|
+
const CustomFunctionMatcherBase: MatcherClass<CustomFunctionMatch> = matcherBase(CustomFunctionMatch);
|
|
1128
1152
|
// clang-format off
|
|
1129
|
-
export class CustomFunctionMatcher extends
|
|
1153
|
+
export class CustomFunctionMatcher extends CustomFunctionMatcherBase {
|
|
1130
1154
|
// clang-format on
|
|
1131
1155
|
|
|
1132
1156
|
override matches(node: CodeMirror.SyntaxNode, matching: BottomUpTreeMatching): CustomFunctionMatch|null {
|
|
@@ -1157,12 +1181,13 @@ export class FlexGridGridLanesMatch implements Match {
|
|
|
1157
1181
|
}
|
|
1158
1182
|
}
|
|
1159
1183
|
|
|
1184
|
+
const FlexGridGridLanesMatcherBase: MatcherClass<FlexGridGridLanesMatch> = matcherBase(FlexGridGridLanesMatch);
|
|
1160
1185
|
// clang-format off
|
|
1161
|
-
export class FlexGridGridLanesMatcher extends
|
|
1186
|
+
export class FlexGridGridLanesMatcher extends FlexGridGridLanesMatcherBase {
|
|
1162
1187
|
// clang-format on
|
|
1163
|
-
static readonly FLEX = ['flex', 'inline-flex', 'block flex', 'inline flex'];
|
|
1164
|
-
static readonly GRID = ['grid', 'inline-grid', 'block grid', 'inline grid'];
|
|
1165
|
-
static readonly GRID_LANES = ['grid-lanes', 'inline-grid-lanes', 'block grid-lanes', 'inline grid-lanes'];
|
|
1188
|
+
static readonly FLEX: string[] = ['flex', 'inline-flex', 'block flex', 'inline flex'];
|
|
1189
|
+
static readonly GRID: string[] = ['grid', 'inline-grid', 'block grid', 'inline grid'];
|
|
1190
|
+
static readonly GRID_LANES: string[] = ['grid-lanes', 'inline-grid-lanes', 'block grid-lanes', 'inline grid-lanes'];
|
|
1166
1191
|
override accepts(propertyName: string): boolean {
|
|
1167
1192
|
return propertyName === 'display';
|
|
1168
1193
|
}
|
|
@@ -1197,8 +1222,9 @@ export class GridTemplateMatch implements Match {
|
|
|
1197
1222
|
}
|
|
1198
1223
|
}
|
|
1199
1224
|
|
|
1225
|
+
const GridTemplateMatcherBase: MatcherClass<GridTemplateMatch> = matcherBase(GridTemplateMatch);
|
|
1200
1226
|
// clang-format off
|
|
1201
|
-
export class GridTemplateMatcher extends
|
|
1227
|
+
export class GridTemplateMatcher extends GridTemplateMatcherBase {
|
|
1202
1228
|
// clang-format on
|
|
1203
1229
|
override accepts(propertyName: string): boolean {
|
|
1204
1230
|
return cssMetadata().isGridAreaDefiningProperty(propertyName);
|
|
@@ -1293,8 +1319,9 @@ export class AnchorFunctionMatch implements Match {
|
|
|
1293
1319
|
}
|
|
1294
1320
|
}
|
|
1295
1321
|
|
|
1322
|
+
const AnchorFunctionMatcherBase: MatcherClass<AnchorFunctionMatch> = matcherBase(AnchorFunctionMatch);
|
|
1296
1323
|
// clang-format off
|
|
1297
|
-
export class AnchorFunctionMatcher extends
|
|
1324
|
+
export class AnchorFunctionMatcher extends AnchorFunctionMatcherBase {
|
|
1298
1325
|
// clang-format on
|
|
1299
1326
|
anchorFunction(node: CodeMirror.SyntaxNode, matching: BottomUpTreeMatching): string|null {
|
|
1300
1327
|
if (node.name !== 'CallExpression') {
|
|
@@ -1343,8 +1370,9 @@ export class PositionAnchorMatch implements Match {
|
|
|
1343
1370
|
}
|
|
1344
1371
|
}
|
|
1345
1372
|
|
|
1373
|
+
const PositionAnchorMatcherBase: MatcherClass<PositionAnchorMatch> = matcherBase(PositionAnchorMatch);
|
|
1346
1374
|
// clang-format off
|
|
1347
|
-
export class PositionAnchorMatcher extends
|
|
1375
|
+
export class PositionAnchorMatcher extends PositionAnchorMatcherBase {
|
|
1348
1376
|
// clang-format on
|
|
1349
1377
|
override accepts(propertyName: string): boolean {
|
|
1350
1378
|
return propertyName === 'position-anchor';
|
|
@@ -1373,8 +1401,9 @@ export class CSSWideKeywordMatch implements Match {
|
|
|
1373
1401
|
}
|
|
1374
1402
|
}
|
|
1375
1403
|
|
|
1404
|
+
const CSSWideKeywordMatcherBase: MatcherClass<CSSWideKeywordMatch> = matcherBase(CSSWideKeywordMatch);
|
|
1376
1405
|
// clang-format off
|
|
1377
|
-
export class CSSWideKeywordMatcher extends
|
|
1406
|
+
export class CSSWideKeywordMatcher extends CSSWideKeywordMatcherBase {
|
|
1378
1407
|
// clang-format on
|
|
1379
1408
|
constructor(readonly property: CSSProperty, readonly matchedStyles: CSSMatchedStyles) {
|
|
1380
1409
|
super();
|
|
@@ -1407,8 +1436,9 @@ export class PositionTryMatch implements Match {
|
|
|
1407
1436
|
}
|
|
1408
1437
|
}
|
|
1409
1438
|
|
|
1439
|
+
const PositionTryMatcherBase: MatcherClass<PositionTryMatch> = matcherBase(PositionTryMatch);
|
|
1410
1440
|
// clang-format off
|
|
1411
|
-
export class PositionTryMatcher extends
|
|
1441
|
+
export class PositionTryMatcher extends PositionTryMatcherBase {
|
|
1412
1442
|
// clang-format on
|
|
1413
1443
|
override accepts(propertyName: string): boolean {
|
|
1414
1444
|
return propertyName === LinkableNameProperties.POSITION_TRY ||
|
|
@@ -1452,8 +1482,9 @@ export class EnvFunctionMatch implements Match {
|
|
|
1452
1482
|
}
|
|
1453
1483
|
}
|
|
1454
1484
|
|
|
1485
|
+
const EnvFunctionMatcherBase: MatcherClass<EnvFunctionMatch> = matcherBase(EnvFunctionMatch);
|
|
1455
1486
|
// clang-format off
|
|
1456
|
-
export class EnvFunctionMatcher extends
|
|
1487
|
+
export class EnvFunctionMatcher extends EnvFunctionMatcherBase {
|
|
1457
1488
|
// clang-format on
|
|
1458
1489
|
constructor(readonly matchedStyles: CSSMatchedStyles) {
|
|
1459
1490
|
super();
|
|
@@ -797,7 +797,7 @@ export type MessageSource = Protocol.Log.LogEntrySource|Common.Console.FrontendM
|
|
|
797
797
|
export type MessageLevel = Protocol.Log.LogEntryLevel;
|
|
798
798
|
export type MessageType = Protocol.Runtime.ConsoleAPICalledEventType|FrontendMessageType;
|
|
799
799
|
|
|
800
|
-
export const MessageSourceDisplayName = new Map<MessageSource, string>(([
|
|
800
|
+
export const MessageSourceDisplayName: Map<MessageSource, string> = new Map<MessageSource, string>(([
|
|
801
801
|
[Protocol.Log.LogEntrySource.XML, 'xml'],
|
|
802
802
|
[Protocol.Log.LogEntrySource.Javascript, 'javascript'],
|
|
803
803
|
[Protocol.Log.LogEntrySource.Network, 'network'],
|
|
@@ -64,7 +64,7 @@ export const enum NodeType {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/** Keep this list in sync with https://w3c.github.io/aria/#state_prop_def **/
|
|
67
|
-
export const ARIA_ATTRIBUTES = new Set<string>([
|
|
67
|
+
export const ARIA_ATTRIBUTES: Set<string> = new Set<string>([
|
|
68
68
|
'role',
|
|
69
69
|
'aria-activedescendant',
|
|
70
70
|
'aria-atomic',
|
|
@@ -1623,8 +1623,8 @@ export class AdoptedStyleSheet {
|
|
|
1623
1623
|
|
|
1624
1624
|
export class DOMModel extends SDKModel<EventTypes> {
|
|
1625
1625
|
agent: ProtocolProxyApi.DOMApi;
|
|
1626
|
-
idToDOMNode = new Map<Protocol.DOM.NodeId, DOMNode>();
|
|
1627
|
-
frameIdToOwnerNode = new Map<Protocol.Page.FrameId, DOMNode>();
|
|
1626
|
+
idToDOMNode: Map<Protocol.DOM.NodeId, DOMNode> = new Map<Protocol.DOM.NodeId, DOMNode>();
|
|
1627
|
+
frameIdToOwnerNode: Map<Protocol.Page.FrameId, DOMNode> = new Map<Protocol.Page.FrameId, DOMNode>();
|
|
1628
1628
|
#document: DOMDocument|null = null;
|
|
1629
1629
|
readonly #attributeLoadNodeIds = new Set<Protocol.DOM.NodeId>();
|
|
1630
1630
|
readonly runtimeModelInternal: RuntimeModel;
|
|
@@ -134,7 +134,7 @@ export const enum StepMode {
|
|
|
134
134
|
STEP_OVER = 'StepOver',
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
export const WASM_SYMBOLS_PRIORITY = [
|
|
137
|
+
export const WASM_SYMBOLS_PRIORITY: Protocol.Debugger.DebugSymbolsType[] = [
|
|
138
138
|
Protocol.Debugger.DebugSymbolsType.ExternalDWARF,
|
|
139
139
|
Protocol.Debugger.DebugSymbolsType.EmbeddedDWARF,
|
|
140
140
|
Protocol.Debugger.DebugSymbolsType.SourceMap,
|
|
@@ -426,6 +426,11 @@ export class EmulationModel extends SDKModel<EmulationModelEventTypes> implement
|
|
|
426
426
|
await this.#emulationAgent.invoke_setHardwareConcurrencyOverride({hardwareConcurrency});
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
+
async setCPUPerformanceOverride(performanceTier?: Protocol.Emulation.SetCPUPerformanceOverrideRequestPerformanceTier):
|
|
430
|
+
Promise<void> {
|
|
431
|
+
await this.#emulationAgent.invoke_setCPUPerformanceOverride({performanceTier});
|
|
432
|
+
}
|
|
433
|
+
|
|
429
434
|
async emulateTouch(enabled: boolean, mobile: boolean): Promise<void> {
|
|
430
435
|
this.#touchEnabled = enabled && this.#touchEmulationAllowed;
|
|
431
436
|
this.#touchMobile = mobile && this.#touchEmulationAllowed;
|
|
@@ -86,7 +86,7 @@ export class StickyPositionConstraint {
|
|
|
86
86
|
export class LayerTreeBase {
|
|
87
87
|
readonly #target: Target|null;
|
|
88
88
|
#domModel: DOMModel|null;
|
|
89
|
-
layersById = new Map<string|number, Layer>();
|
|
89
|
+
layersById: Map<string|number, Layer> = new Map<string|number, Layer>();
|
|
90
90
|
#root: Layer|null = null;
|
|
91
91
|
#contentRoot: Layer|null = null;
|
|
92
92
|
readonly #backendNodeIdToNode = new Map<Protocol.DOM.BackendNodeId, DOMNode|null>();
|
|
@@ -2202,7 +2202,7 @@ export class MultitargetNetworkManager extends Common.ObjectWrapper.ObjectWrappe
|
|
|
2202
2202
|
#userAgentMetadataOverride: Protocol.Emulation.UserAgentMetadata|null = null;
|
|
2203
2203
|
readonly #networkAgents = new Set<ProtocolProxyApi.NetworkApi>();
|
|
2204
2204
|
readonly #fetchAgents = new Set<ProtocolProxyApi.FetchApi>();
|
|
2205
|
-
readonly inflightMainResourceRequests = new Map<string, NetworkRequest>();
|
|
2205
|
+
readonly inflightMainResourceRequests: Map<string, NetworkRequest> = new Map<string, NetworkRequest>();
|
|
2206
2206
|
#networkConditions: Conditions = NoThrottlingConditions;
|
|
2207
2207
|
#updatingInterceptionPatternsPromise: Promise<void>|null = null;
|
|
2208
2208
|
readonly #requestConditions: RequestConditions;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Core SDK
|
|
2
|
+
|
|
3
|
+
The **Core SDK** (`front_end/core/sdk/`) is DevTools' foundational data access layer wrapping the [Chrome DevTools Protocol (CDP)](https://chromedevtools.github.io/devtools-protocol/). It creates typed data access objects and models for CDP structures, abstracting away low-level JSON-RPC commands and events into developer-friendly APIs.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Architectural Principles
|
|
8
|
+
|
|
9
|
+
### 1. Single CDP Domain Responsibility
|
|
10
|
+
Each SDK model and data object encapsulates data and operations from a **single CDP domain** (e.g., `DOM`, `CSS`, `Network`, `Debugger`, `Audits`).
|
|
11
|
+
|
|
12
|
+
### 2. Cross-Domain Separation (What to Avoid)
|
|
13
|
+
Data from multiple CDP domains must be joined **outside** of `core/sdk`, typically in `front_end/models/` (such as `models/bindings/`, `models/issues_manager/`, or `models/trace/`).
|
|
14
|
+
|
|
15
|
+
#### ❌ Anti-pattern: Cross-domain getters on SDK objects
|
|
16
|
+
Do **not** add methods or getters to an SDK data object that fetch or resolve data from another CDP domain.
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
// ❌ BAD: DOMNode (DOM domain) must not reference Network or Audits domains directly.
|
|
20
|
+
class DOMNode {
|
|
21
|
+
// Violates single-domain boundary:
|
|
22
|
+
getNetworkRequest(): SDK.NetworkRequest.NetworkRequest|null {
|
|
23
|
+
// ...
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Violates single-domain boundary:
|
|
27
|
+
getIssues(): IssuesModel.Issue[] {
|
|
28
|
+
// ...
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
#### ✅ Best Practice: Aggregate in `models/`
|
|
34
|
+
Keep `DOMNode` strictly focused on the DOM domain, and correlate cross-domain data in a higher-level model or service:
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
// ✅ GOOD: A higher-level model in models/ joins DOM and Audits/Network data.
|
|
38
|
+
// In front_end/models/issues_manager/ or similar:
|
|
39
|
+
const issues = issuesManager.issuesForNode(domNode);
|
|
40
|
+
```
|
|
@@ -97,7 +97,7 @@ export class RehydratingConnectionTransport implements ProtocolClient.Connection
|
|
|
97
97
|
onDisconnect: ((arg0: string) => void)|null = null;
|
|
98
98
|
onMessage: ((arg0: Object) => void)|null = null;
|
|
99
99
|
trace: TraceObject|null = null;
|
|
100
|
-
sessions = new Map<number, RehydratingSessionBase>();
|
|
100
|
+
sessions: Map<number, RehydratingSessionBase> = new Map<number, RehydratingSessionBase>();
|
|
101
101
|
/**
|
|
102
102
|
* Set to the in-flight `traceURL` fetch (including its hydration/error handling) so tests can await
|
|
103
103
|
* the load deterministically. Stays `undefined` when loading via message passing, or when a
|
|
@@ -956,7 +956,7 @@ export class RemoteArrayBuffer {
|
|
|
956
956
|
return this.#object.arrayBufferByteLength();
|
|
957
957
|
}
|
|
958
958
|
|
|
959
|
-
async bytes(start = 0, end = this.byteLength()): Promise<number[]|null> {
|
|
959
|
+
async bytes(start = 0, end: number = this.byteLength()): Promise<number[]|null> {
|
|
960
960
|
if (start < 0 || start >= this.byteLength()) {
|
|
961
961
|
throw new RangeError('start is out of range');
|
|
962
962
|
}
|
|
@@ -26,7 +26,7 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
|
|
|
26
26
|
readonly #securityOriginManager: SecurityOriginManager;
|
|
27
27
|
readonly #storageKeyManager: StorageKeyManager;
|
|
28
28
|
readonly #frameManager: FrameManager;
|
|
29
|
-
readonly framesInternal = new Map<string, ResourceTreeFrame>();
|
|
29
|
+
readonly framesInternal: Map<string, ResourceTreeFrame> = new Map<string, ResourceTreeFrame>();
|
|
30
30
|
#cachedResourcesProcessed = false;
|
|
31
31
|
#pendingReloadOptions: {
|
|
32
32
|
ignoreCache: (boolean|undefined),
|
|
@@ -660,7 +660,7 @@ export class ResourceTreeFrame {
|
|
|
660
660
|
#creationStackTrace: Protocol.Runtime.StackTrace|null;
|
|
661
661
|
#creationStackTraceTarget: Target|null = null;
|
|
662
662
|
#childFrames = new Set<ResourceTreeFrame>();
|
|
663
|
-
resourcesMap = new Map<Platform.DevToolsPath.UrlString, Resource>();
|
|
663
|
+
resourcesMap: Map<Platform.DevToolsPath.UrlString, Resource> = new Map<Platform.DevToolsPath.UrlString, Resource>();
|
|
664
664
|
backForwardCacheDetails: {
|
|
665
665
|
explanations: Protocol.Page.BackForwardCacheNotRestoredExplanation[],
|
|
666
666
|
restoredFromCache?: boolean,
|
|
@@ -14,7 +14,7 @@ export interface RegistrationInfo {
|
|
|
14
14
|
|
|
15
15
|
export type SDKModelConstructor<T extends SDKModel = SDKModel> = new (target: Target) => T;
|
|
16
16
|
|
|
17
|
-
const registeredModels = new Map<SDKModelConstructor, RegistrationInfo>();
|
|
17
|
+
const registeredModels: Map<SDKModelConstructor, RegistrationInfo> = new Map<SDKModelConstructor, RegistrationInfo>();
|
|
18
18
|
|
|
19
19
|
// TODO(crbug.com/1228674) Remove defaults for generic type parameters once
|
|
20
20
|
// all event emitters and sinks have been migrated.
|
|
@@ -168,6 +168,12 @@ export const cpuPressureSettingDescriptor: Common.Settings.SettingDescriptor<str
|
|
|
168
168
|
defaultValue: 'none',
|
|
169
169
|
};
|
|
170
170
|
|
|
171
|
+
export const cpuPerformanceSettingDescriptor: Common.Settings.SettingDescriptor<string> = {
|
|
172
|
+
name: 'emulation.cpu-performance',
|
|
173
|
+
type: Common.Settings.SettingType.ENUM,
|
|
174
|
+
defaultValue: 'no-override',
|
|
175
|
+
};
|
|
176
|
+
|
|
171
177
|
export const touchSettingDescriptor: Common.Settings.SettingDescriptor<string> = {
|
|
172
178
|
name: 'emulation.touch',
|
|
173
179
|
type: Common.Settings.SettingType.ENUM,
|
|
@@ -457,7 +457,8 @@ function frameIdForScript(script: Script): Protocol.Page.FrameId|null {
|
|
|
457
457
|
return resourceTreeModel.mainFrame.id;
|
|
458
458
|
}
|
|
459
459
|
|
|
460
|
-
|
|
460
|
+
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
461
|
+
export const sourceURLRegex: RegExp = /^[\x20\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$/;
|
|
461
462
|
|
|
462
463
|
export async function disassembleWasm(content: string): Promise<TextUtils.WasmDisassembly.WasmDisassembly> {
|
|
463
464
|
const worker = Platform.HostRuntime.HOST_RUNTIME.createWorker(
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
export class SecurityOrigin {
|
|
6
|
+
#urlOrigin?: string;
|
|
7
|
+
#opaqueUuid?: string;
|
|
8
|
+
|
|
9
|
+
private constructor(urlOrigin?: string, opaqueUuid?: string) {
|
|
10
|
+
this.#urlOrigin = urlOrigin;
|
|
11
|
+
this.#opaqueUuid = opaqueUuid;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
static create(urlOrigin: string): SecurityOrigin {
|
|
15
|
+
return new SecurityOrigin(urlOrigin, undefined);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static createUniqueOpaque(): SecurityOrigin {
|
|
19
|
+
return new SecurityOrigin(undefined, crypto.randomUUID());
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
isSameOriginWith(other: SecurityOrigin): boolean {
|
|
23
|
+
if (this.#opaqueUuid || other.#opaqueUuid) {
|
|
24
|
+
return this.#opaqueUuid === other.#opaqueUuid;
|
|
25
|
+
}
|
|
26
|
+
if (this.isOpaque() || other.isOpaque()) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
return this.#urlOrigin === other.#urlOrigin && this.#urlOrigin !== undefined;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
isOpaque(): boolean {
|
|
33
|
+
if (this.#opaqueUuid !== undefined) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
if (this.#urlOrigin) {
|
|
37
|
+
const lower = this.#urlOrigin.toLowerCase();
|
|
38
|
+
return lower === '' || lower === 'null' || lower === 'data:' || lower.startsWith('about') ||
|
|
39
|
+
lower.startsWith('blob:about') || lower.startsWith('blob:data') || lower.startsWith('blob:null') ||
|
|
40
|
+
lower.startsWith('detached') || lower.startsWith('undefined');
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
siteId(): string {
|
|
46
|
+
return this.#opaqueUuid ?? (this.#urlOrigin ?? 'unknown-origin');
|
|
47
|
+
}
|
|
48
|
+
}
|