@@ -125,6 +125,37 @@ lxb_html_tree_insertion_mode_in_select_optgroup(lxb_html_tree_t *tree,
125
125
return true;
126
126
}
127
127
128
+ lxb_inline bool
129
+ lxb_html_tree_insertion_mode_in_select_hr (lxb_html_tree_t * tree ,
130
+ lxb_html_token_t * token )
131
+ {
132
+ lxb_html_element_t * element ;
133
+ lxb_dom_node_t * node = lxb_html_tree_current_node (tree );
134
+
135
+ if (lxb_html_tree_node_is (node , LXB_TAG_OPTION )) {
136
+ lxb_html_tree_open_elements_pop (tree );
137
+ }
138
+
139
+ node = lxb_html_tree_current_node (tree );
140
+
141
+ if (lxb_html_tree_node_is (node , LXB_TAG_OPTGROUP )) {
142
+ lxb_html_tree_open_elements_pop (tree );
143
+ }
144
+
145
+ element = lxb_html_tree_insert_html_element (tree , token );
146
+ if (element == NULL ) {
147
+ tree -> status = LXB_STATUS_ERROR_MEMORY_ALLOCATION ;
148
+
149
+ return lxb_html_tree_process_abort (tree );
150
+ }
151
+
152
+ lxb_html_tree_open_elements_pop (tree );
153
+
154
+ lxb_html_tree_acknowledge_token_self_closing (tree , token );
155
+
156
+ return true;
157
+ }
158
+
128
159
lxb_inline bool
129
160
lxb_html_tree_insertion_mode_in_select_optgroup_closed (lxb_html_tree_t * tree ,
130
161
lxb_html_token_t * token )
@@ -319,6 +350,9 @@ lxb_html_tree_insertion_mode_in_select(lxb_html_tree_t *tree,
319
350
case LXB_TAG_OPTGROUP :
320
351
return lxb_html_tree_insertion_mode_in_select_optgroup (tree , token );
321
352
353
+ case LXB_TAG_HR :
354
+ return lxb_html_tree_insertion_mode_in_select_hr (tree , token );
355
+
322
356
case LXB_TAG_SELECT :
323
357
return lxb_html_tree_insertion_mode_in_select_select (tree , token );
324
358
0 commit comments