@@ -13461,19 +13461,24 @@ if (IsCSSPropertyPrefEnabled("layout.css.anchor-positioning.enabled")) {
1346113461 invalid_values : [ "foo" , "none none" , "span-y-start self-block-end" ] ,
1346213462 } ;
1346313463
13464- gCSSProperties [ "position-try-order" ] = {
13465- domProp : "positionTryOrder" ,
13466- inherited : false ,
13467- type : CSS_TYPE_LONGHAND ,
13468- initial_values : [ "normal" ] ,
13469- other_values : [
13470- "most-width" ,
13471- "most-height" ,
13472- "most-block-size" ,
13473- "most-inline-size" ,
13474- ] ,
13475- invalid_values : [ "auto" , "none" , "foo" ] ,
13476- } ;
13464+ const tryOrderEnabled = IsCSSPropertyPrefEnabled (
13465+ "layout.css.anchor-positioning.position-try-order.enabled"
13466+ ) ;
13467+ if ( tryOrderEnabled ) {
13468+ gCSSProperties [ "position-try-order" ] = {
13469+ domProp : "positionTryOrder" ,
13470+ inherited : false ,
13471+ type : CSS_TYPE_LONGHAND ,
13472+ initial_values : [ "normal" ] ,
13473+ other_values : [
13474+ "most-width" ,
13475+ "most-height" ,
13476+ "most-block-size" ,
13477+ "most-inline-size" ,
13478+ ] ,
13479+ invalid_values : [ "auto" , "none" , "foo" ] ,
13480+ } ;
13481+ }
1347713482
1347813483 gCSSProperties [ "position-visibility" ] = {
1347913484 domProp : "positionVisibility" ,
@@ -13493,7 +13498,7 @@ if (IsCSSPropertyPrefEnabled("layout.css.anchor-positioning.enabled")) {
1349313498 domProp : "positionTry" ,
1349413499 inherited : false ,
1349513500 type : CSS_TYPE_TRUE_SHORTHAND ,
13496- subproperties : [ "position-try-order" , "position-try- fallbacks"] ,
13501+ subproperties : [ "position-try-fallbacks" ] ,
1349713502 initial_values : [ "none" ] ,
1349813503 other_values : [
1349913504 "--foo" ,
@@ -13508,61 +13513,70 @@ if (IsCSSPropertyPrefEnabled("layout.css.anchor-positioning.enabled")) {
1350813513 "span-all self-block-end" ,
1350913514 "end span-start" ,
1351013515 "center span-all" ,
13511- "most-width --foo" ,
13512- "most-width flip-block" ,
13513- "most-width flip-inline" ,
13514- "most-width flip-x" ,
13515- "most-width flip-y" ,
13516- "most-width flip-start" ,
13517- "most-width left" ,
13518- "most-width span-y-start" ,
13519- "most-width span-block-start inline-end" ,
13520- "most-width span-all self-block-end" ,
13521- "most-width end span-start" ,
13522- "most-width center span-all" ,
13523- "most-height --foo" ,
13524- "most-height flip-block" ,
13525- "most-height flip-inline" ,
13526- "most-height flip-x" ,
13527- "most-height flip-y" ,
13528- "most-height flip-start" ,
13529- "most-height left" ,
13530- "most-height span-y-start" ,
13531- "most-height span-block-start inline-end" ,
13532- "most-height span-all self-block-end" ,
13533- "most-height end span-start" ,
13534- "most-height center span-all" ,
13535- "most-block-size --foo" ,
13536- "most-block-size flip-block" ,
13537- "most-block-size flip-inline" ,
13538- "most-block-size flip-x" ,
13539- "most-block-size flip-y" ,
13540- "most-block-size flip-start" ,
13541- "most-block-size left" ,
13542- "most-block-size span-y-start" ,
13543- "most-block-size span-block-start inline-end" ,
13544- "most-block-size span-all self-block-end" ,
13545- "most-block-size end span-start" ,
13546- "most-block-size center span-all" ,
13547- "most-inline-size --foo" ,
13548- "most-inline-size flip-block" ,
13549- "most-inline-size flip-inline" ,
13550- "most-inline-size flip-x" ,
13551- "most-inline-size flip-y" ,
13552- "most-inline-size flip-start" ,
13553- "most-inline-size left" ,
13554- "most-inline-size span-y-start" ,
13555- "most-inline-size span-block-start inline-end" ,
13556- "most-inline-size span-all self-block-end" ,
13557- "most-inline-size end span-start" ,
13558- "most-inline-size center span-all" ,
1355913516 ] ,
1356013517 invalid_values : [
1356113518 "foo" ,
1356213519 "--foo none none" ,
1356313520 "--foo span-y-start self-block-end" ,
1356413521 ] ,
1356513522 } ;
13523+ if ( tryOrderEnabled ) {
13524+ gCSSProperties [ "position-try" ] . subproperties . push ( "position-try-order" ) ;
13525+ }
13526+ const positionTryValuesWithOrder = [
13527+ "most-width --foo" ,
13528+ "most-width flip-block" ,
13529+ "most-width flip-inline" ,
13530+ "most-width flip-x" ,
13531+ "most-width flip-y" ,
13532+ "most-width flip-start" ,
13533+ "most-width left" ,
13534+ "most-width span-y-start" ,
13535+ "most-width span-block-start inline-end" ,
13536+ "most-width span-all self-block-end" ,
13537+ "most-width end span-start" ,
13538+ "most-width center span-all" ,
13539+ "most-height --foo" ,
13540+ "most-height flip-block" ,
13541+ "most-height flip-inline" ,
13542+ "most-height flip-x" ,
13543+ "most-height flip-y" ,
13544+ "most-height flip-start" ,
13545+ "most-height left" ,
13546+ "most-height span-y-start" ,
13547+ "most-height span-block-start inline-end" ,
13548+ "most-height span-all self-block-end" ,
13549+ "most-height end span-start" ,
13550+ "most-height center span-all" ,
13551+ "most-block-size --foo" ,
13552+ "most-block-size flip-block" ,
13553+ "most-block-size flip-inline" ,
13554+ "most-block-size flip-x" ,
13555+ "most-block-size flip-y" ,
13556+ "most-block-size flip-start" ,
13557+ "most-block-size left" ,
13558+ "most-block-size span-y-start" ,
13559+ "most-block-size span-block-start inline-end" ,
13560+ "most-block-size span-all self-block-end" ,
13561+ "most-block-size end span-start" ,
13562+ "most-block-size center span-all" ,
13563+ "most-inline-size --foo" ,
13564+ "most-inline-size flip-block" ,
13565+ "most-inline-size flip-inline" ,
13566+ "most-inline-size flip-x" ,
13567+ "most-inline-size flip-y" ,
13568+ "most-inline-size flip-start" ,
13569+ "most-inline-size left" ,
13570+ "most-inline-size span-y-start" ,
13571+ "most-inline-size span-block-start inline-end" ,
13572+ "most-inline-size span-all self-block-end" ,
13573+ "most-inline-size end span-start" ,
13574+ "most-inline-size center span-all" ,
13575+ ] ;
13576+ ( tryOrderEnabled
13577+ ? gCSSProperties [ "position-try" ] . other_values
13578+ : gCSSProperties [ "position-try" ] . invalid_values
13579+ ) . push ( ...positionTryValuesWithOrder ) ;
1356613580}
1356713581
1356813582if ( IsCSSPropertyPrefEnabled ( "layout.css.scroll-state.enabled" ) ) {
0 commit comments