summaryrefslogtreecommitdiff
path: root/src/select
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2017-09-04 14:56:51 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2017-09-04 14:56:51 +0100
commit2fcb157f28b152ba32e89baddbd811b0d6e76b79 (patch)
tree30f96332ac7993ff4acf88b4892f922a80ddd393 /src/select
parent2fc4177a09cc6fc6706f84dbe157077a41b6e22b (diff)
downloadlibcss-2fcb157f28b152ba32e89baddbd811b0d6e76b79.tar.gz
libcss-2fcb157f28b152ba32e89baddbd811b0d6e76b79.tar.bz2
Strip trailing whitespace.
Diffstat (limited to 'src/select')
-rw-r--r--src/select/computed.c70
-rw-r--r--src/select/computed.h8
-rw-r--r--src/select/dispatch.h4
-rw-r--r--src/select/font_face.c46
-rw-r--r--src/select/font_face.h2
-rw-r--r--src/select/hash.c8
-rw-r--r--src/select/properties/azimuth.c4
-rw-r--r--src/select/properties/background_attachment.c6
-rw-r--r--src/select/properties/background_color.c6
-rw-r--r--src/select/properties/background_image.c6
-rw-r--r--src/select/properties/background_position.c12
-rw-r--r--src/select/properties/background_repeat.c6
-rw-r--r--src/select/properties/border_bottom_color.c6
-rw-r--r--src/select/properties/border_bottom_style.c4
-rw-r--r--src/select/properties/border_bottom_width.c4
-rw-r--r--src/select/properties/border_collapse.c6
-rw-r--r--src/select/properties/border_left_color.c8
-rw-r--r--src/select/properties/border_left_style.c4
-rw-r--r--src/select/properties/border_left_width.c4
-rw-r--r--src/select/properties/border_right_color.c8
-rw-r--r--src/select/properties/border_right_style.c4
-rw-r--r--src/select/properties/border_right_width.c4
-rw-r--r--src/select/properties/border_spacing.c10
-rw-r--r--src/select/properties/border_top_color.c4
-rw-r--r--src/select/properties/border_top_style.c4
-rw-r--r--src/select/properties/border_top_width.c8
-rw-r--r--src/select/properties/bottom.c6
-rw-r--r--src/select/properties/box_sizing.c2
-rw-r--r--src/select/properties/break_after.c2
-rw-r--r--src/select/properties/break_before.c2
-rw-r--r--src/select/properties/break_inside.c2
-rw-r--r--src/select/properties/caption_side.c6
-rw-r--r--src/select/properties/clear.c4
-rw-r--r--src/select/properties/clip.c10
-rw-r--r--src/select/properties/color.c8
-rw-r--r--src/select/properties/column_count.c4
-rw-r--r--src/select/properties/column_fill.c2
-rw-r--r--src/select/properties/column_gap.c2
-rw-r--r--src/select/properties/column_rule_color.c2
-rw-r--r--src/select/properties/column_rule_style.c2
-rw-r--r--src/select/properties/column_rule_width.c2
-rw-r--r--src/select/properties/content.c16
-rw-r--r--src/select/properties/counter_increment.c16
-rw-r--r--src/select/properties/counter_reset.c8
-rw-r--r--src/select/properties/cue_after.c2
-rw-r--r--src/select/properties/cue_before.c2
-rw-r--r--src/select/properties/cursor.c14
-rw-r--r--src/select/properties/direction.c2
-rw-r--r--src/select/properties/display.c2
-rw-r--r--src/select/properties/elevation.c4
-rw-r--r--src/select/properties/empty_cells.c2
-rw-r--r--src/select/properties/float.c2
-rw-r--r--src/select/properties/font_family.c22
-rw-r--r--src/select/properties/font_size.c8
-rw-r--r--src/select/properties/font_style.c4
-rw-r--r--src/select/properties/font_variant.c2
-rw-r--r--src/select/properties/font_weight.c2
-rw-r--r--src/select/properties/height.c2
-rw-r--r--src/select/properties/helpers.c28
-rw-r--r--src/select/properties/helpers.h12
-rw-r--r--src/select/properties/left.c2
-rw-r--r--src/select/properties/letter_spacing.c4
-rw-r--r--src/select/properties/line_height.c4
-rw-r--r--src/select/properties/list_style_image.c4
-rw-r--r--src/select/properties/list_style_position.c4
-rw-r--r--src/select/properties/list_style_type.c2
-rw-r--r--src/select/properties/margin_bottom.c2
-rw-r--r--src/select/properties/margin_left.c2
-rw-r--r--src/select/properties/margin_right.c2
-rw-r--r--src/select/properties/margin_top.c2
-rw-r--r--src/select/properties/max_height.c4
-rw-r--r--src/select/properties/max_width.c2
-rw-r--r--src/select/properties/min_height.c4
-rw-r--r--src/select/properties/min_width.c2
-rw-r--r--src/select/properties/opacity.c2
-rw-r--r--src/select/properties/orphans.c6
-rw-r--r--src/select/properties/outline_color.c2
-rw-r--r--src/select/properties/outline_style.c2
-rw-r--r--src/select/properties/outline_width.c2
-rw-r--r--src/select/properties/overflow_x.c2
-rw-r--r--src/select/properties/overflow_y.c2
-rw-r--r--src/select/properties/padding_bottom.c4
-rw-r--r--src/select/properties/padding_left.c2
-rw-r--r--src/select/properties/padding_right.c4
-rw-r--r--src/select/properties/padding_top.c2
-rw-r--r--src/select/properties/page_break_after.c2
-rw-r--r--src/select/properties/page_break_before.c10
-rw-r--r--src/select/properties/page_break_inside.c8
-rw-r--r--src/select/properties/pause_after.c2
-rw-r--r--src/select/properties/pause_before.c2
-rw-r--r--src/select/properties/pitch.c2
-rw-r--r--src/select/properties/pitch_range.c2
-rw-r--r--src/select/properties/play_during.c2
-rw-r--r--src/select/properties/position.c2
-rw-r--r--src/select/properties/quotes.c8
-rw-r--r--src/select/properties/richness.c2
-rw-r--r--src/select/properties/right.c2
-rw-r--r--src/select/properties/speak.c2
-rw-r--r--src/select/properties/speak_header.c2
-rw-r--r--src/select/properties/speak_numeral.c2
-rw-r--r--src/select/properties/speak_punctuation.c2
-rw-r--r--src/select/properties/speech_rate.c2
-rw-r--r--src/select/properties/stress.c2
-rw-r--r--src/select/properties/table_layout.c2
-rw-r--r--src/select/properties/text_align.c8
-rw-r--r--src/select/properties/text_decoration.c6
-rw-r--r--src/select/properties/text_indent.c4
-rw-r--r--src/select/properties/text_transform.c6
-rw-r--r--src/select/properties/top.c2
-rw-r--r--src/select/properties/unicode_bidi.c4
-rw-r--r--src/select/properties/vertical_align.c2
-rw-r--r--src/select/properties/visibility.c4
-rw-r--r--src/select/properties/voice_family.c4
-rw-r--r--src/select/properties/volume.c2
-rw-r--r--src/select/properties/white_space.c4
-rw-r--r--src/select/properties/widows.c6
-rw-r--r--src/select/properties/width.c2
-rw-r--r--src/select/properties/word_spacing.c4
-rw-r--r--src/select/properties/writing_mode.c6
-rw-r--r--src/select/properties/z_index.c2
-rw-r--r--src/select/select.c338
121 files changed, 497 insertions, 497 deletions
diff --git a/src/select/computed.c b/src/select/computed.c
index 23f7ea4..03e7c15 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -25,7 +25,7 @@ static css_error compute_absolute_border_width(css_computed_style *style,
const css_hint_length *ex_size);
static css_error compute_absolute_border_side_width(css_computed_style *style,
const css_hint_length *ex_size,
- uint8_t (*get)(const css_computed_style *style,
+ uint8_t (*get)(const css_computed_style *style,
css_fixed *len, css_unit *unit),
css_error (*set)(css_computed_style *style, uint8_t type,
css_fixed len, css_unit unit));
@@ -43,13 +43,13 @@ static css_error compute_absolute_vertical_align(css_computed_style *style,
const css_hint_length *ex_size);
static css_error compute_absolute_length(css_computed_style *style,
const css_hint_length *ex_size,
- uint8_t (*get)(const css_computed_style *style,
+ uint8_t (*get)(const css_computed_style *style,
css_fixed *len, css_unit *unit),
css_error (*set)(css_computed_style *style, uint8_t type,
css_fixed len, css_unit unit));
static css_error compute_absolute_length_pair(css_computed_style *style,
const css_hint_length *ex_size,
- uint8_t (*get)(const css_computed_style *style,
+ uint8_t (*get)(const css_computed_style *style,
css_fixed *len1, css_unit *unit1,
css_fixed *len2, css_unit *unit2),
css_error (*set)(css_computed_style *style, uint8_t type,
@@ -534,7 +534,7 @@ uint8_t css_computed_right(const css_computed_style *style,
*length = -style->i.left;
*unit = (css_unit) (left >> 2);
} else {
- /** \todo Consider containing block's direction
+ /** \todo Consider containing block's direction
* if overconstrained */
}
@@ -598,7 +598,7 @@ uint8_t css_computed_left(const css_computed_style *style,
*length = -style->i.right;
*unit = (css_unit) (right >> 2);
} else {
- /** \todo Consider containing block's direction
+ /** \todo Consider containing block's direction
* if overconstrained */
}
@@ -921,7 +921,7 @@ uint8_t css_computed_display(const css_computed_style *style,
if (display == CSS_DISPLAY_NONE)
return display; /* 1. */
- if ((position == CSS_POSITION_ABSOLUTE ||
+ if ((position == CSS_POSITION_ABSOLUTE ||
position == CSS_POSITION_FIXED) /* 2. */ ||
css_computed_float(style) != CSS_FLOAT_NONE /* 3. */ ||
root /* 4. */) {
@@ -1031,12 +1031,12 @@ uint8_t css_computed_page_break_after(const css_computed_style *style)
{
return get_page_break_after(style);
}
-
+
uint8_t css_computed_page_break_before(const css_computed_style *style)
{
return get_page_break_before(style);
}
-
+
uint8_t css_computed_page_break_inside(const css_computed_style *style)
{
return get_page_break_inside(style);
@@ -1070,7 +1070,7 @@ uint8_t css_computed_widows(const css_computed_style *style,
*/
css_error css__compute_absolute_values(const css_computed_style *parent,
css_computed_style *style,
- css_error (*compute_font_size)(void *pw,
+ css_error (*compute_font_size)(void *pw,
const css_hint *parent, css_hint *size),
void *pw)
{
@@ -1079,13 +1079,13 @@ css_error css__compute_absolute_values(const css_computed_style *parent,
/* Ensure font-size is absolute */
if (parent != NULL) {
- psize.status = get_font_size(parent,
- &psize.data.length.value,
+ psize.status = get_font_size(parent,
+ &psize.data.length.value,
&psize.data.length.unit);
}
- size.status = get_font_size(style,
- &size.data.length.value,
+ size.status = get_font_size(style,
+ &size.data.length.value,
&size.data.length.unit);
error = compute_font_size(pw, parent != NULL ? &psize : NULL, &size);
@@ -1093,7 +1093,7 @@ css_error css__compute_absolute_values(const css_computed_style *parent,
return error;
error = set_font_size(style, size.status,
- size.data.length.value,
+ size.data.length.value,
size.data.length.unit);
if (error != CSS_OK)
return error;
@@ -1108,14 +1108,14 @@ css_error css__compute_absolute_values(const css_computed_style *parent,
/* Convert ex size into ems */
if (size.data.length.value != 0)
- ex_size.data.length.value = FDIV(ex_size.data.length.value,
+ ex_size.data.length.value = FDIV(ex_size.data.length.value,
size.data.length.value);
else
ex_size.data.length.value = 0;
ex_size.data.length.unit = CSS_UNIT_EM;
/* Fix up background-position */
- error = compute_absolute_length_pair(style, &ex_size.data.length,
+ error = compute_absolute_length_pair(style, &ex_size.data.length,
get_background_position,
set_background_position);
if (error != CSS_OK)
@@ -1223,7 +1223,7 @@ css_error css__compute_absolute_values(const css_computed_style *parent,
/* Fix up letter-spacing */
error = compute_absolute_length(style,
&ex_size.data.length,
- get_letter_spacing,
+ get_letter_spacing,
set_letter_spacing);
if (error != CSS_OK)
return error;
@@ -1236,9 +1236,9 @@ css_error css__compute_absolute_values(const css_computed_style *parent,
return error;
/* Fix up outline-width */
- error = compute_absolute_border_side_width(style,
- &ex_size.data.length,
- get_outline_width,
+ error = compute_absolute_border_side_width(style,
+ &ex_size.data.length,
+ get_outline_width,
set_outline_width);
if (error != CSS_OK)
return error;
@@ -1246,7 +1246,7 @@ css_error css__compute_absolute_values(const css_computed_style *parent,
/* Fix up word-spacing */
error = compute_absolute_length(style,
&ex_size.data.length,
- get_word_spacing,
+ get_word_spacing,
set_word_spacing);
if (error != CSS_OK)
return error;
@@ -1313,7 +1313,7 @@ css_error compute_absolute_color(css_computed_style *style,
}
/**
- * Compute border colours, replacing any set to currentColor with
+ * Compute border colours, replacing any set to currentColor with
* the computed value of color.
*
* \param style The style to process
@@ -1327,28 +1327,28 @@ css_error compute_border_colors(css_computed_style *style)
css_computed_color(style, &color);
if (get_border_top_color(style, &bcol) == CSS_BORDER_COLOR_CURRENT_COLOR) {
- error = set_border_top_color(style,
+ error = set_border_top_color(style,
CSS_BORDER_COLOR_COLOR, color);
if (error != CSS_OK)
return error;
}
if (get_border_right_color(style, &bcol) == CSS_BORDER_COLOR_CURRENT_COLOR) {
- error = set_border_right_color(style,
+ error = set_border_right_color(style,
CSS_BORDER_COLOR_COLOR, color);
if (error != CSS_OK)
return error;
}
if (get_border_bottom_color(style, &bcol) == CSS_BORDER_COLOR_CURRENT_COLOR) {
- error = set_border_bottom_color(style,
+ error = set_border_bottom_color(style,
CSS_BORDER_COLOR_COLOR, color);
if (error != CSS_OK)
return error;
}
if (get_border_left_color(style, &bcol) == CSS_BORDER_COLOR_CURRENT_COLOR) {
- error = set_border_left_color(style,
+ error = set_border_left_color(style,
CSS_BORDER_COLOR_COLOR, color);
if (error != CSS_OK)
return error;
@@ -1370,25 +1370,25 @@ css_error compute_absolute_border_width(css_computed_style *style,
css_error error;
error = compute_absolute_border_side_width(style, ex_size,
- get_border_top_width,
+ get_border_top_width,
set_border_top_width);
if (error != CSS_OK)
return error;
error = compute_absolute_border_side_width(style, ex_size,
- get_border_right_width,
+ get_border_right_width,
set_border_right_width);
if (error != CSS_OK)
return error;
error = compute_absolute_border_side_width(style, ex_size,
- get_border_bottom_width,
+ get_border_bottom_width,
set_border_bottom_width);
if (error != CSS_OK)
return error;
error = compute_absolute_border_side_width(style, ex_size,
- get_border_left_width,
+ get_border_left_width,
set_border_left_width);
if (error != CSS_OK)
return error;
@@ -1407,7 +1407,7 @@ css_error compute_absolute_border_width(css_computed_style *style,
*/
css_error compute_absolute_border_side_width(css_computed_style *style,
const css_hint_length *ex_size,
- uint8_t (*get)(const css_computed_style *style,
+ uint8_t (*get)(const css_computed_style *style,
css_fixed *len, css_unit *unit),
css_error (*set)(css_computed_style *style, uint8_t type,
css_fixed len, css_unit unit))
@@ -1588,7 +1588,7 @@ css_error compute_absolute_margins(css_computed_style *style,
get_margin_left, set_margin_left);
if (error != CSS_OK)
return error;
-
+
return CSS_OK;
}
@@ -1623,7 +1623,7 @@ css_error compute_absolute_padding(css_computed_style *style,
get_padding_left, set_padding_left);
if (error != CSS_OK)
return error;
-
+
return CSS_OK;
}
@@ -1669,7 +1669,7 @@ css_error compute_absolute_vertical_align(css_computed_style *style,
*/
css_error compute_absolute_length(css_computed_style *style,
const css_hint_length *ex_size,
- uint8_t (*get)(const css_computed_style *style,
+ uint8_t (*get)(const css_computed_style *style,
css_fixed *len, css_unit *unit),
css_error (*set)(css_computed_style *style, uint8_t type,
css_fixed len, css_unit unit))
@@ -1702,7 +1702,7 @@ css_error compute_absolute_length(css_computed_style *style,
*/
css_error compute_absolute_length_pair(css_computed_style *style,
const css_hint_length *ex_size,
- uint8_t (*get)(const css_computed_style *style,
+ uint8_t (*get)(const css_computed_style *style,
css_fixed *len1, css_unit *unit1,
css_fixed *len2, css_unit *unit2),
css_error (*set)(css_computed_style *style, uint8_t type,
diff --git a/src/select/computed.h b/src/select/computed.h
index d2301f5..9f2abdd 100644
--- a/src/select/computed.h
+++ b/src/select/computed.h
@@ -124,11 +124,11 @@ typedef struct css_computed_page {
* 2 ......wo widows | orphans
*/
uint8_t bits[2];
-
+
int32_t widows;
int32_t orphans;
} css_computed_page;
-
+
struct css_computed_style_i {
/*
* background_attachment 2
@@ -205,7 +205,7 @@ struct css_computed_style_i {
* --- ---
* 181 bits 140 + 2sizeof(ptr) bytes
*
- * Encode font family as an array of string objects, terminated with a
+ * Encode font family as an array of string objects, terminated with a
* blank entry.
*
* font_family 3 sizeof(ptr)
@@ -357,7 +357,7 @@ css_error css__computed_uncommon_destroy(css_computed_uncommon *uncommon);
css_error css__compute_absolute_values(const css_computed_style *parent,
css_computed_style *style,
- css_error (*compute_font_size)(void *pw,
+ css_error (*compute_font_size)(void *pw,
const css_hint *parent, css_hint *size),
void *pw);
diff --git a/src/select/dispatch.h b/src/select/dispatch.h
index 2fcb739..c1db7d9 100644
--- a/src/select/dispatch.h
+++ b/src/select/dispatch.h
@@ -28,9 +28,9 @@ enum prop_group {
};
extern struct prop_table {
- css_error (*cascade)(uint32_t opv, css_style *style,
+ css_error (*cascade)(uint32_t opv, css_style *style,
css_select_state *state);
- css_error (*set_from_hint)(const css_hint *hint,
+ css_error (*set_from_hint)(const css_hint *hint,
css_computed_style *style);
css_error (*initial)(css_select_state *state);
css_error (*compose)(const css_computed_style *parent,
diff --git a/src/select/font_face.c b/src/select/font_face.c
index ea790eb..07e4ef9 100644
--- a/src/select/font_face.c
+++ b/src/select/font_face.c
@@ -20,7 +20,7 @@ static void font_faces_srcs_destroy(css_font_face *font_face)
lwc_string_unref(srcs[i].location);
}
}
-
+
free(srcs);
font_face->srcs = NULL;
}
@@ -43,18 +43,18 @@ static const css_font_face default_font_face = {
css_error css__font_face_create(css_font_face **result)
{
css_font_face *f;
-
+
if (result == NULL)
return CSS_BADPARM;
-
+
f = malloc(sizeof(css_font_face));
if (f == NULL)
return CSS_NOMEM;
-
+
memcpy(f, &default_font_face, sizeof(css_font_face));
-
+
*result = f;
-
+
return CSS_OK;
}
@@ -65,18 +65,18 @@ css_error css__font_face_create(css_font_face **result)
* \return CSS_OK on success, appropriate error otherwise
*/
css_error css__font_face_destroy(css_font_face *font_face)
-{
+{
if (font_face == NULL)
return CSS_BADPARM;
if (font_face->font_family != NULL)
lwc_string_unref(font_face->font_family);
-
+
if (font_face->srcs != NULL)
font_faces_srcs_destroy(font_face);
free(font_face);
-
+
return CSS_OK;
}
@@ -95,10 +95,10 @@ css_error css__font_face_set_font_family(css_font_face *font_face,
{
if (font_face == NULL || font_family == NULL)
return CSS_BADPARM;
-
+
if (font_face->font_family != NULL)
lwc_string_unref(font_face->font_family);
-
+
font_face->font_family = lwc_string_ref(font_family);
return CSS_OK;
@@ -117,9 +117,9 @@ css_error css_font_face_get_font_family(const css_font_face *font_face,
{
if (font_face == NULL || font_family == NULL)
return CSS_BADPARM;
-
+
*font_family = font_face->font_family;
-
+
return CSS_OK;
}
@@ -153,7 +153,7 @@ uint8_t css_font_face_font_weight(const css_font_face *font_face)
* \return CSS_OK on success,
* CSS_BADPARM on bad parameters.
*/
-css_error css_font_face_count_srcs(const css_font_face *font_face,
+css_error css_font_face_count_srcs(const css_font_face *font_face,
uint32_t *count)
{
if (font_face == NULL || count == NULL)
@@ -179,7 +179,7 @@ css_error css_font_face_get_src(const css_font_face *font_face,
return CSS_BADPARM;
*src = &(font_face->srcs[index]);
-
+
return CSS_OK;
}
@@ -191,19 +191,19 @@ css_error css_font_face_get_src(const css_font_face *font_face,
* \return CSS_OK on success,
* CSS_BADPARM on bad parameters.
*
- * \note The type of location (local or URL) can be gathered from
+ * \note The type of location (local or URL) can be gathered from
* css_font_face_src_location_type, and the format of font (if specified)
* from css_font_face_src_format.
*/
css_error css_font_face_src_get_location(const css_font_face_src *src,
lwc_string **location)
{
- if (src == NULL || location == NULL)
+ if (src == NULL || location == NULL)
return CSS_BADPARM;
-
+
*location = src->location;
- return CSS_OK;
+ return CSS_OK;
}
/**
@@ -232,9 +232,9 @@ css_font_face_format css_font_face_src_format(const css_font_face_src *src)
/**
* Set a font-faces array of srcs.
*
- * \param font_face The font-face
+ * \param font_face The font-face
* \param srcs The array of css_font_face_srcs
- * \param n_srcs The count of css_font_face_srcs in the array
+ * \param n_srcs The count of css_font_face_srcs in the array
* \return The format, if specified
*/
css_error css__font_face_set_srcs(css_font_face *font_face,
@@ -242,10 +242,10 @@ css_error css__font_face_set_srcs(css_font_face *font_face,
{
if (font_face->srcs != NULL)
font_faces_srcs_destroy(font_face);
-
+
font_face->srcs = srcs;
font_face->n_srcs = n_srcs;
-
+
return CSS_OK;
}
diff --git a/src/select/font_face.h b/src/select/font_face.h
index 4e6d094..5f46433 100644
--- a/src/select/font_face.h
+++ b/src/select/font_face.h
@@ -27,7 +27,7 @@ struct css_font_face {
lwc_string *font_family;
css_font_face_src *srcs;
uint32_t n_srcs;
-
+
/*
* Bit allocations:
*
diff --git a/src/select/hash.c b/src/select/hash.c
index 4807e0f..dce4065 100644
--- a/src/select/hash.c
+++ b/src/select/hash.c
@@ -43,7 +43,7 @@ static hash_entry empty_slot;
static inline lwc_string *_class_name(const css_selector *selector);
static inline lwc_string *_id_name(const css_selector *selector);
-static css_error _insert_into_chain(css_selector_hash *ctx, hash_entry *head,
+static css_error _insert_into_chain(css_selector_hash *ctx, hash_entry *head,
const css_selector *selector);
static css_error _remove_from_chain(css_selector_hash *ctx, hash_entry *head,
const css_selector *selector);
@@ -183,7 +183,7 @@ css_error css__selector_hash_create(css_selector_hash **hash)
/* Universal chain head already initiliased by calloc of `h`. */
- h->hash_size = sizeof(css_selector_hash) +
+ h->hash_size = sizeof(css_selector_hash) +
DEFAULT_SLOTS * sizeof(hash_entry) +
DEFAULT_SLOTS * sizeof(hash_entry) +
DEFAULT_SLOTS * sizeof(hash_entry);
@@ -810,7 +810,7 @@ static void print_chain_bloom_details(css_bloom bloom[CSS_BLOOM_SIZE])
* \return CSS_OK on success,
* CSS_NOMEM on memory exhaustion.
*/
-css_error _insert_into_chain(css_selector_hash *ctx, hash_entry *head,
+css_error _insert_into_chain(css_selector_hash *ctx, hash_entry *head,
const css_selector *selector)
{
if (head->sel == NULL) {
@@ -836,7 +836,7 @@ css_error _insert_into_chain(css_selector_hash *ctx, hash_entry *head,
/* Sort by ascending rule index */
if (search->sel->specificity == selector->specificity &&
- search->sel->rule->index >
+ search->sel->rule->index >
selector->rule->index)
break;
diff --git a/src/select/properties/azimuth.c b/src/select/properties/azimuth.c
index 275ae2f..d52110f 100644
--- a/src/select/properties/azimuth.c
+++ b/src/select/properties/azimuth.c
@@ -46,7 +46,7 @@ css_error css__cascade_azimuth(uint32_t opv, css_style *style,
unit = css__to_css_unit(unit);
- if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
+ if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
isInherit(opv))) {
/** \todo set computed azimuth */
}
@@ -54,7 +54,7 @@ css_error css__cascade_azimuth(uint32_t opv, css_style *style,
return CSS_OK;
}
-css_error css__set_azimuth_from_hint(const css_hint *hint,
+css_error css__set_azimuth_from_hint(const css_hint *hint,
css_computed_style *style)
{
UNUSED(hint);
diff --git a/src/select/properties/background_attachment.c b/src/select/properties/background_attachment.c
index 89fd181..834c830 100644
--- a/src/select/properties/background_attachment.c
+++ b/src/select/properties/background_attachment.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_background_attachment(uint32_t opv, css_style *style,
+css_error css__cascade_background_attachment(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_BACKGROUND_ATTACHMENT_INHERIT;
@@ -40,7 +40,7 @@ css_error css__cascade_background_attachment(uint32_t opv, css_style *style,
return CSS_OK;
}
-css_error css__set_background_attachment_from_hint(const css_hint *hint,
+css_error css__set_background_attachment_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_background_attachment(style, hint->status);
@@ -48,7 +48,7 @@ css_error css__set_background_attachment_from_hint(const css_hint *hint,
css_error css__initial_background_attachment(css_select_state *state)
{
- return set_background_attachment(state->computed,
+ return set_background_attachment(state->computed,
CSS_BACKGROUND_ATTACHMENT_SCROLL);
}
diff --git a/src/select/properties/background_color.c b/src/select/properties/background_color.c
index 07ba82e..bb90604 100644
--- a/src/select/properties/background_color.c
+++ b/src/select/properties/background_color.c
@@ -14,13 +14,13 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_background_color(uint32_t opv, css_style *style,
+css_error css__cascade_background_color(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_bg_border_color(opv, style, state, set_background_color);
}
-css_error css__set_background_color_from_hint(const css_hint *hint,
+css_error css__set_background_color_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_background_color(style, hint->status, hint->data.color);
@@ -28,7 +28,7 @@ css_error css__set_background_color_from_hint(const css_hint *hint,
css_error css__initial_background_color(css_select_state *state)
{
- return set_background_color(state->computed,
+ return set_background_color(state->computed,
CSS_BACKGROUND_COLOR_COLOR, 0);
}
diff --git a/src/select/properties/background_image.c b/src/select/properties/background_image.c
index e371a15..96f7409 100644
--- a/src/select/properties/background_image.c
+++ b/src/select/properties/background_image.c
@@ -14,13 +14,13 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_background_image(uint32_t opv, css_style *style,
+css_error css__cascade_background_image(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_uri_none(opv, style, state, set_background_image);
}
-css_error css__set_background_image_from_hint(const css_hint *hint,
+css_error css__set_background_image_from_hint(const css_hint *hint,
css_computed_style *style)
{
css_error error;
@@ -35,7 +35,7 @@ css_error css__set_background_image_from_hint(const css_hint *hint,
css_error css__initial_background_image(css_select_state *state)
{
- return set_background_image(state->computed,
+ return set_background_image(state->computed,
CSS_BACKGROUND_IMAGE_NONE, NULL);
}
diff --git a/src/select/properties/background_position.c b/src/select/properties/background_position.c
index e7b5d6f..d925b9c 100644
--- a/src/select/properties/background_position.c
+++ b/src/select/properties/background_position.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_background_position(uint32_t opv, css_style *style,
+css_error css__cascade_background_position(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_BACKGROUND_POSITION_INHERIT;
@@ -81,18 +81,18 @@ css_error css__cascade_background_position(uint32_t opv, css_style *style,
return CSS_OK;
}
-css_error css__set_background_position_from_hint(const css_hint *hint,
+css_error css__set_background_position_from_hint(const css_hint *hint,
css_computed_style *style)
{
- return set_background_position(style, hint->status,
+ return set_background_position(style, hint->status,
hint->data.position.h.value, hint->data.position.h.unit,
hint->data.position.v.value, hint->data.position.v.unit);
}
css_error css__initial_background_position(css_select_state *state)
{
- return set_background_position(state->computed,
- CSS_BACKGROUND_POSITION_SET,
+ return set_background_position(state->computed,
+ CSS_BACKGROUND_POSITION_SET,
0, CSS_UNIT_PCT, 0, CSS_UNIT_PCT);
}
@@ -102,7 +102,7 @@ css_error css__compose_background_position(const css_computed_style *parent,
{
css_fixed hlength = 0, vlength = 0;
css_unit hunit = CSS_UNIT_PX, vunit = CSS_UNIT_PX;
- uint8_t type = get_background_position(child, &hlength, &hunit,
+ uint8_t type = get_background_position(child, &hlength, &hunit,
&vlength, &vunit);
if (type == CSS_BACKGROUND_POSITION_INHERIT) {
diff --git a/src/select/properties/background_repeat.c b/src/select/properties/background_repeat.c
index e31275f..3881573 100644
--- a/src/select/properties/background_repeat.c
+++ b/src/select/properties/background_repeat.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_background_repeat(uint32_t opv, css_style *style,
+css_error css__cascade_background_repeat(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_BACKGROUND_REPEAT_INHERIT;
@@ -46,7 +46,7 @@ css_error css__cascade_background_repeat(uint32_t opv, css_style *style,
return CSS_OK;
}
-css_error css__set_background_repeat_from_hint(const css_hint *hint,
+css_error css__set_background_repeat_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_background_repeat(style, hint->status);
@@ -54,7 +54,7 @@ css_error css__set_background_repeat_from_hint(const css_hint *hint,
css_error css__initial_background_repeat(css_select_state *state)
{
- return set_background_repeat(state->computed,
+ return set_background_repeat(state->computed,
CSS_BACKGROUND_REPEAT_REPEAT);
}
diff --git a/src/select/properties/border_bottom_color.c b/src/select/properties/border_bottom_color.c
index 2e63982..bdbecb7 100644
--- a/src/select/properties/border_bottom_color.c
+++ b/src/select/properties/border_bottom_color.c
@@ -14,14 +14,14 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_border_bottom_color(uint32_t opv, css_style *style,
+css_error css__cascade_border_bottom_color(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_bg_border_color(opv, style, state,
set_border_bottom_color);
}
-css_error css__set_border_bottom_color_from_hint(const css_hint *hint,
+css_error css__set_border_bottom_color_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_border_bottom_color(style, hint->status, hint->data.color);
@@ -29,7 +29,7 @@ css_error css__set_border_bottom_color_from_hint(const css_hint *hint,
css_error css__initial_border_bottom_color(css_select_state *state)
{
- return set_border_bottom_color(state->computed,
+ return set_border_bottom_color(state->computed,
CSS_BORDER_COLOR_CURRENT_COLOR, 0);
}
diff --git a/src/select/properties/border_bottom_style.c b/src/select/properties/border_bottom_style.c
index 2a6cd6a..b5caccb 100644
--- a/src/select/properties/border_bottom_style.c
+++ b/src/select/properties/border_bottom_style.c
@@ -14,13 +14,13 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_border_bottom_style(uint32_t opv, css_style *style,
+css_error css__cascade_border_bottom_style(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_border_style(opv, style, state, set_border_bottom_style);
}
-css_error css__set_border_bottom_style_from_hint(const css_hint *hint,
+css_error css__set_border_bottom_style_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_border_bottom_style(style, hint->status);
diff --git a/src/select/properties/border_bottom_width.c b/src/select/properties/border_bottom_width.c
index fdf0824..b071fba 100644
--- a/src/select/properties/border_bottom_width.c
+++ b/src/select/properties/border_bottom_width.c
@@ -14,13 +14,13 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_border_bottom_width(uint32_t opv, css_style *style,
+css_error css__cascade_border_bottom_width(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_border_width(opv, style, state, set_border_bottom_width);
}
-css_error css__set_border_bottom_width_from_hint(const css_hint *hint,
+css_error css__set_border_bottom_width_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_border_bottom_width(style, hint->status,
diff --git a/src/select/properties/border_collapse.c b/src/select/properties/border_collapse.c
index 5da1a00..1363c7c 100644
--- a/src/select/properties/border_collapse.c
+++ b/src/select/properties/border_collapse.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_border_collapse(uint32_t opv, css_style *style,
+css_error css__cascade_border_collapse(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_BORDER_COLLAPSE_INHERIT;
@@ -40,7 +40,7 @@ css_error css__cascade_border_collapse(uint32_t opv, css_style *style,
return CSS_OK;
}
-css_error css__set_border_collapse_from_hint(const css_hint *hint,
+css_error css__set_border_collapse_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_border_collapse(style, hint->status);
@@ -60,7 +60,7 @@ css_error css__compose_border_collapse(const css_computed_style *parent,
if (type == CSS_BORDER_COLLAPSE_INHERIT) {
type = get_border_collapse(parent);
}
-
+
return set_border_collapse(result, type);
}
diff --git a/src/select/properties/border_left_color.c b/src/select/properties/border_left_color.c
index cf08257..2880751 100644
--- a/src/select/properties/border_left_color.c
+++ b/src/select/properties/border_left_color.c
@@ -14,14 +14,14 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_border_left_color(uint32_t opv, css_style *style,
+css_error css__cascade_border_left_color(uint32_t opv, css_style *style,
css_select_state *state)
{
- return css__cascade_bg_border_color(opv, style, state,
+ return css__cascade_bg_border_color(opv, style, state,
set_border_left_color);
}
-css_error css__set_border_left_color_from_hint(const css_hint *hint,
+css_error css__set_border_left_color_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_border_left_color(style, hint->status, hint->data.color);
@@ -29,7 +29,7 @@ css_error css__set_border_left_color_from_hint(const css_hint *hint,
css_error css__initial_border_left_color(css_select_state *state)
{
- return set_border_left_color(state->computed,
+ return set_border_left_color(state->computed,
CSS_BORDER_COLOR_CURRENT_COLOR, 0);
}
diff --git a/src/select/properties/border_left_style.c b/src/select/properties/border_left_style.c
index 89708f7..e6472b3 100644
--- a/src/select/properties/border_left_style.c
+++ b/src/select/properties/border_left_style.c
@@ -14,13 +14,13 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_border_left_style(uint32_t opv, css_style *style,
+css_error css__cascade_border_left_style(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_border_style(opv, style, state, set_border_left_style);
}
-css_error css__set_border_left_style_from_hint(const css_hint *hint,
+css_error css__set_border_left_style_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_border_left_style(style, hint->status);
diff --git a/src/select/properties/border_left_width.c b/src/select/properties/border_left_width.c
index a4633da..1278fa9 100644
--- a/src/select/properties/border_left_width.c
+++ b/src/select/properties/border_left_width.c
@@ -14,13 +14,13 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_border_left_width(uint32_t opv, css_style *style,
+css_error css__cascade_border_left_width(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_border_width(opv, style, state, set_border_left_width);
}
-css_error css__set_border_left_width_from_hint(const css_hint *hint,
+css_error css__set_border_left_width_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_border_left_width(style, hint->status,
diff --git a/src/select/properties/border_right_color.c b/src/select/properties/border_right_color.c
index 1829784..b8563e6 100644
--- a/src/select/properties/border_right_color.c
+++ b/src/select/properties/border_right_color.c
@@ -14,14 +14,14 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_border_right_color(uint32_t opv, css_style *style,
+css_error css__cascade_border_right_color(uint32_t opv, css_style *style,
css_select_state *state)
{
- return css__cascade_bg_border_color(opv, style, state,
+ return css__cascade_bg_border_color(opv, style, state,
set_border_right_color);
}
-css_error css__set_border_right_color_from_hint(const css_hint *hint,
+css_error css__set_border_right_color_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_border_right_color(style, hint->status, hint->data.color);
@@ -29,7 +29,7 @@ css_error css__set_border_right_color_from_hint(const css_hint *hint,
css_error css__initial_border_right_color(css_select_state *state)
{
- return set_border_right_color(state->computed,
+ return set_border_right_color(state->computed,
CSS_BORDER_COLOR_CURRENT_COLOR, 0);
}
diff --git a/src/select/properties/border_right_style.c b/src/select/properties/border_right_style.c
index 3f5934b..d75a99e 100644
--- a/src/select/properties/border_right_style.c
+++ b/src/select/properties/border_right_style.c
@@ -14,13 +14,13 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_border_right_style(uint32_t opv, css_style *style,
+css_error css__cascade_border_right_style(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_border_style(opv, style, state, set_border_right_style);
}
-css_error css__set_border_right_style_from_hint(const css_hint *hint,
+css_error css__set_border_right_style_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_border_right_style(style, hint->status);
diff --git a/src/select/properties/border_right_width.c b/src/select/properties/border_right_width.c
index 269fefe..18cacd2 100644
--- a/src/select/properties/border_right_width.c
+++ b/src/select/properties/border_right_width.c
@@ -14,13 +14,13 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_border_right_width(uint32_t opv, css_style *style,
+css_error css__cascade_border_right_width(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_border_width(opv, style, state, set_border_right_width);
}
-css_error css__set_border_right_width_from_hint(const css_hint *hint,
+css_error css__set_border_right_width_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_border_right_width(style, hint->status,
diff --git a/src/select/properties/border_spacing.c b/src/select/properties/border_spacing.c
index db7b1f2..147f56f 100644
--- a/src/select/properties/border_spacing.c
+++ b/src/select/properties/border_spacing.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_border_spacing(uint32_t opv, css_style *style,
+css_error css__cascade_border_spacing(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_BORDER_SPACING_INHERIT;
@@ -48,7 +48,7 @@ css_error css__cascade_border_spacing(uint32_t opv, css_style *style,
return CSS_OK;
}
-css_error css__set_border_spacing_from_hint(const css_hint *hint,
+css_error css__set_border_spacing_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_border_spacing(style, hint->status,
@@ -68,7 +68,7 @@ css_error css__compose_border_spacing(const css_computed_style *parent,
{
css_fixed hlength = 0, vlength = 0;
css_unit hunit = CSS_UNIT_PX, vunit = CSS_UNIT_PX;
- uint8_t type = get_border_spacing(child, &hlength, &hunit,
+ uint8_t type = get_border_spacing(child, &hlength, &hunit,
&vlength, &vunit);
if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
@@ -76,11 +76,11 @@ css_error css__compose_border_spacing(const css_computed_style *parent,
(child->i.uncommon != NULL && result != child)) {
if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_BORDER_SPACING_INHERIT) {
- type = get_border_spacing(parent,
+ type = get_border_spacing(parent,
&hlength, &hunit, &vlength, &vunit);
}
- return set_border_spacing(result, type, hlength, hunit,
+ return set_border_spacing(result, type, hlength, hunit,
vlength, vunit);
}
diff --git a/src/select/properties/border_top_color.c b/src/select/properties/border_top_color.c
index 1517eea..fd2ced4 100644
--- a/src/select/properties/border_top_color.c
+++ b/src/select/properties/border_top_color.c
@@ -14,13 +14,13 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_border_top_color(uint32_t opv, css_style *style,
+css_error css__cascade_border_top_color(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_bg_border_color(opv, style, state, set_border_top_color);
}
-css_error css__set_border_top_color_from_hint(const css_hint *hint,
+css_error css__set_border_top_color_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_border_top_color(style, hint->status, hint->data.color);
diff --git a/src/select/properties/border_top_style.c b/src/select/properties/border_top_style.c
index 9841202..48d6b6d 100644
--- a/src/select/properties/border_top_style.c
+++ b/src/select/properties/border_top_style.c
@@ -14,13 +14,13 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_border_top_style(uint32_t opv, css_style *style,
+css_error css__cascade_border_top_style(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_border_style(opv, style, state, set_border_top_style);
}
-css_error css__set_border_top_style_from_hint(const css_hint *hint,
+css_error css__set_border_top_style_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_border_top_style(style, hint->status);
diff --git a/src/select/properties/border_top_width.c b/src/select/properties/border_top_width.c
index 237d594..c0fb7da 100644
--- a/src/select/properties/border_top_width.c
+++ b/src/select/properties/border_top_width.c
@@ -14,22 +14,22 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_border_top_width(uint32_t opv, css_style *style,
+css_error css__cascade_border_top_width(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_border_width(opv, style, state, set_border_top_width);
}
-css_error css__set_border_top_width_from_hint(const css_hint *hint,
+css_error css__set_border_top_width_from_hint(const css_hint *hint,
css_computed_style *style)
{
- return set_border_top_width(style, hint->status,
+ return set_border_top_width(style, hint->status,
hint->data.length.value, hint->data.length.unit);
}
css_error css__initial_border_top_width(css_select_state *state)
{
- return set_border_top_width(state->computed, CSS_BORDER_WIDTH_MEDIUM,
+ return set_border_top_width(state->computed, CSS_BORDER_WIDTH_MEDIUM,
0, CSS_UNIT_PX);
}
diff --git a/src/select/properties/bottom.c b/src/select/properties/bottom.c
index 7c9b509..82754f1 100644
--- a/src/select/properties/bottom.c
+++ b/src/select/properties/bottom.c
@@ -14,16 +14,16 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_bottom(uint32_t opv, css_style *style,
+css_error css__cascade_bottom(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length_auto(opv, style, state, set_bottom);
}
-css_error css__set_bottom_from_hint(const css_hint *hint,
+css_error css__set_bottom_from_hint(const css_hint *hint,
css_computed_style *style)
{
- return set_bottom(style, hint->status,
+ return set_bottom(style, hint->status,
hint->data.length.value, hint->data.length.unit);
}
diff --git a/src/select/properties/box_sizing.c b/src/select/properties/box_sizing.c
index 91c475d..2d19c95 100644
--- a/src/select/properties/box_sizing.c
+++ b/src/select/properties/box_sizing.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_box_sizing(uint32_t opv, css_style *style,
+css_error css__cascade_box_sizing(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_BOX_SIZING_INHERIT;
diff --git a/src/select/properties/break_after.c b/src/select/properties/break_after.c
index 496a59b..1f253aa 100644
--- a/src/select/properties/break_after.c
+++ b/src/select/properties/break_after.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_break_after(uint32_t opv, css_style *style,
+css_error css__cascade_break_after(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_break_after_before_inside(opv, style, state,
diff --git a/src/select/properties/break_before.c b/src/select/properties/break_before.c
index b8a8d77..3dcda76 100644
--- a/src/select/properties/break_before.c
+++ b/src/select/properties/break_before.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_break_before(uint32_t opv, css_style *style,
+css_error css__cascade_break_before(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_break_after_before_inside(opv, style, state,
diff --git a/src/select/properties/break_inside.c b/src/select/properties/break_inside.c
index 4252fb8..fdc44c1 100644
--- a/src/select/properties/break_inside.c
+++ b/src/select/properties/break_inside.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_break_inside(uint32_t opv, css_style *style,
+css_error css__cascade_break_inside(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_BREAK_INSIDE_AUTO;
diff --git a/src/select/properties/caption_side.c b/src/select/properties/caption_side.c
index c097348..ecccc1d 100644
--- a/src/select/properties/caption_side.c
+++ b/src/select/properties/caption_side.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_caption_side(uint32_t opv, css_style *style,
+css_error css__cascade_caption_side(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_CAPTION_SIDE_INHERIT;
@@ -40,7 +40,7 @@ css_error css__cascade_caption_side(uint32_t opv, css_style *style,
return CSS_OK;
}
-css_error css__set_caption_side_from_hint(const css_hint *hint,
+css_error css__set_caption_side_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_caption_side(style, hint->status);
@@ -60,7 +60,7 @@ css_error css__compose_caption_side(const css_computed_style *parent,
if (type == CSS_CAPTION_SIDE_INHERIT) {
type = get_caption_side(parent);
}
-
+
return set_caption_side(result, type);
}
diff --git a/src/select/properties/clear.c b/src/select/properties/clear.c
index 55ca087..bbb2673 100644
--- a/src/select/properties/clear.c
+++ b/src/select/properties/clear.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_clear(uint32_t opv, css_style *style,
+css_error css__cascade_clear(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_CLEAR_INHERIT;
@@ -46,7 +46,7 @@ css_error css__cascade_clear(uint32_t opv, css_style *style,
return CSS_OK;
}
-css_error css__set_clear_from_hint(const css_hint *hint,
+css_error css__set_clear_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_clear(style, hint->status);
diff --git a/src/select/properties/clip.c b/src/select/properties/clip.c
index cc39d99..fe1dd87 100644
--- a/src/select/properties/clip.c
+++ b/src/select/properties/clip.c
@@ -14,11 +14,11 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_clip(uint32_t opv, css_style *style,
+css_error css__cascade_clip(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_CLIP_INHERIT;
- css_computed_clip_rect rect = { 0, 0, 0, 0,
+ css_computed_clip_rect rect = { 0, 0, 0, 0,
CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX,
false, false, false, false };
@@ -78,7 +78,7 @@ css_error css__cascade_clip(uint32_t opv, css_style *style,
return CSS_OK;
}
-css_error css__set_clip_from_hint(const css_hint *hint,
+css_error css__set_clip_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_clip(style, hint->status, hint->data.clip);
@@ -86,7 +86,7 @@ css_error css__set_clip_from_hint(const css_hint *hint,
css_error css__initial_clip(css_select_state *state)
{
- css_computed_clip_rect rect = { 0, 0, 0, 0,
+ css_computed_clip_rect rect = { 0, 0, 0, 0,
CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX,
false, false, false, false };
@@ -97,7 +97,7 @@ css_error css__compose_clip(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
- css_computed_clip_rect rect = { 0, 0, 0, 0,
+ css_computed_clip_rect rect = { 0, 0, 0, 0,
CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX, CSS_UNIT_PX,
false, false, false, false };
uint8_t type = get_clip(child, &rect);
diff --git a/src/select/properties/color.c b/src/select/properties/color.c
index dad2b9d..806f2cc 100644
--- a/src/select/properties/color.c
+++ b/src/select/properties/color.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_color(uint32_t opv, css_style *style,
+css_error css__cascade_color(uint32_t opv, css_style *style,
css_select_state *state)
{
bool inherit = isInherit(opv);
@@ -39,7 +39,7 @@ css_error css__cascade_color(uint32_t opv, css_style *style,
}
}
- if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
+ if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
inherit)) {
return set_color(state->computed, value, color);
}
@@ -47,7 +47,7 @@ css_error css__cascade_color(uint32_t opv, css_style *style,
return CSS_OK;
}
-css_error css__set_color_from_hint(const css_hint *hint,
+css_error css__set_color_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_color(style, hint->status, hint->data.color);
@@ -58,7 +58,7 @@ css_error css__initial_color(css_select_state *state)
css_hint hint;
css_error error;
- error = state->handler->ua_default_for_property(state->pw,
+ error = state->handler->ua_default_for_property(state->pw,
CSS_PROP_COLOR, &hint);
if (error != CSS_OK)
return error;
diff --git a/src/select/properties/column_count.c b/src/select/properties/column_count.c
index 4ded377..7e929b0 100644
--- a/src/select/properties/column_count.c
+++ b/src/select/properties/column_count.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_column_count(uint32_t opv, css_style *style,
+css_error css__cascade_column_count(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_COLUMN_COUNT_INHERIT;
@@ -22,7 +22,7 @@ css_error css__cascade_column_count(uint32_t opv, css_style *style,
if (isInherit(opv) == false) {
switch (getValue(opv)) {
- case COLUMN_COUNT_SET:
+ case COLUMN_COUNT_SET:
value = CSS_COLUMN_COUNT_SET;
count = *((css_fixed *) style->bytecode);
advance_bytecode(style, sizeof(count));
diff --git a/src/select/properties/column_fill.c b/src/select/properties/column_fill.c
index 9b4f1e0..31f19f0 100644
--- a/src/select/properties/column_fill.c
+++ b/src/select/properties/column_fill.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_column_fill(uint32_t opv, css_style *style,
+css_error css__cascade_column_fill(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_COLUMN_FILL_INHERIT;
diff --git a/src/select/properties/column_gap.c b/src/select/properties/column_gap.c
index f544f44..824b3a4 100644
--- a/src/select/properties/column_gap.c
+++ b/src/select/properties/column_gap.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_column_gap(uint32_t opv, css_style *style,
+css_error css__cascade_column_gap(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length_normal(opv, style, state, set_column_gap);
diff --git a/src/select/properties/column_rule_color.c b/src/select/properties/column_rule_color.c
index a5666e4..f54c2ab 100644
--- a/src/select/properties/column_rule_color.c
+++ b/src/select/properties/column_rule_color.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_column_rule_color(uint32_t opv, css_style *style,
+css_error css__cascade_column_rule_color(uint32_t opv, css_style *style,
css_select_state *state)
{
bool inherit = isInherit(opv);
diff --git a/src/select/properties/column_rule_style.c b/src/select/properties/column_rule_style.c
index 586ce5d..1d9a41e 100644
--- a/src/select/properties/column_rule_style.c
+++ b/src/select/properties/column_rule_style.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_column_rule_style(uint32_t opv, css_style *style,
+css_error css__cascade_column_rule_style(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_border_style(opv, style, state,
diff --git a/src/select/properties/column_rule_width.c b/src/select/properties/column_rule_width.c
index 8694a09..3ca9367 100644
--- a/src/select/properties/column_rule_width.c
+++ b/src/select/properties/column_rule_width.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_column_rule_width(uint32_t opv, css_style *style,
+css_error css__cascade_column_rule_width(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_border_width(opv, style, state,
diff --git a/src/select/properties/content.c b/src/select/properties/content.c
index 472a66a..0506ef3 100644
--- a/src/select/properties/content.c
+++ b/src/select/properties/content.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_content(uint32_t opv, css_style *style,
+css_error css__cascade_content(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_CONTENT_INHERIT;
@@ -30,14 +30,14 @@ css_error css__cascade_content(uint32_t opv, css_style *style,
value = CSS_CONTENT_NONE;
} else {
value = CSS_CONTENT_SET;
-
+
while (v != CONTENT_NORMAL) {
lwc_string *he;
css_computed_content_item *temp;
css__stylesheet_string_get(style->sheet,
*((css_code_t *) style->bytecode), &he);
-
+
temp = realloc(content,
(n_contents + 1) *
sizeof(css_computed_content_item));
@@ -63,7 +63,7 @@ css_error css__cascade_content(uint32_t opv, css_style *style,
case CONTENT_COUNTERS:
{
lwc_string *sep;
-
+
advance_bytecode(style, sizeof(css_code_t));
css__stylesheet_string_get(style->sheet, *((css_code_t *) style->bytecode), &sep);
@@ -155,7 +155,7 @@ css_error css__cascade_content(uint32_t opv, css_style *style,
return CSS_OK;
}
-css_error css__set_content_from_hint(const css_hint *hint,
+css_error css__set_content_from_hint(const css_hint *hint,
css_computed_style *style)
{
css_computed_content_item *item;
@@ -221,16 +221,16 @@ css_error css__compose_content(const css_computed_style *parent,
if (type == CSS_CONTENT_SET) {
const css_computed_content_item *i;
- for (i = items; i->type != CSS_COMPUTED_CONTENT_NONE;
+ for (i = items; i->type != CSS_COMPUTED_CONTENT_NONE;
i++)
n_items++;
- copy = malloc((n_items + 1) *
+ copy = malloc((n_items + 1) *
sizeof(css_computed_content_item));
if (copy == NULL)
return CSS_NOMEM;
- memcpy(copy, items, (n_items + 1) *
+ memcpy(copy, items, (n_items + 1) *
sizeof(css_computed_content_item));
}
diff --git a/src/select/properties/counter_increment.c b/src/select/properties/counter_increment.c
index 644607b..9888e0a 100644
--- a/src/select/properties/counter_increment.c
+++ b/src/select/properties/counter_increment.c
@@ -14,14 +14,14 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_counter_increment(uint32_t opv, css_style *style,
+css_error css__cascade_counter_increment(uint32_t opv, css_style *style,
css_select_state *state)
-{
- return css__cascade_counter_increment_reset(opv, style, state,
+{
+ return css__cascade_counter_increment_reset(opv, style, state,
set_counter_increment);
}
-css_error css__set_counter_increment_from_hint(const css_hint *hint,
+css_error css__set_counter_increment_from_hint(const css_hint *hint,
css_computed_style *style)
{
css_computed_counter *item;
@@ -44,7 +44,7 @@ css_error css__set_counter_increment_from_hint(const css_hint *hint,
css_error css__initial_counter_increment(css_select_state *state)
{
- return set_counter_increment(state->computed,
+ return set_counter_increment(state->computed,
CSS_COUNTER_INCREMENT_NONE, NULL);
}
@@ -57,7 +57,7 @@ css_error css__compose_counter_increment(const css_computed_style *parent,
uint8_t type = get_counter_increment(child, &items);
if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
- type == CSS_COUNTER_INCREMENT_INHERIT ||
+ type == CSS_COUNTER_INCREMENT_INHERIT ||
(child->i.uncommon != NULL && result != child)) {
size_t n_items = 0;
css_computed_counter *copy = NULL;
@@ -73,12 +73,12 @@ css_error css__compose_counter_increment(const css_computed_style *parent,
for (i = items; i->name != NULL; i++)
n_items++;
- copy = malloc((n_items + 1) *
+ copy = malloc((n_items + 1) *
sizeof(css_computed_counter));
if (copy == NULL)
return CSS_NOMEM;
- memcpy(copy, items, (n_items + 1) *
+ memcpy(copy, items, (n_items + 1) *
sizeof(css_computed_counter));
}
diff --git a/src/select/properties/counter_reset.c b/src/select/properties/counter_reset.c
index 05559f5..9d20609 100644
--- a/src/select/properties/counter_reset.c
+++ b/src/select/properties/counter_reset.c
@@ -14,14 +14,14 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_counter_reset(uint32_t opv, css_style *style,
+css_error css__cascade_counter_reset(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_counter_increment_reset(opv, style, state,
set_counter_reset);
}
-css_error css__set_counter_reset_from_hint(const css_hint *hint,
+css_error css__set_counter_reset_from_hint(const css_hint *hint,
css_computed_style *style)
{
css_computed_counter *item;
@@ -72,12 +72,12 @@ css_error css__compose_counter_reset(const css_computed_style *parent,
for (i = items; i->name != NULL; i++)
n_items++;
- copy = malloc((n_items + 1) *
+ copy = malloc((n_items + 1) *
sizeof(css_computed_counter));
if (copy == NULL)
return CSS_NOMEM;
- memcpy(copy, items, (n_items + 1) *
+ memcpy(copy, items, (n_items + 1) *
sizeof(css_computed_counter));
}
diff --git a/src/select/properties/cue_after.c b/src/select/properties/cue_after.c
index 86dd4a7..e1c09e8 100644
--- a/src/select/properties/cue_after.c
+++ b/src/select/properties/cue_after.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_cue_after(uint32_t opv, css_style *style,
+css_error css__cascade_cue_after(uint32_t opv, css_style *style,
css_select_state *state)
{
/** \todo cue-after */
diff --git a/src/select/properties/cue_before.c b/src/select/properties/cue_before.c
index cf89475..d562b3b 100644
--- a/src/select/properties/cue_before.c
+++ b/src/select/properties/cue_before.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_cue_before(uint32_t opv, css_style *style,
+css_error css__cascade_cue_before(uint32_t opv, css_style *style,
css_select_state *state)
{
/** \todo cue-before */
diff --git a/src/select/properties/cursor.c b/src/select/properties/cursor.c
index 1ca497f..6effdb5 100644
--- a/src/select/properties/cursor.c
+++ b/src/select/properties/cursor.c
@@ -14,9 +14,9 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_cursor(uint32_t opv, css_style *style,
+css_error css__cascade_cursor(uint32_t opv, css_style *style,
css_select_state *state)
-{
+{
uint16_t value = CSS_CURSOR_INHERIT;
lwc_string **uris = NULL;
uint32_t n_uris = 0;
@@ -33,7 +33,7 @@ css_error css__cascade_cursor(uint32_t opv, css_style *style,
&uri);
advance_bytecode(style, sizeof(css_code_t));
- temp = realloc(uris,
+ temp = realloc(uris,
(n_uris + 1) * sizeof(lwc_string *));
if (temp == NULL) {
if (uris != NULL) {
@@ -111,7 +111,7 @@ css_error css__cascade_cursor(uint32_t opv, css_style *style,
if (n_uris > 0) {
lwc_string **temp;
- temp = realloc(uris,
+ temp = realloc(uris,
(n_uris + 1) * sizeof(lwc_string *));
if (temp == NULL) {
free(uris);
@@ -148,7 +148,7 @@ css_error css__set_cursor_from_hint(const css_hint *hint,
error = set_cursor(style, hint->status, hint->data.strings);
- for (item = hint->data.strings;
+ for (item = hint->data.strings;
item != NULL && (*item) != NULL; item++) {
lwc_string_unref(*item);
}
@@ -189,12 +189,12 @@ css_error css__compose_cursor(const css_computed_style *parent,
for (i = urls; (*i) != NULL; i++)
n_urls++;
- copy = malloc((n_urls + 1) *
+ copy = malloc((n_urls + 1) *
sizeof(lwc_string *));
if (copy == NULL)
return CSS_NOMEM;
- memcpy(copy, urls, (n_urls + 1) *
+ memcpy(copy, urls, (n_urls + 1) *
sizeof(lwc_string *));
}
diff --git a/src/select/properties/direction.c b/src/select/properties/direction.c
index 1e68123..f4a5c46 100644
--- a/src/select/properties/direction.c
+++ b/src/select/properties/direction.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_direction(uint32_t opv, css_style *style,
+css_error css__cascade_direction(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_DIRECTION_INHERIT;
diff --git a/src/select/properties/display.c b/src/select/properties/display.c
index e5e7711..40c2e3e 100644
--- a/src/select/properties/display.c
+++ b/src/select/properties/display.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_display(uint32_t opv, css_style *style,
+css_error css__cascade_display(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_DISPLAY_INHERIT;
diff --git a/src/select/properties/elevation.c b/src/select/properties/elevation.c
index d893748..ee7d036 100644
--- a/src/select/properties/elevation.c
+++ b/src/select/properties/elevation.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_elevation(uint32_t opv, css_style *style,
+css_error css__cascade_elevation(uint32_t opv, css_style *style,
css_select_state *state)
{
css_fixed val = 0;
@@ -22,7 +22,7 @@ css_error css__cascade_elevation(uint32_t opv, css_style *style,
if (isInherit(opv) == false) {
switch (getValue(opv)) {
- case ELEVATION_ANGLE:
+ case ELEVATION_ANGLE:
val = *((css_fixed *) style->bytecode);
advance_bytecode(style, sizeof(val));
diff --git a/src/select/properties/empty_cells.c b/src/select/properties/empty_cells.c
index 5e749c2..fecdbdc 100644
--- a/src/select/properties/empty_cells.c
+++ b/src/select/properties/empty_cells.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_empty_cells(uint32_t opv, css_style *style,
+css_error css__cascade_empty_cells(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_EMPTY_CELLS_INHERIT;
diff --git a/src/select/properties/float.c b/src/select/properties/float.c
index 82df983..c3ba909 100644
--- a/src/select/properties/float.c
+++ b/src/select/properties/float.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_float(uint32_t opv, css_style *style,
+css_error css__cascade_float(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_FLOAT_INHERIT;
diff --git a/src/select/properties/font_family.c b/src/select/properties/font_family.c
index 514a43a..f853fcc 100644
--- a/src/select/properties/font_family.c
+++ b/src/select/properties/font_family.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_font_family(uint32_t opv, css_style *style,
+css_error css__cascade_font_family(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_FONT_FAMILY_INHERIT;
@@ -31,8 +31,8 @@ css_error css__cascade_font_family(uint32_t opv, css_style *style,
switch (v) {
case FONT_FAMILY_STRING:
case FONT_FAMILY_IDENT_LIST:
- css__stylesheet_string_get(style->sheet,
- *((css_code_t *) style->bytecode),
+ css__stylesheet_string_get(style->sheet,
+ *((css_code_t *) style->bytecode),
&font);
advance_bytecode(style, sizeof(css_code_t));
break;
@@ -63,7 +63,7 @@ css_error css__cascade_font_family(uint32_t opv, css_style *style,
* first generic-family are ignored. */
/** \todo Do this at bytecode generation time? */
if (value == CSS_FONT_FAMILY_INHERIT && font != NULL) {
- temp = realloc(fonts,
+ temp = realloc(fonts,
(n_fonts + 1) * sizeof(lwc_string *));
if (temp == NULL) {
if (fonts != NULL) {
@@ -97,25 +97,25 @@ css_error css__cascade_font_family(uint32_t opv, css_style *style,
fonts = temp;
fonts[n_fonts] = NULL;
-
+
if (value == CSS_FONT_FAMILY_INHERIT) {
/* The stylesheet doesn't specify a generic family,
* but it has specified named fonts.
* Fall back to the user agent's default family.
- * We don't want to inherit, because that will
+ * We don't want to inherit, because that will
* incorrectly overwrite the named fonts list too.
*/
css_hint hint;
css_error error;
-
+
error = state->handler->ua_default_for_property(
state->pw, CSS_PROP_FONT_FAMILY, &hint);
if (error == CSS_OK) {
lwc_string **item;
value = hint.status;
-
- for (item = hint.data.strings;
+
+ for (item = hint.data.strings;
item != NULL && (*item) != NULL;
item++) {
lwc_string_unref(*item);
@@ -158,7 +158,7 @@ css_error css__set_font_family_from_hint(const css_hint *hint,
error = set_font_family(style, hint->status, hint->data.strings);
- for (item = hint->data.strings;
+ for (item = hint->data.strings;
item != NULL && (*item) != NULL; item++) {
lwc_string_unref(*item);
}
@@ -207,7 +207,7 @@ css_error css__compose_font_family(const css_computed_style *parent,
if (copy == NULL)
return CSS_NOMEM;
- memcpy(copy, names, (n_names + 1) *
+ memcpy(copy, names, (n_names + 1) *
sizeof(lwc_string *));
}
diff --git a/src/select/properties/font_size.c b/src/select/properties/font_size.c
index 65fbb94..a0269be 100644
--- a/src/select/properties/font_size.c
+++ b/src/select/properties/font_size.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_font_size(uint32_t opv, css_style *style,
+css_error css__cascade_font_size(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_FONT_SIZE_INHERIT;
@@ -23,7 +23,7 @@ css_error css__cascade_font_size(uint32_t opv, css_style *style,
if (isInherit(opv) == false) {
switch (getValue(opv)) {
- case FONT_SIZE_DIMENSION:
+ case FONT_SIZE_DIMENSION:
value = CSS_FONT_SIZE_DIMENSION;
size = *((css_fixed *) style->bytecode);
@@ -75,13 +75,13 @@ css_error css__cascade_font_size(uint32_t opv, css_style *style,
css_error css__set_font_size_from_hint(const css_hint *hint,
css_computed_style *style)
{
- return set_font_size(style, hint->status,
+ return set_font_size(style, hint->status,
hint->data.length.value, hint->data.length.unit);
}
css_error css__initial_font_size(css_select_state *state)
{
- return set_font_size(state->computed, CSS_FONT_SIZE_MEDIUM,
+ return set_font_size(state->computed, CSS_FONT_SIZE_MEDIUM,
0, CSS_UNIT_PX);
}
diff --git a/src/select/properties/font_style.c b/src/select/properties/font_style.c
index 68846d6..0ba1fdd 100644
--- a/src/select/properties/font_style.c
+++ b/src/select/properties/font_style.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_font_style(uint32_t opv, css_style *style,
+css_error css__cascade_font_style(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_FONT_STYLE_INHERIT;
@@ -63,7 +63,7 @@ css_error css__compose_font_style(const css_computed_style *parent,
if (type == CSS_FONT_STYLE_INHERIT) {
type= get_font_style(parent);
}
-
+
return set_font_style(result, type);
}
diff --git a/src/select/properties/font_variant.c b/src/select/properties/font_variant.c
index b6bb2e9..a9b6e56 100644
--- a/src/select/properties/font_variant.c
+++ b/src/select/properties/font_variant.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_font_variant(uint32_t opv, css_style *style,
+css_error css__cascade_font_variant(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_FONT_VARIANT_INHERIT;
diff --git a/src/select/properties/font_weight.c b/src/select/properties/font_weight.c
index bd67f89..c0c2f2b 100644
--- a/src/select/properties/font_weight.c
+++ b/src/select/properties/font_weight.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_font_weight(uint32_t opv, css_style *style,
+css_error css__cascade_font_weight(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_FONT_WEIGHT_INHERIT;
diff --git a/src/select/properties/height.c b/src/select/properties/height.c
index 7aeec3f..1d74c4a 100644
--- a/src/select/properties/height.c
+++ b/src/select/properties/height.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_height(uint32_t opv, css_style *style,
+css_error css__cascade_height(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length_auto(opv, style, state, set_height);
diff --git a/src/select/properties/helpers.c b/src/select/properties/helpers.c
index 1091a10..36c3cba 100644
--- a/src/select/properties/helpers.c
+++ b/src/select/properties/helpers.c
@@ -46,17 +46,17 @@ css_unit css__to_css_unit(uint32_t u)
* Utilities below here *
******************************************************************************/
css_error css__cascade_bg_border_color(uint32_t opv, css_style *style,
- css_select_state *state,
+ css_select_state *state,
css_error (*fun)(css_computed_style *, uint8_t, css_color))
{
uint16_t value = CSS_BACKGROUND_COLOR_INHERIT;
css_color color = 0;
- assert(CSS_BACKGROUND_COLOR_INHERIT ==
+ assert(CSS_BACKGROUND_COLOR_INHERIT ==
(enum css_background_color_e)CSS_BORDER_COLOR_INHERIT);
- assert(CSS_BACKGROUND_COLOR_COLOR ==
+ assert(CSS_BACKGROUND_COLOR_COLOR ==
(enum css_background_color_e)CSS_BORDER_COLOR_COLOR);
- assert(CSS_BACKGROUND_COLOR_CURRENT_COLOR ==
+ assert(CSS_BACKGROUND_COLOR_CURRENT_COLOR ==
(enum css_background_color_e)CSS_BORDER_COLOR_CURRENT_COLOR);
if (isInherit(opv) == false) {
@@ -85,7 +85,7 @@ css_error css__cascade_bg_border_color(uint32_t opv, css_style *style,
css_error css__cascade_uri_none(uint32_t opv, css_style *style,
css_select_state *state,
- css_error (*fun)(css_computed_style *, uint8_t,
+ css_error (*fun)(css_computed_style *, uint8_t,
lwc_string *))
{
uint16_t value = CSS_BACKGROUND_IMAGE_INHERIT;
@@ -105,7 +105,7 @@ css_error css__cascade_uri_none(uint32_t opv, css_style *style,
}
/** \todo lose fun != NULL once all properties have set routines */
- if (fun != NULL && css__outranks_existing(getOpcode(opv),
+ if (fun != NULL && css__outranks_existing(getOpcode(opv),
isImportant(opv), state, isInherit(opv))) {
return fun(state->computed, value, uri);
}
@@ -114,7 +114,7 @@ css_error css__cascade_uri_none(uint32_t opv, css_style *style,
}
css_error css__cascade_border_style(uint32_t opv, css_style *style,
- css_select_state *state,
+ css_select_state *state,
css_error (*fun)(css_computed_style *, uint8_t))
{
uint16_t value = CSS_BORDER_STYLE_INHERIT;
@@ -165,8 +165,8 @@ css_error css__cascade_border_style(uint32_t opv, css_style *style,
}
css_error css__cascade_border_width(uint32_t opv, css_style *style,
- css_select_state *state,
- css_error (*fun)(css_computed_style *, uint8_t, css_fixed,
+ css_select_state *state,
+ css_error (*fun)(css_computed_style *, uint8_t, css_fixed,
css_unit))
{
uint16_t value = CSS_BORDER_WIDTH_INHERIT;
@@ -326,7 +326,7 @@ css_error css__cascade_length(uint32_t opv, css_style *style,
unit = css__to_css_unit(unit);
/** \todo lose fun != NULL once all properties have set routines */
- if (fun != NULL && css__outranks_existing(getOpcode(opv),
+ if (fun != NULL && css__outranks_existing(getOpcode(opv),
isImportant(opv), state, isInherit(opv))) {
return fun(state->computed, value, length, unit);
}
@@ -350,7 +350,7 @@ css_error css__cascade_number(uint32_t opv, css_style *style,
}
/** \todo lose fun != NULL once all properties have set routines */
- if (fun != NULL && css__outranks_existing(getOpcode(opv),
+ if (fun != NULL && css__outranks_existing(getOpcode(opv),
isImportant(opv), state, isInherit(opv))) {
return fun(state->computed, value, length);
}
@@ -358,7 +358,7 @@ css_error css__cascade_number(uint32_t opv, css_style *style,
return CSS_OK;
}
-css_error css__cascade_page_break_after_before_inside(uint32_t opv,
+css_error css__cascade_page_break_after_before_inside(uint32_t opv,
css_style *style, css_select_state *state,
css_error (*fun)(css_computed_style *, uint8_t))
{
@@ -387,7 +387,7 @@ css_error css__cascade_page_break_after_before_inside(uint32_t opv,
}
/** \todo lose fun != NULL */
- if (fun != NULL && css__outranks_existing(getOpcode(opv),
+ if (fun != NULL && css__outranks_existing(getOpcode(opv),
isImportant(opv), state, isInherit(opv))) {
return fun(state->computed, value);
}
@@ -471,7 +471,7 @@ css_error css__cascade_counter_increment_reset(uint32_t opv, css_style *style,
advance_bytecode(style, sizeof(css_code_t));
temp = realloc(counters,
- (n_counters + 1) *
+ (n_counters + 1) *
sizeof(css_computed_counter));
if (temp == NULL) {
if (counters != NULL) {
diff --git a/src/select/properties/helpers.h b/src/select/properties/helpers.h
index feed146..901bcf0 100644
--- a/src/select/properties/helpers.h
+++ b/src/select/properties/helpers.h
@@ -16,18 +16,18 @@ uint32_t generic_destroy_number(void *bytecode);
css_unit css__to_css_unit(uint32_t u);
css_error css__cascade_bg_border_color(uint32_t opv, css_style *style,
- css_select_state *state,
+ css_select_state *state,
css_error (*fun)(css_computed_style *, uint8_t, css_color));
css_error css__cascade_uri_none(uint32_t opv, css_style *style,
css_select_state *state,
- css_error (*fun)(css_computed_style *, uint8_t,
+ css_error (*fun)(css_computed_style *, uint8_t,
lwc_string *));
css_error css__cascade_border_style(uint32_t opv, css_style *style,
- css_select_state *state,
+ css_select_state *state,
css_error (*fun)(css_computed_style *, uint8_t));
css_error css__cascade_border_width(uint32_t opv, css_style *style,
- css_select_state *state,
- css_error (*fun)(css_computed_style *, uint8_t, css_fixed,
+ css_select_state *state,
+ css_error (*fun)(css_computed_style *, uint8_t, css_fixed,
css_unit));
css_error css__cascade_length_auto(uint32_t opv, css_style *style,
css_select_state *state,
@@ -48,7 +48,7 @@ css_error css__cascade_length(uint32_t opv, css_style *style,
css_error css__cascade_number(uint32_t opv, css_style *style,
css_select_state *state,
css_error (*fun)(css_computed_style *, uint8_t, css_fixed));
-css_error css__cascade_page_break_after_before_inside(uint32_t opv,
+css_error css__cascade_page_break_after_before_inside(uint32_t opv,
css_style *style, css_select_state *state,
css_error (*fun)(css_computed_style *, uint8_t));
css_error css__cascade_break_after_before_inside(uint32_t opv,
diff --git a/src/select/properties/left.c b/src/select/properties/left.c
index faf76bb..4baa324 100644
--- a/src/select/properties/left.c
+++ b/src/select/properties/left.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_left(uint32_t opv, css_style *style,
+css_error css__cascade_left(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length_auto(opv, style, state, set_left);
diff --git a/src/select/properties/letter_spacing.c b/src/select/properties/letter_spacing.c
index cc00100..d799467 100644
--- a/src/select/properties/letter_spacing.c
+++ b/src/select/properties/letter_spacing.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_letter_spacing(uint32_t opv, css_style *style,
+css_error css__cascade_letter_spacing(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length_normal(opv, style, state, set_letter_spacing);
@@ -29,7 +29,7 @@ css_error css__set_letter_spacing_from_hint(const css_hint *hint,
css_error css__initial_letter_spacing(css_select_state *state)
{
- return set_letter_spacing(state->computed, CSS_LETTER_SPACING_NORMAL,
+ return set_letter_spacing(state->computed, CSS_LETTER_SPACING_NORMAL,
0, CSS_UNIT_PX);
}
diff --git a/src/select/properties/line_height.c b/src/select/properties/line_height.c
index 24b9e80..091a575 100644
--- a/src/select/properties/line_height.c
+++ b/src/select/properties/line_height.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_line_height(uint32_t opv, css_style *style,
+css_error css__cascade_line_height(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_LINE_HEIGHT_INHERIT;
@@ -60,7 +60,7 @@ css_error css__set_line_height_from_hint(const css_hint *hint,
css_error css__initial_line_height(css_select_state *state)
{
- return set_line_height(state->computed, CSS_LINE_HEIGHT_NORMAL,
+ return set_line_height(state->computed, CSS_LINE_HEIGHT_NORMAL,
0, CSS_UNIT_PX);
}
diff --git a/src/select/properties/list_style_image.c b/src/select/properties/list_style_image.c
index edc92fb..cc77eb4 100644
--- a/src/select/properties/list_style_image.c
+++ b/src/select/properties/list_style_image.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_list_style_image(uint32_t opv, css_style *style,
+css_error css__cascade_list_style_image(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_uri_none(opv, style, state, set_list_style_image);
@@ -35,7 +35,7 @@ css_error css__set_list_style_image_from_hint(const css_hint *hint,
css_error css__initial_list_style_image(css_select_state *state)
{
- return set_list_style_image(state->computed,
+ return set_list_style_image(state->computed,
CSS_LIST_STYLE_IMAGE_NONE, NULL);
}
diff --git a/src/select/properties/list_style_position.c b/src/select/properties/list_style_position.c
index acdbedb..02d7651 100644
--- a/src/select/properties/list_style_position.c
+++ b/src/select/properties/list_style_position.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_list_style_position(uint32_t opv, css_style *style,
+css_error css__cascade_list_style_position(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_LIST_STYLE_POSITION_INHERIT;
@@ -48,7 +48,7 @@ css_error css__set_list_style_position_from_hint(const css_hint *hint,
css_error css__initial_list_style_position(css_select_state *state)
{
- return set_list_style_position(state->computed,
+ return set_list_style_position(state->computed,
CSS_LIST_STYLE_POSITION_OUTSIDE);
}
diff --git a/src/select/properties/list_style_type.c b/src/select/properties/list_style_type.c
index 470bfb0..b1e5db6 100644
--- a/src/select/properties/list_style_type.c
+++ b/src/select/properties/list_style_type.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_list_style_type(uint32_t opv, css_style *style,
+css_error css__cascade_list_style_type(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_LIST_STYLE_TYPE_INHERIT;
diff --git a/src/select/properties/margin_bottom.c b/src/select/properties/margin_bottom.c
index c34004e..3b1d8a1 100644
--- a/src/select/properties/margin_bottom.c
+++ b/src/select/properties/margin_bottom.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_margin_bottom(uint32_t opv, css_style *style,
+css_error css__cascade_margin_bottom(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length_auto(opv, style, state, set_margin_bottom);
diff --git a/src/select/properties/margin_left.c b/src/select/properties/margin_left.c
index ac22c3d..240285a 100644
--- a/src/select/properties/margin_left.c
+++ b/src/select/properties/margin_left.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_margin_left(uint32_t opv, css_style *style,
+css_error css__cascade_margin_left(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length_auto(opv, style, state, set_margin_left);
diff --git a/src/select/properties/margin_right.c b/src/select/properties/margin_right.c
index a10df13..737fbee 100644
--- a/src/select/properties/margin_right.c
+++ b/src/select/properties/margin_right.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_margin_right(uint32_t opv, css_style *style,
+css_error css__cascade_margin_right(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length_auto(opv, style, state, set_margin_right);
diff --git a/src/select/properties/margin_top.c b/src/select/properties/margin_top.c
index f66c8ee..5563a48 100644
--- a/src/select/properties/margin_top.c
+++ b/src/select/properties/margin_top.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_margin_top(uint32_t opv, css_style *style,
+css_error css__cascade_margin_top(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length_auto(opv, style, state, set_margin_top);
diff --git a/src/select/properties/max_height.c b/src/select/properties/max_height.c
index 51fae8c..e03c8da 100644
--- a/src/select/properties/max_height.c
+++ b/src/select/properties/max_height.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_max_height(uint32_t opv, css_style *style,
+css_error css__cascade_max_height(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length_none(opv, style, state, set_max_height);
@@ -29,7 +29,7 @@ css_error css__set_max_height_from_hint(const css_hint *hint,
css_error css__initial_max_height(css_select_state *state)
{
- return set_max_height(state->computed, CSS_MAX_HEIGHT_NONE,
+ return set_max_height(state->computed, CSS_MAX_HEIGHT_NONE,
0, CSS_UNIT_PX);
}
diff --git a/src/select/properties/max_width.c b/src/select/properties/max_width.c
index f9ccc03..ec98712 100644
--- a/src/select/properties/max_width.c
+++ b/src/select/properties/max_width.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_max_width(uint32_t opv, css_style *style,
+css_error css__cascade_max_width(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length_none(opv, style, state, set_max_width);;
diff --git a/src/select/properties/min_height.c b/src/select/properties/min_height.c
index a3ab6b9..687d8a1 100644
--- a/src/select/properties/min_height.c
+++ b/src/select/properties/min_height.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_min_height(uint32_t opv, css_style *style,
+css_error css__cascade_min_height(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length(opv, style, state, set_min_height);
@@ -29,7 +29,7 @@ css_error css__set_min_height_from_hint(const css_hint *hint,
css_error css__initial_min_height(css_select_state *state)
{
- return set_min_height(state->computed, CSS_MIN_HEIGHT_SET,
+ return set_min_height(state->computed, CSS_MIN_HEIGHT_SET,
0, CSS_UNIT_PX);
}
diff --git a/src/select/properties/min_width.c b/src/select/properties/min_width.c
index 4139eda..5365588 100644
--- a/src/select/properties/min_width.c
+++ b/src/select/properties/min_width.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_min_width(uint32_t opv, css_style *style,
+css_error css__cascade_min_width(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length(opv, style, state, set_min_width);
diff --git a/src/select/properties/opacity.c b/src/select/properties/opacity.c
index 9ef0998..aadab0b 100644
--- a/src/select/properties/opacity.c
+++ b/src/select/properties/opacity.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_opacity(uint32_t opv, css_style *style,
+css_error css__cascade_opacity(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_OPACITY_INHERIT;
diff --git a/src/select/properties/orphans.c b/src/select/properties/orphans.c
index d5c4937..f169b81 100644
--- a/src/select/properties/orphans.c
+++ b/src/select/properties/orphans.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_orphans(uint32_t opv, css_style *style,
+css_error css__cascade_orphans(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_number(opv, style, state, set_orphans);
@@ -37,11 +37,11 @@ css_error css__compose_orphans(const css_computed_style *parent,
{
int32_t count = 0;
uint8_t type = get_orphans(child, &count);
-
+
if (type == CSS_ORPHANS_INHERIT) {
type = get_orphans(parent, &count);
}
-
+
return set_orphans(result, type, count);
}
diff --git a/src/select/properties/outline_color.c b/src/select/properties/outline_color.c
index 2613839..c6c576b 100644
--- a/src/select/properties/outline_color.c
+++ b/src/select/properties/outline_color.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_outline_color(uint32_t opv, css_style *style,
+css_error css__cascade_outline_color(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_OUTLINE_COLOR_INHERIT;
diff --git a/src/select/properties/outline_style.c b/src/select/properties/outline_style.c
index 7b64381..5c30735 100644
--- a/src/select/properties/outline_style.c
+++ b/src/select/properties/outline_style.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_outline_style(uint32_t opv, css_style *style,
+css_error css__cascade_outline_style(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_border_style(opv, style, state, set_outline_style);
diff --git a/src/select/properties/outline_width.c b/src/select/properties/outline_width.c
index 547c42a..4d9101c 100644
--- a/src/select/properties/outline_width.c
+++ b/src/select/properties/outline_width.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_outline_width(uint32_t opv, css_style *style,
+css_error css__cascade_outline_width(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_border_width(opv, style, state, set_outline_width);
diff --git a/src/select/properties/overflow_x.c b/src/select/properties/overflow_x.c
index 0173f5a..817d1d2 100644
--- a/src/select/properties/overflow_x.c
+++ b/src/select/properties/overflow_x.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_overflow_x(uint32_t opv, css_style *style,
+css_error css__cascade_overflow_x(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_OVERFLOW_INHERIT;
diff --git a/src/select/properties/overflow_y.c b/src/select/properties/overflow_y.c
index 13213b5..b54c4c8 100644
--- a/src/select/properties/overflow_y.c
+++ b/src/select/properties/overflow_y.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_overflow_y(uint32_t opv, css_style *style,
+css_error css__cascade_overflow_y(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_OVERFLOW_INHERIT;
diff --git a/src/select/properties/padding_bottom.c b/src/select/properties/padding_bottom.c
index 806f0f5..e3b36f7 100644
--- a/src/select/properties/padding_bottom.c
+++ b/src/select/properties/padding_bottom.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_padding_bottom(uint32_t opv, css_style *style,
+css_error css__cascade_padding_bottom(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length(opv, style, state, set_padding_bottom);
@@ -29,7 +29,7 @@ css_error css__set_padding_bottom_from_hint(const css_hint *hint,
css_error css__initial_padding_bottom(css_select_state *state)
{
- return set_padding_bottom(state->computed, CSS_PADDING_SET,
+ return set_padding_bottom(state->computed, CSS_PADDING_SET,
0, CSS_UNIT_PX);
}
diff --git a/src/select/properties/padding_left.c b/src/select/properties/padding_left.c
index 8873652..bdea11e 100644
--- a/src/select/properties/padding_left.c
+++ b/src/select/properties/padding_left.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_padding_left(uint32_t opv, css_style *style,
+css_error css__cascade_padding_left(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length(opv, style, state, set_padding_left);
diff --git a/src/select/properties/padding_right.c b/src/select/properties/padding_right.c
index a79d8f4..82c1ed3 100644
--- a/src/select/properties/padding_right.c
+++ b/src/select/properties/padding_right.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_padding_right(uint32_t opv, css_style *style,
+css_error css__cascade_padding_right(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length(opv, style, state, set_padding_right);
@@ -29,7 +29,7 @@ css_error css__set_padding_right_from_hint(const css_hint *hint,
css_error css__initial_padding_right(css_select_state *state)
{
- return set_padding_right(state->computed, CSS_PADDING_SET,
+ return set_padding_right(state->computed, CSS_PADDING_SET,
0, CSS_UNIT_PX);
}
diff --git a/src/select/properties/padding_top.c b/src/select/properties/padding_top.c
index 20fbe1e..f6d8b3e 100644
--- a/src/select/properties/padding_top.c
+++ b/src/select/properties/padding_top.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_padding_top(uint32_t opv, css_style *style,
+css_error css__cascade_padding_top(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length(opv, style, state, set_padding_top);
diff --git a/src/select/properties/page_break_after.c b/src/select/properties/page_break_after.c
index 0fd44c4..fdb6774 100644
--- a/src/select/properties/page_break_after.c
+++ b/src/select/properties/page_break_after.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_page_break_after(uint32_t opv, css_style *style,
+css_error css__cascade_page_break_after(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_page_break_after_before_inside(opv, style, state,
diff --git a/src/select/properties/page_break_before.c b/src/select/properties/page_break_before.c
index 0acae48..1491997 100644
--- a/src/select/properties/page_break_before.c
+++ b/src/select/properties/page_break_before.c
@@ -14,10 +14,10 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_page_break_before(uint32_t opv, css_style *style,
+css_error css__cascade_page_break_before(uint32_t opv, css_style *style,
css_select_state *state)
{
- return css__cascade_page_break_after_before_inside(opv, style, state,
+ return css__cascade_page_break_after_before_inside(opv, style, state,
set_page_break_before);
}
@@ -29,7 +29,7 @@ css_error css__set_page_break_before_from_hint(const css_hint *hint,
css_error css__initial_page_break_before(css_select_state *state)
{
- return set_page_break_before(state->computed,
+ return set_page_break_before(state->computed,
CSS_PAGE_BREAK_BEFORE_AUTO);
}
@@ -38,10 +38,10 @@ css_error css__compose_page_break_before(const css_computed_style *parent,
css_computed_style *result)
{
uint8_t type = get_page_break_before(child);
-
+
if (type == CSS_PAGE_BREAK_BEFORE_INHERIT) {
type = get_page_break_before(parent);
}
-
+
return set_page_break_before(result, type);
}
diff --git a/src/select/properties/page_break_inside.c b/src/select/properties/page_break_inside.c
index 20b8bf5..ddcb19f 100644
--- a/src/select/properties/page_break_inside.c
+++ b/src/select/properties/page_break_inside.c
@@ -14,10 +14,10 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_page_break_inside(uint32_t opv, css_style *style,
+css_error css__cascade_page_break_inside(uint32_t opv, css_style *style,
css_select_state *state)
{
- return css__cascade_page_break_after_before_inside(opv, style, state,
+ return css__cascade_page_break_after_before_inside(opv, style, state,
set_page_break_inside);
}
@@ -38,11 +38,11 @@ css_error css__compose_page_break_inside(const css_computed_style *parent,
css_computed_style *result)
{
uint8_t type = get_page_break_inside(child);
-
+
if (type == CSS_PAGE_BREAK_INSIDE_INHERIT) {
type = get_page_break_inside(parent);
}
-
+
return set_page_break_inside(result, type);
}
diff --git a/src/select/properties/pause_after.c b/src/select/properties/pause_after.c
index a33ee66..16bbefe 100644
--- a/src/select/properties/pause_after.c
+++ b/src/select/properties/pause_after.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_pause_after(uint32_t opv, css_style *style,
+css_error css__cascade_pause_after(uint32_t opv, css_style *style,
css_select_state *state)
{
/** \todo pause-after */
diff --git a/src/select/properties/pause_before.c b/src/select/properties/pause_before.c
index b33e94a..7770615 100644
--- a/src/select/properties/pause_before.c
+++ b/src/select/properties/pause_before.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_pause_before(uint32_t opv, css_style *style,
+css_error css__cascade_pause_before(uint32_t opv, css_style *style,
css_select_state *state)
{
/** \todo pause-before */
diff --git a/src/select/properties/pitch.c b/src/select/properties/pitch.c
index b6dc649..c5484d9 100644
--- a/src/select/properties/pitch.c
+++ b/src/select/properties/pitch.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_pitch(uint32_t opv, css_style *style,
+css_error css__cascade_pitch(uint32_t opv, css_style *style,
css_select_state *state)
{
css_fixed freq = 0;
diff --git a/src/select/properties/pitch_range.c b/src/select/properties/pitch_range.c
index 9a2ea24..52a5751 100644
--- a/src/select/properties/pitch_range.c
+++ b/src/select/properties/pitch_range.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_pitch_range(uint32_t opv, css_style *style,
+css_error css__cascade_pitch_range(uint32_t opv, css_style *style,
css_select_state *state)
{
/** \todo pitch-range */
diff --git a/src/select/properties/play_during.c b/src/select/properties/play_during.c
index 0210567..413d75a 100644
--- a/src/select/properties/play_during.c
+++ b/src/select/properties/play_during.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_play_during(uint32_t opv, css_style *style,
+css_error css__cascade_play_during(uint32_t opv, css_style *style,
css_select_state *state)
{
lwc_string *uri = NULL;
diff --git a/src/select/properties/position.c b/src/select/properties/position.c
index 7f566da..9f9658f 100644
--- a/src/select/properties/position.c
+++ b/src/select/properties/position.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_position(uint32_t opv, css_style *style,
+css_error css__cascade_position(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_POSITION_INHERIT;
diff --git a/src/select/properties/quotes.c b/src/select/properties/quotes.c
index 2dd6af4..4144d8e 100644
--- a/src/select/properties/quotes.c
+++ b/src/select/properties/quotes.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_quotes(uint32_t opv, css_style *style,
+css_error css__cascade_quotes(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_QUOTES_INHERIT;
@@ -40,7 +40,7 @@ css_error css__cascade_quotes(uint32_t opv, css_style *style,
&close);
advance_bytecode(style, sizeof(css_code_t));
- temp = realloc(quotes,
+ temp = realloc(quotes,
(n_quotes + 2) * sizeof(lwc_string *));
if (temp == NULL) {
if (quotes != NULL) {
@@ -96,7 +96,7 @@ css_error css__set_quotes_from_hint(const css_hint *hint,
{
lwc_string **item;
css_error error;
-
+
error = set_quotes(style, hint->status, hint->data.strings);
for (item = hint->data.strings;
@@ -149,7 +149,7 @@ css_error css__compose_quotes(const css_computed_style *parent,
if (copy == NULL)
return CSS_NOMEM;
- memcpy(copy, quotes, (n_quotes + 1) *
+ memcpy(copy, quotes, (n_quotes + 1) *
sizeof(lwc_string *));
}
diff --git a/src/select/properties/richness.c b/src/select/properties/richness.c
index d05ed7b..9656486 100644
--- a/src/select/properties/richness.c
+++ b/src/select/properties/richness.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_richness(uint32_t opv, css_style *style,
+css_error css__cascade_richness(uint32_t opv, css_style *style,
css_select_state *state)
{
/** \todo richness */
diff --git a/src/select/properties/right.c b/src/select/properties/right.c
index b87e63e..142e7e8 100644
--- a/src/select/properties/right.c
+++ b/src/select/properties/right.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_right(uint32_t opv, css_style *style,
+css_error css__cascade_right(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length_auto(opv, style, state, set_right);
diff --git a/src/select/properties/speak.c b/src/select/properties/speak.c
index 0b52e62..eb5528b 100644
--- a/src/select/properties/speak.c
+++ b/src/select/properties/speak.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_speak(uint32_t opv, css_style *style,
+css_error css__cascade_speak(uint32_t opv, css_style *style,
css_select_state *state)
{
UNUSED(style);
diff --git a/src/select/properties/speak_header.c b/src/select/properties/speak_header.c
index 6fc37d5..0935528 100644
--- a/src/select/properties/speak_header.c
+++ b/src/select/properties/speak_header.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_speak_header(uint32_t opv, css_style *style,
+css_error css__cascade_speak_header(uint32_t opv, css_style *style,
css_select_state *state)
{
UNUSED(style);
diff --git a/src/select/properties/speak_numeral.c b/src/select/properties/speak_numeral.c
index 1e74abd..fc54caf 100644
--- a/src/select/properties/speak_numeral.c
+++ b/src/select/properties/speak_numeral.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_speak_numeral(uint32_t opv, css_style *style,
+css_error css__cascade_speak_numeral(uint32_t opv, css_style *style,
css_select_state *state)
{
UNUSED(style);
diff --git a/src/select/properties/speak_punctuation.c b/src/select/properties/speak_punctuation.c
index 9898b7c..67cbdaf 100644
--- a/src/select/properties/speak_punctuation.c
+++ b/src/select/properties/speak_punctuation.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_speak_punctuation(
+css_error css__cascade_speak_punctuation(
uint32_t opv, css_style *style, css_select_state *state)
{
UNUSED(style);
diff --git a/src/select/properties/speech_rate.c b/src/select/properties/speech_rate.c
index c974997..5cec19b 100644
--- a/src/select/properties/speech_rate.c
+++ b/src/select/properties/speech_rate.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_speech_rate(uint32_t opv, css_style *style,
+css_error css__cascade_speech_rate(uint32_t opv, css_style *style,
css_select_state *state)
{
css_fixed rate = 0;
diff --git a/src/select/properties/stress.c b/src/select/properties/stress.c
index 81cf0e4..c9d61dd 100644
--- a/src/select/properties/stress.c
+++ b/src/select/properties/stress.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_stress(uint32_t opv, css_style *style,
+css_error css__cascade_stress(uint32_t opv, css_style *style,
css_select_state *state)
{
/** \todo stress */
diff --git a/src/select/properties/table_layout.c b/src/select/properties/table_layout.c
index c28cdae..c911e10 100644
--- a/src/select/properties/table_layout.c
+++ b/src/select/properties/table_layout.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_table_layout(uint32_t opv, css_style *style,
+css_error css__cascade_table_layout(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_TABLE_LAYOUT_INHERIT;
diff --git a/src/select/properties/text_align.c b/src/select/properties/text_align.c
index 611fcd3..808107f 100644
--- a/src/select/properties/text_align.c
+++ b/src/select/properties/text_align.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_text_align(uint32_t opv, css_style *style,
+css_error css__cascade_text_align(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_TEXT_ALIGN_INHERIT;
@@ -66,7 +66,7 @@ css_error css__initial_text_align(css_select_state *state)
return set_text_align(state->computed, CSS_TEXT_ALIGN_DEFAULT);
}
-css_error css__compose_text_align(const css_computed_style *parent,
+css_error css__compose_text_align(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
@@ -78,8 +78,8 @@ css_error css__compose_text_align(const css_computed_style *parent,
/* This is purely for the benefit of HTML tables */
type = get_text_align(parent);
- /* If the parent's text-align is a magical one,
- * then reset to the default value. Otherwise,
+ /* If the parent's text-align is a magical one,
+ * then reset to the default value. Otherwise,
* inherit as normal. */
if (type == CSS_TEXT_ALIGN_LIBCSS_LEFT ||
type == CSS_TEXT_ALIGN_LIBCSS_CENTER ||
diff --git a/src/select/properties/text_decoration.c b/src/select/properties/text_decoration.c
index 7f5a172..0e7544d 100644
--- a/src/select/properties/text_decoration.c
+++ b/src/select/properties/text_decoration.c
@@ -16,11 +16,11 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_text_decoration(uint32_t opv, css_style *style,
+css_error css__cascade_text_decoration(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_TEXT_DECORATION_INHERIT;
-
+
UNUSED(style);
if (isInherit(opv) == false) {
@@ -59,7 +59,7 @@ css_error css__initial_text_decoration(css_select_state *state)
return set_text_decoration(state->computed, CSS_TEXT_DECORATION_NONE);
}
-css_error css__compose_text_decoration(const css_computed_style *parent,
+css_error css__compose_text_decoration(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
diff --git a/src/select/properties/text_indent.c b/src/select/properties/text_indent.c
index 867292e..787c0be 100644
--- a/src/select/properties/text_indent.c
+++ b/src/select/properties/text_indent.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_text_indent(uint32_t opv, css_style *style,
+css_error css__cascade_text_indent(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length(opv, style, state, set_text_indent);
@@ -29,7 +29,7 @@ css_error css__set_text_indent_from_hint(const css_hint *hint,
css_error css__initial_text_indent(css_select_state *state)
{
- return set_text_indent(state->computed, CSS_TEXT_INDENT_SET,
+ return set_text_indent(state->computed, CSS_TEXT_INDENT_SET,
0, CSS_UNIT_PX);
}
diff --git a/src/select/properties/text_transform.c b/src/select/properties/text_transform.c
index 43117e9..38cb427 100644
--- a/src/select/properties/text_transform.c
+++ b/src/select/properties/text_transform.c
@@ -14,11 +14,11 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_text_transform(uint32_t opv, css_style *style,
+css_error css__cascade_text_transform(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_TEXT_TRANSFORM_INHERIT;
-
+
UNUSED(style);
if (isInherit(opv) == false) {
@@ -57,7 +57,7 @@ css_error css__initial_text_transform(css_select_state *state)
return set_text_transform(state->computed, CSS_TEXT_TRANSFORM_NONE);
}
-css_error css__compose_text_transform(const css_computed_style *parent,
+css_error css__compose_text_transform(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
diff --git a/src/select/properties/top.c b/src/select/properties/top.c
index 8fd1935..72129aa 100644
--- a/src/select/properties/top.c
+++ b/src/select/properties/top.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_top(uint32_t opv, css_style *style,
+css_error css__cascade_top(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length_auto(opv, style, state, set_top);
diff --git a/src/select/properties/unicode_bidi.c b/src/select/properties/unicode_bidi.c
index d798ff2..5b91df1 100644
--- a/src/select/properties/unicode_bidi.c
+++ b/src/select/properties/unicode_bidi.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_unicode_bidi(uint32_t opv, css_style *style,
+css_error css__cascade_unicode_bidi(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_UNICODE_BIDI_INHERIT;
@@ -54,7 +54,7 @@ css_error css__initial_unicode_bidi(css_select_state *state)
return set_unicode_bidi(state->computed, CSS_UNICODE_BIDI_NORMAL);
}
-css_error css__compose_unicode_bidi(const css_computed_style *parent,
+css_error css__compose_unicode_bidi(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
diff --git a/src/select/properties/vertical_align.c b/src/select/properties/vertical_align.c
index dba2343..9fb7143 100644
--- a/src/select/properties/vertical_align.c
+++ b/src/select/properties/vertical_align.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_vertical_align(uint32_t opv, css_style *style,
+css_error css__cascade_vertical_align(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_VERTICAL_ALIGN_INHERIT;
diff --git a/src/select/properties/visibility.c b/src/select/properties/visibility.c
index dd1c1e3..ef95252 100644
--- a/src/select/properties/visibility.c
+++ b/src/select/properties/visibility.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_visibility(uint32_t opv, css_style *style,
+css_error css__cascade_visibility(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_VISIBILITY_INHERIT;
@@ -54,7 +54,7 @@ css_error css__initial_visibility(css_select_state *state)
return set_visibility(state->computed, CSS_VISIBILITY_VISIBLE);
}
-css_error css__compose_visibility(const css_computed_style *parent,
+css_error css__compose_visibility(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
diff --git a/src/select/properties/voice_family.c b/src/select/properties/voice_family.c
index 5c70d1e..b370a2b 100644
--- a/src/select/properties/voice_family.c
+++ b/src/select/properties/voice_family.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_voice_family(uint32_t opv, css_style *style,
+css_error css__cascade_voice_family(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = 0;
@@ -55,7 +55,7 @@ css_error css__cascade_voice_family(uint32_t opv, css_style *style,
* first generic-family are ignored. */
/** \todo Do this at bytecode generation time? */
if (value == 0 && voice != NULL) {
- temp = realloc(voices,
+ temp = realloc(voices,
(n_voices + 1) * sizeof(lwc_string *));
if (temp == NULL) {
if (voices != NULL) {
diff --git a/src/select/properties/volume.c b/src/select/properties/volume.c
index ca0e9dd..96787fa 100644
--- a/src/select/properties/volume.c
+++ b/src/select/properties/volume.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_volume(uint32_t opv, css_style *style,
+css_error css__cascade_volume(uint32_t opv, css_style *style,
css_select_state *state)
{
css_fixed val = 0;
diff --git a/src/select/properties/white_space.c b/src/select/properties/white_space.c
index d537768..b8d2e02 100644
--- a/src/select/properties/white_space.c
+++ b/src/select/properties/white_space.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_white_space(uint32_t opv, css_style *style,
+css_error css__cascade_white_space(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_WHITE_SPACE_INHERIT;
@@ -60,7 +60,7 @@ css_error css__initial_white_space(css_select_state *state)
return set_white_space(state->computed, CSS_WHITE_SPACE_NORMAL);
}
-css_error css__compose_white_space(const css_computed_style *parent,
+css_error css__compose_white_space(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
diff --git a/src/select/properties/widows.c b/src/select/properties/widows.c
index 916966a..61126c2 100644
--- a/src/select/properties/widows.c
+++ b/src/select/properties/widows.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_widows(uint32_t opv, css_style *style,
+css_error css__cascade_widows(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_number(opv, style, state, set_widows);
@@ -37,11 +37,11 @@ css_error css__compose_widows(const css_computed_style *parent,
{
int32_t count = 0;
uint8_t type = get_widows(child, &count);
-
+
if (type == CSS_WIDOWS_INHERIT) {
type = get_widows(parent, &count);
}
-
+
return set_widows(result, type, count);
}
diff --git a/src/select/properties/width.c b/src/select/properties/width.c
index 4b43a8c..829df91 100644
--- a/src/select/properties/width.c
+++ b/src/select/properties/width.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_width(uint32_t opv, css_style *style,
+css_error css__cascade_width(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length_auto(opv, style, state, set_width);
diff --git a/src/select/properties/word_spacing.c b/src/select/properties/word_spacing.c
index 24eda89..4cb9422 100644
--- a/src/select/properties/word_spacing.c
+++ b/src/select/properties/word_spacing.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_word_spacing(uint32_t opv, css_style *style,
+css_error css__cascade_word_spacing(uint32_t opv, css_style *style,
css_select_state *state)
{
return css__cascade_length_normal(opv, style, state, set_word_spacing);
@@ -29,7 +29,7 @@ css_error css__set_word_spacing_from_hint(const css_hint *hint,
css_error css__initial_word_spacing(css_select_state *state)
{
- return set_word_spacing(state->computed, CSS_WORD_SPACING_NORMAL,
+ return set_word_spacing(state->computed, CSS_WORD_SPACING_NORMAL,
0, CSS_UNIT_PX);
}
diff --git a/src/select/properties/writing_mode.c b/src/select/properties/writing_mode.c
index 3ec1352..bbd3753 100644
--- a/src/select/properties/writing_mode.c
+++ b/src/select/properties/writing_mode.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_writing_mode(uint32_t opv, css_style *style,
+css_error css__cascade_writing_mode(uint32_t opv, css_style *style,
css_select_state *state)
{
bool inherit = isInherit(opv);
@@ -35,7 +35,7 @@ css_error css__cascade_writing_mode(uint32_t opv, css_style *style,
}
}
- if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
+ if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
inherit)) {
return set_writing_mode(state->computed, writing_mode);
}
@@ -43,7 +43,7 @@ css_error css__cascade_writing_mode(uint32_t opv, css_style *style,
return CSS_OK;
}
-css_error css__set_writing_mode_from_hint(const css_hint *hint,
+css_error css__set_writing_mode_from_hint(const css_hint *hint,
css_computed_style *style)
{
return set_writing_mode(style, hint->status);
diff --git a/src/select/properties/z_index.c b/src/select/properties/z_index.c
index 3ad15e7..59cf242 100644
--- a/src/select/properties/z_index.c
+++ b/src/select/properties/z_index.c
@@ -14,7 +14,7 @@
#include "select/properties/properties.h"
#include "select/properties/helpers.h"
-css_error css__cascade_z_index(uint32_t opv, css_style *style,
+css_error css__cascade_z_index(uint32_t opv, css_style *style,
css_select_state *state)
{
uint16_t value = CSS_Z_INDEX_INHERIT;
diff --git a/src/select/select.c b/src/select/select.c
index 580c29e..6b5225a 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -118,38 +118,38 @@ typedef struct css_select_rule_source {
static css_error set_hint(css_select_state *state, css_hint *hint);
-static css_error set_initial(css_select_state *state,
+static css_error set_initial(css_select_state *state,
uint32_t prop, css_pseudo_element pseudo,
void *parent);
static css_error intern_strings(css_select_ctx *ctx);
static void destroy_strings(css_select_ctx *ctx);
-static css_error select_from_sheet(css_select_ctx *ctx,
+static css_error select_from_sheet(css_select_ctx *ctx,
const css_stylesheet *sheet, css_origin origin,
css_select_state *state);
-static css_error match_selectors_in_sheet(css_select_ctx *ctx,
+static css_error match_selectors_in_sheet(css_select_ctx *ctx,
const css_stylesheet *sheet, css_select_state *state);
-static css_error match_selector_chain(css_select_ctx *ctx,
+static css_error match_selector_chain(css_select_ctx *ctx,
const css_selector *selector, css_select_state *state);
-static css_error match_named_combinator(css_select_ctx *ctx,
- css_combinator type, const css_selector *selector,
+static css_error match_named_combinator(css_select_ctx *ctx,
+ css_combinator type, const css_selector *selector,
css_select_state *state, void *node, void **next_node);
-static css_error match_universal_combinator(css_select_ctx *ctx,
- css_combinator type, const css_selector *selector,
+static css_error match_universal_combinator(css_select_ctx *ctx,
+ css_combinator type, const css_selector *selector,
css_select_state *state, void *node, bool may_optimise,
bool *rejected_by_cache, void **next_node);
-static css_error match_details(css_select_ctx *ctx, void *node,
- const css_selector_detail *detail, css_select_state *state,
+static css_error match_details(css_select_ctx *ctx, void *node,
+ const css_selector_detail *detail, css_select_state *state,
bool *match, css_pseudo_element *pseudo_element);
-static css_error match_detail(css_select_ctx *ctx, void *node,
- const css_selector_detail *detail, css_select_state *state,
+static css_error match_detail(css_select_ctx *ctx, void *node,
+ const css_selector_detail *detail, css_select_state *state,
bool *match, css_pseudo_element *pseudo_element);
static css_error cascade_style(const css_style *style, css_select_state *state);
static css_error select_font_faces_from_sheet(
- const css_stylesheet *sheet,
- css_origin origin,
+ const css_stylesheet *sheet,
+ css_origin origin,
css_select_font_faces_state *state);
#ifdef DEBUG_CHAIN_MATCHING
@@ -305,7 +305,7 @@ css_error css_select_ctx_destroy(css_select_ctx *ctx)
* \param media Media types to which the sheet applies
* \return CSS_OK on success, appropriate error otherwise
*/
-css_error css_select_ctx_append_sheet(css_select_ctx *ctx,
+css_error css_select_ctx_append_sheet(css_select_ctx *ctx,
const css_stylesheet *sheet, css_origin origin,
uint64_t media)
{
@@ -318,7 +318,7 @@ css_error css_select_ctx_append_sheet(css_select_ctx *ctx,
/**
* Insert a stylesheet into a selection context
- *
+ *
* \param ctx The context to insert into
* \param sheet Sheet to insert
* \param index Index in context to insert sheet
@@ -344,7 +344,7 @@ css_error css_select_ctx_insert_sheet(css_select_ctx *ctx,
if (index > ctx->n_sheets)
return CSS_INVALID;
- temp = realloc(ctx->sheets,
+ temp = realloc(ctx->sheets,
(ctx->n_sheets + 1) * sizeof(css_select_sheet));
if (temp == NULL)
return CSS_NOMEM;
@@ -1245,7 +1245,7 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
if ((s.media & media) != 0 &&
s.sheet->disabled == false) {
- error = select_from_sheet(ctx, s.sheet,
+ error = select_from_sheet(ctx, s.sheet,
s.origin, &state);
if (error != CSS_OK)
goto cleanup;
@@ -1254,12 +1254,12 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
/* Consider any inline style for the node */
if (inline_style != NULL) {
- css_rule_selector *sel =
+ css_rule_selector *sel =
(css_rule_selector *) inline_style->rule_list;
/* Sanity check style */
if (inline_style->rule_count != 1 ||
- inline_style->rule_list->type != CSS_RULE_SELECTOR ||
+ inline_style->rule_list->type != CSS_RULE_SELECTOR ||
inline_style->rule_list->items != 0) {
error = CSS_INVALID;
goto cleanup;
@@ -1284,16 +1284,16 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
state.current_pseudo = CSS_PSEUDO_ELEMENT_NONE;
state.computed = state.results->styles[CSS_PSEUDO_ELEMENT_NONE];
for (i = 0; i < CSS_N_PROPERTIES; i++) {
- const prop_state *prop =
+ const prop_state *prop =
&state.props[i][CSS_PSEUDO_ELEMENT_NONE];
- /* If the property is still unset or it's set to inherit
- * and we're the root element, then set it to its initial
+ /* If the property is still unset or it's set to inherit
+ * and we're the root element, then set it to its initial
* value. */
- if (prop->set == false ||
- (parent == NULL &&
+ if (prop->set == false ||
+ (parent == NULL &&
prop->inherit == true)) {
- error = set_initial(&state, i,
+ error = set_initial(&state, i,
CSS_PSEUDO_ELEMENT_NONE, parent);
if (error != CSS_OK)
goto cleanup;
@@ -1312,7 +1312,7 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
for (i = 0; i < CSS_N_PROPERTIES; i++) {
const prop_state *prop = &state.props[i][j];
- /* If the property is still unset then set it
+ /* If the property is still unset then set it
* to its initial value. */
if (prop->set == false) {
error = set_initial(&state, i, j, parent);
@@ -1323,8 +1323,8 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
}
/* If this is the root element, then we must ensure that all
- * length values are absolute, display and float are correctly
- * computed, and the default border-{top,right,bottom,left}-color
+ * length values are absolute, display and float are correctly
+ * computed, and the default border-{top,right,bottom,left}-color
* is set to the computed value of color. */
if (parent == NULL) {
/* Only compute absolute values for the base element */
@@ -1406,20 +1406,20 @@ css_error css_select_font_faces(css_select_ctx *ctx,
css_error error;
css_select_font_faces_state state;
uint32_t n_font_faces;
-
+
if (ctx == NULL || font_family == NULL || result == NULL)
return CSS_BADPARM;
memset(&state, 0, sizeof(css_select_font_faces_state));
state.font_family = font_family;
state.media = media;
-
+
/* Iterate through the top-level stylesheets, selecting font-faces
* from those which apply to our current media requirements and
* are not disabled */
for (i = 0; i < ctx->n_sheets; i++) {
const css_select_sheet s = ctx->sheets[i];
-
+
if ((s.media & media) != 0 &&
s.sheet->disabled == false) {
error = select_font_faces_from_sheet(s.sheet,
@@ -1428,23 +1428,23 @@ css_error css_select_font_faces(css_select_ctx *ctx,
goto cleanup;
}
}
-
- n_font_faces = state.ua_font_faces.count +
+
+ n_font_faces = state.ua_font_faces.count +
state.user_font_faces.count +
state.author_font_faces.count;
-
-
+
+
if (n_font_faces > 0) {
/* We found some matching faces. Make a results structure with
* the font faces in priority order. */
css_select_font_faces_results *results;
-
+
results = malloc(sizeof(css_select_font_faces_results));
if (results == NULL) {
error = CSS_NOMEM;
goto cleanup;
}
-
+
results->font_faces = malloc(
n_font_faces * sizeof(css_font_face *));
if (results->font_faces == NULL) {
@@ -1454,47 +1454,47 @@ css_error css_select_font_faces(css_select_ctx *ctx,
}
results->n_font_faces = n_font_faces;
-
+
i = 0;
if (state.ua_font_faces.count != 0) {
- memcpy(results->font_faces,
+ memcpy(results->font_faces,
state.ua_font_faces.font_faces,
- sizeof(css_font_face *) *
+ sizeof(css_font_face *) *
state.ua_font_faces.count);
-
+
i += state.ua_font_faces.count;
}
-
+
if (state.user_font_faces.count != 0) {
- memcpy(results->font_faces + i,
+ memcpy(results->font_faces + i,
state.user_font_faces.font_faces,
- sizeof(css_font_face *) *
+ sizeof(css_font_face *) *
state.user_font_faces.count);
i += state.user_font_faces.count;
}
-
+
if (state.author_font_faces.count != 0) {
- memcpy(results->font_faces + i,
+ memcpy(results->font_faces + i,
state.author_font_faces.font_faces,
- sizeof(css_font_face *) *
+ sizeof(css_font_face *) *
state.author_font_faces.count);
}
*result = results;
}
-
+
error = CSS_OK;
-
+
cleanup:
- if (state.ua_font_faces.count != 0)
+ if (state.ua_font_faces.count != 0)
free(state.ua_font_faces.font_faces);
- if (state.user_font_faces.count != 0)
+ if (state.user_font_faces.count != 0)
free(state.user_font_faces.font_faces);
-
- if (state.author_font_faces.count != 0)
+
+ if (state.author_font_faces.count != 0)
free(state.author_font_faces.font_faces);
-
+
return error;
}
@@ -1509,15 +1509,15 @@ css_error css_select_font_faces_results_destroy(
{
if (results == NULL)
return CSS_BADPARM;
-
+
if (results->font_faces != NULL) {
/* Don't destroy the individual css_font_faces, they're owned
by their respective sheets */
free(results->font_faces);
}
-
+
free(results);
-
+
return CSS_OK;
}
@@ -1536,37 +1536,37 @@ css_error intern_strings(css_select_ctx *ctx)
/* Pseudo classes */
error = lwc_intern_string(
- "first-child", SLEN("first-child"),
+ "first-child", SLEN("first-child"),
&ctx->first_child);
if (error != lwc_error_ok)
return css_error_from_lwc_error(error);
error = lwc_intern_string(
- "link", SLEN("link"),
+ "link", SLEN("link"),
&ctx->link);
if (error != lwc_error_ok)
return css_error_from_lwc_error(error);
error = lwc_intern_string(
- "visited", SLEN("visited"),
+ "visited", SLEN("visited"),
&ctx->visited);
if (error != lwc_error_ok)
return css_error_from_lwc_error(error);
error = lwc_intern_string(
- "hover", SLEN("hover"),
+ "hover", SLEN("hover"),
&ctx->hover);
if (error != lwc_error_ok)
return css_error_from_lwc_error(error);
error = lwc_intern_string(
- "active", SLEN("active"),
+ "active", SLEN("active"),
&ctx->active);
if (error != lwc_error_ok)
return css_error_from_lwc_error(error);
error = lwc_intern_string(
- "focus", SLEN("focus"),
+ "focus", SLEN("focus"),
&ctx->focus);
if (error != lwc_error_ok)
return css_error_from_lwc_error(error);
@@ -1669,7 +1669,7 @@ css_error intern_strings(css_select_ctx *ctx)
/* Pseudo elements */
error = lwc_intern_string(
- "first-line", SLEN("first-line"),
+ "first-line", SLEN("first-line"),
&ctx->first_line);
if (error != lwc_error_ok)
return css_error_from_lwc_error(error);
@@ -1681,13 +1681,13 @@ css_error intern_strings(css_select_ctx *ctx)
return css_error_from_lwc_error(error);
error = lwc_intern_string(
- "before", SLEN("before"),
+ "before", SLEN("before"),
&ctx->before);
if (error != lwc_error_ok)
return css_error_from_lwc_error(error);
error = lwc_intern_string(
- "after", SLEN("after"),
+ "after", SLEN("after"),
&ctx->after);
if (error != lwc_error_ok)
return css_error_from_lwc_error(error);
@@ -1774,29 +1774,29 @@ css_error set_hint(css_select_state *state, css_hint *hint)
return CSS_OK;
}
-css_error set_initial(css_select_state *state,
+css_error set_initial(css_select_state *state,
uint32_t prop, css_pseudo_element pseudo,
void *parent)
{
css_error error;
- /* Do nothing if this property is inherited (the default state
+ /* Do nothing if this property is inherited (the default state
* of a clean computed style is for everything to be set to inherit)
*
- * If the node is tree root and we're dealing with the base element,
+ * If the node is tree root and we're dealing with the base element,
* everything should be defaulted.
*/
- if (prop_dispatch[prop].inherited == false ||
+ if (prop_dispatch[prop].inherited == false ||
(pseudo == CSS_PSEUDO_ELEMENT_NONE && parent == NULL)) {
enum prop_group group = prop_dispatch[prop].group;
- /* Remaining properties are neither inherited nor
- * already set. Thus, we set them to their initial
- * values here. Except, however, if the property in
- * question resides in one of the extension blocks and
- * the extension block has yet to be allocated. In that
- * case, we do nothing and leave it to the property
- * accessors to return the initial values for the
+ /* Remaining properties are neither inherited nor
+ * already set. Thus, we set them to their initial
+ * values here. Except, however, if the property in
+ * question resides in one of the extension blocks and
+ * the extension block has yet to be allocated. In that
+ * case, we do nothing and leave it to the property
+ * accessors to return the initial values for the
* property.
*/
switch (group) {
@@ -1825,7 +1825,7 @@ css_error set_initial(css_select_state *state,
#define IMPORT_STACK_SIZE 256
-css_error select_from_sheet(css_select_ctx *ctx, const css_stylesheet *sheet,
+css_error select_from_sheet(css_select_ctx *ctx, const css_stylesheet *sheet,
css_origin origin, css_select_state *state)
{
const css_stylesheet *s = sheet;
@@ -1842,7 +1842,7 @@ css_error select_from_sheet(css_select_ctx *ctx, const css_stylesheet *sheet,
if (rule != NULL && rule->type == CSS_RULE_IMPORT) {
/* Current rule is an import */
- const css_rule_import *import =
+ const css_rule_import *import =
(const css_rule_import *) rule;
if (import->sheet != NULL &&
@@ -1893,7 +1893,7 @@ static inline bool _rule_applies_to_media(const css_rule *rule, uint64_t media)
while (ancestor != NULL) {
const css_rule_media *m = (const css_rule_media *) ancestor;
- if (ancestor->type == CSS_RULE_MEDIA &&
+ if (ancestor->type == CSS_RULE_MEDIA &&
(m->media & media) == 0) {
applies = false;
break;
@@ -1917,7 +1917,7 @@ static css_error _select_font_face_from_rule(
if (lwc_string_isequal(
rule->font_face->font_family,
- state->font_family,
+ state->font_family,
&correct_family) == lwc_error_ok &&
correct_family) {
css_select_font_faces_list *faces = NULL;
@@ -1936,16 +1936,16 @@ static css_error _select_font_face_from_rule(
faces = &state->author_font_faces;
break;
}
-
- index = faces->count++;
+
+ index = faces->count++;
new_size = faces->count * sizeof(css_font_face *);
-
+
new_faces = realloc(faces->font_faces, new_size);
if (new_faces == NULL) {
return CSS_NOMEM;
}
faces->font_faces = new_faces;
-
+
faces->font_faces[index] = rule->font_face;
}
}
@@ -1954,35 +1954,35 @@ static css_error _select_font_face_from_rule(
}
static css_error select_font_faces_from_sheet(
- const css_stylesheet *sheet,
- css_origin origin,
+ const css_stylesheet *sheet,
+ css_origin origin,
css_select_font_faces_state *state)
{
const css_stylesheet *s = sheet;
const css_rule *rule = s->rule_list;
uint32_t sp = 0;
const css_rule *import_stack[IMPORT_STACK_SIZE];
-
+
do {
/* Find first non-charset rule, if we're at the list head */
if (rule == s->rule_list) {
while (rule != NULL && rule->type == CSS_RULE_CHARSET)
rule = rule->next;
}
-
+
if (rule != NULL && rule->type == CSS_RULE_IMPORT) {
/* Current rule is an import */
- const css_rule_import *import =
+ const css_rule_import *import =
(const css_rule_import *) rule;
-
+
if (import->sheet != NULL &&
(import->media & state->media) != 0) {
/* It's applicable, so process it */
if (sp >= IMPORT_STACK_SIZE)
return CSS_NOMEM;
-
+
import_stack[sp++] = rule;
-
+
s = import->sheet;
rule = s->rule_list;
} else {
@@ -1991,15 +1991,15 @@ static css_error select_font_faces_from_sheet(
}
} else if (rule != NULL && rule->type == CSS_RULE_FONT_FACE) {
css_error error;
-
+
error = _select_font_face_from_rule(
(const css_rule_font_face *) rule,
origin,
state);
-
+
if (error != CSS_OK)
return error;
-
+
rule = rule->next;
} else if (rule == NULL) {
/* Find next sheet to process */
@@ -2014,7 +2014,7 @@ static css_error select_font_faces_from_sheet(
rule = rule->next;
}
} while (s != NULL);
-
+
return CSS_OK;
}
@@ -2039,7 +2039,7 @@ static inline bool _selectors_pending(const css_selector **node,
return pending;
}
-static inline bool _selector_less_specific(const css_selector *ref,
+static inline bool _selector_less_specific(const css_selector *ref,
const css_selector *cand)
{
bool result = true;
@@ -2103,7 +2103,7 @@ static const css_selector *_selector_next(const css_selector **node,
return ret;
}
-css_error match_selectors_in_sheet(css_select_ctx *ctx,
+css_error match_selectors_in_sheet(css_select_ctx *ctx,
const css_stylesheet *sheet, css_select_state *state)
{
static const css_selector *empty_selector = NULL;
@@ -2128,7 +2128,7 @@ css_error match_selectors_in_sheet(css_select_ctx *ctx,
/* Find hash chain that applies to current node */
req.qname = state->element;
- error = css__selector_hash_find(sheet->selectors,
+ error = css__selector_hash_find(sheet->selectors,
&req, &node_iterator,
&node_selectors);
if (error != CSS_OK)
@@ -2155,7 +2155,7 @@ css_error match_selectors_in_sheet(css_select_ctx *ctx,
if (state->id != NULL) {
/* Find hash chain for node ID */
req.id = state->id;
- error = css__selector_hash_find_by_id(sheet->selectors,
+ error = css__selector_hash_find_by_id(sheet->selectors,
&req, &id_iterator, &id_selectors);
if (error != CSS_OK)
goto cleanup;
@@ -2168,7 +2168,7 @@ css_error match_selectors_in_sheet(css_select_ctx *ctx,
goto cleanup;
/* Process matching selectors, if any */
- while (_selectors_pending(node_selectors, id_selectors,
+ while (_selectors_pending(node_selectors, id_selectors,
class_selectors, n_classes, univ_selectors)) {
const css_selector *selector;
@@ -2190,7 +2190,7 @@ css_error match_selectors_in_sheet(css_select_ctx *ctx,
if (error != CSS_OK)
goto cleanup;
- /* Advance to next selector in whichever chain we extracted
+ /* Advance to next selector in whichever chain we extracted
* the processed selector from. */
switch (src.source) {
case CSS_SELECT_RULE_SRC_ELEMENT:
@@ -2227,7 +2227,7 @@ cleanup:
return error;
}
-static void update_reject_cache(css_select_state *state,
+static void update_reject_cache(css_select_state *state,
css_combinator comb, const css_selector *s)
{
const css_selector_detail *detail = &s->data;
@@ -2250,7 +2250,7 @@ static void update_reject_cache(css_select_state *state,
state->next_reject--;
}
-css_error match_selector_chain(css_select_ctx *ctx,
+css_error match_selector_chain(css_select_ctx *ctx,
const css_selector *selector, css_select_state *state)
{
const css_selector *s = selector;
@@ -2267,11 +2267,11 @@ css_error match_selector_chain(css_select_ctx *ctx,
fprintf(stderr, "\n");
#endif
- /* Match the details of the first selector in the chain.
+ /* Match the details of the first selector in the chain.
*
* Note that pseudo elements will only appear as details of
* the first selector in the chain, as the parser will reject
- * any selector chains containing pseudo elements anywhere
+ * any selector chains containing pseudo elements anywhere
* else.
*/
error = match_details(ctx, node, detail, state, &match, &pseudo);
@@ -2288,14 +2288,14 @@ css_error match_selector_chain(css_select_ctx *ctx,
/* Consider any combinator on this selector */
if (s->data.comb != CSS_COMBINATOR_NONE &&
- s->combinator->data.qname.name !=
+ s->combinator->data.qname.name !=
ctx->universal) {
/* Named combinator */
- may_optimise &=
- (s->data.comb == CSS_COMBINATOR_ANCESTOR ||
+ may_optimise &=
+ (s->data.comb == CSS_COMBINATOR_ANCESTOR ||
s->data.comb == CSS_COMBINATOR_PARENT);
- error = match_named_combinator(ctx, s->data.comb,
+ error = match_named_combinator(ctx, s->data.comb,
s->combinator, state, node, &next_node);
if (error != CSS_OK)
return error;
@@ -2305,12 +2305,12 @@ css_error match_selector_chain(css_select_ctx *ctx,
return CSS_OK;
} else if (s->data.comb != CSS_COMBINATOR_NONE) {
/* Universal combinator */
- may_optimise &=
- (s->data.comb == CSS_COMBINATOR_ANCESTOR ||
+ may_optimise &=
+ (s->data.comb == CSS_COMBINATOR_ANCESTOR ||
s->data.comb == CSS_COMBINATOR_PARENT);
- error = match_universal_combinator(ctx, s->data.comb,
- s->combinator, state, node,
+ error = match_universal_combinator(ctx, s->data.comb,
+ s->combinator, state, node,
may_optimise, &rejected_by_cache,
&next_node);
if (error != CSS_OK)
@@ -2339,7 +2339,7 @@ css_error match_selector_chain(css_select_ctx *ctx,
/* Ensure that the appropriate computed style exists */
if (state->results->styles[pseudo] == NULL) {
error = css__computed_style_create(
- &state->results->styles[pseudo]);
+ &state->results->styles[pseudo]);
if (error != CSS_OK)
return error;
}
@@ -2347,12 +2347,12 @@ css_error match_selector_chain(css_select_ctx *ctx,
state->current_pseudo = pseudo;
state->computed = state->results->styles[pseudo];
- return cascade_style(((css_rule_selector *) selector->rule)->style,
+ return cascade_style(((css_rule_selector *) selector->rule)->style,
state);
}
css_error match_named_combinator(css_select_ctx *ctx, css_combinator type,
- const css_selector *selector, css_select_state *state,
+ const css_selector *selector, css_select_state *state,
void *node, void **next_node)
{
const css_selector_detail *detail = &selector->data;
@@ -2365,19 +2365,19 @@ css_error match_named_combinator(css_select_ctx *ctx, css_combinator type,
/* Find candidate node */
switch (type) {
case CSS_COMBINATOR_ANCESTOR:
- error = state->handler->named_ancestor_node(state->pw,
+ error = state->handler->named_ancestor_node(state->pw,
n, &selector->data.qname, &n);
if (error != CSS_OK)
return error;
break;
case CSS_COMBINATOR_PARENT:
- error = state->handler->named_parent_node(state->pw,
+ error = state->handler->named_parent_node(state->pw,
n, &selector->data.qname, &n);
if (error != CSS_OK)
return error;
break;
case CSS_COMBINATOR_SIBLING:
- error = state->handler->named_sibling_node(state->pw,
+ error = state->handler->named_sibling_node(state->pw,
n, &selector->data.qname, &n);
if (error != CSS_OK)
return error;
@@ -2402,7 +2402,7 @@ css_error match_named_combinator(css_select_ctx *ctx, css_combinator type,
if (n != NULL) {
/* Match its details */
- error = match_details(ctx, n, detail, state,
+ error = match_details(ctx, n, detail, state,
&match, NULL);
if (error != CSS_OK)
return error;
@@ -2411,8 +2411,8 @@ css_error match_named_combinator(css_select_ctx *ctx, css_combinator type,
if (match == true)
break;
- /* For parent and sibling selectors, only adjacent
- * nodes are valid. Thus, if we failed to match,
+ /* For parent and sibling selectors, only adjacent
+ * nodes are valid. Thus, if we failed to match,
* give up. */
if (type == CSS_COMBINATOR_PARENT ||
type == CSS_COMBINATOR_SIBLING)
@@ -2453,10 +2453,10 @@ css_error match_universal_combinator(css_select_ctx *ctx, css_combinator type,
*rejected_by_cache = false;
/* Consult reject cache first */
- if (may_optimise && (type == CSS_COMBINATOR_ANCESTOR ||
- type == CSS_COMBINATOR_PARENT) &&
+ if (may_optimise && (type == CSS_COMBINATOR_ANCESTOR ||
+ type == CSS_COMBINATOR_PARENT) &&
next_detail != NULL &&
- (next_detail->type == CSS_SELECTOR_CLASS ||
+ (next_detail->type == CSS_SELECTOR_CLASS ||
next_detail->type == CSS_SELECTOR_ID)) {
reject_item *reject = state->next_reject + 1;
reject_item *last = state->reject_cache +
@@ -2466,8 +2466,8 @@ css_error match_universal_combinator(css_select_ctx *ctx, css_combinator type,
while (reject <= last) {
/* Perform pessimistic matching (may hurt quirks) */
if (reject->type == next_detail->type &&
- lwc_string_isequal(reject->value,
- next_detail->qname.name,
+ lwc_string_isequal(reject->value,
+ next_detail->qname.name,
&match) == lwc_error_ok &&
match) {
/* Found it: can't match */
@@ -2505,7 +2505,7 @@ css_error match_universal_combinator(css_select_ctx *ctx, css_combinator type,
if (n != NULL) {
/* Match its details */
- error = match_details(ctx, n, detail, state,
+ error = match_details(ctx, n, detail, state,
&match, NULL);
if (error != CSS_OK)
return error;
@@ -2528,8 +2528,8 @@ css_error match_universal_combinator(css_select_ctx *ctx, css_combinator type,
return CSS_OK;
}
-css_error match_details(css_select_ctx *ctx, void *node,
- const css_selector_detail *detail, css_select_state *state,
+css_error match_details(css_select_ctx *ctx, void *node,
+ const css_selector_detail *detail, css_select_state *state,
bool *match, css_pseudo_element *pseudo_element)
{
css_error error;
@@ -2547,10 +2547,10 @@ css_error match_details(css_select_ctx *ctx, void *node,
* selector, then we must match) */
*match = true;
- /** \todo Some details are easier to test than others (e.g. dashmatch
- * actually requires looking at data rather than simply comparing
- * pointers). Should we consider sorting the detail list such that the
- * simpler details come first (and thus the expensive match routines
+ /** \todo Some details are easier to test than others (e.g. dashmatch
+ * actually requires looking at data rather than simply comparing
+ * pointers). Should we consider sorting the detail list such that the
+ * simpler details come first (and thus the expensive match routines
* can be avoided unless absolutely necessary)? */
while (detail != NULL) {
@@ -2592,8 +2592,8 @@ static inline bool match_nth(int32_t a, int32_t b, int32_t count)
}
}
-css_error match_detail(css_select_ctx *ctx, void *node,
- const css_selector_detail *detail, css_select_state *state,
+css_error match_detail(css_select_ctx *ctx, void *node,
+ const css_selector_detail *detail, css_select_state *state,
bool *match, css_pseudo_element *pseudo_element)
{
bool is_root = false;
@@ -2623,19 +2623,19 @@ css_error match_detail(css_select_ctx *ctx, void *node,
if (error != CSS_OK)
return error;
- if (is_root == false &&
+ if (is_root == false &&
detail->qname.name == ctx->first_child) {
int32_t num_before = 0;
- error = state->handler->node_count_siblings(state->pw,
+ error = state->handler->node_count_siblings(state->pw,
node, false, false, &num_before);
if (error == CSS_OK)
*match = (num_before == 0);
- } else if (is_root == false &&
+ } else if (is_root == false &&
detail->qname.name == ctx->nth_child) {
int32_t num_before = 0;
- error = state->handler->node_count_siblings(state->pw,
+ error = state->handler->node_count_siblings(state->pw,
node, false, false, &num_before);
if (error == CSS_OK) {
int32_t a = detail->value.nth.a;
@@ -2643,11 +2643,11 @@ css_error match_detail(css_select_ctx *ctx, void *node,
*match = match_nth(a, b, num_before + 1);
}
- } else if (is_root == false &&
+ } else if (is_root == false &&
detail->qname.name == ctx->nth_last_child) {
int32_t num_after = 0;
- error = state->handler->node_count_siblings(state->pw,
+ error = state->handler->node_count_siblings(state->pw,
node, false, true, &num_after);
if (error == CSS_OK) {
int32_t a = detail->value.nth.a;
@@ -2655,11 +2655,11 @@ css_error match_detail(css_select_ctx *ctx, void *node,
*match = match_nth(a, b, num_after + 1);
}
- } else if (is_root == false &&
+ } else if (is_root == false &&
detail->qname.name == ctx->nth_of_type) {
int32_t num_before = 0;
- error = state->handler->node_count_siblings(state->pw,
+ error = state->handler->node_count_siblings(state->pw,
node, true, false, &num_before);
if (error == CSS_OK) {
int32_t a = detail->value.nth.a;
@@ -2667,11 +2667,11 @@ css_error match_detail(css_select_ctx *ctx, void *node,
*match = match_nth(a, b, num_before + 1);
}
- } else if (is_root == false &&
+ } else if (is_root == false &&
detail->qname.name == ctx->nth_last_of_type) {
int32_t num_after = 0;
- error = state->handler->node_count_siblings(state->pw,
+ error = state->handler->node_count_siblings(state->pw,
node, true, true, &num_after);
if (error == CSS_OK) {
int32_t a = detail->value.nth.a;
@@ -2691,7 +2691,7 @@ css_error match_detail(css_select_ctx *ctx, void *node,
detail->qname.name == ctx->first_of_type) {
int32_t num_before = 0;
- error = state->handler->node_count_siblings(state->pw,
+ error = state->handler->node_count_siblings(state->pw,
node, true, false, &num_before);
if (error == CSS_OK)
*match = (num_before == 0);
@@ -2699,36 +2699,36 @@ css_error match_detail(css_select_ctx *ctx, void *node,
detail->qname.name == ctx->last_of_type) {
int32_t num_after = 0;
- error = state->handler->node_count_siblings(state->pw,
+ error = state->handler->node_count_siblings(state->pw,
node, true, true, &num_after);
if (error == CSS_OK)
*match = (num_after == 0);
- } else if (is_root == false &&
+ } else if (is_root == false &&
detail->qname.name == ctx->only_child) {
int32_t num_before = 0, num_after = 0;
- error = state->handler->node_count_siblings(state->pw,
+ error = state->handler->node_count_siblings(state->pw,
node, false, false, &num_before);
if (error == CSS_OK) {
error = state->handler->node_count_siblings(
state->pw, node, false, true,
&num_after);
if (error == CSS_OK)
- *match = (num_before == 0) &&
+ *match = (num_before == 0) &&
(num_after == 0);
}
- } else if (is_root == false &&
+ } else if (is_root == false &&
detail->qname.name == ctx->only_of_type) {
int32_t num_before = 0, num_after = 0;
- error = state->handler->node_count_siblings(state->pw,
+ error = state->handler->node_count_siblings(state->pw,
node, true, false, &num_before);
if (error == CSS_OK) {
error = state->handler->node_count_siblings(
state->pw, node, true, true,
&num_after);
if (error == CSS_OK)
- *match = (num_before == 0) &&
+ *match = (num_before == 0) &&
(num_after == 0);
}
} else if (detail->qname.name == ctx->root) {
@@ -2796,8 +2796,8 @@ css_error match_detail(css_select_ctx *ctx, void *node,
add_node_flags(node, state, CSS_NODE_FLAGS_TAINT_ATTRIBUTE);
break;
case CSS_SELECTOR_ATTRIBUTE_EQUAL:
- error = state->handler->node_has_attribute_equal(state->pw,
- node, &detail->qname, detail->value.string,
+ error = state->handler->node_has_attribute_equal(state->pw,
+ node, &detail->qname, detail->value.string,
match);
add_node_flags(node, state, CSS_NODE_FLAGS_TAINT_ATTRIBUTE);
break;
@@ -2808,7 +2808,7 @@ css_error match_detail(css_select_ctx *ctx, void *node,
add_node_flags(node, state, CSS_NODE_FLAGS_TAINT_ATTRIBUTE);
break;
case CSS_SELECTOR_ATTRIBUTE_INCLUDES:
- error = state->handler->node_has_attribute_includes(state->pw,
+ error = state->handler->node_has_attribute_includes(state->pw,
node, &detail->qname, detail->value.string,
match);
add_node_flags(node, state, CSS_NODE_FLAGS_TAINT_ATTRIBUTE);
@@ -2868,7 +2868,7 @@ bool css__outranks_existing(uint16_t op, bool important, css_select_state *state
bool outranks = false;
/* Sorting on origin & importance gives the following:
- *
+ *
* | UA, - | UA, i | USER, - | USER, i | AUTHOR, - | AUTHOR, i
* |----------------------------------------------------------
* UA , - | S S Y Y Y Y
@@ -2878,8 +2878,8 @@ bool css__outranks_existing(uint16_t op, bool important, css_select_state *state
* AUTHOR, - | - - - Y S Y
* AUTHOR, i | - - - Y - S
*
- * Where the columns represent the origin/importance of the property
- * being considered and the rows represent the origin/importance of
+ * Where the columns represent the origin/importance of the property
+ * being considered and the rows represent the origin/importance of
* the existing property.
*
* - means that the existing property must be preserved
@@ -2893,12 +2893,12 @@ bool css__outranks_existing(uint16_t op, bool important, css_select_state *state
* the specificities are the same because:
*
* a) We process stylesheets in order
- * b) The selector hash chains within a sheet are ordered such that
+ * b) The selector hash chains within a sheet are ordered such that
* more specific rules come after less specific ones and, when
* specificities are identical, rules defined later occur after
* those defined earlier.
*
- * Therefore, where we consider specificity, below, the property
+ * Therefore, where we consider specificity, below, the property
* currently being considered will always be applied if its specificity
* is greater than or equal to that of the existing property.
*/
@@ -2912,15 +2912,15 @@ bool css__outranks_existing(uint16_t op, bool important, css_select_state *state
if (existing->origin < state->current_origin) {
/* New origin has more weight than existing one.
- * Thus, new property wins, except when the existing
+ * Thus, new property wins, except when the existing
* one is USER, i. */
if (existing->important == 0 ||
existing->origin != CSS_ORIGIN_USER) {
outranks = true;
}
} else if (existing->origin == state->current_origin) {
- /* Origins are identical, consider importance, except
- * for UA stylesheets, when specificity is always
+ /* Origins are identical, consider importance, except
+ * for UA stylesheets, when specificity is always
* considered (as importance is meaningless) */
if (existing->origin == CSS_ORIGIN_UA) {
if (state->current_specificity >=
@@ -2984,7 +2984,7 @@ void dump_chain(const css_selector *selector)
do {
switch (detail->type) {
case CSS_SELECTOR_ELEMENT:
- if (lwc_string_length(detail->name) == 1 &&
+ if (lwc_string_length(detail->name) == 1 &&
lwc_string_data(detail->name)[0] == '*' &&
detail->next == 1) {
break;