tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 497HTML 254C 19JavaScript 81329 Sutichaykuna

fex wrap_column test as chrome is not abiding by spec

ec8ae76d4dd049dc48decdd4bc031041557b0868 · ruwaq Emil Sjölander · (7 wata ñawpaq) · tayta 9c0cbab08 · kay commitpi sach'ata qhaway

Semántico sayk'uy · 4

tests/generated.rs

5 qillqakuna · +67 −65

diff --git a/test_fixtures/wrap_column.html b/test_fixtures/wrap_column.html
index 16bf03588..0934d06a4 100644
--- a/test_fixtures/wrap_column.html
+++ b/test_fixtures/wrap_column.html
@@ -9,11 +9,11 @@
 <head/>
 <body>
 
-<div id="test-root" style="height: 100px; flex-wrap: wrap; flex-direction: column;">
-  <div style="height: 30px; width: 30px;"></div>
-  <div style="height: 30px; width: 30px;"></div>
-  <div style="height: 30px; width: 30px;"></div>
-  <div style="height: 30px; width: 30px;"></div>
+<div id="test-root" style="width: 100px; height: 100px; flex-wrap: wrap; flex-direction: column;">
+  <div style="height: 31px; width: 30px;"></div>
+  <div style="height: 32px; width: 30px;"></div>
+  <div style="height: 33px; width: 30px;"></div>
+  <div style="height: 34px; width: 30px;"></div>
 </div>
 
 </body>
diff --git a/test_fixtures/wrap_reverse_column.html b/test_fixtures/wrap_reverse_column.html
index d4c7fce04..2794228c7 100644
--- a/test_fixtures/wrap_reverse_column.html
+++ b/test_fixtures/wrap_reverse_column.html
@@ -9,11 +9,11 @@
 <head/>
 <body>
 
-<div id="test-root" style="height: 100px; flex-wrap: wrap-reverse; flex-direction: column;">
-  <div style="height: 30px; width: 30px;"></div>
-  <div style="height: 30px; width: 30px;"></div>
-  <div style="height: 30px; width: 30px;"></div>
-  <div style="height: 30px; width: 30px;"></div>
+<div id="test-root" style="width: 100px; height: 100px; flex-wrap: wrap-reverse; flex-direction: column;">
+  <div style="height: 31px; width: 30px;"></div>
+  <div style="height: 32px; width: 30px;"></div>
+  <div style="height: 33px; width: 30px;"></div>
+  <div style="height: 34px; width: 30px;"></div>
 </div>
 
 </body>
diff --git a/test_fixtures/wrap_reverse_row.html b/test_fixtures/wrap_reverse_row.html
index e22da776e..d61fbac7d 100644
--- a/test_fixtures/wrap_reverse_row.html
+++ b/test_fixtures/wrap_reverse_row.html
@@ -10,10 +10,10 @@
 <body>
 
 <div id="test-root" style="width: 100px; flex-direction: row; flex-wrap: wrap-reverse">
-  <div style="height: 30px; width: 30px;"></div>
-  <div style="height: 30px; width: 30px;"></div>
-  <div style="height: 30px; width: 30px;"></div>
-  <div style="height: 30px; width: 30px;"></div>
+  <div style="height: 30px; width: 31px;"></div>
+  <div style="height: 30px; width: 32px;"></div>
+  <div style="height: 30px; width: 33px;"></div>
+  <div style="height: 30px; width: 34px;"></div>
 </div>
 
 </body>
diff --git a/test_fixtures/wrap_row.html b/test_fixtures/wrap_row.html
index 111b5ea8c..842fdcd5c 100644
--- a/test_fixtures/wrap_row.html
+++ b/test_fixtures/wrap_row.html
@@ -10,10 +10,10 @@
 <body>
 
 <div id="test-root" style="width: 100px; flex-direction: row; flex-wrap: wrap">
