makiri 0.15.0 → 0.17.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (731) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +116 -0
  3. data/NOKOGIRI_DIFFERENCES.md +52 -48
  4. data/NOTICE +7 -0
  5. data/README.md +9 -6
  6. data/ext/makiri/rust/Cargo.toml +35 -8
  7. data/ext/makiri/rust/build.rs +74 -6
  8. data/ext/makiri/rust/extconf.rb +17 -193
  9. data/ext/makiri/rust/src/bridge/alloc.rs +115 -6
  10. data/ext/makiri/rust/src/bridge/doc.rs +51 -48
  11. data/ext/makiri/rust/src/bridge/dom.rs +107 -0
  12. data/ext/makiri/rust/src/bridge/fragment.rs +136 -108
  13. data/ext/makiri/rust/src/bridge/gvl.rs +1 -1
  14. data/ext/makiri/rust/src/bridge/html.rs +274 -247
  15. data/ext/makiri/rust/src/bridge/mod.rs +14 -8
  16. data/ext/makiri/rust/src/bridge/node_set.rs +25 -110
  17. data/ext/makiri/rust/src/bridge/raw.rs +199 -0
  18. data/ext/makiri/rust/src/bridge/ruby.rs +74 -10
  19. data/ext/makiri/rust/src/bridge/string.rs +228 -333
  20. data/ext/makiri/rust/src/bridge/typed.rs +133 -57
  21. data/ext/makiri/rust/src/bridge/wrapper.rs +248 -141
  22. data/ext/makiri/rust/src/bridge/xml.rs +46 -8
  23. data/ext/makiri/rust/src/bridge/xml_decode.rs +26 -34
  24. data/ext/makiri/rust/src/bridge/xpath/context_object.rs +3 -5
  25. data/ext/makiri/rust/src/bridge/xpath/handler.rs +7 -4
  26. data/ext/makiri/rust/src/bridge/xpath/mod.rs +10 -3
  27. data/ext/makiri/rust/src/child_index/tests.rs +407 -0
  28. data/ext/makiri/rust/src/child_index.rs +357 -0
  29. data/ext/makiri/rust/src/compat.rs +440 -0
  30. data/ext/makiri/rust/src/conformance/dat.rs +150 -0
  31. data/ext/makiri/rust/src/conformance/json.rs +278 -0
  32. data/ext/makiri/rust/src/conformance/known.rs +67 -0
  33. data/ext/makiri/rust/src/conformance/mod.rs +55 -0
  34. data/ext/makiri/rust/src/conformance/res_gen.rs +607 -0
  35. data/ext/makiri/rust/src/conformance/tokens.rs +355 -0
  36. data/ext/makiri/rust/src/conformance/tree.rs +340 -0
  37. data/ext/makiri/rust/src/css/build.rs +11 -8
  38. data/ext/makiri/rust/src/css/lower.rs +87 -97
  39. data/ext/makiri/rust/src/css/mod.rs +22 -37
  40. data/ext/makiri/rust/src/{lexbor/css_match → css_match}/compile.rs +21 -17
  41. data/ext/makiri/rust/src/css_match/dom.rs +145 -0
  42. data/ext/makiri/rust/src/{lexbor/css_match → css_match}/mod.rs +144 -63
  43. data/ext/makiri/rust/src/css_match/ns.rs +131 -0
  44. data/ext/makiri/rust/src/{lexbor/css_match → css_match}/positions.rs +79 -12
  45. data/ext/makiri/rust/src/{lexbor/css_match → css_match}/query.rs +128 -92
  46. data/ext/makiri/rust/src/{lexbor/css_match → css_match}/scratch.rs +30 -14
  47. data/ext/makiri/rust/src/{lexbor/css_match → css_match}/simple.rs +103 -52
  48. data/ext/makiri/rust/src/{lexbor/css_match → css_match}/state.rs +157 -49
  49. data/ext/makiri/rust/src/{lexbor/css_match → css_match}/tree.rs +29 -24
  50. data/ext/makiri/rust/src/dom_rules/tests.rs +32 -0
  51. data/ext/makiri/rust/src/dom_rules.rs +15 -1
  52. data/ext/makiri/rust/src/glue/css.rs +123 -4
  53. data/ext/makiri/rust/src/glue/html_doc.rs +8 -10
  54. data/ext/makiri/rust/src/glue/html_node/css.rs +42 -105
  55. data/ext/makiri/rust/src/glue/html_node/mod.rs +17 -2
  56. data/ext/makiri/rust/src/glue/html_node/mutate.rs +124 -89
  57. data/ext/makiri/rust/src/glue/html_node/read.rs +88 -62
  58. data/ext/makiri/rust/src/glue/html_node/serialize.rs +28 -21
  59. data/ext/makiri/rust/src/glue/kwargs.rs +2 -2
  60. data/ext/makiri/rust/src/glue/node.rs +44 -3
  61. data/ext/makiri/rust/src/glue/node_set.rs +13 -5
  62. data/ext/makiri/rust/src/glue/query.rs +24 -3
  63. data/ext/makiri/rust/src/glue/stylesheet.rs +19 -24
  64. data/ext/makiri/rust/src/glue/xml_node/css.rs +69 -79
  65. data/ext/makiri/rust/src/glue/xml_node/mod.rs +17 -3
  66. data/ext/makiri/rust/src/glue/xml_node/mutate.rs +10 -0
  67. data/ext/makiri/rust/src/glue/xml_node/ns.rs +7 -7
  68. data/ext/makiri/rust/src/glue/xml_node/read.rs +45 -49
  69. data/ext/makiri/rust/src/glue/xml_node/serialize.rs +4 -3
  70. data/ext/makiri/rust/src/html/dom/build.rs +64 -0
  71. data/ext/makiri/rust/src/html/dom/compact.rs +79 -0
  72. data/ext/makiri/rust/src/html/dom/conformance.rs +116 -0
  73. data/ext/makiri/rust/src/html/dom/copy.rs +252 -0
  74. data/ext/makiri/rust/src/html/dom/cross_import.rs +405 -0
  75. data/ext/makiri/rust/src/html/dom/css.rs +185 -0
  76. data/ext/makiri/rust/src/html/dom/edit.rs +700 -0
  77. data/ext/makiri/rust/src/html/dom/ext_table.rs +85 -0
  78. data/ext/makiri/rust/src/html/dom/handle.rs +982 -0
  79. data/ext/makiri/rust/src/html/dom/index.rs +232 -0
  80. data/ext/makiri/rust/src/html/dom/mod.rs +1238 -0
  81. data/ext/makiri/rust/src/html/dom/parsed.rs +198 -0
  82. data/ext/makiri/rust/src/html/dom/serialize.rs +521 -0
  83. data/ext/makiri/rust/src/html/dom/store.rs +222 -0
  84. data/ext/makiri/rust/src/html/dom/tests.rs +150 -0
  85. data/ext/makiri/rust/src/html/dom/xpath.rs +250 -0
  86. data/ext/makiri/rust/src/html/mod.rs +15 -0
  87. data/ext/makiri/rust/src/html/names.rs +548 -0
  88. data/ext/makiri/rust/src/html/res/entities.rs +12101 -0
  89. data/ext/makiri/rust/src/html/res/mod.rs +78 -0
  90. data/ext/makiri/rust/src/html/res/names.rs +802 -0
  91. data/ext/makiri/rust/src/html/res/tree.rs +504 -0
  92. data/ext/makiri/rust/src/html/tokenizer/error.rs +113 -0
  93. data/ext/makiri/rust/src/html/tokenizer/mod.rs +900 -0
  94. data/ext/makiri/rust/src/html/tokenizer/state.rs +1283 -0
  95. data/ext/makiri/rust/src/html/tokenizer/state_comment.rs +216 -0
  96. data/ext/makiri/rust/src/html/tokenizer/state_doctype.rs +568 -0
  97. data/ext/makiri/rust/src/html/tokenizer/state_text.rs +611 -0
  98. data/ext/makiri/rust/src/html/tokenizer/tests.rs +232 -0
  99. data/ext/makiri/rust/src/html/tree/actions.rs +1093 -0
  100. data/ext/makiri/rust/src/html/tree/error.rs +102 -0
  101. data/ext/makiri/rust/src/html/tree/fragment.rs +175 -0
  102. data/ext/makiri/rust/src/html/tree/guard.rs +91 -0
  103. data/ext/makiri/rust/src/html/tree/mod.rs +618 -0
  104. data/ext/makiri/rust/src/html/tree/modes/after_after_body.rs +43 -0
  105. data/ext/makiri/rust/src/html/tree/modes/after_after_frameset.rs +56 -0
  106. data/ext/makiri/rust/src/html/tree/modes/after_body.rs +47 -0
  107. data/ext/makiri/rust/src/html/tree/modes/after_frameset.rs +42 -0
  108. data/ext/makiri/rust/src/html/tree/modes/after_head.rs +107 -0
  109. data/ext/makiri/rust/src/html/tree/modes/before_head.rs +70 -0
  110. data/ext/makiri/rust/src/html/tree/modes/before_html.rs +85 -0
  111. data/ext/makiri/rust/src/html/tree/modes/foreign_content.rs +257 -0
  112. data/ext/makiri/rust/src/html/tree/modes/in_body.rs +1023 -0
  113. data/ext/makiri/rust/src/html/tree/modes/in_caption.rs +59 -0
  114. data/ext/makiri/rust/src/html/tree/modes/in_cell.rs +77 -0
  115. data/ext/makiri/rust/src/html/tree/modes/in_column_group.rs +94 -0
  116. data/ext/makiri/rust/src/html/tree/modes/in_frameset.rs +83 -0
  117. data/ext/makiri/rust/src/html/tree/modes/in_head.rs +139 -0
  118. data/ext/makiri/rust/src/html/tree/modes/in_head_noscript.rs +67 -0
  119. data/ext/makiri/rust/src/html/tree/modes/in_row.rs +87 -0
  120. data/ext/makiri/rust/src/html/tree/modes/in_table.rs +234 -0
  121. data/ext/makiri/rust/src/html/tree/modes/in_table_body.rs +104 -0
  122. data/ext/makiri/rust/src/html/tree/modes/in_table_text.rs +77 -0
  123. data/ext/makiri/rust/src/html/tree/modes/in_template.rs +66 -0
  124. data/ext/makiri/rust/src/html/tree/modes/initial.rs +185 -0
  125. data/ext/makiri/rust/src/html/tree/modes/mod.rs +25 -0
  126. data/ext/makiri/rust/src/html/tree/modes/text.rs +27 -0
  127. data/ext/makiri/rust/src/html/tree/parse.rs +183 -0
  128. data/ext/makiri/rust/src/html/tree/select.rs +701 -0
  129. data/ext/makiri/rust/src/html/tree/stacks.rs +462 -0
  130. data/ext/makiri/rust/src/html/tree/stamp.rs +113 -0
  131. data/ext/makiri/rust/src/html_dom.rs +39 -0
  132. data/ext/makiri/rust/src/init.rs +15 -4
  133. data/ext/makiri/rust/src/lexbor/abi.rs +0 -12
  134. data/ext/makiri/rust/src/lexbor/adapter/arena_copy.rs +171 -0
  135. data/ext/makiri/rust/src/lexbor/adapter/html/build.rs +19 -8
  136. data/ext/makiri/rust/src/lexbor/adapter/html/doc_mut.rs +229 -0
  137. data/ext/makiri/rust/src/lexbor/adapter/html/mod.rs +34 -95
  138. data/ext/makiri/rust/src/lexbor/adapter/html/mutate.rs +39 -5
  139. data/ext/makiri/rust/src/lexbor/adapter/mod.rs +2 -0
  140. data/ext/makiri/rust/src/lexbor/adapter/post_parse.rs +12 -75
  141. data/ext/makiri/rust/src/lexbor/adapter/source_loc.rs +2 -77
  142. data/ext/makiri/rust/src/lexbor/adapter/tree_guard.rs +17 -187
  143. data/ext/makiri/rust/src/lexbor/arena_fragment.rs +266 -0
  144. data/ext/makiri/rust/src/lexbor/arena_parse.rs +8 -0
  145. data/ext/makiri/rust/src/lexbor/arena_tests.rs +1213 -0
  146. data/ext/makiri/rust/src/lexbor/conformance_tests.rs +1196 -0
  147. data/ext/makiri/rust/src/lexbor/css_engine.rs +19 -25
  148. data/ext/makiri/rust/src/lexbor/css_parser.rs +19 -19
  149. data/ext/makiri/rust/src/lexbor/fragment.rs +75 -46
  150. data/ext/makiri/rust/src/lexbor/mod.rs +80 -15
  151. data/ext/makiri/rust/src/lexbor/res_tests.rs +448 -0
  152. data/ext/makiri/rust/src/lexbor/selector_cache.rs +111 -236
  153. data/ext/makiri/rust/src/lexbor/selector_diff.rs +157 -0
  154. data/ext/makiri/rust/src/lexbor/selector_port_tests.rs +1122 -0
  155. data/ext/makiri/rust/src/lexbor/selector_text.rs +1 -1
  156. data/ext/makiri/rust/src/lexbor/selectors.rs +1 -1
  157. data/ext/makiri/rust/src/lexbor/serialize.rs +2 -4
  158. data/ext/makiri/rust/src/lexbor/stylesheet.rs +211 -312
  159. data/ext/makiri/rust/src/lexbor/stylesheet_diff.rs +340 -0
  160. data/ext/makiri/rust/src/lexbor/tests.rs +272 -187
  161. data/ext/makiri/rust/src/lexbor/tree_diff.rs +494 -0
  162. data/ext/makiri/rust/src/lexbor/tree_port_tests.rs +914 -0
  163. data/ext/makiri/rust/src/lexbor/twin.rs +71 -0
  164. data/ext/makiri/rust/src/lexbor/xpath.rs +7 -1
  165. data/ext/makiri/rust/src/lexbor/xpath_diff.rs +507 -0
  166. data/ext/makiri/rust/src/lib.rs +42 -5
  167. data/ext/makiri/rust/src/ptr_table.rs +14 -0
  168. data/ext/makiri/rust/src/selectors/ast.rs +473 -0
  169. data/ext/makiri/rust/src/selectors/mod.rs +31 -0
  170. data/ext/makiri/rust/src/selectors/parser/syntax.rs +1101 -0
  171. data/ext/makiri/rust/src/selectors/parser.rs +2450 -0
  172. data/ext/makiri/rust/src/selectors/pseudo.rs +404 -0
  173. data/ext/makiri/rust/src/selectors/rules.rs +123 -0
  174. data/ext/makiri/rust/src/selectors/specificity.rs +88 -0
  175. data/ext/makiri/rust/src/selectors/strtod.rs +351 -0
  176. data/ext/makiri/rust/src/selectors/token.rs +72 -0
  177. data/ext/makiri/rust/src/selectors/tokenizer.rs +1456 -0
  178. data/ext/makiri/rust/src/source_lines.rs +85 -0
  179. data/ext/makiri/rust/src/token.rs +15 -0
  180. data/ext/makiri/rust/src/xml/arena.rs +1 -0
  181. data/ext/makiri/rust/src/xml/css.rs +314 -0
  182. data/ext/makiri/rust/src/xml/css_tests.rs +441 -0
  183. data/ext/makiri/rust/src/xml/index.rs +52 -3
  184. data/ext/makiri/rust/src/xml/mod.rs +3 -0
  185. data/ext/makiri/rust/src/xml/model.rs +2 -0
  186. data/ext/makiri/rust/src/xml/mutate/insert.rs +8 -0
  187. data/ext/makiri/rust/src/xml/xpath.rs +6 -0
  188. data/ext/makiri/rust/src/xpath/abi.rs +1 -0
  189. data/ext/makiri/rust/src/xpath/dom.rs +14 -3
  190. data/ext/makiri/rust/src/xpath/eval.rs +2 -0
  191. data/ext/makiri/rust/src/xpath/funcs/css_hooks.rs +208 -0
  192. data/ext/makiri/rust/src/xpath/funcs/ext.rs +2 -204
  193. data/ext/makiri/rust/src/xpath/funcs/mod.rs +42 -14
  194. data/ext/makiri/rust/src/xpath/step_index.rs +4 -2
  195. data/ext/makiri/rust/src/xpath/tests.rs +28 -18
  196. data/lib/makiri/version.rb +1 -1
  197. data/lib/makiri/xml/node_methods.rb +14 -30
  198. data/lib/makiri.rb +27 -8
  199. metadata +118 -545
  200. data/.github/workflows/ci.yml +0 -204
  201. data/.github/workflows/conformance.yml +0 -135
  202. data/.github/workflows/css-match.yml +0 -217
  203. data/.github/workflows/libfuzzer.yml +0 -116
  204. data/.github/workflows/release.yml +0 -273
  205. data/.github/workflows/security.yml +0 -305
  206. data/.github/workflows/valgrind.yml +0 -187
  207. data/.github/workflows/verify.yml +0 -71
  208. data/.gitmodules +0 -3
  209. data/Rakefile +0 -946
  210. data/ext/makiri/rust/clippy.toml +0 -67
  211. data/ext/makiri/rust/fuzz/Cargo.lock +0 -303
  212. data/ext/makiri/rust/fuzz/Cargo.toml +0 -79
  213. data/ext/makiri/rust/fuzz/build.rs +0 -7
  214. data/ext/makiri/rust/fuzz/css.dict +0 -77
  215. data/ext/makiri/rust/fuzz/fuzz_targets/common.rs +0 -80
  216. data/ext/makiri/rust/fuzz/fuzz_targets/css.rs +0 -79
  217. data/ext/makiri/rust/fuzz/fuzz_targets/html.rs +0 -24
  218. data/ext/makiri/rust/fuzz/fuzz_targets/html_css.rs +0 -104
  219. data/ext/makiri/rust/fuzz/fuzz_targets/html_css_diff.rs +0 -300
  220. data/ext/makiri/rust/fuzz/fuzz_targets/html_xpath.rs +0 -80
  221. data/ext/makiri/rust/fuzz/fuzz_targets/xml.rs +0 -17
  222. data/ext/makiri/rust/fuzz/fuzz_targets/xml_xpath.rs +0 -64
  223. data/ext/makiri/rust/fuzz/fuzz_targets/xpath.rs +0 -58
  224. data/ext/makiri/rust/src/glue/xml_node/strings.rs +0 -25
  225. data/ext/makiri/rust/src/lexbor/memory.rs +0 -78
  226. data/ext/makiri/rust/tests/alloc_inject_map_insert.rs +0 -47
  227. data/script/api_manifest.rb +0 -173
  228. data/script/build_native_gem.rb +0 -53
  229. data/script/check_alloc_failures.rb +0 -815
  230. data/script/check_leaks.rb +0 -64
  231. data/script/check_unsafe_boundaries.rb +0 -774
  232. data/script/leaks_harness.rb +0 -90
  233. data/suppressions/ruby.supp +0 -194
  234. data/tools/pe_exports.rb +0 -124
  235. data/vendor/lexbor/.travis.yml +0 -50
  236. data/vendor/lexbor/CHANGELOG.md +0 -285
  237. data/vendor/lexbor/CMakeLists.txt +0 -481
  238. data/vendor/lexbor/INSTALL.md +0 -74
  239. data/vendor/lexbor/README.md +0 -292
  240. data/vendor/lexbor/SECURITY.md +0 -18
  241. data/vendor/lexbor/config.cmake +0 -983
  242. data/vendor/lexbor/feature.cmake +0 -204
  243. data/vendor/lexbor/lexbor-config.cmake.in +0 -8
  244. data/vendor/lexbor/lexbor.pc.in +0 -12
  245. data/vendor/lexbor/pvs_studio.sh +0 -18
  246. data/vendor/lexbor/single.pl +0 -2490
  247. data/vendor/lexbor/source/lexbor/core/array.c +0 -208
  248. data/vendor/lexbor/source/lexbor/core/array.h +0 -100
  249. data/vendor/lexbor/source/lexbor/core/array_obj.c +0 -216
  250. data/vendor/lexbor/source/lexbor/core/array_obj.h +0 -134
  251. data/vendor/lexbor/source/lexbor/core/avl.c +0 -525
  252. data/vendor/lexbor/source/lexbor/core/avl.h +0 -92
  253. data/vendor/lexbor/source/lexbor/core/base.h +0 -108
  254. data/vendor/lexbor/source/lexbor/core/bst.c +0 -471
  255. data/vendor/lexbor/source/lexbor/core/bst.h +0 -108
  256. data/vendor/lexbor/source/lexbor/core/bst_map.c +0 -238
  257. data/vendor/lexbor/source/lexbor/core/bst_map.h +0 -87
  258. data/vendor/lexbor/source/lexbor/core/config.cmake +0 -20
  259. data/vendor/lexbor/source/lexbor/core/conv.c +0 -356
  260. data/vendor/lexbor/source/lexbor/core/conv.h +0 -62
  261. data/vendor/lexbor/source/lexbor/core/core.h +0 -35
  262. data/vendor/lexbor/source/lexbor/core/def.h +0 -59
  263. data/vendor/lexbor/source/lexbor/core/diyfp.c +0 -181
  264. data/vendor/lexbor/source/lexbor/core/diyfp.h +0 -285
  265. data/vendor/lexbor/source/lexbor/core/dobject.c +0 -187
  266. data/vendor/lexbor/source/lexbor/core/dobject.h +0 -88
  267. data/vendor/lexbor/source/lexbor/core/dtoa.c +0 -401
  268. data/vendor/lexbor/source/lexbor/core/dtoa.h +0 -54
  269. data/vendor/lexbor/source/lexbor/core/fs.h +0 -60
  270. data/vendor/lexbor/source/lexbor/core/hash.c +0 -477
  271. data/vendor/lexbor/source/lexbor/core/hash.h +0 -218
  272. data/vendor/lexbor/source/lexbor/core/in.c +0 -266
  273. data/vendor/lexbor/source/lexbor/core/in.h +0 -172
  274. data/vendor/lexbor/source/lexbor/core/lexbor.h +0 -43
  275. data/vendor/lexbor/source/lexbor/core/mem.c +0 -228
  276. data/vendor/lexbor/source/lexbor/core/mem.h +0 -141
  277. data/vendor/lexbor/source/lexbor/core/mraw.c +0 -421
  278. data/vendor/lexbor/source/lexbor/core/mraw.h +0 -114
  279. data/vendor/lexbor/source/lexbor/core/perf.h +0 -40
  280. data/vendor/lexbor/source/lexbor/core/plog.c +0 -73
  281. data/vendor/lexbor/source/lexbor/core/plog.h +0 -102
  282. data/vendor/lexbor/source/lexbor/core/print.c +0 -168
  283. data/vendor/lexbor/source/lexbor/core/print.h +0 -39
  284. data/vendor/lexbor/source/lexbor/core/sbst.h +0 -59
  285. data/vendor/lexbor/source/lexbor/core/serialize.c +0 -27
  286. data/vendor/lexbor/source/lexbor/core/serialize.h +0 -32
  287. data/vendor/lexbor/source/lexbor/core/shs.c +0 -118
  288. data/vendor/lexbor/source/lexbor/core/shs.h +0 -82
  289. data/vendor/lexbor/source/lexbor/core/str.c +0 -667
  290. data/vendor/lexbor/source/lexbor/core/str.h +0 -257
  291. data/vendor/lexbor/source/lexbor/core/str_res.h +0 -360
  292. data/vendor/lexbor/source/lexbor/core/strtod.c +0 -348
  293. data/vendor/lexbor/source/lexbor/core/strtod.h +0 -54
  294. data/vendor/lexbor/source/lexbor/core/swar.h +0 -97
  295. data/vendor/lexbor/source/lexbor/core/types.h +0 -39
  296. data/vendor/lexbor/source/lexbor/core/utils.c +0 -43
  297. data/vendor/lexbor/source/lexbor/core/utils.h +0 -36
  298. data/vendor/lexbor/source/lexbor/css/at_rule/const.h +0 -32
  299. data/vendor/lexbor/source/lexbor/css/at_rule/res.h +0 -49
  300. data/vendor/lexbor/source/lexbor/css/at_rule/state.c +0 -374
  301. data/vendor/lexbor/source/lexbor/css/at_rule/state.h +0 -128
  302. data/vendor/lexbor/source/lexbor/css/at_rule/types.h +0 -60
  303. data/vendor/lexbor/source/lexbor/css/at_rule.c +0 -449
  304. data/vendor/lexbor/source/lexbor/css/at_rule.h +0 -152
  305. data/vendor/lexbor/source/lexbor/css/base.h +0 -136
  306. data/vendor/lexbor/source/lexbor/css/blank.c +0 -389
  307. data/vendor/lexbor/source/lexbor/css/blank.h +0 -38
  308. data/vendor/lexbor/source/lexbor/css/config.cmake +0 -2
  309. data/vendor/lexbor/source/lexbor/css/css.c +0 -254
  310. data/vendor/lexbor/source/lexbor/css/css.h +0 -52
  311. data/vendor/lexbor/source/lexbor/css/declaration.c +0 -86
  312. data/vendor/lexbor/source/lexbor/css/declaration.h +0 -33
  313. data/vendor/lexbor/source/lexbor/css/log.c +0 -335
  314. data/vendor/lexbor/source/lexbor/css/log.h +0 -103
  315. data/vendor/lexbor/source/lexbor/css/parser.c +0 -563
  316. data/vendor/lexbor/source/lexbor/css/parser.h +0 -756
  317. data/vendor/lexbor/source/lexbor/css/property/const.h +0 -1180
  318. data/vendor/lexbor/source/lexbor/css/property/res.h +0 -524
  319. data/vendor/lexbor/source/lexbor/css/property/state.c +0 -5343
  320. data/vendor/lexbor/source/lexbor/css/property/state.h +0 -330
  321. data/vendor/lexbor/source/lexbor/css/property/types.h +0 -21
  322. data/vendor/lexbor/source/lexbor/css/property.c +0 -3171
  323. data/vendor/lexbor/source/lexbor/css/property.h +0 -1754
  324. data/vendor/lexbor/source/lexbor/css/rule.c +0 -598
  325. data/vendor/lexbor/source/lexbor/css/rule.h +0 -453
  326. data/vendor/lexbor/source/lexbor/css/selectors/base.h +0 -47
  327. data/vendor/lexbor/source/lexbor/css/selectors/pseudo.c +0 -102
  328. data/vendor/lexbor/source/lexbor/css/selectors/pseudo.h +0 -70
  329. data/vendor/lexbor/source/lexbor/css/selectors/pseudo_const.h +0 -110
  330. data/vendor/lexbor/source/lexbor/css/selectors/pseudo_res.h +0 -325
  331. data/vendor/lexbor/source/lexbor/css/selectors/pseudo_state.c +0 -429
  332. data/vendor/lexbor/source/lexbor/css/selectors/pseudo_state.h +0 -89
  333. data/vendor/lexbor/source/lexbor/css/selectors/selector.c +0 -1002
  334. data/vendor/lexbor/source/lexbor/css/selectors/selector.h +0 -283
  335. data/vendor/lexbor/source/lexbor/css/selectors/selectors.c +0 -326
  336. data/vendor/lexbor/source/lexbor/css/selectors/selectors.h +0 -123
  337. data/vendor/lexbor/source/lexbor/css/selectors/state.c +0 -2085
  338. data/vendor/lexbor/source/lexbor/css/selectors/state.h +0 -86
  339. data/vendor/lexbor/source/lexbor/css/state.c +0 -676
  340. data/vendor/lexbor/source/lexbor/css/state.h +0 -59
  341. data/vendor/lexbor/source/lexbor/css/stylesheet.c +0 -111
  342. data/vendor/lexbor/source/lexbor/css/stylesheet.h +0 -90
  343. data/vendor/lexbor/source/lexbor/css/syntax/anb.c +0 -486
  344. data/vendor/lexbor/source/lexbor/css/syntax/anb.h +0 -46
  345. data/vendor/lexbor/source/lexbor/css/syntax/base.h +0 -33
  346. data/vendor/lexbor/source/lexbor/css/syntax/parser.c +0 -2251
  347. data/vendor/lexbor/source/lexbor/css/syntax/parser.h +0 -95
  348. data/vendor/lexbor/source/lexbor/css/syntax/res.h +0 -42
  349. data/vendor/lexbor/source/lexbor/css/syntax/state.c +0 -1852
  350. data/vendor/lexbor/source/lexbor/css/syntax/state.h +0 -128
  351. data/vendor/lexbor/source/lexbor/css/syntax/state_res.h +0 -273
  352. data/vendor/lexbor/source/lexbor/css/syntax/syntax.c +0 -535
  353. data/vendor/lexbor/source/lexbor/css/syntax/syntax.h +0 -255
  354. data/vendor/lexbor/source/lexbor/css/syntax/token.c +0 -674
  355. data/vendor/lexbor/source/lexbor/css/syntax/token.h +0 -333
  356. data/vendor/lexbor/source/lexbor/css/syntax/token_res.h +0 -82
  357. data/vendor/lexbor/source/lexbor/css/syntax/tokenizer/error.c +0 -30
  358. data/vendor/lexbor/source/lexbor/css/syntax/tokenizer/error.h +0 -60
  359. data/vendor/lexbor/source/lexbor/css/syntax/tokenizer.c +0 -397
  360. data/vendor/lexbor/source/lexbor/css/syntax/tokenizer.h +0 -123
  361. data/vendor/lexbor/source/lexbor/css/unit/const.h +0 -98
  362. data/vendor/lexbor/source/lexbor/css/unit/res.h +0 -294
  363. data/vendor/lexbor/source/lexbor/css/unit.c +0 -113
  364. data/vendor/lexbor/source/lexbor/css/unit.h +0 -46
  365. data/vendor/lexbor/source/lexbor/css/value/const.h +0 -397
  366. data/vendor/lexbor/source/lexbor/css/value/res.h +0 -775
  367. data/vendor/lexbor/source/lexbor/css/value.c +0 -678
  368. data/vendor/lexbor/source/lexbor/css/value.h +0 -290
  369. data/vendor/lexbor/source/lexbor/dom/base.h +0 -32
  370. data/vendor/lexbor/source/lexbor/dom/collection.c +0 -97
  371. data/vendor/lexbor/source/lexbor/dom/collection.h +0 -112
  372. data/vendor/lexbor/source/lexbor/dom/config.cmake +0 -3
  373. data/vendor/lexbor/source/lexbor/dom/dom.h +0 -29
  374. data/vendor/lexbor/source/lexbor/dom/exception.c +0 -372
  375. data/vendor/lexbor/source/lexbor/dom/exception.h +0 -99
  376. data/vendor/lexbor/source/lexbor/dom/interface.c +0 -110
  377. data/vendor/lexbor/source/lexbor/dom/interface.h +0 -86
  378. data/vendor/lexbor/source/lexbor/dom/interfaces/attr.c +0 -534
  379. data/vendor/lexbor/source/lexbor/dom/interfaces/attr.h +0 -141
  380. data/vendor/lexbor/source/lexbor/dom/interfaces/attr_const.h +0 -99
  381. data/vendor/lexbor/source/lexbor/dom/interfaces/attr_res.h +0 -263
  382. data/vendor/lexbor/source/lexbor/dom/interfaces/cdata_section.c +0 -55
  383. data/vendor/lexbor/source/lexbor/dom/interfaces/cdata_section.h +0 -38
  384. data/vendor/lexbor/source/lexbor/dom/interfaces/character_data.c +0 -116
  385. data/vendor/lexbor/source/lexbor/dom/interfaces/character_data.h +0 -51
  386. data/vendor/lexbor/source/lexbor/dom/interfaces/comment.c +0 -64
  387. data/vendor/lexbor/source/lexbor/dom/interfaces/comment.h +0 -42
  388. data/vendor/lexbor/source/lexbor/dom/interfaces/document.c +0 -593
  389. data/vendor/lexbor/source/lexbor/dom/interfaces/document.h +0 -336
  390. data/vendor/lexbor/source/lexbor/dom/interfaces/document_fragment.c +0 -36
  391. data/vendor/lexbor/source/lexbor/dom/interfaces/document_fragment.h +0 -36
  392. data/vendor/lexbor/source/lexbor/dom/interfaces/document_type.c +0 -232
  393. data/vendor/lexbor/source/lexbor/dom/interfaces/document_type.h +0 -135
  394. data/vendor/lexbor/source/lexbor/dom/interfaces/element.c +0 -896
  395. data/vendor/lexbor/source/lexbor/dom/interfaces/element.h +0 -361
  396. data/vendor/lexbor/source/lexbor/dom/interfaces/event_target.c +0 -32
  397. data/vendor/lexbor/source/lexbor/dom/interfaces/event_target.h +0 -34
  398. data/vendor/lexbor/source/lexbor/dom/interfaces/node.c +0 -1866
  399. data/vendor/lexbor/source/lexbor/dom/interfaces/node.h +0 -396
  400. data/vendor/lexbor/source/lexbor/dom/interfaces/processing_instruction.c +0 -92
  401. data/vendor/lexbor/source/lexbor/dom/interfaces/processing_instruction.h +0 -66
  402. data/vendor/lexbor/source/lexbor/dom/interfaces/shadow_root.c +0 -36
  403. data/vendor/lexbor/source/lexbor/dom/interfaces/shadow_root.h +0 -44
  404. data/vendor/lexbor/source/lexbor/dom/interfaces/text.c +0 -63
  405. data/vendor/lexbor/source/lexbor/dom/interfaces/text.h +0 -42
  406. data/vendor/lexbor/source/lexbor/encoding/base.h +0 -218
  407. data/vendor/lexbor/source/lexbor/encoding/config.cmake +0 -12
  408. data/vendor/lexbor/source/lexbor/encoding/const.h +0 -65
  409. data/vendor/lexbor/source/lexbor/encoding/decode.c +0 -3383
  410. data/vendor/lexbor/source/lexbor/encoding/decode.h +0 -381
  411. data/vendor/lexbor/source/lexbor/encoding/encode.c +0 -2054
  412. data/vendor/lexbor/source/lexbor/encoding/encode.h +0 -380
  413. data/vendor/lexbor/source/lexbor/encoding/encoding.c +0 -413
  414. data/vendor/lexbor/source/lexbor/encoding/encoding.h +0 -462
  415. data/vendor/lexbor/source/lexbor/encoding/multi.h +0 -63
  416. data/vendor/lexbor/source/lexbor/encoding/multi_res.c +0 -298309
  417. data/vendor/lexbor/source/lexbor/encoding/range.h +0 -35
  418. data/vendor/lexbor/source/lexbor/encoding/range_res.c +0 -71
  419. data/vendor/lexbor/source/lexbor/encoding/res.c +0 -222
  420. data/vendor/lexbor/source/lexbor/encoding/res.h +0 -34
  421. data/vendor/lexbor/source/lexbor/encoding/single.h +0 -117
  422. data/vendor/lexbor/source/lexbor/encoding/single_res.c +0 -13748
  423. data/vendor/lexbor/source/lexbor/engine/base.h +0 -30
  424. data/vendor/lexbor/source/lexbor/engine/config.cmake +0 -2
  425. data/vendor/lexbor/source/lexbor/engine/engine.c +0 -294
  426. data/vendor/lexbor/source/lexbor/engine/engine.h +0 -60
  427. data/vendor/lexbor/source/lexbor/html/attribute_steps.c +0 -159
  428. data/vendor/lexbor/source/lexbor/html/attribute_steps.h +0 -49
  429. data/vendor/lexbor/source/lexbor/html/attribute_steps_res.h +0 -427
  430. data/vendor/lexbor/source/lexbor/html/base.h +0 -44
  431. data/vendor/lexbor/source/lexbor/html/common.c +0 -115
  432. data/vendor/lexbor/source/lexbor/html/common.h +0 -32
  433. data/vendor/lexbor/source/lexbor/html/config.cmake +0 -3
  434. data/vendor/lexbor/source/lexbor/html/element_steps.c +0 -220
  435. data/vendor/lexbor/source/lexbor/html/element_steps.h +0 -47
  436. data/vendor/lexbor/source/lexbor/html/element_steps_res.h +0 -427
  437. data/vendor/lexbor/source/lexbor/html/encoding.c +0 -679
  438. data/vendor/lexbor/source/lexbor/html/encoding.h +0 -243
  439. data/vendor/lexbor/source/lexbor/html/html.h +0 -109
  440. data/vendor/lexbor/source/lexbor/html/interface.c +0 -168
  441. data/vendor/lexbor/source/lexbor/html/interface.h +0 -189
  442. data/vendor/lexbor/source/lexbor/html/interface_res.h +0 -5456
  443. data/vendor/lexbor/source/lexbor/html/interfaces/anchor_element.c +0 -35
  444. data/vendor/lexbor/source/lexbor/html/interfaces/anchor_element.h +0 -34
  445. data/vendor/lexbor/source/lexbor/html/interfaces/area_element.c +0 -35
  446. data/vendor/lexbor/source/lexbor/html/interfaces/area_element.h +0 -34
  447. data/vendor/lexbor/source/lexbor/html/interfaces/audio_element.c +0 -35
  448. data/vendor/lexbor/source/lexbor/html/interfaces/audio_element.h +0 -34
  449. data/vendor/lexbor/source/lexbor/html/interfaces/base_element.c +0 -35
  450. data/vendor/lexbor/source/lexbor/html/interfaces/base_element.h +0 -34
  451. data/vendor/lexbor/source/lexbor/html/interfaces/body_element.c +0 -35
  452. data/vendor/lexbor/source/lexbor/html/interfaces/body_element.h +0 -34
  453. data/vendor/lexbor/source/lexbor/html/interfaces/br_element.c +0 -35
  454. data/vendor/lexbor/source/lexbor/html/interfaces/br_element.h +0 -34
  455. data/vendor/lexbor/source/lexbor/html/interfaces/button_element.c +0 -35
  456. data/vendor/lexbor/source/lexbor/html/interfaces/button_element.h +0 -34
  457. data/vendor/lexbor/source/lexbor/html/interfaces/canvas_element.c +0 -35
  458. data/vendor/lexbor/source/lexbor/html/interfaces/canvas_element.h +0 -34
  459. data/vendor/lexbor/source/lexbor/html/interfaces/d_list_element.c +0 -35
  460. data/vendor/lexbor/source/lexbor/html/interfaces/d_list_element.h +0 -34
  461. data/vendor/lexbor/source/lexbor/html/interfaces/data_element.c +0 -35
  462. data/vendor/lexbor/source/lexbor/html/interfaces/data_element.h +0 -34
  463. data/vendor/lexbor/source/lexbor/html/interfaces/data_list_element.c +0 -35
  464. data/vendor/lexbor/source/lexbor/html/interfaces/data_list_element.h +0 -34
  465. data/vendor/lexbor/source/lexbor/html/interfaces/details_element.c +0 -35
  466. data/vendor/lexbor/source/lexbor/html/interfaces/details_element.h +0 -34
  467. data/vendor/lexbor/source/lexbor/html/interfaces/dialog_element.c +0 -35
  468. data/vendor/lexbor/source/lexbor/html/interfaces/dialog_element.h +0 -34
  469. data/vendor/lexbor/source/lexbor/html/interfaces/directory_element.c +0 -35
  470. data/vendor/lexbor/source/lexbor/html/interfaces/directory_element.h +0 -34
  471. data/vendor/lexbor/source/lexbor/html/interfaces/div_element.c +0 -35
  472. data/vendor/lexbor/source/lexbor/html/interfaces/div_element.h +0 -34
  473. data/vendor/lexbor/source/lexbor/html/interfaces/document.c +0 -512
  474. data/vendor/lexbor/source/lexbor/html/interfaces/document.h +0 -313
  475. data/vendor/lexbor/source/lexbor/html/interfaces/element.c +0 -145
  476. data/vendor/lexbor/source/lexbor/html/interfaces/element.h +0 -137
  477. data/vendor/lexbor/source/lexbor/html/interfaces/embed_element.c +0 -35
  478. data/vendor/lexbor/source/lexbor/html/interfaces/embed_element.h +0 -34
  479. data/vendor/lexbor/source/lexbor/html/interfaces/field_set_element.c +0 -35
  480. data/vendor/lexbor/source/lexbor/html/interfaces/field_set_element.h +0 -34
  481. data/vendor/lexbor/source/lexbor/html/interfaces/font_element.c +0 -35
  482. data/vendor/lexbor/source/lexbor/html/interfaces/font_element.h +0 -34
  483. data/vendor/lexbor/source/lexbor/html/interfaces/form_element.c +0 -35
  484. data/vendor/lexbor/source/lexbor/html/interfaces/form_element.h +0 -34
  485. data/vendor/lexbor/source/lexbor/html/interfaces/frame_element.c +0 -35
  486. data/vendor/lexbor/source/lexbor/html/interfaces/frame_element.h +0 -34
  487. data/vendor/lexbor/source/lexbor/html/interfaces/frame_set_element.c +0 -35
  488. data/vendor/lexbor/source/lexbor/html/interfaces/frame_set_element.h +0 -34
  489. data/vendor/lexbor/source/lexbor/html/interfaces/head_element.c +0 -35
  490. data/vendor/lexbor/source/lexbor/html/interfaces/head_element.h +0 -34
  491. data/vendor/lexbor/source/lexbor/html/interfaces/heading_element.c +0 -35
  492. data/vendor/lexbor/source/lexbor/html/interfaces/heading_element.h +0 -34
  493. data/vendor/lexbor/source/lexbor/html/interfaces/hr_element.c +0 -35
  494. data/vendor/lexbor/source/lexbor/html/interfaces/hr_element.h +0 -34
  495. data/vendor/lexbor/source/lexbor/html/interfaces/html_element.c +0 -35
  496. data/vendor/lexbor/source/lexbor/html/interfaces/html_element.h +0 -34
  497. data/vendor/lexbor/source/lexbor/html/interfaces/iframe_element.c +0 -35
  498. data/vendor/lexbor/source/lexbor/html/interfaces/iframe_element.h +0 -34
  499. data/vendor/lexbor/source/lexbor/html/interfaces/image_element.c +0 -35
  500. data/vendor/lexbor/source/lexbor/html/interfaces/image_element.h +0 -34
  501. data/vendor/lexbor/source/lexbor/html/interfaces/input_element.c +0 -35
  502. data/vendor/lexbor/source/lexbor/html/interfaces/input_element.h +0 -34
  503. data/vendor/lexbor/source/lexbor/html/interfaces/label_element.c +0 -35
  504. data/vendor/lexbor/source/lexbor/html/interfaces/label_element.h +0 -34
  505. data/vendor/lexbor/source/lexbor/html/interfaces/legend_element.c +0 -35
  506. data/vendor/lexbor/source/lexbor/html/interfaces/legend_element.h +0 -34
  507. data/vendor/lexbor/source/lexbor/html/interfaces/li_element.c +0 -35
  508. data/vendor/lexbor/source/lexbor/html/interfaces/li_element.h +0 -34
  509. data/vendor/lexbor/source/lexbor/html/interfaces/link_element.c +0 -35
  510. data/vendor/lexbor/source/lexbor/html/interfaces/link_element.h +0 -34
  511. data/vendor/lexbor/source/lexbor/html/interfaces/map_element.c +0 -35
  512. data/vendor/lexbor/source/lexbor/html/interfaces/map_element.h +0 -34
  513. data/vendor/lexbor/source/lexbor/html/interfaces/marquee_element.c +0 -35
  514. data/vendor/lexbor/source/lexbor/html/interfaces/marquee_element.h +0 -34
  515. data/vendor/lexbor/source/lexbor/html/interfaces/media_element.c +0 -35
  516. data/vendor/lexbor/source/lexbor/html/interfaces/media_element.h +0 -34
  517. data/vendor/lexbor/source/lexbor/html/interfaces/menu_element.c +0 -35
  518. data/vendor/lexbor/source/lexbor/html/interfaces/menu_element.h +0 -34
  519. data/vendor/lexbor/source/lexbor/html/interfaces/meta_element.c +0 -35
  520. data/vendor/lexbor/source/lexbor/html/interfaces/meta_element.h +0 -34
  521. data/vendor/lexbor/source/lexbor/html/interfaces/meter_element.c +0 -35
  522. data/vendor/lexbor/source/lexbor/html/interfaces/meter_element.h +0 -34
  523. data/vendor/lexbor/source/lexbor/html/interfaces/mod_element.c +0 -35
  524. data/vendor/lexbor/source/lexbor/html/interfaces/mod_element.h +0 -34
  525. data/vendor/lexbor/source/lexbor/html/interfaces/o_list_element.c +0 -35
  526. data/vendor/lexbor/source/lexbor/html/interfaces/o_list_element.h +0 -34
  527. data/vendor/lexbor/source/lexbor/html/interfaces/object_element.c +0 -35
  528. data/vendor/lexbor/source/lexbor/html/interfaces/object_element.h +0 -34
  529. data/vendor/lexbor/source/lexbor/html/interfaces/opt_group_element.c +0 -35
  530. data/vendor/lexbor/source/lexbor/html/interfaces/opt_group_element.h +0 -34
  531. data/vendor/lexbor/source/lexbor/html/interfaces/option_element.c +0 -260
  532. data/vendor/lexbor/source/lexbor/html/interfaces/option_element.h +0 -71
  533. data/vendor/lexbor/source/lexbor/html/interfaces/output_element.c +0 -35
  534. data/vendor/lexbor/source/lexbor/html/interfaces/output_element.h +0 -34
  535. data/vendor/lexbor/source/lexbor/html/interfaces/paragraph_element.c +0 -35
  536. data/vendor/lexbor/source/lexbor/html/interfaces/paragraph_element.h +0 -34
  537. data/vendor/lexbor/source/lexbor/html/interfaces/param_element.c +0 -35
  538. data/vendor/lexbor/source/lexbor/html/interfaces/param_element.h +0 -34
  539. data/vendor/lexbor/source/lexbor/html/interfaces/picture_element.c +0 -35
  540. data/vendor/lexbor/source/lexbor/html/interfaces/picture_element.h +0 -34
  541. data/vendor/lexbor/source/lexbor/html/interfaces/pre_element.c +0 -35
  542. data/vendor/lexbor/source/lexbor/html/interfaces/pre_element.h +0 -34
  543. data/vendor/lexbor/source/lexbor/html/interfaces/progress_element.c +0 -35
  544. data/vendor/lexbor/source/lexbor/html/interfaces/progress_element.h +0 -34
  545. data/vendor/lexbor/source/lexbor/html/interfaces/quote_element.c +0 -35
  546. data/vendor/lexbor/source/lexbor/html/interfaces/quote_element.h +0 -34
  547. data/vendor/lexbor/source/lexbor/html/interfaces/script_element.c +0 -35
  548. data/vendor/lexbor/source/lexbor/html/interfaces/script_element.h +0 -34
  549. data/vendor/lexbor/source/lexbor/html/interfaces/search_element.c +0 -35
  550. data/vendor/lexbor/source/lexbor/html/interfaces/search_element.h +0 -34
  551. data/vendor/lexbor/source/lexbor/html/interfaces/select_element.c +0 -318
  552. data/vendor/lexbor/source/lexbor/html/interfaces/select_element.h +0 -52
  553. data/vendor/lexbor/source/lexbor/html/interfaces/selectedcontent_element.c +0 -110
  554. data/vendor/lexbor/source/lexbor/html/interfaces/selectedcontent_element.h +0 -45
  555. data/vendor/lexbor/source/lexbor/html/interfaces/slot_element.c +0 -35
  556. data/vendor/lexbor/source/lexbor/html/interfaces/slot_element.h +0 -34
  557. data/vendor/lexbor/source/lexbor/html/interfaces/source_element.c +0 -35
  558. data/vendor/lexbor/source/lexbor/html/interfaces/source_element.h +0 -34
  559. data/vendor/lexbor/source/lexbor/html/interfaces/span_element.c +0 -35
  560. data/vendor/lexbor/source/lexbor/html/interfaces/span_element.h +0 -34
  561. data/vendor/lexbor/source/lexbor/html/interfaces/style_element.c +0 -36
  562. data/vendor/lexbor/source/lexbor/html/interfaces/style_element.h +0 -35
  563. data/vendor/lexbor/source/lexbor/html/interfaces/table_caption_element.c +0 -35
  564. data/vendor/lexbor/source/lexbor/html/interfaces/table_caption_element.h +0 -34
  565. data/vendor/lexbor/source/lexbor/html/interfaces/table_cell_element.c +0 -35
  566. data/vendor/lexbor/source/lexbor/html/interfaces/table_cell_element.h +0 -34
  567. data/vendor/lexbor/source/lexbor/html/interfaces/table_col_element.c +0 -35
  568. data/vendor/lexbor/source/lexbor/html/interfaces/table_col_element.h +0 -34
  569. data/vendor/lexbor/source/lexbor/html/interfaces/table_element.c +0 -35
  570. data/vendor/lexbor/source/lexbor/html/interfaces/table_element.h +0 -34
  571. data/vendor/lexbor/source/lexbor/html/interfaces/table_row_element.c +0 -35
  572. data/vendor/lexbor/source/lexbor/html/interfaces/table_row_element.h +0 -34
  573. data/vendor/lexbor/source/lexbor/html/interfaces/table_section_element.c +0 -35
  574. data/vendor/lexbor/source/lexbor/html/interfaces/table_section_element.h +0 -34
  575. data/vendor/lexbor/source/lexbor/html/interfaces/template_element.c +0 -45
  576. data/vendor/lexbor/source/lexbor/html/interfaces/template_element.h +0 -38
  577. data/vendor/lexbor/source/lexbor/html/interfaces/text_area_element.c +0 -35
  578. data/vendor/lexbor/source/lexbor/html/interfaces/text_area_element.h +0 -34
  579. data/vendor/lexbor/source/lexbor/html/interfaces/time_element.c +0 -35
  580. data/vendor/lexbor/source/lexbor/html/interfaces/time_element.h +0 -34
  581. data/vendor/lexbor/source/lexbor/html/interfaces/title_element.c +0 -138
  582. data/vendor/lexbor/source/lexbor/html/interfaces/title_element.h +0 -42
  583. data/vendor/lexbor/source/lexbor/html/interfaces/track_element.c +0 -35
  584. data/vendor/lexbor/source/lexbor/html/interfaces/track_element.h +0 -34
  585. data/vendor/lexbor/source/lexbor/html/interfaces/u_list_element.c +0 -35
  586. data/vendor/lexbor/source/lexbor/html/interfaces/u_list_element.h +0 -34
  587. data/vendor/lexbor/source/lexbor/html/interfaces/unknown_element.c +0 -35
  588. data/vendor/lexbor/source/lexbor/html/interfaces/unknown_element.h +0 -34
  589. data/vendor/lexbor/source/lexbor/html/interfaces/video_element.c +0 -35
  590. data/vendor/lexbor/source/lexbor/html/interfaces/video_element.h +0 -34
  591. data/vendor/lexbor/source/lexbor/html/interfaces/window.c +0 -36
  592. data/vendor/lexbor/source/lexbor/html/interfaces/window.h +0 -34
  593. data/vendor/lexbor/source/lexbor/html/node.c +0 -14
  594. data/vendor/lexbor/source/lexbor/html/node.h +0 -73
  595. data/vendor/lexbor/source/lexbor/html/parser.c +0 -498
  596. data/vendor/lexbor/source/lexbor/html/parser.h +0 -192
  597. data/vendor/lexbor/source/lexbor/html/serialize.c +0 -2041
  598. data/vendor/lexbor/source/lexbor/html/serialize.h +0 -94
  599. data/vendor/lexbor/source/lexbor/html/serialize_ext.c +0 -2129
  600. data/vendor/lexbor/source/lexbor/html/serialize_ext.h +0 -672
  601. data/vendor/lexbor/source/lexbor/html/tag.c +0 -30
  602. data/vendor/lexbor/source/lexbor/html/tag.h +0 -83
  603. data/vendor/lexbor/source/lexbor/html/tag_res.h +0 -1912
  604. data/vendor/lexbor/source/lexbor/html/token.c +0 -388
  605. data/vendor/lexbor/source/lexbor/html/token.h +0 -147
  606. data/vendor/lexbor/source/lexbor/html/token_attr.c +0 -44
  607. data/vendor/lexbor/source/lexbor/html/token_attr.h +0 -67
  608. data/vendor/lexbor/source/lexbor/html/tokenizer/error.c +0 -106
  609. data/vendor/lexbor/source/lexbor/html/tokenizer/error.h +0 -153
  610. data/vendor/lexbor/source/lexbor/html/tokenizer/res.h +0 -4950
  611. data/vendor/lexbor/source/lexbor/html/tokenizer/state.c +0 -2582
  612. data/vendor/lexbor/source/lexbor/html/tokenizer/state.h +0 -251
  613. data/vendor/lexbor/source/lexbor/html/tokenizer/state_comment.c +0 -496
  614. data/vendor/lexbor/source/lexbor/html/tokenizer/state_comment.h +0 -27
  615. data/vendor/lexbor/source/lexbor/html/tokenizer/state_doctype.c +0 -1659
  616. data/vendor/lexbor/source/lexbor/html/tokenizer/state_doctype.h +0 -27
  617. data/vendor/lexbor/source/lexbor/html/tokenizer/state_rawtext.c +0 -303
  618. data/vendor/lexbor/source/lexbor/html/tokenizer/state_rawtext.h +0 -32
  619. data/vendor/lexbor/source/lexbor/html/tokenizer/state_rcdata.c +0 -311
  620. data/vendor/lexbor/source/lexbor/html/tokenizer/state_rcdata.h +0 -32
  621. data/vendor/lexbor/source/lexbor/html/tokenizer/state_script.c +0 -1209
  622. data/vendor/lexbor/source/lexbor/html/tokenizer/state_script.h +0 -32
  623. data/vendor/lexbor/source/lexbor/html/tokenizer.c +0 -812
  624. data/vendor/lexbor/source/lexbor/html/tokenizer.h +0 -389
  625. data/vendor/lexbor/source/lexbor/html/tree/active_formatting.c +0 -241
  626. data/vendor/lexbor/source/lexbor/html/tree/active_formatting.h +0 -117
  627. data/vendor/lexbor/source/lexbor/html/tree/error.c +0 -94
  628. data/vendor/lexbor/source/lexbor/html/tree/error.h +0 -130
  629. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/after_after_body.c +0 -73
  630. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/after_after_frameset.c +0 -74
  631. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/after_body.c +0 -93
  632. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/after_frameset.c +0 -98
  633. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/after_head.c +0 -232
  634. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/before_head.c +0 -154
  635. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/before_html.c +0 -176
  636. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/foreign_content.c +0 -384
  637. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_body.c +0 -2175
  638. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_caption.c +0 -164
  639. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_cell.c +0 -203
  640. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_column_group.c +0 -211
  641. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_frameset.c +0 -159
  642. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_head.c +0 -378
  643. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_head_noscript.c +0 -129
  644. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_row.c +0 -211
  645. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_table.c +0 -482
  646. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_table_body.c +0 -208
  647. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_table_text.c +0 -127
  648. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_template.c +0 -193
  649. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/initial.c +0 -422
  650. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/text.c +0 -70
  651. data/vendor/lexbor/source/lexbor/html/tree/insertion_mode.h +0 -127
  652. data/vendor/lexbor/source/lexbor/html/tree/open_elements.c +0 -337
  653. data/vendor/lexbor/source/lexbor/html/tree/open_elements.h +0 -101
  654. data/vendor/lexbor/source/lexbor/html/tree/open_elements_res.h +0 -427
  655. data/vendor/lexbor/source/lexbor/html/tree/template_insertion.c +0 -10
  656. data/vendor/lexbor/source/lexbor/html/tree/template_insertion.h +0 -100
  657. data/vendor/lexbor/source/lexbor/html/tree.c +0 -1764
  658. data/vendor/lexbor/source/lexbor/html/tree.h +0 -404
  659. data/vendor/lexbor/source/lexbor/html/tree_res.h +0 -111
  660. data/vendor/lexbor/source/lexbor/ns/base.h +0 -32
  661. data/vendor/lexbor/source/lexbor/ns/config.cmake +0 -2
  662. data/vendor/lexbor/source/lexbor/ns/const.h +0 -37
  663. data/vendor/lexbor/source/lexbor/ns/ns.c +0 -155
  664. data/vendor/lexbor/source/lexbor/ns/ns.h +0 -66
  665. data/vendor/lexbor/source/lexbor/ns/res.h +0 -97
  666. data/vendor/lexbor/source/lexbor/ports/posix/config.cmake +0 -15
  667. data/vendor/lexbor/source/lexbor/ports/posix/lexbor/core/fs.c +0 -236
  668. data/vendor/lexbor/source/lexbor/ports/posix/lexbor/core/memory.c +0 -53
  669. data/vendor/lexbor/source/lexbor/ports/posix/lexbor/core/perf.c +0 -214
  670. data/vendor/lexbor/source/lexbor/ports/posix/port.conf +0 -5
  671. data/vendor/lexbor/source/lexbor/ports/windows_nt/config.cmake +0 -18
  672. data/vendor/lexbor/source/lexbor/ports/windows_nt/lexbor/core/fs.c +0 -239
  673. data/vendor/lexbor/source/lexbor/ports/windows_nt/lexbor/core/memory.c +0 -53
  674. data/vendor/lexbor/source/lexbor/ports/windows_nt/lexbor/core/perf.c +0 -81
  675. data/vendor/lexbor/source/lexbor/ports/windows_nt/port.conf +0 -3
  676. data/vendor/lexbor/source/lexbor/punycode/base.h +0 -30
  677. data/vendor/lexbor/source/lexbor/punycode/config.cmake +0 -3
  678. data/vendor/lexbor/source/lexbor/punycode/punycode.c +0 -678
  679. data/vendor/lexbor/source/lexbor/punycode/punycode.h +0 -109
  680. data/vendor/lexbor/source/lexbor/selectors/base.h +0 -30
  681. data/vendor/lexbor/source/lexbor/selectors/config.cmake +0 -2
  682. data/vendor/lexbor/source/lexbor/selectors/selectors.c +0 -2378
  683. data/vendor/lexbor/source/lexbor/selectors/selectors.h +0 -282
  684. data/vendor/lexbor/source/lexbor/style/attribute_steps.c +0 -158
  685. data/vendor/lexbor/source/lexbor/style/attribute_steps.h +0 -49
  686. data/vendor/lexbor/source/lexbor/style/attribute_steps_res.h +0 -427
  687. data/vendor/lexbor/source/lexbor/style/base.h +0 -52
  688. data/vendor/lexbor/source/lexbor/style/config.cmake +0 -2
  689. data/vendor/lexbor/source/lexbor/style/dom/interfaces/document.c +0 -544
  690. data/vendor/lexbor/source/lexbor/style/dom/interfaces/document.h +0 -96
  691. data/vendor/lexbor/source/lexbor/style/dom/interfaces/element.c +0 -795
  692. data/vendor/lexbor/source/lexbor/style/dom/interfaces/element.h +0 -125
  693. data/vendor/lexbor/source/lexbor/style/element_steps.c +0 -180
  694. data/vendor/lexbor/source/lexbor/style/element_steps.h +0 -44
  695. data/vendor/lexbor/source/lexbor/style/element_steps_res.h +0 -427
  696. data/vendor/lexbor/source/lexbor/style/html/interfaces/document.c +0 -182
  697. data/vendor/lexbor/source/lexbor/style/html/interfaces/document.h +0 -214
  698. data/vendor/lexbor/source/lexbor/style/html/interfaces/element.c +0 -293
  699. data/vendor/lexbor/source/lexbor/style/html/interfaces/element.h +0 -211
  700. data/vendor/lexbor/source/lexbor/style/html/interfaces/option_element.c +0 -91
  701. data/vendor/lexbor/source/lexbor/style/html/interfaces/option_element.h +0 -49
  702. data/vendor/lexbor/source/lexbor/style/html/interfaces/style_element.c +0 -131
  703. data/vendor/lexbor/source/lexbor/style/html/interfaces/style_element.h +0 -41
  704. data/vendor/lexbor/source/lexbor/style/style.c +0 -48
  705. data/vendor/lexbor/source/lexbor/style/style.h +0 -40
  706. data/vendor/lexbor/source/lexbor/style/tree/open_elements_res.h +0 -427
  707. data/vendor/lexbor/source/lexbor/tag/base.h +0 -32
  708. data/vendor/lexbor/source/lexbor/tag/config.cmake +0 -2
  709. data/vendor/lexbor/source/lexbor/tag/const.h +0 -230
  710. data/vendor/lexbor/source/lexbor/tag/res.h +0 -568
  711. data/vendor/lexbor/source/lexbor/tag/tag.c +0 -143
  712. data/vendor/lexbor/source/lexbor/tag/tag.h +0 -121
  713. data/vendor/lexbor/source/lexbor/unicode/base.h +0 -157
  714. data/vendor/lexbor/source/lexbor/unicode/config.cmake +0 -3
  715. data/vendor/lexbor/source/lexbor/unicode/idna.c +0 -748
  716. data/vendor/lexbor/source/lexbor/unicode/idna.h +0 -264
  717. data/vendor/lexbor/source/lexbor/unicode/res.h +0 -206549
  718. data/vendor/lexbor/source/lexbor/unicode/unicode.c +0 -1039
  719. data/vendor/lexbor/source/lexbor/unicode/unicode.h +0 -405
  720. data/vendor/lexbor/source/lexbor/url/base.h +0 -32
  721. data/vendor/lexbor/source/lexbor/url/config.cmake +0 -4
  722. data/vendor/lexbor/source/lexbor/url/url.c +0 -5791
  723. data/vendor/lexbor/source/lexbor/url/url.h +0 -984
  724. data/vendor/lexbor/source/lexbor/utils/base.h +0 -32
  725. data/vendor/lexbor/source/lexbor/utils/config.cmake +0 -2
  726. data/vendor/lexbor/source/lexbor/utils/http.c +0 -555
  727. data/vendor/lexbor/source/lexbor/utils/http.h +0 -90
  728. data/vendor/lexbor/source/lexbor/utils/utils.h +0 -15
  729. data/vendor/lexbor/source/lexbor/utils/warc.c +0 -817
  730. data/vendor/lexbor/source/lexbor/utils/warc.h +0 -126
  731. data/vendor/lexbor/version +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 383a2feea9ae25aca8e66985862eb3dfbbb64682771fc4578d9f0f6c11100d43
