chrome-devtools-frontend 1.0.1732418 → 1.0.1733843

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.
Files changed (146) hide show
  1. package/docs/get_the_code.md +1 -73
  2. package/front_end/Tests.js +0 -5
  3. package/front_end/core/host/AidaClientTypes.ts +24 -3
  4. package/front_end/core/host/AidaGcaTranslation.ts +29 -1
  5. package/front_end/core/platform/browser/HostRuntime.ts +5 -1
  6. package/front_end/core/sdk/DOMModel.ts +8 -3
  7. package/front_end/design_system_tokens.css +5 -0
  8. package/front_end/entrypoints/formatter_worker/ScopeParser.ts +2 -2
  9. package/front_end/generated/InspectorBackendCommands.ts +5 -5
  10. package/front_end/generated/SupportedCSSProperties.ts +8 -2
  11. package/front_end/generated/protocol.ts +29 -7
  12. package/front_end/models/ai-utils/debug.ts +127 -22
  13. package/front_end/models/ai_assistance/AiConversation.ts +1 -0
  14. package/front_end/models/ai_assistance/README.md +1 -1
  15. package/front_end/models/ai_assistance/agents/AiAgent.ts +69 -11
  16. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -1
  17. package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +4 -3
  18. package/front_end/models/ai_assistance/contexts/LighthouseContext.snapshot.txt +4 -2
  19. package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +6 -0
  20. package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +2 -0
  21. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +1 -1
  22. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +26 -26
  23. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +2 -1
  24. package/front_end/models/ai_code_completion/ai_code_completion.ts +11 -2
  25. package/front_end/models/ai_code_generation/AiCodeGeneration.ts +2 -1
  26. package/front_end/models/ai_code_generation/ai_code_generation.ts +11 -2
  27. package/front_end/models/trace/LanternComputationData.ts +4 -0
  28. package/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +126 -1
  29. package/front_end/models/trace/lantern/types/Lantern.ts +3 -0
  30. package/front_end/models/web_mcp/WebMCPModel.ts +1 -1
  31. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +65 -15
  32. package/front_end/panels/ai_assistance/ExternalHandler.ts +1 -1
  33. package/front_end/panels/ai_assistance/components/PermissionPrompt.ts +4 -4
  34. package/front_end/panels/ai_assistance/components/chatMessage.css +4 -5
  35. package/front_end/panels/ai_assistance/components/exploreWidget.css +3 -3
  36. package/front_end/panels/application/backgroundServiceView.css +2 -2
  37. package/front_end/panels/application/components/reportsGrid.css +1 -1
  38. package/front_end/panels/application/components/serviceWorkerRouterView.css +2 -2
  39. package/front_end/panels/application/components/trustTokensView.css +1 -1
  40. package/front_end/panels/application/deviceBoundSessionsView.css +1 -1
  41. package/front_end/panels/application/frameDetailsReportView.css +0 -4
  42. package/front_end/panels/application/indexedDBViews.css +0 -4
  43. package/front_end/panels/application/resourcesPanel.css +0 -13
  44. package/front_end/panels/application/serviceWorkerUpdateCycleView.css +3 -3
  45. package/front_end/panels/application/serviceWorkersView.css +3 -2
  46. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +346 -286
  47. package/front_end/panels/comments/CommentsPane.ts +2 -11
  48. package/front_end/panels/common/CommentThreadWidget.ts +11 -3
  49. package/front_end/panels/common/CommentsOverlayWidget.ts +3 -2
  50. package/front_end/panels/console/consoleContextSelector.css +1 -1
  51. package/front_end/panels/console/consolePinPane.css +1 -1
  52. package/front_end/panels/console/consolePrompt.css +4 -2
  53. package/front_end/panels/console/consoleView.css +1 -1
  54. package/front_end/panels/elements/ComputedStyleWidget.ts +8 -19
  55. package/front_end/panels/elements/PropertyRenderer.ts +7 -27
  56. package/front_end/panels/elements/StylePropertyTreeElement.ts +61 -72
  57. package/front_end/panels/elements/components/cssPropertyDocsView.css +1 -1
  58. package/front_end/panels/elements/components/elementsBreadcrumbs.css +1 -1
  59. package/front_end/panels/elements/components/stylePropertyEditor.css +1 -5
  60. package/front_end/panels/elements/layoutPane.css +1 -1
  61. package/front_end/panels/elements/metricsSidebarPane.css +2 -2
  62. package/front_end/panels/elements/propertiesWidget.css +0 -5
  63. package/front_end/panels/elements/stylesSidebarPane.css +3 -2
  64. package/front_end/panels/emulation/deviceModeView.css +3 -3
  65. package/front_end/panels/event_listeners/eventListenersView.css +1 -1
  66. package/front_end/panels/explain/components/consoleInsight.css +2 -2
  67. package/front_end/panels/issues/issuesTree.css +10 -7
  68. package/front_end/panels/layer_viewer/layerTreeOutline.css +1 -1
  69. package/front_end/panels/lighthouse/LighthousePanel.ts +16 -1
  70. package/front_end/panels/lighthouse/lighthousePanel.css +1 -1
  71. package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +10 -6
  72. package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +1 -26
  73. package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +1 -1
  74. package/front_end/panels/media/playerListView.css +11 -8
  75. package/front_end/panels/media/playerMessagesView.css +9 -5
  76. package/front_end/panels/network/NetworkWaterfallColumn.ts +92 -55
  77. package/front_end/panels/network/networkConfigView.css +3 -3
  78. package/front_end/panels/network/networkLogView.css +5 -4
  79. package/front_end/panels/network/networkManageCustomHeadersView.css +1 -1
  80. package/front_end/panels/network/networkTimingTable.css +4 -8
  81. package/front_end/panels/network/requestPayloadView.css +1 -1
  82. package/front_end/panels/performance_monitor/performanceMonitor.css +1 -1
  83. package/front_end/panels/profiler/ModuleUIStrings.ts +12 -0
  84. package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +114 -18
  85. package/front_end/panels/protocol_monitor/JSONEditor.css +4 -3
  86. package/front_end/panels/recorder/createRecordingView.css +2 -2
  87. package/front_end/panels/recorder/stepEditor.css +1 -1
  88. package/front_end/panels/recorder/stepView.css +0 -7
  89. package/front_end/panels/recorder/timelineSection.css +1 -1
  90. package/front_end/panels/screencast/screencastView.css +1 -1
  91. package/front_end/panels/search/searchResultsPane.css +1 -1
  92. package/front_end/panels/security/mainView.css +2 -2
  93. package/front_end/panels/security/originView.css +1 -1
  94. package/front_end/panels/settings/AISettingsTab.ts +1 -0
  95. package/front_end/panels/sources/NavigatorView.ts +120 -49
  96. package/front_end/panels/sources/breakpointsView.css +3 -3
  97. package/front_end/panels/sources/components/HeadersView.css +2 -2
  98. package/front_end/panels/sources/watchExpressionsSidebarPane.css +2 -1
  99. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +30 -10
  100. package/front_end/panels/timeline/TimelinePanel.ts +24 -3
  101. package/front_end/panels/timeline/components/metricCard.css +1 -1
  102. package/front_end/panels/timeline/components/networkRequestTooltip.css +2 -2
  103. package/front_end/panels/timeline/components/relatedInsightChips.css +1 -1
  104. package/front_end/panels/timeline/timelineFlameChartView.css +4 -4
  105. package/front_end/panels/timeline/timelineFlamechartPopover.css +2 -2
  106. package/front_end/panels/timeline/timelineMiniMap.css +3 -2
  107. package/front_end/panels/web_audio/WebAudioModel.ts +14 -5
  108. package/front_end/panels/web_audio/WebAudioView.ts +34 -1
  109. package/front_end/panels/web_audio/webAudio.css +17 -3
  110. package/front_end/panels/webauthn/webauthnPane.css +2 -4
  111. package/front_end/panels/whats_new/ReleaseNoteText.ts +19 -1
  112. package/front_end/panels/whats_new/ReleaseNoteView.ts +15 -1
  113. package/front_end/panels/whats_new/releaseNoteView.css +49 -0
  114. package/front_end/third_party/chromium/README.chromium +1 -1
  115. package/front_end/third_party/puppeteer-replay/README.chromium +9 -1
  116. package/front_end/third_party/puppeteer-replay/package/lib/main.d.ts +2 -2
  117. package/front_end/ui/components/buttons/button.css +0 -1
  118. package/front_end/ui/components/diff_view/diffView.css +1 -1
  119. package/front_end/ui/components/markdown_view/codeBlock.css +4 -4
  120. package/front_end/ui/components/markdown_view/markdownView.css +3 -7
  121. package/front_end/ui/components/panel_feedback/panelFeedback.css +3 -2
  122. package/front_end/ui/components/panel_introduction_steps/panelIntroductionSteps.css +1 -1
  123. package/front_end/ui/components/suggestion_input/suggestionInput.css +2 -2
  124. package/front_end/ui/components/switch/switch.css +2 -1
  125. package/front_end/ui/legacy/TabbedPane.ts +1 -1
  126. package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +10 -3
  127. package/front_end/ui/legacy/components/inline_editor/colorSwatch.css +1 -2
  128. package/front_end/ui/legacy/components/perf_ui/chartViewport.css +1 -1
  129. package/front_end/ui/legacy/components/perf_ui/filmStripView.css +1 -1
  130. package/front_end/ui/legacy/components/perf_ui/flameChart.css +5 -3
  131. package/front_end/ui/legacy/components/perf_ui/overviewGrid.css +7 -4
  132. package/front_end/ui/legacy/components/perf_ui/pieChart.css +0 -1
  133. package/front_end/ui/legacy/components/utils/imagePreview.css +1 -1
  134. package/front_end/ui/legacy/inspectorCommon.css +11 -27
  135. package/front_end/ui/legacy/listWidget.css +1 -1
  136. package/front_end/ui/legacy/progressIndicator.css +1 -2
  137. package/front_end/ui/legacy/reportView.css +5 -2
  138. package/front_end/ui/legacy/searchableView.css +3 -2
  139. package/front_end/ui/legacy/suggestBox.css +2 -1
  140. package/front_end/ui/legacy/tabbedPane.css +8 -5
  141. package/front_end/ui/legacy/treeoutline.css +1 -1
  142. package/front_end/ui/legacy/viewContainers.css +1 -1
  143. package/front_end/ui/visual_logging/KnownContextValues.ts +11 -0
  144. package/package.json +1 -1
  145. package/front_end/models/ai_code_completion/debug.ts +0 -33
  146. package/front_end/models/ai_code_generation/debug.ts +0 -33
