File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
ReactAndroid/src/main/java/com/facebook/react/views/text
ReactCommon/react/renderer/attributedstring Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ public class TextAttributeProps {
59
59
public static final short TA_KEY_ACCESSIBILITY_ROLE = 24 ;
60
60
public static final short TA_KEY_LINE_BREAK_STRATEGY = 25 ;
61
61
public static final short TA_KEY_ROLE = 26 ;
62
+ public static final short TA_KEY_TEXT_TRANSFORM = 27 ;
62
63
63
64
public static final int UNSET = -1 ;
64
65
@@ -217,14 +218,16 @@ public static TextAttributeProps fromMapBuffer(MapBuffer props) {
217
218
case TA_KEY_ROLE :
218
219
result .setRole (Role .values ()[entry .getIntValue ()]);
219
220
break ;
221
+ case TA_KEY_TEXT_TRANSFORM :
222
+ result .setTextTransform (entry .getStringValue ());
223
+ break ;
220
224
}
221
225
}
222
226
223
227
// TODO T83483191: Review why the following props are not serialized:
224
228
// setNumberOfLines
225
229
// setColor
226
230
// setIncludeFontPadding
227
- // setTextTransform
228
231
return result ;
229
232
}
230
233
Original file line number Diff line number Diff line change @@ -970,6 +970,7 @@ constexpr static MapBuffer::Key TA_KEY_LAYOUT_DIRECTION = 23;
970
970
constexpr static MapBuffer::Key TA_KEY_ACCESSIBILITY_ROLE = 24 ;
971
971
constexpr static MapBuffer::Key TA_KEY_LINE_BREAK_STRATEGY = 25 ;
972
972
constexpr static MapBuffer::Key TA_KEY_ROLE = 26 ;
973
+ constexpr static MapBuffer::Key TA_KEY_TEXT_TRANSFORM = 27 ;
973
974
974
975
// constants for ParagraphAttributes serialization
975
976
constexpr static MapBuffer::Key PA_KEY_MAX_NUMBER_OF_LINES = 0 ;
@@ -1077,6 +1078,11 @@ inline MapBuffer toMapBuffer(const TextAttributes& textAttributes) {
1077
1078
TA_KEY_LINE_BREAK_STRATEGY,
1078
1079
toString (*textAttributes.lineBreakStrategy ));
1079
1080
}
1081
+ if (textAttributes.textTransform .has_value ()) {
1082
+ builder.putString (
1083
+ TA_KEY_TEXT_TRANSFORM, toString (*textAttributes.textTransform ));
1084
+ }
1085
+
1080
1086
// Decoration
1081
1087
if (textAttributes.textDecorationColor ) {
1082
1088
builder.putInt (
You can’t perform that action at this time.
0 commit comments