4
- data.tar.gz: 774f2089e9b581b757cf0e142e937f892a87ccd71bb7c60f74666d9007bcac5c
3
+ metadata.gz: f0b28460a4edb95ca0dd366fe5142748c39e80b1c3d4a4f227a949531d08f106
4
+ data.tar.gz: f099573777282c714387339251261fa7aedc619a5c57be65fba4bd002fcc7b0a
5
5
  SHA512:
6
- metadata.gz: 575cdf673cf1c0f2f76bc641c978a5c946e99a19ebc9bd92d761aa23ac9e7d9a72d980120c22b7bc344a95d0236bcfff6887fc09e28836f64739ca87a18c7e8d
7
- data.tar.gz: 8b5f74af6c317ce0928c2b700d4061828621c4115685b80c3b49c47bf65f521f46431e4cf22ce064eadf0c30dc2f68611f84b3e4e4ead2b162ef5369c5544b7a
6
+ metadata.gz: 839d2291c32bd040d244e054567a214a5c5ee60be1b23f6b7c44edf3631001fb64c7fa3e7f3956818fa138ae5f011ab22824a96ef00395608d894d7aae5efeaa
7
+ data.tar.gz: c0a7ed1945f42162ad8445d7cc2fafac32f6ff3c218e0734dd1354dc80844b634a86ddf44531c24a7365c3964f4e1b26172ba635257e3c220132d2a3ee647d99
data/CHANGELOG.md CHANGED
@@ -1,5 +1,121 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased]
4
+
5
+ ## [0.17.0.rc1] - 2026-10-22
6
+
7
+ ### Added
8
+
9
+ * `Makiri::Lexbor::CSS.parse_stylesheet` returns the declarations in an
10
+ at-rule's block (`@font-face`, `@page`, ...) as its `:declarations`; they
11
+ were dropped.
12
+
13
+ ### Changed
14
+
15
+ * HTML is parsed by Makiri's own Rust port of Lexbor's tokenizer and tree
16
+ builder, into a DOM of Makiri's own, and the CSS selector and stylesheet
17
+ parsers are ported too. A parsed document takes about 40% less memory.
18
+ * Installing from source needs Rust 1.84 or newer (and libclang), and no
19
+ longer CMake: the gem carries none of Lexbor's sources, only its LICENSE
20
+ and NOTICE.
21
+ * `Makiri::XML`'s `#css`, `#at_css` and `#matches?` run on the same matcher
22
+ as HTML's and answer as a browser's `querySelectorAll` does in an XML
23
+ document, 10-20x faster on compound selectors (`.item`, `ul li.item`).
24
+ This changes some answers:
25
+ * a bare type selector (`p`) matches that name in any namespace;
26
+ * the root element's namespace declarations are no longer picked up: a
27
+ prefix must be given in the ns Hash, whose `"xmlns"` entry is the
28
+ default namespace (on HTML too);
29
+ * a selector run on a node may match through ancestors outside it
30
+ (`node.css("body p")`); only the node's descendants are returned;
31
+ * `[a=v i]`, `:nth-child(... of S)`, and the form-state and link
32
+ pseudo-classes on XHTML elements are supported;
33
+ * `||` and `:current()` raise `Makiri::CSS::SyntaxError`, and an over-long
34
+ chain `Makiri::Error` (it was `Makiri::XPath::LimitExceeded`).
35
+ * HTML `css(selector, ns)` resolves namespace prefixes: `svg|path` is the SVG
36
+ `path`, `|p` an element in no namespace, `[x|href]` the attribute in `x`'s
37
+ namespace. A prefix the Hash does not bind raises
38
+ `Makiri::CSS::SyntaxError`; prefixes used to be ignored.
39
+ * HTML parsing follows the HTML Standard where Lexbor did not. This affects
40
+ malformed or unusual markup only: `<frameset>`, `<form>` and tables inside
41
+ `<template>`, `<![CDA` or `<!` at the end of the input, the adoption
42
+ agency, `<textarea>`, `<input type=HIDDEN>` and `<image>` in a table,
43
+ `<sup>` in SVG or MathML, and a repeated attribute name (the first is
44
+ kept). Fragment parsing (`#inner_html=`, `#outer_html=`, `Node#parse`,
45
+ `context:` given an element) takes the context element's quirks mode,
46
+ namespace and ancestor `<form>` into account, as browsers do.
47
+ * CSS selectors are parsed as Selectors 4 says: `:has()` inside `:has()` and
48
+ an invalid argument to `:has()` make the selector invalid, an empty
49
+ `:is()` / `:where()` is valid and matches nothing, and `#1a` is not an ID
50
+ selector.
51
+ * `parse_stylesheet` reads names and values by one rule for every property: a
52
+ declaration name is lower-cased unless it is a custom property, an at-rule
53
+ name is lower-cased, and a value is the text as written with whitespace
54
+ runs collapsed (`color: RED` stays `RED`; it came back as `red`).
55
+ `:specificity` is counted as Selectors 4 does (`:is()` / `:not()` /
56
+ `:has()` take their most specific argument).
57
+
58
+ ### Removed
59
+
60
+ * The 10,000-`<option>` limit on a `<select>`: a select with any number of
61
+ options parses in linear time, as browsers parse it.
62
+
63
+ ### Fixed
64
+
65
+ * `parse_stylesheet` keeps a rule such as `a:hover { ... }` inside `@media`
66
+ or `@supports`; it was read as a declaration, which dropped that rule and
67
+ every one after it in the block. A comment between a declaration's name
68
+ and its `:` no longer drops the declarations that follow.
69
+ * A namespaced type selector in the middle of a compound (`.x|a`) raises
70
+ `Makiri::CSS::SyntaxError`, as browsers do.
71
+ * `:any-link` / `:link` match only an HTML `a` or `area`, or an SVG `a`, with
72
+ an `href` (`<link href>` and `<map>` matched). `:read-write` /
73
+ `:read-only` follow the HTML Standard (a checkbox is read-only, an element
74
+ inside `contenteditable` is read-write), and `:empty` ignores processing
75
+ instructions.
76
+ * HTML's `:nth-child` family counts element siblings only:
77
+ `html:first-child` matched nothing after `<!doctype html>`.
78
+ * An attribute keeps the namespace it was made in: `set_attribute_ns` in the
79
+ element's own namespace replaces the attribute it set before instead of
80
+ adding a second, and an attribute removed from its element keeps its
81
+ `namespace_uri`.
82
+ * An attribute name is serialized in the case it was set (`e["viewBox"]` on
83
+ an element in no namespace was written lower-cased).
84
+ * A void element's `#inner_html` is empty even when it has children, and a
85
+ prefixed HTML, SVG or MathML element is written by its local name.
86
+ * `Node#line` of a void element fostered out of a table is its line, not nil.
87
+ * Many namespaces created with `create_element_ns` no longer make lookups
88
+ quadratic.
89
+ * `HTML::Document#import_node` given a document raises "cannot import a
90
+ document; use #dup", as `#clone_node` does.
91
+
92
+ ## [0.16.0] - 2026-10-10
93
+
94
+ ### Added
95
+
96
+ * `Makiri::NATIVE_VERSION` and `Makiri::NATIVE_RUBY_API_VERSION`: the gem
97
+ version and Ruby `MAJOR.MINOR` the native extension was built as.
98
+ `require "makiri"` raises `LoadError` for an extension built for another
99
+ Ruby (refused by the extension itself, before it defines anything) or as
100
+ another makiri version (e.g. a stale `lib/makiri/makiri.bundle` in a
101
+ checkout).
102
+ * `Node#child_count`, `#child_at(i)`, `#element_child_count` and
103
+ `#element_child_at(i)` (HTML and XML): count and index a child list without
104
+ building `#children`. A loop over the indexes in order costs O(1) a step,
105
+ also while other lists are read in between. Any child-list edit in the
106
+ document resets that, so a loop that edits as it indexes walks from the
107
+ nearer end after each edit. `child_at` returns nil for a negative index or
108
+ one past the end.
109
+ * `Node#first_child` (an alias of `#child`) and `#last_child`.
110
+ * `Node#root_node`, DOM `getRootNode()`: the Document, a DocumentFragment, or
111
+ the top of a detached subtree. An Attr is its own root.
112
+
113
+ ### Changed
114
+
115
+ * `#local_name`, `#prefix`, `#namespace_uri` and `#tag_name` return frozen,
116
+ interned Strings: every read of one name returns the same object. `#name`
117
+ still returns a new, mutable String.
118
+
3
119
  ## [0.15.0] - 2026-10-09
