Fix flex-end/flex-start RTL transpilation
Summary: Oops, when regexing start->left/right end->left/right I did not take into account flex-start and flex-end. Easiest solution is to regex back flex-left and flex-right into their correct values. Reviewed By: lucasr Differential Revision: D3930244 fbshipit-source-id: 20742cbc8e5f23af694e14584c7c3df89526876e
This commit is contained in:
committed by
Facebook Github Bot 4
parent
9c93c7fc42
commit
6b16dc4060
@@ -72,6 +72,7 @@ TEST(CSSLayoutTest, align_self_flex_end) {
|
||||
CSSNodeStyleSetHeight(root, 100);
|
||||
|
||||
const CSSNodeRef root_child0 = CSSNodeNew();
|
||||
CSSNodeStyleSetAlignSelf(root_child0, CSSAlignFlexEnd);
|
||||
CSSNodeStyleSetWidth(root_child0, 10);
|
||||
CSSNodeStyleSetHeight(root_child0, 10);
|
||||
CSSNodeInsertChild(root, root_child0, 0);
|
||||
@@ -82,7 +83,7 @@ TEST(CSSLayoutTest, align_self_flex_end) {
|
||||
ASSERT_EQ(100, CSSNodeLayoutGetWidth(root));
|
||||
ASSERT_EQ(100, CSSNodeLayoutGetHeight(root));
|
||||
|
||||
ASSERT_EQ(0, CSSNodeLayoutGetLeft(root_child0));
|
||||
ASSERT_EQ(90, CSSNodeLayoutGetLeft(root_child0));
|
||||
ASSERT_EQ(0, CSSNodeLayoutGetTop(root_child0));
|
||||
ASSERT_EQ(10, CSSNodeLayoutGetWidth(root_child0));
|
||||
ASSERT_EQ(10, CSSNodeLayoutGetHeight(root_child0));
|
||||
@@ -94,7 +95,7 @@ TEST(CSSLayoutTest, align_self_flex_end) {
|
||||
ASSERT_EQ(100, CSSNodeLayoutGetWidth(root));
|
||||
ASSERT_EQ(100, CSSNodeLayoutGetHeight(root));
|
||||
|
||||
ASSERT_EQ(90, CSSNodeLayoutGetLeft(root_child0));
|
||||
ASSERT_EQ(0, CSSNodeLayoutGetLeft(root_child0));
|
||||
ASSERT_EQ(0, CSSNodeLayoutGetTop(root_child0));
|
||||
ASSERT_EQ(10, CSSNodeLayoutGetWidth(root_child0));
|
||||
ASSERT_EQ(10, CSSNodeLayoutGetHeight(root_child0));
|
||||
@@ -106,6 +107,7 @@ TEST(CSSLayoutTest, align_self_flex_start) {
|
||||
CSSNodeStyleSetHeight(root, 100);
|
||||
|
||||
const CSSNodeRef root_child0 = CSSNodeNew();
|
||||
CSSNodeStyleSetAlignSelf(root_child0, CSSAlignFlexStart);
|
||||
CSSNodeStyleSetWidth(root_child0, 10);
|
||||
CSSNodeStyleSetHeight(root_child0, 10);
|
||||
CSSNodeInsertChild(root, root_child0, 0);
|
||||
@@ -136,10 +138,12 @@ TEST(CSSLayoutTest, align_self_flex_start) {
|
||||
|
||||
TEST(CSSLayoutTest, align_self_flex_end_override_flex_start) {
|
||||
const CSSNodeRef root = CSSNodeNew();
|
||||
CSSNodeStyleSetAlignItems(root, CSSAlignFlexStart);
|
||||
CSSNodeStyleSetWidth(root, 100);
|
||||
CSSNodeStyleSetHeight(root, 100);
|
||||
|
||||
const CSSNodeRef root_child0 = CSSNodeNew();
|
||||
CSSNodeStyleSetAlignSelf(root_child0, CSSAlignFlexEnd);
|
||||
CSSNodeStyleSetWidth(root_child0, 10);
|
||||
CSSNodeStyleSetHeight(root_child0, 10);
|
||||
CSSNodeInsertChild(root, root_child0, 0);
|
||||
@@ -150,7 +154,7 @@ TEST(CSSLayoutTest, align_self_flex_end_override_flex_start) {
|
||||
ASSERT_EQ(100, CSSNodeLayoutGetWidth(root));
|
||||
ASSERT_EQ(100, CSSNodeLayoutGetHeight(root));
|
||||
|
||||
ASSERT_EQ(0, CSSNodeLayoutGetLeft(root_child0));
|
||||
ASSERT_EQ(90, CSSNodeLayoutGetLeft(root_child0));
|
||||
ASSERT_EQ(0, CSSNodeLayoutGetTop(root_child0));
|
||||
ASSERT_EQ(10, CSSNodeLayoutGetWidth(root_child0));
|
||||
ASSERT_EQ(10, CSSNodeLayoutGetHeight(root_child0));
|
||||
@@ -162,7 +166,7 @@ TEST(CSSLayoutTest, align_self_flex_end_override_flex_start) {
|
||||
ASSERT_EQ(100, CSSNodeLayoutGetWidth(root));
|
||||
ASSERT_EQ(100, CSSNodeLayoutGetHeight(root));
|
||||
|
||||
ASSERT_EQ(90, CSSNodeLayoutGetLeft(root_child0));
|
||||
ASSERT_EQ(0, CSSNodeLayoutGetLeft(root_child0));
|
||||
ASSERT_EQ(0, CSSNodeLayoutGetTop(root_child0));
|
||||
ASSERT_EQ(10, CSSNodeLayoutGetWidth(root_child0));
|
||||
ASSERT_EQ(10, CSSNodeLayoutGetHeight(root_child0));
|
||||
|
Reference in New Issue
Block a user