summaryrefslogtreecommitdiff
path: root/src/parse/properties/margin.c
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2010-03-28 00:13:41 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2010-03-28 00:13:41 +0000
commit87d7c3d3dee8d22af977e346ba1c139131152077 (patch)
treea47971e8becc97f9ca06c60a6905c8bfba0693c4 /src/parse/properties/margin.c
parent80cfe125983eb126a9f8afd974196cf0bf347877 (diff)
downloadlibcss-87d7c3d3dee8d22af977e346ba1c139131152077.tar.gz
libcss-87d7c3d3dee8d22af977e346ba1c139131152077.tar.bz2
Make libcss suitable for the new libwapcaplet behaviour.
svn path=/trunk/libcss/; revision=10168
Diffstat (limited to 'src/parse/properties/margin.c')
-rw-r--r--src/parse/properties/margin.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/parse/properties/margin.c b/src/parse/properties/margin.c
index 456e6ee..b3b390c 100644
--- a/src/parse/properties/margin.c
+++ b/src/parse/properties/margin.c
@@ -1,7 +1,7 @@
/*
* This file is part of LibCSS.
* Licensed under the MIT License,
- * http://www.opensource.org/licenses/mit-license.php
+ * http://www.opensource.org/licenses/mit-license.php
* Copyright 2009 John-Mark Bell <jmb@netsurf-browser.org>
*/
@@ -20,16 +20,16 @@ static css_error parse_margin_side(css_language *c,
/**
* Parse margin shorthand
*
- * \param c Parsing context
+ * \param c Parsing context
* \param vector Vector of tokens to process
- * \param ctx Pointer to vector iteration context
+ * \param ctx Pointer to vector iteration context
* \param result Pointer to location to receive resulting style
* \return CSS_OK on success,
- * CSS_NOMEM on memory exhaustion,
- * CSS_INVALID if the input is not valid
+ * 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.
+ * If the input is invalid, then \a *ctx remains unchanged.
*/
css_error parse_margin(css_language *c,
const parserutils_vector *vector, int *ctx,
@@ -249,15 +249,15 @@ css_error parse_margin(css_language *c,
/* Clean up after ourselves */
cleanup:
if (top)
- css_stylesheet_style_destroy(c->sheet, top);
+ css_stylesheet_style_destroy(c->sheet, top, error == CSS_OK);
if (right)
- css_stylesheet_style_destroy(c->sheet, right);
+ css_stylesheet_style_destroy(c->sheet, right, error == CSS_OK);
if (bottom)
- css_stylesheet_style_destroy(c->sheet, bottom);
+ css_stylesheet_style_destroy(c->sheet, bottom, error == CSS_OK);
if (left)
- css_stylesheet_style_destroy(c->sheet, left);
+ css_stylesheet_style_destroy(c->sheet, left, error == CSS_OK);
if (ret)
- css_stylesheet_style_destroy(c->sheet, ret);
+ css_stylesheet_style_destroy(c->sheet, ret, error == CSS_OK);
if (error != CSS_OK)
*ctx = orig_ctx;
@@ -268,16 +268,16 @@ cleanup:
/**
* Parse margin-bottom
*
- * \param c Parsing context
+ * \param c Parsing context
* \param vector Vector of tokens to process
- * \param ctx Pointer to vector iteration context
+ * \param ctx Pointer to vector iteration context
* \param result Pointer to location to receive resulting style
* \return CSS_OK on success,
- * CSS_NOMEM on memory exhaustion,
- * CSS_INVALID if the input is not valid
+ * 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.
+ * If the input is invalid, then \a *ctx remains unchanged.
*/
css_error parse_margin_bottom(css_language *c,
const parserutils_vector *vector, int *ctx,
@@ -290,16 +290,16 @@ css_error parse_margin_bottom(css_language *c,
/**
* Parse margin-left
*
- * \param c Parsing context
+ * \param c Parsing context
* \param vector Vector of tokens to process
- * \param ctx Pointer to vector iteration context
+ * \param ctx Pointer to vector iteration context
* \param result Pointer to location to receive resulting style
* \return CSS_OK on success,
- * CSS_NOMEM on memory exhaustion,
- * CSS_INVALID if the input is not valid
+ * 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.
+ * If the input is invalid, then \a *ctx remains unchanged.
*/
css_error parse_margin_left(css_language *c,
const parserutils_vector *vector, int *ctx,
@@ -311,16 +311,16 @@ css_error parse_margin_left(css_language *c,
/**
* Parse margin-right
*
- * \param c Parsing context
+ * \param c Parsing context
* \param vector Vector of tokens to process
- * \param ctx Pointer to vector iteration context
+ * \param ctx Pointer to vector iteration context
* \param result Pointer to location to receive resulting style
* \return CSS_OK on success,
- * CSS_NOMEM on memory exhaustion,
- * CSS_INVALID if the input is not valid
+ * 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.
+ * If the input is invalid, then \a *ctx remains unchanged.
*/
css_error parse_margin_right(css_language *c,
const parserutils_vector *vector, int *ctx,
@@ -332,16 +332,16 @@ css_error parse_margin_right(css_language *c,
/**
* Parse margin-top
*
- * \param c Parsing context
+ * \param c Parsing context
* \param vector Vector of tokens to process
- * \param ctx Pointer to vector iteration context
+ * \param ctx Pointer to vector iteration context
* \param result Pointer to location to receive resulting style
* \return CSS_OK on success,
- * CSS_NOMEM on memory exhaustion,
- * CSS_INVALID if the input is not valid
+ * 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.
+ * If the input is invalid, then \a *ctx remains unchanged.
*/
css_error parse_margin_top(css_language *c,
const parserutils_vector *vector, int *ctx,
@@ -353,16 +353,16 @@ css_error parse_margin_top(css_language *c,
/**
* Parse margin-{top,right,bottom,left}
*
- * \param c Parsing context
+ * \param c Parsing context
* \param vector Vector of tokens to process
- * \param ctx Pointer to vector iteration context
+ * \param ctx Pointer to vector iteration context
* \param result Pointer to location to receive resulting style
* \return CSS_OK on success,
- * CSS_NOMEM on memory exhaustion,
- * CSS_INVALID if the input is not valid
+ * 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.
+ * If the input is invalid, then \a *ctx remains unchanged.
*/
css_error parse_margin_side(css_language *c,
const parserutils_vector *vector, int *ctx,