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.
- package/docs/get_the_code.md +1 -73
- package/front_end/Tests.js +0 -5
- package/front_end/core/host/AidaClientTypes.ts +24 -3
- package/front_end/core/host/AidaGcaTranslation.ts +29 -1
- package/front_end/core/platform/browser/HostRuntime.ts +5 -1
- package/front_end/core/sdk/DOMModel.ts +8 -3
- package/front_end/design_system_tokens.css +5 -0
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +2 -2
- package/front_end/generated/InspectorBackendCommands.ts +5 -5
- package/front_end/generated/SupportedCSSProperties.ts +8 -2
- package/front_end/generated/protocol.ts +29 -7
- package/front_end/models/ai-utils/debug.ts +127 -22
- package/front_end/models/ai_assistance/AiConversation.ts +1 -0
- package/front_end/models/ai_assistance/README.md +1 -1
- package/front_end/models/ai_assistance/agents/AiAgent.ts +69 -11
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -1
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +4 -3
- package/front_end/models/ai_assistance/contexts/LighthouseContext.snapshot.txt +4 -2
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +6 -0
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +2 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +26 -26
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +2 -1
- package/front_end/models/ai_code_completion/ai_code_completion.ts +11 -2
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +2 -1
- package/front_end/models/ai_code_generation/ai_code_generation.ts +11 -2
- package/front_end/models/trace/LanternComputationData.ts +4 -0
- package/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +126 -1
- package/front_end/models/trace/lantern/types/Lantern.ts +3 -0
- package/front_end/models/web_mcp/WebMCPModel.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +65 -15
- package/front_end/panels/ai_assistance/ExternalHandler.ts +1 -1
- package/front_end/panels/ai_assistance/components/PermissionPrompt.ts +4 -4
- package/front_end/panels/ai_assistance/components/chatMessage.css +4 -5
- package/front_end/panels/ai_assistance/components/exploreWidget.css +3 -3
- package/front_end/panels/application/backgroundServiceView.css +2 -2
- package/front_end/panels/application/components/reportsGrid.css +1 -1
- package/front_end/panels/application/components/serviceWorkerRouterView.css +2 -2
- package/front_end/panels/application/components/trustTokensView.css +1 -1
- package/front_end/panels/application/deviceBoundSessionsView.css +1 -1
- package/front_end/panels/application/frameDetailsReportView.css +0 -4
- package/front_end/panels/application/indexedDBViews.css +0 -4
- package/front_end/panels/application/resourcesPanel.css +0 -13
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +3 -3
- package/front_end/panels/application/serviceWorkersView.css +3 -2
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +346 -286
- package/front_end/panels/comments/CommentsPane.ts +2 -11
- package/front_end/panels/common/CommentThreadWidget.ts +11 -3
- package/front_end/panels/common/CommentsOverlayWidget.ts +3 -2
- package/front_end/panels/console/consoleContextSelector.css +1 -1
- package/front_end/panels/console/consolePinPane.css +1 -1
- package/front_end/panels/console/consolePrompt.css +4 -2
- package/front_end/panels/console/consoleView.css +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +8 -19
- package/front_end/panels/elements/PropertyRenderer.ts +7 -27
- package/front_end/panels/elements/StylePropertyTreeElement.ts +61 -72
- package/front_end/panels/elements/components/cssPropertyDocsView.css +1 -1
- package/front_end/panels/elements/components/elementsBreadcrumbs.css +1 -1
- package/front_end/panels/elements/components/stylePropertyEditor.css +1 -5
- package/front_end/panels/elements/layoutPane.css +1 -1
- package/front_end/panels/elements/metricsSidebarPane.css +2 -2
- package/front_end/panels/elements/propertiesWidget.css +0 -5
- package/front_end/panels/elements/stylesSidebarPane.css +3 -2
- package/front_end/panels/emulation/deviceModeView.css +3 -3
- package/front_end/panels/event_listeners/eventListenersView.css +1 -1
- package/front_end/panels/explain/components/consoleInsight.css +2 -2
- package/front_end/panels/issues/issuesTree.css +10 -7
- package/front_end/panels/layer_viewer/layerTreeOutline.css +1 -1
- package/front_end/panels/lighthouse/LighthousePanel.ts +16 -1
- package/front_end/panels/lighthouse/lighthousePanel.css +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +10 -6
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +1 -26
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +1 -1
- package/front_end/panels/media/playerListView.css +11 -8
- package/front_end/panels/media/playerMessagesView.css +9 -5
- package/front_end/panels/network/NetworkWaterfallColumn.ts +92 -55
- package/front_end/panels/network/networkConfigView.css +3 -3
- package/front_end/panels/network/networkLogView.css +5 -4
- package/front_end/panels/network/networkManageCustomHeadersView.css +1 -1
- package/front_end/panels/network/networkTimingTable.css +4 -8
- package/front_end/panels/network/requestPayloadView.css +1 -1
- package/front_end/panels/performance_monitor/performanceMonitor.css +1 -1
- package/front_end/panels/profiler/ModuleUIStrings.ts +12 -0
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +114 -18
- package/front_end/panels/protocol_monitor/JSONEditor.css +4 -3
- package/front_end/panels/recorder/createRecordingView.css +2 -2
- package/front_end/panels/recorder/stepEditor.css +1 -1
- package/front_end/panels/recorder/stepView.css +0 -7
- package/front_end/panels/recorder/timelineSection.css +1 -1
- package/front_end/panels/screencast/screencastView.css +1 -1
- package/front_end/panels/search/searchResultsPane.css +1 -1
- package/front_end/panels/security/mainView.css +2 -2
- package/front_end/panels/security/originView.css +1 -1
- package/front_end/panels/settings/AISettingsTab.ts +1 -0
- package/front_end/panels/sources/NavigatorView.ts +120 -49
- package/front_end/panels/sources/breakpointsView.css +3 -3
- package/front_end/panels/sources/components/HeadersView.css +2 -2
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +2 -1
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +30 -10
- package/front_end/panels/timeline/TimelinePanel.ts +24 -3
- package/front_end/panels/timeline/components/metricCard.css +1 -1
- package/front_end/panels/timeline/components/networkRequestTooltip.css +2 -2
- package/front_end/panels/timeline/components/relatedInsightChips.css +1 -1
- package/front_end/panels/timeline/timelineFlameChartView.css +4 -4
- package/front_end/panels/timeline/timelineFlamechartPopover.css +2 -2
- package/front_end/panels/timeline/timelineMiniMap.css +3 -2
- package/front_end/panels/web_audio/WebAudioModel.ts +14 -5
- package/front_end/panels/web_audio/WebAudioView.ts +34 -1
- package/front_end/panels/web_audio/webAudio.css +17 -3
- package/front_end/panels/webauthn/webauthnPane.css +2 -4
- package/front_end/panels/whats_new/ReleaseNoteText.ts +19 -1
- package/front_end/panels/whats_new/ReleaseNoteView.ts +15 -1
- package/front_end/panels/whats_new/releaseNoteView.css +49 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer-replay/README.chromium +9 -1
- package/front_end/third_party/puppeteer-replay/package/lib/main.d.ts +2 -2
- package/front_end/ui/components/buttons/button.css +0 -1
- package/front_end/ui/components/diff_view/diffView.css +1 -1
- package/front_end/ui/components/markdown_view/codeBlock.css +4 -4
- package/front_end/ui/components/markdown_view/markdownView.css +3 -7
- package/front_end/ui/components/panel_feedback/panelFeedback.css +3 -2
- package/front_end/ui/components/panel_introduction_steps/panelIntroductionSteps.css +1 -1
- package/front_end/ui/components/suggestion_input/suggestionInput.css +2 -2
- package/front_end/ui/components/switch/switch.css +2 -1
- package/front_end/ui/legacy/TabbedPane.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +10 -3
- package/front_end/ui/legacy/components/inline_editor/colorSwatch.css +1 -2
- package/front_end/ui/legacy/components/perf_ui/chartViewport.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/filmStripView.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/flameChart.css +5 -3
- package/front_end/ui/legacy/components/perf_ui/overviewGrid.css +7 -4
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +0 -1
- package/front_end/ui/legacy/components/utils/imagePreview.css +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +11 -27
- package/front_end/ui/legacy/listWidget.css +1 -1
- package/front_end/ui/legacy/progressIndicator.css +1 -2
- package/front_end/ui/legacy/reportView.css +5 -2
- package/front_end/ui/legacy/searchableView.css +3 -2
- package/front_end/ui/legacy/suggestBox.css +2 -1
- package/front_end/ui/legacy/tabbedPane.css +8 -5
- package/front_end/ui/legacy/treeoutline.css +1 -1
- package/front_end/ui/legacy/viewContainers.css +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +11 -0
- package/package.json +1 -1
- package/front_end/models/ai_code_completion/debug.ts +0 -33
- package/front_end/models/ai_code_generation/debug.ts +0 -33
|
@@ -19,8 +19,14 @@ import {createIcon, Icon} from '../../ui/kit/kit.js';
|
|
|
19
19
|
import * as ColorPicker from '../../ui/legacy/components/color_picker/color_picker.js';
|
|
20
20
|
import * as InlineEditor from '../../ui/legacy/components/inline_editor/inline_editor.js';
|
|
21
21
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
22
|
-
import
|
|
23
|
-
|
|
22
|
+
import {
|
|
23
|
+
Directives,
|
|
24
|
+
html,
|
|
25
|
+
type LitTemplate,
|
|
26
|
+
nothing,
|
|
27
|
+
render,
|
|
28
|
+
type TemplateResult,
|
|
29
|
+
} from '../../ui/lit/lit.js';
|
|
24
30
|
import * as SettingsUI from '../../ui/settings/settings.js';
|
|
25
31
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
26
32
|
|
|
@@ -211,7 +217,7 @@ export class EnvFunctionRenderer extends EnvFunctionRendererBase {
|
|
|
211
217
|
readonly computedStyleExtraFields: Protocol.CSS.ComputedStyleExtraFields|null) {
|
|
212
218
|
super();
|
|
213
219
|
}
|
|
214
|
-
override render(match: SDK.CSSPropertyParserMatchers.EnvFunctionMatch, context: RenderingContext):
|
|
220
|
+
override render(match: SDK.CSSPropertyParserMatchers.EnvFunctionMatch, context: RenderingContext): LitTemplate {
|
|
215
221
|
const [, fallbackNodes] = ASTUtils.callArgs(match.node);
|
|
216
222
|
if (match.value) {
|
|
217
223
|
const substitution = context.tracing?.substitution();
|
|
@@ -252,8 +258,7 @@ export class FlexGridRenderer extends FlexGridRendererBase {
|
|
|
252
258
|
this.#stylesContainer = stylesContainer;
|
|
253
259
|
}
|
|
254
260
|
|
|
255
|
-
override render(match: SDK.CSSPropertyParserMatchers.FlexGridGridLanesMatch,
|
|
256
|
-
context: RenderingContext): Lit.LitTemplate {
|
|
261
|
+
override render(match: SDK.CSSPropertyParserMatchers.FlexGridGridLanesMatch, context: RenderingContext): LitTemplate {
|
|
257
262
|
const children = Renderer.render(ASTUtils.siblings(ASTUtils.declValue(match.node)), context).nodes;
|
|
258
263
|
if (!this.#treeElement?.editable()) {
|
|
259
264
|
return children;
|
|
@@ -317,8 +322,7 @@ export class CSSWideKeywordRenderer extends CSSWideKeywordRendererBase {
|
|
|
317
322
|
this.#stylesContainer = stylesContainer;
|
|
318
323
|
}
|
|
319
324
|
|
|
320
|
-
override render(match: SDK.CSSPropertyParserMatchers.CSSWideKeywordMatch,
|
|
321
|
-
context: RenderingContext): Lit.LitTemplate {
|
|
325
|
+
override render(match: SDK.CSSPropertyParserMatchers.CSSWideKeywordMatch, context: RenderingContext): LitTemplate {
|
|
322
326
|
const resolvedProperty = match.resolveProperty();
|
|
323
327
|
if (!resolvedProperty) {
|
|
324
328
|
return html`${match.text}`;
|
|
@@ -386,7 +390,7 @@ export class VariableRenderer extends VariableRendererBase {
|
|
|
386
390
|
this.#computedStyleExtraFields = computedStyleExtraFields;
|
|
387
391
|
}
|
|
388
392
|
|
|
389
|
-
override render(match: SDK.CSSPropertyParserMatchers.VariableMatch, context: RenderingContext):
|
|
393
|
+
override render(match: SDK.CSSPropertyParserMatchers.VariableMatch, context: RenderingContext): LitTemplate {
|
|
390
394
|
if (this.#treeElement?.property.ownerStyle.parentRule instanceof SDK.CSSRule.CSSFunctionRule) {
|
|
391
395
|
return Renderer.render(ASTUtils.children(match.node), context).nodes;
|
|
392
396
|
}
|
|
@@ -480,7 +484,7 @@ export class VariableNameRenderer extends VariableNameRendererBase {
|
|
|
480
484
|
this.#matchedStyles = matchedStyles;
|
|
481
485
|
}
|
|
482
486
|
|
|
483
|
-
override render(match: SDK.CSSPropertyParserMatchers.VariableNameMatch, _context: RenderingContext):
|
|
487
|
+
override render(match: SDK.CSSPropertyParserMatchers.VariableNameMatch, _context: RenderingContext): LitTemplate {
|
|
484
488
|
if (this.#treeElement?.property.ownerStyle.parentRule instanceof SDK.CSSRule.CSSFunctionRule) {
|
|
485
489
|
return html`${match.text}`;
|
|
486
490
|
}
|
|
@@ -532,7 +536,7 @@ export class AttributeRenderer extends AttributeRendererBase {
|
|
|
532
536
|
this.#computedStyleExtraFields = computedStyleExtraFields;
|
|
533
537
|
}
|
|
534
538
|
|
|
535
|
-
override render(match: SDK.CSSPropertyParserMatchers.AttributeMatch, context: RenderingContext):
|
|
539
|
+
override render(match: SDK.CSSPropertyParserMatchers.AttributeMatch, context: RenderingContext): LitTemplate {
|
|
536
540
|
if (this.#treeElement?.property.ownerStyle.parentRule instanceof SDK.CSSRule.CSSFunctionRule) {
|
|
537
541
|
return Renderer.render(ASTUtils.children(match.node), context).nodes;
|
|
538
542
|
}
|
|
@@ -635,8 +639,7 @@ const LinearGradientRendererBase: RendererBase<SDK.CSSPropertyParserMatchers.Lin
|
|
|
635
639
|
// clang-format off
|
|
636
640
|
export class LinearGradientRenderer extends LinearGradientRendererBase {
|
|
637
641
|
// clang-format on
|
|
638
|
-
override render(match: SDK.CSSPropertyParserMatchers.LinearGradientMatch,
|
|
639
|
-
context: RenderingContext): Lit.LitTemplate {
|
|
642
|
+
override render(match: SDK.CSSPropertyParserMatchers.LinearGradientMatch, context: RenderingContext): LitTemplate {
|
|
640
643
|
const children = ASTUtils.children(match.node);
|
|
641
644
|
const {nodes, cssControls} = Renderer.render(children, context);
|
|
642
645
|
const angles = cssControls.get('angle');
|
|
@@ -670,7 +673,7 @@ export class RelativeColorChannelRenderer extends RelativeColorChannelRendererBa
|
|
|
670
673
|
this.#treeElement = treeElement;
|
|
671
674
|
}
|
|
672
675
|
override render(match: SDK.CSSPropertyParserMatchers.RelativeColorChannelMatch,
|
|
673
|
-
context: RenderingContext):
|
|
676
|
+
context: RenderingContext): LitTemplate {
|
|
674
677
|
const color = context.findParent(match.node, SDK.CSSPropertyParserMatchers.ColorMatch);
|
|
675
678
|
if (!color?.relativeColor) {
|
|
676
679
|
return html`${match.text}`;
|
|
@@ -682,7 +685,7 @@ export class RelativeColorChannelRenderer extends RelativeColorChannelRendererBa
|
|
|
682
685
|
return html`${match.text}`;
|
|
683
686
|
}
|
|
684
687
|
|
|
685
|
-
const evaluation = context.tracing?.applyEvaluation([], () => ({
|
|
688
|
+
const evaluation = context.tracing?.applyEvaluation([], () => ({template: html`${value.toFixed(3)}`}));
|
|
686
689
|
if (evaluation) {
|
|
687
690
|
return evaluation;
|
|
688
691
|
}
|
|
@@ -712,7 +715,7 @@ export class ColorRenderer extends ColorRendererBase {
|
|
|
712
715
|
}
|
|
713
716
|
|
|
714
717
|
#getValueChild(match: SDK.CSSPropertyParserMatchers.ColorMatch, context: RenderingContext): {
|
|
715
|
-
valueChild:
|
|
718
|
+
valueChild: LitTemplate,
|
|
716
719
|
cssControls?: CSSControlMap,
|
|
717
720
|
childTracingContexts?: TracingContext[],
|
|
718
721
|
} {
|
|
@@ -735,7 +738,7 @@ export class ColorRenderer extends ColorRendererBase {
|
|
|
735
738
|
return {valueChild, cssControls, childTracingContexts};
|
|
736
739
|
}
|
|
737
740
|
|
|
738
|
-
override render(match: SDK.CSSPropertyParserMatchers.ColorMatch, context: RenderingContext):
|
|
741
|
+
override render(match: SDK.CSSPropertyParserMatchers.ColorMatch, context: RenderingContext): LitTemplate {
|
|
739
742
|
const {valueChild, cssControls, childTracingContexts} = this.#getValueChild(match, context);
|
|
740
743
|
let colorText = context.matchedResult.getComputedText(match.node);
|
|
741
744
|
|
|
@@ -758,20 +761,15 @@ export class ColorRenderer extends ColorRendererBase {
|
|
|
758
761
|
if (match.node.name === 'CallExpression' && childTracingContexts) {
|
|
759
762
|
const evaluation = context.tracing?.applyEvaluation(childTracingContexts, () => {
|
|
760
763
|
const displayColor = color.as(((color.alpha ?? 1) !== 1) ? Common.Color.Format.HEXA : Common.Color.Format.HEX);
|
|
761
|
-
const colorText = document.createElement('span');
|
|
762
|
-
colorText.textContent = displayColor.asString();
|
|
763
764
|
const swatch =
|
|
764
765
|
new ColorRenderer(this.#stylesContainer, null)
|
|
765
766
|
.renderColorSwatch(displayColor.isGamutClipped() ? color : (displayColor.nickname() ?? displayColor),
|
|
766
767
|
match, context);
|
|
767
|
-
swatch.addEventListener(InlineEditor.ColorSwatch.ColorChangedEvent.eventName, ev => {
|
|
768
|
-
colorText.textContent = ev.data.color.asString();
|
|
769
|
-
});
|
|
770
768
|
context.addControl('color', swatch);
|
|
771
|
-
return {
|
|
769
|
+
return {template: html`${swatch}<span>${displayColor.asString()}</span>`};
|
|
772
770
|
});
|
|
773
771
|
if (evaluation) {
|
|
774
|
-
return
|
|
772
|
+
return evaluation;
|
|
775
773
|
}
|
|
776
774
|
}
|
|
777
775
|
|
|
@@ -882,16 +880,15 @@ export class LightDarkColorRenderer extends LightDarkColorRendererBase {
|
|
|
882
880
|
this.#matchedStyles = matchedStyles;
|
|
883
881
|
}
|
|
884
882
|
|
|
885
|
-
#renderContent(match: SDK.CSSPropertyParserMatchers.LightDarkColorMatch, light:
|
|
886
|
-
|
|
883
|
+
#renderContent(match: SDK.CSSPropertyParserMatchers.LightDarkColorMatch, light: LitTemplate, dark: LitTemplate,
|
|
884
|
+
activeColor?: CodeMirror.SyntaxNode[]): LitTemplate {
|
|
887
885
|
const lightClasses = classMap({'inactive-value': activeColor === match.dark});
|
|
888
886
|
const darkClasses = classMap({'inactive-value': activeColor === match.light});
|
|
889
887
|
return html`<span>light-dark(<span class=${lightClasses}>${light}</span>, <span class=${darkClasses}>${
|
|
890
888
|
dark}</span>)</span>`;
|
|
891
889
|
}
|
|
892
890
|
|
|
893
|
-
override render(match: SDK.CSSPropertyParserMatchers.LightDarkColorMatch,
|
|
894
|
-
context: RenderingContext): Lit.LitTemplate {
|
|
891
|
+
override render(match: SDK.CSSPropertyParserMatchers.LightDarkColorMatch, context: RenderingContext): LitTemplate {
|
|
895
892
|
const {nodes: light, cssControls: lightControls} = Renderer.render(match.light, context);
|
|
896
893
|
const {nodes: dark, cssControls: darkControls} = Renderer.render(match.dark, context);
|
|
897
894
|
const content = this.#renderContent(match, light, dark);
|
|
@@ -920,9 +917,8 @@ export class LightDarkColorRenderer extends LightDarkColorRendererBase {
|
|
|
920
917
|
}
|
|
921
918
|
|
|
922
919
|
async applyColorScheme(match: SDK.CSSPropertyParserMatchers.LightDarkColorMatch, context: RenderingContext,
|
|
923
|
-
colorSwatch: InlineEditor.ColorSwatch.ColorSwatch, light:
|
|
924
|
-
|
|
925
|
-
darkControls: CSSControlMap): Promise<Lit.LitTemplate> {
|
|
920
|
+
colorSwatch: InlineEditor.ColorSwatch.ColorSwatch, light: LitTemplate, dark: LitTemplate,
|
|
921
|
+
lightControls: CSSControlMap, darkControls: CSSControlMap): Promise<LitTemplate> {
|
|
926
922
|
const activeColor = await this.#activeColor(match);
|
|
927
923
|
if (context.signal?.aborted || !activeColor) {
|
|
928
924
|
return this.#renderContent(match, light, dark);
|
|
@@ -997,7 +993,7 @@ export class ColorMixRenderer extends ColorMixRendererBase {
|
|
|
997
993
|
this.#treeElement = treeElement;
|
|
998
994
|
}
|
|
999
995
|
|
|
1000
|
-
override render(match: SDK.CSSPropertyParserMatchers.ColorMixMatch, context: RenderingContext):
|
|
996
|
+
override render(match: SDK.CSSPropertyParserMatchers.ColorMixMatch, context: RenderingContext): LitTemplate {
|
|
1001
997
|
const hookUpColorArg = (node: Node, onChange: (newColorText: string) => void): boolean => {
|
|
1002
998
|
if (node instanceof InlineEditor.ColorMixSwatch.ColorMixSwatch ||
|
|
1003
999
|
node instanceof InlineEditor.ColorSwatch.ColorSwatch) {
|
|
@@ -1050,28 +1046,25 @@ export class ColorMixRenderer extends ColorMixRendererBase {
|
|
|
1050
1046
|
if (nodeId !== undefined && childTracingContexts) {
|
|
1051
1047
|
const evaluation = context.tracing?.applyEvaluation(childTracingContexts, () => {
|
|
1052
1048
|
const initialColor = Common.Color.parse('#000') as Common.Color.Color;
|
|
1053
|
-
const {promise, resolve} = Promise.withResolvers<string>();
|
|
1054
1049
|
const swatch = new ColorRenderer(this.#stylesContainer, null).renderColorSwatch(initialColor, match, context);
|
|
1055
|
-
swatch.addEventListener(InlineEditor.ColorSwatch.ColorChangedEvent.eventName, ev => {
|
|
1056
|
-
resolve(ev.data.color.asString());
|
|
1057
|
-
});
|
|
1058
1050
|
context.addControl('color', swatch);
|
|
1059
|
-
const asyncEvalCallback = async(): Promise<
|
|
1051
|
+
const asyncEvalCallback = async(): Promise<LitTemplate|null> => {
|
|
1060
1052
|
const results = await this.#stylesContainer.cssModel()?.resolveValues(undefined, nodeId, colorMixText);
|
|
1061
1053
|
if (context.signal?.aborted) {
|
|
1062
|
-
return
|
|
1054
|
+
return null;
|
|
1063
1055
|
}
|
|
1064
1056
|
if (results) {
|
|
1065
1057
|
const color = Common.Color.parse(results[0]);
|
|
1066
1058
|
if (color) {
|
|
1067
|
-
|
|
1068
|
-
|
|
1059
|
+
const formattedColor = color.as(Common.Color.Format.HEXA);
|
|
1060
|
+
swatch.setColor(formattedColor);
|
|
1061
|
+
return html`${swatch}<span>${formattedColor.asString()}</span>`;
|
|
1069
1062
|
}
|
|
1070
1063
|
}
|
|
1071
|
-
return
|
|
1064
|
+
return null;
|
|
1072
1065
|
};
|
|
1073
1066
|
return {
|
|
1074
|
-
|
|
1067
|
+
template: html`${swatch}<span>${initialColor.asString()}</span>`,
|
|
1075
1068
|
asyncEvalCallback,
|
|
1076
1069
|
};
|
|
1077
1070
|
});
|
|
@@ -1107,7 +1100,7 @@ export class ColorMixRenderer extends ColorMixRendererBase {
|
|
|
1107
1100
|
>${ifExpanded(() => {
|
|
1108
1101
|
const color = swatch.mixedColor();
|
|
1109
1102
|
if (!color) {
|
|
1110
|
-
return
|
|
1103
|
+
return nothing;
|
|
1111
1104
|
}
|
|
1112
1105
|
const rgb = color.as(Common.Color.Format.HEX);
|
|
1113
1106
|
return html`${rgb.isGamutClipped() ? color.asString() : rgb.asString()}`;
|
|
@@ -1129,7 +1122,7 @@ export class ContrastColorRenderer extends ContrastColorRendererBase {
|
|
|
1129
1122
|
this.#stylesContainer = stylesContainer;
|
|
1130
1123
|
}
|
|
1131
1124
|
|
|
1132
|
-
override render(match: SDK.CSSPropertyParserMatchers.ContrastColorMatch, context: RenderingContext):
|
|
1125
|
+
override render(match: SDK.CSSPropertyParserMatchers.ContrastColorMatch, context: RenderingContext): LitTemplate {
|
|
1133
1126
|
const content = html`<span>contrast-color(${Renderer.render(match.color, context).nodes})</span>`;
|
|
1134
1127
|
|
|
1135
1128
|
if (context.matchedResult.hasUnresolvedSubstitutions(match.node)) {
|
|
@@ -1168,7 +1161,7 @@ export class AngleRenderer extends AngleRendererBase {
|
|
|
1168
1161
|
this.#treeElement = treeElement;
|
|
1169
1162
|
}
|
|
1170
1163
|
|
|
1171
|
-
override render(match: SDK.CSSPropertyParserMatchers.AngleMatch, context: RenderingContext):
|
|
1164
|
+
override render(match: SDK.CSSPropertyParserMatchers.AngleMatch, context: RenderingContext): LitTemplate {
|
|
1172
1165
|
const angleText = match.text;
|
|
1173
1166
|
if (!this.#treeElement?.editable()) {
|
|
1174
1167
|
return html`${angleText}`;
|
|
@@ -1272,7 +1265,7 @@ export class LinkableNameRenderer extends LinkableNameRendererBase {
|
|
|
1272
1265
|
}
|
|
1273
1266
|
}
|
|
1274
1267
|
|
|
1275
|
-
override render(match: SDK.CSSPropertyParserMatchers.LinkableNameMatch):
|
|
1268
|
+
override render(match: SDK.CSSPropertyParserMatchers.LinkableNameMatch): LitTemplate {
|
|
1276
1269
|
const {metric, jslogContext, ruleBlock, isDefined} = this.#getLinkData(match);
|
|
1277
1270
|
// clang-format off
|
|
1278
1271
|
const swatch = html`<devtools-link-swatch .data=${{
|
|
@@ -1309,8 +1302,8 @@ export class LinkableNameRenderer extends LinkableNameRendererBase {
|
|
|
1309
1302
|
@mouseup=${(ev: Event) => {
|
|
1310
1303
|
ev.consume(true);
|
|
1311
1304
|
void Common.Revealer.reveal(maybeAnimationGroup);
|
|
1312
|
-
}}></devtools-icon>` :
|
|
1313
|
-
|
|
1305
|
+
}}></devtools-icon>` : nothing)) :
|
|
1306
|
+
nothing;
|
|
1314
1307
|
return html`<span>${icon}${swatch}</span>`;
|
|
1315
1308
|
}
|
|
1316
1309
|
// clang-format on
|
|
@@ -1329,7 +1322,7 @@ export class BezierRenderer extends BezierRendererBase {
|
|
|
1329
1322
|
super();
|
|
1330
1323
|
this.#treeElement = treeElement;
|
|
1331
1324
|
}
|
|
1332
|
-
override render(match: SDK.CSSPropertyParserMatchers.BezierMatch, context: RenderingContext):
|
|
1325
|
+
override render(match: SDK.CSSPropertyParserMatchers.BezierMatch, context: RenderingContext): LitTemplate {
|
|
1333
1326
|
const nodes = match.node.name === 'CallExpression' ? Renderer.render(ASTUtils.children(match.node), context).nodes :
|
|
1334
1327
|
match.text;
|
|
1335
1328
|
if (!this.#treeElement?.editable() ||
|
|
@@ -1364,7 +1357,7 @@ export class AutoBaseRenderer extends AutoBaseRendererBase {
|
|
|
1364
1357
|
this.#computedStyleExtraFields = computedStyleExtraFields;
|
|
1365
1358
|
}
|
|
1366
1359
|
|
|
1367
|
-
override render(match: SDK.CSSPropertyParserMatchers.AutoBaseMatch, context: RenderingContext):
|
|
1360
|
+
override render(match: SDK.CSSPropertyParserMatchers.AutoBaseMatch, context: RenderingContext): LitTemplate {
|
|
1368
1361
|
const auto = Renderer.render(match.auto, context).nodes;
|
|
1369
1362
|
const base = Renderer.render(match.base, context).nodes;
|
|
1370
1363
|
|
|
@@ -1548,8 +1541,8 @@ export class ShadowModel implements InlineEditor.CSSShadowEditor.CSSShadowModel
|
|
|
1548
1541
|
return parts;
|
|
1549
1542
|
}
|
|
1550
1543
|
|
|
1551
|
-
renderContents():
|
|
1552
|
-
const parts: Array<string|
|
|
1544
|
+
renderContents(): LitTemplate {
|
|
1545
|
+
const parts: Array<string|LitTemplate> = [];
|
|
1553
1546
|
for (const part of this.#parts()) {
|
|
1554
1547
|
if (parts.length > 0) {
|
|
1555
1548
|
parts.push(' ');
|
|
@@ -1754,9 +1747,9 @@ export class ShadowRenderer extends ShadowRendererBase {
|
|
|
1754
1747
|
return new ShadowModel(shadowType, properties, context);
|
|
1755
1748
|
}
|
|
1756
1749
|
|
|
1757
|
-
override render(match: SDK.CSSPropertyParserMatchers.ShadowMatch, context: RenderingContext):
|
|
1750
|
+
override render(match: SDK.CSSPropertyParserMatchers.ShadowMatch, context: RenderingContext): LitTemplate {
|
|
1758
1751
|
const shadows = ASTUtils.split(ASTUtils.siblings(ASTUtils.declValue(match.node)));
|
|
1759
|
-
const result: Array<Node|
|
|
1752
|
+
const result: Array<Node|LitTemplate> = [];
|
|
1760
1753
|
// The text of the whole value is put together from the shadows below, so the changes that renderers make to their
|
|
1761
1754
|
// parts need to be recorded in a tracking of their own to not be hidden by it.
|
|
1762
1755
|
const nestedEdits = new ValueUpdateTracking(context.ast);
|
|
@@ -1801,7 +1794,7 @@ const GridTemplateRendererBase: RendererBase<SDK.CSSPropertyParserMatchers.GridT
|
|
|
1801
1794
|
// clang-format off
|
|
1802
1795
|
export class GridTemplateRenderer extends GridTemplateRendererBase {
|
|
1803
1796
|
// clang-format on
|
|
1804
|
-
override render(match: SDK.CSSPropertyParserMatchers.GridTemplateMatch, context: RenderingContext):
|
|
1797
|
+
override render(match: SDK.CSSPropertyParserMatchers.GridTemplateMatch, context: RenderingContext): LitTemplate {
|
|
1805
1798
|
if (match.lines.length <= 1) {
|
|
1806
1799
|
return Renderer.render(ASTUtils.siblings(ASTUtils.declValue(match.node)), context).nodes;
|
|
1807
1800
|
}
|
|
@@ -1865,7 +1858,7 @@ export class LengthRenderer extends LengthRendererBase {
|
|
|
1865
1858
|
this.#propertyName = propertyName;
|
|
1866
1859
|
}
|
|
1867
1860
|
|
|
1868
|
-
override render(match: SDK.CSSPropertyParserMatchers.LengthMatch, context: RenderingContext):
|
|
1861
|
+
override render(match: SDK.CSSPropertyParserMatchers.LengthMatch, context: RenderingContext): LitTemplate {
|
|
1869
1862
|
const template = html`${match.text}`;
|
|
1870
1863
|
const evaluation =
|
|
1871
1864
|
context.tracing?.applyEvaluation([], () => ({
|
|
@@ -1885,7 +1878,7 @@ export class LengthRenderer extends LengthRendererBase {
|
|
|
1885
1878
|
// clang-format on
|
|
1886
1879
|
}
|
|
1887
1880
|
|
|
1888
|
-
async getTooltipValue(match: SDK.CSSPropertyParser.Match, context: RenderingContext): Promise<
|
|
1881
|
+
async getTooltipValue(match: SDK.CSSPropertyParser.Match, context: RenderingContext): Promise<LitTemplate|null> {
|
|
1889
1882
|
const pixelValue =
|
|
1890
1883
|
(await resolveValues(this.#stylesContainer, this.#propertyName, match, context, match.text))?.[0];
|
|
1891
1884
|
if (context.signal?.aborted || !pixelValue || pixelValue === match.text) {
|
|
@@ -1919,7 +1912,7 @@ export class BaseFunctionRenderer extends BaseFunctionRendererBase {
|
|
|
1919
1912
|
this.#propertyName = propertyName;
|
|
1920
1913
|
}
|
|
1921
1914
|
|
|
1922
|
-
#renderArgs(renderedArgs:
|
|
1915
|
+
#renderArgs(renderedArgs: LitTemplate[], activeArgs?: boolean[]): TemplateResult {
|
|
1923
1916
|
return html`${renderedArgs.map((arg, idx) => {
|
|
1924
1917
|
const classes = classMap({'inactive-value': activeArgs?.[idx] === false});
|
|
1925
1918
|
return html`${idx === 0 ? nothing : ', '}<span class=${classes}>${arg}</span>`;
|
|
@@ -1927,7 +1920,7 @@ export class BaseFunctionRenderer extends BaseFunctionRendererBase {
|
|
|
1927
1920
|
}
|
|
1928
1921
|
|
|
1929
1922
|
override render(match: SDK.CSSPropertyParserMatchers.BaseFunctionMatch<string>,
|
|
1930
|
-
context: RenderingContext):
|
|
1923
|
+
context: RenderingContext): LitTemplate {
|
|
1931
1924
|
const childTracingContexts = context.tracing?.evaluation(match.args, {match, context});
|
|
1932
1925
|
const renderedArgs = match.args.map(
|
|
1933
1926
|
(arg, idx) =>
|
|
@@ -1953,7 +1946,7 @@ export class BaseFunctionRenderer extends BaseFunctionRendererBase {
|
|
|
1953
1946
|
}
|
|
1954
1947
|
|
|
1955
1948
|
async applyEvaluation(match: SDK.CSSPropertyParserMatchers.BaseFunctionMatch<string>,
|
|
1956
|
-
context: RenderingContext): Promise<
|
|
1949
|
+
context: RenderingContext): Promise<LitTemplate|null> {
|
|
1957
1950
|
const value = context.matchedResult.getComputedText(match.node, match => {
|
|
1958
1951
|
if (match instanceof SDK.CSSPropertyParserMatchers.RelativeColorChannelMatch) {
|
|
1959
1952
|
const relativeColor =
|
|
@@ -1969,9 +1962,8 @@ export class BaseFunctionRenderer extends BaseFunctionRendererBase {
|
|
|
1969
1962
|
return html`${evaled[0]}`;
|
|
1970
1963
|
}
|
|
1971
1964
|
|
|
1972
|
-
async applyMathFunction(renderedArgs:
|
|
1973
|
-
|
|
1974
|
-
context: RenderingContext): Promise<Lit.LitTemplate> {
|
|
1965
|
+
async applyMathFunction(renderedArgs: LitTemplate[], match: SDK.CSSPropertyParserMatchers.BaseFunctionMatch<string>,
|
|
1966
|
+
context: RenderingContext): Promise<LitTemplate> {
|
|
1975
1967
|
// To understand which argument was selected by the function, we evaluate the function as well as all the arguments
|
|
1976
1968
|
// and compare the function result to the values of all its arguments. Evaluating the arguments eliminates nested
|
|
1977
1969
|
// function calls and normalizes all units to px.
|
|
@@ -2158,8 +2150,7 @@ export class PositionAreaRenderer extends PositionAreaRendererBase {
|
|
|
2158
2150
|
(child): child is StylePropertyTreeElement =>
|
|
2159
2151
|
child instanceof StylePropertyTreeElement && child.property.name === propertyName);
|
|
2160
2152
|
}
|
|
2161
|
-
|
|
2162
|
-
override render(match: SDK.CSSPropertyParserMatchers.PositionAreaMatch, context: RenderingContext): Lit.LitTemplate {
|
|
2153
|
+
override render(match: SDK.CSSPropertyParserMatchers.PositionAreaMatch, context: RenderingContext): LitTemplate {
|
|
2163
2154
|
const children = Renderer.render(ASTUtils.siblings(ASTUtils.declValue(match.node)), context).nodes;
|
|
2164
2155
|
// The text of the match is the value as authored, which may contain comments or var()s that resolve to the area.
|
|
2165
2156
|
if (!this.#treeElement?.editable() ||
|
|
@@ -2207,7 +2198,6 @@ export class PositionAreaRenderer extends PositionAreaRendererBase {
|
|
|
2207
2198
|
});
|
|
2208
2199
|
}
|
|
2209
2200
|
}
|
|
2210
|
-
|
|
2211
2201
|
const updateProperty = (propertyName: string, computedStyle: Map<string, string>|null): void => {
|
|
2212
2202
|
const matchedStyles = active.treeElement.matchedStyles();
|
|
2213
2203
|
const resolved = matchedStyles.resolveProperty(propertyName, active.treeElement.property.ownerStyle);
|
|
@@ -2338,8 +2328,8 @@ export class PositionTryRenderer extends PositionTryRendererBase {
|
|
|
2338
2328
|
this.#treeElement = treeElement;
|
|
2339
2329
|
}
|
|
2340
2330
|
|
|
2341
|
-
override render(match: SDK.CSSPropertyParserMatchers.PositionTryMatch, context: RenderingContext):
|
|
2342
|
-
const content:
|
|
2331
|
+
override render(match: SDK.CSSPropertyParserMatchers.PositionTryMatch, context: RenderingContext): LitTemplate {
|
|
2332
|
+
const content: LitTemplate[] = [];
|
|
2343
2333
|
if (match.preamble.length > 0) {
|
|
2344
2334
|
const {nodes} = Renderer.render(match.preamble, context);
|
|
2345
2335
|
content.push(nodes);
|
|
@@ -2518,7 +2508,6 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2518
2508
|
carryOverCommittedProperty(previous: StylePropertyTreeElement): void {
|
|
2519
2509
|
this.#lastCommittedProperty = previous.#lastCommittedProperty;
|
|
2520
2510
|
}
|
|
2521
|
-
|
|
2522
2511
|
async gridNames(): Promise<Set<string>> {
|
|
2523
2512
|
if (!SDK.CSSMetadata.cssMetadata().isGridNameAwareProperty(this.name)) {
|
|
2524
2513
|
return new Set();
|
|
@@ -3135,10 +3124,10 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
3135
3124
|
return swatch;
|
|
3136
3125
|
}
|
|
3137
3126
|
|
|
3138
|
-
getTracingTooltip(
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3127
|
+
getTracingTooltip(functionName: string, node: CodeMirror.SyntaxNode,
|
|
3128
|
+
matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles, computedStyles: Map<string, string>,
|
|
3129
|
+
computedStyleExtraFields: Protocol.CSS.ComputedStyleExtraFields|null,
|
|
3130
|
+
context: RenderingContext): TemplateResult {
|
|
3142
3131
|
if (context.tracing || !context.property) {
|
|
3143
3132
|
return html`${functionName}`;
|
|
3144
3133
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
.container {
|
|
8
|
-
min-width:
|
|
8
|
+
min-width: var(--sys-size-24);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.row {
|
|
@@ -63,10 +63,6 @@
|
|
|
63
63
|
cursor: pointer;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.button:focus-visible {
|
|
67
|
-
outline: auto 5px -webkit-focus-ring-color;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
66
|
.button devtools-icon {
|
|
71
67
|
color: var(--icon-default);
|
|
72
68
|
}
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
margin-top: var(--sys-size-6);
|
|
80
80
|
color: var(--sys-color-token-tag);
|
|
81
81
|
display: grid;
|
|
82
|
-
grid-template-columns: repeat(auto-fill, minmax(min(
|
|
82
|
+
grid-template-columns: repeat(auto-fill, minmax(min(var(--sys-size-29), 100%), 1fr));
|
|
83
83
|
gap: var(--sys-size-5);
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -4,11 +4,6 @@
|
|
|
4
4
|
* found in the LICENSE file.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
.properties-widget-section {
|
|
8
|
-
padding: var(--sys-size-2) 0 var(--sys-size-2) 5px;
|
|
9
|
-
flex: none;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
7
|
.properties-widget-toolbar {
|
|
13
8
|
border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
|
|
14
9
|
flex-shrink: 0;
|
|
@@ -178,9 +178,10 @@
|
|
|
178
178
|
color: var(--sys-color-on-surface);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
+
/* 64px (--sys-size-18) matches a 2-row .cls toolbar pane height for full retraction into overflow: hidden. */
|
|
181
182
|
@keyframes styles-element-state-pane-slidein {
|
|
182
183
|
from {
|
|
183
|
-
margin-top: -
|
|
184
|
+
margin-top: calc(-1 * var(--sys-size-18));
|
|
184
185
|
}
|
|
185
186
|
|
|
186
187
|
to {
|
|
@@ -194,7 +195,7 @@
|
|
|
194
195
|
}
|
|
195
196
|
|
|
196
197
|
to {
|
|
197
|
-
margin-top: -
|
|
198
|
+
margin-top: calc(-1 * var(--sys-size-18));
|
|
198
199
|
}
|
|
199
200
|
}
|
|
200
201
|
|
|
@@ -235,7 +235,6 @@ devtools-toolbar.device-mode-toolbar-options {
|
|
|
235
235
|
/* stylelint-disable-next-line custom-property-pattern */
|
|
236
236
|
content: var(--image-file-resizeVertical);
|
|
237
237
|
margin-bottom: calc(-1 * var(--sys-size-2));
|
|
238
|
-
width: 26px;
|
|
239
238
|
height: var(--sys-size-4);
|
|
240
239
|
}
|
|
241
240
|
|
|
@@ -317,7 +316,8 @@ devtools-toolbar.device-mode-toolbar-options {
|
|
|
317
316
|
}
|
|
318
317
|
|
|
319
318
|
.device-mode-ruler-left .device-mode-ruler-inner {
|
|
320
|
-
|
|
319
|
+
/* Offset by the 20px ruler track (--sys-size-9) minus the parent's 1px top border (--sys-size-1) to align with the viewport top edge. */
|
|
320
|
+
inset: calc(var(--sys-size-9) - var(--sys-size-1)) 0 0;
|
|
321
321
|
border-right: var(--sys-size-1) solid var(--sys-color-token-subtle);
|
|
322
322
|
background-color: var(--sys-color-cdt-base-container);
|
|
323
323
|
}
|
|
@@ -335,7 +335,7 @@ devtools-toolbar.device-mode-toolbar-options {
|
|
|
335
335
|
}
|
|
336
336
|
|
|
337
337
|
.device-mode-ruler-top .device-mode-ruler-marker.device-mode-ruler-marker-medium {
|
|
338
|
-
height:
|
|
338
|
+
height: var(--sys-size-5);
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
.device-mode-ruler-top .device-mode-ruler-marker.device-mode-ruler-marker-large {
|
|
@@ -314,8 +314,8 @@
|
|
|
314
314
|
.header-icon-container {
|
|
315
315
|
background: linear-gradient(135deg, var(--sys-color-gradient-primary), var(--sys-color-gradient-tertiary));
|
|
316
316
|
border-radius: var(--sys-size-4);
|
|
317
|
-
height:
|
|
318
|
-
width:
|
|
317
|
+
height: var(--sys-size-13);
|
|
318
|
+
width: var(--sys-size-13);
|
|
319
319
|
display: flex;
|
|
320
320
|
align-items: center;
|
|
321
321
|
justify-content: center;
|
|
@@ -146,8 +146,8 @@ p {
|
|
|
146
146
|
border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
|
|
147
147
|
padding: var(--sys-size-4) 0;
|
|
148
148
|
position: relative;
|
|
149
|
-
padding-left: calc(var(--issue-indent) +
|
|
150
|
-
padding-bottom:
|
|
149
|
+
padding-left: calc(var(--issue-indent) + var(--sys-size-14));
|
|
150
|
+
padding-bottom: var(--sys-size-11);
|
|
151
151
|
padding-right: var(--sys-size-5);
|
|
152
152
|
}
|
|
153
153
|
|
|
@@ -187,7 +187,8 @@ p {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
devtools-icon.leading-issue-icon {
|
|
190
|
-
|
|
190
|
+
/* 8px (--sys-size-5) minus 1px (--sys-size-1) aligns the 20px icon after the 16px disclosure arrow with the 23px .issue-body::before border and 43px body indent. */
|
|
191
|
+
margin: var(--sys-size-1) 0 calc(-1 * var(--sys-size-1)) calc(var(--sys-size-5) - var(--sys-size-1));
|
|
191
192
|
}
|
|
192
193
|
|
|
193
194
|
.message {
|
|
@@ -233,8 +234,8 @@ devtools-icon.leading-issue-icon {
|
|
|
233
234
|
|
|
234
235
|
.affected-resources-label,
|
|
235
236
|
.resolutions-label {
|
|
236
|
-
margin-top:
|
|
237
|
-
font-size:
|
|
237
|
+
margin-top: var(--sys-size-3);
|
|
238
|
+
font-size: var(--sys-typescale-body5-size);
|
|
238
239
|
font-weight: 500;
|
|
239
240
|
letter-spacing: 0.06em;
|
|
240
241
|
text-transform: uppercase;
|
|
@@ -347,7 +348,8 @@ ul > li.plain-enum::before {
|
|
|
347
348
|
}
|
|
348
349
|
|
|
349
350
|
.affected-resource-list {
|
|
350
|
-
|
|
351
|
+
/* 12px left margin offset minus 2px cell left padding so column 1 aligns flush with parent container */
|
|
352
|
+
border-spacing: calc(var(--sys-size-6) - var(--sys-size-2)) 0;
|
|
351
353
|
margin-left: calc(-1 * var(--sys-size-6));
|
|
352
354
|
}
|
|
353
355
|
|
|
@@ -426,7 +428,8 @@ ul > li.plain-enum::before {
|
|
|
426
428
|
}
|
|
427
429
|
|
|
428
430
|
.aggregated-issues-count {
|
|
429
|
-
|
|
431
|
+
/* Center the 14px (--sys-size-7) adorner pill vertically against the 20px (--sys-size-9) issue icon. */
|
|
432
|
+
padding: calc((var(--sys-size-9) - var(--sys-size-7)) / 2) var(--sys-size-4) 0;
|
|
430
433
|
}
|
|
431
434
|
|
|
432
435
|
.affected-resource-directive-info-header {
|
|
@@ -406,11 +406,26 @@ export class LighthousePanel extends UI.Panel.Panel {
|
|
|
406
406
|
|
|
407
407
|
static async executeLighthouseRecording(
|
|
408
408
|
overrides?: LighthouseModel.RunTypes.RunOverrides,
|
|
409
|
+
options?: {signal?: AbortSignal},
|
|
409
410
|
): Promise<LighthouseModel.RunTypes.RunResult> {
|
|
411
|
+
if (options?.signal?.aborted) {
|
|
412
|
+
return {status: 'cancelled'};
|
|
413
|
+
}
|
|
410
414
|
const panel = LighthousePanel.instance();
|
|
411
415
|
await UI.ViewManager.ViewManager.instance().showView('lighthouse');
|
|
416
|
+
if (options?.signal?.aborted) {
|
|
417
|
+
return {status: 'cancelled'};
|
|
418
|
+
}
|
|
412
419
|
|
|
413
|
-
|
|
420
|
+
const onAbort = (): void => {
|
|
421
|
+
void panel.handleRunCancel();
|
|
422
|
+
};
|
|
423
|
+
options?.signal?.addEventListener('abort', onAbort, {once: true});
|
|
424
|
+
try {
|
|
425
|
+
return await panel.handleCompleteRun(overrides);
|
|
426
|
+
} finally {
|
|
427
|
+
options?.signal?.removeEventListener('abort', onAbort);
|
|
428
|
+
}
|
|
414
429
|
}
|
|
415
430
|
}
|
|
416
431
|
|
|
@@ -76,7 +76,7 @@ select.lighthouse-report {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
&.lh-active + .lh-tools__dropdown {
|
|
79
|
-
clip: rect(calc(-1 * var(--sys-size-5)),
|
|
79
|
+
clip: rect(calc(-1 * var(--sys-size-5)), var(--sys-size-26), var(--sys-size-30), calc(-1 * var(--sys-size-6))); /* stylelint-disable-line property-no-deprecated */
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|