Gitweb links:

...log 
http://git.netsurf-browser.org/libcss.git/shortlog/84d60a9fd17a4192924fd11040a310737e850438
...commit 
http://git.netsurf-browser.org/libcss.git/commit/84d60a9fd17a4192924fd11040a310737e850438
...tree 
http://git.netsurf-browser.org/libcss.git/tree/84d60a9fd17a4192924fd11040a310737e850438

The branch, tlsa/jmb/mq has been updated
       via  84d60a9fd17a4192924fd11040a310737e850438 (commit)
       via  7ac9d1d20ea5be2326651108083a23277523157b (commit)
       via  8e1278e738f5736ea083dadaecd8603a3048c558 (commit)
       via  bcfdbe274523b9cb51a1d92dee26dbadcecc23f4 (commit)
       via  c97512eb3dcf012f0a0088075f45d51cb4acf59d (commit)
      from  3f241d9b69f4283c7c98b43fc4b1eeba1fc158c7 (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=84d60a9fd17a4192924fd11040a310737e850438
commit 84d60a9fd17a4192924fd11040a310737e850438
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    Media Queries: Squash invalid use of unused variable warning.
    
    error: ‘last’ may be used uninitialized in this function 
[-Werror=maybe-uninitialized]

diff --git a/src/parse/mq.c b/src/parse/mq.c
index f587f8d..719e129 100644
--- a/src/parse/mq.c
+++ b/src/parse/mq.c
@@ -780,7 +780,7 @@ css_error css__mq_parse_media_list(css_language *c,
                const parserutils_vector *vector, int *ctx,
                css_mq_query **media)
 {
-       css_mq_query *result = NULL, *last;
+       css_mq_query *result = NULL, *last = NULL;
        const css_token *token;
        css_error error;
 
@@ -804,6 +804,7 @@ css_error css__mq_parse_media_list(css_language *c,
                        if (result == NULL) {
                                result = last = query;
                        } else {
+                               assert(last != NULL);
                                last->next = query;
                                last = query;
                        }


commitdiff 
http://git.netsurf-browser.org/libcss.git/commit/?id=7ac9d1d20ea5be2326651108083a23277523157b
commit 7ac9d1d20ea5be2326651108083a23277523157b
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    Media Queries: Add forward declaration of mq_parse_condition.

diff --git a/src/parse/mq.c b/src/parse/mq.c
index 932d6aa..f587f8d 100644
--- a/src/parse/mq.c
+++ b/src/parse/mq.c
@@ -17,6 +17,10 @@
 #include "parse/properties/utils.h"
 #include "utils/utils.h"
 
+static css_error mq_parse_condition(css_language *c,
+               const parserutils_vector *vector, int *ctx,
+               bool permit_or, css_mq_cond **cond);
+
 static css_error mq_parse_ratio(
                const parserutils_vector *vector, int *ctx,
                const css_token *numerator, css_fixed *ratio)


commitdiff 
http://git.netsurf-browser.org/libcss.git/commit/?id=8e1278e738f5736ea083dadaecd8603a3048c558
commit 8e1278e738f5736ea083dadaecd8603a3048c558
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    Media Queries: mq_parse_ratio doesn't need language object.

diff --git a/src/parse/mq.c b/src/parse/mq.c
index f99d5b0..932d6aa 100644
--- a/src/parse/mq.c
+++ b/src/parse/mq.c
@@ -17,7 +17,7 @@
 #include "parse/properties/utils.h"
 #include "utils/utils.h"
 
-static css_error mq_parse_ratio(css_language *c,
+static css_error mq_parse_ratio(
                const parserutils_vector *vector, int *ctx,
                const css_token *numerator, css_fixed *ratio)
 {
@@ -166,7 +166,7 @@ static css_error mq_parse_range(css_language *c,
        if (name_or_value->type == CSS_TOKEN_NUMBER &&
                        tokenIsChar(parserutils_vector_peek(vector, *ctx), 
'/')) {
                /* ratio */
-               error = mq_parse_ratio(c, vector, ctx, token, &ratio);
+               error = mq_parse_ratio(vector, ctx, token, &ratio);
                if (error != CSS_OK) {
                        return error;
                }
@@ -213,7 +213,7 @@ static css_error mq_parse_range(css_language *c,
        if (value_or_name->type == CSS_TOKEN_NUMBER &&
                        tokenIsChar(parserutils_vector_peek(vector, *ctx), 
'/')) {
                /* ratio */
-               error = mq_parse_ratio(c, vector, ctx, token, &ratio);
+               error = mq_parse_ratio(vector, ctx, token, &ratio);
                if (error != CSS_OK) {
                        return error;
                }
@@ -260,7 +260,7 @@ static css_error mq_parse_range(css_language *c,
                if (value_or_name->type == CSS_TOKEN_NUMBER &&
                                tokenIsChar(parserutils_vector_peek(vector, 
*ctx), '/')) {
                        /* ratio */
-                       error = mq_parse_ratio(c, vector, ctx, token, &ratio2);
+                       error = mq_parse_ratio(vector, ctx, token, &ratio2);
                        if (error != CSS_OK) {
                                return error;
                        }
@@ -381,7 +381,7 @@ static css_error mq_parse_media_feature(css_language *c,
                                /* ratio */
                                css_fixed ratio;
 
-                               error = mq_parse_ratio(c, vector, ctx, token, 
&ratio);
+                               error = mq_parse_ratio(vector, ctx, token, 
&ratio);
                                if (error != CSS_OK) {
                                        free(result);
                                        return error;


commitdiff 
http://git.netsurf-browser.org/libcss.git/commit/?id=bcfdbe274523b9cb51a1d92dee26dbadcecc23f4
commit bcfdbe274523b9cb51a1d92dee26dbadcecc23f4
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    Media Queries: Minor fixes.

diff --git a/src/parse/mq.c b/src/parse/mq.c
index 8bdd7a0..f99d5b0 100644
--- a/src/parse/mq.c
+++ b/src/parse/mq.c
@@ -82,8 +82,9 @@ static css_error mq_populate_value(css_mq_value *value,
                const char *data = lwc_string_data(token->idata);
                uint32_t unit = UNIT_PX;
                size_t consumed;
+               css_error error;
 
-               value->type == CSS_MQ_VALUE_TYPE_DIM;
+               value->type = CSS_MQ_VALUE_TYPE_DIM;
                value->data.dim.len = css__number_from_lwc_string(
                                token->idata, false, &consumed);
                error = css__parse_unit_keyword(data + consumed, len - consumed,
@@ -91,7 +92,7 @@ static css_error mq_populate_value(css_mq_value *value,
                if (error != CSS_OK) {
                        return error;
                }
-               value->data.dim.unit = temp_unit;
+               value->data.dim.unit = unit;
        } else if (token->type == CSS_TOKEN_IDENT) {
                value->type = CSS_MQ_VALUE_TYPE_IDENT;
                value->data.ident = lwc_string_ref(token->idata);
@@ -447,7 +448,7 @@ static css_error mq_parse_media_in_parens(css_language *c,
        const css_token *token;
        bool match;
        int old_ctx;
-       cond_or_feature *result = NULL;
+       css_mq_cond_or_feature *result = NULL;
        css_error error = CSS_OK;
 
        /* <media-in-parens> = ( <media-condition> ) | <media-feature> | 
<general-enclosed>
@@ -609,7 +610,7 @@ static css_error mq_parse_condition(css_language *c,
                result->parts->parts = parts;
                result->parts->nparts++;
 
-               consumeWhitespace(vector, token);
+               consumeWhitespace(vector, ctx);
 
                token = parserutils_vector_peek(vector, *ctx);
                if (token != NULL && tokenIsChar(token, ')') == false &&


commitdiff 
http://git.netsurf-browser.org/libcss.git/commit/?id=c97512eb3dcf012f0a0088075f45d51cb4acf59d
commit c97512eb3dcf012f0a0088075f45d51cb4acf59d
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    Strings: Add 'infinite'.

diff --git a/src/parse/propstrings.c b/src/parse/propstrings.c
index dc32ce9..3c9401b 100644
--- a/src/parse/propstrings.c
+++ b/src/parse/propstrings.c
@@ -442,6 +442,7 @@ const stringmap_entry stringmap[LAST_KNOWN] = {
        { "and", SLEN("and") },
        { "or", SLEN("or") },
        { "only", SLEN("only") },
+       { "infinite", SLEN("infinite") },
 
        { "aliceblue", SLEN("aliceblue") },
        { "antiquewhite", SLEN("antiquewhite") },
diff --git a/src/parse/propstrings.h b/src/parse/propstrings.h
index 0d5d0be..24b681b 100644
--- a/src/parse/propstrings.h
+++ b/src/parse/propstrings.h
@@ -101,7 +101,7 @@ enum {
        AVOID_PAGE, AVOID_COLUMN, BALANCE, HORIZONTAL_TB, VERTICAL_RL,
        VERTICAL_LR, CONTENT_BOX, BORDER_BOX, STRETCH, INLINE_FLEX, FLEX_START,
        FLEX_END, SPACE_BETWEEN, SPACE_AROUND, SPACE_EVENLY, ROW, ROW_REVERSE,
-       COLUMN_REVERSE, WRAP_STRING, WRAP_REVERSE, AND, OR, ONLY,
+       COLUMN_REVERSE, WRAP_STRING, WRAP_REVERSE, AND, OR, ONLY, INFINITE,
 
        /* Named colours */
        FIRST_COLOUR,


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

Summary of changes:
 src/parse/mq.c          |   26 ++++++++++++++++----------
 src/parse/propstrings.c |    1 +
 src/parse/propstrings.h |    2 +-
 3 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/src/parse/mq.c b/src/parse/mq.c
index 8bdd7a0..719e129 100644
--- a/src/parse/mq.c
+++ b/src/parse/mq.c
@@ -17,7 +17,11 @@
 #include "parse/properties/utils.h"
 #include "utils/utils.h"
 
-static css_error mq_parse_ratio(css_language *c,
+static css_error mq_parse_condition(css_language *c,
+               const parserutils_vector *vector, int *ctx,
+               bool permit_or, css_mq_cond **cond);
+
+static css_error mq_parse_ratio(
                const parserutils_vector *vector, int *ctx,
                const css_token *numerator, css_fixed *ratio)
 {
@@ -82,8 +86,9 @@ static css_error mq_populate_value(css_mq_value *value,
                const char *data = lwc_string_data(token->idata);
                uint32_t unit = UNIT_PX;
                size_t consumed;
+               css_error error;
 
-               value->type == CSS_MQ_VALUE_TYPE_DIM;
+               value->type = CSS_MQ_VALUE_TYPE_DIM;
                value->data.dim.len = css__number_from_lwc_string(
                                token->idata, false, &consumed);
                error = css__parse_unit_keyword(data + consumed, len - consumed,
@@ -91,7 +96,7 @@ static css_error mq_populate_value(css_mq_value *value,
                if (error != CSS_OK) {
                        return error;
                }
-               value->data.dim.unit = temp_unit;
+               value->data.dim.unit = unit;
        } else if (token->type == CSS_TOKEN_IDENT) {
                value->type = CSS_MQ_VALUE_TYPE_IDENT;
                value->data.ident = lwc_string_ref(token->idata);
@@ -165,7 +170,7 @@ static css_error mq_parse_range(css_language *c,
        if (name_or_value->type == CSS_TOKEN_NUMBER &&
                        tokenIsChar(parserutils_vector_peek(vector, *ctx), 
'/')) {
                /* ratio */
-               error = mq_parse_ratio(c, vector, ctx, token, &ratio);
+               error = mq_parse_ratio(vector, ctx, token, &ratio);
                if (error != CSS_OK) {
                        return error;
                }
@@ -212,7 +217,7 @@ static css_error mq_parse_range(css_language *c,
        if (value_or_name->type == CSS_TOKEN_NUMBER &&
                        tokenIsChar(parserutils_vector_peek(vector, *ctx), 
'/')) {
                /* ratio */
-               error = mq_parse_ratio(c, vector, ctx, token, &ratio);
+               error = mq_parse_ratio(vector, ctx, token, &ratio);
                if (error != CSS_OK) {
                        return error;
                }
@@ -259,7 +264,7 @@ static css_error mq_parse_range(css_language *c,
                if (value_or_name->type == CSS_TOKEN_NUMBER &&
                                tokenIsChar(parserutils_vector_peek(vector, 
*ctx), '/')) {
                        /* ratio */
-                       error = mq_parse_ratio(c, vector, ctx, token, &ratio2);
+                       error = mq_parse_ratio(vector, ctx, token, &ratio2);
                        if (error != CSS_OK) {
                                return error;
                        }
@@ -380,7 +385,7 @@ static css_error mq_parse_media_feature(css_language *c,
                                /* ratio */
                                css_fixed ratio;
 
-                               error = mq_parse_ratio(c, vector, ctx, token, 
&ratio);
+                               error = mq_parse_ratio(vector, ctx, token, 
&ratio);
                                if (error != CSS_OK) {
                                        free(result);
                                        return error;
@@ -447,7 +452,7 @@ static css_error mq_parse_media_in_parens(css_language *c,
        const css_token *token;
        bool match;
        int old_ctx;
-       cond_or_feature *result = NULL;
+       css_mq_cond_or_feature *result = NULL;
        css_error error = CSS_OK;
 
        /* <media-in-parens> = ( <media-condition> ) | <media-feature> | 
<general-enclosed>
@@ -609,7 +614,7 @@ static css_error mq_parse_condition(css_language *c,
                result->parts->parts = parts;
                result->parts->nparts++;
 
-               consumeWhitespace(vector, token);
+               consumeWhitespace(vector, ctx);
 
                token = parserutils_vector_peek(vector, *ctx);
                if (token != NULL && tokenIsChar(token, ')') == false &&
@@ -775,7 +780,7 @@ css_error css__mq_parse_media_list(css_language *c,
                const parserutils_vector *vector, int *ctx,
                css_mq_query **media)
 {
-       css_mq_query *result = NULL, *last;
+       css_mq_query *result = NULL, *last = NULL;
        const css_token *token;
        css_error error;
 
@@ -799,6 +804,7 @@ css_error css__mq_parse_media_list(css_language *c,
                        if (result == NULL) {
                                result = last = query;
                        } else {
+                               assert(last != NULL);
                                last->next = query;
                                last = query;
                        }
diff --git a/src/parse/propstrings.c b/src/parse/propstrings.c
index dc32ce9..3c9401b 100644
--- a/src/parse/propstrings.c
+++ b/src/parse/propstrings.c
@@ -442,6 +442,7 @@ const stringmap_entry stringmap[LAST_KNOWN] = {
        { "and", SLEN("and") },
        { "or", SLEN("or") },
        { "only", SLEN("only") },
+       { "infinite", SLEN("infinite") },
 
        { "aliceblue", SLEN("aliceblue") },
        { "antiquewhite", SLEN("antiquewhite") },
diff --git a/src/parse/propstrings.h b/src/parse/propstrings.h
index 0d5d0be..24b681b 100644
--- a/src/parse/propstrings.h
+++ b/src/parse/propstrings.h
@@ -101,7 +101,7 @@ enum {
        AVOID_PAGE, AVOID_COLUMN, BALANCE, HORIZONTAL_TB, VERTICAL_RL,
        VERTICAL_LR, CONTENT_BOX, BORDER_BOX, STRETCH, INLINE_FLEX, FLEX_START,
        FLEX_END, SPACE_BETWEEN, SPACE_AROUND, SPACE_EVENLY, ROW, ROW_REVERSE,
-       COLUMN_REVERSE, WRAP_STRING, WRAP_REVERSE, AND, OR, ONLY,
+       COLUMN_REVERSE, WRAP_STRING, WRAP_REVERSE, AND, OR, ONLY, INFINITE,
 
        /* Named colours */
        FIRST_COLOUR,


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