Gitweb links:

...log 
http://git.netsurf-browser.org/libcss.git/shortlog/4a8f14d9e6a1a3a33c0075f803c6826802383630
...commit 
http://git.netsurf-browser.org/libcss.git/commit/4a8f14d9e6a1a3a33c0075f803c6826802383630
...tree 
http://git.netsurf-browser.org/libcss.git/tree/4a8f14d9e6a1a3a33c0075f803c6826802383630

The branch, lcneves/flexbox has been updated
       via  4a8f14d9e6a1a3a33c0075f803c6826802383630 (commit)
       via  0dedf649ac00fe8372426ff28433de5a0db27e25 (commit)
      from  b55f6ebe8684e55aef95bba0033b9e96709a1a14 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/libcss.git/commit/?id=4a8f14d9e6a1a3a33c0075f803c6826802383630
commit 4a8f14d9e6a1a3a33c0075f803c6826802383630
Author: Lucas Neves <[email protected]>
Commit: Lucas Neves <[email protected]>

    WIP: Tests: make tests for the flex shorthand

diff --git a/include/libcss/.properties.h.swp b/include/libcss/.properties.h.swp
deleted file mode 100644
index 2e26580..0000000
Binary files a/include/libcss/.properties.h.swp and /dev/null differ


commitdiff 
http://git.netsurf-browser.org/libcss.git/commit/?id=0dedf649ac00fe8372426ff28433de5a0db27e25
commit 0dedf649ac00fe8372426ff28433de5a0db27e25
Author: Lucas Neves <[email protected]>
Commit: Lucas Neves <[email protected]>

    WIP: Tests: make tests for the flex shorthand

