Gitweb links:

...log 
http://git.netsurf-browser.org/libcss.git/shortlog/344c2c04790def1f9bebe3092844e454fa3a70b3
...commit 
http://git.netsurf-browser.org/libcss.git/commit/344c2c04790def1f9bebe3092844e454fa3a70b3
...tree 
http://git.netsurf-browser.org/libcss.git/tree/344c2c04790def1f9bebe3092844e454fa3a70b3

The branch, lcneves/flexbox has been updated
       via  344c2c04790def1f9bebe3092844e454fa3a70b3 (commit)
       via  6c76aa8e7a4e73b2f7782e17a54ecb30da0cc1c5 (commit)
      from  08f00cdc644577223927842054e2acbe7317d077 (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=344c2c04790def1f9bebe3092844e454fa3a70b3
commit 344c2c04790def1f9bebe3092844e454fa3a70b3
Author: Lucas Neves <[email protected]>
Commit: Lucas Neves <[email protected]>

    Tests: WIP: select tests for flexbox properties

diff --git a/test/data/select/tests1.dat b/test/data/select/tests1.dat
index db61e5d..52bd277 100644
--- a/test/data/select/tests1.dat
+++ b/test/data/select/tests1.dat
@@ -10893,14 +10893,12 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { flex: 2.3 3.78 4em; flex-flow: column wrap; align-content: space-around; 
align-items: center; align-self: flex-end; justify-content: space-evenly; 
order: -1; }
 #errors
 #expected:
-align-content: stretch
-align-items: stretch
-align-self: auto
+align-content: space-around
+align-items: center
+align-self: flex-end
 background-attachment: scroll
 background-color: #00000000
 background-image: none
@@ -10944,11 +10942,11 @@ cursor: auto
 direction: ltr
 display: inline
 empty-cells: show
-flex-basis: auto
-flex-direction: row
-flex-grow: 0.000
-flex-shrink: 1.000
-flex-wrap: nowrap
+flex-basis: 4em
+flex-direction: column
+flex-grow: 2.300
+flex-shrink: 3.780
+flex-wrap: wrap
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -10956,7 +10954,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: space-evenly
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -10972,7 +10970,7 @@ max-width: none
 min-height: 0px
 min-width: 0px
 opacity: 1.000
-order: 0
+order: -1
 outline-color: invert
 outline-style: none
 outline-width: 2px


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

    Parse: fixes order bitwise shift

diff --git a/src/parse/properties/Makefile b/src/parse/properties/Makefile
index 6461dda..74cd204 100644
--- a/src/parse/properties/Makefile
+++ b/src/parse/properties/Makefile
@@ -54,6 +54,7 @@ DIR_SOURCES :=                                \
        list_style_type.c               \
        margin.c                        \
        opacity.c                       \
+       order.c                 \
        outline.c                       \
        overflow.c                      \
        padding.c                       \
diff --git a/src/parse/properties/order.c b/src/parse/properties/order.c
new file mode 100644
index 0000000..9d617bc
--- /dev/null
+++ b/src/parse/properties/order.c
@@ -0,0 +1,81 @@
+/*
+ * This file was generated by LibCSS gen_parser 
+ * 
+ * Generated from:
+ *
+ * order:CSS_PROP_ORDER IDENT:INHERIT NUMBER:( true:ORDER_SET NUMBER:)
+ * 
+ * Licensed under the MIT License,
+ *               http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2010 The NetSurf Browser Project.
+ */
+
+#include <assert.h>
+#include <string.h>
+
+#include "bytecode/bytecode.h"
+#include "bytecode/opcodes.h"
+#include "parse/properties/properties.h"
+#include "parse/properties/utils.h"
+
+/**
+ * Parse order
+ *
+ * \param c      Parsing context
+ * \param vector  Vector of tokens to process
+ * \param ctx    Pointer to vector iteration context
+ * \param result  resulting style
+ * \return CSS_OK on success,
+ *        CSS_NOMEM on memory exhaustion,
+ *        CSS_INVALID if the input is not valid
+ *
+ * Post condition: \a *ctx is updated with the next token to process
+ *                If the input is invalid, then \a *ctx remains unchanged.
+ */
+css_error css__parse_order(css_language *c,
+               const parserutils_vector *vector, int *ctx,
+               css_style *result)
+{
+       int orig_ctx = *ctx;
+       css_error error;
+       const css_token *token;
+       bool match;
+
+       token = parserutils_vector_iterate(vector, ctx);
+       if ((token == NULL) || ((token->type != CSS_TOKEN_IDENT) && 
(token->type != CSS_TOKEN_NUMBER))) {
+               *ctx = orig_ctx;
+               return CSS_INVALID;
+       }
+
+       if ((token->type == CSS_TOKEN_IDENT) && 
(lwc_string_caseless_isequal(token->idata, c->strings[INHERIT], &match) == 
lwc_error_ok && match)) {
+                       error = css_stylesheet_style_inherit(result, 
CSS_PROP_ORDER);
+       } else if (token->type == CSS_TOKEN_NUMBER) {
+               css_fixed num = 0;
+               size_t consumed = 0;
+
+               /* Undo the <<10 shift, because this is an integer */
+               num = css__number_from_lwc_string(
+                               token->idata, true, &consumed) >> 10;
+
+               /* Invalid if there are trailing characters */
+               if (consumed != lwc_string_length(token->idata)) {
+                       *ctx = orig_ctx;
+                       return CSS_INVALID;
+               }
+               error = css__stylesheet_style_appendOPV(result, CSS_PROP_ORDER, 
0, ORDER_SET);
+               if (error != CSS_OK) {
+                       *ctx = orig_ctx;
+                       return error;
+               }
+
+               error = css__stylesheet_style_append(result, num);
+       } else {
+               error = CSS_INVALID;
+       }
+
+       if (error != CSS_OK)
+               *ctx = orig_ctx;
+       
+       return error;
+}
+
diff --git a/src/parse/properties/properties.gen 
b/src/parse/properties/properties.gen
index c640a23..403fb36 100644
--- a/src/parse/properties/properties.gen
+++ b/src/parse/properties/properties.gen
@@ -235,5 +235,3 @@ flex_shrink:CSS_PROP_FLEX_SHRINK IDENT:INHERIT NUMBER:( 
true:FLEX_SHRINK_SET RAN
 flex_wrap:CSS_PROP_FLEX_WRAP IDENT:( INHERIT: NOWRAP:0,FLEX_WRAP_NOWRAP 
WRAP_STRING:0,FLEX_WRAP_WRAP WRAP_REVERSE:0,FLEX_WRAP_WRAP_REVERSE IDENT:)
 
 justify_content:CSS_PROP_JUSTIFY_CONTENT IDENT:( INHERIT: 
FLEX_START:0,JUSTIFY_CONTENT_FLEX_START FLEX_END:0,JUSTIFY_CONTENT_FLEX_END 
CENTER:0,JUSTIFY_CONTENT_CENTER SPACE_BETWEEN:0,JUSTIFY_CONTENT_SPACE_BETWEEN 
SPACE_AROUND:0,JUSTIFY_CONTENT_SPACE_AROUND 
SPACE_EVENLY:0,JUSTIFY_CONTENT_SPACE_EVENLY IDENT:)
-
-order:CSS_PROP_ORDER IDENT:INHERIT NUMBER:( true:ORDER_SET NUMBER:)
diff --git a/src/select/properties/order.c b/src/select/properties/order.c
index 377e95f..969492a 100644
--- a/src/select/properties/order.c
+++ b/src/select/properties/order.c
@@ -18,12 +18,12 @@ css_error css__cascade_order(uint32_t opv, css_style *style,
                css_select_state *state)
 {
        uint16_t value = CSS_ORDER_INHERIT;
-       int32_t order = 0;
+       css_fixed order = 0;
 
        if (isInherit(opv) == false) {
                value = CSS_ORDER_SET;
 
-               order = *((int32_t *) style->bytecode);
+               order = *((css_fixed *) style->bytecode);
                advance_bytecode(style, sizeof(order));
        }
 
diff --git a/test/data/select/tests1.dat b/test/data/select/tests1.dat
index e13b974..db61e5d 100644
--- a/test/data/select/tests1.dat
+++ b/test/data/select/tests1.dat
@@ -8043,9 +8043,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-grow: 2; flex-basis: 20rem; }
-#user
-div { flex: none; }
+div { flex: 0 0 0; }
 #errors
 #expected:
 align-content: stretch
@@ -8094,7 +8092,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: 0.000
@@ -8153,10 +8151,10 @@ z-index: auto
 
 #tree
 | div*
-|  p
 #ua
-div { flex: 3 3 3%; }
-p { flex: inherit; }
+div { flex-grow: 2; flex-basis: 20rem; }
+#user
+div { flex: none; }
 #errors
 #expected:
 align-content: stretch
@@ -8205,10 +8203,10 @@ cursor: auto
 direction: ltr
 display: inline
 empty-cells: show
-flex-basis: 3%
+flex-basis: auto
 flex-direction: row
-flex-grow: 3.000
-flex-shrink: 3.000
+flex-grow: 0.000
+flex-shrink: 0.000
 flex-wrap: nowrap
 float: none
 font-family: sans-serif
@@ -8263,8 +8261,8 @@ z-index: auto
 #reset
 
 #tree
-| div
-|  p*
+| div*
+|  p
 #ua
 div { flex: 3 3 3%; }
 p { flex: inherit; }
@@ -8374,9 +8372,11 @@ z-index: auto
 #reset
 
 #tree
-| div*
+| div
+|  p*
 #ua
-div { flex-flow: nowrap; }
+div { flex: 3 3 3%; }
+p { flex: inherit; }
 #errors
 #expected:
 align-content: stretch
@@ -8425,10 +8425,10 @@ cursor: auto
 direction: ltr
 display: inline
 empty-cells: show
-flex-basis: auto
+flex-basis: 3%
 flex-direction: row
-flex-grow: 0.000
-flex-shrink: 1.000
+flex-grow: 3.000
+flex-shrink: 3.000
 flex-wrap: nowrap
 float: none
 font-family: sans-serif
@@ -8485,7 +8485,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-flow: wrap; }
+div { flex-flow: nowrap; }
 #errors
 #expected:
 align-content: stretch
@@ -8538,7 +8538,7 @@ flex-basis: auto
 flex-direction: row
 flex-grow: 0.000
 flex-shrink: 1.000
-flex-wrap: wrap
+flex-wrap: nowrap
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -8594,7 +8594,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-flow: wrap-reverse; }
+div { flex-flow: wrap; }
 #errors
 #expected:
 align-content: stretch