@@ -18,7 +18,7 @@ import commentsPaneStyles from './commentsPane.css.js';
18
18
 
19
19
  const {html, render, i18nTemplate, Directives: {ref, repeat}} = Lit;
20
20
  const {widget} = UI.Widget;
21
- const {computeCommentTitle} = CommonPanels.CommentThreadWidget;
21
+ const {computeCommentTitle, inputDisclaimer} = CommonPanels.CommentThreadWidget;
22
22
  type Title = CommonPanels.CommentThreadWidget.Title;
23
23
 
24
24
  const UIStrings = {
@@ -92,17 +92,8 @@ const UIStrings = {
92
92
  sentComments: 'Sent comments',
93
93
  } as const;
94
94
 
95
- const UIStringsNotTranslate = {
96
- /**
97
- * @description Disclaimer text in the comments pane info tooltip.
98
- */
99
- inputDisclaimer:
100
- 'Comment strings, DOM hierarchy snippets, tracked CSS and DOM changes, Visual Element (VE) paths and signatures, and tracked presenter changes are sent to the connected third-party agent to assist with debugging and code updates',
101
- } as const;
102
-
103
95
  const str_ = i18n.i18n.registerUIStrings('panels/comments/CommentsPane.ts', UIStrings);
104
96
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
105
- const lockedString = i18n.i18n.lockedString;
106
97
 
107
98
  export type Tab = 'queued'|'sent';
108
99
 
@@ -290,7 +281,7 @@ export const DEFAULT_VIEW: View = (input: ViewInput, output: ViewOutput, target:
290
281
  variant="rich"
291
282
  >
292
283
  <div class="info-tooltip-container">
293
- ${lockedString(UIStringsNotTranslate.inputDisclaimer)}
284
+ ${inputDisclaimer()}
294
285
  </div>
295
286
  </devtools-tooltip>
296
287
  <button
@@ -80,16 +80,24 @@ const UIStrings = {
80
80
 
81
81
  const UIStringsNotTranslate = {
82
82
  /**
83
- * @description Disclaimer text in the comment thread info tooltip.
83
+ * @description Disclaimer text in the info tooltips of the comment thread and the comments pane.
84
84
  */
85
85
  inputDisclaimer:
86
- 'Comment strings, DOM hierarchy snippets, tracked CSS and DOM changes, Visual Element (VE) paths and signatures, and tracked presenter changes are sent to the connected third-party agent to assist with debugging and code updates',
86
+ 'Comments and content attached to comments, and DOM/CSS changes recorded in the comment mode are sent to the connected third-party agent to assist with debugging and code updates',
87
87
  } as const;
88
88
 
89
89
  const str_ = i18n.i18n.registerUIStrings('panels/common/CommentThreadWidget.ts', UIStrings);
90
90
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
91
91
  const lockedString = i18n.i18n.lockedString;
92
92
 
93
+ /**
94
+ * Returns the disclaimer about the data that is sent to the connected agent. The comment thread and the comments
95
+ * pane both show it in their info tooltips.
96
+ */
97
+ export function inputDisclaimer(): string {
98
+ return lockedString(UIStringsNotTranslate.inputDisclaimer);
99
+ }
100
+
93
101
  /**
94
102
  * Either the DOM node the thread is anchored to, or a plain text label for anchors that are not
95
103
  * DOM nodes (e.g. network requests).
@@ -250,7 +258,7 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
250
258
  variant="rich"
251
259
  >
252
260
  <div class="info-tooltip-container">
253
- ${lockedString(UIStringsNotTranslate.inputDisclaimer)}
261
+ ${inputDisclaimer()}
254
262
  </div>
255
263
  </devtools-tooltip>
256
264
  <devtools-button
@@ -368,8 +368,6 @@ export class CommentsOverlayWidget extends UI.Widget.Widget {
368
368
  override willHide(): void {
369
369
  this.#clearCloseTimeout();
370
370
  this.#clearHover();
371
- this.#removeDocumentListeners();
372
- this.#commentOverlayManager.stop();
373
371
  this.#commentOverlayManager.removeEventListener(
374
372
  Comments.CommentOverlayManager.Events.POSITIONS_UPDATED,
375
373
  this.#onPositionsUpdated,
@@ -396,6 +394,9 @@ export class CommentsOverlayWidget extends UI.Widget.Widget {
396
394
  this.#onAgentAttachedChanged,
397
395
  this,
398
396
  );
397
+ this.#commentOverlayManager.stop();
398
+ this.#syncActiveThreadFromManager();
399
+ this.#removeDocumentListeners();
399
400
 
400
401
  super.willHide();
401
402
  }
@@ -22,7 +22,7 @@
22
22
 
23
23
  .subtitle {
24
24
  color: var(--sys-color-token-subtle);
25
- margin-right: 3px;
25
+ margin-right: var(--sys-size-3);
26
26
  overflow: hidden;
27
27
  text-overflow: ellipsis;
28
28
  flex-grow: 0;
@@ -55,7 +55,7 @@
55
55
  width: 100%;
56
56
  text-overflow: ellipsis;
57
57
  white-space: nowrap;
58
- min-height: 13px;
58
+ min-height: var(--sys-size-6);
59
59
  }
60
60
 
61
61
  .console-pin-preview {
@@ -40,8 +40,10 @@
40
40
 
41
41
  .preview-result-icon {
42
42
  position: absolute;
43
- left: -13px;
44
- top: calc(-1 * var(--sys-size-1));
43
+ /* Offset both .console-prompt-icon's 12px (--sys-size-6) gutter offset and
44
+ * .console-eager-preview's 4px (--sys-size-3) left margin so both icons align. */
45
+ left: calc(-1 * (var(--sys-size-6) + var(--sys-size-3)));
46
+ top: 0;
45
47
  }
46
48
 
47
49
  .console-eager-inner-preview:empty,
@@ -293,7 +293,7 @@
293
293
  }
294
294
 
295
295
  .console-message-wrapper.console-adjacent-user-command-result:not(.console-error-level, .console-warning-level):focus .command-result-icon {
296
- top: 3px;
296
+ top: var(--sys-size-1);
297
297
  }
298
298
 
299
299
  .console-message-wrapper .nesting-level-marker {
@@ -43,7 +43,7 @@ import * as TreeOutline from '../../ui/components/tree_outline/tree_outline.js';
43
43
  import * as InlineEditor from '../../ui/legacy/components/inline_editor/inline_editor.js';
44
44
  import * as Components from '../../ui/legacy/components/utils/utils.js';
45
45
  import * as UI from '../../ui/legacy/legacy.js';
46
- import * as Lit from '../../ui/lit/lit.js';
46
+ import {html, type LitTemplate, nothing, render, type TemplateResult} from '../../ui/lit/lit.js';
47
47
 
48
48
  import * as ElementsComponents from './components/components.js';
49
49
  import computedStyleWidgetStyles from './computedStyleWidget.css.js';
@@ -52,7 +52,6 @@ import {categorizePropertyName, type Category, DefaultCategoryOrder} from './Pro
52
52
  import {Renderer, rendererBase, type RenderingContext, StringRenderer, URLRenderer} from './PropertyRenderer.js';
53
53
  import {StylePropertiesSection} from './StylePropertiesSection.js';
54
54
 
55
- const {html, render} = Lit;
56
55
  const {bindToSetting} = UI.UIUtils;
57
56
  const {widget} = UI.Widget;
58
57
 
@@ -129,7 +128,7 @@ const createPropertyElement =
129
128
  (node: SDK.DOMModel.DOMNode, cache: Map<string, {name: Element, value: Element}>, propertyName: string,
130
129
  propertyValue: string, traceable: boolean, inherited: boolean,
131
130
  activeProperty: SDK.CSSProperty.CSSProperty|undefined, onContextMenu: ((event: Event) => void),
132
- category?: Category): Lit.TemplateResult => {
131
+ category?: Category): TemplateResult => {
133
132
  const {name, value} = renderPropertyContents(node, cache, propertyName, propertyValue, category);
134
133
  // clang-format off
135
134
  return html`<devtools-widget
@@ -191,26 +190,17 @@ const createTraceElement =
191
190
  // clang-format off
192
191
  class ColorRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.ColorMatch) {
193
192
  // clang-format on
194
- override render(match: SDK.CSSPropertyParserMatchers.ColorMatch, context: RenderingContext): Node[] {
193
+ override render(match: SDK.CSSPropertyParserMatchers.ColorMatch, context: RenderingContext): LitTemplate {
195
194
  const color = Common.Color.parse(match.text);
196
195
  if (!color) {
197
- return [document.createTextNode(match.text)];
196
+ return html`${match.text}`;
198
197
  }
199
198
 
200
199
  const swatch = new InlineEditor.ColorSwatch.ColorSwatch();
201
200
  swatch.setReadonly(true);
202
201
  swatch.renderColor(color);
203
- const valueElement = document.createElement('span');
204
- valueElement.textContent = match.text;
205
-
206
- swatch.addEventListener(
207
- InlineEditor.ColorSwatch.ColorChangedEvent.eventName, (event: InlineEditor.ColorSwatch.ColorChangedEvent) => {
208
- const {data: {color}} = event;
209
- valueElement.textContent = color.getAuthoredText() ?? color.asString();
210
- });
211
-
212
202
  context.addControl('color', swatch);
213
- return [swatch, valueElement];
203
+ return html`${swatch}<span>${match.text}</span>`;
214
204
  }
215
205
 
216
206
  matcher(): SDK.CSSPropertyParserMatchers.ColorMatcher {
@@ -290,7 +280,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
290
280
  >${i18nString(UIStrings.group)}</devtools-checkbox>
291
281
  </devtools-toolbar>
292
282
  </div>
293
- ` : Lit.nothing}
283
+ ` : nothing}
294
284
  ${input.computedStylesTree}
295
285
  ${!input.hasMatches ? html`<div class="gray-info-message">${i18nString(UIStrings.noMatchingProperty)}</div>` : ''}
296
286
  `, target);
@@ -632,9 +622,8 @@ export class ComputedStyleWidget extends UI.Widget.VBox {
632
622
  propertyTraces: Map<string, SDK.CSSProperty.CSSProperty[]>,
633
623
  domNode: SDK.DOMModel.DOMNode,
634
624
  matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
635
- ):
636
- (node: TreeOutline.TreeOutlineUtils.TreeNode<ComputedStyleData>,
637
- state: {isExpanded: boolean}) => Lit.TemplateResult {
625
+ ): (node: TreeOutline.TreeOutlineUtils.TreeNode<ComputedStyleData>,
626
+ state: {isExpanded: boolean}) => TemplateResult {
638
627
  return node => {
639
628
  const data = node.treeNodeData;
640
629
  if (data.tag === 'property') {
@@ -55,7 +55,7 @@ export type RendererBase<MatchT extends SDK.CSSPropertyParser.Match> = abstract
55
55
 
56
56
  export interface MatchRenderer<MatchT extends SDK.CSSPropertyParser.Match> {
57
57
  readonly matchType: Platform.Constructor.Constructor<MatchT>;
58
- render(match: MatchT, context: RenderingContext): Node[]|LitTemplate;
58
+ render(match: MatchT, context: RenderingContext): LitTemplate;
59
59
  }
60
60
 
61
61
  // A mixin to automatically expose the match type on specific renrerers
@@ -64,7 +64,7 @@ export function rendererBase<MatchT extends SDK.CSSPropertyParser.Match>(
64
64
  matchT: Platform.Constructor.Constructor<MatchT>): RendererBase<MatchT> {
65
65
  abstract class RendererBaseClass implements MatchRenderer<MatchT> {
66
66
  readonly matchType = matchT;
67
- render(_match: MatchT, _context: RenderingContext): Node[]|LitTemplate {
67
+ render(_match: MatchT, _context: RenderingContext): LitTemplate {
68
68
  return nothing;
69
69
  }
70
70
  }
@@ -365,19 +365,11 @@ export class TracingContext {
365
365
 
366
366
  // After rendering the arguments of a function call, the TracingContext produced by TracingContext#evaluation need to
367
367
  // be passed here to determine whether the "current" function call should be evaluated or not. If so, the
368
- // evaluation callback is run. The callback returns a template or placeholder nodes to render immediately, and
369
- // optionally an async callback that resolves to the evaluated template (or a boolean indicating whether the
370
- // in-place placeholder update succeeded).
368
+ // evaluation callback is run. The callback should return synchronously a template as placeholder to be
369
+ // rendered immediately and optionally a callback for asynchronous updates of the template.
371
370
  applyEvaluation(children: TracingContext[],
372
- evaluation: () => {placeholder: Node[], asyncEvalCallback?: () => Promise<boolean>}): Node[]|null;
373
- applyEvaluation(children: TracingContext[],
374
- evaluation: () => ({placeholder: LitTemplate, asyncEvalCallback?: () => Promise<boolean>} |
375
- {template: LitTemplate, asyncEvalCallback?: () => Promise<LitTemplate|null>})):
376
- LitTemplate|null;
377
- applyEvaluation(children: TracingContext[],
378
- evaluation: () => ({placeholder: Node[] | LitTemplate, asyncEvalCallback?: () => Promise<boolean>} |
379
- {template: LitTemplate, asyncEvalCallback?: () => Promise<LitTemplate|null>})):
380
- Node[]|LitTemplate|null {
371
+ evaluation: () => {template: LitTemplate, asyncEvalCallback?: () => Promise<LitTemplate|null>}):
372
+ LitTemplate|null {
381
373
  if (this.#evaluationCount === 0 || children.some(child => child.#appliedEvaluations >= this.#evaluationCount)) {
382
374
  this.#setHasMoreEvaluations(true);
383
375
  children.forEach(child => this.#asyncEvalCallbacks.push(...child.#asyncEvalCallbacks));
@@ -386,10 +378,6 @@ export class TracingContext {
386
378
  this.#setAppliedEvaluations(children.map(child => child.#appliedEvaluations).reduce((a, b) => Math.max(a, b), 0) +
387
379
  1);
388
380
  const result = evaluation();
389
- if ('placeholder' in result) {
390
- this.#asyncEvalCallbacks.push(result.asyncEvalCallback);
391
- return result.placeholder;
392
- }
393
381
  if (!result.asyncEvalCallback) {
394
382
  this.#asyncEvalCallbacks.push(result.asyncEvalCallback);
395
383
  return result.template;
@@ -714,13 +702,6 @@ export class Renderer extends SDK.CSSPropertyParser.TreeWalker {
714
702
  return {nodes: html`${nodes}`, cssControls};
715
703
  }
716
704
 
717
- static renderInto(nodeOrNodes: CodeMirror.SyntaxNode|CodeMirror.SyntaxNode[], context: RenderingContext,
718
- parent: HTMLElement|DocumentFragment): {nodes: LitTemplate, cssControls: CSSControlMap} {
719
- const {nodes, cssControls} = this.render(nodeOrNodes, context);
720
- render(nodes, parent);
721
- return {nodes, cssControls};
722
- }
723
-
724
705
  renderedMatchForTest(_nodes: LitTemplate, _match: SDK.CSSPropertyParser.Match): void {
725
706
  }
726
707
 
@@ -730,8 +711,7 @@ export class Renderer extends SDK.CSSPropertyParser.TreeWalker {
730
711
  this.#context.renderers.get(match.constructor as Platform.Constructor.Constructor<SDK.CSSPropertyParser.Match>);
731
712
  if (renderer || match instanceof SDK.CSSPropertyParserMatchers.TextMatch) {
732
713
  const rendered = renderer?.render(match, this.#context) ?? html`<span>${match.text}</span>`;
733
- const output =
734
- highlight(this.#context.tracing?.highlighting, match, Array.isArray(rendered) ? html`${rendered}` : rendered);
714
+ const output = highlight(this.#context.tracing?.highlighting, match, rendered);
735
715
  this.renderedMatchForTest(output, match);
736
716
  if (this.#output.some(t => t !== nothing)) {
737
717
  const spacing = precedingSpace(node, this.#context.ast, this.#matchedResult);