8686 # Absolute nodes will resolve percentages against the inner size of
8787 # their containing node, not the padding box
8888 ("AbsolutePercentAgainstInnerSize" , 1 << 2 ),
89+ # Treat main-axis `min-{width,height}: undefined` as "no floor"
90+ # instead of the CSS §4.5 automatic minimum (which derives a
91+ # content-based floor from the item's min-content size). Set by
92+ # default on new configs to preserve pre-§4.5 Yoga shrink behavior.
93+ # Clear this bit to opt into the spec-correct CSS §4.5 floor.
94+ ("MinSizeUndefinedInsteadOfAuto" , 1 << 3 ),
8995 # Enable all incorrect behavior (preserve compatibility)
9096 ("All" , 0x7FFFFFFF ),
9197 # Enable all errata except for "StretchFlexBasis" (Defaults behavior
95101}
96102
97103# Temporary filter enums to not upgrade all enums at once
98- KOTLIN_ENUM_NAMES = {"Direction" }
104+ KOTLIN_ENUM_NAMES = {
105+ "Direction" ,
106+ "Align" ,
107+ "BoxSizing" ,
108+ "Dimension" ,
109+ "Display" ,
110+ "Edge" ,
111+ "Errata" ,
112+ "ExperimentalFeature" ,
113+ "FlexDirection" ,
114+ "GridTrackType" ,
115+ "Gutter" ,
116+ "Justify" ,
117+ "LogLevel" ,
118+ "MeasureMode" ,
119+ "NodeType" ,
120+ "Overflow" ,
121+ "PositionType" ,
122+ "Unit" ,
123+ "Wrap" ,
124+ }
99125
100126ENUMS_KOTLIN = {name : ENUMS [name ] for name in KOTLIN_ENUM_NAMES }
101127ENUMS_JAVA = {
@@ -294,6 +320,9 @@ def to_hyphenated_lower(symbol):
294320 with open (root + "/java/com/facebook/yoga/Yoga%s.kt" % name , "w" ) as f :
295321 f .write (get_license ("kotlin" ))
296322 f .write ("package com.facebook.yoga\n \n " )
323+ if name in DO_NOT_STRIP :
324+ f .write ("import com.facebook.yoga.annotations.DoNotStrip\n \n " )
325+ f .write ("@DoNotStrip\n " )
297326 f .write ("public enum class Yoga%s(public val intValue: Int) {\n " % name )
298327 if len (values ) > 0 :
299328 for value in values :
@@ -311,6 +340,8 @@ def to_hyphenated_lower(symbol):
311340 f .write (" public fun intValue(): Int = intValue\n " )
312341 f .write ("\n " )
313342 f .write (" public companion object {\n " )
343+ if name in DO_NOT_STRIP :
344+ f .write (" @DoNotStrip\n " )
314345 f .write (" @JvmStatic\n " )
315346 f .write (" public fun fromInt(value: Int): Yoga%s =\n " % name )
316347 f .write (" when (value) {\n " )
0 commit comments