Gitweb links:
...log
http://git.netsurf-browser.org/libcss.git/shortlog/b88404d92a32f79b3741c79446243ca90e934b39
...commit
http://git.netsurf-browser.org/libcss.git/commit/b88404d92a32f79b3741c79446243ca90e934b39
...tree
http://git.netsurf-browser.org/libcss.git/tree/b88404d92a32f79b3741c79446243ca90e934b39
The branch, lcneves/flexbox has been updated
discards e8b73e685cf29b733f4f12f7174bf2bd2be2b70a (commit)
discards e39304a177b8907e0c1f4fd356634cb56757e6ac (commit)
via b88404d92a32f79b3741c79446243ca90e934b39 (commit)
via 1867e79ee35affda661f1220da5f293c4d275c1f (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (e8b73e685cf29b733f4f12f7174bf2bd2be2b70a)
\
N -- N -- N (b88404d92a32f79b3741c79446243ca90e934b39)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
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=b88404d92a32f79b3741c79446243ca90e934b39
commit b88404d92a32f79b3741c79446243ca90e934b39
Author: Lucas Neves <[email protected]>
Commit: Lucas Neves <[email protected]>
Parse: enable float parsing for flex-grow and flex-shrink
diff --git a/src/parse/properties/properties.gen
b/src/parse/properties/properties.gen
index 403fb36..06a3fd8 100644
--- a/src/parse/properties/properties.gen
+++ b/src/parse/properties/properties.gen
@@ -228,9 +228,9 @@ flex_basis:CSS_PROP_FLEX_BASIS IDENT:( INHERIT:
AUTO:0,FLEX_BASIS_AUTO CONTENT:0
flex_direction:CSS_PROP_FLEX_DIRECTION IDENT:( INHERIT:
ROW:0,FLEX_DIRECTION_ROW ROW_REVERSE:0,FLEX_DIRECTION_ROW_REVERSE
COLUMN:0,FLEX_DIRECTION_COLUMN COLUMN_REVERSE:0,FLEX_DIRECTION_COLUMN_REVERSE
IDENT:)
-flex_grow:CSS_PROP_FLEX_GROW IDENT:INHERIT NUMBER:( true:FLEX_GROW_SET
RANGE:num<0 NUMBER:)
+flex_grow:CSS_PROP_FLEX_GROW IDENT:INHERIT NUMBER:( false:FLEX_GROW_SET
RANGE:num<0 NUMBER:)
-flex_shrink:CSS_PROP_FLEX_SHRINK IDENT:INHERIT NUMBER:( true:FLEX_SHRINK_SET
RANGE:num<0 NUMBER:)
+flex_shrink:CSS_PROP_FLEX_SHRINK IDENT:INHERIT NUMBER:( false:FLEX_SHRINK_SET
RANGE:num<0 NUMBER:)
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:)
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=1867e79ee35affda661f1220da5f293c4d275c1f
commit 1867e79ee35affda661f1220da5f293c4d275c1f
Author: Lucas Neves <[email protected]>
Commit: Lucas Neves <[email protected]>
Tests: Add more select tests for flexbox properties
diff --git a/test/data/select/tests1.dat b/test/data/select/tests1.dat
index 52bd277..53958a1 100644
--- a/test/data/select/tests1.dat
+++ b/test/data/select/tests1.dat
@@ -7384,6 +7384,226 @@ z-index: auto
#tree
| div*
#ua
+div { flex: 0 0; }
+#user
+#errors
+#expected:
+align-content: stretch
+align-items: stretch
+align-self: auto
+background-attachment: scroll
+background-color: #00000000
+background-image: none
+background-position: 0% 0%
+background-repeat: repeat
+border-collapse: separate
+border-spacing: 0px 0px
+border-top-color: #ff000000
+border-right-color: #ff000000
+border-bottom-color: #ff000000
+border-left-color: #ff000000
+border-top-style: none
+border-right-style: none
+border-bottom-style: none
+border-left-style: none
+border-top-width: 2px
+border-right-width: 2px
+border-bottom-width: 2px
+border-left-width: 2px
+bottom: auto
+box-sizing: content-box
+break-after: auto
+break-before: auto
+break-inside: auto
+caption-side: top
+clear: none
+clip: auto
+color: #ff000000
+column-count: auto
+column-fill: balance
+column-gap: normal
+column-rule-color: #ff000000
+column-rule-style: none
+column-rule-width: 2px
+column-span: none
+column-width: auto
+content: normal
+counter-increment: none
+counter-reset: none
+cursor: auto
+direction: ltr
+display: inline
+empty-cells: show
+flex-basis: 0px
+flex-direction: row
+flex-grow: 0.000
+flex-shrink: 1.000
+flex-wrap: nowrap
+float: none
+font-family: sans-serif
+font-size: 12pt
+font-style: normal
+font-variant: normal
+font-weight: normal
+height: auto
+justify-content: flex-start
+left: auto
+letter-spacing: normal
+line-height: normal
+list-style-image: none
+list-style-position: outside
+list-style-type: disc
+margin-top: 0px
+margin-right: 0px
+margin-bottom: 0px
+margin-left: 0px
+max-height: none
+max-width: none
+min-height: 0px
+min-width: 0px
+opacity: 1.000
+order: 0
+outline-color: invert
+outline-style: none
+outline-width: 2px
+overflow-x: visible
+overflow-y: visible
+padding-top: 0px
+padding-right: 0px
+padding-bottom: 0px
+padding-left: 0px
+position: static
+quotes: none
+right: auto
+table-layout: auto
+text-align: default
+text-decoration: none
+text-indent: 0px
+text-transform: none
+top: auto
+unicode-bidi: normal
+vertical-align: baseline
+visibility: visible
+white-space: normal
+width: auto
+word-spacing: normal
+writing-mode: horizontal-tb
+z-index: auto
+#reset
+
+#tree
+| div*
+#ua
+div { flex: 0 0 0; }
+#user
+#errors
+#expected:
+align-content: stretch
+align-items: stretch
+align-self: auto
+background-attachment: scroll
+background-color: #00000000
+background-image: none
+background-position: 0% 0%
+background-repeat: repeat
+border-collapse: separate
+border-spacing: 0px 0px
+border-top-color: #ff000000
+border-right-color: #ff000000
+border-bottom-color: #ff000000
+border-left-color: #ff000000
+border-top-style: none
+border-right-style: none
+border-bottom-style: none
+border-left-style: none
+border-top-width: 2px
+border-right-width: 2px
+border-bottom-width: 2px
+border-left-width: 2px
+bottom: auto
+box-sizing: content-box
+break-after: auto
+break-before: auto
+break-inside: auto
+caption-side: top
+clear: none
+clip: auto
+color: #ff000000
+column-count: auto
+column-fill: balance
+column-gap: normal
+column-rule-color: #ff000000
+column-rule-style: none
+column-rule-width: 2px
+column-span: none
+column-width: auto
+content: normal
+counter-increment: none
+counter-reset: none
+cursor: auto
+direction: ltr
+display: inline
+empty-cells: show
+flex-basis: 0px
+flex-direction: row
+flex-grow: 0.000
+flex-shrink: 0.000
+flex-wrap: nowrap
+float: none
+font-family: sans-serif
+font-size: 12pt
+font-style: normal
+font-variant: normal
+font-weight: normal
+height: auto
+justify-content: flex-start
+left: auto
+letter-spacing: normal
+line-height: normal
+list-style-image: none
+list-style-position: outside
+list-style-type: disc
+margin-top: 0px
+margin-right: 0px
+margin-bottom: 0px
+margin-left: 0px
+max-height: none
+max-width: none
+min-height: 0px
+min-width: 0px
+opacity: 1.000
+order: 0
+outline-color: invert
+outline-style: none
+outline-width: 2px
+overflow-x: visible
+overflow-y: visible
+padding-top: 0px
+padding-right: 0px
+padding-bottom: 0px
+padding-left: 0px
+position: static
+quotes: none
+right: auto
+table-layout: auto
+text-align: default
+text-decoration: none
+text-indent: 0px
+text-transform: none
+top: auto
+unicode-bidi: normal
+vertical-align: baseline
+visibility: visible
+white-space: normal
+width: auto
+word-spacing: normal
+writing-mode: horizontal-tb
+z-index: auto
+#reset
+
+#tree
+| div*
+#ua
div { flex: 3; }
#user
#errors
@@ -9579,6 +9799,115 @@ z-index: auto
#tree
| div*
#ua
+div { flex-basis: 4.5em; flex-grow: 2.37; flex-shrink: 0.899; }
+#errors
+#expected:
+align-content: stretch
+align-items: stretch
+align-self: auto
+background-attachment: scroll
+background-color: #00000000
+background-image: none
+background-position: 0% 0%
+background-repeat: repeat
+border-collapse: separate
+border-spacing: 0px 0px
+border-top-color: #ff000000
+border-right-color: #ff000000
+border-bottom-color: #ff000000
+border-left-color: #ff000000
+border-top-style: none
+border-right-style: none
+border-bottom-style: none
+border-left-style: none
+border-top-width: 2px
+border-right-width: 2px
+border-bottom-width: 2px
+border-left-width: 2px
+bottom: auto
+box-sizing: content-box
+break-after: auto
+break-before: auto
+break-inside: auto
+caption-side: top
+clear: none
+clip: auto
+color: #ff000000
+column-count: auto
+column-fill: balance
+column-gap: normal
+column-rule-color: #ff000000
+column-rule-style: none
+column-rule-width: 2px
+column-span: none
+column-width: auto
+content: normal
+counter-increment: none
+counter-reset: none
+cursor: auto
+direction: ltr
+display: inline
+empty-cells: show
+flex-basis: 4.500em
+flex-direction: row
+flex-grow: 2.370
+flex-shrink: 0.899
+flex-wrap: nowrap
+float: none
+font-family: sans-serif
+font-size: 12pt
+font-style: normal
+font-variant: normal
+font-weight: normal
+height: auto
+justify-content: flex-start
+left: auto
+letter-spacing: normal
+line-height: normal
+list-style-image: none
+list-style-position: outside
+list-style-type: disc
+margin-top: 0px
+margin-right: 0px
+margin-bottom: 0px
+margin-left: 0px
+max-height: none
+max-width: none
+min-height: 0px
+min-width: 0px
+opacity: 1.000
+order: 0
+outline-color: invert
+outline-style: none
+outline-width: 2px
+overflow-x: visible
+overflow-y: visible
+padding-top: 0px
+padding-right: 0px
+padding-bottom: 0px
+padding-left: 0px
+position: static
+quotes: none
+right: auto
+table-layout: auto
+text-align: default
+text-decoration: none
+text-indent: 0px
+text-transform: none
+top: auto
+unicode-bidi: normal
+vertical-align: baseline
+visibility: visible
+white-space: normal
+width: auto
+word-spacing: normal
+writing-mode: horizontal-tb
+z-index: auto
+#reset
+
+#tree
+| div*
+#ua
div { justify-content: flex-start; }
#errors
#expected:
@@ -10893,7 +11222,118 @@ z-index: auto
#tree
| div*
#ua
-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; }
+div { flex: 2.3 3.78 4.5em; 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: space-around
+align-items: center
+align-self: flex-end
+background-attachment: scroll
+background-color: #00000000
+background-image: none
+background-position: 0% 0%
+background-repeat: repeat
+border-collapse: separate
+border-spacing: 0px 0px
+border-top-color: #ff000000
+border-right-color: #ff000000
+border-bottom-color: #ff000000
+border-left-color: #ff000000
+border-top-style: none
+border-right-style: none
+border-bottom-style: none
+border-left-style: none
+border-top-width: 2px
+border-right-width: 2px
+border-bottom-width: 2px
+border-left-width: 2px
+bottom: auto
+box-sizing: content-box
+break-after: auto
+break-before: auto
+break-inside: auto
+caption-side: top
+clear: none
+clip: auto
+color: #ff000000
+column-count: auto
+column-fill: balance
+column-gap: normal
+column-rule-color: #ff000000
+column-rule-style: none
+column-rule-width: 2px
+column-span: none
+column-width: auto
+content: normal
+counter-increment: none
+counter-reset: none
+cursor: auto
+direction: ltr
+display: inline
+empty-cells: show
+flex-basis: 4.500em
+flex-direction: column
+flex-grow: 2.300
+flex-shrink: 3.780
+flex-wrap: wrap
+float: none
+font-family: sans-serif
+font-size: 12pt
+font-style: normal
+font-variant: normal
+font-weight: normal
+height: auto
+justify-content: space-evenly
+left: auto
+letter-spacing: normal
+line-height: normal
+list-style-image: none
+list-style-position: outside
+list-style-type: disc
+margin-top: 0px
+margin-right: 0px
+margin-bottom: 0px
+margin-left: 0px
+max-height: none
+max-width: none
+min-height: 0px
+min-width: 0px
+opacity: 1.000
+order: -1
+outline-color: invert
+outline-style: none
+outline-width: 2px
+overflow-x: visible
+overflow-y: visible
+padding-top: 0px
+padding-right: 0px
+padding-bottom: 0px
+padding-left: 0px
+position: static
+quotes: none
+right: auto
+table-layout: auto
+text-align: default
+text-decoration: none
+text-indent: 0px
+text-transform: none
+top: auto
+unicode-bidi: normal
+vertical-align: baseline
+visibility: visible
+white-space: normal
+width: auto
+word-spacing: normal
+writing-mode: horizontal-tb
+z-index: auto
+#reset
+
+#tree
+| div
+| p*
+#ua
+div { flex: 2.3 3.78 4.5em; flex-flow: column wrap; align-content:
space-around; align-items: center; align-self: flex-end; justify-content:
space-evenly; order: -1; }
+p { flex: inherit; flex-flow: inherit; align-content: inherit; align-items:
inherit; align-self: inherit; justify-content: inherit; order: inherit; }
#errors
#expected:
align-content: space-around
@@ -10942,7 +11382,7 @@ cursor: auto
direction: ltr
display: inline
empty-cells: show
-flex-basis: 4em
+flex-basis: 4.500em
flex-direction: column
flex-grow: 2.300
flex-shrink: 3.780
-----------------------------------------------------------------------
Summary of changes:
src/parse/properties/Makefile | 4 +-
src/parse/properties/flex_grow.c | 84 -----------------------------------
src/parse/properties/flex_shrink.c | 84 -----------------------------------
src/parse/properties/properties.gen | 4 ++
4 files changed, 5 insertions(+), 171 deletions(-)
delete mode 100644 src/parse/properties/flex_grow.c
delete mode 100644 src/parse/properties/flex_shrink.c
diff --git a/src/parse/properties/Makefile b/src/parse/properties/Makefile
index e7b50c0..74cd204 100644
--- a/src/parse/properties/Makefile
+++ b/src/parse/properties/Makefile
@@ -47,8 +47,6 @@ DIR_SOURCES := \
elevation.c \
flex.c \
flex_flow.c \
- flex_grow.c \
- flex_shrink.c \
font.c \
font_family.c \
font_weight.c \
@@ -56,7 +54,7 @@ DIR_SOURCES := \
list_style_type.c \
margin.c \
opacity.c \
- order.c \
+ order.c \
outline.c \
overflow.c \
padding.c \
diff --git a/src/parse/properties/flex_grow.c b/src/parse/properties/flex_grow.c
deleted file mode 100644
index 5ae5959..0000000
--- a/src/parse/properties/flex_grow.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * This file was generated by LibCSS gen_parser
- *
- * Generated from:
- *
- * flex_grow:CSS_PROP_FLEX_GROW IDENT:INHERIT NUMBER:( true:FLEX_GROW_SET
RANGE:num<0 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 flex_grow
- *
- * \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_flex_grow(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_FLEX_GROW);
- } 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);
- /* Invalid if there are trailing characters */
- if (consumed != lwc_string_length(token->idata)) {
- *ctx = orig_ctx;
- return CSS_INVALID;
- }
- if (num<0) {
- *ctx = orig_ctx;
- return CSS_INVALID;
- }
-
- error = css__stylesheet_style_appendOPV(result,
CSS_PROP_FLEX_GROW, 0, FLEX_GROW_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/flex_shrink.c
b/src/parse/properties/flex_shrink.c
deleted file mode 100644
index 7fb9d57..0000000
--- a/src/parse/properties/flex_shrink.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * This file was generated by LibCSS gen_parser
- *
- * Generated from:
- *
- * flex_shrink:CSS_PROP_FLEX_SHRINK IDENT:INHERIT NUMBER:(
true:FLEX_SHRINK_SET RANGE:num<0 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 flex_shrink
- *
- * \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_flex_shrink(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_FLEX_SHRINK);
- } 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);
- /* Invalid if there are trailing characters */
- if (consumed != lwc_string_length(token->idata)) {
- *ctx = orig_ctx;
- return CSS_INVALID;
- }
- if (num<0) {
- *ctx = orig_ctx;
- return CSS_INVALID;
- }
-
- error = css__stylesheet_style_appendOPV(result,
CSS_PROP_FLEX_SHRINK, 0, FLEX_SHRINK_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 26627ad..06a3fd8 100644
--- a/src/parse/properties/properties.gen
+++ b/src/parse/properties/properties.gen
@@ -228,6 +228,10 @@ flex_basis:CSS_PROP_FLEX_BASIS IDENT:( INHERIT:
AUTO:0,FLEX_BASIS_AUTO CONTENT:0
flex_direction:CSS_PROP_FLEX_DIRECTION IDENT:( INHERIT:
ROW:0,FLEX_DIRECTION_ROW ROW_REVERSE:0,FLEX_DIRECTION_ROW_REVERSE
COLUMN:0,FLEX_DIRECTION_COLUMN COLUMN_REVERSE:0,FLEX_DIRECTION_COLUMN_REVERSE
IDENT:)
+flex_grow:CSS_PROP_FLEX_GROW IDENT:INHERIT NUMBER:( false:FLEX_GROW_SET
RANGE:num<0 NUMBER:)
+
+flex_shrink:CSS_PROP_FLEX_SHRINK IDENT:INHERIT NUMBER:( false:FLEX_SHRINK_SET
RANGE:num<0 NUMBER:)
+
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:)
--
Cascading Style Sheets library
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org