4
120
 
5
121
  ### Added
@@ -149,7 +149,7 @@ what browsers do - rather than libxml2. Detailed, test-backed notes live in
149
149
  * `<?php ... ?>` in HTML input is a **ProcessingInstruction** node; `#to_html`
150
150
  writes it back as `<?php ... ?>`, and `<?` at end of input is ignored.
151
151
  * The HTML Standard added processing-instruction tokens and tree-construction
152
- rules for them; Makiri follows them through Lexbor. `Nokogiri::HTML5` (gumbo)
152
+ rules for them, and Makiri's parser follows them. `Nokogiri::HTML5` (gumbo)
153
153
  still produces the older bogus comment (`<!--?php ... ?-->`), and
154
154
  `Nokogiri::HTML` (libxml2) its own comment.
155
155
 
@@ -158,17 +158,14 @@ what browsers do - rather than libxml2. Detailed, test-backed notes live in
158
158
  Nokogiri's. `inner_html=`, `outer_html=` and `Node#parse` take no keyword.
159
159
  `Nokogiri::HTML` (libxml2) instead stops at depth 256 and returns the
160
160
  truncated document.
161
- * More than 10,000 `<option>`s in one `<select>` raise `Makiri::Error`;
162
- Nokogiri has no such limit.
163
161
 
