From 3be2816aecaa8724619864261f83fec0af0a60bb Mon Sep 17 00:00:00 2001 From: David Vacca Date: Sun, 25 Nov 2018 17:18:12 -0800 Subject: [PATCH] Remove max and min font size from serialization of text attribute Summary: Removing two props that are not currently used They are being set as quiet_NaN in C++ and this brings problems in the Android side Reviewed By: shergin Differential Revision: D13188600 fbshipit-source-id: e8412497a80300cfbc3770b829e9633206aaf427 --- ReactCommon/fabric/attributedstring/conversions.h | 2 -- .../fabric/attributedstring/tests/ParagraphAttributesTest.cpp | 4 ---- 2 files changed, 6 deletions(-) diff --git a/ReactCommon/fabric/attributedstring/conversions.h b/ReactCommon/fabric/attributedstring/conversions.h index fd531cef4e3..fb54e8f4198 100644 --- a/ReactCommon/fabric/attributedstring/conversions.h +++ b/ReactCommon/fabric/attributedstring/conversions.h @@ -381,8 +381,6 @@ inline folly::dynamic toDynamic( values("maximumNumberOfLines", paragraphAttributes.maximumNumberOfLines); values("ellipsizeMode", toString(paragraphAttributes.ellipsizeMode)); values("adjustsFontSizeToFit", paragraphAttributes.adjustsFontSizeToFit); - values("minimumFontSize", paragraphAttributes.minimumFontSize); - values("maximumFontSize", paragraphAttributes.maximumFontSize); return values; } diff --git a/ReactCommon/fabric/attributedstring/tests/ParagraphAttributesTest.cpp b/ReactCommon/fabric/attributedstring/tests/ParagraphAttributesTest.cpp index ca0d6a3b6a3..f2ba374ef13 100644 --- a/ReactCommon/fabric/attributedstring/tests/ParagraphAttributesTest.cpp +++ b/ReactCommon/fabric/attributedstring/tests/ParagraphAttributesTest.cpp @@ -21,8 +21,6 @@ TEST(ParagraphAttributesTest, testToDynamic) { paragraphAttributes.maximumNumberOfLines = 2; paragraphAttributes.adjustsFontSizeToFit = false; paragraphAttributes.ellipsizeMode = EllipsizeMode::Middle; - paragraphAttributes.minimumFontSize = 10; - paragraphAttributes.maximumFontSize = 20; auto result = toDynamic(paragraphAttributes); assert( @@ -33,8 +31,6 @@ TEST(ParagraphAttributesTest, testToDynamic) { paragraphAttributes.adjustsFontSizeToFit); assert( result["ellipsizeMode"] == toString(paragraphAttributes.ellipsizeMode)); - assert(result["minimumFontSize"] == paragraphAttributes.minimumFontSize); - assert(result["maximumFontSize"] == paragraphAttributes.maximumFontSize); } } // namespace react