diff --git a/tests/YGStyleTest.cpp b/tests/YGStyleTest.cpp index afeb0d3f75..d730801985 100644 --- a/tests/YGStyleTest.cpp +++ b/tests/YGStyleTest.cpp @@ -51,6 +51,18 @@ TEST(YogaTest, copy_style_modified_same) { YGNodeFree(node1); } +TEST(YogaTest, copy_style_box_sizing) { + YGNodeRef node0 = YGNodeNew(); + YGNodeRef node1 = YGNodeNew(); + YGNodeStyleSetBoxSizing(node1, YGBoxSizingContentBox); + + YGNodeCopyStyle(node0, node1); + ASSERT_EQ(YGBoxSizingContentBox, YGNodeStyleGetBoxSizing(node0)); + + YGNodeFree(node0); + YGNodeFree(node1); +} + TEST(YogaTest, initialise_flexShrink_flexGrow) { YGNodeRef node0 = YGNodeNew(); YGNodeStyleSetFlexShrink(node0, 1); diff --git a/yoga/style/Style.h b/yoga/style/Style.h index 00af38c692..a25d3a28eb 100644 --- a/yoga/style/Style.h +++ b/yoga/style/Style.h @@ -653,6 +653,7 @@ class YG_EXPORT Style { alignItems_ == other.alignItems_ && alignSelf_ == other.alignSelf_ && positionType_ == other.positionType_ && flexWrap_ == other.flexWrap_ && overflow_ == other.overflow_ && display_ == other.display_ && + boxSizing_ == other.boxSizing_ && numbersEqual(flex_, pool_, other.flex_, other.pool_) && numbersEqual(flexGrow_, pool_, other.flexGrow_, other.pool_) && numbersEqual(flexShrink_, pool_, other.flexShrink_, other.pool_) &&