Lines Matching refs:attr

39     lxb_html_token_attr_t *attr = lxb_html_token_attr_create(dobj);  in lxb_html_token_attr_append()  local
40 if (attr == NULL) { in lxb_html_token_attr_append()
45 token->attr_first = attr; in lxb_html_token_attr_append()
46 token->attr_last = attr; in lxb_html_token_attr_append()
48 return attr; in lxb_html_token_attr_append()
51 token->attr_last->next = attr; in lxb_html_token_attr_append()
52 attr->prev = token->attr_last; in lxb_html_token_attr_append()
54 token->attr_last = attr; in lxb_html_token_attr_append()
56 return attr; in lxb_html_token_attr_append()
60 lxb_html_token_attr_remove(lxb_html_token_t *token, lxb_html_token_attr_t *attr) in lxb_html_token_attr_remove() argument
62 if (token->attr_first == attr) { in lxb_html_token_attr_remove()
63 token->attr_first = attr->next; in lxb_html_token_attr_remove()
66 if (token->attr_last == attr) { in lxb_html_token_attr_remove()
67 token->attr_last = attr->prev; in lxb_html_token_attr_remove()
70 if (attr->next != NULL) { in lxb_html_token_attr_remove()
71 attr->next->prev = attr->prev; in lxb_html_token_attr_remove()
74 if (attr->prev != NULL) { in lxb_html_token_attr_remove()
75 attr->prev->next = attr->next; in lxb_html_token_attr_remove()
78 attr->next = NULL; in lxb_html_token_attr_remove()
79 attr->prev = NULL; in lxb_html_token_attr_remove()
84 lxb_html_token_attr_t *attr, lexbor_dobject_t *dobj) in lxb_html_token_attr_delete() argument
86 lxb_html_token_attr_remove(token, attr); in lxb_html_token_attr_delete()
87 lxb_html_token_attr_destroy(attr, dobj); in lxb_html_token_attr_delete()
262 lxb_html_token_attr_t *attr; in lxb_html_token_doctype_parse() local
271 attr = token->attr_first; in lxb_html_token_doctype_parse()
273 doc_type->name = attr->name->attr_id; in lxb_html_token_doctype_parse()
276 attr = attr->next; in lxb_html_token_doctype_parse()
277 if (attr == NULL) { in lxb_html_token_doctype_parse()
281 if (attr->name->attr_id == LXB_DOM_ATTR_PUBLIC) { in lxb_html_token_doctype_parse()
282 (void) lexbor_str_init(&doc_type->public_id, mraw, attr->value_size); in lxb_html_token_doctype_parse()
287 if (attr->value_begin == NULL) { in lxb_html_token_doctype_parse()
291 (void) lexbor_str_append(&doc_type->public_id, mraw, attr->value, in lxb_html_token_doctype_parse()
292 attr->value_size); in lxb_html_token_doctype_parse()
294 else if (attr->name->attr_id == LXB_DOM_ATTR_SYSTEM) { in lxb_html_token_doctype_parse()
295 (void) lexbor_str_init(&doc_type->system_id, mraw, attr->value_size); in lxb_html_token_doctype_parse()
300 if (attr->value_begin == NULL) { in lxb_html_token_doctype_parse()
304 (void) lexbor_str_append(&doc_type->system_id, mraw, attr->value, in lxb_html_token_doctype_parse()
305 attr->value_size); in lxb_html_token_doctype_parse()
314 attr = attr->next; in lxb_html_token_doctype_parse()
315 if (attr == NULL) { in lxb_html_token_doctype_parse()
319 (void) lexbor_str_init(&doc_type->system_id, mraw, attr->value_size); in lxb_html_token_doctype_parse()
324 (void) lexbor_str_append(&doc_type->system_id, mraw, attr->value, in lxb_html_token_doctype_parse()
325 attr->value_size); in lxb_html_token_doctype_parse()
355 lxb_html_token_attr_t *attr = token->attr_first; in lxb_html_token_find_attr() local
362 while (attr != NULL) { in lxb_html_token_find_attr()
363 if (attr->name->attr_id == data->attr_id) { in lxb_html_token_find_attr()
364 return attr; in lxb_html_token_find_attr()
367 attr = attr->next; in lxb_html_token_find_attr()