mirror of
https://github.com/lexborisov/Modest
synced 2024-11-24 22:59:38 +03:00
Merge pull request #69 from aygulsalahli/border_spacing
Added border spacing.
This commit is contained in:
commit
0d6e102dc6
@ -801,4 +801,16 @@ static mycss_declaration_entry_t mycss_declaration_default_entry_vertical_align
|
||||
NULL, NULL
|
||||
};
|
||||
|
||||
static mycss_declaration_entry_t mycss_declaration_default_entry_border_spacing = {
|
||||
MyCSS_PROPERTY_TYPE_BORDER_SPACING,
|
||||
MyCSS_PROPERTY_VALUE_UNDEF,
|
||||
&(mycss_values_shorthand_two_type_t){
|
||||
&(mycss_values_length_t){{0}, false, MyCSS_UNIT_TYPE_UNDEF},
|
||||
&(mycss_values_length_t){{0}, false, MyCSS_UNIT_TYPE_UNDEF},
|
||||
},
|
||||
false,
|
||||
MyCSS_DECLARATION_FLAGS_READ_ONLY,
|
||||
NULL, NULL
|
||||
};
|
||||
|
||||
#endif /* MyCSS_DECLARATION_DEFAULT_ENTRIES_H */
|
||||
|
@ -92,7 +92,7 @@ static mycss_declaration_entry_t * mycss_declaration_default_entry_index_type[My
|
||||
&mycss_declaration_default_entry_border_right_color,
|
||||
&mycss_declaration_default_entry_border_right_style,
|
||||
&mycss_declaration_default_entry_border_right_width,
|
||||
&mycss_declaration_default_entry_undef,
|
||||
&mycss_declaration_default_entry_border_spacing,
|
||||
&mycss_declaration_default_entry_undef,
|
||||
&mycss_declaration_default_entry_undef,
|
||||
&mycss_declaration_default_entry_border_top_color,
|
||||
|
@ -48,6 +48,7 @@ mycss_declaration_entry_t * mycss_declaration_entry_destroy_background_image(myc
|
||||
mycss_declaration_entry_t * mycss_declaration_entry_destroy_background_repeat(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy);
|
||||
mycss_declaration_entry_t * mycss_declaration_entry_destroy_background_position(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy);
|
||||
mycss_declaration_entry_t * mycss_declaration_entry_destroy_background_size(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy);
|
||||
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_spacing(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
@ -90,7 +90,7 @@ static mycss_callback_declaration_destroy_f mycss_declaration_entry_destroy_map_
|
||||
mycss_declaration_entry_destroy_undef,
|
||||
mycss_declaration_entry_destroy_undef,
|
||||
mycss_declaration_entry_destroy_undef,
|
||||
mycss_declaration_entry_destroy_undef,
|
||||
mycss_declaration_entry_destroy_border_spacing,
|
||||
mycss_declaration_entry_destroy_border_style,
|
||||
mycss_declaration_entry_destroy_border_x,
|
||||
mycss_declaration_entry_destroy_undef,
|
||||
|
@ -90,7 +90,7 @@ static mycss_declaration_serialization_f mycss_declaration_serialization_map_by_
|
||||
mycss_declaration_serialization_undef,
|
||||
mycss_declaration_serialization_undef,
|
||||
mycss_declaration_serialization_undef,
|
||||
mycss_declaration_serialization_undef,
|
||||
mycss_declaration_serialization_shorthand_two_type,
|
||||
mycss_declaration_serialization_shorthand_four,
|
||||
mycss_declaration_serialization_border_x,
|
||||
mycss_declaration_serialization_undef,
|
||||
|
@ -1117,6 +1117,12 @@ enum mycss_property_border_top_right_radius {
|
||||
}
|
||||
typedef mycss_property_border_top_right_radius_t;
|
||||
|
||||
enum mycss_property_border_spacing {
|
||||
MyCSS_PROPERTY_BORDER_SPACING_INHERIT = 0x0092,
|
||||
MyCSS_PROPERTY_BORDER_SPACING__LENGTH = 0x019a,
|
||||
}
|
||||
typedef mycss_property_border_spacing_t;
|
||||
|
||||
enum mycss_property_border_top_style {
|
||||
MyCSS_PROPERTY_BORDER_TOP_STYLE_NONE = 0x00d3,
|
||||
MyCSS_PROPERTY_BORDER_TOP_STYLE_SOLID = 0x013d,
|
||||
|
@ -131,6 +131,7 @@ bool mycss_property_parser_border_right(mycss_entry_t* entry, mycss_token_t* tok
|
||||
bool mycss_property_parser_border_right_color(mycss_entry_t* entry, mycss_token_t* token, bool last_response);
|
||||
bool mycss_property_parser_border_right_style(mycss_entry_t* entry, mycss_token_t* token, bool last_response);
|
||||
bool mycss_property_parser_border_right_width(mycss_entry_t* entry, mycss_token_t* token, bool last_response);
|
||||
bool mycss_property_parser_short_two_type(mycss_entry_t* entry, mycss_token_t* token);
|
||||
bool mycss_property_parser_border_spacing(mycss_entry_t* entry, mycss_token_t* token, bool last_response);
|
||||
bool mycss_property_parser_border_style(mycss_entry_t* entry, mycss_token_t* token, bool last_response);
|
||||
bool mycss_property_parser_border_top(mycss_entry_t* entry, mycss_token_t* token, bool last_response);
|
||||
|
@ -801,4 +801,17 @@ static mycss_declaration_entry_t mycss_declaration_default_entry_vertical_align
|
||||
NULL, NULL
|
||||
};
|
||||
|
||||
|
||||
static mycss_declaration_entry_t mycss_declaration_default_entry_border_spacing = {
|
||||
MyCSS_PROPERTY_TYPE_BORDER_SPACING,
|
||||
MyCSS_PROPERTY_VALUE_UNDEF,
|
||||
&(mycss_values_shorthand_two_type_t){
|
||||
&(mycss_values_length_t){{0}, false, MyCSS_UNIT_TYPE_UNDEF},
|
||||
&(mycss_values_length_t){{0}, false, MyCSS_UNIT_TYPE_UNDEF},
|
||||
},
|
||||
false,
|
||||
MyCSS_DECLARATION_FLAGS_READ_ONLY,
|
||||
NULL, NULL
|
||||
};
|
||||
|
||||
#endif /* MyCSS_DECLARATION_DEFAULT_ENTRIES_H */
|
||||
|
@ -92,7 +92,7 @@ static mycss_declaration_entry_t * mycss_declaration_default_entry_index_type[My
|
||||
&mycss_declaration_default_entry_border_right_color,
|
||||
&mycss_declaration_default_entry_border_right_style,
|
||||
&mycss_declaration_default_entry_border_right_width,
|
||||
&mycss_declaration_default_entry_undef,
|
||||
&mycss_declaration_default_entry_border_spacing,
|
||||
&mycss_declaration_default_entry_undef,
|
||||
&mycss_declaration_default_entry_undef,
|
||||
&mycss_declaration_default_entry_border_top_color,
|
||||
|
@ -215,4 +215,17 @@ mycss_declaration_entry_t * mycss_declaration_entry_destroy_background_size(mycs
|
||||
return decl_entry;
|
||||
}
|
||||
|
||||
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_spacing(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy)
|
||||
{
|
||||
decl_entry->value = mycss_values_destroy_shorthand_two_type(declaration->ref_entry, decl_entry->value, true);
|
||||
|
||||
if(self_destroy) {
|
||||
mcobject_free(declaration->mcobject_entries, decl_entry);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return decl_entry;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -40,6 +40,7 @@ mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_color(mycss_d
|
||||
mycss_declaration_entry_t * mycss_declaration_entry_destroy_font(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy);
|
||||
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_x(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy);
|
||||
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_top_right_radius(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy);
|
||||
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_spacing(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy);
|
||||
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_top_left_radius(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy);
|
||||
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_bottom_right_radius(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy);
|
||||
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_bottom_left_radius(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy);
|
||||
|
@ -90,7 +90,7 @@ static mycss_callback_declaration_destroy_f mycss_declaration_entry_destroy_map_
|
||||
mycss_declaration_entry_destroy_undef,
|
||||
mycss_declaration_entry_destroy_undef,
|
||||
mycss_declaration_entry_destroy_undef,
|
||||
mycss_declaration_entry_destroy_undef,
|
||||
mycss_declaration_entry_destroy_border_spacing,
|
||||
mycss_declaration_entry_destroy_border_style,
|
||||
mycss_declaration_entry_destroy_border_x,
|
||||
mycss_declaration_entry_destroy_undef,
|
||||
|
@ -90,7 +90,7 @@ static mycss_declaration_serialization_f mycss_declaration_serialization_map_by_
|
||||
mycss_declaration_serialization_undef,
|
||||
mycss_declaration_serialization_undef,
|
||||
mycss_declaration_serialization_undef,
|
||||
mycss_declaration_serialization_undef,
|
||||
mycss_declaration_serialization_shorthand_two_type,
|
||||
mycss_declaration_serialization_shorthand_four,
|
||||
mycss_declaration_serialization_border_x,
|
||||
mycss_declaration_serialization_undef,
|
||||
|
@ -1033,7 +1033,7 @@ bool mycss_property_parser_border_radius(mycss_entry_t* entry, mycss_token_t* to
|
||||
return mycss_property_parser_destroy_string(&str, mycss_property_shared_switch_to_parse_error(entry));
|
||||
}
|
||||
|
||||
bool mycss_property_parser_border_top_right_radius(mycss_entry_t* entry, mycss_token_t* token, bool last_response)
|
||||
bool mycss_property_parser_short_two_type(mycss_entry_t* entry, mycss_token_t* token)
|
||||
{
|
||||
if(token->type == MyCSS_TOKEN_TYPE_WHITESPACE)
|
||||
return true;
|
||||
@ -1075,6 +1075,11 @@ bool mycss_property_parser_border_top_right_radius(mycss_entry_t* entry, mycss_t
|
||||
return mycss_property_parser_destroy_string(&str, mycss_property_shared_switch_to_parse_error(entry));
|
||||
}
|
||||
|
||||
bool mycss_property_parser_border_top_right_radius(mycss_entry_t* entry, mycss_token_t* token, bool last_response)
|
||||
{
|
||||
return mycss_property_parser_short_two_type(entry, token);
|
||||
}
|
||||
|
||||
bool mycss_property_parser_border_top_left_radius(mycss_entry_t* entry, mycss_token_t* token, bool last_response)
|
||||
{
|
||||
return mycss_property_parser_border_top_right_radius(entry, token, last_response);
|
||||
@ -2838,7 +2843,7 @@ bool mycss_property_parser_border_image_width(mycss_entry_t* entry, mycss_token_
|
||||
|
||||
bool mycss_property_parser_border_spacing(mycss_entry_t* entry, mycss_token_t* token, bool last_response)
|
||||
{
|
||||
return mycss_property_shared_switch_to_parse_error(entry);
|
||||
return mycss_property_parser_short_two_type(entry, token);
|
||||
}
|
||||
|
||||
bool mycss_property_parser_box_decoration_break(mycss_entry_t* entry, mycss_token_t* token, bool last_response)
|
||||
|
@ -161,7 +161,7 @@ zoom-in | zoom-out | inherit | initial | unset" initial="auto" default="cursor">
|
||||
<!-- https://drafts.csswg.org/css-tables-3/#propdef-border-collapse -->
|
||||
<property name="border-collapse" value="separate | collapse" initial="separate"></property>
|
||||
<!-- https://drafts.csswg.org/css-tables-3/#propdef-border-spacing -->
|
||||
<property name="border-spacing" value="" initial="0px 0px"></property>
|
||||
<property name="border-spacing" value="<length> | inherit | initial | unset" initial="0px 0px" serialize="shorthand_two_type" destroy="border_spacing" default="border_spacing"></property>
|
||||
<!-- https://drafts.csswg.org/css-tables-3/#propdef-caption-side -->
|
||||
<property name="caption-side" value="top | bottom" initial="top"></property>
|
||||
<!-- https://drafts.csswg.org/css-tables-3/#propdef-empty-cells -->
|
||||
|
Loading…
Reference in New Issue
Block a user