Implement textTransform prop

Summary:
Added to C++ props, but realized this is already implemented using C++ state in Android, so added to C++ state to keep this diff simpler. Keeping the C++ props change for future use.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D29805267

fbshipit-source-id: c1fe2dc34af8bc69352ee48a5d60ba998194e3f7
This commit is contained in:
Cody Unger
2021-07-21 16:27:55 -07:00
committed by Facebook GitHub Bot
parent 998cadd523
commit e1d17c785b
5 changed files with 81 additions and 2 deletions
@@ -50,6 +50,9 @@ void TextAttributes::apply(TextAttributes textAttributes) {
letterSpacing = !std::isnan(textAttributes.letterSpacing)
? textAttributes.letterSpacing
: letterSpacing;
textTransform = textAttributes.textTransform.hasValue()
? textAttributes.textTransform
: textTransform;
// Paragraph Styles
lineHeight = !std::isnan(textAttributes.lineHeight)
@@ -120,7 +123,8 @@ bool TextAttributes::operator==(const TextAttributes &rhs) const {
textShadowColor,
isHighlighted,
layoutDirection,
accessibilityRole) ==
accessibilityRole,
textTransform) ==
std::tie(
rhs.foregroundColor,
rhs.backgroundColor,
@@ -139,7 +143,8 @@ bool TextAttributes::operator==(const TextAttributes &rhs) const {
rhs.textShadowColor,
rhs.isHighlighted,
rhs.layoutDirection,
rhs.accessibilityRole) &&
rhs.accessibilityRole,
rhs.textTransform) &&
floatEquality(opacity, rhs.opacity) &&
floatEquality(fontSize, rhs.fontSize) &&
floatEquality(fontSizeMultiplier, rhs.fontSizeMultiplier) &&