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
|
||||
|
@@ -183,7 +183,7 @@ CSEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetHeight:{value:function(nodeName, value) {
|
||||
this.push(nodeName + '.StyleHeight = ' + value + 'f;');
|
||||
this.push(nodeName + '.Height = ' + value + 'f;');
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetJustifyContent:{value:function(nodeName, value) {
|
||||
@@ -195,19 +195,19 @@ CSEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetMaxHeight:{value:function(nodeName, value) {
|
||||
this.push(nodeName + '.StyleMaxHeight = ' + value + 'f;');
|
||||
this.push(nodeName + '.MaxHeight = ' + value + 'f;');
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetMaxWidth:{value:function(nodeName, value) {
|
||||
this.push(nodeName + '.StyleMaxWidth = ' + value + 'f;');
|
||||
this.push(nodeName + '.MaxWidth = ' + value + 'f;');
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetMinHeight:{value:function(nodeName, value) {
|
||||
this.push(nodeName + '.StyleMinHeight = ' + value + 'f;');
|
||||
this.push(nodeName + '.MinHeight = ' + value + 'f;');
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetMinWidth:{value:function(nodeName, value) {
|
||||
this.push(nodeName + '.StyleMinWidth = ' + value + 'f;');
|
||||
this.push(nodeName + '.MinWidth = ' + value + 'f;');
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetOverflow:{value:function(nodeName, value) {
|
||||
@@ -227,6 +227,6 @@ CSEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetWidth:{value:function(nodeName, value) {
|
||||
this.push(nodeName + '.StyleWidth = ' + value + 'f;');
|
||||
this.push(nodeName + '.Width = ' + value + 'f;');
|
||||
}},
|
||||
});
|
||||
|
@@ -188,7 +188,7 @@ JavaEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetHeight:{value:function(nodeName, value) {
|
||||
this.push(nodeName + '.setStyleHeight(' + value + 'f);');
|
||||
this.push(nodeName + '.setHeight(' + value + 'f);');
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetJustifyContent:{value:function(nodeName, value) {
|
||||
@@ -200,19 +200,19 @@ JavaEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetMaxHeight:{value:function(nodeName, value) {
|
||||
this.push(nodeName + '.setStyleMaxHeight(' + value + 'f);');
|
||||
this.push(nodeName + '.setMaxHeight(' + value + 'f);');
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetMaxWidth:{value:function(nodeName, value) {
|
||||
this.push(nodeName + '.setStyleMaxWidth(' + value + 'f);');
|
||||
this.push(nodeName + '.setMaxWidth(' + value + 'f);');
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetMinHeight:{value:function(nodeName, value) {
|
||||
this.push(nodeName + '.setStyleMinHeight(' + value + 'f);');
|
||||
this.push(nodeName + '.setMinHeight(' + value + 'f);');
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetMinWidth:{value:function(nodeName, value) {
|
||||
this.push(nodeName + '.setStyleMinWidth(' + value + 'f);');
|
||||
this.push(nodeName + '.setMinWidth(' + value + 'f);');
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetOverflow:{value:function(nodeName, value) {
|
||||
@@ -232,6 +232,6 @@ JavaEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
}},
|
||||
|
||||
CSSNodeStyleSetWidth:{value:function(nodeName, value) {
|
||||
this.push(nodeName + '.setStyleWidth(' + value + 'f);');
|
||||
this.push(nodeName + '.setWidth(' + value + 'f);');
|
||||
}},
|
||||
});
|
||||
|
@@ -401,83 +401,83 @@ public class CSSNode implements CSSNodeAPI<CSSNode> {
|
||||
|
||||
private native float jni_CSSNodeStyleGetWidth(long nativePointer);
|
||||
@Override
|
||||
public float getStyleWidth() {
|
||||
public float getWidth() {
|
||||
return jni_CSSNodeStyleGetWidth(mNativePointer);
|
||||
}
|
||||
|
||||
private native void jni_CSSNodeStyleSetWidth(long nativePointer, float width);
|
||||
@Override
|
||||
public void setStyleWidth(float width) {
|
||||
public void setWidth(float width) {
|
||||
jni_CSSNodeStyleSetWidth(mNativePointer, width);
|
||||
}
|
||||
|
||||
private native float jni_CSSNodeStyleGetHeight(long nativePointer);
|
||||
@Override
|
||||
public float getStyleHeight() {
|
||||
public float getHeight() {
|
||||
return jni_CSSNodeStyleGetHeight(mNativePointer);
|
||||
}
|
||||
|
||||
private native void jni_CSSNodeStyleSetHeight(long nativePointer, float height);
|
||||
@Override
|
||||
public void setStyleHeight(float height) {
|
||||
public void setHeight(float height) {
|
||||
jni_CSSNodeStyleSetHeight(mNativePointer, height);
|
||||
}
|
||||
|
||||
private native float jni_CSSNodeStyleGetMinWidth(long nativePointer);
|
||||
@Override
|
||||
public float getStyleMinWidth() {
|
||||
public float getMinWidth() {
|
||||
return jni_CSSNodeStyleGetMinWidth(mNativePointer);
|
||||
}
|
||||
|
||||
private native void jni_CSSNodeStyleSetMinWidth(long nativePointer, float minWidth);
|
||||
@Override
|
||||
public void setStyleMinWidth(float minWidth) {
|
||||
public void setMinWidth(float minWidth) {
|
||||
jni_CSSNodeStyleSetMinWidth(mNativePointer, minWidth);
|
||||
}
|
||||
|
||||
private native float jni_CSSNodeStyleGetMinHeight(long nativePointer);
|
||||
@Override
|
||||
public float getStyleMinHeight() {
|
||||
public float getMinHeight() {
|
||||
return jni_CSSNodeStyleGetMinHeight(mNativePointer);
|
||||
}
|
||||
|
||||
private native void jni_CSSNodeStyleSetMinHeight(long nativePointer, float minHeight);
|
||||
@Override
|
||||
public void setStyleMinHeight(float minHeight) {
|
||||
public void setMinHeight(float minHeight) {
|
||||
jni_CSSNodeStyleSetMinHeight(mNativePointer, minHeight);
|
||||
}
|
||||
|
||||
private native float jni_CSSNodeStyleGetMaxWidth(long nativePointer);
|
||||
@Override
|
||||
public float getStyleMaxWidth() {
|
||||
public float getMaxWidth() {
|
||||
return jni_CSSNodeStyleGetMaxWidth(mNativePointer);
|
||||
}
|
||||
|
||||
private native void jni_CSSNodeStyleSetMaxWidth(long nativePointer, float maxWidth);
|
||||
@Override
|
||||
public void setStyleMaxWidth(float maxWidth) {
|
||||
public void setMaxWidth(float maxWidth) {
|
||||
jni_CSSNodeStyleSetMaxWidth(mNativePointer, maxWidth);
|
||||
}
|
||||
|
||||
private native float jni_CSSNodeStyleGetMaxHeight(long nativePointer);
|
||||
@Override
|
||||
public float getStyleMaxHeight() {
|
||||
public float getMaxHeight() {
|
||||
return jni_CSSNodeStyleGetMaxHeight(mNativePointer);
|
||||
}
|
||||
|
||||
private native void jni_CSSNodeStyleSetMaxHeight(long nativePointer, float maxheight);
|
||||
@Override
|
||||
public void setStyleMaxHeight(float maxheight) {
|
||||
public void setMaxHeight(float maxheight) {
|
||||
jni_CSSNodeStyleSetMaxHeight(mNativePointer, maxheight);
|
||||
}
|
||||
|
||||
private native float jni_CSSNodeStyleGetAspectRatio(long nativePointer);
|
||||
public float getStyleAspectRatio() {
|
||||
public float getAspectRatio() {
|
||||
return jni_CSSNodeStyleGetAspectRatio(mNativePointer);
|
||||
}
|
||||
|
||||
private native void jni_CSSNodeStyleSetAspectRatio(long nativePointer, float aspectRatio);
|
||||
public void setStyleAspectRatio(float aspectRatio) {
|
||||
public void setAspectRatio(float aspectRatio) {
|
||||
jni_CSSNodeStyleSetAspectRatio(mNativePointer, aspectRatio);
|
||||
}
|
||||
|
||||
|
@@ -68,18 +68,18 @@ public interface CSSNodeAPI<CSSNodeType extends CSSNodeAPI> {
|
||||
void setBorder(int spacingType, float border);
|
||||
float getPosition(int spacingType);
|
||||
void setPosition(int spacingType, float position);
|
||||
float getStyleWidth();
|
||||
void setStyleWidth(float width);
|
||||
float getStyleHeight();
|
||||
void setStyleHeight(float height);
|
||||
float getStyleMaxWidth();
|
||||
void setStyleMaxWidth(float maxWidth);
|
||||
float getStyleMinWidth();
|
||||
void setStyleMinWidth(float minWidth);
|
||||
float getStyleMaxHeight();
|
||||
void setStyleMaxHeight(float maxHeight);
|
||||
float getStyleMinHeight();
|
||||
void setStyleMinHeight(float minHeight);
|
||||
float getWidth();
|
||||
void setWidth(float width);
|
||||
float getHeight();
|
||||
void setHeight(float height);
|
||||
float getMaxWidth();
|
||||
void setMaxWidth(float maxWidth);
|
||||
float getMinWidth();
|
||||
void setMinWidth(float minWidth);
|
||||
float getMaxHeight();
|
||||
void setMaxHeight(float maxHeight);
|
||||
float getMinHeight();
|
||||
void setMinHeight(float minHeight);
|
||||
float getLayoutX();
|
||||
float getLayoutY();
|
||||
float getLayoutWidth();
|
||||
|
@@ -464,12 +464,12 @@ public class CSSNodeDEPRECATED implements CSSNodeAPI<CSSNodeDEPRECATED> {
|
||||
* Get this node's width, as defined in the style.
|
||||
*/
|
||||
@Override
|
||||
public float getStyleWidth() {
|
||||
public float getWidth() {
|
||||
return style.dimensions[DIMENSION_WIDTH];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStyleWidth(float width) {
|
||||
public void setWidth(float width) {
|
||||
if (!valuesEqual(style.dimensions[DIMENSION_WIDTH], width)) {
|
||||
style.dimensions[DIMENSION_WIDTH] = width;
|
||||
dirty();
|
||||
@@ -480,12 +480,12 @@ public class CSSNodeDEPRECATED implements CSSNodeAPI<CSSNodeDEPRECATED> {
|
||||
* Get this node's height, as defined in the style.
|
||||
*/
|
||||
@Override
|
||||
public float getStyleHeight() {
|
||||
public float getHeight() {
|
||||
return style.dimensions[DIMENSION_HEIGHT];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStyleHeight(float height) {
|
||||
public void setHeight(float height) {
|
||||
if (!valuesEqual(style.dimensions[DIMENSION_HEIGHT], height)) {
|
||||
style.dimensions[DIMENSION_HEIGHT] = height;
|
||||
dirty();
|
||||
@@ -496,12 +496,12 @@ public class CSSNodeDEPRECATED implements CSSNodeAPI<CSSNodeDEPRECATED> {
|
||||
* Get this node's max width, as defined in the style
|
||||
*/
|
||||
@Override
|
||||
public float getStyleMaxWidth() {
|
||||
public float getMaxWidth() {
|
||||
return style.maxWidth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStyleMaxWidth(float maxWidth) {
|
||||
public void setMaxWidth(float maxWidth) {
|
||||
if (!valuesEqual(style.maxWidth, maxWidth)) {
|
||||
style.maxWidth = maxWidth;
|
||||
dirty();
|
||||
@@ -512,12 +512,12 @@ public class CSSNodeDEPRECATED implements CSSNodeAPI<CSSNodeDEPRECATED> {
|
||||
* Get this node's min width, as defined in the style
|
||||
*/
|
||||
@Override
|
||||
public float getStyleMinWidth() {
|
||||
public float getMinWidth() {
|
||||
return style.minWidth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStyleMinWidth(float minWidth) {
|
||||
public void setMinWidth(float minWidth) {
|
||||
if (!valuesEqual(style.minWidth, minWidth)) {
|
||||
style.minWidth = minWidth;
|
||||
dirty();
|
||||
@@ -528,12 +528,12 @@ public class CSSNodeDEPRECATED implements CSSNodeAPI<CSSNodeDEPRECATED> {
|
||||
* Get this node's max height, as defined in the style
|
||||
*/
|
||||
@Override
|
||||
public float getStyleMaxHeight() {
|
||||
public float getMaxHeight() {
|
||||
return style.maxHeight;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStyleMaxHeight(float maxHeight) {
|
||||
public void setMaxHeight(float maxHeight) {
|
||||
if (!valuesEqual(style.maxHeight, maxHeight)) {
|
||||
style.maxHeight = maxHeight;
|
||||
dirty();
|
||||
@@ -544,12 +544,12 @@ public class CSSNodeDEPRECATED implements CSSNodeAPI<CSSNodeDEPRECATED> {
|
||||
* Get this node's min height, as defined in the style
|
||||
*/
|
||||
@Override
|
||||
public float getStyleMinHeight() {
|
||||
public float getMinHeight() {
|
||||
return style.minHeight;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStyleMinHeight(float minHeight) {
|
||||
public void setMinHeight(float minHeight) {
|
||||
if (!valuesEqual(style.minHeight, minHeight)) {
|
||||
style.minHeight = minHeight;
|
||||
dirty();
|
||||
|
@@ -19,15 +19,15 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_width_height_start_top() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(Spacing.START, 10f);
|
||||
root_child0.setPosition(Spacing.TOP, 10f);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -59,15 +59,15 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_width_height_end_bottom() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(Spacing.END, 10f);
|
||||
root_child0.setPosition(Spacing.BOTTOM, 10f);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -99,8 +99,8 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_start_top_end_bottom() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
@@ -139,8 +139,8 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_width_height_start_top_end_bottom() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
@@ -148,8 +148,8 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
root_child0.setPosition(Spacing.TOP, 10f);
|
||||
root_child0.setPosition(Spacing.END, 10f);
|
||||
root_child0.setPosition(Spacing.BOTTOM, 10f);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -183,8 +183,8 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setOverflow(CSSOverflow.HIDDEN);
|
||||
root.setStyleWidth(50f);
|
||||
root.setStyleHeight(50f);
|
||||
root.setWidth(50f);
|
||||
root.setHeight(50f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
@@ -193,8 +193,8 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child0_child0 = new CSSNode();
|
||||
root_child0_child0.setStyleWidth(100f);
|
||||
root_child0_child0.setStyleHeight(100f);
|
||||
root_child0_child0.setWidth(100f);
|
||||
root_child0_child0.setHeight(100f);
|
||||
root_child0.addChildAt(root_child0_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -248,23 +248,23 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
root.setBorder(Spacing.TOP, 10f);
|
||||
root.setBorder(Spacing.RIGHT, 10f);
|
||||
root.setBorder(Spacing.BOTTOM, 10f);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(Spacing.LEFT, 0f);
|
||||
root_child0.setPosition(Spacing.TOP, 0f);
|
||||
root_child0.setStyleWidth(50f);
|
||||
root_child0.setStyleHeight(50f);
|
||||
root_child0.setWidth(50f);
|
||||
root_child0.setHeight(50f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
root_child1.setPosition(Spacing.RIGHT, 0f);
|
||||
root_child1.setPosition(Spacing.BOTTOM, 0f);
|
||||
root_child1.setStyleWidth(50f);
|
||||
root_child1.setStyleHeight(50f);
|
||||
root_child1.setWidth(50f);
|
||||
root_child1.setHeight(50f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -20,32 +20,32 @@ public class CSSLayoutAlignContentTest {
|
||||
public void test_align_content_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(50f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(50f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(50f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setWidth(50f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(50f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setWidth(50f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(50f);
|
||||
root_child3.setStyleHeight(10f);
|
||||
root_child3.setWidth(50f);
|
||||
root_child3.setHeight(10f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
|
||||
final CSSNode root_child4 = new CSSNode();
|
||||
root_child4.setStyleWidth(50f);
|
||||
root_child4.setStyleHeight(10f);
|
||||
root_child4.setWidth(50f);
|
||||
root_child4.setHeight(10f);
|
||||
root.addChildAt(root_child4, 4);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -119,32 +119,32 @@ public class CSSLayoutAlignContentTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignContent(CSSAlign.FLEX_END);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(50f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(50f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(50f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setWidth(50f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(50f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setWidth(50f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(50f);
|
||||
root_child3.setStyleHeight(10f);
|
||||
root_child3.setWidth(50f);
|
||||
root_child3.setHeight(10f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
|
||||
final CSSNode root_child4 = new CSSNode();
|
||||
root_child4.setStyleWidth(50f);
|
||||
root_child4.setStyleHeight(10f);
|
||||
root_child4.setWidth(50f);
|
||||
root_child4.setHeight(10f);
|
||||
root.addChildAt(root_child4, 4);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -218,32 +218,32 @@ public class CSSLayoutAlignContentTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignContent(CSSAlign.CENTER);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(50f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(50f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(50f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setWidth(50f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(50f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setWidth(50f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(50f);
|
||||
root_child3.setStyleHeight(10f);
|
||||
root_child3.setWidth(50f);
|
||||
root_child3.setHeight(10f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
|
||||
final CSSNode root_child4 = new CSSNode();
|
||||
root_child4.setStyleWidth(50f);
|
||||
root_child4.setStyleHeight(10f);
|
||||
root_child4.setWidth(50f);
|
||||
root_child4.setHeight(10f);
|
||||
root.addChildAt(root_child4, 4);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -317,27 +317,27 @@ public class CSSLayoutAlignContentTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignContent(CSSAlign.STRETCH);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(50f);
|
||||
root_child0.setWidth(50f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(50f);
|
||||
root_child1.setWidth(50f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(50f);
|
||||
root_child2.setWidth(50f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(50f);
|
||||
root_child3.setWidth(50f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
|
||||
final CSSNode root_child4 = new CSSNode();
|
||||
root_child4.setStyleWidth(50f);
|
||||
root_child4.setWidth(50f);
|
||||
root.addChildAt(root_child4, 4);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -19,11 +19,11 @@ public class CSSLayoutAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_items_stretch() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -56,12 +56,12 @@ public class CSSLayoutAlignItemsTest {
|
||||
public void test_align_items_center() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignItems(CSSAlign.CENTER);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -94,12 +94,12 @@ public class CSSLayoutAlignItemsTest {
|
||||
public void test_align_items_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignItems(CSSAlign.FLEX_START);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -132,12 +132,12 @@ public class CSSLayoutAlignItemsTest {
|
||||
public void test_align_items_flex_end() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignItems(CSSAlign.FLEX_END);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -19,13 +19,13 @@ public class CSSLayoutAlignSelfTest {
|
||||
@Test
|
||||
public void test_align_self_center() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setAlignSelf(CSSAlign.CENTER);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -57,13 +57,13 @@ public class CSSLayoutAlignSelfTest {
|
||||
@Test
|
||||
public void test_align_self_flex_end() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setAlignSelf(CSSAlign.FLEX_END);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -95,13 +95,13 @@ public class CSSLayoutAlignSelfTest {
|
||||
@Test
|
||||
public void test_align_self_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setAlignSelf(CSSAlign.FLEX_START);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -134,13 +134,13 @@ public class CSSLayoutAlignSelfTest {
|
||||
public void test_align_self_flex_end_override_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignItems(CSSAlign.FLEX_START);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setAlignSelf(CSSAlign.FLEX_END);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -49,8 +49,8 @@ public class CSSLayoutBorderTest {
|
||||
root.setBorder(Spacing.BOTTOM, 10f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -86,12 +86,12 @@ public class CSSLayoutBorderTest {
|
||||
root.setBorder(Spacing.TOP, 10f);
|
||||
root.setBorder(Spacing.RIGHT, 10f);
|
||||
root.setBorder(Spacing.BOTTOM, 10f);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -127,11 +127,11 @@ public class CSSLayoutBorderTest {
|
||||
root.setBorder(Spacing.TOP, 10f);
|
||||
root.setBorder(Spacing.RIGHT, 10f);
|
||||
root.setBorder(Spacing.BOTTOM, 10f);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -168,12 +168,12 @@ public class CSSLayoutBorderTest {
|
||||
root.setBorder(Spacing.START, 10f);
|
||||
root.setBorder(Spacing.END, 20f);
|
||||
root.setBorder(Spacing.BOTTOM, 20f);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -19,18 +19,18 @@ public class CSSLayoutFlexDirectionTest {
|
||||
@Test
|
||||
public void test_flex_direction_column_no_height() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setWidth(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -83,18 +83,18 @@ public class CSSLayoutFlexDirectionTest {
|
||||
public void test_flex_direction_row_no_width() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleHeight(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -146,19 +146,19 @@ public class CSSLayoutFlexDirectionTest {
|
||||
@Test
|
||||
public void test_flex_direction_column() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -211,19 +211,19 @@ public class CSSLayoutFlexDirectionTest {
|
||||
public void test_flex_direction_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -276,19 +276,19 @@ public class CSSLayoutFlexDirectionTest {
|
||||
public void test_flex_direction_column_reverse() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.COLUMN_REVERSE);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -341,19 +341,19 @@ public class CSSLayoutFlexDirectionTest {
|
||||
public void test_flex_direction_row_reverse() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW_REVERSE);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -19,8 +19,8 @@ public class CSSLayoutFlexTest {
|
||||
@Test
|
||||
public void test_flex_basis_flex_grow_column() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -71,8 +71,8 @@ public class CSSLayoutFlexTest {
|
||||
public void test_flex_basis_flex_grow_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -122,8 +122,8 @@ public class CSSLayoutFlexTest {
|
||||
@Test
|
||||
public void test_flex_basis_flex_shrink_column() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexShrink(1f);
|
||||
@@ -174,8 +174,8 @@ public class CSSLayoutFlexTest {
|
||||
public void test_flex_basis_flex_shrink_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexShrink(1f);
|
||||
@@ -225,22 +225,22 @@ public class CSSLayoutFlexTest {
|
||||
@Test
|
||||
public void test_flex_shrink_to_zero() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleHeight(75f);
|
||||
root.setHeight(75f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(50f);
|
||||
root_child0.setStyleHeight(50f);
|
||||
root_child0.setWidth(50f);
|
||||
root_child0.setHeight(50f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexShrink(1f);
|
||||
root_child1.setStyleWidth(50f);
|
||||
root_child1.setStyleHeight(50f);
|
||||
root_child1.setWidth(50f);
|
||||
root_child1.setHeight(50f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(50f);
|
||||
root_child2.setStyleHeight(50f);
|
||||
root_child2.setWidth(50f);
|
||||
root_child2.setHeight(50f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -292,23 +292,23 @@ public class CSSLayoutFlexTest {
|
||||
@Test
|
||||
public void test_flex_basis_overrides_main_size() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setFlexBasis(50f);
|
||||
root_child0.setStyleHeight(20f);
|
||||
root_child0.setHeight(20f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -360,8 +360,8 @@ public class CSSLayoutFlexTest {
|
||||
@Test
|
||||
public void test_flex_grow_shrink_at_most() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
@@ -20,26 +20,26 @@ public class CSSLayoutFlexWrapTest {
|
||||
public void test_wrap_column() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleHeight(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(30f);
|
||||
root_child0.setStyleHeight(30f);
|
||||
root_child0.setWidth(30f);
|
||||
root_child0.setHeight(30f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(30f);
|
||||
root_child1.setStyleHeight(30f);
|
||||
root_child1.setWidth(30f);
|
||||
root_child1.setHeight(30f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(30f);
|
||||
root_child2.setStyleHeight(30f);
|
||||
root_child2.setWidth(30f);
|
||||
root_child2.setHeight(30f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(30f);
|
||||
root_child3.setStyleHeight(30f);
|
||||
root_child3.setWidth(30f);
|
||||
root_child3.setHeight(30f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -103,26 +103,26 @@ public class CSSLayoutFlexWrapTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleWidth(100f);
|
||||
root.setWidth(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(30f);
|
||||
root_child0.setStyleHeight(30f);
|
||||
root_child0.setWidth(30f);
|
||||
root_child0.setHeight(30f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(30f);
|
||||
root_child1.setStyleHeight(30f);
|
||||
root_child1.setWidth(30f);
|
||||
root_child1.setHeight(30f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(30f);
|
||||
root_child2.setStyleHeight(30f);
|
||||
root_child2.setWidth(30f);
|
||||
root_child2.setHeight(30f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(30f);
|
||||
root_child3.setStyleHeight(30f);
|
||||
root_child3.setWidth(30f);
|
||||
root_child3.setHeight(30f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -187,26 +187,26 @@ public class CSSLayoutFlexWrapTest {
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setAlignItems(CSSAlign.FLEX_END);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleWidth(100f);
|
||||
root.setWidth(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(30f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(30f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(30f);
|
||||
root_child1.setStyleHeight(20f);
|
||||
root_child1.setWidth(30f);
|
||||
root_child1.setHeight(20f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(30f);
|
||||
root_child2.setStyleHeight(30f);
|
||||
root_child2.setWidth(30f);
|
||||
root_child2.setHeight(30f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(30f);
|
||||
root_child3.setStyleHeight(30f);
|
||||
root_child3.setWidth(30f);
|
||||
root_child3.setHeight(30f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -271,26 +271,26 @@ public class CSSLayoutFlexWrapTest {
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setAlignItems(CSSAlign.CENTER);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleWidth(100f);
|
||||
root.setWidth(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(30f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(30f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(30f);
|
||||
root_child1.setStyleHeight(20f);
|
||||
root_child1.setWidth(30f);
|
||||
root_child1.setHeight(20f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(30f);
|
||||
root_child2.setStyleHeight(30f);
|
||||
root_child2.setWidth(30f);
|
||||
root_child2.setHeight(30f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(30f);
|
||||
root_child3.setStyleHeight(30f);
|
||||
root_child3.setWidth(30f);
|
||||
root_child3.setHeight(30f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -20,19 +20,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
public void test_justify_content_row_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -86,19 +86,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setJustifyContent(CSSJustify.FLEX_END);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -152,19 +152,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setJustifyContent(CSSJustify.CENTER);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -218,19 +218,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setJustifyContent(CSSJustify.SPACE_BETWEEN);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -284,19 +284,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setJustifyContent(CSSJustify.SPACE_AROUND);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -348,18 +348,18 @@ public class CSSLayoutJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_column_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -412,19 +412,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
public void test_justify_content_column_flex_end() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.FLEX_END);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -477,19 +477,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
public void test_justify_content_column_center() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.CENTER);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -542,19 +542,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
public void test_justify_content_column_space_between() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.SPACE_BETWEEN);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -607,19 +607,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
public void test_justify_content_column_space_around() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.SPACE_AROUND);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -20,12 +20,12 @@ public class CSSLayoutMarginTest {
|
||||
public void test_margin_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setMargin(Spacing.START, 10f);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -57,12 +57,12 @@ public class CSSLayoutMarginTest {
|
||||
@Test
|
||||
public void test_margin_top() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setMargin(Spacing.TOP, 10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -96,12 +96,12 @@ public class CSSLayoutMarginTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setJustifyContent(CSSJustify.FLEX_END);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setMargin(Spacing.END, 10f);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -134,12 +134,12 @@ public class CSSLayoutMarginTest {
|
||||
public void test_margin_bottom() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.FLEX_END);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setMargin(Spacing.BOTTOM, 10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -172,8 +172,8 @@ public class CSSLayoutMarginTest {
|
||||
public void test_margin_and_flex_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -209,8 +209,8 @@ public class CSSLayoutMarginTest {
|
||||
@Test
|
||||
public void test_margin_and_flex_column() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -247,8 +247,8 @@ public class CSSLayoutMarginTest {
|
||||
public void test_margin_and_stretch_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -284,8 +284,8 @@ public class CSSLayoutMarginTest {
|
||||
@Test
|
||||
public void test_margin_and_stretch_column() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -322,8 +322,8 @@ public class CSSLayoutMarginTest {
|
||||
public void test_margin_with_sibling_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -372,8 +372,8 @@ public class CSSLayoutMarginTest {
|
||||
@Test
|
||||
public void test_margin_with_sibling_column() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
|
@@ -19,12 +19,12 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_max_width() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleMaxWidth(50f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setMaxWidth(50f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -57,12 +57,12 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
public void test_max_height() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleMaxHeight(50f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setMaxHeight(50f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -94,12 +94,12 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_min_height() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setStyleMinHeight(60f);
|
||||
root_child0.setMinHeight(60f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
@@ -146,12 +146,12 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
public void test_min_width() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setStyleMinWidth(60f);
|
||||
root_child0.setMinWidth(60f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
@@ -198,13 +198,13 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
public void test_justify_content_min_max() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.CENTER);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleMinHeight(100f);
|
||||
root.setStyleMaxHeight(200f);
|
||||
root.setWidth(100f);
|
||||
root.setMinHeight(100f);
|
||||
root.setMaxHeight(200f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(60f);
|
||||
root_child0.setStyleHeight(60f);
|
||||
root_child0.setWidth(60f);
|
||||
root_child0.setHeight(60f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -237,13 +237,13 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
public void test_align_items_min_max() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignItems(CSSAlign.CENTER);
|
||||
root.setStyleMinWidth(100f);
|
||||
root.setStyleMaxWidth(200f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setMinWidth(100f);
|
||||
root.setMaxWidth(200f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(60f);
|
||||
root_child0.setStyleHeight(60f);
|
||||
root_child0.setWidth(60f);
|
||||
root_child0.setHeight(60f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -276,22 +276,22 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
public void test_justify_content_overflow_min_max() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.CENTER);
|
||||
root.setStyleMinHeight(100f);
|
||||
root.setStyleMaxHeight(110f);
|
||||
root.setMinHeight(100f);
|
||||
root.setMaxHeight(110f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(50f);
|
||||
root_child0.setStyleHeight(50f);
|
||||
root_child0.setWidth(50f);
|
||||
root_child0.setHeight(50f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(50f);
|
||||
root_child1.setStyleHeight(50f);
|
||||
root_child1.setWidth(50f);
|
||||
root_child1.setHeight(50f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(50f);
|
||||
root_child2.setStyleHeight(50f);
|
||||
root_child2.setWidth(50f);
|
||||
root_child2.setHeight(50f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -343,17 +343,17 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_within_max_width() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(200f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(200f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root_child0.setStyleMaxWidth(100f);
|
||||
root_child0.setMaxWidth(100f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child0_child0 = new CSSNode();
|
||||
root_child0_child0.setFlexGrow(1f);
|
||||
root_child0_child0.setStyleHeight(20f);
|
||||
root_child0_child0.setHeight(20f);
|
||||
root_child0.addChildAt(root_child0_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -395,17 +395,17 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_within_constrained_max_width() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(200f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(200f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root_child0.setStyleMaxWidth(300f);
|
||||
root_child0.setMaxWidth(300f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child0_child0 = new CSSNode();
|
||||
root_child0_child0.setFlexGrow(1f);
|
||||
root_child0_child0.setStyleHeight(20f);
|
||||
root_child0_child0.setHeight(20f);
|
||||
root_child0.addChildAt(root_child0_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -49,8 +49,8 @@ public class CSSLayoutPaddingTest {
|
||||
root.setPadding(Spacing.BOTTOM, 10);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -86,12 +86,12 @@ public class CSSLayoutPaddingTest {
|
||||
root.setPadding(Spacing.TOP, 10);
|
||||
root.setPadding(Spacing.RIGHT, 10);
|
||||
root.setPadding(Spacing.BOTTOM, 10);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -127,11 +127,11 @@ public class CSSLayoutPaddingTest {
|
||||
root.setPadding(Spacing.TOP, 10);
|
||||
root.setPadding(Spacing.RIGHT, 10);
|
||||
root.setPadding(Spacing.BOTTOM, 10);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -168,12 +168,12 @@ public class CSSLayoutPaddingTest {
|
||||
root.setPadding(Spacing.START, 10);
|
||||
root.setPadding(Spacing.END, 20);
|
||||
root.setPadding(Spacing.BOTTOM, 20);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -22,8 +22,8 @@ public class CSSLayoutRoundingTest {
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -91,8 +91,8 @@ public class CSSLayoutRoundingTest {
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(113f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(113f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -188,8 +188,8 @@ public class CSSLayoutRoundingTest {
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(101f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(101f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexShrink(1f);
|
||||
@@ -257,23 +257,23 @@ public class CSSLayoutRoundingTest {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(113f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(113f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setFlexBasis(50f);
|
||||
root_child0.setStyleHeight(20f);
|
||||
root_child0.setHeight(20f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -329,23 +329,23 @@ public class CSSLayoutRoundingTest {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(87.4f);
|
||||
root.setStyleHeight(113.4f);
|
||||
root.setWidth(87.4f);
|
||||
root.setHeight(113.4f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(0.7f);
|
||||
root_child0.setFlexBasis(50.3f);
|
||||
root_child0.setStyleHeight(20.3f);
|
||||
root_child0.setHeight(20.3f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1.6f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1.1f);
|
||||
root_child2.setStyleHeight(10.7f);
|
||||
root_child2.setHeight(10.7f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -401,37 +401,37 @@ public class CSSLayoutRoundingTest {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(87.4f);
|
||||
root.setStyleHeight(113.4f);
|
||||
root.setWidth(87.4f);
|
||||
root.setHeight(113.4f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(0.7f);
|
||||
root_child0.setFlexBasis(50.3f);
|
||||
root_child0.setStyleHeight(20.3f);
|
||||
root_child0.setHeight(20.3f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child0_child0 = new CSSNode();
|
||||
root_child0_child0.setFlexGrow(1f);
|
||||
root_child0_child0.setFlexBasis(0.3f);
|
||||
root_child0_child0.setPosition(Spacing.BOTTOM, 13.3f);
|
||||
root_child0_child0.setStyleHeight(9.9f);
|
||||
root_child0_child0.setHeight(9.9f);
|
||||
root_child0.addChildAt(root_child0_child0, 0);
|
||||
|
||||
final CSSNode root_child0_child1 = new CSSNode();
|
||||
root_child0_child1.setFlexGrow(4f);
|
||||
root_child0_child1.setFlexBasis(0.3f);
|
||||
root_child0_child1.setPosition(Spacing.TOP, 13.3f);
|
||||
root_child0_child1.setStyleHeight(1.1f);
|
||||
root_child0_child1.setHeight(1.1f);
|
||||
root_child0.addChildAt(root_child0_child1, 1);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1.6f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1.1f);
|
||||
root_child2.setStyleHeight(10.7f);
|
||||
root_child2.setHeight(10.7f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -507,23 +507,23 @@ public class CSSLayoutRoundingTest {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(113.4f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(113.4f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setFlexBasis(50f);
|
||||
root_child0.setStyleHeight(20f);
|
||||
root_child0.setHeight(20f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -579,23 +579,23 @@ public class CSSLayoutRoundingTest {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(113.6f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(113.6f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setFlexBasis(50f);
|
||||
root_child0.setStyleHeight(20f);
|
||||
root_child0.setHeight(20f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -652,23 +652,23 @@ public class CSSLayoutRoundingTest {
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setPosition(Spacing.TOP, 0.3f);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(113.4f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(113.4f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setFlexBasis(50f);
|
||||
root_child0.setStyleHeight(20f);
|
||||
root_child0.setHeight(20f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -725,23 +725,23 @@ public class CSSLayoutRoundingTest {
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setPosition(Spacing.TOP, 0.7f);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(113.4f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(113.4f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setFlexBasis(50f);
|
||||
root_child0.setStyleHeight(20f);
|
||||
root_child0.setHeight(20f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -76,12 +76,12 @@ public class CSSNodeTest {
|
||||
@Test
|
||||
public void testCopyStyle() {
|
||||
final CSSNode node0 = new CSSNode();
|
||||
assertTrue(CSSConstants.isUndefined(node0.getStyleMaxHeight()));
|
||||
assertTrue(CSSConstants.isUndefined(node0.getMaxHeight()));
|
||||
|
||||
final CSSNode node1 = new CSSNode();
|
||||
node1.setStyleMaxHeight(100);
|
||||
node1.setMaxHeight(100);
|
||||
|
||||
node0.copyStyle(node1);
|
||||
assertEquals(100, (int) node0.getStyleMaxHeight());
|
||||
assertEquals(100, (int) node0.getMaxHeight());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user