Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions ext/dom/lexbor/lexbor/selectors-adapted/selectors.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,16 +338,14 @@ lxb_selectors_find(lxb_selectors_t *selectors, const xmlNode *root,
const lxb_css_selector_list_t *list,
lxb_selectors_cb_f cb, void *ctx)
{
lxb_selectors_entry_t *entry;
lxb_selectors_entry_t entry = {0};
lxb_selectors_nested_t nested;

entry = lexbor_dobject_calloc(selectors->objs);

entry->combinator = LXB_CSS_SELECTOR_COMBINATOR_CLOSE;
entry->selector = list->last;
entry.combinator = LXB_CSS_SELECTOR_COMBINATOR_CLOSE;
entry.selector = list->last;

nested.parent = NULL;
nested.entry = entry;
nested.entry = &entry;
nested.cb = cb;
nested.ctx = ctx;

Expand All @@ -363,20 +361,19 @@ lxb_selectors_match_node(lxb_selectors_t *selectors, const xmlNode *node,
lxb_selectors_cb_f cb, void *ctx)
{
lxb_status_t status;
lxb_selectors_entry_t *entry;
lxb_selectors_nested_t nested;

if (!CMP_NODE_TYPE(node, XML_ELEMENT_NODE)) {
return LXB_STATUS_OK;
}

entry = lexbor_dobject_calloc(selectors->objs);
lxb_selectors_entry_t entry = {0};

entry->combinator = LXB_CSS_SELECTOR_COMBINATOR_CLOSE;
entry->selector = list->last;
entry.combinator = LXB_CSS_SELECTOR_COMBINATOR_CLOSE;
entry.selector = list->last;

nested.parent = NULL;
nested.entry = entry;
nested.entry = &entry;
nested.cb = cb;
nested.ctx = ctx;

Expand Down
Loading