chrome-devtools-frontend 1.0.1522145 → 1.0.1524741
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/ui_engineering.md +98 -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/EnhancedTracesParser.ts +13 -6
- 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/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/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/Deprecation.ts +4 -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 +600 -0
- 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/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 +9 -1
- 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 +7 -5
- package/front_end/models/text_utils/ContentProvider.ts +6 -4
- package/front_end/models/trace/LanternComputationData.ts +1 -0
- 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 +30 -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 +10 -11
- 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 +43 -28
- 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 +97 -95
- package/front_end/panels/changes/changesSidebar.css +3 -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/linear_memory_inspector/components/LinearMemoryInspector.ts +6 -4
- 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 +40 -48
- 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/TimelineFlameChartView.ts +17 -0
- package/front_end/panels/timeline/TimelinePanel.ts +15 -8
- package/front_end/panels/timeline/TimelineSelection.ts +4 -2
- package/front_end/panels/timeline/TimelineUIUtils.ts +17 -6
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +6 -4
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +21 -9
- 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/timelineDetailsView.css +5 -0
- 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/highlighting/HighlightElement.ts +77 -0
- package/front_end/ui/components/highlighting/HighlightManager.ts +37 -0
- 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 +13 -4
- 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/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
package/AUTHORS
CHANGED
|
@@ -33,6 +33,7 @@ Danny Eldridge <me@heardanieljames.com>
|
|
|
33
33
|
Derek Li <the.derekli@gmail.com>
|
|
34
34
|
Douglas Chiang <douglasdothnc@gmail.com>
|
|
35
35
|
Dragonish <no.web.developer@outlook.com>
|
|
36
|
+
Eden Wang <nedenwang@gmail.com>
|
|
36
37
|
Edward Trist <edwardtrist@gmail.com>
|
|
37
38
|
Ergün Erdoğmuş <erdogmusergun@gmail.com>
|
|
38
39
|
Eric Rannaud <eric.rannaud@gmail.com>
|
package/docs/README.md
CHANGED
package/docs/policy/README.md
CHANGED
|
@@ -3,5 +3,6 @@
|
|
|
3
3
|
This folder contains the policies relevant to the development of the Chromium
|
|
4
4
|
DevTools.
|
|
5
5
|
|
|
6
|
+
1. [Chromium DevTools Console Policy](./console-policy.md)
|
|
6
7
|
1. [Chromium DevTools Slow-Close Policy](./slow-close.md)
|
|
7
8
|
2. [DevTools Page Zoom Accessibility Policy](./gar-page-zoom-policy.md)
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Chromium DevTools Console Policy
|
|
2
|
+
|
|
3
|
+
[goo.gle/devtools-console-policy](http://goo.gle/devtools-console-policy)
|
|
4
|
+
([go/chrome-devtools:console-policy](http://go/chrome-devtools:console-policy))
|
|
5
|
+
|
|
6
|
+
**TL;DR:** This policy outlines a strategy to keep the signal to noise ratio in
|
|
7
|
+
the Console panel of Chromium DevTools high, by setting clear expectations for
|
|
8
|
+
Chromium teams what kind of information is presented to web developers via the
|
|
9
|
+
Console and how it is presented. Console spam, specifically from Chromium
|
|
10
|
+
itself, is a known pain point for developers (e.g.
|
|
11
|
+
[crbug/338403584](http://crbug.com/338403584)).
|
|
12
|
+
|
|
13
|
+
## Background
|
|
14
|
+
|
|
15
|
+
The [Console panel](https://developer.chrome.com/docs/devtools/console) in the
|
|
16
|
+
Chromium Developer Tools is usually the first place where web developers check
|
|
17
|
+
in case something is not working as expected, and ideally they would come across
|
|
18
|
+
an error or warning message here that helps them to quickly resolve the issue at
|
|
19
|
+
hand. The panel shows all the messages that are logged by the web application
|
|
20
|
+
but also the browser (potentially on behalf of the web application, for example
|
|
21
|
+
logging uncaught exceptions).
|
|
22
|
+
|
|
23
|
+
In order for it to remain useful to web developers, the signal to noise ratio
|
|
24
|
+
must be as high as possible, and it’s crucially important to keep in mind that
|
|
25
|
+
the information shown is (a) relevant to what the developer is looking for right
|
|
26
|
+
now and (b) actionable wrt. to the issue at hand. Putting it the other way
|
|
27
|
+
around, while the developer is focused on investigating a concrete problem it
|
|
28
|
+
doesn’t help to show a lot of messages around potential issues, suggested
|
|
29
|
+
improvements, or things that went wrong without any useful breadcrumbs (prime
|
|
30
|
+
examples here are error messages from somewhere deep in Blink which contain no
|
|
31
|
+
stack traces and basically just repeat the information that is already present
|
|
32
|
+
on a JavaScript exception throw at the same time).
|
|
33
|
+
|
|
34
|
+
## Common problems
|
|
35
|
+
|
|
36
|
+
### Useless anchor
|
|
37
|
+
|
|
38
|
+
A common problem we’ve observed is console messages from Chromium without a
|
|
39
|
+
meaningful and actionable stack trace. Consider the following example, where the
|
|
40
|
+
location attached to the console message is the first line of the main document.
|
|
41
|
+
The inexperienced web developer will probably be puzzled how come
|
|
42
|
+
`<!doctype html>` activates fingerprinting protection on the current page.
|
|
43
|
+
|
|
44
|
+

|
|
45
|
+
|
|
46
|
+
### For your information
|
|
47
|
+
|
|
48
|
+
From a Chromium team working on a specific feature, it might be totally
|
|
49
|
+
reasonable to _”let the developer know what’s going on”_, because something
|
|
50
|
+
could break. But from a user’s perspective, messages that basically only convey
|
|
51
|
+
non-actionable information and aren’t relevant in the context of the problem
|
|
52
|
+
that the developer is investigating are useless at best. Consider the following
|
|
53
|
+
example:
|
|
54
|
+
|
|
55
|
+

|
|
56
|
+
|
|
57
|
+
The first warning message says that Fingerprinting protection is active, but
|
|
58
|
+
doesn’t tell the developer whether that’s a problem or not, and what they can do
|
|
59
|
+
about it. It’s highly confusing. The second warning message states that two
|
|
60
|
+
third-party cookies were blocked, but also leaves the developer wondering if
|
|
61
|
+
that’s something to be concerned about or caused any actual problem.
|
|
62
|
+
|
|
63
|
+
Similar messages that fall into this bucket:
|
|
64
|
+
|
|
65
|
+
* `Third-party cookie will be blocked. Learn more in the Issues tab`
|
|
66
|
+
* `[Violation] 'setTimeout' handler took <N>ms`
|
|
67
|
+
* `[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>`
|
|
68
|
+
* `Specifying 'overflow: visible' on img, video and canvas tags may cause them to produce visual content outside of the element bounds. See https://github.com/WICG/view-transitions/blob/main/debugging_overflow_on_images.md for details.`
|
|
69
|
+
|
|
70
|
+
Logging a message to the Console panel just to tell the developer to open
|
|
71
|
+
another panel or read some article is specifically annoying, and over time will
|
|
72
|
+
result in training web developers on ignoring messages produced by Chromium
|
|
73
|
+
itself.
|
|
74
|
+
|
|
75
|
+
### Repetition
|
|
76
|
+
|
|
77
|
+
Repeating the same message over and over again (independent of whether it’s
|
|
78
|
+
actionable and meaningful) is another source of problems:
|
|
79
|
+
|
|
80
|
+

|
|
81
|
+
|
|
82
|
+
DevTools has a feature to group similar messages, which most users have enabled,
|
|
83
|
+
so the pain they feel from a lot of repeated information is manageable. But that
|
|
84
|
+
also gives rise to a new problem: Problems might be hidden through the grouping
|
|
85
|
+
feature outside of the viewport, because the grouping somewhat breaks the
|
|
86
|
+
chronological order.
|
|
87
|
+
|
|
88
|
+
## Best practice
|
|
89
|
+
|
|
90
|
+
Specifically for the purpose of being able to present developers with actionable
|
|
91
|
+
information, coupled with traces of data that are relevant to the issue, we’ve
|
|
92
|
+
introduced the [Issues panel], and as part of
|
|
93
|
+
[crbug/40173406](http://crbug.com/40173406) and related bugs already migrated a
|
|
94
|
+
few spammy console messages to issues.
|
|
95
|
+
|
|
96
|
+
In general, reserve the use of `context->AddConsoleMessage(...)` and similar
|
|
97
|
+
APIs for rare cases when the console message adds significant value, favor a
|
|
98
|
+
well-worded and helpful issue over a console message, and specifically don’t
|
|
99
|
+
spit out a console message when you are already raising an exception (exceptions
|
|
100
|
+
can be coupled with issues internally to provide more actionable information).
|
|
101
|
+
|
|
102
|
+
## Building empathy
|
|
103
|
+
|
|
104
|
+
Many Chromies might not be able to immediately relate to the struggles of web
|
|
105
|
+
developers, and might not have first hand experience with sifting through
|
|
106
|
+
endless logs of useless information produced by frameworks, libraries, and
|
|
107
|
+
eventually the browser. But imagine the following scenario: You are using `gdb`
|
|
108
|
+
or `lldb` and instead of helping you diagnose the crash somewhere deep in your
|
|
109
|
+
C++ code for Autofill in the browser process, it’s spamming you with pages of
|
|
110
|
+
potential performance improvements in the renderer code for `<canvas>` elements.
|
|
111
|
+
At best that would be very confusing, but more likely you’d be very frustrated
|
|
112
|
+
with the tool after a while. This is exactly what happens if we spam web
|
|
113
|
+
developers with potential performance issues.
|
|
114
|
+
|
|
115
|
+
We have a [logging policy for Chromium] to prevent ourselves from being
|
|
116
|
+
overwhelmed by log messages from other Chromium teams, for the same reason.
|
|
117
|
+
|
|
118
|
+
## GTM strategy
|
|
119
|
+
|
|
120
|
+
The most common cause for spammy console messages from Chromium is an
|
|
121
|
+
insufficient Go-To-Market (GTM) strategy for features or (potentially breaking)
|
|
122
|
+
changes when it comes to developer adoption. Oftentimes it’s unclear what
|
|
123
|
+
exactly the expectations are and what are the critical user journeys that web
|
|
124
|
+
developers go through. Spending a bit more time on this aspect and involving
|
|
125
|
+
DevRel early on can help to shine light on the matter and avoid sprinkling log
|
|
126
|
+
messages all over the place to _”raise awareness”_. Specifically consider:
|
|
127
|
+
|
|
128
|
+
- The precise target audience for your information, because not all web
|
|
129
|
+
developers are equal at all times.
|
|
130
|
+
- Under which exact circumstances that piece of information is required.
|
|
131
|
+
- Is it a nice to have (e.g. _”X could be faster if you did Y”_ or _”using A
|
|
132
|
+
poses a potential security risk for your users”_) or a critically important
|
|
133
|
+
piece of information (e.g. _”X will stop working in the next release unless
|
|
134
|
+
you do Y”_).
|
|
135
|
+
|
|
136
|
+
Feel free to reach out to [devtools-dev@chromium.org] with questions, and ping
|
|
137
|
+
[dsv@chromium.org](mailto:dsv@chromium.org) (Chrome DevTools TL) or
|
|
138
|
+
[hablich@chromium.org](mailto:hablich@chromium.org) (Chrome DevTools PM)
|
|
139
|
+
directly (specifically in case of code reviews which add new problematic console
|
|
140
|
+
messages).
|
|
141
|
+
|
|
142
|
+
[Issues panel]: https://developer.chrome.com/docs/devtools/issues
|
|
143
|
+
[logging policy for Chromium]: https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md#logging
|
|
144
|
+
[devtools-dev@chromium.org]: https://groups.google.com/a/chromium.org/g/devtools-dev
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/ui_engineering.md
CHANGED
|
@@ -1223,3 +1223,101 @@ export const DEFAULT_VIEW = (input, _output, target) => {
|
|
|
1223
1223
|
target, {host: input});
|
|
1224
1224
|
};
|
|
1225
1225
|
```
|
|
1226
|
+
|
|
1227
|
+
## Refactoring UI.Toolbar.Provider
|
|
1228
|
+
|
|
1229
|
+
As part of the migration, sometimes classes need to be broken up into smaller pieces. Classes implementing
|
|
1230
|
+
`UI.Toolbar.Provider` logic are good examples of this, if they implement `View` logic in addition to their
|
|
1231
|
+
`UI.Toolbar.Provider` responsibilities. The View logic needs to be moved to a separate class.
|
|
1232
|
+
|
|
1233
|
+
|
|
1234
|
+
**Before:**
|
|
1235
|
+
```typescript
|
|
1236
|
+
export class NodeIndicator implements UI.Toolbar.Provider {
|
|
1237
|
+
readonly #element: Element;
|
|
1238
|
+
readonly #item: UI.Toolbar.ToolbarItem;
|
|
1239
|
+
|
|
1240
|
+
private constructor() {
|
|
1241
|
+
// Creates `this.#element` and `this.#item` imperatively (e.g. using document.createElement/createChild).
|
|
1242
|
+
}
|
|
1243
|
+
static instance(opts: { forceNew: boolean|null, } = {forceNew: null}): NodeIndicator {
|
|
1244
|
+
// Creates an instance of this class and returns it.
|
|
1245
|
+
}
|
|
1246
|
+
#update(input): void { /* Handles updates to `this.#element` and `this.#item`. */}
|
|
1247
|
+
item(): UI.Toolbar.ToolbarItem|null {
|
|
1248
|
+
return this.#item;
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
```
|
|
1252
|
+
|
|
1253
|
+
**After:**
|
|
1254
|
+
```typescript
|
|
1255
|
+
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
1256
|
+
// Implementation of the View using Lit.render() (omitted for brevity).
|
|
1257
|
+
};
|
|
1258
|
+
|
|
1259
|
+
export class NodeIndicator extends UI.Widget.Widget {
|
|
1260
|
+
readonly #view: View;
|
|
1261
|
+
|
|
1262
|
+
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
1263
|
+
super(element, {useShadowDom: true});
|
|
1264
|
+
this.#view = view;
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
override performUpdate(): void {
|
|
1268
|
+
const input = {
|
|
1269
|
+
// Whatever input the View needs.
|
|
1270
|
+
};
|
|
1271
|
+
this.#view(input, {}, this.contentElement);
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
let nodeIndicatorProviderInstance: NodeIndicatorProvider;
|
|
1276
|
+
export class NodeIndicatorProvider implements UI.Toolbar.Provider {
|
|
1277
|
+
#toolbarItem: UI.Toolbar.ToolbarItem;
|
|
1278
|
+
#widgetElement: UI.Widget.WidgetElement<NodeIndicator>;
|
|
1279
|
+
|
|
1280
|
+
private constructor() {
|
|
1281
|
+
this.#widgetElement = document.createElement('devtools-widget') as UI.Widget.WidgetElement<NodeIndicator>;
|
|
1282
|
+
this.#widgetElement.widgetConfig = UI.Widget.widgetConfig(NodeIndicator);
|
|
1283
|
+
|
|
1284
|
+
this.#toolbarItem = new UI.Toolbar.ToolbarItem(this.#widgetElement);
|
|
1285
|
+
this.#toolbarItem.setVisible(false);
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
item(): UI.Toolbar.ToolbarItem|null {
|
|
1289
|
+
return this.#toolbarItem;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
static instance(opts: {forceNew: boolean|null} = {forceNew: null}): NodeIndicatorProvider {
|
|
1293
|
+
const {forceNew} = opts;
|
|
1294
|
+
if (!nodeIndicatorProviderInstance || forceNew) {
|
|
1295
|
+
nodeIndicatorProviderInstance = new NodeIndicatorProvider();
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
return nodeIndicatorProviderInstance;
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
```
|
|
1302
|
+
|
|
1303
|
+
## Highlighting text
|
|
1304
|
+
|
|
1305
|
+
### (UI.UIUtils.highlightRangesWithStyleClass or Highlighting.HighlightManager)
|
|
1306
|
+
|
|
1307
|
+
Use the `<devtools-highlight>` component to highlight text ranges within its
|
|
1308
|
+
container. The component takes two attributes: `ranges`, which is a
|
|
1309
|
+
space-separated list of `offset,length` pairs, and `current-range`, which is a
|
|
1310
|
+
single `offset,length` pair to highlight with a different color.
|
|
1311
|
+
|
|
1312
|
+
The component will automatically sort and merge the ranges provided.
|
|
1313
|
+
|
|
1314
|
+
```html
|
|
1315
|
+
<div style="position:relative">
|
|
1316
|
+
<devtools-highlight ranges="10,2 1,3 2,3" current-range="5,3">
|
|
1317
|
+
This is some text to highlight.
|
|
1318
|
+
</devtools-highlight>
|
|
1319
|
+
</div>
|
|
1320
|
+
```
|
|
1321
|
+
|
|
1322
|
+
In this example, the ranges `1,3` and `2,3` will be merged into `1,4`. The
|
|
1323
|
+
ranges `10,2` and the current range `5,3` will also be highlighted.
|
package/front_end/Tests.js
CHANGED
|
@@ -1065,7 +1065,7 @@
|
|
|
1065
1065
|
this.fail(text);
|
|
1066
1066
|
} // This will throw.
|
|
1067
1067
|
}
|
|
1068
|
-
|
|
1068
|
+
/** Neither PASS nor FAIL, so wait for more messages. **/
|
|
1069
1069
|
function onConsoleMessage(event) {
|
|
1070
1070
|
const text = event.data.messageText;
|
|
1071
1071
|
if (text === 'PASS') {
|
|
@@ -47,11 +47,13 @@ import {
|
|
|
47
47
|
rgbToHwb,
|
|
48
48
|
} from './ColorUtils.js';
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
/**
|
|
51
|
+
* <hue> is defined as a <number> or <angle>
|
|
52
|
+
* and we hold this in degrees. However, after
|
|
53
|
+
* the conversions, these degrees can result in
|
|
54
|
+
* negative values. That's why we normalize the hue to be
|
|
55
|
+
* between [0 - 360].
|
|
56
|
+
**/
|
|
55
57
|
function normalizeHue(hue: number): number {
|
|
56
58
|
// Even though it is highly unlikely, hue can be
|
|
57
59
|
// very negative like -400. The initial modulo
|
|
@@ -60,9 +62,11 @@ function normalizeHue(hue: number): number {
|
|
|
60
62
|
return ((hue % 360) + 360) % 360;
|
|
61
63
|
}
|
|
62
64
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Parses angle in the form of
|
|
67
|
+
* `<angle>deg`, `<angle>turn`, `<angle>grad and `<angle>rad`
|
|
68
|
+
* and returns the canonicalized `degree`.
|
|
69
|
+
**/
|
|
66
70
|
function parseAngle(angleText: string): number|null {
|
|
67
71
|
const angle = angleText.replace(/(deg|g?rad|turn)$/, '');
|
|
68
72
|
// @ts-expect-error: isNaN can accept strings
|
|
@@ -90,7 +94,7 @@ function parseAngle(angleText: string): number|null {
|
|
|
90
94
|
return number;
|
|
91
95
|
}
|
|
92
96
|
|
|
93
|
-
|
|
97
|
+
/** Returns the `Format` equivalent from the format text **/
|
|
94
98
|
export function getFormat(formatText: string): Format|null {
|
|
95
99
|
switch (formatText) {
|
|
96
100
|
case Format.HEX:
|
|
@@ -50,13 +50,15 @@ class Matrix3x3 {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
/**
|
|
54
|
+
* A transfer function mapping encoded values to linear values,
|
|
55
|
+
* represented by this 7-parameter piecewise function:
|
|
56
|
+
*
|
|
57
|
+
* linear = sign(encoded) * (c*|encoded| + f) , 0 <= |encoded| < d
|
|
58
|
+
* = sign(encoded) * ((a*|encoded| + b)^g + e), d <= |encoded|
|
|
59
|
+
*
|
|
60
|
+
* (A simple gamma transfer function sets g to gamma and a to 1.)
|
|
61
|
+
**/
|
|
60
62
|
class TransferFunction {
|
|
61
63
|
g: number;
|
|
62
64
|
a: number;
|
|
@@ -48,7 +48,7 @@ export async function compress(str: string): Promise<ArrayBuffer> {
|
|
|
48
48
|
return buffer;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
/** Private coder/decoder **/
|
|
52
52
|
function gzipCodec(buffer: Uint8Array<ArrayBufferLike>|ArrayBuffer, codecStream: CompressionStream|DecompressionStream):
|
|
53
53
|
Promise<ArrayBuffer> {
|
|
54
54
|
const {readable, writable} = new TransformStream();
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Polyfill of https://github.com/tc39/proposal-upsert with a subclass.
|
|
7
|
+
*
|
|
8
|
+
* TODO: Once the proposal is merged, just replace `MapWithDefault` with `Map` and remove it.
|
|
9
|
+
**/
|
|
8
10
|
export class MapWithDefault<K, V> extends Map<K, V> {
|
|
9
11
|
getOrInsert(key: K, defaultValue: V): V {
|
|
10
12
|
if (!this.has(key)) {
|
|
@@ -145,10 +145,6 @@ const UIStrings = {
|
|
|
145
145
|
* @description Name of a network initiator type
|
|
146
146
|
*/
|
|
147
147
|
preflight: 'Preflight',
|
|
148
|
-
/**
|
|
149
|
-
* @description Name of a network initiator type
|
|
150
|
-
*/
|
|
151
|
-
webbundle: 'WebBundle',
|
|
152
148
|
/**
|
|
153
149
|
* @description Name of a network initiator type for FedCM requests
|
|
154
150
|
*/
|
|
@@ -212,9 +208,6 @@ export class ResourceType {
|
|
|
212
208
|
if (mimeType === 'application/wasm') {
|
|
213
209
|
return resourceTypes.Wasm;
|
|
214
210
|
}
|
|
215
|
-
if (mimeType === 'application/webbundle') {
|
|
216
|
-
return resourceTypes.WebBundle;
|
|
217
|
-
}
|
|
218
211
|
|
|
219
212
|
return null;
|
|
220
213
|
}
|
|
@@ -337,10 +330,6 @@ export class ResourceType {
|
|
|
337
330
|
return this.#name.startsWith('sm-');
|
|
338
331
|
}
|
|
339
332
|
|
|
340
|
-
isWebbundle(): boolean {
|
|
341
|
-
return this.#name === 'webbundle';
|
|
342
|
-
}
|
|
343
|
-
|
|
344
333
|
toString(): string {
|
|
345
334
|
return this.#name;
|
|
346
335
|
}
|
|
@@ -427,7 +416,6 @@ export const resourceTypes = {
|
|
|
427
416
|
SourceMapScript: new ResourceType('sm-script', i18nLazyString(UIStrings.script), resourceCategories.Script, true),
|
|
428
417
|
SourceMapStyleSheet:
|
|
429
418
|
new ResourceType('sm-stylesheet', i18nLazyString(UIStrings.stylesheet), resourceCategories.Stylesheet, true),
|
|
430
|
-
WebBundle: new ResourceType('webbundle', i18nLazyString(UIStrings.webbundle), resourceCategories.Other, false),
|
|
431
419
|
FedCM: new ResourceType('fedcm', i18nLazyString(UIStrings.fedcm), resourceCategories.Other, false),
|
|
432
420
|
} as const;
|
|
433
421
|
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Set instance of this class as flavor to mark what panel triggered the
|
|
7
|
+
* 'elements.toggle-element-search' action if it was not the elements panel.
|
|
8
|
+
* This will cause specified panel to be made visible instead of the elements
|
|
9
|
+
* panel after the inspection is done.
|
|
10
|
+
**/
|
|
9
11
|
export class ReturnToPanelFlavor {
|
|
10
12
|
readonly viewId: string;
|
|
11
13
|
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
// ElementTYpe<string> -> string
|
|
8
8
|
type ElementType<T extends ArrayLike<unknown>> = T extends ArrayLike<infer E>? E : never;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Abstracts some generic operations that have different implementations depending
|
|
12
|
+
* on whether we operate on strings or array of things.
|
|
13
|
+
**/
|
|
12
14
|
interface TrieableTrait<T extends ArrayLike<ElementType<T>>> {
|
|
13
15
|
empty(): T;
|
|
14
16
|
append(base: T, appendage: ElementType<T>): T;
|
|
@@ -93,7 +93,7 @@ export interface FunctionDeclaration<T extends string|number|symbol = string> {
|
|
|
93
93
|
parameters: FunctionObjectParam<T>;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
/** Raw media bytes. **/
|
|
97
97
|
export interface MediaBlob {
|
|
98
98
|
// The IANA standard MIME type of the source data.
|
|
99
99
|
// Currently supported types are: image/png, image/jpeg.
|
|
@@ -113,7 +113,7 @@ export enum FunctionalityType {
|
|
|
113
113
|
AGENTIC_CHAT = 5,
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
/** See: cs/aida.proto (google3). **/
|
|
117
117
|
export enum ClientFeature {
|
|
118
118
|
// Unspecified client feature.
|
|
119
119
|
CLIENT_FEATURE_UNSPECIFIED = 0,
|
|
@@ -150,7 +150,7 @@ export enum UserTier {
|
|
|
150
150
|
PUBLIC = 3,
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
/** Googlers: see the Aida `retrieval` proto; this type is based on that. **/
|
|
154
154
|
export interface RequestFactMetadata {
|
|
155
155
|
/**
|
|
156
156
|
* A description of where the fact comes from.
|
|
@@ -84,11 +84,13 @@ class GdpError extends Error {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
/**
|
|
88
|
+
* The `batchGet` awards endpoint returns badge names with an
|
|
89
|
+
* obfuscated user ID (e.g., `profiles/12345/awards/badge-name`).
|
|
90
|
+
* This function normalizes them to use `me` instead of the ID
|
|
91
|
+
* (e.g., `profiles/me/awards/badge-path`) to match the format
|
|
92
|
+
* used for client-side requests.
|
|
93
|
+
**/
|
|
92
94
|
function normalizeBadgeName(name: string): string {
|
|
93
95
|
return name.replace(/profiles\/[^/]+\/awards\//, 'profiles/me/awards/');
|
|
94
96
|
}
|
|
@@ -217,11 +217,13 @@ export interface FunctionCallEvent {
|
|
|
217
217
|
context?: number;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
220
|
+
/**
|
|
221
|
+
* While `EventDescriptors` are used to dynamically dispatch host binding events,
|
|
222
|
+
* the `EventTypes` "type map" is used for type-checking said events by TypeScript.
|
|
223
|
+
* `EventTypes` is not used at runtime.
|
|
224
|
+
* Please note that the "dispatch" side can't be type-checked as the dispatch is
|
|
225
|
+
* done dynamically.
|
|
226
|
+
**/
|
|
225
227
|
export interface EventTypes {
|
|
226
228
|
[Events.AppendedToURL]: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString;
|
|
227
229
|
[Events.CanceledSaveURL]: Platform.DevToolsPath.UrlString;
|
|
@@ -35,9 +35,11 @@ export function isWin(): boolean {
|
|
|
35
35
|
return _isWin;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
/**
|
|
39
|
+
* In Chrome Layout tests the imported 'Platform' object is not writable/
|
|
40
|
+
* configurable, which prevents us from monkey-patching 'Platform''s methods.
|
|
41
|
+
* We circumvent this by adding 'setPlatformForTests'.
|
|
42
|
+
**/
|
|
41
43
|
export function setPlatformForTests(platform: string): void {
|
|
42
44
|
_platform = platform;
|
|
43
45
|
_isMac = undefined;
|
|
@@ -321,9 +321,11 @@ export class UserMetrics {
|
|
|
321
321
|
* 2. Do not update any 'MAX_VALUE' or any other value.
|
|
322
322
|
*/
|
|
323
323
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
324
|
+
/**
|
|
325
|
+
* Codes below are used to collect UMA histograms in the Chromium port.
|
|
326
|
+
* Do not change the values below, additional actions are needed on the Chromium side
|
|
327
|
+
* in order to add more codes.
|
|
328
|
+
**/
|
|
327
329
|
export enum Action {
|
|
328
330
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
329
331
|
WindowDocked = 1,
|
|
@@ -807,7 +809,7 @@ export enum DevtoolsExperiments {
|
|
|
807
809
|
MAX_VALUE = 110,
|
|
808
810
|
}
|
|
809
811
|
|
|
810
|
-
|
|
812
|
+
/** Update DevToolsIssuesPanelIssueExpanded from tools/metrics/histograms/enums.xml if new enum is added. **/
|
|
811
813
|
export enum IssueExpanded {
|
|
812
814
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
813
815
|
CrossOriginEmbedderPolicy = 0,
|
|
@@ -265,7 +265,7 @@ export function nearestIndexFromEnd<T>(arr: readonly T[], predicate: (arrayItem:
|
|
|
265
265
|
return nearestIndex(arr, predicate, NearestSearchStart.END);
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
|
|
268
|
+
/** Type guard for ensuring that `arr` does not contain null or undefined **/
|
|
269
269
|
export function arrayDoesNotContainNullOrUndefined<T>(arr: Array<T|null|undefined>): arr is T[] {
|
|
270
270
|
return !arr.includes(null) && !arr.includes(undefined);
|
|
271
271
|
}
|