summaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-09-10 13:47:57 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-09-10 13:47:57 +0100
commit4211ae875a892f3af2b0749ce50c271665b7833d (patch)
tree02793216eb995f32626b1a34dd477643435b3900 /src/parse
parent627d6ebea72a62143e8d8a865e0d1d28f98ab09b (diff)
downloadlibcss-4211ae875a892f3af2b0749ce50c271665b7833d.tar.gz
libcss-4211ae875a892f3af2b0749ce50c271665b7833d.tar.bz2
Apply slightly modified patch from Murat Gocmen.
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/properties/utils.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/parse/properties/utils.c b/src/parse/properties/utils.c
index 63fe065..e018599 100644
--- a/src/parse/properties/utils.c
+++ b/src/parse/properties/utils.c
@@ -212,7 +212,7 @@ css_error css__parse_border_side(css_language *c,
} while (*ctx != prev_ctx && token != NULL);
if (style) {
- error = css__stylesheet_style_appendOPV(style_style,
+ error = css__stylesheet_style_appendOPV(style_style,
CSS_PROP_BORDER_TOP_STYLE + side, 0,
BORDER_STYLE_NONE);
if (error != CSS_OK)
@@ -220,9 +220,17 @@ css_error css__parse_border_side(css_language *c,
}
if (width) {
- error = css__stylesheet_style_appendOPV(width_style,
- CSS_PROP_BORDER_TOP_WIDTH + side,
- 0, BORDER_WIDTH_MEDIUM);
+ error = css__stylesheet_style_appendOPV(width_style,
+ CSS_PROP_BORDER_TOP_WIDTH + side, 0,
+ BORDER_WIDTH_MEDIUM);
+ if (error != CSS_OK)
+ goto css__parse_border_side_cleanup;
+ }
+
+ if (color) {
+ error = css__stylesheet_style_appendOPV(color_style,
+ CSS_PROP_BORDER_TOP_COLOR + side, 0,
+ BORDER_COLOR_CURRENT_COLOR);
if (error != CSS_OK)
goto css__parse_border_side_cleanup;
}