Skip to content

Commit 8ae7979

Browse files
pfaffeDevtools-frontend LUCI CQ
authored andcommitted
[css value tracing] color-mix substitutions should not be editable
Bug: 396080529 Change-Id: I569272d9fbcab6260e949410abfbc7b9236597d5 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6329383 Reviewed-by: Eric Leese <[email protected]> Auto-Submit: Philip Pfaffe <[email protected]> Commit-Queue: Philip Pfaffe <[email protected]> Commit-Queue: Eric Leese <[email protected]>
1 parent c2b4e0d commit 8ae7979

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

front_end/panels/elements/StylePropertyTreeElement.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -589,12 +589,10 @@ export class LightDarkColorRenderer extends rendererBase(SDK.CSSPropertyParserMa
589589
export class ColorMixRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.ColorMixMatch) {
590590
// clang-format on
591591
readonly #pane: StylesSidebarPane;
592-
readonly #treeElement: StylePropertyTreeElement|null;
593592

594-
constructor(pane: StylesSidebarPane, treeElement: StylePropertyTreeElement|null) {
593+
constructor(pane: StylesSidebarPane) {
595594
super();
596595
this.#pane = pane;
597-
this.#treeElement = treeElement;
598596
}
599597

600598
override render(match: SDK.CSSPropertyParserMatchers.ColorMixMatch, context: RenderingContext): Node[] {
@@ -644,7 +642,7 @@ export class ColorMixRenderer extends rendererBase(SDK.CSSPropertyParserMatchers
644642

645643
if (childTracingContexts && context.tracing?.applyEvaluation(childTracingContexts)) {
646644
const initialColor = Common.Color.parse('#000') as Common.Color.Color;
647-
const swatch = new ColorRenderer(this.#pane, this.#treeElement).renderColorSwatch(initialColor);
645+
const swatch = new ColorRenderer(this.#pane, null).renderColorSwatch(initialColor);
648646
context.addControl('color', swatch);
649647
const nodeId = this.#pane.node()?.id;
650648
if (nodeId !== undefined) {
@@ -1500,7 +1498,7 @@ export function getPropertyRenderers(
15001498
return [
15011499
new VariableRenderer(stylesPane, treeElement, matchedStyles, computedStyles),
15021500
new ColorRenderer(stylesPane, treeElement),
1503-
new ColorMixRenderer(stylesPane, treeElement),
1501+
new ColorMixRenderer(stylesPane),
15041502
new URLRenderer(style.parentRule, stylesPane.node()),
15051503
new AngleRenderer(treeElement),
15061504
new LinkableNameRenderer(matchedStyles, stylesPane),

0 commit comments

Comments
 (0)