164
162
  ## HTML mutation
165
163
 
166
164
  * There is no `Node#name=` / `#node_name=` (on HTML or XML nodes). Nokogiri
167
165
  renames a node in place and keeps its identity; the DOM has no rename, and
168
- Lexbor keeps elements such as `<template>`, `<option>` and `<style>` in
169
- structs of their own, so a node cannot change its tag safely. Create an
170
- element of the new name, move the attributes and children, and `replace`
171
- the old one (see CHANGELOG.md).
166
+ an element's tag decides what it is (a `<template>` owns its contents), so a
167
+ node cannot change its tag. Create an element of the new name, move the
168
+ attributes and children, and `replace` the old one (see CHANGELOG.md).
172
169
  * Element and attribute names follow the WHATWG DOM's rules
173
170
  * `create_element`, `[]=` and `set_attribute_ns` raise `ArgumentError` for a
174
171
  name the DOM refuses - one holding whitespace, `/`, `>` (or `=` for an
@@ -224,26 +221,19 @@ what browsers do - rather than libxml2. Detailed, test-backed notes live in
224
221
  * One exception to the DOM: an HTML attribute named `xml:lang` (in no
225
222
  namespace) becomes the XML namespace's `xml:lang`, as the XML reader reads
226
223
  that name, so XHTML-style HTML still writes as XML.
227
- * A known gap, in Lexbor's tag table: an HTML document that already holds a
228
- parsed element named with a colon (`<x:y>`, one local name) and then
229
- receives, by `import_node` from another document, a prefixed element
230
- written the same way (`x:y` from XML: prefix `x`, local name `y`) re-points
231
- the table's entry for that spelling - the parsed element then no longer
232
- matches CSS `x\:y`. Copies within one document do not touch the table.
233
224
  * An XML element with a prefix, imported into HTML, keeps it (`h:div` in
234
225
  XHTML has the local name `div`). Two readers then disagree, as they do in
235
- browsers: CSS's `div` matches it (Lexbor matches the local name), XPath's
236
- `//div` does not (an HTML element's name test reads its qualified name). And
237
- Lexbor's HTML serializer writes the prefix (`<h:div>`), where the HTML
238
- standard writes the local name, so the HTML does not re-parse to the same
239
- element.
226
+ browsers: CSS's `div` matches it (the matcher compares the local name),
227
+ XPath's `//div` does not (an HTML element's name test reads its qualified
228
+ name). `#to_html` writes the local name (`<div>`), as the HTML standard
229
+ does.
240
230
 
241
231
  ## CSS
242
232
 
243
233
  * Most jQuery/Nokogiri CSS extensions are not supported (`:gt`, `:lt`, `:eq`, `:first`, ...)
244
- * Makiri uses Lexbor's selector engine, which is standards-based apart from one
245
- text-containment extension. Use XPath (`xpath("//p[contains(., 'x')]")`) or
246
- Enumerable (`css('li')[1]`) for the rest.
234
+ * Makiri's selector engine is standards-based. Use XPath
235
+ (`xpath("//p[contains(., 'x')]")`) or Enumerable (`css('li')[1]`) for the
236
+ rest.
247
237
  Standard Level-4 selectors (`:is` / `:where` / `:has`) are supported; some of which Nokogiri rejects.
248
238
  * There is no text-containment pseudo-class. Nokogiri's `:contains()` is
249
239
  not supported, and neither is Lexbor's `:lexbor-contains()`: it raises
@@ -255,33 +245,45 @@ what browsers do - rather than libxml2. Detailed, test-backed notes live in
255
245
  selector) is supported and correct on both HTML and XML - the "type" is the
