diff --git a/gentest/gentest.js b/gentest/gentest.js index 3189c16231..3d63c622a0 100755 --- a/gentest/gentest.js +++ b/gentest/gentest.js @@ -61,9 +61,9 @@ function printTest(e, ext, LTRContainer, RTLContainer, genericContainer) { ]); e.emitPrologue(); - const LTRLayoutTree = calculateTree(LTRContainer); - const RTLLayoutTree = calculateTree(RTLContainer); - const genericLayoutTree = calculateTree(genericContainer); + const LTRLayoutTree = calculateTree(LTRContainer, 0, 0); + const RTLLayoutTree = calculateTree(RTLContainer, 0, 0); + const genericLayoutTree = calculateTree(genericContainer, 0, 0); for (let i = 0; i < genericLayoutTree.length; i++) { e.emitTestPrologue( @@ -679,18 +679,19 @@ function getRoundedSize(node) { }; } -function calculateTree(root) { +function calculateTree(root, parentOffsetLeft, parentOffsetTop) { const rootLayout = []; for (let i = 0; i < root.children.length; i++) { const child = root.children[i]; + const boundingRect = child.getBoundingClientRect(); const layout = { name: child.id !== '' ? child.id : 'INSERT_NAME_HERE', - left: child.offsetLeft + child.parentNode.clientLeft, - top: child.offsetTop + child.parentNode.clientTop, + left: Math.round(boundingRect.left - parentOffsetLeft), + top: Math.round(boundingRect.top - parentOffsetTop), width: child.offsetWidth, height: child.offsetHeight, - children: calculateTree(child), + children: calculateTree(child, boundingRect.left, boundingRect.top), style: getYogaStyle(child), declaredStyle: child.style, rawStyle: child.getAttribute('style'), diff --git a/java/tests/com/facebook/yoga/YGStaticPositionTest.java b/java/tests/com/facebook/yoga/YGStaticPositionTest.java index e3be0f04e1..3cc2f5459e 100644 --- a/java/tests/com/facebook/yoga/YGStaticPositionTest.java +++ b/java/tests/com/facebook/yoga/YGStaticPositionTest.java @@ -155,7 +155,7 @@ public void test_static_position_absolute_child_insets_relative_to_positioned_an assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(-50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -178,7 +178,7 @@ public void test_static_position_absolute_child_insets_relative_to_positioned_an assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(-50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -248,22 +248,22 @@ public void test_static_position_absolute_child_insets_relative_to_positioned_an assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(200f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(300f, root_child0_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(100f, root_child0_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(400f, root_child0_child0_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(-350f, root_child0_child0_child0_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -286,22 +286,22 @@ public void test_static_position_absolute_child_insets_relative_to_positioned_an assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(100f, root_child0_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(100f, root_child0_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(-50f, root_child0_child0_child0_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -373,7 +373,7 @@ public void test_static_position_absolute_child_width_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -445,7 +445,7 @@ public void test_static_position_relative_child_width_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -516,7 +516,7 @@ public void test_static_position_static_child_width_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -588,7 +588,7 @@ public void test_static_position_absolute_child_height_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -660,7 +660,7 @@ public void test_static_position_relative_child_height_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -731,7 +731,7 @@ public void test_static_position_static_child_height_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -804,7 +804,7 @@ public void test_static_position_absolute_child_left_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -877,7 +877,7 @@ public void test_static_position_relative_child_left_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(200f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -949,7 +949,7 @@ public void test_static_position_static_child_left_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -1022,7 +1022,7 @@ public void test_static_position_absolute_child_right_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(-50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -1095,7 +1095,7 @@ public void test_static_position_relative_child_right_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -1167,7 +1167,7 @@ public void test_static_position_static_child_right_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -1240,7 +1240,7 @@ public void test_static_position_absolute_child_top_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -1313,7 +1313,7 @@ public void test_static_position_relative_child_top_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -1385,7 +1385,7 @@ public void test_static_position_static_child_top_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -1458,7 +1458,7 @@ public void test_static_position_absolute_child_bottom_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -1531,7 +1531,7 @@ public void test_static_position_relative_child_bottom_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(-50f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -1603,7 +1603,7 @@ public void test_static_position_static_child_bottom_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -1679,7 +1679,7 @@ public void test_static_position_absolute_child_margin_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(-50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -1755,7 +1755,7 @@ public void test_static_position_relative_child_margin_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -1830,7 +1830,7 @@ public void test_static_position_static_child_margin_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -1906,7 +1906,7 @@ public void test_static_position_absolute_child_padding_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(-100f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(200f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(200f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -1982,7 +1982,7 @@ public void test_static_position_relative_child_padding_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -2057,7 +2057,7 @@ public void test_static_position_static_child_padding_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -2129,7 +2129,7 @@ public void test_static_position_absolute_child_border_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -2201,7 +2201,7 @@ public void test_static_position_relative_child_border_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -2272,7 +2272,7 @@ public void test_static_position_static_child_border_percentage() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -2325,8 +2325,8 @@ public void test_static_position_absolute_child_containing_block_padding_box() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(200f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -2348,8 +2348,8 @@ public void test_static_position_absolute_child_containing_block_padding_box() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(-100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(200f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); } @@ -2401,8 +2401,8 @@ public void test_static_position_relative_child_containing_block_padding_box() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -2424,8 +2424,8 @@ public void test_static_position_relative_child_containing_block_padding_box() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(250f, root_child0_child0_child0.getLayoutX(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); } @@ -2476,8 +2476,8 @@ public void test_static_position_static_child_containing_block_padding_box() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); @@ -2499,8 +2499,8 @@ public void test_static_position_static_child_containing_block_padding_box() { assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(250f, root_child0_child0_child0.getLayoutX(), 0.0f); - assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); } diff --git a/javascript/tests/generated/YGStaticPositionTest.test.ts b/javascript/tests/generated/YGStaticPositionTest.test.ts index 8686e2831a..5cd3eb62d4 100644 --- a/javascript/tests/generated/YGStaticPositionTest.test.ts +++ b/javascript/tests/generated/YGStaticPositionTest.test.ts @@ -165,7 +165,7 @@ test.skip('static_position_absolute_child_insets_relative_to_positioned_ancestor expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0.getComputedLeft()).toBe(-50); expect(root_child0_child0_child0.getComputedTop()).toBe(50); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -187,7 +187,7 @@ test.skip('static_position_absolute_child_insets_relative_to_positioned_ancestor expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0.getComputedLeft()).toBe(-50); expect(root_child0_child0_child0.getComputedTop()).toBe(50); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -263,22 +263,22 @@ test.skip('static_position_absolute_child_insets_relative_to_positioned_ancestor expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(200); + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0_child0.getComputedLeft()).toBe(300); + expect(root_child0_child0_child0_child0.getComputedLeft()).toBe(100); expect(root_child0_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0_child0_child0.getComputedLeft()).toBe(400); + expect(root_child0_child0_child0_child0_child0.getComputedLeft()).toBe(100); expect(root_child0_child0_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0_child0_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0_child0_child0_child0.getComputedLeft()).toBe(-350); expect(root_child0_child0_child0_child0_child0_child0.getComputedTop()).toBe(50); expect(root_child0_child0_child0_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0_child0_child0_child0.getComputedHeight()).toBe(50); @@ -300,22 +300,22 @@ test.skip('static_position_absolute_child_insets_relative_to_positioned_ancestor expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0_child0.getComputedLeft()).toBe(0); expect(root_child0_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0_child0_child0.getComputedLeft()).toBe(0); expect(root_child0_child0_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0_child0_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0_child0_child0_child0.getComputedLeft()).toBe(-50); expect(root_child0_child0_child0_child0_child0_child0.getComputedTop()).toBe(50); expect(root_child0_child0_child0_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0_child0_child0_child0.getComputedHeight()).toBe(50); @@ -392,7 +392,7 @@ test.skip('static_position_absolute_child_width_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -469,7 +469,7 @@ test.skip('static_position_relative_child_width_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -545,7 +545,7 @@ test.skip('static_position_static_child_width_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -622,7 +622,7 @@ test.skip('static_position_absolute_child_height_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(100); @@ -699,7 +699,7 @@ test.skip('static_position_relative_child_height_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -775,7 +775,7 @@ test.skip('static_position_static_child_height_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -853,7 +853,7 @@ test.skip('static_position_absolute_child_left_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -931,7 +931,7 @@ test.skip('static_position_relative_child_left_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(200); + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -1008,7 +1008,7 @@ test.skip('static_position_static_child_left_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -1086,7 +1086,7 @@ test.skip('static_position_absolute_child_right_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0.getComputedLeft()).toBe(-50); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -1164,7 +1164,7 @@ test.skip('static_position_relative_child_right_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -1241,7 +1241,7 @@ test.skip('static_position_static_child_right_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -1319,7 +1319,7 @@ test.skip('static_position_absolute_child_top_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(100); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -1397,7 +1397,7 @@ test.skip('static_position_relative_child_top_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(50); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -1474,7 +1474,7 @@ test.skip('static_position_static_child_top_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -1552,7 +1552,7 @@ test.skip('static_position_absolute_child_bottom_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(50); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -1630,7 +1630,7 @@ test.skip('static_position_relative_child_bottom_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(-50); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -1707,7 +1707,7 @@ test.skip('static_position_static_child_bottom_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -1788,7 +1788,7 @@ test.skip('static_position_absolute_child_margin_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0.getComputedLeft()).toBe(-50); expect(root_child0_child0_child0.getComputedTop()).toBe(100); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -1869,7 +1869,7 @@ test.skip('static_position_relative_child_margin_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); expect(root_child0_child0_child0.getComputedTop()).toBe(50); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -1949,7 +1949,7 @@ test.skip('static_position_static_child_margin_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); expect(root_child0_child0_child0.getComputedTop()).toBe(50); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -2030,7 +2030,7 @@ test.skip('static_position_absolute_child_padding_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedLeft()).toBe(-100); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(200); expect(root_child0_child0_child0.getComputedHeight()).toBe(200); @@ -2111,7 +2111,7 @@ test.skip('static_position_relative_child_padding_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0_child0.getComputedHeight()).toBe(100); @@ -2191,7 +2191,7 @@ test.skip('static_position_static_child_padding_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0_child0.getComputedHeight()).toBe(100); @@ -2268,7 +2268,7 @@ test.skip('static_position_absolute_child_border_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -2345,7 +2345,7 @@ test.skip('static_position_relative_child_border_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -2421,7 +2421,7 @@ test.skip('static_position_static_child_border_percentage', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -2480,8 +2480,8 @@ test.skip('static_position_absolute_child_containing_block_padding_box', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(100); - expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(200); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -2502,8 +2502,8 @@ test.skip('static_position_absolute_child_containing_block_padding_box', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(100); - expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedLeft()).toBe(-100); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(200); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); } finally { @@ -2561,8 +2561,8 @@ test.skip('static_position_relative_child_containing_block_padding_box', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(100); - expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -2583,8 +2583,8 @@ test.skip('static_position_relative_child_containing_block_padding_box', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(250); - expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); } finally { @@ -2641,8 +2641,8 @@ test.skip('static_position_static_child_containing_block_padding_box', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(100); - expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); @@ -2663,8 +2663,8 @@ test.skip('static_position_static_child_containing_block_padding_box', () => { expect(root_child0_child0.getComputedWidth()).toBe(100); expect(root_child0_child0.getComputedHeight()).toBe(100); - expect(root_child0_child0_child0.getComputedLeft()).toBe(250); - expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child0.getComputedWidth()).toBe(50); expect(root_child0_child0_child0.getComputedHeight()).toBe(50); } finally { diff --git a/tests/generated/YGStaticPositionTest.cpp b/tests/generated/YGStaticPositionTest.cpp index 8867cfd15c..21094c9908 100644 --- a/tests/generated/YGStaticPositionTest.cpp +++ b/tests/generated/YGStaticPositionTest.cpp @@ -144,7 +144,7 @@ TEST(YogaTest, static_position_absolute_child_insets_relative_to_positioned_ance ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(-50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -166,7 +166,7 @@ TEST(YogaTest, static_position_absolute_child_insets_relative_to_positioned_ance ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(-50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -239,22 +239,22 @@ TEST(YogaTest, static_position_absolute_child_insets_relative_to_positioned_ance ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(200, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0)); - ASSERT_FLOAT_EQ(300, YGNodeLayoutGetLeft(root_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0_child0)); - ASSERT_FLOAT_EQ(400, YGNodeLayoutGetLeft(root_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0_child0_child0)); - ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(-350, YGNodeLayoutGetLeft(root_child0_child0_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0_child0_child0_child0)); @@ -276,22 +276,22 @@ TEST(YogaTest, static_position_absolute_child_insets_relative_to_positioned_ance ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0_child0_child0)); - ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(-50, YGNodeLayoutGetLeft(root_child0_child0_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0_child0_child0_child0)); @@ -365,7 +365,7 @@ TEST(YogaTest, static_position_absolute_child_width_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -439,7 +439,7 @@ TEST(YogaTest, static_position_relative_child_width_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -512,7 +512,7 @@ TEST(YogaTest, static_position_static_child_width_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -586,7 +586,7 @@ TEST(YogaTest, static_position_absolute_child_height_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -660,7 +660,7 @@ TEST(YogaTest, static_position_relative_child_height_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -733,7 +733,7 @@ TEST(YogaTest, static_position_static_child_height_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -808,7 +808,7 @@ TEST(YogaTest, static_position_absolute_child_left_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -883,7 +883,7 @@ TEST(YogaTest, static_position_relative_child_left_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(200, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -957,7 +957,7 @@ TEST(YogaTest, static_position_static_child_left_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -1032,7 +1032,7 @@ TEST(YogaTest, static_position_absolute_child_right_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(-50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -1107,7 +1107,7 @@ TEST(YogaTest, static_position_relative_child_right_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -1181,7 +1181,7 @@ TEST(YogaTest, static_position_static_child_right_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -1256,7 +1256,7 @@ TEST(YogaTest, static_position_absolute_child_top_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -1331,7 +1331,7 @@ TEST(YogaTest, static_position_relative_child_top_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -1405,7 +1405,7 @@ TEST(YogaTest, static_position_static_child_top_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -1480,7 +1480,7 @@ TEST(YogaTest, static_position_absolute_child_bottom_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -1555,7 +1555,7 @@ TEST(YogaTest, static_position_relative_child_bottom_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(-50, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -1629,7 +1629,7 @@ TEST(YogaTest, static_position_static_child_bottom_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -1707,7 +1707,7 @@ TEST(YogaTest, static_position_absolute_child_margin_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(-50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -1785,7 +1785,7 @@ TEST(YogaTest, static_position_relative_child_margin_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -1862,7 +1862,7 @@ TEST(YogaTest, static_position_static_child_margin_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -1940,7 +1940,7 @@ TEST(YogaTest, static_position_absolute_child_padding_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(-100, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -2018,7 +2018,7 @@ TEST(YogaTest, static_position_relative_child_padding_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -2095,7 +2095,7 @@ TEST(YogaTest, static_position_static_child_padding_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -2169,7 +2169,7 @@ TEST(YogaTest, static_position_absolute_child_border_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -2243,7 +2243,7 @@ TEST(YogaTest, static_position_relative_child_border_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -2316,7 +2316,7 @@ TEST(YogaTest, static_position_static_child_border_percentage) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -2372,8 +2372,8 @@ TEST(YogaTest, static_position_absolute_child_containing_block_padding_box) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -2394,8 +2394,8 @@ TEST(YogaTest, static_position_absolute_child_containing_block_padding_box) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(-100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -2450,8 +2450,8 @@ TEST(YogaTest, static_position_relative_child_containing_block_padding_box) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -2472,8 +2472,8 @@ TEST(YogaTest, static_position_relative_child_containing_block_padding_box) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(250, YGNodeLayoutGetLeft(root_child0_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -2527,8 +2527,8 @@ TEST(YogaTest, static_position_static_child_containing_block_padding_box) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); @@ -2549,8 +2549,8 @@ TEST(YogaTest, static_position_static_child_containing_block_padding_box) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(250, YGNodeLayoutGetLeft(root_child0_child0_child0)); - ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0));