@@ -8647,7 +8647,7 @@ flex-basis: auto
 flex-direction: row
 flex-grow: 0.000
 flex-shrink: 1.000
-flex-wrap: wrap-reverse
+flex-wrap: wrap
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -8703,7 +8703,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-flow: row; }
+div { flex-flow: wrap-reverse; }
 #errors
 #expected:
 align-content: stretch
@@ -8756,7 +8756,7 @@ flex-basis: auto
 flex-direction: row
 flex-grow: 0.000
 flex-shrink: 1.000
-flex-wrap: nowrap
+flex-wrap: wrap-reverse
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -8812,7 +8812,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-flow: column; }
+div { flex-flow: row; }
 #errors
 #expected:
 align-content: stretch
@@ -8862,7 +8862,7 @@ direction: ltr
 display: inline
 empty-cells: show
 flex-basis: auto
-flex-direction: column
+flex-direction: row
 flex-grow: 0.000
 flex-shrink: 1.000
 flex-wrap: nowrap
@@ -8921,7 +8921,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-flow: row-reverse; }
+div { flex-flow: column; }
 #errors
 #expected:
 align-content: stretch
@@ -8971,7 +8971,7 @@ direction: ltr
 display: inline
 empty-cells: show
 flex-basis: auto
-flex-direction: row-reverse
+flex-direction: column
 flex-grow: 0.000
 flex-shrink: 1.000
 flex-wrap: nowrap