256
246
  element's own expanded name.
257
247
  * Nokogiri (XML and HTML5) mistranslates these to first-/only-child
258
- (`//*[position()=1]` / `//*[last()=1]`), so it under-matches; Makiri matches
259
- Lexbor's HTML matcher.
260
- * HTML CSS takes a `{prefix => uri}` Hash (`css(selector, ns)`) but does not
261
- resolve prefixes against it: Lexbor's matcher matches a prefixed type selector
262
- loosely, so `svg|path`, `|path` and `path` all find the SVG element whatever
263
- is bound. `Nokogiri::HTML5` honours the binding (a wrong URI finds nothing).
264
- * The Hash is accepted and unused rather than refused, so the `css(selector,
265
- ns)` a caller writes for both representations works. Use `#xpath`, where a
266
- prefix IS resolved against the bindings, when the namespace matters.
267
- * `Makiri::XML` resolves CSS prefixes properly - it lowers the selector to the
268
- XPath engine, which registers the bindings.
269
- * The same holds for attribute selectors: HTML `[|href]` (no namespace) and
270
- plain `[href]` also find an SVG `xlink:href`, which `Nokogiri::HTML5`
271
- does not.
272
- `Makiri::XML` reads `[|a]` as the no-namespace attribute.
248
+ (`//*[position()=1]` / `//*[last()=1]`), so it under-matches; Makiri does
249
+ not.
250
+ * CSS resolves a namespace prefix against the `{prefix => uri}` Hash
251
+ (`css(selector, ns)`), on HTML and XML alike: `svg|path` is the SVG `path`
252
+ once `svg` is bound, `|path` an element in no namespace, and a prefix the
253
+ Hash does not bind raises `Makiri::CSS::SyntaxError`. `[x|href]` finds the
254
+ XLink `href` once `x` is bound to XLink. The Hash's `"xmlns"` entry is the
255
+ default namespace, as CSS `@namespace` without a prefix sets one: a type or
256
+ universal selector without a prefix is then in it.
257
+ * Without a default, a bare type selector matches its name in any namespace
258
+ (`path` finds the SVG element, `entry` an Atom entry), as a browser's
259
+ `querySelectorAll` does. `Nokogiri::XML` binds a bare name to the root's
260
+ default namespace when no Hash is given, and to no namespace once one is;
261
+ pass `"xmlns" => uri` (or `"xmlns" => ""`) for that reading.
262
+ * `Makiri::XML` does not collect the document's own declarations: a prefix
263
+ is declared by the Hash or not at all. `Nokogiri::XML` collects the
264
+ root's.
265
+ * A bare `*` under a default namespace is in it, as CSS has it;
266
+ `Nokogiri::XML` matches any element.
267
+ * Up to 0.16 HTML accepted the Hash and ignored every prefix, and
268
+ `Makiri::XML` collected the root's declarations as Nokogiri does.
273
269
  * A selector under a node matches the way `Element#querySelectorAll` does in a
