8#ifndef css_select_properties_helpers_h_
9#define css_select_properties_helpers_h_
63static inline css_error css__copy_lwc_string_array(
76 copy =
malloc((count + 1) *
sizeof(*copy));
82 for (
size_t i = 0; i < count; i++) {
83 copy[i] = lwc_string_ref(orig[i]);
87 memcpy(copy, orig, (count + 1) *
sizeof(*copy));
96static inline css_error css__copy_computed_counter_array(
110 copy =
malloc((count + 1) *
sizeof(*copy));
116 for (
size_t i = 0; i < count; i++) {
117 copy[i].
name = lwc_string_ref(orig[i].
name);
121 copy[count].
value = 0;
123 memcpy(copy, orig, (count + 1) *
sizeof(*copy));
132static inline css_error css__copy_computed_content_item_array(
146 copy =
malloc((count + 1) *
sizeof(*copy));
152 for (
size_t i = 0; i < count; i++) {
153 switch (orig[i].type) {
156 orig[i].
data.string);
159 copy[i].
data.
uri = lwc_string_ref(
168 orig[i].
data.counter.name);
174 orig[i].
data.counters.name);
176 orig[i].
data.counters.sep);
187 memcpy(copy, orig, (count + 1) *
sizeof(*copy));
css_unit
Definition types.h:82
uint32_t css_color
Definition types.h:79
unsigned int uint32_t
Definition acefiex.h:163
unsigned char uint8_t
Definition acefiex.h:161
#define NULL
Definition actypes.h:561
struct drm_crtc struct drm_plane struct drm_plane const struct drm_crtc_funcs const char * name
Definition drm_crtc.h:1242
int32_t css_fixed
Definition fpmath.h:23
@ CSS_COMPUTED_CONTENT_NONE
Definition computed.h:50
@ CSS_COMPUTED_CONTENT_STRING
Definition computed.h:51
@ CSS_COMPUTED_CONTENT_COUNTERS
Definition computed.h:54
@ CSS_COMPUTED_CONTENT_COUNTER
Definition computed.h:53
@ CSS_COMPUTED_CONTENT_URI
Definition computed.h:52
@ CSS_COMPUTED_CONTENT_ATTR
Definition computed.h:55
void * data
Definition kthread.h:30
css_error
Definition errors.h:18
@ CSS_NOMEM
Definition errors.h:21
@ CSS_OK
Definition errors.h:19
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))
Definition helpers.c:311
css_error css__cascade_length(uint32_t opv, css_style *style, css_select_state *state, css_error(*fun)(css_computed_style *, uint8_t, css_fixed, css_unit))
Definition helpers.c:283
css_error css__cascade_length_normal(uint32_t opv, css_style *style, css_select_state *state, css_error(*fun)(css_computed_style *, uint8_t, css_fixed, css_unit))
Definition helpers.c:215
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_unit))
Definition helpers.c:141
css_error css__cascade_break_after_before_inside(uint32_t opv, css_style *style, css_select_state *state, css_error(*fun)(css_computed_style *, uint8_t))
Definition helpers.c:372
uint32_t generic_destroy_uri(void *bytecode)
css_error css__cascade_length_auto(uint32_t opv, css_style *style, css_select_state *state, css_error(*fun)(css_computed_style *, uint8_t, css_fixed, css_unit))
Definition helpers.c:181
uint32_t generic_destroy_color(void *bytecode)
css_error css__cascade_bg_border_color(uint32_t opv, css_style *style, css_select_state *state, css_error(*fun)(css_computed_style *, uint8_t, css_color))
Definition helpers.c:22
css_error css__cascade_uri_none(uint32_t opv, css_style *style, css_select_state *state, css_error(*fun)(css_computed_style *, uint8_t, lwc_string *))
Definition helpers.c:60
uint32_t generic_destroy_length(void *bytecode)
css_error css__cascade_counter_increment_reset(uint32_t opv, css_style *style, css_select_state *state, css_error(*fun)(css_computed_style *, uint8_t, css_computed_counter *))
Definition helpers.c:421
css_error css__cascade_length_none(uint32_t opv, css_style *style, css_select_state *state, css_error(*fun)(css_computed_style *, uint8_t, css_fixed, css_unit))
Definition helpers.c:249
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))
Definition helpers.c:335
css_error css__cascade_border_style(uint32_t opv, css_style *style, css_select_state *state, css_error(*fun)(css_computed_style *, uint8_t))
Definition helpers.c:90
uint32_t generic_destroy_number(void *bytecode)
#define malloc(s)
Definition quickjs.c:2290
union css_computed_content_item::@832 data
lwc_string * sep
Definition computed.h:74
lwc_string * string
Definition computed.h:65
uint8_t type
Definition computed.h:63
lwc_string * attr
Definition computed.h:67
lwc_string * uri
Definition computed.h:66
lwc_string * name
Definition computed.h:69
struct css_computed_content_item::@832::@834 counters
struct css_computed_content_item::@832::@833 counter
uint8_t style
Definition computed.h:70
lwc_string * name
Definition computed.h:28
css_fixed value
Definition computed.h:29
Definition autogenerated_computed.h:272
Definition stylesheet.h:29
Definition libwapcaplet.h:41