@@ -9030,7 +9030,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-flow: column-reverse; }
+div { flex-flow: row-reverse; }
 #errors
 #expected:
 align-content: stretch
@@ -9080,7 +9080,7 @@ direction: ltr
 display: inline
 empty-cells: show
 flex-basis: auto
-flex-direction: column-reverse
+flex-direction: row-reverse
 flex-grow: 0.000
 flex-shrink: 1.000
 flex-wrap: nowrap
@@ -9139,7 +9139,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-flow: column-reverse wrap-reverse; }
+div { flex-flow: column-reverse; }
 #errors
 #expected:
 align-content: stretch
@@ -9192,7 +9192,7 @@ flex-basis: auto
 flex-direction: column-reverse
 flex-grow: 0.000
 flex-shrink: 1.000
-flex-wrap: wrap-reverse
+flex-wrap: nowrap
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -9246,11 +9246,9 @@ z-index: auto
 #reset
 
 #tree
-| div
-|  p*
+| div*
 #ua
-div { flex-flow: column wrap; }
-p {flex-flow: inherit; }
+div { flex-flow: column-reverse wrap-reverse; }
 #errors
 #expected:
 align-content: stretch
@@ -9300,10 +9298,10 @@ direction: ltr
 display: inline
 empty-cells: show
 flex-basis: auto