274
- browser, not scoped to that node, on HTML: `at_css("#c").css("div p")` finds a
275
- `p` inside `#c` when `#c` is itself a `div`, since the selector is matched
276
- against the whole document and only the results are kept to descendants.
277
- `Nokogiri::HTML5` and `Nokogiri::XML` scope the selector to the node (`#c`
278
- cannot be the `div`), and so does `Makiri::XML`, which lowers the selector to
279
- an XPath from the node. Lexbor has no `:scope`; for a scoped match on HTML,
280
- use XPath from the node (`xpath(".//div//p")`).
281
- * The attribute case modifiers (`[a="x" i]`, `[a="x" s]`): HTML supports both,
282
- through Lexbor's matcher. `Makiri::XML` accepts `s` (case-sensitive, which XML
283
- values are anyway) and refuses `i` with `Makiri::CSS::SyntaxError`. Nokogiri
284
- refuses both on either representation.
270
+ browser, not scoped to that node, on HTML and XML alike:
271
+ `at_css("#c").css("div p")` finds a `p` inside `#c` when `#c` is itself a
272
+ `div`, since the selector is matched against the whole tree and only the
273
+ results are kept to descendants. `Nokogiri::HTML5` and `Nokogiri::XML` scope
274
+ the selector to the node (`#c` cannot be the `div`), and so did
275
+ `Makiri::XML` up to 0.16. There is no `:scope`; for a scoped match, use XPath
276
+ from the node (`xpath(".//div//p")`).
277
+ * The attribute case modifiers (`[a="x" i]`, `[a="x" s]`) are supported on
278
+ both representations. Nokogiri refuses both on either.
279
+ * The form-state and link pseudo-classes (`:checked`, `:disabled`,
280
+ `:enabled`, `:required`, `:optional`, `:placeholder-shown`, `:link`, ...)
281
+ answer on `Makiri::XML` too, for XHTML elements, as browsers do in an XML
282
+ document; on any other element they match nothing. `Nokogiri::XML` refuses
283
+ them.
284
+ * A selector `Makiri` cannot run (the column combinator `||`, `:current()`)
285
+ raises `Makiri::CSS::SyntaxError`, as a browser's `querySelectorAll` throws a
286
+ SyntaxError, on both representations.
285
287
  * `#matches?` answers for a DETACHED node (`document.create_element("p")
286
288
  .matches?("p")` is true, on both representations). Nokogiri raises
