diff --git a/desktop/browser.c b/desktop/browser.c index c52493489..65dadf95e 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -1421,7 +1421,7 @@ void browser_window_mouse_action_html(struct browser_window *bw, while ((next_box = box_at_point(box, x, y, &box_x, &box_y, &content)) != NULL) { - enum css_overflow overflow = CSS_OVERFLOW_VISIBLE; + enum css_overflow_e overflow = CSS_OVERFLOW_VISIBLE; box = next_box; @@ -2469,7 +2469,7 @@ gui_pointer_shape get_pointer_shape(struct browser_window *bw, struct box *box, { gui_pointer_shape pointer; css_computed_style *style; - enum css_cursor cursor; + enum css_cursor_e cursor; lwc_string **cursor_uris; assert(bw); diff --git a/render/box.h b/render/box.h index 3134ea1a2..701329108 100644 --- a/render/box.h +++ b/render/box.h @@ -121,8 +121,8 @@ enum box_side { TOP, RIGHT, BOTTOM, LEFT }; * Container for box border details */ struct box_border { - enum css_border_style style; /**< border-style */ - enum css_border_color color; /**< border-color type */ + enum css_border_style_e style; /**< border-style */ + enum css_border_color_e color; /**< border-color type */ css_color c; /**< border-color value */ int width; /**< border-width (pixels) */ }; diff --git a/render/box_construct.c b/render/box_construct.c index a0b77802b..444d01fbe 100644 --- a/render/box_construct.c +++ b/render/box_construct.c @@ -105,7 +105,7 @@ bool box_construct_text(xmlNode *n, struct content *content, static css_computed_style * box_get_style(struct content *c, const css_computed_style *parent_style, xmlNode *n); static void box_text_transform(char *s, unsigned int len, - enum css_text_transform tt); + enum css_text_transform_e tt); #define BOX_SPECIAL_PARAMS xmlNode *n, struct content *content, \ struct box *box, bool *convert_children static bool box_a(BOX_SPECIAL_PARAMS); @@ -724,7 +724,7 @@ bool box_construct_text(xmlNode *n, struct content *content, /* white-space: pre */ char *text = cnv_space2nbsp((char *) n->content); char *current; - enum css_white_space white_space = + enum css_white_space_e white_space = css_computed_white_space(parent_style); /* note: pre-wrap/pre-line are unimplemented */ @@ -892,7 +892,7 @@ css_computed_style *box_get_style(struct content *c, * \param tt transform type */ -void box_text_transform(char *s, unsigned int len, enum css_text_transform tt) +void box_text_transform(char *s, unsigned int len, enum css_text_transform_e tt) { unsigned int i; if (len == 0) @@ -947,7 +947,7 @@ void box_text_transform(char *s, unsigned int len, enum css_text_transform tt) bool box_body(BOX_SPECIAL_PARAMS) { - enum css_background_color type; + enum css_background_color_e type; css_color color; type = css_computed_background_color(box->style, &color); diff --git a/render/font.c b/render/font.c index 4577ff373..c731bc60c 100644 --- a/render/font.c +++ b/render/font.c @@ -22,10 +22,10 @@ #include "render/font.h" static plot_font_generic_family_t plot_font_generic_family( - enum css_font_family css); -static int plot_font_weight(enum css_font_weight css); -static plot_font_flags_t plot_font_flags(enum css_font_style style, - enum css_font_variant variant); + enum css_font_family_e css); +static int plot_font_weight(enum css_font_weight_e css); +static plot_font_flags_t plot_font_flags(enum css_font_style_e style, + enum css_font_variant_e variant); /** * Populate a font style using data from a computed CSS style @@ -72,7 +72,7 @@ void font_plot_style_from_css(const css_computed_style *css, * \return Plot font family */ plot_font_generic_family_t plot_font_generic_family( - enum css_font_family css) + enum css_font_family_e css) { plot_font_generic_family_t plot; @@ -104,7 +104,7 @@ plot_font_generic_family_t plot_font_generic_family( * \param css CSS font weight * \return Plot weight */ -int plot_font_weight(enum css_font_weight css) +int plot_font_weight(enum css_font_weight_e css) { int weight; @@ -151,8 +151,8 @@ int plot_font_weight(enum css_font_weight css) * \param variant CSS font variant * \return Computed plot flags */ -plot_font_flags_t plot_font_flags(enum css_font_style style, - enum css_font_variant variant) +plot_font_flags_t plot_font_flags(enum css_font_style_e style, + enum css_font_variant_e variant) { plot_font_flags_t flags = FONTF_NONE; diff --git a/render/html_redraw.c b/render/html_redraw.c index 735c241a3..4a8d72bec 100644 --- a/render/html_redraw.c +++ b/render/html_redraw.c @@ -68,7 +68,7 @@ static bool html_redraw_borders(struct box *box, int x_parent, int y_parent, bool html_redraw_inline_borders(struct box *box, int x0, int y0, int x1, int y1, float scale, bool first, bool last); static bool html_redraw_border_plot(int i, int *p, colour c, - enum css_border_style style, int thickness); + enum css_border_style_e style, int thickness); static bool html_redraw_checkbox(int x, int y, int width, int height, bool selected); static bool html_redraw_radio(int x, int y, int width, int height, @@ -1174,7 +1174,7 @@ static plot_style_t plot_style_fillbdr_dlight = { */ bool html_redraw_border_plot(int i, int *p, colour c, - enum css_border_style style, int thickness) + enum css_border_style_e style, int thickness) { int z[8]; unsigned int light = i; @@ -1839,7 +1839,7 @@ bool html_redraw_text_decoration(struct box *box, int x_parent, int y_parent, float scale, colour background_colour) { - static const enum css_text_decoration decoration[] = { + static const enum css_text_decoration_e decoration[] = { CSS_TEXT_DECORATION_UNDERLINE, CSS_TEXT_DECORATION_OVERLINE, CSS_TEXT_DECORATION_LINE_THROUGH }; static const float line_ratio[] = { 0.9, 0.1, 0.5 }; diff --git a/render/layout.c b/render/layout.c index 23b6912bb..1189c0668 100644 --- a/render/layout.c +++ b/render/layout.c @@ -80,7 +80,7 @@ static void layout_find_dimensions(int available_width, int viewport_height, int margin[4], int padding[4], struct box_border border[4]); static void layout_tweak_form_dimensions(struct box *box, bool percentage, int available_width, bool setwidth, int *dimension); -static int layout_clear(struct box *fl, enum css_clear clear); +static int layout_clear(struct box *fl, enum css_clear_e clear); static void find_sides(struct box *fl, int y0, int y1, int *x0, int *x1, struct box **left, struct box **right); static void layout_minmax_inline_container(struct box *inline_container, @@ -389,7 +389,7 @@ bool layout_block_context(struct box *block, int viewport_height, layout_block_add_scrollbar(box, BOTTOM); } } else if (box->type == BOX_TABLE) { - enum css_width wtype; + enum css_width_e wtype; css_fixed width = 0; css_unit unit = CSS_UNIT_PX; @@ -495,7 +495,7 @@ bool layout_block_context(struct box *block, int viewport_height, struct box *left, *right; y = cy; while (1) { - enum css_width wtype; + enum css_width_e wtype; css_fixed width = 0; css_unit unit = CSS_UNIT_PX; @@ -650,7 +650,7 @@ void layout_minmax_block(struct box *block, int min = 0, max = 0; int extra_fixed = 0; float extra_frac = 0; - enum css_width wtype; + enum css_width_e wtype; css_fixed width = 0; css_unit wunit = CSS_UNIT_PX; @@ -902,7 +902,7 @@ bool layout_apply_minmax_height(struct box *box, struct box *container) } if (box->style) { - enum css_height htype = CSS_HEIGHT_AUTO; + enum css_height_e htype = CSS_HEIGHT_AUTO; css_fixed length = 0; css_unit unit = CSS_UNIT_PX; @@ -983,7 +983,7 @@ bool layout_apply_minmax_height(struct box *box, struct box *container) void layout_block_add_scrollbar(struct box *box, int which) { - enum css_overflow overflow; + enum css_overflow_e overflow; assert(box->type == BOX_BLOCK && (which == RIGHT || which == BOTTOM)); @@ -1233,7 +1233,7 @@ void layout_find_dimensions(int available_width, int viewport_height, bool percentage; if (width) { - enum css_width wtype; + enum css_width_e wtype; css_fixed value = 0; css_unit unit = CSS_UNIT_PX; @@ -1262,7 +1262,7 @@ void layout_find_dimensions(int available_width, int viewport_height, } if (height) { - enum css_height htype; + enum css_height_e htype; css_fixed value = 0; css_unit unit = CSS_UNIT_PX; @@ -1270,7 +1270,7 @@ void layout_find_dimensions(int available_width, int viewport_height, if (htype == CSS_HEIGHT_SET) { if (unit == CSS_UNIT_PCT) { - enum css_height cbhtype; + enum css_height_e cbhtype; if (css_computed_position(box->style) == CSS_POSITION_ABSOLUTE) { @@ -1354,7 +1354,7 @@ void layout_find_dimensions(int available_width, int viewport_height, } if (max_width) { - enum css_max_width type; + enum css_max_width_e type; css_fixed value = 0; css_unit unit = CSS_UNIT_PX; @@ -1384,7 +1384,7 @@ void layout_find_dimensions(int available_width, int viewport_height, } if (min_width) { - enum css_min_width type; + enum css_min_width_e type; css_fixed value = 0; css_unit unit = CSS_UNIT_PX; @@ -1415,7 +1415,7 @@ void layout_find_dimensions(int available_width, int viewport_height, for (i = 0; i != 4; i++) { if (margin) { - enum css_margin type = CSS_MARGIN_AUTO;; + enum css_margin_e type = CSS_MARGIN_AUTO; css_fixed value = 0; css_unit unit = CSS_UNIT_PX; @@ -1452,7 +1452,7 @@ void layout_find_dimensions(int available_width, int viewport_height, } if (padding) { - enum css_padding type; + enum css_padding_e type; css_fixed value = 0; css_unit unit = CSS_UNIT_PX; @@ -1486,9 +1486,9 @@ void layout_find_dimensions(int available_width, int viewport_height, /* Table cell borders are populated in table.c */ if (border && box->type != BOX_TABLE_CELL) { - enum css_border_width wtype; - enum css_border_style bstyle = CSS_BORDER_STYLE_NONE; - enum css_border_color bcolor = + enum css_border_width_e wtype; + enum css_border_style_e bstyle = CSS_BORDER_STYLE_NONE; + enum css_border_color_e bcolor = CSS_BORDER_COLOR_TRANSPARENT; css_color color = 0; css_fixed value = 0; @@ -1597,7 +1597,7 @@ void layout_tweak_form_dimensions(struct box *box, bool percentage, * \return y coordinate relative to ancestor box for floats */ -int layout_clear(struct box *fl, enum css_clear clear) +int layout_clear(struct box *fl, enum css_clear_e clear) { int y = 0; for (; fl; fl = fl->next_float) { @@ -1686,7 +1686,7 @@ bool layout_inline_container(struct box *inline_container, int width, bool is_pre = false; if (c->style) { - enum css_white_space whitespace; + enum css_white_space_e whitespace; whitespace = css_computed_white_space(c->style); @@ -1768,7 +1768,7 @@ void layout_minmax_inline_container(struct box *inline_container, int line_height(const css_computed_style *style) { - enum css_line_height lhtype; + enum css_line_height_e lhtype; css_fixed lhvalue = 0; css_unit lhunit = CSS_UNIT_PX; css_fixed line_height; @@ -1872,8 +1872,8 @@ bool layout_line(struct box *first, int *width, int *y, * keep in sync with the loop in layout_minmax_line() */ LOG(("x0 %i, x1 %i, x1 - x0 %i", x0, x1, x1 - x0)); for (x = 0, b = first; x <= x1 - x0 && b != 0; b = b->next) { - enum css_width wtype; - enum css_height htype; + enum css_width_e wtype; + enum css_height_e htype; css_fixed value = 0; css_unit unit = CSS_UNIT_PX; @@ -2507,8 +2507,8 @@ struct box *layout_minmax_line(struct box *first, /* corresponds to the pass 1 loop in layout_line() */ for (b = first; b; b = b->next) { - enum css_width wtype; - enum css_height htype; + enum css_width_e wtype; + enum css_height_e htype; css_fixed value = 0; css_unit unit = CSS_UNIT_PX; @@ -2838,8 +2838,8 @@ bool layout_table(struct box *table, int available_width, struct box **row_span_cell; struct column *col; const css_computed_style *style = table->style; - enum css_width wtype; - enum css_height htype; + enum css_width_e wtype; + enum css_height_e htype; css_fixed value = 0; css_unit unit = CSS_UNIT_PX; @@ -3280,7 +3280,7 @@ bool layout_table(struct box *table, int available_width, row_group = row_group->next) { for (row = row_group->children; row; row = row->next) { for (c = row->children; c; c = c->next) { - enum css_vertical_align vertical_align; + enum css_vertical_align_e vertical_align; /* unextended bottom padding is in * c->descendant_y1, and unextended @@ -3354,7 +3354,7 @@ void layout_minmax_table(struct box *table, float extra_frac = 0; struct column *col = table->col; struct box *row_group, *row, *cell; - enum css_width wtype; + enum css_width_e wtype; css_fixed value = 0; css_unit unit = CSS_UNIT_PX; @@ -3578,7 +3578,7 @@ void calculate_mbp_width(const css_computed_style *style, unsigned int side, /* margin */ if (margin) { - enum css_margin type; + enum css_margin_e type; type = margin_funcs[side](style, &value, &unit); if (type == CSS_MARGIN_SET) { diff --git a/render/list.c b/render/list.c index 8f951a857..ff7c1c7ee 100644 --- a/render/list.c +++ b/render/list.c @@ -59,7 +59,7 @@ static const int list_counter_decimal[] = { 1, 4, 5, 9, static struct list_counter *render_list_find_counter(const char *name); static char *render_list_encode_counter(struct list_counter_state *state, - enum css_list_style_type style); + enum css_list_style_type_e style); static char *render_list_encode_roman(int value); /* @@ -292,7 +292,7 @@ char *render_list_counter(const css_computed_content_item *css_counter) { * \return a textual representation of the counter state, or NULL on failure */ static char *render_list_encode_counter(struct list_counter_state *state, - enum css_list_style_type style) { + enum css_list_style_type_e style) { char *result = NULL; int i; diff --git a/render/table.c b/render/table.c index aad3e38c2..28d08bedd 100644 --- a/render/table.c +++ b/render/table.c @@ -35,8 +35,8 @@ * Container for border values during table border calculations */ struct border { - enum css_border_style style; /**< border-style */ - enum css_border_color color; /**< border-color type */ + enum css_border_style_e style; /**< border-style */ + enum css_border_color_e color; /**< border-color type */ css_color c; /**< border-color value */ css_fixed width; /**< border-width length */ css_unit unit; /**< border-width units */ @@ -90,7 +90,7 @@ bool table_calculate_column_types(struct box *table) for (row_group = table->children; row_group; row_group =row_group->next) for (row = row_group->children; row; row = row->next) for (cell = row->children; cell; cell = cell->next) { - enum css_width type; + enum css_width_e type; css_fixed value = 0; css_unit unit = CSS_UNIT_PX; @@ -141,7 +141,7 @@ bool table_calculate_column_types(struct box *table) unsigned int fixed_columns = 0, percent_columns = 0, auto_columns = 0, unknown_columns = 0; int fixed_width = 0, percent_width = 0; - enum css_width type; + enum css_width_e type; css_fixed value = 0; css_unit unit = CSS_UNIT_PX;