Use LTR and RTL instead obsolete enums
Summary: Use LTR and RTL instead obsolete LeftToRight and RightToLeft enums Reviewed By: emilsjolander Differential Revision: D4175897 fbshipit-source-id: d22af46d3292f9ad1754f571e95cb64b11722f7b
This commit is contained in:
committed by
Facebook Github Bot
parent
d1c555fede
commit
d80bac4234
@@ -61,7 +61,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -74,7 +74,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -102,7 +102,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -115,7 +115,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -143,7 +143,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.SetPosition(CSSEdge.End, 10);
|
root_child0.SetPosition(CSSEdge.End, 10);
|
||||||
root_child0.SetPosition(CSSEdge.Bottom, 10);
|
root_child0.SetPosition(CSSEdge.Bottom, 10);
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -156,7 +156,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(80, root_child0.LayoutWidth);
|
Assert.AreEqual(80, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(80, root_child0.LayoutHeight);
|
Assert.AreEqual(80, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -186,7 +186,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -199,7 +199,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -232,7 +232,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0_child0.StyleWidth = 100;
|
root_child0_child0.StyleWidth = 100;
|
||||||
root_child0_child0.StyleHeight = 100;
|
root_child0_child0.StyleHeight = 100;
|
||||||
root_child0.Insert(0, root_child0_child0);
|
root_child0.Insert(0, root_child0_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -250,7 +250,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child0_child0.LayoutWidth);
|
Assert.AreEqual(100, root_child0_child0.LayoutWidth);
|
||||||
Assert.AreEqual(100, root_child0_child0.LayoutHeight);
|
Assert.AreEqual(100, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -303,7 +303,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child1.StyleWidth = 50;
|
root_child1.StyleWidth = 50;
|
||||||
root_child1.StyleHeight = 50;
|
root_child1.StyleHeight = 50;
|
||||||
root.Insert(1, root_child1);
|
root.Insert(1, root_child1);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(10, root.LayoutX);
|
Assert.AreEqual(10, root.LayoutX);
|
||||||
@@ -321,7 +321,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(50, root_child1.LayoutWidth);
|
Assert.AreEqual(50, root_child1.LayoutWidth);
|
||||||
Assert.AreEqual(50, root_child1.LayoutHeight);
|
Assert.AreEqual(50, root_child1.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(10, root.LayoutX);
|
Assert.AreEqual(10, root.LayoutX);
|
||||||
|
@@ -84,7 +84,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child4.StyleWidth = 50;
|
root_child4.StyleWidth = 50;
|
||||||
root_child4.StyleHeight = 10;
|
root_child4.StyleHeight = 10;
|
||||||
root.Insert(4, root_child4);
|
root.Insert(4, root_child4);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -117,7 +117,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(50, root_child4.LayoutWidth);
|
Assert.AreEqual(50, root_child4.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child4.LayoutHeight);
|
Assert.AreEqual(10, root_child4.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -184,7 +184,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child4.StyleWidth = 50;
|
root_child4.StyleWidth = 50;
|
||||||
root_child4.StyleHeight = 10;
|
root_child4.StyleHeight = 10;
|
||||||
root.Insert(4, root_child4);
|
root.Insert(4, root_child4);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -217,7 +217,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(50, root_child4.LayoutWidth);
|
Assert.AreEqual(50, root_child4.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child4.LayoutHeight);
|
Assert.AreEqual(10, root_child4.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -284,7 +284,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child4.StyleWidth = 50;
|
root_child4.StyleWidth = 50;
|
||||||
root_child4.StyleHeight = 10;
|
root_child4.StyleHeight = 10;
|
||||||
root.Insert(4, root_child4);
|
root.Insert(4, root_child4);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -317,7 +317,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(50, root_child4.LayoutWidth);
|
Assert.AreEqual(50, root_child4.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child4.LayoutHeight);
|
Assert.AreEqual(10, root_child4.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -379,7 +379,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child4 = new CSSNode();
|
CSSNode root_child4 = new CSSNode();
|
||||||
root_child4.StyleWidth = 50;
|
root_child4.StyleWidth = 50;
|
||||||
root.Insert(4, root_child4);
|
root.Insert(4, root_child4);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -412,7 +412,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(50, root_child4.LayoutWidth);
|
Assert.AreEqual(50, root_child4.LayoutWidth);
|
||||||
Assert.AreEqual(0, root_child4.LayoutHeight);
|
Assert.AreEqual(0, root_child4.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
|
@@ -46,7 +46,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child0 = new CSSNode();
|
CSSNode root_child0 = new CSSNode();
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -59,7 +59,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child0.LayoutWidth);
|
Assert.AreEqual(100, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -85,7 +85,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -98,7 +98,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -124,7 +124,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -137,7 +137,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -163,7 +163,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -176,7 +176,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
|
@@ -48,7 +48,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -61,7 +61,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -87,7 +87,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -100,7 +100,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -126,7 +126,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -139,7 +139,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -166,7 +166,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -179,7 +179,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
|
@@ -47,7 +47,7 @@ namespace Facebook.CSSLayout
|
|||||||
root.SetBorder(CSSEdge.Top, 10);
|
root.SetBorder(CSSEdge.Top, 10);
|
||||||
root.SetBorder(CSSEdge.Right, 10);
|
root.SetBorder(CSSEdge.Right, 10);
|
||||||
root.SetBorder(CSSEdge.Bottom, 10);
|
root.SetBorder(CSSEdge.Bottom, 10);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -55,7 +55,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(20, root.LayoutWidth);
|
Assert.AreEqual(20, root.LayoutWidth);
|
||||||
Assert.AreEqual(20, root.LayoutHeight);
|
Assert.AreEqual(20, root.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -77,7 +77,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -90,7 +90,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -119,7 +119,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.FlexGrow = 1;
|
root_child0.FlexGrow = 1;
|
||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -132,7 +132,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(80, root_child0.LayoutHeight);
|
Assert.AreEqual(80, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -160,7 +160,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child0 = new CSSNode();
|
CSSNode root_child0 = new CSSNode();
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -173,7 +173,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(80, root_child0.LayoutWidth);
|
Assert.AreEqual(80, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -203,7 +203,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -216,7 +216,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
|
@@ -73,7 +73,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleHeight = 10;
|
root_child2.StyleHeight = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -96,7 +96,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child2.LayoutWidth);
|
Assert.AreEqual(100, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child2.LayoutHeight);
|
Assert.AreEqual(10, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -138,7 +138,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleWidth = 10;
|
root_child2.StyleWidth = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -161,7 +161,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child2.LayoutWidth);
|
Assert.AreEqual(10, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(100, root_child2.LayoutHeight);
|
Assert.AreEqual(100, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -203,7 +203,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleHeight = 10;
|
root_child2.StyleHeight = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -226,7 +226,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child2.LayoutWidth);
|
Assert.AreEqual(100, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child2.LayoutHeight);
|
Assert.AreEqual(10, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -269,7 +269,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleWidth = 10;
|
root_child2.StyleWidth = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -292,7 +292,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child2.LayoutWidth);
|
Assert.AreEqual(10, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(100, root_child2.LayoutHeight);
|
Assert.AreEqual(100, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -335,7 +335,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleHeight = 10;
|
root_child2.StyleHeight = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -358,7 +358,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child2.LayoutWidth);
|
Assert.AreEqual(100, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child2.LayoutHeight);
|
Assert.AreEqual(10, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -401,7 +401,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleWidth = 10;
|
root_child2.StyleWidth = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -424,7 +424,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child2.LayoutWidth);
|
Assert.AreEqual(10, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(100, root_child2.LayoutHeight);
|
Assert.AreEqual(100, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
|
@@ -73,7 +73,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child1 = new CSSNode();
|
CSSNode root_child1 = new CSSNode();
|
||||||
root_child1.FlexGrow = 1;
|
root_child1.FlexGrow = 1;
|
||||||
root.Insert(1, root_child1);
|
root.Insert(1, root_child1);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -91,7 +91,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child1.LayoutWidth);
|
Assert.AreEqual(100, root_child1.LayoutWidth);
|
||||||
Assert.AreEqual(25, root_child1.LayoutHeight);
|
Assert.AreEqual(25, root_child1.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -126,7 +126,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child1 = new CSSNode();
|
CSSNode root_child1 = new CSSNode();
|
||||||
root_child1.FlexGrow = 1;
|
root_child1.FlexGrow = 1;
|
||||||
root.Insert(1, root_child1);
|
root.Insert(1, root_child1);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -144,7 +144,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(25, root_child1.LayoutWidth);
|
Assert.AreEqual(25, root_child1.LayoutWidth);
|
||||||
Assert.AreEqual(100, root_child1.LayoutHeight);
|
Assert.AreEqual(100, root_child1.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -178,7 +178,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child1 = new CSSNode();
|
CSSNode root_child1 = new CSSNode();
|
||||||
root_child1.FlexBasis = 50;
|
root_child1.FlexBasis = 50;
|
||||||
root.Insert(1, root_child1);
|
root.Insert(1, root_child1);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -196,7 +196,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child1.LayoutWidth);
|
Assert.AreEqual(100, root_child1.LayoutWidth);
|
||||||
Assert.AreEqual(50, root_child1.LayoutHeight);
|
Assert.AreEqual(50, root_child1.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -231,7 +231,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child1 = new CSSNode();
|
CSSNode root_child1 = new CSSNode();
|
||||||
root_child1.FlexBasis = 50;
|
root_child1.FlexBasis = 50;
|
||||||
root.Insert(1, root_child1);
|
root.Insert(1, root_child1);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -249,7 +249,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(50, root_child1.LayoutWidth);
|
Assert.AreEqual(50, root_child1.LayoutWidth);
|
||||||
Assert.AreEqual(100, root_child1.LayoutHeight);
|
Assert.AreEqual(100, root_child1.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -289,7 +289,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child2.StyleWidth = 50;
|
root_child2.StyleWidth = 50;
|
||||||
root_child2.StyleHeight = 50;
|
root_child2.StyleHeight = 50;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -312,7 +312,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(50, root_child2.LayoutWidth);
|
Assert.AreEqual(50, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(50, root_child2.LayoutHeight);
|
Assert.AreEqual(50, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -358,7 +358,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child2.FlexGrow = 1;
|
root_child2.FlexGrow = 1;
|
||||||
root_child2.StyleHeight = 10;
|
root_child2.StyleHeight = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -381,7 +381,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child2.LayoutWidth);
|
Assert.AreEqual(100, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(20, root_child2.LayoutHeight);
|
Assert.AreEqual(20, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -419,7 +419,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0_child0.FlexGrow = 1;
|
root_child0_child0.FlexGrow = 1;
|
||||||
root_child0_child0.FlexShrink = 1;
|
root_child0_child0.FlexShrink = 1;
|
||||||
root_child0.Insert(0, root_child0_child0);
|
root_child0.Insert(0, root_child0_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -437,7 +437,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child0_child0.LayoutWidth);
|
Assert.AreEqual(100, root_child0_child0.LayoutWidth);
|
||||||
Assert.AreEqual(0, root_child0_child0.LayoutHeight);
|
Assert.AreEqual(0, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
|
@@ -74,7 +74,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child3.StyleWidth = 30;
|
root_child3.StyleWidth = 30;
|
||||||
root_child3.StyleHeight = 30;
|
root_child3.StyleHeight = 30;
|
||||||
root.Insert(3, root_child3);
|
root.Insert(3, root_child3);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -102,7 +102,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(30, root_child3.LayoutWidth);
|
Assert.AreEqual(30, root_child3.LayoutWidth);
|
||||||
Assert.AreEqual(30, root_child3.LayoutHeight);
|
Assert.AreEqual(30, root_child3.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -158,7 +158,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child3.StyleWidth = 30;
|
root_child3.StyleWidth = 30;
|
||||||
root_child3.StyleHeight = 30;
|
root_child3.StyleHeight = 30;
|
||||||
root.Insert(3, root_child3);
|
root.Insert(3, root_child3);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -186,7 +186,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(30, root_child3.LayoutWidth);
|
Assert.AreEqual(30, root_child3.LayoutWidth);
|
||||||
Assert.AreEqual(30, root_child3.LayoutHeight);
|
Assert.AreEqual(30, root_child3.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -243,7 +243,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child3.StyleWidth = 30;
|
root_child3.StyleWidth = 30;
|
||||||
root_child3.StyleHeight = 30;
|
root_child3.StyleHeight = 30;
|
||||||
root.Insert(3, root_child3);
|
root.Insert(3, root_child3);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -271,7 +271,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(30, root_child3.LayoutWidth);
|
Assert.AreEqual(30, root_child3.LayoutWidth);
|
||||||
Assert.AreEqual(30, root_child3.LayoutHeight);
|
Assert.AreEqual(30, root_child3.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -328,7 +328,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child3.StyleWidth = 30;
|
root_child3.StyleWidth = 30;
|
||||||
root_child3.StyleHeight = 30;
|
root_child3.StyleHeight = 30;
|
||||||
root.Insert(3, root_child3);
|
root.Insert(3, root_child3);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -356,7 +356,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(30, root_child3.LayoutWidth);
|
Assert.AreEqual(30, root_child3.LayoutWidth);
|
||||||
Assert.AreEqual(30, root_child3.LayoutHeight);
|
Assert.AreEqual(30, root_child3.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
|
@@ -99,7 +99,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleWidth = 10;
|
root_child2.StyleWidth = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -122,7 +122,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child2.LayoutWidth);
|
Assert.AreEqual(10, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(102, root_child2.LayoutHeight);
|
Assert.AreEqual(102, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -166,7 +166,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleWidth = 10;
|
root_child2.StyleWidth = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -189,7 +189,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child2.LayoutWidth);
|
Assert.AreEqual(10, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(102, root_child2.LayoutHeight);
|
Assert.AreEqual(102, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -233,7 +233,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleWidth = 10;
|
root_child2.StyleWidth = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -256,7 +256,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child2.LayoutWidth);
|
Assert.AreEqual(10, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(102, root_child2.LayoutHeight);
|
Assert.AreEqual(102, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -300,7 +300,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleWidth = 10;
|
root_child2.StyleWidth = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -323,7 +323,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child2.LayoutWidth);
|
Assert.AreEqual(10, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(102, root_child2.LayoutHeight);
|
Assert.AreEqual(102, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -367,7 +367,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleWidth = 10;
|
root_child2.StyleWidth = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -390,7 +390,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child2.LayoutWidth);
|
Assert.AreEqual(10, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(102, root_child2.LayoutHeight);
|
Assert.AreEqual(102, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -431,7 +431,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleHeight = 10;
|
root_child2.StyleHeight = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -454,7 +454,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(102, root_child2.LayoutWidth);
|
Assert.AreEqual(102, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child2.LayoutHeight);
|
Assert.AreEqual(10, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -497,7 +497,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleHeight = 10;
|
root_child2.StyleHeight = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -520,7 +520,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(102, root_child2.LayoutWidth);
|
Assert.AreEqual(102, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child2.LayoutHeight);
|
Assert.AreEqual(10, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -563,7 +563,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleHeight = 10;
|
root_child2.StyleHeight = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -586,7 +586,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(102, root_child2.LayoutWidth);
|
Assert.AreEqual(102, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child2.LayoutHeight);
|
Assert.AreEqual(10, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -629,7 +629,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleHeight = 10;
|
root_child2.StyleHeight = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -652,7 +652,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(102, root_child2.LayoutWidth);
|
Assert.AreEqual(102, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child2.LayoutHeight);
|
Assert.AreEqual(10, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -695,7 +695,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child2 = new CSSNode();
|
CSSNode root_child2 = new CSSNode();
|
||||||
root_child2.StyleHeight = 10;
|
root_child2.StyleHeight = 10;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -718,7 +718,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(102, root_child2.LayoutWidth);
|
Assert.AreEqual(102, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child2.LayoutHeight);
|
Assert.AreEqual(10, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
|
@@ -74,7 +74,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.SetMargin(CSSEdge.Start, 10);
|
root_child0.SetMargin(CSSEdge.Start, 10);
|
||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -87,7 +87,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(100, root_child0.LayoutHeight);
|
Assert.AreEqual(100, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -112,7 +112,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.SetMargin(CSSEdge.Top, 10);
|
root_child0.SetMargin(CSSEdge.Top, 10);
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -125,7 +125,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child0.LayoutWidth);
|
Assert.AreEqual(100, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -152,7 +152,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.SetMargin(CSSEdge.End, 10);
|
root_child0.SetMargin(CSSEdge.End, 10);
|
||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -165,7 +165,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(100, root_child0.LayoutHeight);
|
Assert.AreEqual(100, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -191,7 +191,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.SetMargin(CSSEdge.Bottom, 10);
|
root_child0.SetMargin(CSSEdge.Bottom, 10);
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -204,7 +204,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child0.LayoutWidth);
|
Assert.AreEqual(100, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -230,7 +230,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.FlexGrow = 1;
|
root_child0.FlexGrow = 1;
|
||||||
root_child0.SetMargin(CSSEdge.Start, 10);
|
root_child0.SetMargin(CSSEdge.Start, 10);
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -243,7 +243,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(90, root_child0.LayoutWidth);
|
Assert.AreEqual(90, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(100, root_child0.LayoutHeight);
|
Assert.AreEqual(100, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -268,7 +268,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.FlexGrow = 1;
|
root_child0.FlexGrow = 1;
|
||||||
root_child0.SetMargin(CSSEdge.Top, 10);
|
root_child0.SetMargin(CSSEdge.Top, 10);
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -281,7 +281,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child0.LayoutWidth);
|
Assert.AreEqual(100, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(90, root_child0.LayoutHeight);
|
Assert.AreEqual(90, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -307,7 +307,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.FlexGrow = 1;
|
root_child0.FlexGrow = 1;
|
||||||
root_child0.SetMargin(CSSEdge.Top, 10);
|
root_child0.SetMargin(CSSEdge.Top, 10);
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -320,7 +320,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child0.LayoutWidth);
|
Assert.AreEqual(100, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(90, root_child0.LayoutHeight);
|
Assert.AreEqual(90, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -345,7 +345,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.FlexGrow = 1;
|
root_child0.FlexGrow = 1;
|
||||||
root_child0.SetMargin(CSSEdge.Start, 10);
|
root_child0.SetMargin(CSSEdge.Start, 10);
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -358,7 +358,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(90, root_child0.LayoutWidth);
|
Assert.AreEqual(90, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(100, root_child0.LayoutHeight);
|
Assert.AreEqual(100, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -387,7 +387,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child1 = new CSSNode();
|
CSSNode root_child1 = new CSSNode();
|
||||||
root_child1.FlexGrow = 1;
|
root_child1.FlexGrow = 1;
|
||||||
root.Insert(1, root_child1);
|
root.Insert(1, root_child1);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -405,7 +405,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(50, root_child1.LayoutWidth);
|
Assert.AreEqual(50, root_child1.LayoutWidth);
|
||||||
Assert.AreEqual(100, root_child1.LayoutHeight);
|
Assert.AreEqual(100, root_child1.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -438,7 +438,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child1 = new CSSNode();
|
CSSNode root_child1 = new CSSNode();
|
||||||
root_child1.FlexGrow = 1;
|
root_child1.FlexGrow = 1;
|
||||||
root.Insert(1, root_child1);
|
root.Insert(1, root_child1);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -456,7 +456,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child1.LayoutWidth);
|
Assert.AreEqual(100, root_child1.LayoutWidth);
|
||||||
Assert.AreEqual(50, root_child1.LayoutHeight);
|
Assert.AreEqual(50, root_child1.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
|
@@ -75,7 +75,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleMaxWidth = 50;
|
root_child0.StyleMaxWidth = 50;
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -88,7 +88,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(50, root_child0.LayoutWidth);
|
Assert.AreEqual(50, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -114,7 +114,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root_child0.StyleMaxHeight = 50;
|
root_child0.StyleMaxHeight = 50;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -127,7 +127,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(50, root_child0.LayoutHeight);
|
Assert.AreEqual(50, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -156,7 +156,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child1 = new CSSNode();
|
CSSNode root_child1 = new CSSNode();
|
||||||
root_child1.FlexGrow = 1;
|
root_child1.FlexGrow = 1;
|
||||||
root.Insert(1, root_child1);
|
root.Insert(1, root_child1);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -174,7 +174,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child1.LayoutWidth);
|
Assert.AreEqual(100, root_child1.LayoutWidth);
|
||||||
Assert.AreEqual(20, root_child1.LayoutHeight);
|
Assert.AreEqual(20, root_child1.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -209,7 +209,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child1 = new CSSNode();
|
CSSNode root_child1 = new CSSNode();
|
||||||
root_child1.FlexGrow = 1;
|
root_child1.FlexGrow = 1;
|
||||||
root.Insert(1, root_child1);
|
root.Insert(1, root_child1);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -227,7 +227,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(20, root_child1.LayoutWidth);
|
Assert.AreEqual(20, root_child1.LayoutWidth);
|
||||||
Assert.AreEqual(100, root_child1.LayoutHeight);
|
Assert.AreEqual(100, root_child1.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -259,7 +259,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 60;
|
root_child0.StyleWidth = 60;
|
||||||
root_child0.StyleHeight = 60;
|
root_child0.StyleHeight = 60;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -272,7 +272,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(60, root_child0.LayoutWidth);
|
Assert.AreEqual(60, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(60, root_child0.LayoutHeight);
|
Assert.AreEqual(60, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -299,7 +299,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 60;
|
root_child0.StyleWidth = 60;
|
||||||
root_child0.StyleHeight = 60;
|
root_child0.StyleHeight = 60;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -312,7 +312,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(60, root_child0.LayoutWidth);
|
Assert.AreEqual(60, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(60, root_child0.LayoutHeight);
|
Assert.AreEqual(60, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -348,7 +348,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child2.StyleWidth = 50;
|
root_child2.StyleWidth = 50;
|
||||||
root_child2.StyleHeight = 50;
|
root_child2.StyleHeight = 50;
|
||||||
root.Insert(2, root_child2);
|
root.Insert(2, root_child2);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -371,7 +371,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(50, root_child2.LayoutWidth);
|
Assert.AreEqual(50, root_child2.LayoutWidth);
|
||||||
Assert.AreEqual(50, root_child2.LayoutHeight);
|
Assert.AreEqual(50, root_child2.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -411,7 +411,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0_child0.FlexGrow = 1;
|
root_child0_child0.FlexGrow = 1;
|
||||||
root_child0_child0.StyleHeight = 20;
|
root_child0_child0.StyleHeight = 20;
|
||||||
root_child0.Insert(0, root_child0_child0);
|
root_child0.Insert(0, root_child0_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -429,7 +429,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(100, root_child0_child0.LayoutWidth);
|
Assert.AreEqual(100, root_child0_child0.LayoutWidth);
|
||||||
Assert.AreEqual(20, root_child0_child0.LayoutHeight);
|
Assert.AreEqual(20, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -464,7 +464,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0_child0.FlexGrow = 1;
|
root_child0_child0.FlexGrow = 1;
|
||||||
root_child0_child0.StyleHeight = 20;
|
root_child0_child0.StyleHeight = 20;
|
||||||
root_child0.Insert(0, root_child0_child0);
|
root_child0.Insert(0, root_child0_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -482,7 +482,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(200, root_child0_child0.LayoutWidth);
|
Assert.AreEqual(200, root_child0_child0.LayoutWidth);
|
||||||
Assert.AreEqual(20, root_child0_child0.LayoutHeight);
|
Assert.AreEqual(20, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
|
@@ -47,7 +47,7 @@ namespace Facebook.CSSLayout
|
|||||||
root.SetPadding(CSSEdge.Top, 10);
|
root.SetPadding(CSSEdge.Top, 10);
|
||||||
root.SetPadding(CSSEdge.Right, 10);
|
root.SetPadding(CSSEdge.Right, 10);
|
||||||
root.SetPadding(CSSEdge.Bottom, 10);
|
root.SetPadding(CSSEdge.Bottom, 10);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -55,7 +55,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(20, root.LayoutWidth);
|
Assert.AreEqual(20, root.LayoutWidth);
|
||||||
Assert.AreEqual(20, root.LayoutHeight);
|
Assert.AreEqual(20, root.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -77,7 +77,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -90,7 +90,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -119,7 +119,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.FlexGrow = 1;
|
root_child0.FlexGrow = 1;
|
||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -132,7 +132,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(80, root_child0.LayoutHeight);
|
Assert.AreEqual(80, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -160,7 +160,7 @@ namespace Facebook.CSSLayout
|
|||||||
CSSNode root_child0 = new CSSNode();
|
CSSNode root_child0 = new CSSNode();
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -173,7 +173,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(80, root_child0.LayoutWidth);
|
Assert.AreEqual(80, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -203,7 +203,7 @@ namespace Facebook.CSSLayout
|
|||||||
root_child0.StyleWidth = 10;
|
root_child0.StyleWidth = 10;
|
||||||
root_child0.StyleHeight = 10;
|
root_child0.StyleHeight = 10;
|
||||||
root.Insert(0, root_child0);
|
root.Insert(0, root_child0);
|
||||||
root.StyleDirection = CSSDirection.LeftToRight;
|
root.StyleDirection = CSSDirection.LTR;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
@@ -216,7 +216,7 @@ namespace Facebook.CSSLayout
|
|||||||
Assert.AreEqual(10, root_child0.LayoutWidth);
|
Assert.AreEqual(10, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(10, root_child0.LayoutHeight);
|
Assert.AreEqual(10, root_child0.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = CSSDirection.RightToLeft;
|
root.StyleDirection = CSSDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
|
|
||||||
Assert.AreEqual(0, root.LayoutX);
|
Assert.AreEqual(0, root.LayoutX);
|
||||||
|
@@ -71,8 +71,8 @@ CSEmitter.prototype = Object.create(Emitter.prototype, {
|
|||||||
CSSAlignStretch:{value:'CSSAlign.Stretch'},
|
CSSAlignStretch:{value:'CSSAlign.Stretch'},
|
||||||
|
|
||||||
CSSDirectionInherit:{value:'CSSDirection.Inherit'},
|
CSSDirectionInherit:{value:'CSSDirection.Inherit'},
|
||||||
CSSDirectionLTR:{value:'CSSDirection.LeftToRight'},
|
CSSDirectionLTR:{value:'CSSDirection.LTR'},
|
||||||
CSSDirectionRTL:{value:'CSSDirection.RightToLeft'},
|
CSSDirectionRTL:{value:'CSSDirection.RTL'},
|
||||||
|
|
||||||
CSSEdgeBottom:{value:'CSSEdge.Bottom'},
|
CSSEdgeBottom:{value:'CSSEdge.Bottom'},
|
||||||
CSSEdgeEnd:{value:'CSSEdge.End'},
|
CSSEdgeEnd:{value:'CSSEdge.End'},
|
||||||
|
Reference in New Issue
Block a user