chrome-devtools-frontend 1.0.1515446 → 1.0.1515988
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/contributing/infrastructure.md +131 -82
- package/front_end/Tests.js +3 -29
- package/front_end/core/common/Progress.ts +73 -55
- package/front_end/core/host/UserMetrics.ts +0 -1
- package/front_end/core/protocol_client/InspectorBackend.ts +2 -0
- package/front_end/core/root/Runtime.ts +0 -1
- package/front_end/core/sdk/CSSMatchedStyles.ts +12 -10
- package/front_end/core/sdk/CSSModel.ts +1 -31
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +27 -7
- package/front_end/core/sdk/DebuggerModel.ts +1 -31
- package/front_end/core/sdk/EnhancedTracesParser.ts +81 -50
- package/front_end/core/sdk/NetworkManager.ts +1 -31
- package/front_end/core/sdk/NetworkRequest.ts +1 -31
- package/front_end/core/sdk/RehydratingConnection.snapshot.txt +1003 -0
- package/front_end/core/sdk/RehydratingConnection.ts +13 -18
- package/front_end/core/sdk/RehydratingObject.ts +8 -31
- package/front_end/core/sdk/RemoteObject.ts +1 -31
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -31
- package/front_end/core/sdk/RuntimeModel.ts +1 -31
- package/front_end/core/sdk/ServiceWorkerManager.ts +1 -31
- package/front_end/core/sdk/SourceMap.ts +1 -31
- package/front_end/core/sdk/TraceObject.ts +8 -3
- package/front_end/entrypoints/main/MainImpl.ts +0 -2
- package/front_end/entrypoints/main/main-meta.ts +2 -2
- package/front_end/generated/InspectorBackendCommands.js +4 -4
- package/front_end/generated/SupportedCSSProperties.js +12 -0
- package/front_end/generated/protocol.ts +10 -1
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -3
- package/front_end/models/ai_assistance/ConversationHandler.ts +4 -6
- package/front_end/models/ai_assistance/agents/AiAgent.ts +4 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +107 -72
- package/front_end/models/ai_assistance/agents/PerformanceAnnotationsAgent.ts +2 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +178 -85
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +308 -218
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +161 -97
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +78 -58
- package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +10 -1
- package/front_end/models/ai_assistance/performance/AIContext.ts +19 -21
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +123 -55
- package/front_end/models/bindings/ContentProviderBasedProject.ts +6 -4
- package/front_end/models/breakpoints/BreakpointManager.ts +3 -3
- package/front_end/models/har/Writer.ts +11 -11
- package/front_end/models/javascript_metadata/NativeFunctions.js +7 -7
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +3 -3
- package/front_end/models/persistence/IsolatedFileSystem.ts +4 -4
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +7 -7
- package/front_end/models/persistence/PersistenceImpl.ts +8 -8
- package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
- package/front_end/models/text_utils/TextUtils.ts +26 -0
- package/front_end/models/trace/ModelImpl.ts +2 -16
- package/front_end/models/trace/Processor.ts +14 -8
- package/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +4 -4
- package/front_end/models/trace/handlers/FramesHandler.ts +2 -2
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +7 -10
- package/front_end/models/trace/handlers/MetaHandler.ts +11 -9
- package/front_end/models/trace/handlers/ScreenshotsHandler.ts +1 -1
- package/front_end/models/trace/handlers/ScriptsHandler.ts +5 -5
- package/front_end/models/trace/handlers/UserInteractionsHandler.ts +2 -14
- package/front_end/models/trace/handlers/UserTimingsHandler.ts +3 -4
- package/front_end/models/trace/insights/CLSCulprits.ts +1 -1
- package/front_end/models/trace/insights/DocumentLatency.ts +8 -7
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -1
- package/front_end/models/trace/insights/INPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/ImageDelivery.ts +1 -1
- package/front_end/models/trace/insights/LCPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/LCPDiscovery.ts +1 -1
- package/front_end/models/trace/insights/ModernHTTP.ts +1 -1
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -1
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
- package/front_end/models/trace/insights/types.ts +2 -0
- package/front_end/models/trace/types/Configuration.ts +12 -0
- package/front_end/models/trace/types/TraceEvents.ts +41 -64
- package/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +21 -99
- package/front_end/panels/application/ServiceWorkersView.ts +0 -1
- package/front_end/panels/application/components/BackForwardCacheStrings.ts +8 -2
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -3
- package/front_end/panels/common/BadgeNotification.ts +10 -8
- package/front_end/panels/common/GdpSignUpDialog.ts +30 -14
- package/front_end/panels/common/gdpSignUpDialog.css +4 -0
- package/front_end/panels/console/ConsoleView.ts +23 -28
- package/front_end/panels/console/ConsoleViewport.ts +2 -2
- package/front_end/panels/console/consoleView.css +11 -1
- package/front_end/panels/coverage/CoverageView.ts +2 -2
- package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
- package/front_end/panels/elements/StyleEditorWidget.ts +8 -19
- package/front_end/panels/elements/StylePropertyTreeElement.ts +39 -25
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -2
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +4 -3
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
- package/front_end/panels/layers/LayerTreeModel.ts +3 -3
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +4 -4
- package/front_end/panels/network/NetworkLogView.ts +1 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
- package/front_end/panels/network/NetworkSearchScope.ts +6 -6
- package/front_end/panels/search/SearchView.ts +220 -159
- package/front_end/panels/settings/components/SyncSection.ts +64 -10
- package/front_end/panels/settings/components/syncSection.css +6 -0
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +1 -4
- package/front_end/panels/sources/SourcesSearchScope.ts +4 -4
- package/front_end/panels/sources/TabbedEditorContainer.ts +5 -5
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +10 -5
- package/front_end/panels/timeline/TimelineFlameChartView.ts +18 -15
- package/front_end/panels/timeline/TimelinePanel.ts +41 -22
- package/front_end/panels/timeline/TracingLayerTree.ts +4 -5
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +37 -22
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +17 -7
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
- package/front_end/third_party/axe-core/README.chromium +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror/README.chromium +1 -0
- package/front_end/third_party/codemirror.next/README.chromium +1 -0
- package/front_end/third_party/csp_evaluator/README.chromium +1 -0
- package/front_end/third_party/diff/README.chromium +1 -0
- package/front_end/third_party/i18n/README.chromium +1 -0
- package/front_end/third_party/intl-messageformat/README.chromium +1 -0
- package/front_end/third_party/json5/README.chromium +1 -0
- package/front_end/third_party/legacy-javascript/README.chromium +1 -0
- package/front_end/third_party/lighthouse/README.chromium +1 -0
- package/front_end/third_party/lit/README.chromium +1 -0
- package/front_end/third_party/marked/README.chromium +1 -0
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/README.md +6 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +11 -1
- 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 +2 -2
- 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/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +30 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/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.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +5 -0
- 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/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +12 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +22 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +11 -1
- 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 +2 -2
- 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/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +30 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/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.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +12 -2
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +13 -2
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +50 -8
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +8 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +21 -5
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +12 -0
- package/front_end/third_party/puppeteer-replay/README.chromium +1 -0
- package/front_end/third_party/third-party-web/README.chromium +1 -0
- package/front_end/third_party/vscode.web-custom-data/README.chromium +1 -0
- package/front_end/third_party/wasmparser/README.chromium +1 -0
- package/front_end/third_party/web-vitals/README.chromium +1 -0
- package/front_end/ui/components/text_editor/config.ts +66 -16
- package/front_end/ui/components/tooltips/Tooltip.ts +17 -1
- package/front_end/ui/legacy/ContextMenu.ts +2 -2
- package/front_end/ui/legacy/GlassPane.ts +7 -3
- package/front_end/ui/legacy/ProgressIndicator.ts +33 -21
- package/front_end/ui/legacy/TabbedPane.ts +2 -2
- package/front_end/ui/legacy/Treeoutline.ts +10 -5
- package/front_end/ui/legacy/UIUtils.ts +42 -10
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +14 -14
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +6 -6
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +4 -2
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -29
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +14 -14
- package/front_end/ui/visual_logging/Debugging.ts +24 -12
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/inspector_overlay/highlight_common.ts +1 -27
- package/inspector_overlay/highlight_grid_common.ts +1 -27
- package/inspector_overlay/tool_highlight.ts +1 -27
- package/inspector_overlay/tool_persistent.ts +1 -27
- package/inspector_overlay/tool_source_order.ts +1 -27
- package/package.json +3 -3
@@ -1046,13 +1046,6 @@ export class LinkableNameRenderer extends rendererBase(SDK.CSSPropertyParserMatc
|
|
1046
1046
|
ruleBlock: '@position-try',
|
1047
1047
|
isDefined: Boolean(this.#matchedStyles.positionTryRules().find(pt => pt.name().text === match.text)),
|
1048
1048
|
};
|
1049
|
-
case SDK.CSSPropertyParserMatchers.LinkableNameProperties.FUNCTION:
|
1050
|
-
return {
|
1051
|
-
jslogContext: 'css-function',
|
1052
|
-
metric: null,
|
1053
|
-
ruleBlock: '@function',
|
1054
|
-
isDefined: Boolean(this.#matchedStyles.getRegisteredFunction(match.text)),
|
1055
|
-
};
|
1056
1049
|
}
|
1057
1050
|
}
|
1058
1051
|
|
@@ -1065,15 +1058,7 @@ export class LinkableNameRenderer extends rendererBase(SDK.CSSPropertyParserMatc
|
|
1065
1058
|
isDefined,
|
1066
1059
|
onLinkActivate: (): void => {
|
1067
1060
|
metric && Host.userMetrics.swatchActivated(metric);
|
1068
|
-
|
1069
|
-
const functionName = this.#matchedStyles.getRegisteredFunction(match.text);
|
1070
|
-
if (!functionName) {
|
1071
|
-
return;
|
1072
|
-
}
|
1073
|
-
this.#stylesPane.jumpToFunctionDefinition(functionName);
|
1074
|
-
} else {
|
1075
|
-
this.#stylesPane.jumpToSectionBlock(`${ruleBlock} ${match.text}`);
|
1076
|
-
}
|
1061
|
+
this.#stylesPane.jumpToSectionBlock(`${ruleBlock} ${match.text}`);
|
1077
1062
|
},
|
1078
1063
|
jslogContext,
|
1079
1064
|
};
|
@@ -1609,7 +1594,7 @@ export class LengthRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.L
|
|
1609
1594
|
}
|
1610
1595
|
|
1611
1596
|
// clang-format off
|
1612
|
-
export class
|
1597
|
+
export class BaseFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.BaseFunctionMatch) {
|
1613
1598
|
// clang-format on
|
1614
1599
|
readonly #stylesPane: StylesSidebarPane;
|
1615
1600
|
readonly #matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles;
|
@@ -1627,7 +1612,7 @@ export class MathFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatc
|
|
1627
1612
|
this.#propertyName = propertyName;
|
1628
1613
|
}
|
1629
1614
|
|
1630
|
-
override render(match: SDK.CSSPropertyParserMatchers.
|
1615
|
+
override render(match: SDK.CSSPropertyParserMatchers.BaseFunctionMatch<string>, context: RenderingContext): Node[] {
|
1631
1616
|
const childTracingContexts = context.tracing?.evaluation(match.args, {match, context});
|
1632
1617
|
const renderedArgs = match.args.map((arg, idx) => {
|
1633
1618
|
const span = document.createElement('span');
|
@@ -1651,7 +1636,7 @@ export class MathFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatc
|
|
1651
1636
|
if (evaluation) {
|
1652
1637
|
return evaluation;
|
1653
1638
|
}
|
1654
|
-
} else if (!match.isArithmeticFunctionCall()) {
|
1639
|
+
} else if (match instanceof SDK.CSSPropertyParserMatchers.MathFunctionMatch && !match.isArithmeticFunctionCall()) {
|
1655
1640
|
void this.applyMathFunction(renderedArgs, match, context);
|
1656
1641
|
}
|
1657
1642
|
|
@@ -1659,7 +1644,7 @@ export class MathFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatc
|
|
1659
1644
|
}
|
1660
1645
|
|
1661
1646
|
async applyEvaluation(
|
1662
|
-
span: HTMLSpanElement, match: SDK.CSSPropertyParserMatchers.
|
1647
|
+
span: HTMLSpanElement, match: SDK.CSSPropertyParserMatchers.BaseFunctionMatch<string>,
|
1663
1648
|
context: RenderingContext): Promise<boolean> {
|
1664
1649
|
const value = context.matchedResult.getComputedText(match.node, match => {
|
1665
1650
|
if (match instanceof SDK.CSSPropertyParserMatchers.RelativeColorChannelMatch) {
|
@@ -1678,7 +1663,7 @@ export class MathFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatc
|
|
1678
1663
|
}
|
1679
1664
|
|
1680
1665
|
async applyMathFunction(
|
1681
|
-
renderedArgs: HTMLElement[], match: SDK.CSSPropertyParserMatchers.
|
1666
|
+
renderedArgs: HTMLElement[], match: SDK.CSSPropertyParserMatchers.BaseFunctionMatch<string>,
|
1682
1667
|
context: RenderingContext): Promise<void> {
|
1683
1668
|
// To understand which argument was selected by the function, we evaluate the function as well as all the arguments
|
1684
1669
|
// and compare the function result to the values of all its arguments. Evaluating the arguments eliminates nested
|
@@ -1701,6 +1686,14 @@ export class MathFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatc
|
|
1701
1686
|
}
|
1702
1687
|
}
|
1703
1688
|
|
1689
|
+
export class MathFunctionRenderer extends BaseFunctionRenderer {
|
1690
|
+
override readonly matchType = SDK.CSSPropertyParserMatchers.MathFunctionMatch;
|
1691
|
+
}
|
1692
|
+
|
1693
|
+
export class CustomFunctionRenderer extends BaseFunctionRenderer {
|
1694
|
+
override readonly matchType = SDK.CSSPropertyParserMatchers.CustomFunctionMatch;
|
1695
|
+
}
|
1696
|
+
|
1704
1697
|
// clang-format off
|
1705
1698
|
export class AnchorFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.AnchorFunctionMatch) {
|
1706
1699
|
// clang-format on
|
@@ -1871,6 +1864,7 @@ export function getPropertyRenderers(
|
|
1871
1864
|
new PositionTryRenderer(matchedStyles),
|
1872
1865
|
new LengthRenderer(stylesPane, propertyName, treeElement),
|
1873
1866
|
new MathFunctionRenderer(stylesPane, matchedStyles, computedStyles, propertyName, treeElement),
|
1867
|
+
new CustomFunctionRenderer(stylesPane, matchedStyles, computedStyles, propertyName, treeElement),
|
1874
1868
|
new AutoBaseRenderer(computedStyles),
|
1875
1869
|
new BinOpRenderer(),
|
1876
1870
|
new RelativeColorChannelRenderer(treeElement),
|
@@ -2264,15 +2258,15 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
2264
2258
|
return;
|
2265
2259
|
}
|
2266
2260
|
this.lastComputedValue = computedValue;
|
2267
|
-
this
|
2261
|
+
this.#updateTitle();
|
2268
2262
|
}
|
2269
2263
|
|
2270
2264
|
updateTitle(): void {
|
2271
2265
|
this.lastComputedValue = this.#computeCSSExpression(this.property.ownerStyle, this.property.value);
|
2272
|
-
this
|
2266
|
+
this.#updateTitle();
|
2273
2267
|
}
|
2274
2268
|
|
2275
|
-
|
2269
|
+
#updateTitle(): void {
|
2276
2270
|
this.#tooltipKeyCounts.clear();
|
2277
2271
|
this.updateState();
|
2278
2272
|
if (this.isExpandable()) {
|
@@ -2460,6 +2454,26 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
2460
2454
|
return container;
|
2461
2455
|
}
|
2462
2456
|
|
2457
|
+
#getLinkableFunction(functionName: string, matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles):
|
2458
|
+
InlineEditor.LinkSwatch.LinkSwatch {
|
2459
|
+
const swatch = new InlineEditor.LinkSwatch.LinkSwatch();
|
2460
|
+
const registeredFunction = matchedStyles.getRegisteredFunction(functionName);
|
2461
|
+
const isDefined = Boolean(registeredFunction);
|
2462
|
+
swatch.data = {
|
2463
|
+
jslogContext: 'css-function',
|
2464
|
+
text: functionName,
|
2465
|
+
tooltip: isDefined ? undefined : {title: i18nString(UIStrings.sIsNotDefined, {PH1: functionName})},
|
2466
|
+
isDefined,
|
2467
|
+
onLinkActivate: (): void => {
|
2468
|
+
if (!registeredFunction) {
|
2469
|
+
return;
|
2470
|
+
}
|
2471
|
+
this.#parentPane.jumpToFunctionDefinition(registeredFunction);
|
2472
|
+
},
|
2473
|
+
};
|
2474
|
+
return swatch;
|
2475
|
+
}
|
2476
|
+
|
2463
2477
|
getTracingTooltip(
|
2464
2478
|
functionName: string, node: CodeMirror.SyntaxNode, matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
|
2465
2479
|
computedStyles: Map<string, string>, context: RenderingContext): Lit.TemplateResult {
|
@@ -2474,7 +2488,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
2474
2488
|
const tooltipId = this.getTooltipId(`${functionName}-trace`);
|
2475
2489
|
// clang-format off
|
2476
2490
|
return html`
|
2477
|
-
<span tabIndex=-1 class=tracing-anchor aria-details=${tooltipId}>${functionName}</span>
|
2491
|
+
<span tabIndex=-1 class=tracing-anchor aria-details=${tooltipId}>${functionName.startsWith('--') ? this.#getLinkableFunction(functionName, matchedStyles) : functionName}</span>
|
2478
2492
|
<devtools-tooltip
|
2479
2493
|
id=${tooltipId}
|
2480
2494
|
use-hotkey
|
@@ -623,10 +623,10 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
623
623
|
}
|
624
624
|
|
625
625
|
override onResize(): void {
|
626
|
-
void this.resizeThrottler.schedule(this.
|
626
|
+
void this.resizeThrottler.schedule(this.#resize.bind(this));
|
627
627
|
}
|
628
628
|
|
629
|
-
|
629
|
+
#resize(): Promise<void> {
|
630
630
|
const width = this.contentElement.getBoundingClientRect().width + 'px';
|
631
631
|
this.allSections().forEach(section => {
|
632
632
|
section.propertiesTreeOutline.element.style.width = width;
|
@@ -220,13 +220,14 @@ devtools-icon.icon-link {
|
|
220
220
|
}
|
221
221
|
|
222
222
|
.styles-pane-button {
|
223
|
-
|
224
|
-
|
223
|
+
width: var(--sys-size-8);
|
224
|
+
height: var(--sys-size-8);
|
225
|
+
margin-left: var(--sys-size-4);
|
225
226
|
position: absolute;
|
226
|
-
top: -1px;
|
227
227
|
display: inline-flex;
|
228
228
|
align-items: center;
|
229
229
|
justify-content: center;
|
230
|
+
user-select: none;
|
230
231
|
}
|
231
232
|
/* Matched styles */
|
232
233
|
|
@@ -735,12 +735,12 @@ export class Layers3DView extends Common.ObjectWrapper.eventMixin<EventTypes, ty
|
|
735
735
|
this.updateScheduled = true;
|
736
736
|
requestAnimationFrame(() => requestAnimationFrame(() => {
|
737
737
|
this.updateScheduled = false;
|
738
|
-
this
|
738
|
+
this.#update();
|
739
739
|
}));
|
740
740
|
}
|
741
741
|
}
|
742
742
|
|
743
|
-
|
743
|
+
#update(): void {
|
744
744
|
if (!this.layerTree?.root()) {
|
745
745
|
this.failBanner.show(this.contentElement);
|
746
746
|
return;
|
@@ -138,7 +138,7 @@ export class AgentLayerTree extends SDK.LayerTreeBase.LayerTreeBase {
|
|
138
138
|
|
139
139
|
async setLayers(payload: Protocol.LayerTree.Layer[]|null): Promise<void> {
|
140
140
|
if (!payload) {
|
141
|
-
this
|
141
|
+
this.#setLayers(payload);
|
142
142
|
return;
|
143
143
|
}
|
144
144
|
const idsToResolve = new Set<Protocol.DOM.BackendNodeId>();
|
@@ -150,10 +150,10 @@ export class AgentLayerTree extends SDK.LayerTreeBase.LayerTreeBase {
|
|
150
150
|
idsToResolve.add(backendNodeId);
|
151
151
|
}
|
152
152
|
await this.resolveBackendNodeIds(idsToResolve);
|
153
|
-
this
|
153
|
+
this.#setLayers(payload);
|
154
154
|
}
|
155
155
|
|
156
|
-
|
156
|
+
#setLayers(layers: Protocol.LayerTree.Layer[]|null): void {
|
157
157
|
this.setRoot(null);
|
158
158
|
this.setContentRoot(null);
|
159
159
|
// Payload will be null when not in the composited mode.
|
@@ -400,8 +400,8 @@ export class CPUThrottlingCard {
|
|
400
400
|
}
|
401
401
|
|
402
402
|
private async runCalibration(): Promise<void> {
|
403
|
-
this.progress.
|
404
|
-
this.progress.
|
403
|
+
this.progress.worked = 0;
|
404
|
+
this.progress.totalWork = 1;
|
405
405
|
|
406
406
|
this.controller = new CalibrationController();
|
407
407
|
|
@@ -412,7 +412,7 @@ export class CPUThrottlingCard {
|
|
412
412
|
}
|
413
413
|
|
414
414
|
for await (const result of this.controller.iterator()) {
|
415
|
-
this.progress.
|
415
|
+
this.progress.worked = result.progress;
|
416
416
|
}
|
417
417
|
} catch (e) {
|
418
418
|
console.error(e);
|
@@ -424,7 +424,7 @@ export class CPUThrottlingCard {
|
|
424
424
|
if (result && (result.low || result.mid)) {
|
425
425
|
this.setting.set(result);
|
426
426
|
// Let the user bask in the glory of a 100% progress bar, for a bit.
|
427
|
-
this.progress.
|
427
|
+
this.progress.worked = 1;
|
428
428
|
await new Promise(resolve => setTimeout(resolve, 200));
|
429
429
|
}
|
430
430
|
|
@@ -1963,7 +1963,7 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
1963
1963
|
|
1964
1964
|
const progressIndicator = this.progressBarContainer.createChild('devtools-progress');
|
1965
1965
|
await HAR.Writer.Writer.write(stream, this.harRequests(), options, progressIndicator);
|
1966
|
-
progressIndicator.done
|
1966
|
+
progressIndicator.done = true;
|
1967
1967
|
void stream.close();
|
1968
1968
|
}
|
1969
1969
|
|
@@ -279,7 +279,7 @@ export class NetworkLogViewColumns {
|
|
279
279
|
|
280
280
|
this.updateColumns();
|
281
281
|
this.#dataGrid.addEventListener(DataGrid.DataGrid.Events.SORTING_CHANGED, this.sortHandler, this);
|
282
|
-
this.#dataGrid.setHeaderContextMenuCallback(this.
|
282
|
+
this.#dataGrid.setHeaderContextMenuCallback(this.#headerContextMenu.bind(this));
|
283
283
|
|
284
284
|
this.activeWaterfallSortId = WaterfallSortIds.StartTime;
|
285
285
|
this.#dataGrid.markColumnAsSortedBy(INITIAL_SORT_COLUMN, DataGrid.DataGrid.Order.Ascending);
|
@@ -405,7 +405,7 @@ export class NetworkLogViewColumns {
|
|
405
405
|
this.waterfallHeaderElement.addEventListener('click', waterfallHeaderClicked.bind(this));
|
406
406
|
this.waterfallHeaderElement.addEventListener('contextmenu', event => {
|
407
407
|
const contextMenu = new UI.ContextMenu.ContextMenu(event);
|
408
|
-
this
|
408
|
+
this.#headerContextMenu(contextMenu);
|
409
409
|
void contextMenu.show();
|
410
410
|
});
|
411
411
|
this.waterfallHeaderElement.createChild('div', 'hover-layer');
|
@@ -627,7 +627,7 @@ export class NetworkLogViewColumns {
|
|
627
627
|
return fragment;
|
628
628
|
}
|
629
629
|
|
630
|
-
|
630
|
+
#headerContextMenu(contextMenu: UI.ContextMenu.SubMenu): void {
|
631
631
|
const columnConfigs = this.columns.filter(columnConfig => columnConfig.hideable);
|
632
632
|
const nonRequestResponseHeaders =
|
633
633
|
columnConfigs.filter(columnConfig => !columnConfig.isRequestHeader && !columnConfig.isResponseHeader);
|
@@ -29,7 +29,7 @@ export class NetworkSearchScope implements Search.SearchScope.SearchScope {
|
|
29
29
|
|
30
30
|
performIndexing(progress: Common.Progress.Progress): void {
|
31
31
|
queueMicrotask(() => {
|
32
|
-
progress.done
|
32
|
+
progress.done = true;
|
33
33
|
});
|
34
34
|
}
|
35
35
|
|
@@ -40,14 +40,14 @@ export class NetworkSearchScope implements Search.SearchScope.SearchScope {
|
|
40
40
|
const promises = [];
|
41
41
|
const requests =
|
42
42
|
this.#networkLog.requests().filter(request => searchConfig.filePathMatchesFileQuery(request.url()));
|
43
|
-
progress.
|
43
|
+
progress.totalWork = requests.length;
|
44
44
|
for (const request of requests) {
|
45
45
|
const promise = this.searchRequest(searchConfig, request, progress);
|
46
46
|
promises.push(promise);
|
47
47
|
}
|
48
48
|
const resultsWithNull = await Promise.all(promises);
|
49
49
|
const results = (resultsWithNull.filter(result => result !== null));
|
50
|
-
if (progress.
|
50
|
+
if (progress.canceled) {
|
51
51
|
searchFinishedCallback(false);
|
52
52
|
return;
|
53
53
|
}
|
@@ -56,7 +56,7 @@ export class NetworkSearchScope implements Search.SearchScope.SearchScope {
|
|
56
56
|
searchResultCallback(result);
|
57
57
|
}
|
58
58
|
}
|
59
|
-
progress.done
|
59
|
+
progress.done = true;
|
60
60
|
searchFinishedCallback(true);
|
61
61
|
}
|
62
62
|
|
@@ -64,7 +64,7 @@ export class NetworkSearchScope implements Search.SearchScope.SearchScope {
|
|
64
64
|
searchConfig: Workspace.SearchConfig.SearchConfig, request: SDK.NetworkRequest.NetworkRequest,
|
65
65
|
progress: Common.Progress.Progress): Promise<NetworkSearchResult|null> {
|
66
66
|
const bodyMatches = await NetworkSearchScope.#responseBodyMatches(searchConfig, request);
|
67
|
-
if (progress.
|
67
|
+
if (progress.canceled) {
|
68
68
|
return null;
|
69
69
|
}
|
70
70
|
const locations = [];
|
@@ -84,7 +84,7 @@ export class NetworkSearchScope implements Search.SearchScope.SearchScope {
|
|
84
84
|
for (const match of bodyMatches) {
|
85
85
|
locations.push(NetworkForward.UIRequestLocation.UIRequestLocation.bodyMatch(request, match));
|
86
86
|
}
|
87
|
-
progress.
|
87
|
+
++progress.worked;
|
88
88
|
return new NetworkSearchResult(request, locations);
|
89
89
|
|
90
90
|
function headerMatchesQuery(header: SDK.NetworkRequest.NameValue): boolean {
|