chrome-devtools-frontend 1.0.1522585 → 1.0.1525561
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS +1 -0
- package/docs/README.md +1 -0
- package/docs/policy/README.md +1 -0
- package/docs/policy/console-policy.md +144 -0
- package/docs/policy/images/console-policy1.png +0 -0
- package/docs/policy/images/console-policy2.png +0 -0
- package/docs/policy/images/console-policy3.png +0 -0
- package/docs/policy/slow-close.md +22 -19
- package/docs/ui_engineering.md +22 -0
- package/front_end/Tests.js +1 -1
- package/front_end/core/common/Color.ts +13 -9
- package/front_end/core/common/ColorConverter.ts +9 -7
- package/front_end/core/common/Gzip.ts +1 -1
- package/front_end/core/common/MapWithDefault.ts +5 -3
- package/front_end/core/common/ResourceType.ts +0 -12
- package/front_end/core/common/ReturnToPanel.ts +6 -4
- package/front_end/core/common/Trie.ts +4 -2
- package/front_end/core/host/AidaClient.ts +3 -3
- package/front_end/core/host/GdpClient.ts +7 -5
- package/front_end/core/host/InspectorFrontendHostAPI.ts +7 -5
- package/front_end/core/host/Platform.ts +5 -3
- package/front_end/core/host/UserMetrics.ts +6 -4
- package/front_end/core/platform/ArrayUtilities.ts +1 -1
- package/front_end/core/platform/StringUtilities.ts +34 -31
- package/front_end/core/root/Runtime.ts +1 -1
- package/front_end/core/sdk/CSSMetadata.ts +6 -4
- package/front_end/core/sdk/CSSPropertyParser.ts +17 -13
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +19 -13
- package/front_end/core/sdk/ChildTargetManager.ts +35 -0
- package/front_end/core/sdk/DOMModel.ts +1 -1
- package/front_end/core/sdk/EventBreakpointsModel.ts +4 -2
- package/front_end/core/sdk/HttpReasonPhraseStrings.ts +4 -2
- package/front_end/core/sdk/NetworkManager.ts +8 -48
- package/front_end/core/sdk/NetworkRequest.ts +0 -28
- package/front_end/core/sdk/PageResourceLoader.ts +1 -1
- package/front_end/core/sdk/PreloadingModel.ts +22 -18
- package/front_end/core/sdk/RehydratingConnection.ts +1 -1
- package/front_end/core/sdk/RehydratingObject.ts +1 -1
- package/front_end/core/sdk/RemoteObject.ts +1 -1
- package/front_end/core/sdk/ResourceTreeModel.ts +2 -0
- package/front_end/{models/source_map_scopes → core/sdk}/ScopeTreeCache.ts +8 -7
- package/front_end/core/sdk/ScreenCaptureModel.ts +24 -20
- package/front_end/core/sdk/Target.ts +7 -1
- package/front_end/core/sdk/TraceObject.ts +2 -2
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/formatter_worker/FormatterActions.ts +7 -0
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +15 -12
- package/front_end/entrypoints/formatter_worker/Substitute.ts +6 -4
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +24 -16
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +2 -1
- package/front_end/entrypoints/main/MainImpl.ts +6 -4
- package/front_end/generated/InspectorBackendCommands.js +2 -2
- package/front_end/generated/protocol-mapping.d.ts +3 -2
- package/front_end/generated/protocol-proxy-api.d.ts +3 -1
- package/front_end/generated/protocol.ts +7 -1
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +55 -14
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +83 -222
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +23 -0
- package/front_end/models/ai_assistance/performance/AIContext.ts +19 -4
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +4 -2
- package/front_end/models/autofill_manager/AutofillManager.ts +4 -2
- package/front_end/models/cpu_profile/CPUProfileDataModel.ts +1 -1
- package/front_end/models/crux-manager/CrUXManager.ts +1 -1
- package/front_end/models/extensions/HostUrlPattern.ts +13 -5
- package/front_end/models/formatter/FormatterWorkerPool.ts +1 -1
- package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +1 -1
- package/front_end/models/issues_manager/CookieIssue.ts +2 -2
- package/front_end/models/issues_manager/MarkdownIssueDescription.ts +1 -1
- package/front_end/models/issues_manager/SharedDictionaryIssue.ts +20 -0
- package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
- package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +8 -0
- package/front_end/models/network_time_calculator/Calculator.ts +4 -2
- package/front_end/models/network_time_calculator/RequestTimeRanges.ts +6 -4
- package/front_end/models/source_map_scopes/NamesResolver.ts +8 -8
- package/front_end/models/source_map_scopes/source_map_scopes.ts +0 -2
- package/front_end/models/text_utils/ContentProvider.ts +6 -4
- package/front_end/models/trace/extras/TraceTree.ts +1 -1
- package/front_end/models/trace/handlers/FramesHandler.ts +7 -5
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +13 -7
- package/front_end/models/trace/handlers/MetaHandler.ts +16 -14
- package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +20 -8
- package/front_end/models/trace/handlers/helpers.ts +1 -1
- package/front_end/models/trace/handlers/types.ts +23 -19
- package/front_end/models/trace/helpers/Timing.ts +4 -2
- package/front_end/models/trace/helpers/Trace.ts +8 -4
- package/front_end/models/trace/insights/DocumentLatency.ts +1 -1
- package/front_end/models/trace/insights/INPBreakdown.ts +13 -2
- package/front_end/models/trace/insights/LCPBreakdown.ts +14 -2
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +2 -2
- package/front_end/models/trace/types/File.ts +12 -8
- package/front_end/models/trace/types/Timing.ts +1 -1
- package/front_end/models/trace/types/TraceEvents.ts +37 -23
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +1 -1
- package/front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts +12 -10
- package/front_end/panels/application/KeyValueStorageItemsView.ts +31 -33
- package/front_end/panels/application/components/InterestGroupAccessGrid.ts +6 -11
- package/front_end/panels/application/components/OriginTrialTreeView.ts +7 -5
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -0
- package/front_end/panels/application/components/ReportsGrid.ts +4 -10
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +5 -13
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +3 -7
- package/front_end/panels/application/preloading/components/PreloadingString.ts +2 -2
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +3 -10
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +4 -2
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +7 -5
- package/front_end/panels/changes/ChangesSidebar.ts +105 -96
- package/front_end/panels/changes/ChangesView.ts +69 -69
- package/front_end/panels/changes/CombinedDiffView.ts +1 -1
- package/front_end/panels/changes/changesSidebar.css +3 -0
- package/front_end/panels/changes/changesView.css +4 -0
- package/front_end/panels/console/ConsoleView.ts +2 -2
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +22 -35
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
- package/front_end/panels/elements/ElementStatePaneWidget.ts +12 -0
- package/front_end/panels/elements/ElementsTreeElement.ts +9 -5
- package/front_end/panels/elements/ElementsTreeOutline.ts +11 -8
- package/front_end/panels/elements/PropertyRenderer.ts +19 -15
- package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -4
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -2
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +4 -2
- package/front_end/panels/elements/components/AdornerManager.ts +5 -3
- package/front_end/panels/lighthouse/LighthouseController.ts +5 -0
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +43 -46
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +260 -157
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +28 -21
- package/front_end/panels/media/PlayerPropertiesView.ts +1 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +2 -44
- package/front_end/panels/network/NetworkLogView.ts +6 -4
- package/front_end/panels/network/RequestPreviewView.ts +0 -7
- package/front_end/panels/network/components/RequestHeadersView.ts +0 -6
- package/front_end/panels/network/components/components.ts +0 -2
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +4 -2
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +12 -19
- package/front_end/panels/search/SearchResultsPane.ts +2 -3
- package/front_end/panels/security/IPProtectionView.ts +1 -1
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +4 -0
- package/front_end/panels/settings/emulation/utils/StructuredHeaders.ts +45 -37
- package/front_end/panels/sources/BreakpointsViewUtils.ts +11 -9
- package/front_end/panels/sources/DebuggerPlugin.ts +8 -4
- package/front_end/panels/sources/SourcesPanel.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -1
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +4 -2
- package/front_end/panels/timeline/CountersGraph.ts +12 -5
- package/front_end/panels/timeline/EasterEgg.d.ts +5 -3
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +8 -6
- package/front_end/panels/timeline/ModificationsManager.ts +5 -3
- package/front_end/panels/timeline/ThreadAppender.ts +7 -5
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +10 -8
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelinePanel.ts +10 -8
- package/front_end/panels/timeline/TimelineSelection.ts +4 -2
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -3
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +6 -4
- package/front_end/panels/timeline/components/Utils.ts +1 -1
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +5 -3
- package/front_end/panels/timeline/utils/Helpers.ts +1 -1
- package/front_end/panels/utils/utils.ts +1 -7
- package/front_end/services/trace_bounds/TraceBounds.ts +4 -2
- package/front_end/services/tracing/PerformanceTracing.ts +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
- package/front_end/third_party/codemirror.next/package.json +3 -2
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.js +8 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +28 -30
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js +27 -29
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +34 -38
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js +34 -38
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.js +12 -14
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +92 -108
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +33 -39
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +5 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts +4 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +14 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +12 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js +24 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.d.ts +13 -22
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.js +13 -22
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts +6 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.js +6 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +6 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js +5 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +188 -224
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +140 -166
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.js +8 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +28 -30
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js +27 -29
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +34 -38
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js +34 -38
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.js +12 -14
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +92 -108
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +33 -39
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +5 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts +4 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +15 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +12 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js +24 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.d.ts +13 -22
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.js +13 -22
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts +6 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.js +6 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +6 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js +5 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +188 -224
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/third_party/puppeteer/package/src/api/Dialog.ts +8 -10
- package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +27 -29
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +34 -38
- package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +17 -14
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +92 -108
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +5 -3
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +5 -1
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +28 -3
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +16 -7
- package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +28 -2
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/cdp/PredefinedNetworkConditions.ts +13 -22
- package/front_end/third_party/puppeteer/package/src/common/Device.ts +6 -8
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +6 -3
- package/front_end/third_party/puppeteer/package/src/node/PuppeteerNode.ts +5 -7
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/ui/components/chrome_link/ChromeLink.ts +4 -2
- package/front_end/ui/components/dialogs/Dialog.ts +13 -9
- package/front_end/ui/components/docs/linear_memory_inspector/basic.ts +21 -9
- package/front_end/ui/components/highlighting/HighlightElement.ts +77 -0
- package/front_end/ui/components/highlighting/HighlightManager.ts +58 -1
- package/front_end/ui/components/highlighting/highlighting.ts +2 -0
- package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +5 -3
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +5 -3
- package/front_end/ui/components/menus/SelectMenu.ts +6 -4
- package/front_end/ui/components/survey_link/SurveyLink.ts +4 -2
- package/front_end/ui/components/text_editor/config.ts +10 -6
- package/front_end/ui/components/text_editor/javascript.ts +8 -4
- package/front_end/ui/components/tooltips/Tooltip.ts +22 -5
- package/front_end/ui/legacy/ForwardedInputEventHandler.ts +4 -2
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/SettingsUI.ts +1 -5
- package/front_end/ui/legacy/Treeoutline.ts +12 -33
- package/front_end/ui/legacy/UIUtils.ts +19 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +12 -10
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +30 -32
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +25 -25
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +5 -0
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +4 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +4 -2
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +8 -6
- package/front_end/ui/legacy/components/perf_ui/PieChart.ts +6 -4
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -3
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +18 -20
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +22 -16
- package/front_end/ui/legacy/components/source_frame/xmlView.css +0 -2
- package/front_end/ui/legacy/components/utils/Linkifier.ts +6 -4
- package/front_end/ui/visual_logging/Debugging.ts +10 -6
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -3
- package/inspector_overlay/common.ts +5 -3
- package/inspector_overlay/highlight_grid_common.ts +1 -1
- package/package.json +1 -1
- package/front_end/Images/src/bundle.svg +0 -3
- package/front_end/panels/network/components/WebBundleInfoView.css +0 -27
- package/front_end/panels/network/components/WebBundleInfoView.ts +0 -95
|
@@ -3,20 +3,19 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import '../../ui/legacy/components/data_grid/data_grid.js';
|
|
6
|
+
import '../../ui/components/highlighting/highlighting.js';
|
|
6
7
|
|
|
7
8
|
import * as Host from '../../core/host/host.js';
|
|
8
9
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
9
10
|
import * as Platform from '../../core/platform/platform.js';
|
|
10
11
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
11
12
|
import type * as Protocol from '../../generated/protocol.js';
|
|
12
|
-
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
13
|
+
import type * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
13
14
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
14
|
-
import {
|
|
15
|
+
import {html, nothing, render} from '../../ui/lit/lit.js';
|
|
15
16
|
|
|
16
17
|
import developerResourcesListViewStyles from './developerResourcesListView.css.js';
|
|
17
18
|
|
|
18
|
-
const {ref} = Directives;
|
|
19
|
-
|
|
20
19
|
const UIStrings = {
|
|
21
20
|
/**
|
|
22
21
|
* @description Text for the status of something
|
|
@@ -87,7 +86,6 @@ const {withThousandsSeparator} = Platform.NumberUtilities;
|
|
|
87
86
|
export interface ViewInput {
|
|
88
87
|
items: SDK.PageResourceLoader.PageResource[];
|
|
89
88
|
selectedItem: SDK.PageResourceLoader.PageResource|null;
|
|
90
|
-
highlight: (element: Element|undefined, textContent: string|undefined, columnId: string) => void;
|
|
91
89
|
filters: TextUtils.TextUtils.ParsedFilter[];
|
|
92
90
|
onContextMenu: (e: CustomEvent<{menu: UI.ContextMenu.ContextMenu, element: HTMLElement}>) => void;
|
|
93
91
|
onSelect: (e: CustomEvent<HTMLElement>) => void;
|
|
@@ -98,6 +96,20 @@ export interface ViewInput {
|
|
|
98
96
|
export type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
99
97
|
|
|
100
98
|
const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
99
|
+
function highlightRange(textContent: string|undefined, columnId: string): string {
|
|
100
|
+
if (!textContent) {
|
|
101
|
+
return '';
|
|
102
|
+
}
|
|
103
|
+
const filter = input.filters.find(filter => filter.key?.split(',')?.includes(columnId));
|
|
104
|
+
if (!filter?.regex) {
|
|
105
|
+
return '';
|
|
106
|
+
}
|
|
107
|
+
const matches = filter.regex.exec(textContent ?? '');
|
|
108
|
+
if (!matches?.length) {
|
|
109
|
+
return '';
|
|
110
|
+
}
|
|
111
|
+
return `${matches.index},${matches[0].length}`;
|
|
112
|
+
}
|
|
101
113
|
// clang-format off
|
|
102
114
|
render(html`
|
|
103
115
|
<style>${developerResourcesListViewStyles}</style>
|
|
@@ -135,11 +147,11 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
135
147
|
item.success === false ? i18nString(UIStrings.failure) :
|
|
136
148
|
i18nString(UIStrings.pending)}</td>
|
|
137
149
|
<td title=${item.url} aria-label=${item.url}>
|
|
138
|
-
<
|
|
139
|
-
|
|
150
|
+
<devtools-highlight aria-hidden="true" part="url-outer"
|
|
151
|
+
ranges=${highlightRange(item.url, 'url')}>
|
|
140
152
|
<div part="url-prefix">${splitURL ? splitURL[1] : item.url}</div>
|
|
141
153
|
<div part="url-suffix">${splitURL ? splitURL[2] : ''}</div>
|
|
142
|
-
</
|
|
154
|
+
</devtools-highlight>
|
|
143
155
|
</td>
|
|
144
156
|
<td title=${item.initiator.initiatorUrl || ''}
|
|
145
157
|
aria-label=${item.initiator.initiatorUrl || ''}
|
|
@@ -154,9 +166,9 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
154
166
|
item.duration !== null ? html`<span>${i18n.TimeUtilities.millisToString(item.duration)}</span>` : ''}</td>
|
|
155
167
|
<td class="error-message">
|
|
156
168
|
${item.errorMessage ? html`
|
|
157
|
-
<
|
|
169
|
+
<devtools-highlight ranges=${highlightRange(item.errorMessage, 'error-message')}>
|
|
158
170
|
${item.errorMessage}
|
|
159
|
-
</
|
|
171
|
+
</devtools-highlight>` : nothing}
|
|
160
172
|
</td>
|
|
161
173
|
</tr>`;
|
|
162
174
|
})}
|
|
@@ -233,7 +245,6 @@ export class DeveloperResourcesListView extends UI.Widget.VBox {
|
|
|
233
245
|
items: this.#items,
|
|
234
246
|
selectedItem: this.#selectedItem,
|
|
235
247
|
filters: this.#filters,
|
|
236
|
-
highlight: this.#highlight.bind(this),
|
|
237
248
|
onContextMenu: (e: CustomEvent<{menu: UI.ContextMenu.ContextMenu, element: HTMLElement}>) => {
|
|
238
249
|
if (e.detail?.element) {
|
|
239
250
|
this.#populateContextMenu(e.detail.menu, e.detail.element);
|
|
@@ -256,28 +267,4 @@ export class DeveloperResourcesListView extends UI.Widget.VBox {
|
|
|
256
267
|
const output = {};
|
|
257
268
|
this.#view(input, output, this.contentElement);
|
|
258
269
|
}
|
|
259
|
-
|
|
260
|
-
#highlight(element: Element|undefined, textContent: string|undefined, columnId: string): void {
|
|
261
|
-
if (!element || !textContent) {
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
const highlightContainers =
|
|
265
|
-
new Set<Element>([...element.querySelectorAll('.filter-highlight')].map(e => e.parentElement as Element));
|
|
266
|
-
for (const container of highlightContainers) {
|
|
267
|
-
container.textContent = container.textContent;
|
|
268
|
-
}
|
|
269
|
-
const filter = this.#filters.find(filter => filter.key?.split(',')?.includes(columnId));
|
|
270
|
-
if (!filter?.regex) {
|
|
271
|
-
return;
|
|
272
|
-
}
|
|
273
|
-
const matches = filter.regex.exec(element.textContent ?? '');
|
|
274
|
-
if (!matches?.length) {
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
const range = new TextUtils.TextRange.SourceRange(matches.index, matches[0].length);
|
|
278
|
-
UI.UIUtils.highlightRangesWithStyleClass(element, [range], 'filter-highlight');
|
|
279
|
-
for (const el of element.querySelectorAll('.filter-highlight')) {
|
|
280
|
-
el.setAttribute('part', 'filter-highlight');
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
270
|
}
|
|
@@ -191,7 +191,7 @@ const createTraceElement =
|
|
|
191
191
|
return trace;
|
|
192
192
|
};
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
/** clang-format off **/
|
|
195
195
|
class ColorRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.ColorMatch) {
|
|
196
196
|
// clang-format on
|
|
197
197
|
override render(match: SDK.CSSPropertyParserMatchers.ColorMatch, context: RenderingContext): Node[] {
|
|
@@ -66,6 +66,7 @@ enum SpecificPseudoStates {
|
|
|
66
66
|
PLACEHOLDER_SHOWN = 'placeholder-shown',
|
|
67
67
|
AUTOFILL = 'autofill',
|
|
68
68
|
OPEN = 'open',
|
|
69
|
+
TARGET_CURRENT = 'target-current',
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
interface ElementState {
|
|
@@ -179,6 +180,8 @@ export class ElementStatePaneWidget extends UI.Widget.Widget {
|
|
|
179
180
|
SpecificPseudoStates.PLACEHOLDER_SHOWN, {state: SpecificPseudoStates.PLACEHOLDER_SHOWN, type: 'specific'});
|
|
180
181
|
this.#states.set(SpecificPseudoStates.AUTOFILL, {state: SpecificPseudoStates.AUTOFILL, type: 'specific'});
|
|
181
182
|
this.#states.set(SpecificPseudoStates.OPEN, {state: SpecificPseudoStates.OPEN, type: 'specific'});
|
|
183
|
+
this.#states.set(
|
|
184
|
+
SpecificPseudoStates.TARGET_CURRENT, {state: SpecificPseudoStates.TARGET_CURRENT, type: 'specific'});
|
|
182
185
|
|
|
183
186
|
setDualStateCheckboxes(SpecificPseudoStates.VALID, SpecificPseudoStates.INVALID);
|
|
184
187
|
setDualStateCheckboxes(SpecificPseudoStates.USER_VALID, SpecificPseudoStates.USER_INVALID);
|
|
@@ -268,6 +271,9 @@ export class ElementStatePaneWidget extends UI.Widget.Widget {
|
|
|
268
271
|
const isElementOfTypes = (node: SDK.DOMModel.DOMNode, types: string[]): boolean => {
|
|
269
272
|
return types.includes(node.nodeName()?.toLowerCase());
|
|
270
273
|
};
|
|
274
|
+
const isAnchorElementWithHref = (node: SDK.DOMModel.DOMNode): boolean => {
|
|
275
|
+
return isElementOfTypes(node, ['a']) && node.getAttribute('href') !== undefined;
|
|
276
|
+
};
|
|
271
277
|
const isInputWithTypeRadioOrCheckbox = (node: SDK.DOMModel.DOMNode): boolean => {
|
|
272
278
|
return isElementOfTypes(node, ['input']) &&
|
|
273
279
|
(node.getAttribute('type') === 'checkbox' || node.getAttribute('type') === 'radio');
|
|
@@ -385,6 +391,12 @@ export class ElementStatePaneWidget extends UI.Widget.Widget {
|
|
|
385
391
|
} else {
|
|
386
392
|
hideSpecificCheckbox(SpecificPseudoStates.OPEN, true);
|
|
387
393
|
}
|
|
394
|
+
|
|
395
|
+
if (isAnchorElementWithHref(node) || node.pseudoType() === 'scroll-marker') {
|
|
396
|
+
hideSpecificCheckbox(SpecificPseudoStates.TARGET_CURRENT, false);
|
|
397
|
+
} else {
|
|
398
|
+
hideSpecificCheckbox(SpecificPseudoStates.TARGET_CURRENT, true);
|
|
399
|
+
}
|
|
388
400
|
}
|
|
389
401
|
}
|
|
390
402
|
|
|
@@ -2950,14 +2950,16 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2950
2950
|
|
|
2951
2951
|
export const InitialChildrenLimit = 500;
|
|
2952
2952
|
|
|
2953
|
-
|
|
2954
|
-
|
|
2953
|
+
/**
|
|
2954
|
+
* A union of HTML4 and HTML5-Draft elements that explicitly
|
|
2955
|
+
* or implicitly (for HTML5) forbid the closing tag.
|
|
2956
|
+
**/
|
|
2955
2957
|
export const ForbiddenClosingTagElements = new Set<string>([
|
|
2956
2958
|
'area', 'base', 'basefont', 'br', 'canvas', 'col', 'command', 'embed', 'frame', 'hr',
|
|
2957
2959
|
'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr',
|
|
2958
2960
|
]);
|
|
2959
2961
|
|
|
2960
|
-
|
|
2962
|
+
/** These tags we do not allow editing their tag name. **/
|
|
2961
2963
|
export const EditTagBlocklist = new Set<string>(['html', 'head', 'body']);
|
|
2962
2964
|
|
|
2963
2965
|
export function adornerComparator(adornerA: Adorners.Adorner.Adorner, adornerB: Adorners.Adorner.Adorner): number {
|
|
@@ -3000,8 +3002,10 @@ export interface EditorHandles {
|
|
|
3000
3002
|
resize: () => void;
|
|
3001
3003
|
}
|
|
3002
3004
|
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
+
/**
|
|
3006
|
+
* As a privacy measure we are logging elements tree outline as a flat list where every tree item is a
|
|
3007
|
+
* child of a tree outline.
|
|
3008
|
+
**/
|
|
3005
3009
|
function loggingParentProvider(e: Element): Element|undefined {
|
|
3006
3010
|
const treeElement = UI.TreeOutline.TreeElement.getTreeElementBylistItemNode(e);
|
|
3007
3011
|
return treeElement?.treeOutline?.contentElement;
|
|
@@ -1230,11 +1230,6 @@ export class ElementsTreeOutline extends
|
|
|
1230
1230
|
}
|
|
1231
1231
|
|
|
1232
1232
|
private contextMenuEventFired(event: MouseEvent): void {
|
|
1233
|
-
// The context menu construction may be async. In order to
|
|
1234
|
-
// make sure that no other (default) context menu shows up, we need
|
|
1235
|
-
// to stop propagating and prevent the default action.
|
|
1236
|
-
event.stopPropagation();
|
|
1237
|
-
event.preventDefault();
|
|
1238
1233
|
const treeElement = this.treeElementFromEventInternal(event);
|
|
1239
1234
|
if (treeElement instanceof ElementsTreeElement) {
|
|
1240
1235
|
void this.showContextMenu(treeElement, event);
|
|
@@ -1246,13 +1241,21 @@ export class ElementsTreeOutline extends
|
|
|
1246
1241
|
return;
|
|
1247
1242
|
}
|
|
1248
1243
|
|
|
1249
|
-
const contextMenu = new UI.ContextMenu.ContextMenu(event);
|
|
1250
|
-
const isPseudoElement = Boolean(treeElement.node().pseudoType());
|
|
1251
|
-
const isTag = treeElement.node().nodeType() === Node.ELEMENT_NODE && !isPseudoElement;
|
|
1252
1244
|
const node = (event.target as Node | null);
|
|
1253
1245
|
if (!node) {
|
|
1254
1246
|
return;
|
|
1255
1247
|
}
|
|
1248
|
+
|
|
1249
|
+
// The context menu construction may be async. In order to
|
|
1250
|
+
// make sure that no other (default) context menu shows up, we need
|
|
1251
|
+
// to stop propagating and prevent the default action.
|
|
1252
|
+
event.stopPropagation();
|
|
1253
|
+
event.preventDefault();
|
|
1254
|
+
|
|
1255
|
+
const contextMenu = new UI.ContextMenu.ContextMenu(event);
|
|
1256
|
+
const isPseudoElement = Boolean(treeElement.node().pseudoType());
|
|
1257
|
+
const isTag = treeElement.node().nodeType() === Node.ELEMENT_NODE && !isPseudoElement;
|
|
1258
|
+
|
|
1256
1259
|
let textNode: Element|null = node.enclosingNodeOrSelfWithClass('webkit-html-text-node');
|
|
1257
1260
|
if (textNode?.classList.contains('bogus')) {
|
|
1258
1261
|
textNode = null;
|
|
@@ -57,8 +57,10 @@ export function rendererBase<MatchT extends SDK.CSSPropertyParser.Match>(
|
|
|
57
57
|
return RendererBase;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
/**
|
|
61
|
+
* This class implements highlighting for rendered nodes in value traces. On hover, all nodes belonging to the same
|
|
62
|
+
* Match (using object identity) are highlighted.
|
|
63
|
+
**/
|
|
62
64
|
export class Highlighting {
|
|
63
65
|
static readonly REGISTRY_NAME = 'css-value-tracing';
|
|
64
66
|
// This holds a stack of active ranges, the top-stack is the currently highlighted set. mouseenter and mouseleave
|
|
@@ -145,19 +147,21 @@ export class Highlighting {
|
|
|
145
147
|
}
|
|
146
148
|
}
|
|
147
149
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
150
|
+
/**
|
|
151
|
+
* This class is used to guide value tracing when passed to the Renderer. Tracing has two phases. First, substitutions
|
|
152
|
+
* such as var() are applied step by step. In each step, all vars in the value are replaced by their definition until no
|
|
153
|
+
* vars remain. In the second phase, we evaluate other functions such as calc() or min() or color-mix(). Which CSS
|
|
154
|
+
* function types are actually substituted or evaluated is not relevant here, rather it is decided by an individual
|
|
155
|
+
* MatchRenderer.
|
|
156
|
+
*
|
|
157
|
+
* Callers don't need to keep track of the tracing depth (i.e., the number of substitution/evaluation steps).
|
|
158
|
+
* TracingContext is stateful and keeps track of the depth, so callers can progressively produce steps by calling
|
|
159
|
+
* TracingContext#nextSubstitution or TracingContext#nextEvaluation. Calling Renderer with the tracing context will then
|
|
160
|
+
* produce the next step of tracing. The tracing depth is passed to the individual MatchRenderers by way of
|
|
161
|
+
* TracingContext#substitution or TracingContext#applyEvaluation/TracingContext#evaluation (see function-level comments
|
|
162
|
+
* about how these two play together), which MatchRenderers call to request a fresh TracingContext for the next level of
|
|
163
|
+
* substitution/evaluation.
|
|
164
|
+
**/
|
|
161
165
|
export class TracingContext {
|
|
162
166
|
#substitutionDepth = 0;
|
|
163
167
|
#hasMoreSubstitutions: boolean;
|
|
@@ -1193,10 +1193,12 @@ type ShadowLengthProperty = ShadowProperty&{
|
|
|
1193
1193
|
propertyType: Exclude<ShadowPropertyType, ShadowPropertyType.INSET|ShadowPropertyType.COLOR>,
|
|
1194
1194
|
};
|
|
1195
1195
|
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1196
|
+
/**
|
|
1197
|
+
* The shadow model is an abstraction over the various shadow properties on the one hand and the order they were defined
|
|
1198
|
+
* in on the other, so that modifications through the shadow editor can retain the property order in the authored text.
|
|
1199
|
+
* The model also looks through var()s by keeping a mapping between individual properties and any var()s they are coming
|
|
1200
|
+
* from, replacing the var() functions as needed with concrete values when edited.
|
|
1201
|
+
**/
|
|
1200
1202
|
export class ShadowModel implements InlineEditor.CSSShadowEditor.CSSShadowModel {
|
|
1201
1203
|
readonly #properties: ShadowProperty[];
|
|
1202
1204
|
readonly #shadowType: SDK.CSSPropertyParserMatchers.ShadowType;
|
|
@@ -135,9 +135,9 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
135
135
|
const FILTER_IDLE_PERIOD = 500;
|
|
136
136
|
// Minimum number of @property rules for the @property section block to be folded initially
|
|
137
137
|
const MIN_FOLDED_SECTIONS_COUNT = 5;
|
|
138
|
-
|
|
138
|
+
/** Title of the registered properties section **/
|
|
139
139
|
export const REGISTERED_PROPERTY_SECTION_NAME = '@property';
|
|
140
|
-
|
|
140
|
+
/** Title of the function section **/
|
|
141
141
|
export const FUNCTION_SECTION_NAME = '@function';
|
|
142
142
|
|
|
143
143
|
// Highlightable properties are those that can be hovered in the sidebar to trigger a specific
|
|
@@ -21,8 +21,10 @@ const UIStrings = {
|
|
|
21
21
|
const str_ = i18n.i18n.registerUIStrings('panels/elements/components/AccessibilityTreeNode.ts', UIStrings);
|
|
22
22
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
/**
|
|
25
|
+
* TODO(jobay) move this to Platform.StringUtilities if still needed.
|
|
26
|
+
* This function is a variant of setTextContentTruncatedIfNeeded found in DOMExtension.
|
|
27
|
+
**/
|
|
26
28
|
function truncateTextIfNeeded(text: string): string {
|
|
27
29
|
const maxTextContentLength = 10000;
|
|
28
30
|
|
|
@@ -38,8 +38,10 @@ export enum RegisteredAdorners {
|
|
|
38
38
|
POPOVER = 'popover',
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
/**
|
|
42
|
+
* This enum-like const object serves as the authoritative registry for all the
|
|
43
|
+
* adorners available.
|
|
44
|
+
**/
|
|
43
45
|
export function getRegisteredAdorner(which: RegisteredAdorners): RegisteredAdorner {
|
|
44
46
|
switch (which) {
|
|
45
47
|
case RegisteredAdorners.GRID:
|
|
@@ -215,7 +217,7 @@ const OrderedAdornerCategories = [
|
|
|
215
217
|
AdornerCategories.DEFAULT,
|
|
216
218
|
];
|
|
217
219
|
|
|
218
|
-
|
|
220
|
+
/** Use idx + 1 for the order to avoid JavaScript's 0 == false issue **/
|
|
219
221
|
export const AdornerCategoryOrder = new Map(OrderedAdornerCategories.map((category, idx) => [category, idx + 1]));
|
|
220
222
|
|
|
221
223
|
export function compareAdornerNamesByCategory(nameA: string, nameB: string): number {
|
|
@@ -401,8 +401,13 @@ export class LighthouseController extends Common.ObjectWrapper.ObjectWrapper<Eve
|
|
|
401
401
|
}
|
|
402
402
|
|
|
403
403
|
getCategoryIDs(): string[] {
|
|
404
|
+
const {mode} = this.getFlags();
|
|
404
405
|
const categoryIDs = [];
|
|
405
406
|
for (const preset of Presets) {
|
|
407
|
+
if (mode && !preset.supportedModes.includes(mode)) {
|
|
408
|
+
continue;
|
|
409
|
+
}
|
|
410
|
+
|
|
406
411
|
if (preset.setting.get()) {
|
|
407
412
|
categoryIDs.push(preset.configID);
|
|
408
413
|
}
|
|
@@ -122,6 +122,8 @@ export interface EventTypes {
|
|
|
122
122
|
|
|
123
123
|
export class LinearMemoryInspectorView extends UI.Widget.VBox {
|
|
124
124
|
#memoryWrapper: LazyUint8Array;
|
|
125
|
+
#memory?: Uint8Array<ArrayBuffer>;
|
|
126
|
+
#offset = 0;
|
|
125
127
|
#address: number;
|
|
126
128
|
#tabId: string;
|
|
127
129
|
#inspector: LinearMemoryInspectorComponents.LinearMemoryInspector.LinearMemoryInspector;
|
|
@@ -140,32 +142,52 @@ export class LinearMemoryInspectorView extends UI.Widget.VBox {
|
|
|
140
142
|
this.#address = address;
|
|
141
143
|
this.#tabId = tabId;
|
|
142
144
|
this.#hideValueInspector = Boolean(hideValueInspector);
|
|
145
|
+
this.firstTimeOpen = true;
|
|
146
|
+
|
|
143
147
|
this.#inspector = new LinearMemoryInspectorComponents.LinearMemoryInspector.LinearMemoryInspector();
|
|
144
|
-
this.#inspector.addEventListener(
|
|
148
|
+
this.#inspector.contentElement.addEventListener(
|
|
145
149
|
LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent.eventName,
|
|
146
|
-
(event: LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent) =>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
this.#inspector.addEventListener(
|
|
150
|
+
(event: LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent) =>
|
|
151
|
+
this.#memoryRequested(event));
|
|
152
|
+
this.#inspector.contentElement.addEventListener(
|
|
150
153
|
LinearMemoryInspectorComponents.LinearMemoryInspector.AddressChangedEvent.eventName,
|
|
151
|
-
(event: LinearMemoryInspectorComponents.LinearMemoryInspector.AddressChangedEvent) =>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
this.#inspector.addEventListener(
|
|
154
|
+
(event: LinearMemoryInspectorComponents.LinearMemoryInspector.AddressChangedEvent) =>
|
|
155
|
+
this.updateAddress(event.data));
|
|
156
|
+
this.#inspector.contentElement.addEventListener(
|
|
155
157
|
LinearMemoryInspectorComponents.LinearMemoryInspector.SettingsChangedEvent.eventName,
|
|
156
158
|
(event: LinearMemoryInspectorComponents.LinearMemoryInspector.SettingsChangedEvent) => {
|
|
157
159
|
// Stop event from bubbling up, since no element further up needs the event.
|
|
158
160
|
event.stopPropagation();
|
|
159
161
|
this.saveSettings(event.data);
|
|
160
162
|
});
|
|
161
|
-
this.#inspector.addEventListener(
|
|
163
|
+
this.#inspector.contentElement.addEventListener(
|
|
162
164
|
LinearMemoryInspectorComponents.LinearMemoryHighlightChipList.DeleteMemoryHighlightEvent.eventName,
|
|
163
165
|
(event: LinearMemoryInspectorComponents.LinearMemoryHighlightChipList.DeleteMemoryHighlightEvent) => {
|
|
164
166
|
LinearMemoryInspectorController.instance().removeHighlight(this.#tabId, event.data);
|
|
165
167
|
this.refreshData();
|
|
166
168
|
});
|
|
167
|
-
this.
|
|
168
|
-
|
|
169
|
+
this.#inspector.show(this.contentElement);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
render(): void {
|
|
173
|
+
if (this.firstTimeOpen) {
|
|
174
|
+
const settings = LinearMemoryInspectorController.instance().loadSettings();
|
|
175
|
+
this.#inspector.valueTypes = settings.valueTypes;
|
|
176
|
+
this.#inspector.valueTypeModes = settings.modes;
|
|
177
|
+
this.#inspector.endianness = settings.endianness;
|
|
178
|
+
this.firstTimeOpen = false;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (!this.#memory) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
this.#inspector.memory = this.#memory;
|
|
186
|
+
this.#inspector.memoryOffset = this.#offset;
|
|
187
|
+
this.#inspector.address = this.#address;
|
|
188
|
+
this.#inspector.outerMemoryLength = this.#memoryWrapper.length();
|
|
189
|
+
this.#inspector.highlightInfo = this.#getHighlightInfo();
|
|
190
|
+
this.#inspector.hideValueInspector = this.#hideValueInspector;
|
|
169
191
|
}
|
|
170
192
|
|
|
171
193
|
override wasShown(): void {
|
|
@@ -184,32 +206,12 @@ export class LinearMemoryInspectorView extends UI.Widget.VBox {
|
|
|
184
206
|
}
|
|
185
207
|
|
|
186
208
|
refreshData(): void {
|
|
187
|
-
void LinearMemoryInspectorController.getMemoryForAddress(this.#memoryWrapper, this.#address)
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
let endianness;
|
|
194
|
-
if (this.firstTimeOpen) {
|
|
195
|
-
const settings = LinearMemoryInspectorController.instance().loadSettings();
|
|
196
|
-
valueTypes = settings.valueTypes;
|
|
197
|
-
valueTypeModes = settings.modes;
|
|
198
|
-
endianness = settings.endianness;
|
|
199
|
-
this.firstTimeOpen = false;
|
|
200
|
-
}
|
|
201
|
-
this.#inspector.data = {
|
|
202
|
-
memory,
|
|
203
|
-
address: this.#address,
|
|
204
|
-
memoryOffset: offset,
|
|
205
|
-
outerMemoryLength: this.#memoryWrapper.length(),
|
|
206
|
-
valueTypes,
|
|
207
|
-
valueTypeModes,
|
|
208
|
-
endianness,
|
|
209
|
-
highlightInfo: this.#getHighlightInfo(),
|
|
210
|
-
hideValueInspector: this.#hideValueInspector,
|
|
211
|
-
};
|
|
212
|
-
});
|
|
209
|
+
void LinearMemoryInspectorController.getMemoryForAddress(this.#memoryWrapper, this.#address)
|
|
210
|
+
.then(({memory, offset}) => {
|
|
211
|
+
this.#memory = memory;
|
|
212
|
+
this.#offset = offset;
|
|
213
|
+
this.render();
|
|
214
|
+
});
|
|
213
215
|
}
|
|
214
216
|
|
|
215
217
|
#memoryRequested(event: LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent): void {
|
|
@@ -219,14 +221,9 @@ export class LinearMemoryInspectorView extends UI.Widget.VBox {
|
|
|
219
221
|
}
|
|
220
222
|
|
|
221
223
|
void LinearMemoryInspectorController.getMemoryRange(this.#memoryWrapper, start, end).then(memory => {
|
|
222
|
-
this.#
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
memoryOffset: start,
|
|
226
|
-
outerMemoryLength: this.#memoryWrapper.length(),
|
|
227
|
-
highlightInfo: this.#getHighlightInfo(),
|
|
228
|
-
hideValueInspector: this.#hideValueInspector,
|
|
229
|
-
};
|
|
224
|
+
this.#memory = memory;
|
|
225
|
+
this.#offset = start;
|
|
226
|
+
this.render();
|
|
230
227
|
});
|
|
231
228
|
}
|
|
232
229
|
|