-flex-direction: column
+flex-direction: column-reverse
 flex-grow: 0.000
 flex-shrink: 1.000
-flex-wrap: wrap
+flex-wrap: wrap-reverse
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -9360,8 +9358,8 @@ z-index: auto
 | div
 |  p*
 #ua
-div { flex-flow: row-reverse wrap-reverse; }
-p { flex-direction: inherit; flex-wrap: inherit; }
+div { flex-flow: column wrap; }
+p {flex-flow: inherit; }
 #errors
 #expected:
 align-content: stretch
@@ -9411,10 +9409,10 @@ direction: ltr
 display: inline
 empty-cells: show
 flex-basis: auto
-flex-direction: row-reverse
+flex-direction: column
 flex-grow: 0.000
 flex-shrink: 1.000
-flex-wrap: wrap-reverse
+flex-wrap: wrap
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -9468,11 +9466,11 @@ z-index: auto
 #reset
 
 #tree
-| div*
+| div
+|  p*
 #ua
-div {  }
-#user
-div {  }
+div { flex-flow: row-reverse wrap-reverse; }
+p { flex-direction: inherit; flex-wrap: inherit; }
 #errors
 #expected:
 align-content: stretch
@@ -9522,10 +9520,10 @@ direction: ltr
 display: inline
 empty-cells: show
 flex-basis: auto
-flex-direction: row
+flex-direction: row-reverse
 flex-grow: 0.000
 flex-shrink: 1.000
-flex-wrap: nowrap
+flex-wrap: wrap-reverse
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -9581,9 +9579,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { justify-content: flex-start; }
 #errors
 #expected:
 align-content: stretch
@@ -9692,9 +9688,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { justify-content: flex-end; }
 #errors
 #expected:
 align-content: stretch
@@ -9755,7 +9749,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: flex-end
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -9803,9 +9797,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { justify-content: center; }
 #errors
 #expected:
 align-content: stretch
@@ -9866,7 +9858,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: center
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -9914,9 +9906,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { justify-content: space-between; }
 #errors
 #expected:
 align-content: stretch
@@ -9977,7 +9967,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: space-between
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -10025,9 +10015,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { justify-content: space-around; }
 #errors
 #expected:
 align-content: stretch
@@ -10088,7 +10076,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: space-around
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -10136,9 +10124,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { justify-content: space-evenly; }
 #errors
 #expected:
 align-content: stretch
@@ -10199,7 +10185,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: space-evenly
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -10247,9 +10233,9 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
+div { justify-content: space-around; }
 #user
-div {  }
+div { justify-content: space-evenly; }
 #errors
 #expected:
 align-content: stretch
@@ -10310,7 +10296,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: space-evenly
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -10356,11 +10342,11 @@ z-index: auto
 #reset
 
 #tree
-| div*
+| div
+|  p*
 #ua
-div {  }
-#user
-div {  }
+div { justify-content: center; }
+p { justify-content: inherit; }
 #errors
 #expected:
 align-content: stretch
@@ -10421,7 +10407,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: center
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -10469,9 +10455,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { order: 0; }
 #errors
 #expected:
 align-content: stretch
@@ -10580,9 +10564,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { order: 5; }
 #errors
 #expected:
 align-content: stretch
@@ -10659,7 +10641,7 @@ max-width: none
 min-height: 0px
 min-width: 0px
 opacity: 1.000
-order: 0
+order: 5
 outline-color: invert
 outline-style: none
 outline-width: 2px
@@ -10691,9 +10673,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { order: -5; }
 #errors
 #expected:
 align-content: stretch
@@ -10770,7 +10750,7 @@ max-width: none
 min-height: 0px
 min-width: 0px
 opacity: 1.000
-order: 0
+order: -5
 outline-color: invert
 outline-style: none
 outline-width: 2px
@@ -10800,11 +10780,11 @@ z-index: auto
 #reset
 
 #tree
-| div*
+| div
+|  p*
 #ua