diff --git a/include/libcss/.properties.h.swp b/include/libcss/.properties.h.swp
new file mode 100644
index 0000000..2e26580
Binary files /dev/null and b/include/libcss/.properties.h.swp differ
diff --git a/src/parse/properties/flex.c b/src/parse/properties/flex.c
index 9b590ed..f189b3b 100644
--- a/src/parse/properties/flex.c
+++ b/src/parse/properties/flex.c
@@ -122,11 +122,14 @@ css_error css__parse_flex(css_language *c,
 
        /* Attempt to parse the various longhand properties */
        *ctx = orig_ctx;
-       size_t length;
+       size_t length = -1;
 
-        /* Method parserutils_vector_get_length not expecting const */
-        parserutils_vector *vec = (parserutils_vector *) vector;
-       parserutils_vector_get_length(vec, &length);
+       do {
+               ++length;
+               token = parserutils_vector_iterate(vector, ctx);
+       } while (token != NULL);
+
+       *ctx = orig_ctx;
 
        switch (length) {
        case 1:
diff --git a/test/data/select/tests1.dat b/test/data/select/tests1.dat
index 60279f6..2d30083 100644
--- a/test/data/select/tests1.dat
+++ b/test/data/select/tests1.dat
@@ -6944,9 +6944,8 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
+div { flex: auto; }
 #user
-div {  }
 #errors
 #expected:
 align-content: stretch
@@ -6997,7 +6996,7 @@ display: inline
 empty-cells: show
 flex-basis: auto
 flex-direction: row
-flex-grow: 0.000
+flex-grow: 1.000
 flex-shrink: 1.000
 flex-wrap: nowrap
 float: none
@@ -7055,9 +7054,8 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
+div { flex: none }
 #user
-div {  }
 #errors
 #expected:
 align-content: stretch
@@ -7109,7 +7107,7 @@ empty-cells: show
 flex-basis: auto
 flex-direction: row
 flex-grow: 0.000
-flex-shrink: 1.000
+flex-shrink: 0.000
 flex-wrap: nowrap
 float: none
 font-family: sans-serif
@@ -7166,9 +7164,8 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
+div { flex: 0 }
 #user
-div {  }
 #errors
 #expected:
 align-content: stretch
@@ -7217,7 +7214,7 @@ cursor: auto
 direction: ltr
 display: inline
 empty-cells: show
-flex-basis: auto
+flex-basis: 0px
 flex-direction: row
 flex-grow: 0.000
 flex-shrink: 1.000
@@ -7277,9 +7274,8 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
+div { flex: 3 }
 #user
-div {  }
 #errors
 #expected:
 align-content: stretch
@@ -7330,7 +7326,7 @@ display: inline
 empty-cells: show
 flex-basis: auto
 flex-direction: row
-flex-grow: 0.000
+flex-grow: 3.000
 flex-shrink: 1.000
 flex-wrap: nowrap
 float: none
@@ -7388,7 +7384,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
+div { flex: 3px }
 #user
 div {  }
 #errors
@@ -7439,7 +7435,7 @@ cursor: auto
 direction: ltr
 display: inline
 empty-cells: show
-flex-basis: auto
+flex-basis: 3px
 flex-direction: row
 flex-grow: 0.000
 flex-shrink: 1.000


-----------------------------------------------------------------------

Summary of changes:
 src/parse/properties/flex.c |   11 +++++++----
 test/data/select/tests1.dat |   24 ++++++++++--------------
 2 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/src/parse/properties/flex.c b/src/parse/properties/flex.c
index 9b590ed..f189b3b 100644
--- a/src/parse/properties/flex.c
+++ b/src/parse/properties/flex.c
@@ -122,11 +122,14 @@ css_error css__parse_flex(css_language *c,
 
        /* Attempt to parse the various longhand properties */
        *ctx = orig_ctx;
-       size_t length;
+       size_t length = -1;
 
-        /* Method parserutils_vector_get_length not expecting const */
-        parserutils_vector *vec = (parserutils_vector *) vector;
-       parserutils_vector_get_length(vec, &length);
+       do {
+               ++length;
+               token = parserutils_vector_iterate(vector, ctx);
+       } while (token != NULL);
+
+       *ctx = orig_ctx;
 
        switch (length) {
        case 1:
diff --git a/test/data/select/tests1.dat b/test/data/select/tests1.dat
index 60279f6..2d30083 100644
--- a/test/data/select/tests1.dat
+++ b/test/data/select/tests1.dat
@@ -6944,9 +6944,8 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
+div { flex: auto; }
 #user
-div {  }
 #errors
 #expected:
 align-content: stretch
@@ -6997,7 +6996,7 @@ display: inline
 empty-cells: show
 flex-basis: auto
 flex-direction: row
-flex-grow: 0.000
+flex-grow: 1.000
 flex-shrink: 1.000
 flex-wrap: nowrap
 float: none
@@ -7055,9 +7054,8 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
+div { flex: none }
 #user
-div {  }
 #errors
 #expected:
 align-content: stretch
@@ -7109,7 +7107,7 @@ empty-cells: show
 flex-basis: auto
 flex-direction: row
 flex-grow: 0.000
-flex-shrink: 1.000
+flex-shrink: 0.000
 flex-wrap: nowrap
 float: none
 font-family: sans-serif
@@ -7166,9 +7164,8 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
+div { flex: 0 }
 #user
-div {  }
 #errors
 #expected:
 align-content: stretch
@@ -7217,7 +7214,7 @@ cursor: auto
 direction: ltr
 display: inline
 empty-cells: show
-flex-basis: auto
+flex-basis: 0px
 flex-direction: row
 flex-grow: 0.000
 flex-shrink: 1.000
@@ -7277,9 +7274,8 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
+div { flex: 3 }
 #user
-div {  }
 #errors
 #expected:
 align-content: stretch
@@ -7330,7 +7326,7 @@ display: inline
 empty-cells: show
 flex-basis: auto
 flex-direction: row
-flex-grow: 0.000
+flex-grow: 3.000
 flex-shrink: 1.000
 flex-wrap: nowrap
 float: none
@@ -7388,7 +7384,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
+div { flex: 3px }
 #user
 div {  }
 #errors
@@ -7439,7 +7435,7 @@ cursor: auto
 direction: ltr
 display: inline
 empty-cells: show
-flex-basis: auto
+flex-basis: 3px
 flex-direction: row
 flex-grow: 0.000
 flex-shrink: 1.000


-- 
Cascading Style Sheets library

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to