Remove Style prefix in java and cs apis
Summary: The Style prefix does not make sense in the java and c# api and only a few methods had it. This diff removes the last of those. Reviewed By: splhack Differential Revision: D4232920 fbshipit-source-id: 6e2ff21bbb7e0e441892023c14df579d1bc7aa49
This commit is contained in:
committed by
Facebook Github Bot
parent
6318801470
commit
5fa42cd1b0
@@ -31,12 +31,13 @@ namespace Facebook.CSSLayout
|
||||
Spacing margin = null,
|
||||
Spacing padding = null,
|
||||
Spacing border = null,
|
||||
float? styleWidth = null,
|
||||
float? styleHeight = null,
|
||||
float? styleMaxWidth = null,
|
||||
float? styleMaxHeight = null,
|
||||
float? styleMinWidth = null,
|
||||
float? styleMinHeight = null)
|
||||
float? width = null,
|
||||
float? height = null,
|
||||
float? maxWidth = null,
|
||||
float? maxHeight = null,
|
||||
float? minWidth = null,
|
||||
float? minHeight = null,
|
||||
float? aspectRatio = null)
|
||||
{
|
||||
CSSNode node = new CSSNode();
|
||||
|
||||
@@ -197,38 +198,42 @@ namespace Facebook.CSSLayout
|
||||
}
|
||||
}
|
||||
|
||||
if (styleWidth.HasValue)
|
||||
if (width.HasValue)
|
||||
{
|
||||
node.StyleWidth = styleWidth.Value;
|
||||
node.Width = width.Value;
|
||||
}
|
||||
|
||||
if (styleHeight.HasValue)
|
||||
if (height.HasValue)
|
||||
{
|
||||
node.StyleHeight = styleHeight.Value;
|
||||
node.Height = height.Value;
|
||||
}
|
||||
|
||||
if (styleMinWidth.HasValue)
|
||||
if (minWidth.HasValue)
|
||||
{
|
||||
node.StyleMinWidth = styleMinWidth.Value;
|
||||
node.MinWidth = minWidth.Value;
|
||||
}
|
||||
|
||||
if (styleMinHeight.HasValue)
|
||||
if (minHeight.HasValue)
|
||||
{
|
||||
node.StyleMinHeight = styleMinHeight.Value;
|
||||
node.MinHeight = minHeight.Value;
|
||||
}
|
||||
|
||||
if (styleMaxWidth.HasValue)
|
||||
if (maxWidth.HasValue)
|
||||
{
|
||||
node.StyleMaxWidth = styleMaxWidth.Value;
|
||||
node.MaxWidth = maxWidth.Value;
|
||||
}
|
||||
|
||||
if (styleMaxHeight.HasValue)
|
||||
if (maxHeight.HasValue)
|
||||
{
|
||||
node.StyleMaxHeight = styleMaxHeight.Value;
|
||||
node.MaxHeight = maxHeight.Value;
|
||||
}
|
||||
|
||||
if (aspectRatio.HasValue)
|
||||
{
|
||||
node.AspectRatio = aspectRatio.Value;
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -286,7 +286,7 @@ namespace Facebook.CSSLayout
|
||||
Native.CSSNodeStyleSetPosition(_cssNode, edge, position);
|
||||
}
|
||||
|
||||
public float StyleWidth
|
||||
public float Width
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -299,7 +299,7 @@ namespace Facebook.CSSLayout
|
||||
}
|
||||
}
|
||||
|
||||
public float StyleHeight
|
||||
public float Height
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -312,7 +312,7 @@ namespace Facebook.CSSLayout
|
||||
}
|
||||
}
|
||||
|
||||
public float StyleMaxWidth
|
||||
public float MaxWidth
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -325,7 +325,7 @@ namespace Facebook.CSSLayout
|
||||
}
|
||||
}
|
||||
|
||||
public float StyleMaxHeight
|
||||
public float MaxHeight
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -338,7 +338,7 @@ namespace Facebook.CSSLayout
|
||||
}
|
||||
}
|
||||
|
||||
public float StyleMinWidth
|
||||
public float MinWidth
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -351,7 +351,7 @@ namespace Facebook.CSSLayout
|
||||
}
|
||||
}
|
||||
|
||||
public float StyleMinHeight
|
||||
public float MinHeight
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -364,7 +364,7 @@ namespace Facebook.CSSLayout
|
||||
}
|
||||
}
|
||||
|
||||
public float StyleAspectRatio
|
||||
public float AspectRatio
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@@ -21,15 +21,15 @@ namespace Facebook.CSSLayout
|
||||
public void Test_absolute_layout_width_height_start_top()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.PositionType = CSSPositionType.Absolute;
|
||||
root_child0.SetPosition(CSSEdge.Start, 10f);
|
||||
root_child0.SetPosition(CSSEdge.Top, 10f);
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -62,15 +62,15 @@ namespace Facebook.CSSLayout
|
||||
public void Test_absolute_layout_width_height_end_bottom()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.PositionType = CSSPositionType.Absolute;
|
||||
root_child0.SetPosition(CSSEdge.End, 10f);
|
||||
root_child0.SetPosition(CSSEdge.Bottom, 10f);
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -103,8 +103,8 @@ namespace Facebook.CSSLayout
|
||||
public void Test_absolute_layout_start_top_end_bottom()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.PositionType = CSSPositionType.Absolute;
|
||||
@@ -144,8 +144,8 @@ namespace Facebook.CSSLayout
|
||||
public void Test_absolute_layout_width_height_start_top_end_bottom()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.PositionType = CSSPositionType.Absolute;
|
||||
@@ -153,8 +153,8 @@ namespace Facebook.CSSLayout
|
||||
root_child0.SetPosition(CSSEdge.Top, 10f);
|
||||
root_child0.SetPosition(CSSEdge.End, 10f);
|
||||
root_child0.SetPosition(CSSEdge.Bottom, 10f);
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -189,8 +189,8 @@ namespace Facebook.CSSLayout
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.Overflow = CSSOverflow.Hidden;
|
||||
root.StyleWidth = 50f;
|
||||
root.StyleHeight = 50f;
|
||||
root.Width = 50f;
|
||||
root.Height = 50f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.PositionType = CSSPositionType.Absolute;
|
||||
@@ -199,8 +199,8 @@ namespace Facebook.CSSLayout
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child0_child0 = new CSSNode();
|
||||
root_child0_child0.StyleWidth = 100f;
|
||||
root_child0_child0.StyleHeight = 100f;
|
||||
root_child0_child0.Width = 100f;
|
||||
root_child0_child0.Height = 100f;
|
||||
root_child0.Insert(0, root_child0_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -255,23 +255,23 @@ namespace Facebook.CSSLayout
|
||||
root.SetBorder(CSSEdge.Top, 10f);
|
||||
root.SetBorder(CSSEdge.Right, 10f);
|
||||
root.SetBorder(CSSEdge.Bottom, 10f);
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.PositionType = CSSPositionType.Absolute;
|
||||
root_child0.SetPosition(CSSEdge.Left, 0f);
|
||||
root_child0.SetPosition(CSSEdge.Top, 0f);
|
||||
root_child0.StyleWidth = 50f;
|
||||
root_child0.StyleHeight = 50f;
|
||||
root_child0.Width = 50f;
|
||||
root_child0.Height = 50f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.PositionType = CSSPositionType.Absolute;
|
||||
root_child1.SetPosition(CSSEdge.Right, 0f);
|
||||
root_child1.SetPosition(CSSEdge.Bottom, 0f);
|
||||
root_child1.StyleWidth = 50f;
|
||||
root_child1.StyleHeight = 50f;
|
||||
root_child1.Width = 50f;
|
||||
root_child1.Height = 50f;
|
||||
root.Insert(1, root_child1);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
@@ -22,32 +22,32 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.Wrap = CSSWrap.Wrap;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 50f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 50f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 50f;
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Width = 50f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 50f;
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Width = 50f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
|
||||
CSSNode root_child3 = new CSSNode();
|
||||
root_child3.StyleWidth = 50f;
|
||||
root_child3.StyleHeight = 10f;
|
||||
root_child3.Width = 50f;
|
||||
root_child3.Height = 10f;
|
||||
root.Insert(3, root_child3);
|
||||
|
||||
CSSNode root_child4 = new CSSNode();
|
||||
root_child4.StyleWidth = 50f;
|
||||
root_child4.StyleHeight = 10f;
|
||||
root_child4.Width = 50f;
|
||||
root_child4.Height = 10f;
|
||||
root.Insert(4, root_child4);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -122,32 +122,32 @@ namespace Facebook.CSSLayout
|
||||
CSSNode root = new CSSNode();
|
||||
root.AlignContent = CSSAlign.FlexEnd;
|
||||
root.Wrap = CSSWrap.Wrap;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 50f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 50f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 50f;
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Width = 50f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 50f;
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Width = 50f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
|
||||
CSSNode root_child3 = new CSSNode();
|
||||
root_child3.StyleWidth = 50f;
|
||||
root_child3.StyleHeight = 10f;
|
||||
root_child3.Width = 50f;
|
||||
root_child3.Height = 10f;
|
||||
root.Insert(3, root_child3);
|
||||
|
||||
CSSNode root_child4 = new CSSNode();
|
||||
root_child4.StyleWidth = 50f;
|
||||
root_child4.StyleHeight = 10f;
|
||||
root_child4.Width = 50f;
|
||||
root_child4.Height = 10f;
|
||||
root.Insert(4, root_child4);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -222,32 +222,32 @@ namespace Facebook.CSSLayout
|
||||
CSSNode root = new CSSNode();
|
||||
root.AlignContent = CSSAlign.Center;
|
||||
root.Wrap = CSSWrap.Wrap;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 50f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 50f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 50f;
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Width = 50f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 50f;
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Width = 50f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
|
||||
CSSNode root_child3 = new CSSNode();
|
||||
root_child3.StyleWidth = 50f;
|
||||
root_child3.StyleHeight = 10f;
|
||||
root_child3.Width = 50f;
|
||||
root_child3.Height = 10f;
|
||||
root.Insert(3, root_child3);
|
||||
|
||||
CSSNode root_child4 = new CSSNode();
|
||||
root_child4.StyleWidth = 50f;
|
||||
root_child4.StyleHeight = 10f;
|
||||
root_child4.Width = 50f;
|
||||
root_child4.Height = 10f;
|
||||
root.Insert(4, root_child4);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -322,27 +322,27 @@ namespace Facebook.CSSLayout
|
||||
CSSNode root = new CSSNode();
|
||||
root.AlignContent = CSSAlign.Stretch;
|
||||
root.Wrap = CSSWrap.Wrap;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 50f;
|
||||
root_child0.Width = 50f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 50f;
|
||||
root_child1.Width = 50f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 50f;
|
||||
root_child2.Width = 50f;
|
||||
root.Insert(2, root_child2);
|
||||
|
||||
CSSNode root_child3 = new CSSNode();
|
||||
root_child3.StyleWidth = 50f;
|
||||
root_child3.Width = 50f;
|
||||
root.Insert(3, root_child3);
|
||||
|
||||
CSSNode root_child4 = new CSSNode();
|
||||
root_child4.StyleWidth = 50f;
|
||||
root_child4.Width = 50f;
|
||||
root.Insert(4, root_child4);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
@@ -21,11 +21,11 @@ namespace Facebook.CSSLayout
|
||||
public void Test_align_items_stretch()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -59,12 +59,12 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.AlignItems = CSSAlign.Center;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -98,12 +98,12 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.AlignItems = CSSAlign.FlexStart;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -137,12 +137,12 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.AlignItems = CSSAlign.FlexEnd;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
@@ -21,13 +21,13 @@ namespace Facebook.CSSLayout
|
||||
public void Test_align_self_center()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.AlignSelf = CSSAlign.Center;
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -60,13 +60,13 @@ namespace Facebook.CSSLayout
|
||||
public void Test_align_self_flex_end()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.AlignSelf = CSSAlign.FlexEnd;
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -99,13 +99,13 @@ namespace Facebook.CSSLayout
|
||||
public void Test_align_self_flex_start()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.AlignSelf = CSSAlign.FlexStart;
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -139,13 +139,13 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.AlignItems = CSSAlign.FlexStart;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.AlignSelf = CSSAlign.FlexEnd;
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
@@ -52,8 +52,8 @@ namespace Facebook.CSSLayout
|
||||
root.SetBorder(CSSEdge.Bottom, 10f);
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -90,12 +90,12 @@ namespace Facebook.CSSLayout
|
||||
root.SetBorder(CSSEdge.Top, 10f);
|
||||
root.SetBorder(CSSEdge.Right, 10f);
|
||||
root.SetBorder(CSSEdge.Bottom, 10f);
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -132,11 +132,11 @@ namespace Facebook.CSSLayout
|
||||
root.SetBorder(CSSEdge.Top, 10f);
|
||||
root.SetBorder(CSSEdge.Right, 10f);
|
||||
root.SetBorder(CSSEdge.Bottom, 10f);
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -174,12 +174,12 @@ namespace Facebook.CSSLayout
|
||||
root.SetBorder(CSSEdge.Start, 10f);
|
||||
root.SetBorder(CSSEdge.End, 20f);
|
||||
root.SetBorder(CSSEdge.Bottom, 20f);
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
@@ -21,18 +21,18 @@ namespace Facebook.CSSLayout
|
||||
public void Test_flex_direction_column_no_height()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.Width = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -86,18 +86,18 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.StyleHeight = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 10f;
|
||||
root_child1.Width = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 10f;
|
||||
root_child2.Width = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -150,19 +150,19 @@ namespace Facebook.CSSLayout
|
||||
public void Test_flex_direction_column()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -216,19 +216,19 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 10f;
|
||||
root_child1.Width = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 10f;
|
||||
root_child2.Width = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -282,19 +282,19 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.ColumnReverse;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -348,19 +348,19 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.RowReverse;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 10f;
|
||||
root_child1.Width = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 10f;
|
||||
root_child2.Width = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
@@ -21,8 +21,8 @@ namespace Facebook.CSSLayout
|
||||
public void Test_flex_basis_flex_grow_column()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
@@ -74,8 +74,8 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
@@ -126,8 +126,8 @@ namespace Facebook.CSSLayout
|
||||
public void Test_flex_basis_flex_shrink_column()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexShrink = 1f;
|
||||
@@ -179,8 +179,8 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexShrink = 1f;
|
||||
@@ -231,22 +231,22 @@ namespace Facebook.CSSLayout
|
||||
public void Test_flex_shrink_to_zero()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleHeight = 75f;
|
||||
root.Height = 75f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 50f;
|
||||
root_child0.StyleHeight = 50f;
|
||||
root_child0.Width = 50f;
|
||||
root_child0.Height = 50f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.FlexShrink = 1f;
|
||||
root_child1.StyleWidth = 50f;
|
||||
root_child1.StyleHeight = 50f;
|
||||
root_child1.Width = 50f;
|
||||
root_child1.Height = 50f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 50f;
|
||||
root_child2.StyleHeight = 50f;
|
||||
root_child2.Width = 50f;
|
||||
root_child2.Height = 50f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -299,23 +299,23 @@ namespace Facebook.CSSLayout
|
||||
public void Test_flex_basis_overrides_main_size()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
root_child0.FlexBasis = 50f;
|
||||
root_child0.StyleHeight = 20f;
|
||||
root_child0.Height = 20f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.FlexGrow = 1f;
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.FlexGrow = 1f;
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -368,8 +368,8 @@ namespace Facebook.CSSLayout
|
||||
public void Test_flex_grow_shrink_at_most()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root.Insert(0, root_child0);
|
||||
|
@@ -22,26 +22,26 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.Wrap = CSSWrap.Wrap;
|
||||
root.StyleHeight = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 30f;
|
||||
root_child0.StyleHeight = 30f;
|
||||
root_child0.Width = 30f;
|
||||
root_child0.Height = 30f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 30f;
|
||||
root_child1.StyleHeight = 30f;
|
||||
root_child1.Width = 30f;
|
||||
root_child1.Height = 30f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 30f;
|
||||
root_child2.StyleHeight = 30f;
|
||||
root_child2.Width = 30f;
|
||||
root_child2.Height = 30f;
|
||||
root.Insert(2, root_child2);
|
||||
|
||||
CSSNode root_child3 = new CSSNode();
|
||||
root_child3.StyleWidth = 30f;
|
||||
root_child3.StyleHeight = 30f;
|
||||
root_child3.Width = 30f;
|
||||
root_child3.Height = 30f;
|
||||
root.Insert(3, root_child3);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -106,26 +106,26 @@ namespace Facebook.CSSLayout
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.Wrap = CSSWrap.Wrap;
|
||||
root.StyleWidth = 100f;
|
||||
root.Width = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 30f;
|
||||
root_child0.StyleHeight = 30f;
|
||||
root_child0.Width = 30f;
|
||||
root_child0.Height = 30f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 30f;
|
||||
root_child1.StyleHeight = 30f;
|
||||
root_child1.Width = 30f;
|
||||
root_child1.Height = 30f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 30f;
|
||||
root_child2.StyleHeight = 30f;
|
||||
root_child2.Width = 30f;
|
||||
root_child2.Height = 30f;
|
||||
root.Insert(2, root_child2);
|
||||
|
||||
CSSNode root_child3 = new CSSNode();
|
||||
root_child3.StyleWidth = 30f;
|
||||
root_child3.StyleHeight = 30f;
|
||||
root_child3.Width = 30f;
|
||||
root_child3.Height = 30f;
|
||||
root.Insert(3, root_child3);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -191,26 +191,26 @@ namespace Facebook.CSSLayout
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.AlignItems = CSSAlign.FlexEnd;
|
||||
root.Wrap = CSSWrap.Wrap;
|
||||
root.StyleWidth = 100f;
|
||||
root.Width = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 30f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 30f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 30f;
|
||||
root_child1.StyleHeight = 20f;
|
||||
root_child1.Width = 30f;
|
||||
root_child1.Height = 20f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 30f;
|
||||
root_child2.StyleHeight = 30f;
|
||||
root_child2.Width = 30f;
|
||||
root_child2.Height = 30f;
|
||||
root.Insert(2, root_child2);
|
||||
|
||||
CSSNode root_child3 = new CSSNode();
|
||||
root_child3.StyleWidth = 30f;
|
||||
root_child3.StyleHeight = 30f;
|
||||
root_child3.Width = 30f;
|
||||
root_child3.Height = 30f;
|
||||
root.Insert(3, root_child3);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -276,26 +276,26 @@ namespace Facebook.CSSLayout
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.AlignItems = CSSAlign.Center;
|
||||
root.Wrap = CSSWrap.Wrap;
|
||||
root.StyleWidth = 100f;
|
||||
root.Width = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 30f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 30f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 30f;
|
||||
root_child1.StyleHeight = 20f;
|
||||
root_child1.Width = 30f;
|
||||
root_child1.Height = 20f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 30f;
|
||||
root_child2.StyleHeight = 30f;
|
||||
root_child2.Width = 30f;
|
||||
root_child2.Height = 30f;
|
||||
root.Insert(2, root_child2);
|
||||
|
||||
CSSNode root_child3 = new CSSNode();
|
||||
root_child3.StyleWidth = 30f;
|
||||
root_child3.StyleHeight = 30f;
|
||||
root_child3.Width = 30f;
|
||||
root_child3.Height = 30f;
|
||||
root.Insert(3, root_child3);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
@@ -22,19 +22,19 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.StyleWidth = 102f;
|
||||
root.StyleHeight = 102f;
|
||||
root.Width = 102f;
|
||||
root.Height = 102f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 10f;
|
||||
root_child1.Width = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 10f;
|
||||
root_child2.Width = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -89,19 +89,19 @@ namespace Facebook.CSSLayout
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.JustifyContent = CSSJustify.FlexEnd;
|
||||
root.StyleWidth = 102f;
|
||||
root.StyleHeight = 102f;
|
||||
root.Width = 102f;
|
||||
root.Height = 102f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 10f;
|
||||
root_child1.Width = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 10f;
|
||||
root_child2.Width = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -156,19 +156,19 @@ namespace Facebook.CSSLayout
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.JustifyContent = CSSJustify.Center;
|
||||
root.StyleWidth = 102f;
|
||||
root.StyleHeight = 102f;
|
||||
root.Width = 102f;
|
||||
root.Height = 102f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 10f;
|
||||
root_child1.Width = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 10f;
|
||||
root_child2.Width = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -223,19 +223,19 @@ namespace Facebook.CSSLayout
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.JustifyContent = CSSJustify.SpaceBetween;
|
||||
root.StyleWidth = 102f;
|
||||
root.StyleHeight = 102f;
|
||||
root.Width = 102f;
|
||||
root.Height = 102f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 10f;
|
||||
root_child1.Width = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 10f;
|
||||
root_child2.Width = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -290,19 +290,19 @@ namespace Facebook.CSSLayout
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.JustifyContent = CSSJustify.SpaceAround;
|
||||
root.StyleWidth = 102f;
|
||||
root.StyleHeight = 102f;
|
||||
root.Width = 102f;
|
||||
root.Height = 102f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 10f;
|
||||
root_child1.Width = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 10f;
|
||||
root_child2.Width = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -355,18 +355,18 @@ namespace Facebook.CSSLayout
|
||||
public void Test_justify_content_column_flex_start()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 102f;
|
||||
root.StyleHeight = 102f;
|
||||
root.Width = 102f;
|
||||
root.Height = 102f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -420,19 +420,19 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.JustifyContent = CSSJustify.FlexEnd;
|
||||
root.StyleWidth = 102f;
|
||||
root.StyleHeight = 102f;
|
||||
root.Width = 102f;
|
||||
root.Height = 102f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -486,19 +486,19 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.JustifyContent = CSSJustify.Center;
|
||||
root.StyleWidth = 102f;
|
||||
root.StyleHeight = 102f;
|
||||
root.Width = 102f;
|
||||
root.Height = 102f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -552,19 +552,19 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.JustifyContent = CSSJustify.SpaceBetween;
|
||||
root.StyleWidth = 102f;
|
||||
root.StyleHeight = 102f;
|
||||
root.Width = 102f;
|
||||
root.Height = 102f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -618,19 +618,19 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.JustifyContent = CSSJustify.SpaceAround;
|
||||
root.StyleWidth = 102f;
|
||||
root.StyleHeight = 102f;
|
||||
root.Width = 102f;
|
||||
root.Height = 102f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
@@ -22,12 +22,12 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.SetMargin(CSSEdge.Start, 10f);
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -60,12 +60,12 @@ namespace Facebook.CSSLayout
|
||||
public void Test_margin_top()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.SetMargin(CSSEdge.Top, 10f);
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -100,12 +100,12 @@ namespace Facebook.CSSLayout
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.JustifyContent = CSSJustify.FlexEnd;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.SetMargin(CSSEdge.End, 10f);
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -139,12 +139,12 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.JustifyContent = CSSJustify.FlexEnd;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.SetMargin(CSSEdge.Bottom, 10f);
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -178,8 +178,8 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
@@ -216,8 +216,8 @@ namespace Facebook.CSSLayout
|
||||
public void Test_margin_and_flex_column()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
@@ -255,8 +255,8 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
@@ -293,8 +293,8 @@ namespace Facebook.CSSLayout
|
||||
public void Test_margin_and_stretch_column()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
@@ -332,8 +332,8 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
@@ -383,8 +383,8 @@ namespace Facebook.CSSLayout
|
||||
public void Test_margin_with_sibling_column()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
|
@@ -21,12 +21,12 @@ namespace Facebook.CSSLayout
|
||||
public void Test_max_width()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleMaxWidth = 50f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.MaxWidth = 50f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -60,12 +60,12 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.StyleMaxHeight = 50f;
|
||||
root_child0.Width = 10f;
|
||||
root_child0.MaxHeight = 50f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -98,12 +98,12 @@ namespace Facebook.CSSLayout
|
||||
public void Test_min_height()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
root_child0.StyleMinHeight = 60f;
|
||||
root_child0.MinHeight = 60f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
@@ -151,12 +151,12 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
root_child0.StyleMinWidth = 60f;
|
||||
root_child0.MinWidth = 60f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
@@ -204,13 +204,13 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.JustifyContent = CSSJustify.Center;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleMinHeight = 100f;
|
||||
root.StyleMaxHeight = 200f;
|
||||
root.Width = 100f;
|
||||
root.MinHeight = 100f;
|
||||
root.MaxHeight = 200f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 60f;
|
||||
root_child0.StyleHeight = 60f;
|
||||
root_child0.Width = 60f;
|
||||
root_child0.Height = 60f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -244,13 +244,13 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.AlignItems = CSSAlign.Center;
|
||||
root.StyleMinWidth = 100f;
|
||||
root.StyleMaxWidth = 200f;
|
||||
root.StyleHeight = 100f;
|
||||
root.MinWidth = 100f;
|
||||
root.MaxWidth = 200f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 60f;
|
||||
root_child0.StyleHeight = 60f;
|
||||
root_child0.Width = 60f;
|
||||
root_child0.Height = 60f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -284,22 +284,22 @@ namespace Facebook.CSSLayout
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.JustifyContent = CSSJustify.Center;
|
||||
root.StyleMinHeight = 100f;
|
||||
root.StyleMaxHeight = 110f;
|
||||
root.MinHeight = 100f;
|
||||
root.MaxHeight = 110f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 50f;
|
||||
root_child0.StyleHeight = 50f;
|
||||
root_child0.Width = 50f;
|
||||
root_child0.Height = 50f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.StyleWidth = 50f;
|
||||
root_child1.StyleHeight = 50f;
|
||||
root_child1.Width = 50f;
|
||||
root_child1.Height = 50f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.StyleWidth = 50f;
|
||||
root_child2.StyleHeight = 50f;
|
||||
root_child2.Width = 50f;
|
||||
root_child2.Height = 50f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -352,17 +352,17 @@ namespace Facebook.CSSLayout
|
||||
public void Test_flex_grow_within_max_width()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 200f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 200f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexDirection = CSSFlexDirection.Row;
|
||||
root_child0.StyleMaxWidth = 100f;
|
||||
root_child0.MaxWidth = 100f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child0_child0 = new CSSNode();
|
||||
root_child0_child0.FlexGrow = 1f;
|
||||
root_child0_child0.StyleHeight = 20f;
|
||||
root_child0_child0.Height = 20f;
|
||||
root_child0.Insert(0, root_child0_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -405,17 +405,17 @@ namespace Facebook.CSSLayout
|
||||
public void Test_flex_grow_within_constrained_max_width()
|
||||
{
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 200f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 200f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexDirection = CSSFlexDirection.Row;
|
||||
root_child0.StyleMaxWidth = 300f;
|
||||
root_child0.MaxWidth = 300f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child0_child0 = new CSSNode();
|
||||
root_child0_child0.FlexGrow = 1f;
|
||||
root_child0_child0.StyleHeight = 20f;
|
||||
root_child0_child0.Height = 20f;
|
||||
root_child0.Insert(0, root_child0_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
@@ -52,8 +52,8 @@ namespace Facebook.CSSLayout
|
||||
root.SetPadding(CSSEdge.Bottom, 10f);
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -90,12 +90,12 @@ namespace Facebook.CSSLayout
|
||||
root.SetPadding(CSSEdge.Top, 10f);
|
||||
root.SetPadding(CSSEdge.Right, 10f);
|
||||
root.SetPadding(CSSEdge.Bottom, 10f);
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -132,11 +132,11 @@ namespace Facebook.CSSLayout
|
||||
root.SetPadding(CSSEdge.Top, 10f);
|
||||
root.SetPadding(CSSEdge.Right, 10f);
|
||||
root.SetPadding(CSSEdge.Bottom, 10f);
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -174,12 +174,12 @@ namespace Facebook.CSSLayout
|
||||
root.SetPadding(CSSEdge.Start, 10f);
|
||||
root.SetPadding(CSSEdge.End, 20f);
|
||||
root.SetPadding(CSSEdge.Bottom, 20f);
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.StyleWidth = 10f;
|
||||
root_child0.StyleHeight = 10f;
|
||||
root_child0.Width = 10f;
|
||||
root_child0.Height = 10f;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
@@ -24,8 +24,8 @@ namespace Facebook.CSSLayout
|
||||
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
@@ -94,8 +94,8 @@ namespace Facebook.CSSLayout
|
||||
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.StyleWidth = 113f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 113f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
@@ -192,8 +192,8 @@ namespace Facebook.CSSLayout
|
||||
|
||||
CSSNode root = new CSSNode();
|
||||
root.FlexDirection = CSSFlexDirection.Row;
|
||||
root.StyleWidth = 101f;
|
||||
root.StyleHeight = 100f;
|
||||
root.Width = 101f;
|
||||
root.Height = 100f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexShrink = 1f;
|
||||
@@ -262,23 +262,23 @@ namespace Facebook.CSSLayout
|
||||
CSSNode.SetExperimentalFeatureEnabled(CSSExperimentalFeature.Rounding, true);
|
||||
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 113f;
|
||||
root.Width = 100f;
|
||||
root.Height = 113f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
root_child0.FlexBasis = 50f;
|
||||
root_child0.StyleHeight = 20f;
|
||||
root_child0.Height = 20f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.FlexGrow = 1f;
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.FlexGrow = 1f;
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -335,23 +335,23 @@ namespace Facebook.CSSLayout
|
||||
CSSNode.SetExperimentalFeatureEnabled(CSSExperimentalFeature.Rounding, true);
|
||||
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 87.4f;
|
||||
root.StyleHeight = 113.4f;
|
||||
root.Width = 87.4f;
|
||||
root.Height = 113.4f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 0.7f;
|
||||
root_child0.FlexBasis = 50.3f;
|
||||
root_child0.StyleHeight = 20.3f;
|
||||
root_child0.Height = 20.3f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.FlexGrow = 1.6f;
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.FlexGrow = 1.1f;
|
||||
root_child2.StyleHeight = 10.7f;
|
||||
root_child2.Height = 10.7f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -408,37 +408,37 @@ namespace Facebook.CSSLayout
|
||||
CSSNode.SetExperimentalFeatureEnabled(CSSExperimentalFeature.Rounding, true);
|
||||
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 87.4f;
|
||||
root.StyleHeight = 113.4f;
|
||||
root.Width = 87.4f;
|
||||
root.Height = 113.4f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 0.7f;
|
||||
root_child0.FlexBasis = 50.3f;
|
||||
root_child0.StyleHeight = 20.3f;
|
||||
root_child0.Height = 20.3f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child0_child0 = new CSSNode();
|
||||
root_child0_child0.FlexGrow = 1f;
|
||||
root_child0_child0.FlexBasis = 0.3f;
|
||||
root_child0_child0.SetPosition(CSSEdge.Bottom, 13.3f);
|
||||
root_child0_child0.StyleHeight = 9.9f;
|
||||
root_child0_child0.Height = 9.9f;
|
||||
root_child0.Insert(0, root_child0_child0);
|
||||
|
||||
CSSNode root_child0_child1 = new CSSNode();
|
||||
root_child0_child1.FlexGrow = 4f;
|
||||
root_child0_child1.FlexBasis = 0.3f;
|
||||
root_child0_child1.SetPosition(CSSEdge.Top, 13.3f);
|
||||
root_child0_child1.StyleHeight = 1.1f;
|
||||
root_child0_child1.Height = 1.1f;
|
||||
root_child0.Insert(1, root_child0_child1);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.FlexGrow = 1.6f;
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.FlexGrow = 1.1f;
|
||||
root_child2.StyleHeight = 10.7f;
|
||||
root_child2.Height = 10.7f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -515,23 +515,23 @@ namespace Facebook.CSSLayout
|
||||
CSSNode.SetExperimentalFeatureEnabled(CSSExperimentalFeature.Rounding, true);
|
||||
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 113.4f;
|
||||
root.Width = 100f;
|
||||
root.Height = 113.4f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
root_child0.FlexBasis = 50f;
|
||||
root_child0.StyleHeight = 20f;
|
||||
root_child0.Height = 20f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.FlexGrow = 1f;
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.FlexGrow = 1f;
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -588,23 +588,23 @@ namespace Facebook.CSSLayout
|
||||
CSSNode.SetExperimentalFeatureEnabled(CSSExperimentalFeature.Rounding, true);
|
||||
|
||||
CSSNode root = new CSSNode();
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 113.6f;
|
||||
root.Width = 100f;
|
||||
root.Height = 113.6f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
root_child0.FlexBasis = 50f;
|
||||
root_child0.StyleHeight = 20f;
|
||||
root_child0.Height = 20f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.FlexGrow = 1f;
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.FlexGrow = 1f;
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -662,23 +662,23 @@ namespace Facebook.CSSLayout
|
||||
|
||||
CSSNode root = new CSSNode();
|
||||
root.SetPosition(CSSEdge.Top, 0.3f);
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 113.4f;
|
||||
root.Width = 100f;
|
||||
root.Height = 113.4f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
root_child0.FlexBasis = 50f;
|
||||
root_child0.StyleHeight = 20f;
|
||||
root_child0.Height = 20f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.FlexGrow = 1f;
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.FlexGrow = 1f;
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -736,23 +736,23 @@ namespace Facebook.CSSLayout
|
||||
|
||||
CSSNode root = new CSSNode();
|
||||
root.SetPosition(CSSEdge.Top, 0.7f);
|
||||
root.StyleWidth = 100f;
|
||||
root.StyleHeight = 113.4f;
|
||||
root.Width = 100f;
|
||||
root.Height = 113.4f;
|
||||
|
||||
CSSNode root_child0 = new CSSNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
root_child0.FlexBasis = 50f;
|
||||
root_child0.StyleHeight = 20f;
|
||||
root_child0.Height = 20f;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
CSSNode root_child1 = new CSSNode();
|
||||
root_child1.FlexGrow = 1f;
|
||||
root_child1.StyleHeight = 10f;
|
||||
root_child1.Height = 10f;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
CSSNode root_child2 = new CSSNode();
|
||||
root_child2.FlexGrow = 1f;
|
||||
root_child2.StyleHeight = 10f;
|
||||
root_child2.Height = 10f;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = CSSDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
@@ -87,12 +87,12 @@ namespace Facebook.CSSLayout
|
||||
padding: new Spacing(top: 13, bottom: 14, left: 15, right: 16),
|
||||
border: new Spacing(top: 17, bottom: 18, left: 19, right: 20),
|
||||
|
||||
styleWidth: 21,
|
||||
styleHeight: 22,
|
||||
styleMinWidth: 23,
|
||||
styleMinHeight: 24,
|
||||
styleMaxWidth: 25,
|
||||
styleMaxHeight: 26);
|
||||
width: 21,
|
||||
height: 22,
|
||||
minWidth: 23,
|
||||
minHeight: 24,
|
||||
maxWidth: 25,
|
||||
maxHeight: 26);
|
||||
|
||||
Assert.AreEqual(CSSDirection.RTL, node.StyleDirection);
|
||||
Assert.AreEqual(CSSFlexDirection.RowReverse, node.FlexDirection);
|
||||
@@ -132,12 +132,12 @@ namespace Facebook.CSSLayout
|
||||
Assert.AreEqual(19, node.GetBorder(CSSEdge.Left));
|
||||
Assert.AreEqual(20, node.GetBorder(CSSEdge.Right));
|
||||
|
||||
Assert.AreEqual(21, node.StyleWidth);
|
||||
Assert.AreEqual(22, node.StyleHeight);
|
||||
Assert.AreEqual(23, node.StyleMinWidth);
|
||||
Assert.AreEqual(24, node.StyleMinHeight);
|
||||
Assert.AreEqual(25, node.StyleMaxWidth);
|
||||
Assert.AreEqual(26, node.StyleMaxHeight);
|
||||
Assert.AreEqual(21, node.Width);
|
||||
Assert.AreEqual(22, node.Height);
|
||||
Assert.AreEqual(23, node.MinWidth);
|
||||
Assert.AreEqual(24, node.MinHeight);
|
||||
Assert.AreEqual(25, node.MaxWidth);
|
||||
Assert.AreEqual(26, node.MaxHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -201,14 +201,14 @@ namespace Facebook.CSSLayout
|
||||
public void TestPrint()
|
||||
{
|
||||
CSSNode parent = new CSSNode();
|
||||
parent.StyleWidth = 100;
|
||||
parent.StyleHeight = 120;
|
||||
parent.Width = 100;
|
||||
parent.Height = 120;
|
||||
CSSNode child0 = new CSSNode();
|
||||
child0.StyleWidth = 30;
|
||||
child0.StyleHeight = 40;
|
||||
child0.Width = 30;
|
||||
child0.Height = 40;
|
||||
CSSNode child1 = new CSSNode();
|
||||
child1.StyleWidth = 35;
|
||||
child1.StyleHeight = 45;
|
||||
child1.Width = 35;
|
||||
child1.Height = 45;
|
||||
parent.Insert(0, child0);
|
||||
parent.Insert(0, child1);
|
||||
parent.CalculateLayout();
|
||||
@@ -219,13 +219,13 @@ namespace Facebook.CSSLayout
|
||||
public void TestCopyStyle()
|
||||
{
|
||||
CSSNode node0 = new CSSNode();
|
||||
Assert.IsTrue(CSSConstants.IsUndefined(node0.StyleMaxHeight));
|
||||
Assert.IsTrue(CSSConstants.IsUndefined(node0.MaxHeight));
|
||||
|
||||
CSSNode node1 = new CSSNode();
|
||||
node1.StyleMaxHeight = 100;
|
||||
node1.MaxHeight = 100;
|
||||
|
||||
node0.CopyStyle(node1);
|
||||
Assert.AreEqual(100, node0.StyleMaxHeight);
|
||||
Assert.AreEqual(100, node0.MaxHeight);
|
||||
}
|
||||
|
||||
#if !UNITY_EDITOR
|
||||
|
Reference in New Issue
Block a user