Gitweb links:
...log
http://git.netsurf-browser.org/libcss.git/shortlog/6be78419e673c7aaac7143d1dafaa6a4a747b32d
...commit
http://git.netsurf-browser.org/libcss.git/commit/6be78419e673c7aaac7143d1dafaa6a4a747b32d
...tree
http://git.netsurf-browser.org/libcss.git/tree/6be78419e673c7aaac7143d1dafaa6a4a747b32d
The branch, master has been updated
via 6be78419e673c7aaac7143d1dafaa6a4a747b32d (commit)
via 1be9823782a6a900f035186138586b3ab800c2b2 (commit)
via 275ae825d98c90803f7d3db26abcb25c9372b023 (commit)
via 622b5b525a488b02353b8998267ff08bee6a605b (commit)
via e253f49b415215906d40a4a7124e08788cc46c44 (commit)
from 0f9419433903f40d40bfac538ca260568ee4ffdb (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=6be78419e673c7aaac7143d1dafaa6a4a747b32d
commit 6be78419e673c7aaac7143d1dafaa6a4a747b32d
Author: Michael Drake <Michael Drake [email protected]>
Commit: Michael Drake <Michael Drake [email protected]>
Computed styles: Check length pair getter type before using result.
Fixes use of garbage value scan-build issue.
diff --git a/src/select/computed.c b/src/select/computed.c
index 24d188e..4e5588a 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -1743,6 +1743,10 @@ css_error
compute_absolute_length_pair(css_computed_style *style,
type = get(style, &length1, &unit1, &length2, &unit2);
+ if (type != CSS_BACKGROUND_POSITION_SET) {
+ return CSS_OK;
+ }
+
if (unit1 == CSS_UNIT_EX) {
length1 = FMUL(length1, ex_size->value);
unit1 = ex_size->unit;
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=1be9823782a6a900f035186138586b3ab800c2b2
commit 1be9823782a6a900f035186138586b3ab800c2b2
Author: Michael Drake <Michael Drake [email protected]>
Commit: Michael Drake <Michael Drake [email protected]>
Computed styles: Handle invalid width types.
Fixes scan-build use of garbage value.
diff --git a/src/select/computed.c b/src/select/computed.c
index 190ca83..24d188e 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -1460,6 +1460,8 @@ css_error
compute_absolute_border_side_width(css_computed_style *style,
unit = ex_size->unit;
}
break;
+ default:
+ return CSS_INVALID;
}
return set(style, CSS_BORDER_WIDTH_WIDTH, length, unit);
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=275ae825d98c90803f7d3db26abcb25c9372b023
commit 275ae825d98c90803f7d3db26abcb25c9372b023
Author: Michael Drake <Michael Drake [email protected]>
Commit: Michael Drake <Michael Drake [email protected]>
Parse: Add missing error checks for outline shorthand.
Fixes scan-build: Value stored to 'error' is never read.
Signed-off-by: Michael Drake <Michael Drake [email protected]>
diff --git a/src/parse/properties/outline.c b/src/parse/properties/outline.c
index d9d9ec2..4d4fbf0 100644
--- a/src/parse/properties/outline.c
+++ b/src/parse/properties/outline.c
@@ -122,20 +122,29 @@ css_error css__parse_outline(css_language *c,
/* defaults */
if (color) {
error = css__stylesheet_style_appendOPV(color_style,
- CSS_PROP_OUTLINE_COLOR,
+ CSS_PROP_OUTLINE_COLOR,
0, OUTLINE_COLOR_INVERT);
+ if (error != CSS_OK) {
+ goto css__parse_outline_cleanup;
+ }
}
if (style) {
error = css__stylesheet_style_appendOPV(style_style,
- CSS_PROP_OUTLINE_STYLE,
+ CSS_PROP_OUTLINE_STYLE,
0, OUTLINE_STYLE_NONE);
+ if (error != CSS_OK) {
+ goto css__parse_outline_cleanup;
+ }
}
if (width) {
error = css__stylesheet_style_appendOPV(width_style,
- CSS_PROP_OUTLINE_WIDTH,
+ CSS_PROP_OUTLINE_WIDTH,
0, OUTLINE_WIDTH_MEDIUM);
+ if (error != CSS_OK) {
+ goto css__parse_outline_cleanup;
+ }
}
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=622b5b525a488b02353b8998267ff08bee6a605b
commit 622b5b525a488b02353b8998267ff08bee6a605b
Author: Michael Drake <Michael Drake [email protected]>
Commit: Michael Drake <Michael Drake [email protected]>
Parse: Add missing error checks for list-style shorthand.
Fixes scan-build: Value stored to 'error' is never read.
Signed-off-by: Michael Drake <Michael Drake [email protected]>
diff --git a/src/parse/properties/list_style.c
b/src/parse/properties/list_style.c
index f12fa2e..b2c8de3 100644
--- a/src/parse/properties/list_style.c
+++ b/src/parse/properties/list_style.c
@@ -122,20 +122,29 @@ css_error css__parse_list_style(css_language *c,
/* defaults */
if (image) {
error = css__stylesheet_style_appendOPV(image_style,
- CSS_PROP_LIST_STYLE_IMAGE,
+ CSS_PROP_LIST_STYLE_IMAGE,
0, LIST_STYLE_IMAGE_NONE);
+ if (error != CSS_OK) {
+ goto css__parse_list_style_cleanup;
+ }
}
if (position) {
error = css__stylesheet_style_appendOPV(position_style,
- CSS_PROP_LIST_STYLE_POSITION,
+ CSS_PROP_LIST_STYLE_POSITION,
0, LIST_STYLE_POSITION_OUTSIDE);
+ if (error != CSS_OK) {
+ goto css__parse_list_style_cleanup;
+ }
}
if (type) {
error = css__stylesheet_style_appendOPV(type_style,
- CSS_PROP_LIST_STYLE_TYPE,
+ CSS_PROP_LIST_STYLE_TYPE,
0, LIST_STYLE_TYPE_DISC);
+ if (error != CSS_OK) {
+ goto css__parse_list_style_cleanup;
+ }
}
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=e253f49b415215906d40a4a7124e08788cc46c44
commit e253f49b415215906d40a4a7124e08788cc46c44
Author: Michael Drake <Michael Drake [email protected]>
Commit: Michael Drake <Michael Drake [email protected]>
Parse: Add missing error checks for flex-flow shorthand.
Fixes scan-build: Value stored to 'error' is never read.
Signed-off-by: Michael Drake <Michael Drake [email protected]>
diff --git a/src/parse/properties/flex_flow.c b/src/parse/properties/flex_flow.c
index 6a83e15..e2d0e0c 100644
--- a/src/parse/properties/flex_flow.c
+++ b/src/parse/properties/flex_flow.c
@@ -107,15 +107,21 @@ css_error css__parse_flex_flow(css_language *c,
/* defaults */
if (direction) {
- error = css__stylesheet_style_appendOPV(direction_style,
+ error = css__stylesheet_style_appendOPV(direction_style,
CSS_PROP_FLEX_DIRECTION,
0, FLEX_DIRECTION_ROW);
+ if (error != CSS_OK) {
+ goto css__parse_flex_flow_cleanup;
+ }
}
if (wrap) {
- error = css__stylesheet_style_appendOPV(wrap_style,
+ error = css__stylesheet_style_appendOPV(wrap_style,
CSS_PROP_FLEX_WRAP,
0, FLEX_WRAP_NOWRAP);
+ if (error != CSS_OK) {
+ goto css__parse_flex_flow_cleanup;
+ }
}
error = css__stylesheet_merge_style(result, direction_style);
-----------------------------------------------------------------------
Summary of changes:
src/parse/properties/flex_flow.c | 10 ++++++++--
src/parse/properties/list_style.c | 15 ++++++++++++---
src/parse/properties/outline.c | 15 ++++++++++++---
src/select/computed.c | 6 ++++++
4 files changed, 38 insertions(+), 8 deletions(-)
diff --git a/src/parse/properties/flex_flow.c b/src/parse/properties/flex_flow.c
index 6a83e15..e2d0e0c 100644
--- a/src/parse/properties/flex_flow.c
+++ b/src/parse/properties/flex_flow.c
@@ -107,15 +107,21 @@ css_error css__parse_flex_flow(css_language *c,
/* defaults */
if (direction) {
- error = css__stylesheet_style_appendOPV(direction_style,
+ error = css__stylesheet_style_appendOPV(direction_style,
CSS_PROP_FLEX_DIRECTION,
0, FLEX_DIRECTION_ROW);
+ if (error != CSS_OK) {
+ goto css__parse_flex_flow_cleanup;
+ }
}
if (wrap) {
- error = css__stylesheet_style_appendOPV(wrap_style,
+ error = css__stylesheet_style_appendOPV(wrap_style,
CSS_PROP_FLEX_WRAP,
0, FLEX_WRAP_NOWRAP);
+ if (error != CSS_OK) {
+ goto css__parse_flex_flow_cleanup;
+ }
}
error = css__stylesheet_merge_style(result, direction_style);
diff --git a/src/parse/properties/list_style.c
b/src/parse/properties/list_style.c
index f12fa2e..b2c8de3 100644
--- a/src/parse/properties/list_style.c
+++ b/src/parse/properties/list_style.c
@@ -122,20 +122,29 @@ css_error css__parse_list_style(css_language *c,
/* defaults */
if (image) {
error = css__stylesheet_style_appendOPV(image_style,
- CSS_PROP_LIST_STYLE_IMAGE,
+ CSS_PROP_LIST_STYLE_IMAGE,
0, LIST_STYLE_IMAGE_NONE);
+ if (error != CSS_OK) {
+ goto css__parse_list_style_cleanup;
+ }
}
if (position) {
error = css__stylesheet_style_appendOPV(position_style,
- CSS_PROP_LIST_STYLE_POSITION,
+ CSS_PROP_LIST_STYLE_POSITION,
0, LIST_STYLE_POSITION_OUTSIDE);
+ if (error != CSS_OK) {
+ goto css__parse_list_style_cleanup;
+ }
}
if (type) {
error = css__stylesheet_style_appendOPV(type_style,
- CSS_PROP_LIST_STYLE_TYPE,
+ CSS_PROP_LIST_STYLE_TYPE,
0, LIST_STYLE_TYPE_DISC);
+ if (error != CSS_OK) {
+ goto css__parse_list_style_cleanup;
+ }
}
diff --git a/src/parse/properties/outline.c b/src/parse/properties/outline.c
index d9d9ec2..4d4fbf0 100644
--- a/src/parse/properties/outline.c
+++ b/src/parse/properties/outline.c
@@ -122,20 +122,29 @@ css_error css__parse_outline(css_language *c,
/* defaults */
if (color) {
error = css__stylesheet_style_appendOPV(color_style,
- CSS_PROP_OUTLINE_COLOR,
+ CSS_PROP_OUTLINE_COLOR,
0, OUTLINE_COLOR_INVERT);
+ if (error != CSS_OK) {
+ goto css__parse_outline_cleanup;
+ }
}
if (style) {
error = css__stylesheet_style_appendOPV(style_style,
- CSS_PROP_OUTLINE_STYLE,
+ CSS_PROP_OUTLINE_STYLE,
0, OUTLINE_STYLE_NONE);
+ if (error != CSS_OK) {
+ goto css__parse_outline_cleanup;
+ }
}
if (width) {
error = css__stylesheet_style_appendOPV(width_style,
- CSS_PROP_OUTLINE_WIDTH,
+ CSS_PROP_OUTLINE_WIDTH,
0, OUTLINE_WIDTH_MEDIUM);
+ if (error != CSS_OK) {
+ goto css__parse_outline_cleanup;
+ }
}
diff --git a/src/select/computed.c b/src/select/computed.c
index 190ca83..4e5588a 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -1460,6 +1460,8 @@ css_error
compute_absolute_border_side_width(css_computed_style *style,
unit = ex_size->unit;
}
break;
+ default:
+ return CSS_INVALID;
}
return set(style, CSS_BORDER_WIDTH_WIDTH, length, unit);
@@ -1741,6 +1743,10 @@ css_error
compute_absolute_length_pair(css_computed_style *style,
type = get(style, &length1, &unit1, &length2, &unit2);
+ if (type != CSS_BACKGROUND_POSITION_SET) {
+ return CSS_OK;
+ }
+
if (unit1 == CSS_UNIT_EX) {
length1 = FMUL(length1, ex_size->value);
unit1 = ex_size->unit;
--
Cascading Style Sheets library
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org