diff options
Diffstat (limited to 'src/select/properties')
114 files changed, 259 insertions, 259 deletions
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; |