mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
998cadd523
commit
e1d17c785b
@@ -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) &&
|
||||
|
||||
Reference in New Issue
Block a user