-div {  }
-#user
-div {  }
+div { order: 7; }
+p { order: inherit; }
 #errors
 #expected:
 align-content: stretch
@@ -10881,7 +10861,7 @@ max-width: none
 min-height: 0px
 min-width: 0px
 opacity: 1.000
-order: 0
+order: 7
 outline-color: invert
 outline-style: none
 outline-width: 2px


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

Summary of changes:
 src/parse/properties/Makefile               |    1 +
 src/parse/properties/{opacity.c => order.c} |   26 ++--
 src/parse/properties/properties.gen         |    2 -
 src/select/properties/order.c               |    4 +-
 test/data/select/tests1.dat                 |  192 ++++++++++++---------------
 5 files changed, 102 insertions(+), 123 deletions(-)
 copy src/parse/properties/{opacity.c => order.c} (77%)

diff --git a/src/parse/properties/Makefile b/src/parse/properties/Makefile
index 6461dda..74cd204 100644
--- a/src/parse/properties/Makefile
+++ b/src/parse/properties/Makefile
@@ -54,6 +54,7 @@ DIR_SOURCES :=                                \
        list_style_type.c               \
        margin.c                        \
        opacity.c                       \
+       order.c                 \
        outline.c                       \
        overflow.c                      \
        padding.c                       \
diff --git a/src/parse/properties/opacity.c b/src/parse/properties/order.c
similarity index 77%
copy from src/parse/properties/opacity.c
copy to src/parse/properties/order.c
index edad9f8..9d617bc 100644
--- a/src/parse/properties/opacity.c
+++ b/src/parse/properties/order.c
@@ -1,4 +1,10 @@
 /*
+ * This file was generated by LibCSS gen_parser 
+ * 
+ * Generated from:
+ *
+ * order:CSS_PROP_ORDER IDENT:INHERIT NUMBER:( true:ORDER_SET NUMBER:)
+ * 
  * Licensed under the MIT License,
  *               http://www.opensource.org/licenses/mit-license.php
  * Copyright 2010 The NetSurf Browser Project.
@@ -13,7 +19,7 @@
 #include "parse/properties/utils.h"
 
 /**
- * Parse opacity
+ * Parse order
  *
  * \param c      Parsing context
  * \param vector  Vector of tokens to process
@@ -26,7 +32,7 @@
  * Post condition: \a *ctx is updated with the next token to process
  *                If the input is invalid, then \a *ctx remains unchanged.
  */