287
289
  `NoMethodError` there - it implements `#matches?` as a search from
@@ -294,7 +296,9 @@ what browsers do - rather than libxml2. Detailed, test-backed notes live in
294
296
  therefore matches no type selector.
295
297
  * `Nokogiri::HTML5` is case-sensitive on HTML elements too, so `LI` does not
296
298
  match `<li>` there. `Makiri::XML`'s `#css` is case-sensitive, as XML names
297
- are.
299
+ are - an XHTML element's included, as in a browser's XML document - and so
300
+ are its attribute values, the HTML Standard's case-insensitive list of
301
+ attributes applying only to an HTML document.
298
302
 
299
303
  ## Serialization
300
304
 
data/NOTICE CHANGED
@@ -8,6 +8,13 @@ This product includes software developed by:
8
8
  Licensed under the Apache License, Version 2.0
9
9
  https://lexbor.com / https://github.com/lexbor/lexbor
10
10
 
11
+ The HTML tokenizer and tree builder under ext/makiri/rust/src/html/ and the
12
+ CSS syntax, selector and stylesheet parser under
13
+ ext/makiri/rust/src/selectors/ are Rust ports of Lexbor's, as are the HTML
14
+ CSS matcher under ext/makiri/rust/src/css_match/ and the tag and
15
+ attribute tables generated from Lexbor's. The extension links no Lexbor
16
+ code; Lexbor's LICENSE and NOTICE are kept under vendor/lexbor/ in the gem.
17
+
11
18
  The XPath 1.0 engine under ext/makiri/rust/src/xpath/ is an original
12
19
  implementation written for this project. No code is derived from libxml2 or
13
20
  libxslt.
data/README.md CHANGED
@@ -28,8 +28,7 @@ XPath 1.0 evaluation in its own native engine, with no libxml2 dependency.
28
28
  differential, and property-based testing vs Nokogiri (see below).
29
29
  * Bounded, fail-closed execution
30
30
  * XPath evaluation is bounded by per-evaluation limits on work, memory, and recursion.
31
- * HTML parsing bounds the tree depth (`max_tree_depth:`, default 400) and the
32
- `<option>`s per `<select>` (10,000).
31
+ * HTML parsing bounds the tree depth (`max_tree_depth:`, default 400).
33
32
  * Ownership and borrowing are kept explicit across layers, with owned/borrowed
34
33
  string types and verified text at engine boundaries.
35
34
  * Programmatic invalid input, limit violations, allocation failures, and unsupported constructs
@@ -109,9 +108,10 @@ el = doc.at_xpath("//a:entry", ns)
109
108
  el.local_name # => "entry"
110
109
  el.namespace_uri # => "http://www.w3.org/2005/Atom"
111
110
 
112
- # CSS selectors work too (lowered to the native XPath engine): a bare type
113
- # selector binds to the document's default namespace, so this just works.
111
+ # CSS selectors work too, as in a browser: a bare type selector matches its
112
+ # name in any namespace, so this just works.
114
113
  doc.css("entry").length # => 2
114
+ doc.css("a|entry", ns).length # => 2 (a prefix the Hash binds)
115
115
  doc.css("feed > entry").map { |e| e.at_css("title").text } # => ["Hello", "World"]
116
116
 
117
117
  # Serialize back to XML
@@ -256,10 +256,13 @@ See also [`spec/conformance/README.md`](spec/conformance/README.md).
256
256
  ## Requirements
257
257
 
258
258
  * CRuby 3.2 or newer.