-  <div style="height: 30px; width: 30px;"></div>
-  <div style="height: 30px; width: 30px;"></div>
-  <div style="height: 30px; width: 30px;"></div>
-  <div style="height: 30px; width: 30px;"></div>
+  <div style="height: 30px; width: 31px;"></div>
+  <div style="height: 30px; width: 32px;"></div>
+  <div style="height: 30px; width: 33px;"></div>
+  <div style="height: 30px; width: 34px;"></div>
 </div>
 
 </body>
diff --git a/tests/generated.rs b/tests/generated.rs
index 5ceab2806..3b13c112f 100644
--- a/tests/generated.rs
+++ b/tests/generated.rs
@@ -1424,22 +1424,22 @@ mod generated {
             width: stretch::style::Dimension::Points(100.0),
             children: vec![
                 stretch::style::Node {
-                    width: stretch::style::Dimension::Points(30.0),
+                    width: stretch::style::Dimension::Points(31.0),
                     height: stretch::style::Dimension::Points(30.0),
                     ..Default::default()
                 },
                 stretch::style::Node {
-                    width: stretch::style::Dimension::Points(30.0),
+                    width: stretch::style::Dimension::Points(32.0),
                     height: stretch::style::Dimension::Points(30.0),
                     ..Default::default()
                 },
                 stretch::style::Node {
-                    width: stretch::style::Dimension::Points(30.0),
+                    width: stretch::style::Dimension::Points(33.0),
                     height: stretch::style::Dimension::Points(30.0),
                     ..Default::default()
                 },
                 stretch::style::Node {
-                    width: stretch::style::Dimension::Points(30.0),
+                    width: stretch::style::Dimension::Points(34.0),
                     height: stretch::style::Dimension::Points(30.0),
                     ..Default::default()
                 },
@@ -1452,22 +1452,22 @@ mod generated {
         assert_eq!(layout.x, 0.0);
         assert_eq!(layout.y, 0.0);
 
-        assert_eq!(layout.children[0].width, 30.0);
+        assert_eq!(layout.children[0].width, 31.0);
         assert_eq!(layout.children[0].height, 30.0);
         assert_eq!(layout.children[0].x, 0.0);
         assert_eq!(layout.children[0].y, 30.0);
 
-        assert_eq!(layout.children[1].width, 30.0);
+        assert_eq!(layout.children[1].width, 32.0);
         assert_eq!(layout.children[1].height, 30.0);
-        assert_eq!(layout.children[1].x, 30.0);
+        assert_eq!(layout.children[1].x, 31.0);
         assert_eq!(layout.children[1].y, 30.0);
 
-        assert_eq!(layout.children[2].width, 30.0);
+        assert_eq!(layout.children[2].width, 33.0);
         assert_eq!(layout.children[2].height, 30.0);
-        assert_eq!(layout.children[2].x, 60.0);
+        assert_eq!(layout.children[2].x, 63.0);
         assert_eq!(layout.children[2].y, 30.0);
 
-        assert_eq!(layout.children[3].width, 30.0);
+        assert_eq!(layout.children[3].width, 34.0);
         assert_eq!(layout.children[3].height, 30.0);
         assert_eq!(layout.children[3].x, 0.0);
         assert_eq!(layout.children[3].y, 0.0);
@@ -3404,55 +3404,56 @@ mod generated {
         let layout = stretch::compute(&stretch::style::Node {
             flex_direction: stretch::style::FlexDirection::Column,
             flexWrap: stretch::style::FlexWrap::WrapReverse,
+            width: stretch::style::Dimension::Points(100.0),
             height: stretch::style::Dimension::Points(100.0),
             children: vec![
                 stretch::style::Node {
                     width: stretch::style::Dimension::Points(30.0),
-                    height: stretch::style::Dimension::Points(30.0),
+                    height: stretch::style::Dimension::Points(31.0),
                     ..Default::default()
                 },
                 stretch::style::Node {
                     width: stretch::style::Dimension::Points(30.0),
-                    height: stretch::style::Dimension::Points(30.0),
+                    height: stretch::style::Dimension::Points(32.0),
                     ..Default::default()
                 },
                 stretch::style::Node {
                     width: stretch::style::Dimension::Points(30.0),
-                    height: stretch::style::Dimension::Points(30.0),
+                    height: stretch::style::Dimension::Points(33.0),
                     ..Default::default()
                 },
                 stretch::style::Node {
                     width: stretch::style::Dimension::Points(30.0),
-                    height: stretch::style::Dimension::Points(30.0),
+                    height: stretch::style::Dimension::Points(34.0),
                     ..Default::default()
                 },
             ],
             ..Default::default()
         });
 
-        assert_eq!(layout.width, 30.0);
+        assert_eq!(layout.width, 100.0);
         assert_eq!(layout.height, 100.0);
         assert_eq!(layout.x, 0.0);
         assert_eq!(layout.y, 0.0);
 
         assert_eq!(layout.children[0].width, 30.0);
-        assert_eq!(layout.children[0].height, 30.0);
-        assert_eq!(layout.children[0].x, 0.0);
+        assert_eq!(layout.children[0].height, 31.0);
+        assert_eq!(layout.children[0].x, 70.0);
         assert_eq!(layout.children[0].y, 0.0);
 
         assert_eq!(layout.children[1].width, 30.0);
-        assert_eq!(layout.children[1].height, 30.0);
-        assert_eq!(layout.children[1].x, 0.0);
-        assert_eq!(layout.children[1].y, 30.0);
+        assert_eq!(layout.children[1].height, 32.0);
+        assert_eq!(layout.children[1].x, 70.0);
+        assert_eq!(layout.children[1].y, 31.0);
 
         assert_eq!(layout.children[2].width, 30.0);
-        assert_eq!(layout.children[2].height, 30.0);
-        assert_eq!(layout.children[2].x, 0.0);
-        assert_eq!(layout.children[2].y, 60.0);
+        assert_eq!(layout.children[2].height, 33.0);
+        assert_eq!(layout.children[2].x, 70.0);
+        assert_eq!(layout.children[2].y, 63.0);
 
         assert_eq!(layout.children[3].width, 30.0);
-        assert_eq!(layout.children[3].height, 30.0);
-        assert_eq!(layout.children[3].x, -30.0);
+        assert_eq!(layout.children[3].height, 34.0);
+        assert_eq!(layout.children[3].x, 20.0);
         assert_eq!(layout.children[3].y, 0.0);
     }
 
@@ -5094,22 +5095,22 @@ mod generated {
             width: stretch::style::Dimension::Points(100.0),
             children: vec![
                 stretch::style::Node {
-                    width: stretch::style::Dimension::Points(30.0),
+                    width: stretch::style::Dimension::Points(31.0),
                     height: stretch::style::Dimension::Points(30.0),
                     ..Default::default()
                 },
                 stretch::style::Node {
-                    width: stretch::style::Dimension::Points(30.0),
+                    width: stretch::style::Dimension::Points(32.0),
                     height: stretch::style::Dimension::Points(30.0),
                     ..Default::default()
                 },
                 stretch::style::Node {
-                    width: stretch::style::Dimension::Points(30.0),
+                    width: stretch::style::Dimension::Points(33.0),
                     height: stretch::style::Dimension::Points(30.0),
                     ..Default::default()
                 },
                 stretch::style::Node {
-                    width: stretch::style::Dimension::Points(30.0),
+                    width: stretch::style::Dimension::Points(34.0),
                     height: stretch::style::Dimension::Points(30.0),
                     ..Default::default()
                 },
@@ -5122,22 +5123,22 @@ mod generated {
         assert_eq!(layout.x, 0.0);
         assert_eq!(layout.y, 0.0);
 
-        assert_eq!(layout.children[0].width, 30.0);
+        assert_eq!(layout.children[0].width, 31.0);
         assert_eq!(layout.children[0].height, 30.0);
         assert_eq!(layout.children[0].x, 0.0);
         assert_eq!(layout.children[0].y, 0.0);
 
-        assert_eq!(layout.children[1].width, 30.0);
+        assert_eq!(layout.children[1].width, 32.0);
         assert_eq!(layout.children[1].height, 30.0);
-        assert_eq!(layout.children[1].x, 30.0);
+        assert_eq!(layout.children[1].x, 31.0);
         assert_eq!(layout.children[1].y, 0.0);
 
-        assert_eq!(layout.children[2].width, 30.0);
+        assert_eq!(layout.children[2].width, 33.0);
         assert_eq!(layout.children[2].height, 30.0);
-        assert_eq!(layout.children[2].x, 60.0);
+        assert_eq!(layout.children[2].x, 63.0);
         assert_eq!(layout.children[2].y, 0.0);
 
-        assert_eq!(layout.children[3].width, 30.0);
+        assert_eq!(layout.children[3].width, 34.0);
         assert_eq!(layout.children[3].height, 30.0);
         assert_eq!(layout.children[3].x, 0.0);
         assert_eq!(layout.children[3].y, 30.0);
@@ -5825,55 +5826,56 @@ mod generated {
         let layout = stretch::compute(&stretch::style::Node {
             flex_direction: stretch::style::FlexDirection::Column,
             flexWrap: stretch::style::FlexWrap::Wrap,
+            width: stretch::style::Dimension::Points(100.0),
             height: stretch::style::Dimension::Points(100.0),
             children: vec![
                 stretch::style::Node {
                     width: stretch::style::Dimension::Points(30.0),
-                    height: stretch::style::Dimension::Points(30.0),
+                    height: stretch::style::Dimension::Points(31.0),
                     ..Default::default()
                 },
                 stretch::style::Node {
                     width: stretch::style::Dimension::Points(30.0),
-                    height: stretch::style::Dimension::Points(30.0),
+                    height: stretch::style::Dimension::Points(32.0),
                     ..Default::default()
                 },
                 stretch::style::Node {
                     width: stretch::style::Dimension::Points(30.0),
-                    height: stretch::style::Dimension::Points(30.0),
+                    height: stretch::style::Dimension::Points(33.0),
                     ..Default::default()
                 },
                 stretch::style::Node {
                     width: stretch::style::Dimension::Points(30.0),
-                    height: stretch::style::Dimension::Points(30.0),
+                    height: stretch::style::Dimension::Points(34.0),
                     ..Default::default()
                 },
             ],
             ..Default::default()
         });
 
-        assert_eq!(layout.width, 30.0);
+        assert_eq!(layout.width, 100.0);
         assert_eq!(layout.height, 100.0);
         assert_eq!(layout.x, 0.0);
         assert_eq!(layout.y, 0.0);
 
         assert_eq!(layout.children[0].width, 30.0);
-        assert_eq!(layout.children[0].height, 30.0);
+        assert_eq!(layout.children[0].height, 31.0);
         assert_eq!(layout.children[0].x, 0.0);
         assert_eq!(layout.children[0].y, 0.0);
 
         assert_eq!(layout.children[1].width, 30.0);
-        assert_eq!(layout.children[1].height, 30.0);
+        assert_eq!(layout.children[1].height, 32.0);
         assert_eq!(layout.children[1].x, 0.0);
-        assert_eq!(layout.children[1].y, 30.0);
+        assert_eq!(layout.children[1].y, 31.0);
 
         assert_eq!(layout.children[2].width, 30.0);
-        assert_eq!(layout.children[2].height, 30.0);
+        assert_eq!(layout.children[2].height, 33.0);
         assert_eq!(layout.children[2].x, 0.0);
-        assert_eq!(layout.children[2].y, 60.0);
+        assert_eq!(layout.children[2].y, 63.0);
 
         assert_eq!(layout.children[3].width, 30.0);
-        assert_eq!(layout.children[3].height, 30.0);
-        assert_eq!(layout.children[3].x, 30.0);
+        assert_eq!(layout.children[3].height, 34.0);
+        assert_eq!(layout.children[3].x, 50.0);
         assert_eq!(layout.children[3].y, 0.0);
     }