-css_error css__parse_opacity(css_language *c,
+css_error css__parse_order(css_language *c,
                const parserutils_vector *vector, int *ctx,
                css_style *result)
 {
@@ -42,25 +48,21 @@ css_error css__parse_opacity(css_language *c,
        }
 
        if ((token->type == CSS_TOKEN_IDENT) && 
(lwc_string_caseless_isequal(token->idata, c->strings[INHERIT], &match) == 
lwc_error_ok && match)) {
-                       error = css_stylesheet_style_inherit(result, 
CSS_PROP_OPACITY);
+                       error = css_stylesheet_style_inherit(result, 
CSS_PROP_ORDER);
        } else if (token->type == CSS_TOKEN_NUMBER) {
                css_fixed num = 0;
                size_t consumed = 0;
 
-               num = css__number_from_lwc_string(token->idata, false, 
&consumed);
+               /* Undo the <<10 shift, because this is an integer */
+               num = css__number_from_lwc_string(
+                               token->idata, true, &consumed) >> 10;
+
                /* Invalid if there are trailing characters */
                if (consumed != lwc_string_length(token->idata)) {
                        *ctx = orig_ctx;
                        return CSS_INVALID;
                }
-
-               /* Clamp to range [0,1] */
-               if (num < 0)
-                       num = 0;
-               if (num > INTTOFIX(1))
-                       num = INTTOFIX(1);
-
-               error = css__stylesheet_style_appendOPV(result, 
CSS_PROP_OPACITY, 0, OPACITY_SET);
+               error = css__stylesheet_style_appendOPV(result, CSS_PROP_ORDER, 
0, ORDER_SET);
                if (error != CSS_OK) {
                        *ctx = orig_ctx;
                        return error;
diff --git a/src/parse/properties/properties.gen 
b/src/parse/properties/properties.gen
index c640a23..403fb36 100644
--- a/src/parse/properties/properties.gen
+++ b/src/parse/properties/properties.gen
@@ -235,5 +235,3 @@ flex_shrink:CSS_PROP_FLEX_SHRINK IDENT:INHERIT NUMBER:( 
true:FLEX_SHRINK_SET RAN
 flex_wrap:CSS_PROP_FLEX_WRAP IDENT:( INHERIT: NOWRAP:0,FLEX_WRAP_NOWRAP 
WRAP_STRING:0,FLEX_WRAP_WRAP WRAP_REVERSE:0,FLEX_WRAP_WRAP_REVERSE IDENT:)
 
 justify_content:CSS_PROP_JUSTIFY_CONTENT IDENT:( INHERIT: 
FLEX_START:0,JUSTIFY_CONTENT_FLEX_START FLEX_END:0,JUSTIFY_CONTENT_FLEX_END 
CENTER:0,JUSTIFY_CONTENT_CENTER SPACE_BETWEEN:0,JUSTIFY_CONTENT_SPACE_BETWEEN 
SPACE_AROUND:0,JUSTIFY_CONTENT_SPACE_AROUND 
SPACE_EVENLY:0,JUSTIFY_CONTENT_SPACE_EVENLY IDENT:)
-
-order:CSS_PROP_ORDER IDENT:INHERIT NUMBER:( true:ORDER_SET NUMBER:)
diff --git a/src/select/properties/order.c b/src/select/properties/order.c
index 377e95f..969492a 100644
--- a/src/select/properties/order.c
+++ b/src/select/properties/order.c
@@ -18,12 +18,12 @@ css_error css__cascade_order(uint32_t opv, css_style *style,
                css_select_state *state)
 {
        uint16_t value = CSS_ORDER_INHERIT;
-       int32_t order = 0;
+       css_fixed order = 0;
 
        if (isInherit(opv) == false) {
                value = CSS_ORDER_SET;
 
-               order = *((int32_t *) style->bytecode);
+               order = *((css_fixed *) style->bytecode);
                advance_bytecode(style, sizeof(order));
        }
 
diff --git a/test/data/select/tests1.dat b/test/data/select/tests1.dat
index e13b974..52bd277 100644
--- a/test/data/select/tests1.dat
+++ b/test/data/select/tests1.dat
@@ -8043,9 +8043,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-grow: 2; flex-basis: 20rem; }
-#user
-div { flex: none; }
+div { flex: 0 0 0; }
 #errors
 #expected:
 align-content: stretch
@@ -8094,7 +8092,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: 0.000
@@ -8153,10 +8151,10 @@ z-index: auto
 
 #tree
 | div*
-|  p
 #ua
-div { flex: 3 3 3%; }
-p { flex: inherit; }
+div { flex-grow: 2; flex-basis: 20rem; }
+#user
+div { flex: none; }
 #errors
 #expected:
 align-content: stretch
@@ -8205,10 +8203,10 @@ cursor: auto
 direction: ltr
 display: inline
 empty-cells: show
-flex-basis: 3%
+flex-basis: auto
 flex-direction: row
-flex-grow: 3.000
-flex-shrink: 3.000
+flex-grow: 0.000
+flex-shrink: 0.000
 flex-wrap: nowrap
 float: none
 font-family: sans-serif
@@ -8263,8 +8261,8 @@ z-index: auto
 #reset
 
 #tree
-| div
-|  p*
+| div*
+|  p
 #ua
 div { flex: 3 3 3%; }
 p { flex: inherit; }
@@ -8374,9 +8372,11 @@ z-index: auto
 #reset
 
 #tree
-| div*
+| div
+|  p*
 #ua
-div { flex-flow: nowrap; }
+div { flex: 3 3 3%; }
+p { flex: inherit; }
 #errors
 #expected:
 align-content: stretch
@@ -8425,10 +8425,10 @@ cursor: auto
 direction: ltr
 display: inline
 empty-cells: show
-flex-basis: auto
+flex-basis: 3%
 flex-direction: row
-flex-grow: 0.000
-flex-shrink: 1.000
+flex-grow: 3.000
+flex-shrink: 3.000
 flex-wrap: nowrap
 float: none
 font-family: sans-serif
@@ -8485,7 +8485,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-flow: wrap; }
+div { flex-flow: nowrap; }
 #errors
 #expected:
 align-content: stretch
@@ -8538,7 +8538,7 @@ flex-basis: auto
 flex-direction: row
 flex-grow: 0.000
 flex-shrink: 1.000
-flex-wrap: wrap
+flex-wrap: nowrap
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -8594,7 +8594,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-flow: wrap-reverse; }
+div { flex-flow: wrap; }
 #errors
 #expected:
 align-content: stretch
@@ -8647,7 +8647,7 @@ flex-basis: auto
 flex-direction: row
 flex-grow: 0.000
 flex-shrink: 1.000
-flex-wrap: wrap-reverse
+flex-wrap: wrap
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -8703,7 +8703,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-flow: row; }
+div { flex-flow: wrap-reverse; }
 #errors
 #expected:
 align-content: stretch
@@ -8756,7 +8756,7 @@ flex-basis: auto
 flex-direction: row
 flex-grow: 0.000
 flex-shrink: 1.000
-flex-wrap: nowrap
+flex-wrap: wrap-reverse
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -8812,7 +8812,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-flow: column; }
+div { flex-flow: row; }
 #errors
 #expected:
 align-content: stretch
@@ -8862,7 +8862,7 @@ direction: ltr
 display: inline
 empty-cells: show
 flex-basis: auto
-flex-direction: column
+flex-direction: row
 flex-grow: 0.000
 flex-shrink: 1.000
 flex-wrap: nowrap
@@ -8921,7 +8921,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-flow: row-reverse; }
+div { flex-flow: column; }
 #errors
 #expected:
 align-content: stretch