259
- * A Rust toolchain (stable) with `cargo` - the extension is a Rust crate.
259
+ * Rust 1.84 or newer with `cargo` - the extension is a Rust crate. (Binary
260
+ gems are published for the common platforms, which need no toolchain.)
260
261
  * libclang (clang's development library): rb-sys runs bindgen at build time and
261
262
  reads Ruby's headers through it.
262
- * CMake and a C toolchain, to build the vendored Lexbor static library.
263
+
264
+ Development also needs CMake and a C toolchain, to build the vendored Lexbor
265
+ that the Rust port is tested against (`rake lexbor`).
263
266
 
264
267
  ## Build (development)
265
268
 
@@ -2,6 +2,11 @@
2
2
  name = "makiri_rs"
3
3
  version = "0.0.1"
4
4
  edition = "2021"
5
+ # The oldest Rust a source install builds with - what the release's
6
+ # `source-gem-install` job installs and builds on, so the declaration is
7
+ # tested. It is today's floor (1.84 brought `core::ptr::without_provenance`),
8
+ # not a promise: raise it whenever a newer feature is worth having.
9
+ rust-version = "1.84"
5
10
  publish = false
6
11
  description = "The Makiri gem's extension: HTML5 parsing, XPath 1.0 and an XML reader"
7
12
 
@@ -23,7 +28,7 @@ path = "src/lib.rs"
23
28
  # about an unexpected cfg name (and CI's `clippy -D warnings` turns that into an
24
29
  # error). The proof modules are compiled only under it.
25
30
  [lints.rust]
26
- unexpected_cfgs = { level = "warn", check-cfg = ['cfg(kani)', 'cfg(makiri_asan)'] }
31
+ unexpected_cfgs = { level = "warn", check-cfg = ['cfg(kani)', 'cfg(fuzzing)'] }
27
32
 
28
33
  # The panic gate. A panic now reaches Ruby as an exception (see the profile
29
34
  # below), but it is still an INTERNAL error nobody asked for - `rescue => e`
@@ -44,9 +49,11 @@ expect_used = "warn"
44
49
  panic = "warn"
45
50
 
46
51
  [features]
47
- # Four features. Three name a real optional dependency rather than a step of
48
- # the C port - a Ruby runtime, a vendored C library, and a test hook - and the
49
- # fourth, `css-reference`, a test reference (below).
52
+ # Seven features. Three name a real optional dependency rather than a step of
53
+ # the C port - a Ruby runtime, a vendored C library, and a test hook - three,
54
+ # `css-reference`, `lexbor-reference` and `xml-css-reference`, test
55
+ # references, and the last, `html-dom`, the HTML DOM and everything over it
56
+ # (below).
50
57
  #
51
58
  # The port's thirty-seven per-file flags are gone. They existed so one C file at
52
59
  # a time could be replaced behind an identical ABI; there is no C left to
@@ -55,15 +62,17 @@ default = ["ruby"]
55
62
 
56
63
  # The Ruby boundary: magnus, rb-sys, and everything under `bridge/`, `glue/`
57
64
  # and `init.rs`. Off, the crate is the engine alone - which is what Kani and
58
- # cargo-fuzz build, since neither can link a live Ruby.
59
- ruby = ["lexbor", "dep:magnus", "dep:rb-sys"]
65
+ # cargo-fuzz build, since neither can link a live Ruby. It needs no Lexbor:
66
+ # its HTML DOM is the arena's (`html-dom`).
67
+ ruby = ["dep:magnus", "dep:rb-sys", "html-dom"]
60
68
 
61
69
  # The vendored Lexbor: build.rs runs bindgen over its headers, so this also
62
70
  # decides whether a build needs `vendor/lexbor/dist` to exist at all. `rake
63
71
  # kani` turns it OFF deliberately - the proofs are over the XML reader and the
64
72
  # XPath front end, and not needing a Lexbor build is what lets them run without
65
- # `rake compile` first.
66
- lexbor = []
73
+ # `rake compile` first. Lexbor is only ever the reference the ports are
74
+ # tested against; the HTML DOM beside it is still the arena's.
75
+ lexbor = ["html-dom"]
67
76
 
68
77
  # Allocation-failure injection, the Rust half of `rake oom`. Off,
69
78
  # `falloc::should_fail` is a const false and the branch disappears.
@@ -74,6 +83,24 @@ alloc-inject = []
74
83
  # part of a build that ships.
75
84
  css-reference = ["lexbor"]
76
85
 
86
+ # The CSS-to-XPath lowering (`crate::css`) outside `cfg(test)`, as the
87
+ # reference the `css` fuzz harness holds the matcher's XML instance to - the
88
+ # engine `Makiri::XML`'s CSS ran on before it moved to `css_match`. No
89
+ # dependency, no Lexbor. Never part of a build that ships.
90
+ xml-css-reference = []
91
+
92
+ # Lexbor as the parser port's reference (`lexbor::tree_diff`): its tree,
93
+ # copied into the arena, beside the ported tree builder's, for the
94
+ # `html_diff` fuzz harness. Never part of a build that ships.
95
+ lexbor-reference = ["lexbor"]
96
+
97
+ # The parser port's index-arena DOM (`crate::html::dom`) behind its facade
98
+ # (`crate::html_dom`), parsed by the ported tree builder (`crate::html::tree`),
99
+ # and what sits over it: the HTML CSS matcher, XPath's HTML instance, the
100
+ # bridge's HTML half. Off only in the bare engine (Kani). `ruby` and `lexbor`
101
+ # both turn it on.
102
+ html-dom = []
103
+
77
104
  [dependencies]
78
105
  # Only the `ruby` feature needs these; the engine builds without them, which is
79
106
  # what lets Kani and cargo-fuzz compile it. `rb-sys` is magnus's own binding
@@ -41,6 +41,10 @@ fn main() {
41
41
  println!("cargo:rerun-if-changed=build.rs");
42
42
  println!("cargo:rerun-if-env-changed=MAKIRI_LEXBOR_INCLUDE");
43
43
 
44
+ if std::env::var_os("CARGO_FEATURE_RUBY").is_some() {
45
+ gem_version();
46
+ }
47
+
44
48
  // Only a build that reads Lexbor's layout pays for this. Kani builds with
45
49
  // `--no-default-features` and has no Lexbor headers to point at, which is
46
50
  // the whole reason `rake kani` needs no `rake compile` first.
@@ -240,6 +244,39 @@ fn main() {
240
244
  .allowlist_function("lxb_css_parser_status_noi")
241
245
  .allowlist_function("lxb_css_parser_memory_set_noi")
242
246
  .allowlist_function("lxb_css_parser_selectors_set_noi")
247
+ // The tokenizer on its own, for the parser conformance harness only
248
+ // (`lexbor::conformance_tests`): the html5lib tokenizer tests drive it
249
+ // from a given initial state with no tree builder behind it. Nothing
250
+ // that ships calls these, so they add declarations and no link.
251
+ .allowlist_function("lxb_html_tokenizer_create")
252
+ .allowlist_function("lxb_html_tokenizer_init")
253
+ .allowlist_function("lxb_html_tokenizer_destroy")
254
+ .allowlist_function("lxb_html_tokenizer_tags_make")
255
+ .allowlist_function("lxb_html_tokenizer_tags_destroy")
256
+ .allowlist_function("lxb_html_tokenizer_attrs_make")
257
+ .allowlist_function("lxb_html_tokenizer_attrs_destroy")
258
+ .allowlist_function("lxb_html_tokenizer_begin")
259
+ .allowlist_function("lxb_html_tokenizer_chunk")
260
+ .allowlist_function("lxb_html_tokenizer_end")
261
+ .allowlist_function("lxb_html_tokenizer_state_data_before")
262
+ .allowlist_function("lxb_html_tokenizer_state_plaintext_before")
263
+ .allowlist_function("lxb_html_tokenizer_state_rcdata_before")
264
+ .allowlist_function("lxb_html_tokenizer_state_rawtext_before")
265
+ .allowlist_function("lxb_html_tokenizer_state_script_data_before")
266
+ .allowlist_function("lxb_html_tokenizer_state_cdata_section_before")
267
+ .allowlist_function("lxb_html_token_attr_name")
268
+ .allowlist_function("lxb_tag_name_by_id_noi")
269
+ .allowlist_type("lxb_dom_attr_id_enum_t")
270
+ // Lexbor's static name tables by id, which the port's generated tables
271
+ // (`html::res`) are checked against, entry by entry.
272
+ .allowlist_function("lxb_tag_name_upper_by_id_noi")
273
+ .allowlist_function("lxb_dom_attr_data_by_id")
274
+ .allowlist_function("lxb_ns_data_by_id")
275
+ .allowlist_function("lxb_ns_prefix_data_by_id")
276
+ .allowlist_type("lxb_ns_prefix_data_t")
277
+ // The tokenizer's recorded parse errors, which the port's are compared
278
+ // with (`lexbor::conformance_tests`).
279
+ .allowlist_type("lxb_html_tokenizer_error_t")
243
280
  // The fragment parse, CHUNKED - begin/process/end rather than the
244
281
  // one-shot `lxb_html_parse_fragment*`, because only between `begin` and
245
282
  // `process` can the tree-depth guard be installed on the tokenizer
@@ -312,8 +349,6 @@ fn main() {
312
349
  .allowlist_function("lxb_selectors_find")
313
350
  .allowlist_function("lxb_selectors_match_node")
314
351
  .allowlist_function("lxb_selectors_opt_set_noi")
315
- // Lexbor's allocator hook (`lexbor::memory`).
316
- .allowlist_function("lexbor_memory_setup")
317
352
  .allowlist_type("lxb_selectors_opt_t")
318
353
  // Top-level consts, not modules: the names then match the headers
319
354
  // exactly and do not depend on bindgen's numbering of anonymous types.
@@ -358,9 +393,9 @@ fn main() {
358
393
  // of them left to keep in agreement.
359
394
  }
360
395
 
361
- /// Where the vendored Lexbor headers are. extconf builds them into
362
- /// `vendor/lexbor/dist` before it invokes cargo, so the default is that path
363
- /// relative to this crate; `MAKIRI_LEXBOR_INCLUDE` overrides it for anything
396
+ /// Where the vendored Lexbor headers are, for the reference builds that
397
+ /// read them (the `lexbor` feature). `rake lexbor` builds them into
398
+ /// `vendor/lexbor/dist`, so the default is that path relative to this crate; `MAKIRI_LEXBOR_INCLUDE` overrides it for anything
364
399
  /// that builds the crate from somewhere else.
365
400
  fn lexbor_include() -> std::path::PathBuf {
366
401
  if let Some(p) = std::env::var_os("MAKIRI_LEXBOR_INCLUDE") {
@@ -370,7 +405,7 @@ fn lexbor_include() -> std::path::PathBuf {
370
405
  let p = manifest.join("../../../vendor/lexbor/dist/include");
371
406
  if !p.join("lexbor/dom/dom.h").exists() {
372
407
  panic!(
373
- "vendored Lexbor headers not found at {} - run `bundle exec rake compile` \
408
+ "vendored Lexbor headers not found at {} - run `bundle exec rake lexbor` \
374
409
  once, or set MAKIRI_LEXBOR_INCLUDE",
375
410
  p.display()
376
411
  );
@@ -472,3 +507,36 @@ fn definition(text: &str, name: &str) -> Option<(String, String)> {
472
507
  }
473
508
  None
474
509
  }
510
+
511
+ /// Embed the gem's version (`lib/makiri/version.rb`, the one place it is
512
+ /// written) as `MAKIRI_GEM_VERSION`, which `init` publishes as
513
+ /// `Makiri::NATIVE_VERSION` for `lib/makiri.rb` to check the loaded binary
514
+ /// against. Read from the source rather than passed in by extconf, so every
515
+ /// cargo build of the extension carries it and none can carry a stale one.
516
+ fn gem_version() {
517
+ let manifest = std::path::PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap());
518
+ let path = manifest.join("../../../lib/makiri/version.rb");
519
+ println!("cargo:rerun-if-changed={}", path.display());
520
+ let source = std::fs::read_to_string(&path)
521
+ .unwrap_or_else(|e| panic!("cannot read {}: {e}", path.display()));
522
+ /* `VERSION = "x"` or `VERSION = 'x'`, a trailing `.freeze` or comment
523
+ * allowed: the literal is what is between the first quote and its match. */
524
+ let version = source
525
+ .lines()
526
+ .find_map(|line| {
527
+ let rest = line.trim().strip_prefix("VERSION")?.trim_start();
528
+ let rest = rest.strip_prefix('=')?.trim_start();
529
+ let quote = rest.chars().next().filter(|c| *c == '"' || *c == '\'')?;
530
+ let body = &rest[1..];
531
+ body.find(quote).map(|end| &body[..end])
532
+ })
533
+ .filter(|v| !v.is_empty())
534
+ .unwrap_or_else(|| {
535
+ panic!(
536
+ "build.rs reads the gem version from a `VERSION = \"x.y.z\"` line in {}, \
537
+ and found none",
538
+ path.display()
539
+ )
540
+ });
541
+ println!("cargo:rustc-env=MAKIRI_GEM_VERSION={version}");
542
+ }