@@ -256,7 +256,7 @@ function getTracingTooltip(
256256 ?. getWidget ( )
257257 ?. showTrace (
258258 property , text , matchedStyles , computedStyles ,
259- getPropertyRenderers ( property . name ,
259+ getPropertyRenderers (
260260 property . ownerStyle , stylesPane , matchedStyles , null ,
261261 computedStyles ) ) ;
262262 }
@@ -308,8 +308,7 @@ export class VariableRenderer extends rendererBase(SDK.CSSPropertyParserMatchers
308308 const { nodes, cssControls} = Renderer . renderValueNodes (
309309 { name : declaration . name , value : declaration . value ?? '' } ,
310310 substitution . cachedParsedValue ( declaration . declaration , this . #matchedStyles, this . #computedStyles) ,
311- getPropertyRenderers (
312- declaration . name , declaration . style , this . #stylesPane, this . #matchedStyles, null , this . #computedStyles) ,
311+ getPropertyRenderers ( declaration . style , this . #stylesPane, this . #matchedStyles, null , this . #computedStyles) ,
313312 substitution ) ;
314313 cssControls . forEach ( ( value , key ) => value . forEach ( control => context . addControl ( key , control ) ) ) ;
315314 return nodes ;
@@ -698,7 +697,7 @@ export class ColorMixRenderer extends rendererBase(SDK.CSSPropertyParserMatchers
698697 context . addControl ( 'color' , swatch ) ;
699698 const nodeId = this . #pane. node ( ) ?. id ;
700699 if ( nodeId !== undefined ) {
701- void this . #pane. cssModel ( ) ?. resolveValues ( undefined , nodeId , colorMixText ) . then ( results => {
700+ void this . #pane. cssModel ( ) ?. resolveValues ( nodeId , colorMixText ) . then ( results => {
702701 if ( results ) {
703702 const color = Common . Color . parse ( results [ 0 ] ) ;
704703 if ( color ) {
@@ -1292,13 +1291,11 @@ export class GridTemplateRenderer extends rendererBase(SDK.CSSPropertyParserMatc
12921291
12931292// clang-format off
12941293export class LengthRenderer extends rendererBase ( SDK . CSSPropertyParserMatchers . LengthMatch ) {
1295- // clang-format on
12961294 readonly #stylesPane: StylesSidebarPane ;
1297- readonly #propertyName: string ;
1298- constructor ( stylesPane : StylesSidebarPane , propertyName : string ) {
1295+ // clang-format on
1296+ constructor ( stylesPane : StylesSidebarPane ) {
12991297 super ( ) ;
13001298 this . #stylesPane = stylesPane ;
1301- this . #propertyName = propertyName ;
13021299 }
13031300
13041301 override render ( match : SDK . CSSPropertyParserMatchers . LengthMatch , context : RenderingContext ) : Node [ ] {
@@ -1321,7 +1318,7 @@ export class LengthRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.L
13211318 return ;
13221319 }
13231320
1324- const pixelValue = await this . #stylesPane. cssModel ( ) ?. resolveValues ( this . #propertyName , nodeId , value ) ;
1321+ const pixelValue = await this . #stylesPane. cssModel ( ) ?. resolveValues ( nodeId , value ) ;
13251322
13261323 if ( pixelValue ) {
13271324 valueElement . textContent = pixelValue [ 0 ] ;
@@ -1334,7 +1331,7 @@ export class LengthRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.L
13341331 return ;
13351332 }
13361333
1337- const pixelValue = await this . #stylesPane. cssModel ( ) ?. resolveValues ( this . #propertyName , nodeId , value ) ;
1334+ const pixelValue = await this . #stylesPane. cssModel ( ) ?. resolveValues ( nodeId , value ) ;
13381335 if ( ! pixelValue ) {
13391336 return ;
13401337 }
@@ -1354,19 +1351,17 @@ export class LengthRenderer extends rendererBase(SDK.CSSPropertyParserMatchers.L
13541351
13551352// clang-format off
13561353export class MathFunctionRenderer extends rendererBase ( SDK . CSSPropertyParserMatchers . MathFunctionMatch ) {
1357- // clang-format on
13581354 readonly #stylesPane: StylesSidebarPane ;
1359- #matchedStyles: SDK . CSSMatchedStyles . CSSMatchedStyles ;
1360- #computedStyles: Map < string , string > ;
1361- #propertyName: string ;
1355+ #matchedStyles: SDK . CSSMatchedStyles . CSSMatchedStyles ;
1356+ #computedStyles: Map < string , string > ;
1357+ // clang-format on
13621358 constructor (
13631359 stylesPane : StylesSidebarPane , matchedStyles : SDK . CSSMatchedStyles . CSSMatchedStyles ,
1364- computedStyles : Map < string , string > , propertyName : string ) {
1360+ computedStyles : Map < string , string > ) {
13651361 super ( ) ;
13661362 this . #matchedStyles = matchedStyles ;
13671363 this . #computedStyles = computedStyles ;
13681364 this . #stylesPane = stylesPane ;
1369- this . #propertyName = propertyName ;
13701365 }
13711366
13721367 override render ( match : SDK . CSSPropertyParserMatchers . MathFunctionMatch , context : RenderingContext ) : Node [ ] {
@@ -1402,7 +1397,7 @@ export class MathFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatc
14021397 if ( nodeId === undefined ) {
14031398 return ;
14041399 }
1405- const evaled = await this . #stylesPane. cssModel ( ) ?. resolveValues ( this . #propertyName , nodeId , value ) ;
1400+ const evaled = await this . #stylesPane. cssModel ( ) ?. resolveValues ( nodeId , value ) ;
14061401 if ( ! evaled ?. [ 0 ] || evaled [ 0 ] === value ) {
14071402 return ;
14081403 }
@@ -1418,7 +1413,7 @@ export class MathFunctionRenderer extends rendererBase(SDK.CSSPropertyParserMatc
14181413 // and compare the function result to the values of all its arguments. Evaluating the arguments eliminates nested
14191414 // function calls and normalizes all units to px.
14201415 values . unshift ( functionText ) ;
1421- const evaledArgs = await this . #stylesPane. cssModel ( ) ?. resolveValues ( this . #propertyName , nodeId , ...values ) ;
1416+ const evaledArgs = await this . #stylesPane. cssModel ( ) ?. resolveValues ( nodeId , ...values ) ;
14221417 if ( ! evaledArgs ) {
14231418 return ;
14241419 }
@@ -1560,7 +1555,7 @@ export class PositionTryRenderer extends rendererBase(SDK.CSSPropertyParserMatch
15601555}
15611556
15621557export function getPropertyRenderers (
1563- propertyName : string , style : SDK . CSSStyleDeclaration . CSSStyleDeclaration , stylesPane : StylesSidebarPane ,
1558+ style : SDK . CSSStyleDeclaration . CSSStyleDeclaration , stylesPane : StylesSidebarPane ,
15641559 matchedStyles : SDK . CSSMatchedStyles . CSSMatchedStyles , treeElement : StylePropertyTreeElement | null ,
15651560 computedStyles : Map < string , string > ) : Array < MatchRenderer < SDK . CSSPropertyParser . Match > > {
15661561 return [
@@ -1581,8 +1576,8 @@ export function getPropertyRenderers(
15811576 new PositionAnchorRenderer ( stylesPane ) ,
15821577 new FlexGridRenderer ( stylesPane , treeElement ) ,
15831578 new PositionTryRenderer ( matchedStyles ) ,
1584- new LengthRenderer ( stylesPane , propertyName ) ,
1585- new MathFunctionRenderer ( stylesPane , matchedStyles , computedStyles , propertyName ) ,
1579+ new LengthRenderer ( stylesPane ) ,
1580+ new MathFunctionRenderer ( stylesPane , matchedStyles , computedStyles ) ,
15861581 new AutoBaseRenderer ( computedStyles ) ,
15871582 new BinOpRenderer ( ) ,
15881583 ] ;
@@ -1981,11 +1976,10 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
19811976 this . expandElement . setAttribute ( 'jslog' , `${ VisualLogging . expand ( ) . track ( { click : true } ) } ` ) ;
19821977 }
19831978
1984- const renderers = this . property . parsedOk ?
1985- getPropertyRenderers (
1986- this . name , this . style , this . parentPaneInternal , this . matchedStylesInternal , this ,
1987- this . getComputedStyles ( ) ?? new Map ( ) ) :
1988- [ ] ;
1979+ const renderers = this . property . parsedOk ? getPropertyRenderers (
1980+ this . style , this . parentPaneInternal , this . matchedStylesInternal ,
1981+ this , this . getComputedStyles ( ) ?? new Map ( ) ) :
1982+ [ ] ;
19891983
19901984 if ( Root . Runtime . experiments . isEnabled ( 'font-editor' ) && this . property . parsedOk ) {
19911985 renderers . push ( new FontRenderer ( this ) ) ;
0 commit comments