@@ -8971,7 +8971,7 @@ direction: ltr
 display: inline
 empty-cells: show
 flex-basis: auto
-flex-direction: row-reverse
+flex-direction: column
 flex-grow: 0.000
 flex-shrink: 1.000
 flex-wrap: nowrap
@@ -9030,7 +9030,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-flow: column-reverse; }
+div { flex-flow: row-reverse; }
 #errors
 #expected:
 align-content: stretch
@@ -9080,7 +9080,7 @@ direction: ltr
 display: inline
 empty-cells: show
 flex-basis: auto
-flex-direction: column-reverse
+flex-direction: row-reverse
 flex-grow: 0.000
 flex-shrink: 1.000
 flex-wrap: nowrap
@@ -9139,7 +9139,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div { flex-flow: column-reverse wrap-reverse; }
+div { flex-flow: column-reverse; }
 #errors
 #expected:
 align-content: stretch
@@ -9192,7 +9192,7 @@ flex-basis: auto
 flex-direction: column-reverse
 flex-grow: 0.000
 flex-shrink: 1.000
-flex-wrap: wrap-reverse
+flex-wrap: nowrap
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -9246,11 +9246,9 @@ z-index: auto
 #reset
 
 #tree
-| div
-|  p*
+| div*
 #ua
-div { flex-flow: column wrap; }
-p {flex-flow: inherit; }
+div { flex-flow: column-reverse wrap-reverse; }
 #errors
 #expected:
 align-content: stretch
@@ -9300,10 +9298,10 @@ direction: ltr
 display: inline
 empty-cells: show
 flex-basis: auto
-flex-direction: column
+flex-direction: column-reverse
 flex-grow: 0.000
 flex-shrink: 1.000
-flex-wrap: wrap
+flex-wrap: wrap-reverse
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -9360,8 +9358,8 @@ z-index: auto
 | div
 |  p*
 #ua
-div { flex-flow: row-reverse wrap-reverse; }
-p { flex-direction: inherit; flex-wrap: inherit; }
+div { flex-flow: column wrap; }
+p {flex-flow: inherit; }
 #errors
 #expected:
 align-content: stretch
@@ -9411,10 +9409,10 @@ direction: ltr
 display: inline
 empty-cells: show
 flex-basis: auto
-flex-direction: row-reverse
+flex-direction: column
 flex-grow: 0.000
 flex-shrink: 1.000
-flex-wrap: wrap-reverse
+flex-wrap: wrap
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -9468,11 +9466,11 @@ z-index: auto
 #reset
 
 #tree
-| div*
+| div
+|  p*
 #ua
-div {  }
-#user
-div {  }
+div { flex-flow: row-reverse wrap-reverse; }
+p { flex-direction: inherit; flex-wrap: inherit; }
 #errors
 #expected:
 align-content: stretch
@@ -9522,10 +9520,10 @@ direction: ltr
 display: inline
 empty-cells: show
 flex-basis: auto
-flex-direction: row
+flex-direction: row-reverse
 flex-grow: 0.000
 flex-shrink: 1.000
-flex-wrap: nowrap
+flex-wrap: wrap-reverse
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -9581,9 +9579,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { justify-content: flex-start; }
 #errors
 #expected:
 align-content: stretch
@@ -9692,9 +9688,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { justify-content: flex-end; }
 #errors
 #expected:
 align-content: stretch
@@ -9755,7 +9749,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: flex-end
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -9803,9 +9797,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { justify-content: center; }
 #errors
 #expected:
 align-content: stretch
@@ -9866,7 +9858,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: center
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -9914,9 +9906,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { justify-content: space-between; }
 #errors
 #expected:
 align-content: stretch
@@ -9977,7 +9967,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: space-between
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -10025,9 +10015,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { justify-content: space-around; }
 #errors
 #expected:
 align-content: stretch
@@ -10088,7 +10076,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: space-around
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -10136,9 +10124,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { justify-content: space-evenly; }
 #errors
 #expected:
 align-content: stretch
@@ -10199,7 +10185,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: space-evenly
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -10247,9 +10233,9 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
+div { justify-content: space-around; }
 #user
-div {  }
+div { justify-content: space-evenly; }
 #errors
 #expected:
 align-content: stretch
@@ -10310,7 +10296,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: space-evenly
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -10356,11 +10342,11 @@ z-index: auto
 #reset
 
 #tree
-| div*
+| div
+|  p*
 #ua
-div {  }
-#user
-div {  }
+div { justify-content: center; }
+p { justify-content: inherit; }
 #errors
 #expected:
 align-content: stretch
@@ -10421,7 +10407,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: center
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -10469,9 +10455,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { order: 0; }
 #errors
 #expected:
 align-content: stretch
@@ -10580,9 +10564,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { order: 5; }
 #errors
 #expected:
 align-content: stretch
@@ -10659,7 +10641,7 @@ max-width: none
 min-height: 0px
 min-width: 0px
 opacity: 1.000
-order: 0
+order: 5
 outline-color: invert
 outline-style: none
 outline-width: 2px
@@ -10691,9 +10673,7 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { order: -5; }
 #errors
 #expected:
 align-content: stretch
@@ -10770,7 +10750,7 @@ max-width: none
 min-height: 0px
 min-width: 0px
 opacity: 1.000
-order: 0
+order: -5
 outline-color: invert
 outline-style: none
 outline-width: 2px
@@ -10800,11 +10780,11 @@ z-index: auto
 #reset
 
 #tree
-| div*
+| div
+|  p*
 #ua
-div {  }
-#user
-div {  }
+div { order: 7; }
+p { order: inherit; }
 #errors
 #expected:
 align-content: stretch
@@ -10881,7 +10861,7 @@ max-width: none
 min-height: 0px
 min-width: 0px
 opacity: 1.000
-order: 0
+order: 7
 outline-color: invert
 outline-style: none
 outline-width: 2px
@@ -10913,14 +10893,12 @@ z-index: auto
 #tree
 | div*
 #ua
-div {  }
-#user
-div {  }
+div { flex: 2.3 3.78 4em; flex-flow: column wrap; align-content: space-around; 
align-items: center; align-self: flex-end; justify-content: space-evenly; 
order: -1; }
 #errors
 #expected:
-align-content: stretch
-align-items: stretch
-align-self: auto
+align-content: space-around
+align-items: center
+align-self: flex-end
 background-attachment: scroll
 background-color: #00000000
 background-image: none
@@ -10964,11 +10942,11 @@ cursor: auto
 direction: ltr
 display: inline
 empty-cells: show
-flex-basis: auto
-flex-direction: row
-flex-grow: 0.000
-flex-shrink: 1.000
-flex-wrap: nowrap
+flex-basis: 4em
+flex-direction: column
+flex-grow: 2.300
+flex-shrink: 3.780
+flex-wrap: wrap
 float: none
 font-family: sans-serif
 font-size: 12pt
@@ -10976,7 +10954,7 @@ font-style: normal
 font-variant: normal
 font-weight: normal
 height: auto
-justify-content: flex-start
+justify-content: space-evenly
 left: auto
 letter-spacing: normal
 line-height: normal
@@ -10992,7 +10970,7 @@ max-width: none
 min-height: 0px
 min-width: 0px
 opacity: 1.000
-order: 0
+order: -1
 outline-color: invert
 outline-style: none
 outline-width: 2px


-- 
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