makiri 0.16.0 → 0.17.0.rc2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +206 -0
- data/NOKOGIRI_DIFFERENCES.md +95 -53
- data/NOTICE +51 -0
- data/README.md +36 -19
- data/ext/makiri/rust/Cargo.lock +22 -0
- data/ext/makiri/rust/Cargo.toml +43 -8
- data/ext/makiri/rust/build.rs +39 -7
- data/ext/makiri/rust/extconf.rb +17 -193
- data/ext/makiri/rust/src/bridge/alloc.rs +123 -8
- data/ext/makiri/rust/src/bridge/build.rs +61 -0
- data/ext/makiri/rust/src/bridge/doc.rs +91 -81
- data/ext/makiri/rust/src/bridge/dom.rs +157 -0
- data/ext/makiri/rust/src/bridge/fragment.rs +139 -128
- data/ext/makiri/rust/src/bridge/gvl.rs +5 -26
- data/ext/makiri/rust/src/bridge/html.rs +457 -348
- data/ext/makiri/rust/src/bridge/mod.rs +19 -10
- data/ext/makiri/rust/src/bridge/node_set.rs +238 -157
- data/ext/makiri/rust/src/bridge/raw.rs +504 -0
- data/ext/makiri/rust/src/bridge/ruby.rs +119 -200
- data/ext/makiri/rust/src/bridge/string/build.rs +120 -0
- data/ext/makiri/rust/src/bridge/string/encoding.rs +246 -0
- data/ext/makiri/rust/src/bridge/string/mod.rs +35 -0
- data/ext/makiri/rust/src/bridge/string/source.rs +150 -0
- data/ext/makiri/rust/src/bridge/string/view.rs +395 -0
- data/ext/makiri/rust/src/bridge/typed.rs +363 -96
- data/ext/makiri/rust/src/bridge/wrapper/accounting.rs +90 -0
- data/ext/makiri/rust/src/bridge/wrapper/document.rs +678 -0
- data/ext/makiri/rust/src/bridge/wrapper/edit.rs +131 -0
- data/ext/makiri/rust/src/bridge/wrapper/mod.rs +18 -0
- data/ext/makiri/rust/src/bridge/wrapper/node.rs +325 -0
- data/ext/makiri/rust/src/bridge/xml.rs +229 -159
- data/ext/makiri/rust/src/bridge/xml_decode.rs +76 -72
- data/ext/makiri/rust/src/bridge/xpath/context_object.rs +111 -133
- data/ext/makiri/rust/src/bridge/xpath/mod.rs +76 -190
- data/ext/makiri/rust/src/cbuf/verify.rs +37 -247
- data/ext/makiri/rust/src/cbuf.rs +231 -238
- data/ext/makiri/rust/src/child_index/tests.rs +1 -0
- data/ext/makiri/rust/src/child_index.rs +13 -3
- data/ext/makiri/rust/src/compat.rs +458 -0
- data/ext/makiri/rust/src/conformance/dat.rs +150 -0
- data/ext/makiri/rust/src/conformance/json.rs +278 -0
- data/ext/makiri/rust/src/conformance/known.rs +67 -0
- data/ext/makiri/rust/src/conformance/mod.rs +55 -0
- data/ext/makiri/rust/src/conformance/res_gen.rs +609 -0
- data/ext/makiri/rust/src/conformance/tokens.rs +355 -0
- data/ext/makiri/rust/src/conformance/tree.rs +340 -0
- data/ext/makiri/rust/src/css/build.rs +12 -9
- data/ext/makiri/rust/src/css/lower.rs +87 -97
- data/ext/makiri/rust/src/css/mod.rs +28 -43
- data/ext/makiri/rust/src/css_cache.rs +399 -0
- data/ext/makiri/rust/src/{lexbor/css_match → css_match}/compile.rs +171 -23
- data/ext/makiri/rust/src/css_match/dom.rs +145 -0
- data/ext/makiri/rust/src/{lexbor/css_match → css_match}/mod.rs +197 -99
- data/ext/makiri/rust/src/css_match/ns.rs +147 -0
- data/ext/makiri/rust/src/css_match/nth_of.rs +168 -0
- data/ext/makiri/rust/src/css_match/plan.rs +97 -0
- data/ext/makiri/rust/src/{lexbor/css_match → css_match}/positions.rs +54 -95
- data/ext/makiri/rust/src/{lexbor/css_match → css_match}/query.rs +112 -154
- data/ext/makiri/rust/src/{lexbor/css_match → css_match}/scratch.rs +38 -18
- data/ext/makiri/rust/src/{lexbor/css_match → css_match}/simple.rs +104 -54
- data/ext/makiri/rust/src/{lexbor/css_match → css_match}/state.rs +157 -49
- data/ext/makiri/rust/src/{lexbor/css_match → css_match}/tree.rs +29 -24
- data/ext/makiri/rust/src/doc_cell.rs +177 -0
- data/ext/makiri/rust/src/dom_rules/tests.rs +1 -0
- data/ext/makiri/rust/src/dom_rules.rs +46 -0
- data/ext/makiri/rust/src/falloc/inject.rs +72 -20
- data/ext/makiri/rust/src/falloc/mod.rs +232 -52
- data/ext/makiri/rust/src/glue/css.rs +120 -4
- data/ext/makiri/rust/src/glue/hash.rs +6 -8
- data/ext/makiri/rust/src/glue/html_doc.rs +78 -28
- data/ext/makiri/rust/src/glue/html_node/css.rs +57 -118
- data/ext/makiri/rust/src/glue/html_node/mod.rs +1 -0
- data/ext/makiri/rust/src/glue/html_node/mutate.rs +181 -142
- data/ext/makiri/rust/src/glue/html_node/read.rs +224 -198
- data/ext/makiri/rust/src/glue/html_node/serialize.rs +39 -21
- data/ext/makiri/rust/src/glue/kwargs.rs +21 -13
- data/ext/makiri/rust/src/glue/mod.rs +7 -6
- data/ext/makiri/rust/src/glue/node.rs +56 -16
- data/ext/makiri/rust/src/glue/node_set.rs +21 -12
- data/ext/makiri/rust/src/glue/query.rs +57 -53
- data/ext/makiri/rust/src/glue/stylesheet.rs +90 -82
- data/ext/makiri/rust/src/glue/xml_doc.rs +8 -17
- data/ext/makiri/rust/src/glue/xml_node/css.rs +71 -79
- data/ext/makiri/rust/src/glue/xml_node/mod.rs +3 -1
- data/ext/makiri/rust/src/glue/xml_node/mutate.rs +52 -43
- data/ext/makiri/rust/src/glue/xml_node/ns.rs +51 -30
- data/ext/makiri/rust/src/glue/xml_node/read.rs +136 -121
- data/ext/makiri/rust/src/glue/xml_node/serialize.rs +17 -16
- data/ext/makiri/rust/src/glue/xpath_context.rs +15 -20
- data/ext/makiri/rust/src/gvl.rs +76 -59
- data/ext/makiri/rust/src/html/dom/build.rs +64 -0
- data/ext/makiri/rust/src/html/dom/compact.rs +79 -0
- data/ext/makiri/rust/src/html/dom/conformance.rs +116 -0
- data/ext/makiri/rust/src/html/dom/copy.rs +252 -0
- data/ext/makiri/rust/src/{lexbor/adapter → html/dom}/cross_import.rs +86 -110
- data/ext/makiri/rust/src/html/dom/css.rs +185 -0
- data/ext/makiri/rust/src/html/dom/edit.rs +726 -0
- data/ext/makiri/rust/src/html/dom/ext_table.rs +85 -0
- data/ext/makiri/rust/src/html/dom/handle.rs +982 -0
- data/ext/makiri/rust/src/html/dom/index.rs +292 -0
- data/ext/makiri/rust/src/html/dom/mod.rs +1274 -0
- data/ext/makiri/rust/src/html/dom/parsed.rs +277 -0
- data/ext/makiri/rust/src/html/dom/serialize.rs +521 -0
- data/ext/makiri/rust/src/html/dom/store.rs +234 -0
- data/ext/makiri/rust/src/html/dom/tests.rs +150 -0
- data/ext/makiri/rust/src/{lexbor → html/dom}/xpath.rs +67 -115
- data/ext/makiri/rust/src/html/encoding/mod.rs +522 -0
- data/ext/makiri/rust/src/html/encoding/prescan.rs +249 -0
- data/ext/makiri/rust/src/html/fragment.rs +266 -0
- data/ext/makiri/rust/src/html/mod.rs +18 -0
- data/ext/makiri/rust/src/html/names.rs +555 -0
- data/ext/makiri/rust/src/html/res/entities.rs +12101 -0
- data/ext/makiri/rust/src/html/res/mod.rs +78 -0
- data/ext/makiri/rust/src/html/res/names.rs +802 -0
- data/ext/makiri/rust/src/html/res/tree.rs +504 -0
- data/ext/makiri/rust/src/html/tokenizer/error.rs +113 -0
- data/ext/makiri/rust/src/html/tokenizer/mod.rs +898 -0
- data/ext/makiri/rust/src/html/tokenizer/state.rs +1281 -0
- data/ext/makiri/rust/src/html/tokenizer/state_comment.rs +216 -0
- data/ext/makiri/rust/src/html/tokenizer/state_doctype.rs +568 -0
- data/ext/makiri/rust/src/html/tokenizer/state_text.rs +611 -0
- data/ext/makiri/rust/src/html/tokenizer/tests.rs +232 -0
- data/ext/makiri/rust/src/html/tree/actions.rs +1093 -0
- data/ext/makiri/rust/src/html/tree/document_bytes.rs +95 -0
- data/ext/makiri/rust/src/html/tree/error.rs +102 -0
- data/ext/makiri/rust/src/html/tree/fragment.rs +194 -0
- data/ext/makiri/rust/src/html/tree/guard.rs +91 -0
- data/ext/makiri/rust/src/html/tree/mod.rs +701 -0
- data/ext/makiri/rust/src/html/tree/modes/after_after_body.rs +43 -0
- data/ext/makiri/rust/src/html/tree/modes/after_after_frameset.rs +56 -0
- data/ext/makiri/rust/src/html/tree/modes/after_body.rs +47 -0
- data/ext/makiri/rust/src/html/tree/modes/after_frameset.rs +42 -0
- data/ext/makiri/rust/src/html/tree/modes/after_head.rs +107 -0
- data/ext/makiri/rust/src/html/tree/modes/before_head.rs +70 -0
- data/ext/makiri/rust/src/html/tree/modes/before_html.rs +85 -0
- data/ext/makiri/rust/src/html/tree/modes/foreign_content.rs +260 -0
- data/ext/makiri/rust/src/html/tree/modes/in_body.rs +1028 -0
- data/ext/makiri/rust/src/html/tree/modes/in_caption.rs +59 -0
- data/ext/makiri/rust/src/html/tree/modes/in_cell.rs +77 -0
- data/ext/makiri/rust/src/html/tree/modes/in_column_group.rs +94 -0
- data/ext/makiri/rust/src/html/tree/modes/in_frameset.rs +89 -0
- data/ext/makiri/rust/src/html/tree/modes/in_head.rs +142 -0
- data/ext/makiri/rust/src/html/tree/modes/in_head_noscript.rs +67 -0
- data/ext/makiri/rust/src/html/tree/modes/in_row.rs +87 -0
- data/ext/makiri/rust/src/html/tree/modes/in_table.rs +234 -0
- data/ext/makiri/rust/src/html/tree/modes/in_table_body.rs +104 -0
- data/ext/makiri/rust/src/html/tree/modes/in_table_text.rs +80 -0
- data/ext/makiri/rust/src/html/tree/modes/in_template.rs +66 -0
- data/ext/makiri/rust/src/html/tree/modes/initial.rs +185 -0
- data/ext/makiri/rust/src/html/tree/modes/mod.rs +25 -0
- data/ext/makiri/rust/src/html/tree/modes/text.rs +27 -0
- data/ext/makiri/rust/src/html/tree/parse.rs +209 -0
- data/ext/makiri/rust/src/html/tree/select.rs +701 -0
- data/ext/makiri/rust/src/html/tree/stacks.rs +463 -0
- data/ext/makiri/rust/src/html/tree/stamp.rs +113 -0
- data/ext/makiri/rust/src/html/tree/wpt_tests.rs +88 -0
- data/ext/makiri/rust/src/html_dom.rs +39 -0
- data/ext/makiri/rust/src/init.rs +67 -19
- data/ext/makiri/rust/src/lexbor/abi.rs +0 -12
- data/ext/makiri/rust/src/lexbor/adapter/arena_copy.rs +171 -0
- data/ext/makiri/rust/src/lexbor/adapter/html/attrs.rs +0 -62
- data/ext/makiri/rust/src/lexbor/adapter/html/build.rs +6 -322
- data/ext/makiri/rust/src/lexbor/adapter/html/mod.rs +29 -118
- data/ext/makiri/rust/src/lexbor/adapter/mod.rs +2 -3
- data/ext/makiri/rust/src/lexbor/adapter/post_parse.rs +15 -214
- data/ext/makiri/rust/src/lexbor/adapter/source_loc.rs +2 -77
- data/ext/makiri/rust/src/lexbor/adapter/tree_guard.rs +17 -187
- data/ext/makiri/rust/src/lexbor/chunks.rs +2 -2
- data/ext/makiri/rust/src/lexbor/conformance_tests.rs +1196 -0
- data/ext/makiri/rust/src/lexbor/css_engine.rs +19 -25
- data/ext/makiri/rust/src/lexbor/css_parser.rs +36 -24
- data/ext/makiri/rust/src/lexbor/fragment.rs +64 -113
- data/ext/makiri/rust/src/lexbor/mod.rs +65 -25
- data/ext/makiri/rust/src/lexbor/res_tests.rs +452 -0
- data/ext/makiri/rust/src/lexbor/selector_diff.rs +157 -0
- data/ext/makiri/rust/src/lexbor/selector_port_tests.rs +1123 -0
- data/ext/makiri/rust/src/lexbor/selectors.rs +11 -4
- data/ext/makiri/rust/src/lexbor/serialize.rs +2 -4
- data/ext/makiri/rust/src/lexbor/stylesheet_diff.rs +340 -0
- data/ext/makiri/rust/src/lexbor/tests.rs +264 -486
- data/ext/makiri/rust/src/lexbor/tree_diff.rs +477 -0
- data/ext/makiri/rust/src/lexbor/tree_port_tests.rs +838 -0
- data/ext/makiri/rust/src/lexbor/twin.rs +71 -0
- data/ext/makiri/rust/src/lib.rs +54 -4
- data/ext/makiri/rust/src/lint_probe.rs +82 -0
- data/ext/makiri/rust/src/ptr_table.rs +28 -5
- data/ext/makiri/rust/src/rust_tests.rs +2 -2
- data/ext/makiri/rust/src/selectors/ast.rs +473 -0
- data/ext/makiri/rust/src/selectors/mod.rs +35 -0
- data/ext/makiri/rust/src/selectors/parser/syntax.rs +1101 -0
- data/ext/makiri/rust/src/selectors/parser.rs +2454 -0
- data/ext/makiri/rust/src/selectors/pseudo.rs +404 -0
- data/ext/makiri/rust/src/selectors/rules.rs +123 -0
- data/ext/makiri/rust/src/selectors/specificity.rs +88 -0
- data/ext/makiri/rust/src/selectors/strtod.rs +351 -0
- data/ext/makiri/rust/src/selectors/stylesheet.rs +379 -0
- data/ext/makiri/rust/src/{lexbor/selector_text.rs → selectors/text.rs} +102 -5
- data/ext/makiri/rust/src/selectors/token.rs +72 -0
- data/ext/makiri/rust/src/selectors/tokenizer.rs +1453 -0
- data/ext/makiri/rust/src/source_lines.rs +134 -0
- data/ext/makiri/rust/src/token.rs +23 -32
- data/ext/makiri/rust/src/utf8_input.rs +1 -1
- data/ext/makiri/rust/src/xml/arena.rs +9 -6
- data/ext/makiri/rust/src/xml/attr_key.rs +2 -2
- data/ext/makiri/rust/src/xml/chars/mod.rs +6 -4
- data/ext/makiri/rust/src/xml/css.rs +314 -0
- data/ext/makiri/rust/src/xml/css_tests.rs +441 -0
- data/ext/makiri/rust/src/xml/encoding_names.rs +221 -0
- data/ext/makiri/rust/src/xml/index.rs +60 -5
- data/ext/makiri/rust/src/xml/mod.rs +4 -0
- data/ext/makiri/rust/src/xml/model.rs +2 -0
- data/ext/makiri/rust/src/xml/mutate/copy.rs +1 -1
- data/ext/makiri/rust/src/xml/mutate/edit.rs +10 -7
- data/ext/makiri/rust/src/xml/mutate/insert.rs +3 -3
- data/ext/makiri/rust/src/xml/mutate/ns.rs +1 -1
- data/ext/makiri/rust/src/xml/selftest.rs +1 -1
- data/ext/makiri/rust/src/xml/serialize/bindings.rs +10 -9
- data/ext/makiri/rust/src/xml/serialize/c14n.rs +1 -1
- data/ext/makiri/rust/src/xml/serialize/out.rs +1 -0
- data/ext/makiri/rust/src/xml/tree/dtd.rs +1 -1
- data/ext/makiri/rust/src/xml/tree/mod.rs +6 -5
- data/ext/makiri/rust/src/xml/tree/scope.rs +2 -3
- data/ext/makiri/rust/src/xml/xpath.rs +6 -0
- data/ext/makiri/rust/src/xpath/abi.rs +2 -1
- data/ext/makiri/rust/src/xpath/ast.rs +1 -2
- data/ext/makiri/rust/src/xpath/ast_ops.rs +2 -2
- data/ext/makiri/rust/src/xpath/ctx.rs +28 -85
- data/ext/makiri/rust/src/xpath/dom.rs +35 -5
- data/ext/makiri/rust/src/xpath/eval.rs +44 -94
- data/ext/makiri/rust/src/xpath/funcs/css_hooks.rs +210 -0
- data/ext/makiri/rust/src/xpath/funcs/ext.rs +2 -204
- data/ext/makiri/rust/src/xpath/funcs/mod.rs +192 -78
- data/ext/makiri/rust/src/xpath/order.rs +262 -4
- data/ext/makiri/rust/src/xpath/parse.rs +12 -1
- data/ext/makiri/rust/src/xpath/step_index.rs +4 -2
- data/ext/makiri/rust/src/xpath/str_cache.rs +6 -6
- data/ext/makiri/rust/src/xpath/tests.rs +54 -85
- data/ext/makiri/rust/src/xpath/value.rs +4 -8
- data/lib/makiri/css.rb +3 -2
- data/lib/makiri/html/document.rb +21 -11
- data/lib/makiri/node.rb +18 -10
- data/lib/makiri/node_set.rb +1 -1
- data/lib/makiri/version.rb +1 -1
- data/lib/makiri/xml/builder.rb +9 -7
- data/lib/makiri/xml/document.rb +12 -0
- data/lib/makiri/xml/node_methods.rb +16 -51
- data/lib/makiri/xpath_context.rb +6 -12
- data/lib/makiri.rb +3 -3
- metadata +136 -560
- data/.github/workflows/ci.yml +0 -204
- data/.github/workflows/conformance.yml +0 -135
- data/.github/workflows/css-match.yml +0 -217
- data/.github/workflows/libfuzzer.yml +0 -116
- data/.github/workflows/release.yml +0 -273
- data/.github/workflows/security.yml +0 -305
- data/.github/workflows/valgrind.yml +0 -187
- data/.github/workflows/verify.yml +0 -71
- data/.gitmodules +0 -3
- data/Rakefile +0 -946
- data/ext/makiri/rust/clippy.toml +0 -67
- data/ext/makiri/rust/fuzz/Cargo.lock +0 -303
- data/ext/makiri/rust/fuzz/Cargo.toml +0 -79
- data/ext/makiri/rust/fuzz/build.rs +0 -7
- data/ext/makiri/rust/fuzz/css.dict +0 -77
- data/ext/makiri/rust/fuzz/fuzz_targets/common.rs +0 -80
- data/ext/makiri/rust/fuzz/fuzz_targets/css.rs +0 -79
- data/ext/makiri/rust/fuzz/fuzz_targets/html.rs +0 -24
- data/ext/makiri/rust/fuzz/fuzz_targets/html_css.rs +0 -104
- data/ext/makiri/rust/fuzz/fuzz_targets/html_css_diff.rs +0 -300
- data/ext/makiri/rust/fuzz/fuzz_targets/html_xpath.rs +0 -80
- data/ext/makiri/rust/fuzz/fuzz_targets/xml.rs +0 -17
- data/ext/makiri/rust/fuzz/fuzz_targets/xml_xpath.rs +0 -64
- data/ext/makiri/rust/fuzz/fuzz_targets/xpath.rs +0 -58
- data/ext/makiri/rust/src/bridge/string.rs +0 -820
- data/ext/makiri/rust/src/bridge/wrapper.rs +0 -1142
- data/ext/makiri/rust/src/bridge/xpath/handler.rs +0 -343
- data/ext/makiri/rust/src/falloc/cstr/verify.rs +0 -40
- data/ext/makiri/rust/src/falloc/cstr.rs +0 -44
- data/ext/makiri/rust/src/glue/xml_node/strings.rs +0 -25
- data/ext/makiri/rust/src/lexbor/adapter/dom_index.rs +0 -162
- data/ext/makiri/rust/src/lexbor/adapter/html/mutate.rs +0 -368
- data/ext/makiri/rust/src/lexbor/adapter/text_index.rs +0 -291
- data/ext/makiri/rust/src/lexbor/memory.rs +0 -78
- data/ext/makiri/rust/src/lexbor/selector_cache.rs +0 -356
- data/ext/makiri/rust/src/lexbor/stylesheet.rs +0 -481
- data/ext/makiri/rust/tests/alloc_inject_map_insert.rs +0 -47
- data/lib/makiri/error.rb +0 -26
- data/script/api_manifest.rb +0 -173
- data/script/build_native_gem.rb +0 -53
- data/script/check_alloc_failures.rb +0 -815
- data/script/check_leaks.rb +0 -64
- data/script/check_unsafe_boundaries.rb +0 -782
- data/script/leaks_harness.rb +0 -90
- data/suppressions/ruby.supp +0 -194
- data/tools/pe_exports.rb +0 -124
- data/vendor/lexbor/.travis.yml +0 -50
- data/vendor/lexbor/CHANGELOG.md +0 -285
- data/vendor/lexbor/CMakeLists.txt +0 -481
- data/vendor/lexbor/INSTALL.md +0 -74
- data/vendor/lexbor/README.md +0 -292
- data/vendor/lexbor/SECURITY.md +0 -18
- data/vendor/lexbor/config.cmake +0 -983
- data/vendor/lexbor/feature.cmake +0 -204
- data/vendor/lexbor/lexbor-config.cmake.in +0 -8
- data/vendor/lexbor/lexbor.pc.in +0 -12
- data/vendor/lexbor/pvs_studio.sh +0 -18
- data/vendor/lexbor/single.pl +0 -2490
- data/vendor/lexbor/source/lexbor/core/array.c +0 -208
- data/vendor/lexbor/source/lexbor/core/array.h +0 -100
- data/vendor/lexbor/source/lexbor/core/array_obj.c +0 -216
- data/vendor/lexbor/source/lexbor/core/array_obj.h +0 -134
- data/vendor/lexbor/source/lexbor/core/avl.c +0 -525
- data/vendor/lexbor/source/lexbor/core/avl.h +0 -92
- data/vendor/lexbor/source/lexbor/core/base.h +0 -108
- data/vendor/lexbor/source/lexbor/core/bst.c +0 -471
- data/vendor/lexbor/source/lexbor/core/bst.h +0 -108
- data/vendor/lexbor/source/lexbor/core/bst_map.c +0 -238
- data/vendor/lexbor/source/lexbor/core/bst_map.h +0 -87
- data/vendor/lexbor/source/lexbor/core/config.cmake +0 -20
- data/vendor/lexbor/source/lexbor/core/conv.c +0 -356
- data/vendor/lexbor/source/lexbor/core/conv.h +0 -62
- data/vendor/lexbor/source/lexbor/core/core.h +0 -35
- data/vendor/lexbor/source/lexbor/core/def.h +0 -59
- data/vendor/lexbor/source/lexbor/core/diyfp.c +0 -181
- data/vendor/lexbor/source/lexbor/core/diyfp.h +0 -285
- data/vendor/lexbor/source/lexbor/core/dobject.c +0 -187
- data/vendor/lexbor/source/lexbor/core/dobject.h +0 -88
- data/vendor/lexbor/source/lexbor/core/dtoa.c +0 -401
- data/vendor/lexbor/source/lexbor/core/dtoa.h +0 -54
- data/vendor/lexbor/source/lexbor/core/fs.h +0 -60
- data/vendor/lexbor/source/lexbor/core/hash.c +0 -477
- data/vendor/lexbor/source/lexbor/core/hash.h +0 -218
- data/vendor/lexbor/source/lexbor/core/in.c +0 -266
- data/vendor/lexbor/source/lexbor/core/in.h +0 -172
- data/vendor/lexbor/source/lexbor/core/lexbor.h +0 -43
- data/vendor/lexbor/source/lexbor/core/mem.c +0 -228
- data/vendor/lexbor/source/lexbor/core/mem.h +0 -141
- data/vendor/lexbor/source/lexbor/core/mraw.c +0 -421
- data/vendor/lexbor/source/lexbor/core/mraw.h +0 -114
- data/vendor/lexbor/source/lexbor/core/perf.h +0 -40
- data/vendor/lexbor/source/lexbor/core/plog.c +0 -73
- data/vendor/lexbor/source/lexbor/core/plog.h +0 -102
- data/vendor/lexbor/source/lexbor/core/print.c +0 -168
- data/vendor/lexbor/source/lexbor/core/print.h +0 -39
- data/vendor/lexbor/source/lexbor/core/sbst.h +0 -59
- data/vendor/lexbor/source/lexbor/core/serialize.c +0 -27
- data/vendor/lexbor/source/lexbor/core/serialize.h +0 -32
- data/vendor/lexbor/source/lexbor/core/shs.c +0 -118
- data/vendor/lexbor/source/lexbor/core/shs.h +0 -82
- data/vendor/lexbor/source/lexbor/core/str.c +0 -667
- data/vendor/lexbor/source/lexbor/core/str.h +0 -257
- data/vendor/lexbor/source/lexbor/core/str_res.h +0 -360
- data/vendor/lexbor/source/lexbor/core/strtod.c +0 -348
- data/vendor/lexbor/source/lexbor/core/strtod.h +0 -54
- data/vendor/lexbor/source/lexbor/core/swar.h +0 -97
- data/vendor/lexbor/source/lexbor/core/types.h +0 -39
- data/vendor/lexbor/source/lexbor/core/utils.c +0 -43
- data/vendor/lexbor/source/lexbor/core/utils.h +0 -36
- data/vendor/lexbor/source/lexbor/css/at_rule/const.h +0 -32
- data/vendor/lexbor/source/lexbor/css/at_rule/res.h +0 -49
- data/vendor/lexbor/source/lexbor/css/at_rule/state.c +0 -374
- data/vendor/lexbor/source/lexbor/css/at_rule/state.h +0 -128
- data/vendor/lexbor/source/lexbor/css/at_rule/types.h +0 -60
- data/vendor/lexbor/source/lexbor/css/at_rule.c +0 -449
- data/vendor/lexbor/source/lexbor/css/at_rule.h +0 -152
- data/vendor/lexbor/source/lexbor/css/base.h +0 -136
- data/vendor/lexbor/source/lexbor/css/blank.c +0 -389
- data/vendor/lexbor/source/lexbor/css/blank.h +0 -38
- data/vendor/lexbor/source/lexbor/css/config.cmake +0 -2
- data/vendor/lexbor/source/lexbor/css/css.c +0 -254
- data/vendor/lexbor/source/lexbor/css/css.h +0 -52
- data/vendor/lexbor/source/lexbor/css/declaration.c +0 -86
- data/vendor/lexbor/source/lexbor/css/declaration.h +0 -33
- data/vendor/lexbor/source/lexbor/css/log.c +0 -335
- data/vendor/lexbor/source/lexbor/css/log.h +0 -103
- data/vendor/lexbor/source/lexbor/css/parser.c +0 -563
- data/vendor/lexbor/source/lexbor/css/parser.h +0 -756
- data/vendor/lexbor/source/lexbor/css/property/const.h +0 -1180
- data/vendor/lexbor/source/lexbor/css/property/res.h +0 -524
- data/vendor/lexbor/source/lexbor/css/property/state.c +0 -5343
- data/vendor/lexbor/source/lexbor/css/property/state.h +0 -330
- data/vendor/lexbor/source/lexbor/css/property/types.h +0 -21
- data/vendor/lexbor/source/lexbor/css/property.c +0 -3171
- data/vendor/lexbor/source/lexbor/css/property.h +0 -1754
- data/vendor/lexbor/source/lexbor/css/rule.c +0 -598
- data/vendor/lexbor/source/lexbor/css/rule.h +0 -453
- data/vendor/lexbor/source/lexbor/css/selectors/base.h +0 -47
- data/vendor/lexbor/source/lexbor/css/selectors/pseudo.c +0 -102
- data/vendor/lexbor/source/lexbor/css/selectors/pseudo.h +0 -70
- data/vendor/lexbor/source/lexbor/css/selectors/pseudo_const.h +0 -110
- data/vendor/lexbor/source/lexbor/css/selectors/pseudo_res.h +0 -325
- data/vendor/lexbor/source/lexbor/css/selectors/pseudo_state.c +0 -429
- data/vendor/lexbor/source/lexbor/css/selectors/pseudo_state.h +0 -89
- data/vendor/lexbor/source/lexbor/css/selectors/selector.c +0 -1002
- data/vendor/lexbor/source/lexbor/css/selectors/selector.h +0 -283
- data/vendor/lexbor/source/lexbor/css/selectors/selectors.c +0 -326
- data/vendor/lexbor/source/lexbor/css/selectors/selectors.h +0 -123
- data/vendor/lexbor/source/lexbor/css/selectors/state.c +0 -2085
- data/vendor/lexbor/source/lexbor/css/selectors/state.h +0 -86
- data/vendor/lexbor/source/lexbor/css/state.c +0 -676
- data/vendor/lexbor/source/lexbor/css/state.h +0 -59
- data/vendor/lexbor/source/lexbor/css/stylesheet.c +0 -111
- data/vendor/lexbor/source/lexbor/css/stylesheet.h +0 -90
- data/vendor/lexbor/source/lexbor/css/syntax/anb.c +0 -486
- data/vendor/lexbor/source/lexbor/css/syntax/anb.h +0 -46
- data/vendor/lexbor/source/lexbor/css/syntax/base.h +0 -33
- data/vendor/lexbor/source/lexbor/css/syntax/parser.c +0 -2251
- data/vendor/lexbor/source/lexbor/css/syntax/parser.h +0 -95
- data/vendor/lexbor/source/lexbor/css/syntax/res.h +0 -42
- data/vendor/lexbor/source/lexbor/css/syntax/state.c +0 -1852
- data/vendor/lexbor/source/lexbor/css/syntax/state.h +0 -128
- data/vendor/lexbor/source/lexbor/css/syntax/state_res.h +0 -273
- data/vendor/lexbor/source/lexbor/css/syntax/syntax.c +0 -535
- data/vendor/lexbor/source/lexbor/css/syntax/syntax.h +0 -255
- data/vendor/lexbor/source/lexbor/css/syntax/token.c +0 -674
- data/vendor/lexbor/source/lexbor/css/syntax/token.h +0 -333
- data/vendor/lexbor/source/lexbor/css/syntax/token_res.h +0 -82
- data/vendor/lexbor/source/lexbor/css/syntax/tokenizer/error.c +0 -30
- data/vendor/lexbor/source/lexbor/css/syntax/tokenizer/error.h +0 -60
- data/vendor/lexbor/source/lexbor/css/syntax/tokenizer.c +0 -397
- data/vendor/lexbor/source/lexbor/css/syntax/tokenizer.h +0 -123
- data/vendor/lexbor/source/lexbor/css/unit/const.h +0 -98
- data/vendor/lexbor/source/lexbor/css/unit/res.h +0 -294
- data/vendor/lexbor/source/lexbor/css/unit.c +0 -113
- data/vendor/lexbor/source/lexbor/css/unit.h +0 -46
- data/vendor/lexbor/source/lexbor/css/value/const.h +0 -397
- data/vendor/lexbor/source/lexbor/css/value/res.h +0 -775
- data/vendor/lexbor/source/lexbor/css/value.c +0 -678
- data/vendor/lexbor/source/lexbor/css/value.h +0 -290
- data/vendor/lexbor/source/lexbor/dom/base.h +0 -32
- data/vendor/lexbor/source/lexbor/dom/collection.c +0 -97
- data/vendor/lexbor/source/lexbor/dom/collection.h +0 -112
- data/vendor/lexbor/source/lexbor/dom/config.cmake +0 -3
- data/vendor/lexbor/source/lexbor/dom/dom.h +0 -29
- data/vendor/lexbor/source/lexbor/dom/exception.c +0 -372
- data/vendor/lexbor/source/lexbor/dom/exception.h +0 -99
- data/vendor/lexbor/source/lexbor/dom/interface.c +0 -110
- data/vendor/lexbor/source/lexbor/dom/interface.h +0 -86
- data/vendor/lexbor/source/lexbor/dom/interfaces/attr.c +0 -534
- data/vendor/lexbor/source/lexbor/dom/interfaces/attr.h +0 -141
- data/vendor/lexbor/source/lexbor/dom/interfaces/attr_const.h +0 -99
- data/vendor/lexbor/source/lexbor/dom/interfaces/attr_res.h +0 -263
- data/vendor/lexbor/source/lexbor/dom/interfaces/cdata_section.c +0 -55
- data/vendor/lexbor/source/lexbor/dom/interfaces/cdata_section.h +0 -38
- data/vendor/lexbor/source/lexbor/dom/interfaces/character_data.c +0 -116
- data/vendor/lexbor/source/lexbor/dom/interfaces/character_data.h +0 -51
- data/vendor/lexbor/source/lexbor/dom/interfaces/comment.c +0 -64
- data/vendor/lexbor/source/lexbor/dom/interfaces/comment.h +0 -42
- data/vendor/lexbor/source/lexbor/dom/interfaces/document.c +0 -593
- data/vendor/lexbor/source/lexbor/dom/interfaces/document.h +0 -336
- data/vendor/lexbor/source/lexbor/dom/interfaces/document_fragment.c +0 -36
- data/vendor/lexbor/source/lexbor/dom/interfaces/document_fragment.h +0 -36
- data/vendor/lexbor/source/lexbor/dom/interfaces/document_type.c +0 -232
- data/vendor/lexbor/source/lexbor/dom/interfaces/document_type.h +0 -135
- data/vendor/lexbor/source/lexbor/dom/interfaces/element.c +0 -896
- data/vendor/lexbor/source/lexbor/dom/interfaces/element.h +0 -361
- data/vendor/lexbor/source/lexbor/dom/interfaces/event_target.c +0 -32
- data/vendor/lexbor/source/lexbor/dom/interfaces/event_target.h +0 -34
- data/vendor/lexbor/source/lexbor/dom/interfaces/node.c +0 -1866
- data/vendor/lexbor/source/lexbor/dom/interfaces/node.h +0 -396
- data/vendor/lexbor/source/lexbor/dom/interfaces/processing_instruction.c +0 -92
- data/vendor/lexbor/source/lexbor/dom/interfaces/processing_instruction.h +0 -66
- data/vendor/lexbor/source/lexbor/dom/interfaces/shadow_root.c +0 -36
- data/vendor/lexbor/source/lexbor/dom/interfaces/shadow_root.h +0 -44
- data/vendor/lexbor/source/lexbor/dom/interfaces/text.c +0 -63
- data/vendor/lexbor/source/lexbor/dom/interfaces/text.h +0 -42
- data/vendor/lexbor/source/lexbor/encoding/base.h +0 -218
- data/vendor/lexbor/source/lexbor/encoding/config.cmake +0 -12
- data/vendor/lexbor/source/lexbor/encoding/const.h +0 -65
- data/vendor/lexbor/source/lexbor/encoding/decode.c +0 -3383
- data/vendor/lexbor/source/lexbor/encoding/decode.h +0 -381
- data/vendor/lexbor/source/lexbor/encoding/encode.c +0 -2054
- data/vendor/lexbor/source/lexbor/encoding/encode.h +0 -380
- data/vendor/lexbor/source/lexbor/encoding/encoding.c +0 -413
- data/vendor/lexbor/source/lexbor/encoding/encoding.h +0 -462
- data/vendor/lexbor/source/lexbor/encoding/multi.h +0 -63
- data/vendor/lexbor/source/lexbor/encoding/multi_res.c +0 -298309
- data/vendor/lexbor/source/lexbor/encoding/range.h +0 -35
- data/vendor/lexbor/source/lexbor/encoding/range_res.c +0 -71
- data/vendor/lexbor/source/lexbor/encoding/res.c +0 -222
- data/vendor/lexbor/source/lexbor/encoding/res.h +0 -34
- data/vendor/lexbor/source/lexbor/encoding/single.h +0 -117
- data/vendor/lexbor/source/lexbor/encoding/single_res.c +0 -13748
- data/vendor/lexbor/source/lexbor/engine/base.h +0 -30
- data/vendor/lexbor/source/lexbor/engine/config.cmake +0 -2
- data/vendor/lexbor/source/lexbor/engine/engine.c +0 -294
- data/vendor/lexbor/source/lexbor/engine/engine.h +0 -60
- data/vendor/lexbor/source/lexbor/html/attribute_steps.c +0 -159
- data/vendor/lexbor/source/lexbor/html/attribute_steps.h +0 -49
- data/vendor/lexbor/source/lexbor/html/attribute_steps_res.h +0 -427
- data/vendor/lexbor/source/lexbor/html/base.h +0 -44
- data/vendor/lexbor/source/lexbor/html/common.c +0 -115
- data/vendor/lexbor/source/lexbor/html/common.h +0 -32
- data/vendor/lexbor/source/lexbor/html/config.cmake +0 -3
- data/vendor/lexbor/source/lexbor/html/element_steps.c +0 -220
- data/vendor/lexbor/source/lexbor/html/element_steps.h +0 -47
- data/vendor/lexbor/source/lexbor/html/element_steps_res.h +0 -427
- data/vendor/lexbor/source/lexbor/html/encoding.c +0 -679
- data/vendor/lexbor/source/lexbor/html/encoding.h +0 -243
- data/vendor/lexbor/source/lexbor/html/html.h +0 -109
- data/vendor/lexbor/source/lexbor/html/interface.c +0 -168
- data/vendor/lexbor/source/lexbor/html/interface.h +0 -189
- data/vendor/lexbor/source/lexbor/html/interface_res.h +0 -5456
- data/vendor/lexbor/source/lexbor/html/interfaces/anchor_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/anchor_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/area_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/area_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/audio_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/audio_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/base_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/base_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/body_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/body_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/br_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/br_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/button_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/button_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/canvas_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/canvas_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/d_list_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/d_list_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/data_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/data_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/data_list_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/data_list_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/details_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/details_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/dialog_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/dialog_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/directory_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/directory_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/div_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/div_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/document.c +0 -512
- data/vendor/lexbor/source/lexbor/html/interfaces/document.h +0 -313
- data/vendor/lexbor/source/lexbor/html/interfaces/element.c +0 -145
- data/vendor/lexbor/source/lexbor/html/interfaces/element.h +0 -137
- data/vendor/lexbor/source/lexbor/html/interfaces/embed_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/embed_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/field_set_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/field_set_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/font_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/font_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/form_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/form_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/frame_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/frame_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/frame_set_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/frame_set_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/head_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/head_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/heading_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/heading_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/hr_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/hr_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/html_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/html_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/iframe_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/iframe_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/image_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/image_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/input_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/input_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/label_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/label_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/legend_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/legend_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/li_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/li_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/link_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/link_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/map_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/map_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/marquee_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/marquee_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/media_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/media_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/menu_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/menu_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/meta_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/meta_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/meter_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/meter_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/mod_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/mod_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/o_list_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/o_list_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/object_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/object_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/opt_group_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/opt_group_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/option_element.c +0 -260
- data/vendor/lexbor/source/lexbor/html/interfaces/option_element.h +0 -71
- data/vendor/lexbor/source/lexbor/html/interfaces/output_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/output_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/paragraph_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/paragraph_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/param_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/param_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/picture_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/picture_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/pre_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/pre_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/progress_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/progress_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/quote_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/quote_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/script_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/script_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/search_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/search_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/select_element.c +0 -318
- data/vendor/lexbor/source/lexbor/html/interfaces/select_element.h +0 -52
- data/vendor/lexbor/source/lexbor/html/interfaces/selectedcontent_element.c +0 -110
- data/vendor/lexbor/source/lexbor/html/interfaces/selectedcontent_element.h +0 -45
- data/vendor/lexbor/source/lexbor/html/interfaces/slot_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/slot_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/source_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/source_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/span_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/span_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/style_element.c +0 -36
- data/vendor/lexbor/source/lexbor/html/interfaces/style_element.h +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/table_caption_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/table_caption_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/table_cell_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/table_cell_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/table_col_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/table_col_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/table_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/table_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/table_row_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/table_row_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/table_section_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/table_section_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/template_element.c +0 -45
- data/vendor/lexbor/source/lexbor/html/interfaces/template_element.h +0 -38
- data/vendor/lexbor/source/lexbor/html/interfaces/text_area_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/text_area_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/time_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/time_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/title_element.c +0 -138
- data/vendor/lexbor/source/lexbor/html/interfaces/title_element.h +0 -42
- data/vendor/lexbor/source/lexbor/html/interfaces/track_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/track_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/u_list_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/u_list_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/unknown_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/unknown_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/video_element.c +0 -35
- data/vendor/lexbor/source/lexbor/html/interfaces/video_element.h +0 -34
- data/vendor/lexbor/source/lexbor/html/interfaces/window.c +0 -36
- data/vendor/lexbor/source/lexbor/html/interfaces/window.h +0 -34
- data/vendor/lexbor/source/lexbor/html/node.c +0 -14
- data/vendor/lexbor/source/lexbor/html/node.h +0 -73
- data/vendor/lexbor/source/lexbor/html/parser.c +0 -498
- data/vendor/lexbor/source/lexbor/html/parser.h +0 -192
- data/vendor/lexbor/source/lexbor/html/serialize.c +0 -2041
- data/vendor/lexbor/source/lexbor/html/serialize.h +0 -94
- data/vendor/lexbor/source/lexbor/html/serialize_ext.c +0 -2129
- data/vendor/lexbor/source/lexbor/html/serialize_ext.h +0 -672
- data/vendor/lexbor/source/lexbor/html/tag.c +0 -30
- data/vendor/lexbor/source/lexbor/html/tag.h +0 -83
- data/vendor/lexbor/source/lexbor/html/tag_res.h +0 -1912
- data/vendor/lexbor/source/lexbor/html/token.c +0 -388
- data/vendor/lexbor/source/lexbor/html/token.h +0 -147
- data/vendor/lexbor/source/lexbor/html/token_attr.c +0 -44
- data/vendor/lexbor/source/lexbor/html/token_attr.h +0 -67
- data/vendor/lexbor/source/lexbor/html/tokenizer/error.c +0 -106
- data/vendor/lexbor/source/lexbor/html/tokenizer/error.h +0 -153
- data/vendor/lexbor/source/lexbor/html/tokenizer/res.h +0 -4950
- data/vendor/lexbor/source/lexbor/html/tokenizer/state.c +0 -2582
- data/vendor/lexbor/source/lexbor/html/tokenizer/state.h +0 -251
- data/vendor/lexbor/source/lexbor/html/tokenizer/state_comment.c +0 -496
- data/vendor/lexbor/source/lexbor/html/tokenizer/state_comment.h +0 -27
- data/vendor/lexbor/source/lexbor/html/tokenizer/state_doctype.c +0 -1659
- data/vendor/lexbor/source/lexbor/html/tokenizer/state_doctype.h +0 -27
- data/vendor/lexbor/source/lexbor/html/tokenizer/state_rawtext.c +0 -303
- data/vendor/lexbor/source/lexbor/html/tokenizer/state_rawtext.h +0 -32
- data/vendor/lexbor/source/lexbor/html/tokenizer/state_rcdata.c +0 -311
- data/vendor/lexbor/source/lexbor/html/tokenizer/state_rcdata.h +0 -32
- data/vendor/lexbor/source/lexbor/html/tokenizer/state_script.c +0 -1209
- data/vendor/lexbor/source/lexbor/html/tokenizer/state_script.h +0 -32
- data/vendor/lexbor/source/lexbor/html/tokenizer.c +0 -812
- data/vendor/lexbor/source/lexbor/html/tokenizer.h +0 -389
- data/vendor/lexbor/source/lexbor/html/tree/active_formatting.c +0 -241
- data/vendor/lexbor/source/lexbor/html/tree/active_formatting.h +0 -117
- data/vendor/lexbor/source/lexbor/html/tree/error.c +0 -94
- data/vendor/lexbor/source/lexbor/html/tree/error.h +0 -130
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/after_after_body.c +0 -73
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/after_after_frameset.c +0 -74
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/after_body.c +0 -93
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/after_frameset.c +0 -98
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/after_head.c +0 -232
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/before_head.c +0 -154
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/before_html.c +0 -176
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/foreign_content.c +0 -384
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_body.c +0 -2175
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_caption.c +0 -164
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_cell.c +0 -203
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_column_group.c +0 -211
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_frameset.c +0 -159
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_head.c +0 -378
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_head_noscript.c +0 -129
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_row.c +0 -211
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_table.c +0 -482
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_table_body.c +0 -208
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_table_text.c +0 -127
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/in_template.c +0 -193
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/initial.c +0 -422
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode/text.c +0 -70
- data/vendor/lexbor/source/lexbor/html/tree/insertion_mode.h +0 -127
- data/vendor/lexbor/source/lexbor/html/tree/open_elements.c +0 -337
- data/vendor/lexbor/source/lexbor/html/tree/open_elements.h +0 -101
- data/vendor/lexbor/source/lexbor/html/tree/open_elements_res.h +0 -427
- data/vendor/lexbor/source/lexbor/html/tree/template_insertion.c +0 -10
- data/vendor/lexbor/source/lexbor/html/tree/template_insertion.h +0 -100
- data/vendor/lexbor/source/lexbor/html/tree.c +0 -1764
- data/vendor/lexbor/source/lexbor/html/tree.h +0 -404
- data/vendor/lexbor/source/lexbor/html/tree_res.h +0 -111
- data/vendor/lexbor/source/lexbor/ns/base.h +0 -32
- data/vendor/lexbor/source/lexbor/ns/config.cmake +0 -2
- data/vendor/lexbor/source/lexbor/ns/const.h +0 -37
- data/vendor/lexbor/source/lexbor/ns/ns.c +0 -155
- data/vendor/lexbor/source/lexbor/ns/ns.h +0 -66
- data/vendor/lexbor/source/lexbor/ns/res.h +0 -97
- data/vendor/lexbor/source/lexbor/ports/posix/config.cmake +0 -15
- data/vendor/lexbor/source/lexbor/ports/posix/lexbor/core/fs.c +0 -236
- data/vendor/lexbor/source/lexbor/ports/posix/lexbor/core/memory.c +0 -53
- data/vendor/lexbor/source/lexbor/ports/posix/lexbor/core/perf.c +0 -214
- data/vendor/lexbor/source/lexbor/ports/posix/port.conf +0 -5
- data/vendor/lexbor/source/lexbor/ports/windows_nt/config.cmake +0 -18
- data/vendor/lexbor/source/lexbor/ports/windows_nt/lexbor/core/fs.c +0 -239
- data/vendor/lexbor/source/lexbor/ports/windows_nt/lexbor/core/memory.c +0 -53
- data/vendor/lexbor/source/lexbor/ports/windows_nt/lexbor/core/perf.c +0 -81
- data/vendor/lexbor/source/lexbor/ports/windows_nt/port.conf +0 -3
- data/vendor/lexbor/source/lexbor/punycode/base.h +0 -30
- data/vendor/lexbor/source/lexbor/punycode/config.cmake +0 -3
- data/vendor/lexbor/source/lexbor/punycode/punycode.c +0 -678
- data/vendor/lexbor/source/lexbor/punycode/punycode.h +0 -109
- data/vendor/lexbor/source/lexbor/selectors/base.h +0 -30
- data/vendor/lexbor/source/lexbor/selectors/config.cmake +0 -2
- data/vendor/lexbor/source/lexbor/selectors/selectors.c +0 -2378
- data/vendor/lexbor/source/lexbor/selectors/selectors.h +0 -282
- data/vendor/lexbor/source/lexbor/style/attribute_steps.c +0 -158
- data/vendor/lexbor/source/lexbor/style/attribute_steps.h +0 -49
- data/vendor/lexbor/source/lexbor/style/attribute_steps_res.h +0 -427
- data/vendor/lexbor/source/lexbor/style/base.h +0 -52
- data/vendor/lexbor/source/lexbor/style/config.cmake +0 -2
- data/vendor/lexbor/source/lexbor/style/dom/interfaces/document.c +0 -544
- data/vendor/lexbor/source/lexbor/style/dom/interfaces/document.h +0 -96
- data/vendor/lexbor/source/lexbor/style/dom/interfaces/element.c +0 -795
- data/vendor/lexbor/source/lexbor/style/dom/interfaces/element.h +0 -125
- data/vendor/lexbor/source/lexbor/style/element_steps.c +0 -180
- data/vendor/lexbor/source/lexbor/style/element_steps.h +0 -44
- data/vendor/lexbor/source/lexbor/style/element_steps_res.h +0 -427
- data/vendor/lexbor/source/lexbor/style/html/interfaces/document.c +0 -182
- data/vendor/lexbor/source/lexbor/style/html/interfaces/document.h +0 -214
- data/vendor/lexbor/source/lexbor/style/html/interfaces/element.c +0 -293
- data/vendor/lexbor/source/lexbor/style/html/interfaces/element.h +0 -211
- data/vendor/lexbor/source/lexbor/style/html/interfaces/option_element.c +0 -91
- data/vendor/lexbor/source/lexbor/style/html/interfaces/option_element.h +0 -49
- data/vendor/lexbor/source/lexbor/style/html/interfaces/style_element.c +0 -131
- data/vendor/lexbor/source/lexbor/style/html/interfaces/style_element.h +0 -41
- data/vendor/lexbor/source/lexbor/style/style.c +0 -48
- data/vendor/lexbor/source/lexbor/style/style.h +0 -40
- data/vendor/lexbor/source/lexbor/style/tree/open_elements_res.h +0 -427
- data/vendor/lexbor/source/lexbor/tag/base.h +0 -32
- data/vendor/lexbor/source/lexbor/tag/config.cmake +0 -2
- data/vendor/lexbor/source/lexbor/tag/const.h +0 -230
- data/vendor/lexbor/source/lexbor/tag/res.h +0 -568
- data/vendor/lexbor/source/lexbor/tag/tag.c +0 -143
- data/vendor/lexbor/source/lexbor/tag/tag.h +0 -121
- data/vendor/lexbor/source/lexbor/unicode/base.h +0 -157
- data/vendor/lexbor/source/lexbor/unicode/config.cmake +0 -3
- data/vendor/lexbor/source/lexbor/unicode/idna.c +0 -748
- data/vendor/lexbor/source/lexbor/unicode/idna.h +0 -264
- data/vendor/lexbor/source/lexbor/unicode/res.h +0 -206549
- data/vendor/lexbor/source/lexbor/unicode/unicode.c +0 -1039
- data/vendor/lexbor/source/lexbor/unicode/unicode.h +0 -405
- data/vendor/lexbor/source/lexbor/url/base.h +0 -32
- data/vendor/lexbor/source/lexbor/url/config.cmake +0 -4
- data/vendor/lexbor/source/lexbor/url/url.c +0 -5791
- data/vendor/lexbor/source/lexbor/url/url.h +0 -984
- data/vendor/lexbor/source/lexbor/utils/base.h +0 -32
- data/vendor/lexbor/source/lexbor/utils/config.cmake +0 -2
- data/vendor/lexbor/source/lexbor/utils/http.c +0 -555
- data/vendor/lexbor/source/lexbor/utils/http.h +0 -90
- data/vendor/lexbor/source/lexbor/utils/utils.h +0 -15
- data/vendor/lexbor/source/lexbor/utils/warc.c +0 -817
- data/vendor/lexbor/source/lexbor/utils/warc.h +0 -126
- data/vendor/lexbor/version +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc64f5f05d50f24d910c10e0fc9083f90db3739e73f2ab83d801e8775f2a62f4
|
|
4
|
+
data.tar.gz: 46db21d534703f776deeeff576a612e810f6926ceb41f335c1c42097edd472c9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 07ff20653102efa921a4079b10ead383074a7f4a3a97c1cd84134ffd344b30f61fe5f19d094a45be7b5cd514e91f029cf02c5bc44098d9a408f62b1c1551d66b
|
|
7
|
+
data.tar.gz: d241369c7b6e7a2be95827e0724bdcc0f58ce79cbbbe1d3937bc6708ee0d438af966ae5eccc9319e2fb940638e80faed7564808c51b032b0877bf179223d7e02
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,211 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [Unreleased]
|
|
4
|
+
|
|
5
|
+
## [0.17.0.rc2] - 2026-10-24
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
* HTML documents are decoded as browsers decode them: the HTML Standard's
|
|
10
|
+
encoding sniffing algorithm with the Encoding Standard's decoders. A
|
|
11
|
+
binary (ASCII-8BIT) or US-ASCII String is read in the encoding its byte
|
|
12
|
+
order mark or `<meta>` declares, or as UTF-8 when it is valid UTF-8, or
|
|
13
|
+
else in a detected encoding (Shift_JIS, EUC-JP, ISO-2022-JP, ...); a
|
|
14
|
+
`<meta>` past the first 1024 bytes re-reads the document in the encoding
|
|
15
|
+
it names. `Makiri::HTML(src, encoding: "shift_jis")` gives the encoding
|
|
16
|
+
outright - read as a String tagged with it is read, so
|
|
17
|
+
`encoding: Encoding::UTF_32LE` works - and `Document#encoding` returns
|
|
18
|
+
the one used (it was always `"UTF-8"`).
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
* Ruby 3.3 or newer is required (3.2 reached its end of life in March 2026).
|
|
23
|
+
* Arguments are no longer converted with `to_s` / `to_str`. A string
|
|
24
|
+
argument (an attribute value, text content, markup, a variable value, a
|
|
25
|
+
namespace URI) must be a `String`, and a name (an attribute or element
|
|
26
|
+
name, a namespace prefix, a selector or an XPath expression) a `String` or
|
|
27
|
+
a `Symbol`; anything else raises `TypeError` ("... call #to_s to convert
|
|
28
|
+
it"), where `node["n"] = 1` used to store `"1"`. `Makiri.HTML` /
|
|
29
|
+
`Makiri.XML` still read an IO and convert their source with `String()`,
|
|
30
|
+
and `XML::Builder` still converts with `to_s`. An index or a count
|
|
31
|
+
(`NodeSet#[]`, `#child_at`, `to_xml(indent:)`) must likewise be an
|
|
32
|
+
`Integer`; `to_int` is not called.
|
|
33
|
+
* A binary or US-ASCII String holding invalid UTF-8 is no longer read as
|
|
34
|
+
UTF-8 with U+FFFD replacements: it is sniffed, and read in the encoding a
|
|
35
|
+
detector guesses - which, for short text or text with little variety,
|
|
36
|
+
can be the wrong one. A single invalid byte is enough: UTF-8 with one
|
|
37
|
+
stray byte, or cut off inside a character, is read whole as a legacy
|
|
38
|
+
encoding (windows-1252, say), as a browser reads such a local file. Pass
|
|
39
|
+
`encoding:` when it is known, `"utf-8"` (or a UTF-8 String) for the old
|
|
40
|
+
reading.
|
|
41
|
+
* A String in a legacy encoding is decoded with the Encoding Standard's
|
|
42
|
+
decoder for it rather than Ruby's transcoder, as browsers decode it:
|
|
43
|
+
`ISO-8859-1` reads as windows-1252 (`\x80` is `€`), and Shift_JIS's
|
|
44
|
+
`0x8160` is U+301C where Ruby's `Windows-31J` made U+FF5E.
|
|
45
|
+
* Selectors, XPath expressions, names, attribute values and text read a
|
|
46
|
+
String in its own encoding, as parsing does: one that is not UTF-8,
|
|
47
|
+
US-ASCII or binary is converted to UTF-8 first, and refused with
|
|
48
|
+
`Makiri::Error` when it cannot be. Its bytes were read as UTF-8, so a
|
|
49
|
+
Windows-1252 `"\xC3\xA9"` was stored as `é` and a UTF-16 `"a"` as `"a\0"`.
|
|
50
|
+
* `Makiri::XML` reads an encoding declaration by its IANA charset name or
|
|
51
|
+
alias in any case (`latin1`, `csISOLatin1`), as XML 1.0 has it, and
|
|
52
|
+
raises `Makiri::XML::SyntaxError` for a name that is neither (`utf8`);
|
|
53
|
+
such a declaration was ignored, or reported as conflicting with the
|
|
54
|
+
String's encoding.
|
|
55
|
+
* `Makiri::XML` `#ancestors` returns a NodeSet, as HTML's does; it returned
|
|
56
|
+
an Array.
|
|
57
|
+
* `Node#traverse` lists the subtree once, natively, before the first node is
|
|
58
|
+
yielded: about five times faster on a large tree, and a block that adds or
|
|
59
|
+
removes nodes no longer changes which nodes are visited.
|
|
60
|
+
|
|
61
|
+
### Removed
|
|
62
|
+
|
|
63
|
+
* XPath custom-function handlers. `Node#xpath(expr, handler)`,
|
|
64
|
+
`#at_xpath(expr, handler)` and `XPathContext#evaluate(expr, handler)` raise
|
|
65
|
+
`ArgumentError`, and a call to a function XPath 1.0 does not define is an
|
|
66
|
+
`XPath::SyntaxError` (it was a `Makiri::Error` when the expression was
|
|
67
|
+
evaluated). No Ruby code runs during an evaluation any more, so mutating a
|
|
68
|
+
document is never refused "while evaluating XPath over it".
|
|
69
|
+
|
|
70
|
+
### Performance
|
|
71
|
+
|
|
72
|
+
* A node wrapper keeps its data in its own object (an embedded TypedData,
|
|
73
|
+
Ruby 3.3+): wrapping a node for the first time is ~25-45 ns cheaper, and
|
|
74
|
+
a fresh document's query or walk 10-30% faster.
|
|
75
|
+
* A document's indexes are built when a query first needs them, each in
|
|
76
|
+
one walk. An XPath that names no tag (`/html/body`) no longer builds the
|
|
77
|
+
tag index; the text index waits until `#text` calls have walked half the
|
|
78
|
+
document, so a first `doc.text` is twice as fast and a first small
|
|
79
|
+
`li.text` builds nothing; and the order XPath sorts by is kept with the
|
|
80
|
+
document, so a union over 40,000 nodes sorts in 0.7 ms instead of 13 ms.
|
|
81
|
+
* A NodeSet of up to eight nodes holds them in itself, with no allocation
|
|
82
|
+
of its own: `#children` went from ~185 to ~120 ns.
|
|
83
|
+
* A reader that returns a String (`#text`, `#name`, `#[]`) builds it with
|
|
84
|
+
no intermediate copy (`#text` ~124 -> ~112 ns), and `Document#text` joins
|
|
85
|
+
its text with fixed-size copies (20 KB: 9.2 -> 6.7 us).
|
|
86
|
+
|
|
87
|
+
### Fixed
|
|
88
|
+
|
|
89
|
+
* HTML `add_previous_sibling`, `add_next_sibling` and `replace` given the
|
|
90
|
+
node itself leave it where it is, as the DOM does and `Makiri::XML`
|
|
91
|
+
already did; they raised "cannot insert a node into its own subtree".
|
|
92
|
+
* `Makiri::XML`'s `content=` on a DocumentFragment replaces its children,
|
|
93
|
+
and on a Document or a DocumentType does nothing, as the DOM's
|
|
94
|
+
`textContent` does and HTML already did; both raised.
|
|
95
|
+
* `remove` / `unlink` on an HTML Document raise "cannot remove the document
|
|
96
|
+
node", as on an XML one; it returned the document unchanged.
|
|
97
|
+
* A UTF-8 byte order mark at the start of a document is no longer kept as a
|
|
98
|
+
U+FEFF character in the text.
|
|
99
|
+
* A refused `Makiri::XML` insert of a node from another document (onto a
|
|
100
|
+
Text node, say) no longer leaves the copy it made in the target document,
|
|
101
|
+
where each refused call grew it and used up its node budget.
|
|
102
|
+
* XPath over HTML keeps a plain attribute of an element created in the
|
|
103
|
+
XMLNS namespace on `@*` and `[@name]`; it was taken for a namespace
|
|
104
|
+
declaration and skipped.
|
|
105
|
+
* XPath's `id()` with many tokens indexes the document's IDs once instead
|
|
106
|
+
of searching it per token: 8,000 IDs over 8,000 elements raised
|
|
107
|
+
`Makiri::XPath::LimitExceeded`.
|
|
108
|
+
* `==` / `eql?` compare the nodes' Documents as well, so nodes of two
|
|
109
|
+
documents can no longer compare equal after the per-document counter wraps.
|
|
110
|
+
* Importing an XML processing instruction whose data holds `?>` into an
|
|
111
|
+
HTML document raises `ArgumentError`; it reported "out of memory".
|
|
112
|
+
* An HTML Attr serializes to the empty string, as an XML Attr does and as
|
|
113
|
+
DOM Parsing and Firefox have it: `attr.to_s`, `puts attr` and `NodeSet#to_s`
|
|
114
|
+
over attributes raised `Makiri::Error` ("HTML serialization failed").
|
|
115
|
+
* Under a default namespace (the ns Hash's `"xmlns"`), a compound with no
|
|
116
|
+
type selector (`.x`, `[a]`) matches only that namespace's elements, as if
|
|
117
|
+
`*` were written (Selectors 4); it matched elements in any namespace.
|
|
118
|
+
* An undeclared namespace prefix inside `:is()` or `:where()` drops that
|
|
119
|
+
alternative alone, as browsers do: `:is(a, z|a)` matches `a` instead of
|
|
120
|
+
raising `Makiri::CSS::SyntaxError`.
|
|
121
|
+
|
|
122
|
+
## [0.17.0.rc1] - 2026-10-22
|
|
123
|
+
|
|
124
|
+
### Added
|
|
125
|
+
|
|
126
|
+
* `Makiri::Lexbor::CSS.parse_stylesheet` returns the declarations in an
|
|
127
|
+
at-rule's block (`@font-face`, `@page`, ...) as its `:declarations`; they
|
|
128
|
+
were dropped.
|
|
129
|
+
|
|
130
|
+
### Changed
|
|
131
|
+
|
|
132
|
+
* HTML is parsed by Makiri's own Rust port of Lexbor's tokenizer and tree
|
|
133
|
+
builder, into a DOM of Makiri's own, and the CSS selector and stylesheet
|
|
134
|
+
parsers are ported too. A parsed document takes about 40% less memory.
|
|
135
|
+
* Installing from source needs Rust 1.84 or newer (and libclang), and no
|
|
136
|
+
longer CMake: the gem carries none of Lexbor's sources, only its LICENSE
|
|
137
|
+
and NOTICE.
|
|
138
|
+
* `Makiri::XML`'s `#css`, `#at_css` and `#matches?` run on the same matcher
|
|
139
|
+
as HTML's and answer as a browser's `querySelectorAll` does in an XML
|
|
140
|
+
document, 10-20x faster on compound selectors (`.item`, `ul li.item`).
|
|
141
|
+
This changes some answers:
|
|
142
|
+
* a bare type selector (`p`) matches that name in any namespace;
|
|
143
|
+
* the root element's namespace declarations are no longer picked up: a
|
|
144
|
+
prefix must be given in the ns Hash, whose `"xmlns"` entry is the
|
|
145
|
+
default namespace (on HTML too);
|
|
146
|
+
* a selector run on a node may match through ancestors outside it
|
|
147
|
+
(`node.css("body p")`); only the node's descendants are returned;
|
|
148
|
+
* `[a=v i]`, `:nth-child(... of S)`, and the form-state and link
|
|
149
|
+
pseudo-classes on XHTML elements are supported;
|
|
150
|
+
* `||` and `:current()` raise `Makiri::CSS::SyntaxError`, and an over-long
|
|
151
|
+
chain `Makiri::Error` (it was `Makiri::XPath::LimitExceeded`).
|
|
152
|
+
* HTML `css(selector, ns)` resolves namespace prefixes: `svg|path` is the SVG
|
|
153
|
+
`path`, `|p` an element in no namespace, `[x|href]` the attribute in `x`'s
|
|
154
|
+
namespace. A prefix the Hash does not bind raises
|
|
155
|
+
`Makiri::CSS::SyntaxError`; prefixes used to be ignored.
|
|
156
|
+
* HTML parsing follows the HTML Standard where Lexbor did not. This affects
|
|
157
|
+
malformed or unusual markup only: `<frameset>`, `<form>` and tables inside
|
|
158
|
+
`<template>`, `<![CDA` or `<!` at the end of the input, the adoption
|
|
159
|
+
agency, `<textarea>`, `<input type=HIDDEN>` and `<image>` in a table,
|
|
160
|
+
`<sup>` in SVG or MathML, and a repeated attribute name (the first is
|
|
161
|
+
kept). Fragment parsing (`#inner_html=`, `#outer_html=`, `Node#parse`,
|
|
162
|
+
`context:` given an element) takes the context element's quirks mode,
|
|
163
|
+
namespace and ancestor `<form>` into account, as browsers do.
|
|
164
|
+
* CSS selectors are parsed as Selectors 4 says: `:has()` inside `:has()` and
|
|
165
|
+
an invalid argument to `:has()` make the selector invalid, an empty
|
|
166
|
+
`:is()` / `:where()` is valid and matches nothing, and `#1a` is not an ID
|
|
167
|
+
selector.
|
|
168
|
+
* `parse_stylesheet` reads names and values by one rule for every property: a
|
|
169
|
+
declaration name is lower-cased unless it is a custom property, an at-rule
|
|
170
|
+
name is lower-cased, and a value is the text as written with whitespace
|
|
171
|
+
runs collapsed (`color: RED` stays `RED`; it came back as `red`).
|
|
172
|
+
`:specificity` is counted as Selectors 4 does (`:is()` / `:not()` /
|
|
173
|
+
`:has()` take their most specific argument).
|
|
174
|
+
|
|
175
|
+
### Removed
|
|
176
|
+
|
|
177
|
+
* The 10,000-`<option>` limit on a `<select>`: a select with any number of
|
|
178
|
+
options parses in linear time, as browsers parse it.
|
|
179
|
+
|
|
180
|
+
### Fixed
|
|
181
|
+
|
|
182
|
+
* `parse_stylesheet` keeps a rule such as `a:hover { ... }` inside `@media`
|
|
183
|
+
or `@supports`; it was read as a declaration, which dropped that rule and
|
|
184
|
+
every one after it in the block. A comment between a declaration's name
|
|
185
|
+
and its `:` no longer drops the declarations that follow.
|
|
186
|
+
* A namespaced type selector in the middle of a compound (`.x|a`) raises
|
|
187
|
+
`Makiri::CSS::SyntaxError`, as browsers do.
|
|
188
|
+
* `:any-link` / `:link` match only an HTML `a` or `area`, or an SVG `a`, with
|
|
189
|
+
an `href` (`<link href>` and `<map>` matched). `:read-write` /
|
|
190
|
+
`:read-only` follow the HTML Standard (a checkbox is read-only, an element
|
|
191
|
+
inside `contenteditable` is read-write), and `:empty` ignores processing
|
|
192
|
+
instructions.
|
|
193
|
+
* HTML's `:nth-child` family counts element siblings only:
|
|
194
|
+
`html:first-child` matched nothing after `<!doctype html>`.
|
|
195
|
+
* An attribute keeps the namespace it was made in: `set_attribute_ns` in the
|
|
196
|
+
element's own namespace replaces the attribute it set before instead of
|
|
197
|
+
adding a second, and an attribute removed from its element keeps its
|
|
198
|
+
`namespace_uri`.
|
|
199
|
+
* An attribute name is serialized in the case it was set (`e["viewBox"]` on
|
|
200
|
+
an element in no namespace was written lower-cased).
|
|
201
|
+
* A void element's `#inner_html` is empty even when it has children, and a
|
|
202
|
+
prefixed HTML, SVG or MathML element is written by its local name.
|
|
203
|
+
* `Node#line` of a void element fostered out of a table is its line, not nil.
|
|
204
|
+
* Many namespaces created with `create_element_ns` no longer make lookups
|
|
205
|
+
quadratic.
|
|
206
|
+
* `HTML::Document#import_node` given a document raises "cannot import a
|
|
207
|
+
document; use #dup", as `#clone_node` does.
|
|
208
|
+
|
|
3
209
|
## [0.16.0] - 2026-10-10
|
|
4
210
|
|
|
5
211
|
### Added
|
data/NOKOGIRI_DIFFERENCES.md
CHANGED
|
@@ -41,11 +41,20 @@ what browsers do - rather than libxml2. Detailed, test-backed notes live in
|
|
|
41
41
|
and in XPath's data model. An `xmlns` on an HTML element is an ordinary
|
|
42
42
|
attribute and stays visible.
|
|
43
43
|
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
`
|
|
48
|
-
|
|
44
|
+
* Arguments are not converted
|
|
45
|
+
* Nokogiri calls `to_s` on an attribute value, text content or a variable
|
|
46
|
+
value (`node["n"] = 1`). Makiri takes a `String` for those, and a `String`
|
|
47
|
+
or a `Symbol` for a name; anything else is a `TypeError`. The parse
|
|
48
|
+
entries still take an IO or anything `String()` converts, and
|
|
49
|
+
`XML::Builder` converts with `to_s` as Nokogiri's does.
|
|
50
|
+
* An index is an `Integer`: `node_set[1.5]` and a Range with a Float end
|
|
51
|
+
are a `TypeError`, where Nokogiri (as `Array#[]`) truncates them.
|
|
52
|
+
|
|
53
|
+
* There are no custom XPath functions
|
|
54
|
+
* Nokogiri answers a function XPath does not define by calling a method of
|
|
55
|
+
a handler object (`xpath("my-fn(.)", handler)`). Makiri runs no Ruby while
|
|
56
|
+
it evaluates: a call to a function XPath 1.0 does not define is an
|
|
57
|
+
`XPath::SyntaxError`, and a handler argument is an `ArgumentError`.
|
|
49
58
|
|
|
50
59
|
* A number literal is read as the nearest double; libxml2's own reader is not
|
|
51
60
|
correctly rounded for a literal with more digits than a double holds, so
|
|
@@ -149,7 +158,7 @@ what browsers do - rather than libxml2. Detailed, test-backed notes live in
|
|
|
149
158
|
* `<?php ... ?>` in HTML input is a **ProcessingInstruction** node; `#to_html`
|
|
150
159
|
writes it back as `<?php ... ?>`, and `<?` at end of input is ignored.
|
|
151
160
|
* The HTML Standard added processing-instruction tokens and tree-construction
|
|
152
|
-
rules for them
|
|
161
|
+
rules for them, and Makiri's parser follows them. `Nokogiri::HTML5` (gumbo)
|
|
153
162
|
still produces the older bogus comment (`<!--?php ... ?-->`), and
|
|
154
163
|
`Nokogiri::HTML` (libxml2) its own comment.
|
|
155
164
|
|
|
@@ -158,17 +167,39 @@ what browsers do - rather than libxml2. Detailed, test-backed notes live in
|
|
|
158
167
|
Nokogiri's. `inner_html=`, `outer_html=` and `Node#parse` take no keyword.
|
|
159
168
|
`Nokogiri::HTML` (libxml2) instead stops at depth 256 and returns the
|
|
160
169
|
truncated document.
|
|
161
|
-
|
|
162
|
-
|
|
170
|
+
|
|
171
|
+
* A document's bytes are decoded by the HTML Standard's **encoding sniffing
|
|
172
|
+
algorithm**, with the Encoding Standard's decoders, and `Document#encoding`
|
|
173
|
+
is the encoding they were read in (`"Shift_JIS"`, `"windows-1252"`).
|
|
174
|
+
* A binary (ASCII-8BIT) or US-ASCII String with no `<meta>` charset is read
|
|
175
|
+
as UTF-8 when it is valid UTF-8 and is otherwise detected (Shift_JIS,
|
|
176
|
+
EUC-JP, ISO-2022-JP, ...), as browsers read a local file. One invalid
|
|
177
|
+
byte - a stray one, or a character cut off at the end - rules UTF-8 out,
|
|
178
|
+
and the whole document is read in the detected encoding; pass
|
|
179
|
+
`encoding: "utf-8"` for input known to be UTF-8, and only the bad bytes
|
|
180
|
+
become U+FFFD. `Nokogiri::HTML5` reads it as windows-1252, so valid
|
|
181
|
+
UTF-8 and Shift_JIS alike come out garbled.
|
|
182
|
+
* A `<meta>` charset past the first 1024 bytes re-reads the document in that
|
|
183
|
+
encoding, as browsers do; `Nokogiri::HTML5` ignores it.
|
|
184
|
+
* A String with an encoding is read in that encoding, and `encoding:` gives
|
|
185
|
+
one explicitly; a `<meta>` cannot override either. Both use the Encoding
|
|
186
|
+
Standard's decoders rather than Ruby's transcoders, so `ISO-8859-1` reads
|
|
187
|
+
as windows-1252 (`\x80` is `€`) and Shift_JIS's `0x8160` is U+301C, as in
|
|
188
|
+
browsers.
|
|
189
|
+
* `Nokogiri::HTML5`'s `#encoding` is always `"UTF-8"`.
|
|
163
190
|
|
|
164
191
|
## HTML mutation
|
|
165
192
|
|
|
193
|
+
* `Node#traverse` lists the subtree before the first node is yielded
|
|
194
|
+
* Nokogiri reads each node's children as it reaches it, so a block that
|
|
195
|
+
adds a node below or after the current one can have it visited. Makiri
|
|
196
|
+
visits the nodes there were when `traverse` was called, in the same
|
|
197
|
+
order (each node after its children).
|
|
166
198
|
* There is no `Node#name=` / `#node_name=` (on HTML or XML nodes). Nokogiri
|
|
167
199
|
renames a node in place and keeps its identity; the DOM has no rename, and
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
the old one (see CHANGELOG.md).
|
|
200
|
+
an element's tag decides what it is (a `<template>` owns its contents), so a
|
|
201
|
+
node cannot change its tag. Create an element of the new name, move the
|
|
202
|
+
attributes and children, and `replace` the old one (see CHANGELOG.md).
|
|
172
203
|
* Element and attribute names follow the WHATWG DOM's rules
|
|
173
204
|
* `create_element`, `[]=` and `set_attribute_ns` raise `ArgumentError` for a
|
|
174
205
|
name the DOM refuses - one holding whitespace, `/`, `>` (or `=` for an
|
|
@@ -224,26 +255,19 @@ what browsers do - rather than libxml2. Detailed, test-backed notes live in
|
|
|
224
255
|
* One exception to the DOM: an HTML attribute named `xml:lang` (in no
|
|
225
256
|
namespace) becomes the XML namespace's `xml:lang`, as the XML reader reads
|
|
226
257
|
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
258
|
* An XML element with a prefix, imported into HTML, keeps it (`h:div` in
|
|
234
259
|
XHTML has the local name `div`). Two readers then disagree, as they do in
|
|
235
|
-
browsers: CSS's `div` matches it (
|
|
236
|
-
`//div` does not (an HTML element's name test reads its qualified
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
element.
|
|
260
|
+
browsers: CSS's `div` matches it (the matcher compares the local name),
|
|
261
|
+
XPath's `//div` does not (an HTML element's name test reads its qualified
|
|
262
|
+
name). `#to_html` writes the local name (`<div>`), as the HTML standard
|
|
263
|
+
does.
|
|
240
264
|
|
|
241
265
|
## CSS
|
|
242
266
|
|
|
243
267
|
* Most jQuery/Nokogiri CSS extensions are not supported (`:gt`, `:lt`, `:eq`, `:first`, ...)
|
|
244
|
-
* Makiri
|
|
245
|
-
|
|
246
|
-
|
|
268
|
+
* Makiri's selector engine is standards-based. Use XPath
|
|
269
|
+
(`xpath("//p[contains(., 'x')]")`) or Enumerable (`css('li')[1]`) for the
|
|
270
|
+
rest.
|
|
247
271
|
Standard Level-4 selectors (`:is` / `:where` / `:has`) are supported; some of which Nokogiri rejects.
|
|
248
272
|
* There is no text-containment pseudo-class. Nokogiri's `:contains()` is
|
|
249
273
|
not supported, and neither is Lexbor's `:lexbor-contains()`: it raises
|
|
@@ -255,33 +279,45 @@ what browsers do - rather than libxml2. Detailed, test-backed notes live in
|
|
|
255
279
|
selector) is supported and correct on both HTML and XML - the "type" is the
|
|
256
280
|
element's own expanded name.
|
|
257
281
|
* Nokogiri (XML and HTML5) mistranslates these to first-/only-child
|
|
258
|
-
(`//*[position()=1]` / `//*[last()=1]`), so it under-matches; Makiri
|
|
259
|
-
|
|
260
|
-
*
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
*
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
282
|
+
(`//*[position()=1]` / `//*[last()=1]`), so it under-matches; Makiri does
|
|
283
|
+
not.
|
|
284
|
+
* CSS resolves a namespace prefix against the `{prefix => uri}` Hash
|
|
285
|
+
(`css(selector, ns)`), on HTML and XML alike: `svg|path` is the SVG `path`
|
|
286
|
+
once `svg` is bound, `|path` an element in no namespace, and a prefix the
|
|
287
|
+
Hash does not bind raises `Makiri::CSS::SyntaxError`. `[x|href]` finds the
|
|
288
|
+
XLink `href` once `x` is bound to XLink. The Hash's `"xmlns"` entry is the
|
|
289
|
+
default namespace, as CSS `@namespace` without a prefix sets one: a type or
|
|
290
|
+
universal selector without a prefix is then in it.
|
|
291
|
+
* Without a default, a bare type selector matches its name in any namespace
|
|
292
|
+
(`path` finds the SVG element, `entry` an Atom entry), as a browser's
|
|
293
|
+
`querySelectorAll` does. `Nokogiri::XML` binds a bare name to the root's
|
|
294
|
+
default namespace when no Hash is given, and to no namespace once one is;
|
|
295
|
+
pass `"xmlns" => uri` (or `"xmlns" => ""`) for that reading.
|
|
296
|
+
* `Makiri::XML` does not collect the document's own declarations: a prefix
|
|
297
|
+
is declared by the Hash or not at all. `Nokogiri::XML` collects the
|
|
298
|
+
root's.
|
|
299
|
+
* A bare `*` under a default namespace is in it, as CSS has it;
|
|
300
|
+
`Nokogiri::XML` matches any element.
|
|
301
|
+
* Up to 0.16 HTML accepted the Hash and ignored every prefix, and
|
|
302
|
+
`Makiri::XML` collected the root's declarations as Nokogiri does.
|
|
273
303
|
* A selector under a node matches the way `Element#querySelectorAll` does in a
|
|
274
|
-
browser, not scoped to that node, on HTML
|
|
275
|
-
`p` inside `#c` when `#c` is itself a
|
|
276
|
-
|
|
277
|
-
`Nokogiri::HTML5` and `Nokogiri::XML` scope
|
|
278
|
-
cannot be the `div`), and so
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
* The attribute case modifiers (`[a="x" i]`, `[a="x" s]`)
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
304
|
+
browser, not scoped to that node, on HTML and XML alike:
|
|
305
|
+
`at_css("#c").css("div p")` finds a `p` inside `#c` when `#c` is itself a
|
|
306
|
+
`div`, since the selector is matched against the whole tree and only the
|
|
307
|
+
results are kept to descendants. `Nokogiri::HTML5` and `Nokogiri::XML` scope
|
|
308
|
+
the selector to the node (`#c` cannot be the `div`), and so did
|
|
309
|
+
`Makiri::XML` up to 0.16. There is no `:scope`; for a scoped match, use XPath
|
|
310
|
+
from the node (`xpath(".//div//p")`).
|
|
311
|
+
* The attribute case modifiers (`[a="x" i]`, `[a="x" s]`) are supported on
|
|
312
|
+
both representations. Nokogiri refuses both on either.
|
|
313
|
+
* The form-state and link pseudo-classes (`:checked`, `:disabled`,
|
|
314
|
+
`:enabled`, `:required`, `:optional`, `:placeholder-shown`, `:link`, ...)
|
|
315
|
+
answer on `Makiri::XML` too, for XHTML elements, as browsers do in an XML
|
|
316
|
+
document; on any other element they match nothing. `Nokogiri::XML` refuses
|
|
317
|
+
them.
|
|
318
|
+
* A selector `Makiri` cannot run (the column combinator `||`, `:current()`)
|
|
319
|
+
raises `Makiri::CSS::SyntaxError`, as a browser's `querySelectorAll` throws a
|
|
320
|
+
SyntaxError, on both representations.
|
|
285
321
|
* `#matches?` answers for a DETACHED node (`document.create_element("p")
|
|
286
322
|
.matches?("p")` is true, on both representations). Nokogiri raises
|
|
287
323
|
`NoMethodError` there - it implements `#matches?` as a search from
|
|
@@ -294,7 +330,9 @@ what browsers do - rather than libxml2. Detailed, test-backed notes live in
|
|
|
294
330
|
therefore matches no type selector.
|
|
295
331
|
* `Nokogiri::HTML5` is case-sensitive on HTML elements too, so `LI` does not
|
|
296
332
|
match `<li>` there. `Makiri::XML`'s `#css` is case-sensitive, as XML names
|
|
297
|
-
are
|
|
333
|
+
are - an XHTML element's included, as in a browser's XML document - and so
|
|
334
|
+
are its attribute values, the HTML Standard's case-insensitive list of
|
|
335
|
+
attributes applying only to an HTML document.
|
|
298
336
|
|
|
299
337
|
## Serialization
|
|
300
338
|
|
|
@@ -310,6 +348,10 @@ what browsers do - rather than libxml2. Detailed, test-backed notes live in
|
|
|
310
348
|
disabled (its children are elements, not raw text) and escaping is what makes
|
|
311
349
|
that round-trip; `Nokogiri::HTML5` writes it literally and contradicts its own
|
|
312
350
|
parser there.
|
|
351
|
+
* An Attr serializes to the empty string (`attr.to_s`, `#to_html`,
|
|
352
|
+
`NodeSet#to_s` over attributes), as DOM Parsing's algorithm and Firefox
|
|
353
|
+
have it, in HTML and XML. Nokogiri's `Attr#to_s` is the value (`"a"`) and
|
|
354
|
+
its `#to_html` the markup (`id="a"`); use `#value` for the value.
|
|
313
355
|
|
|
314
356
|
## Text input (mutation APIs)
|
|
315
357
|
|
data/NOTICE
CHANGED
|
@@ -8,6 +8,57 @@ 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
|
+
|
|
18
|
+
* encoding_rs (linked into the native extension)
|
|
19
|
+
Copyright Mozilla Foundation
|
|
20
|
+
Licensed under the Apache License, Version 2.0 (at the licensee's option,
|
|
21
|
+
also the MIT license)
|
|
22
|
+
https://github.com/hsivonen/encoding_rs
|
|
23
|
+
|
|
24
|
+
encoding_rs includes data derived from the data files supplied with the
|
|
25
|
+
WHATWG Encoding Standard, under this license:
|
|
26
|
+
|
|
27
|
+
Copyright © WHATWG (Apple, Google, Mozilla, Microsoft).
|
|
28
|
+
|
|
29
|
+
Redistribution and use in source and binary forms, with or without
|
|
30
|
+
modification, are permitted provided that the following conditions are
|
|
31
|
+
met:
|
|
32
|
+
|
|
33
|
+
1. Redistributions of source code must retain the above copyright
|
|
34
|
+
notice, this list of conditions and the following disclaimer.
|
|
35
|
+
|
|
36
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
37
|
+
notice, this list of conditions and the following disclaimer in the
|
|
38
|
+
documentation and/or other materials provided with the distribution.
|
|
39
|
+
|
|
40
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
41
|
+
contributors may be used to endorse or promote products derived from
|
|
42
|
+
this software without specific prior written permission.
|
|
43
|
+
|
|
44
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
45
|
+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
46
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
47
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
48
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
49
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
50
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
51
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
52
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
53
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
54
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
55
|
+
|
|
56
|
+
* chardetng (linked into the native extension)
|
|
57
|
+
Copyright Mozilla Foundation
|
|
58
|
+
Licensed under the Apache License, Version 2.0 (at the licensee's option,
|
|
59
|
+
also the MIT license)
|
|
60
|
+
https://github.com/hsivonen/chardetng
|
|
61
|
+
|
|
11
62
|
The XPath 1.0 engine under ext/makiri/rust/src/xpath/ is an original
|
|
12
63
|
implementation written for this project. No code is derived from libxml2 or
|
|
13
64
|
libxslt.
|
data/README.md
CHANGED
|
@@ -2,34 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
Makiri is a Ruby library for parsing and querying HTML and XML documents.
|
|
4
4
|
|
|
5
|
-
It
|
|
6
|
-
Makiri does not depend on libxml2.
|
|
5
|
+
It parses HTML with a Rust port of [Lexbor](https://lexbor.com/)'s HTML5 parser, and has its own CSS selector matcher, XPath 1.0 engine and XML 1.0 parser.
|
|
6
|
+
Makiri does not depend on libxml2, and links no C library at all.
|
|
7
7
|
|
|
8
8
|
> [!WARNING]
|
|
9
9
|
> Status: early release. APIs and behavior may change before v1.0.
|
|
10
10
|
|
|
11
11
|
## What / Why
|
|
12
12
|
|
|
13
|
-
Makiri
|
|
14
|
-
XPath 1.0
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*
|
|
19
|
-
|
|
13
|
+
Makiri is one Rust extension: an HTML5 parser ported from Lexbor, CSS
|
|
14
|
+
selectors, an XPath 1.0 engine and an XML 1.0 parser, with no libxml2
|
|
15
|
+
dependency.
|
|
16
|
+
|
|
17
|
+
* HTML5 parsing
|
|
18
|
+
* A Rust port of Lexbor's tokenizer and tree builder, into a compact DOM of
|
|
19
|
+
Makiri's own. It is held to the vendored Lexbor (which the gem does not
|
|
20
|
+
ship) and to the html5lib tests.
|
|
21
|
+
* CSS selectors
|
|
22
|
+
* Selectors 4, including `:is`/`:where`/`:not`/`:has` and `:nth-child(... of S)`,
|
|
23
|
+
matched by one engine for HTML and XML and checked against Chromium,
|
|
24
|
+
Firefox and WebKit's `querySelectorAll`.
|
|
20
25
|
* Native XPath 1.0 engine
|
|
21
26
|
* XPath is parsed and evaluated by Makiri's own engine, written from scratch.
|
|
22
27
|
* Makiri does not depend on libxml2 for parsing, DOM representation, or XPath evaluation.
|
|
23
28
|
* Native XML 1.0 parser
|
|
24
29
|
* A strict, non-validating, fail-closed parser with its own node arena (not
|
|
25
|
-
|
|
30
|
+
the HTML DOM), queried through the same native XPath engine, with
|
|
26
31
|
in-place tree edits (attributes, content, remove).
|
|
27
32
|
* Conformance is held by the W3C XML Conformance Test Suite, an XPath
|
|
28
33
|
differential, and property-based testing vs Nokogiri (see below).
|
|
29
34
|
* Bounded, fail-closed execution
|
|
30
35
|
* 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)
|
|
32
|
-
`<option>`s per `<select>` (10,000).
|
|
36
|
+
* HTML parsing bounds the tree depth (`max_tree_depth:`, default 400).
|
|
33
37
|
* Ownership and borrowing are kept explicit across layers, with owned/borrowed
|
|
34
38
|
string types and verified text at engine boundaries.
|
|
35
39
|
* Programmatic invalid input, limit violations, allocation failures, and unsupported constructs
|
|
@@ -50,7 +54,7 @@ doc = Makiri::HTML(<<~HTML)
|
|
|
50
54
|
</body></html>
|
|
51
55
|
HTML
|
|
52
56
|
|
|
53
|
-
# CSS selectors
|
|
57
|
+
# CSS selectors
|
|
54
58
|
doc.css("a").map { |a| a["href"] } # => ["/a", "/b"]
|
|
55
59
|
doc.at_css("p.lead").text # => "Hello"
|
|
56
60
|
|
|
@@ -64,9 +68,14 @@ link = doc.at_css("a")
|
|
|
64
68
|
link["href"] # => "/a"
|
|
65
69
|
link.parent.name # => "div"
|
|
66
70
|
|
|
67
|
-
# Source location (
|
|
71
|
+
# Source location (the line of the element's start tag)
|
|
68
72
|
doc.at_css("p").line # => 3
|
|
69
73
|
|
|
74
|
+
# Bytes are decoded as a browser decodes them: BOM, <meta charset>, else
|
|
75
|
+
# UTF-8 or a detected legacy encoding (or say which with encoding:)
|
|
76
|
+
Makiri::HTML(File.binread("legacy.html")).encoding # => "Shift_JIS"
|
|
77
|
+
Makiri::HTML(bytes, encoding: "euc-jp")
|
|
78
|
+
|
|
70
79
|
# Nesting deeper than 400 elements raises Makiri::Error (Nokogiri's default);
|
|
71
80
|
# max_tree_depth: raises the limit, and a negative value disables it
|
|
72
81
|
Makiri::HTML(deep_html, max_tree_depth: 2000)
|
|
@@ -109,9 +118,10 @@ el = doc.at_xpath("//a:entry", ns)
|
|
|
109
118
|
el.local_name # => "entry"
|
|
110
119
|
el.namespace_uri # => "http://www.w3.org/2005/Atom"
|
|
111
120
|
|
|
112
|
-
# CSS selectors work too
|
|
113
|
-
#
|
|
121
|
+
# CSS selectors work too, as in a browser: a bare type selector matches its
|
|
122
|
+
# name in any namespace, so this just works.
|
|
114
123
|
doc.css("entry").length # => 2
|
|
124
|
+
doc.css("a|entry", ns).length # => 2 (a prefix the Hash binds)
|
|
115
125
|
doc.css("feed > entry").map { |e| e.at_css("title").text } # => ["Hello", "World"]
|
|
116
126
|
|
|
117
127
|
# Serialize back to XML
|
|
@@ -239,11 +249,14 @@ The HTML XPath and CSS suites are differentials against `Nokogiri::HTML5`
|
|
|
239
249
|
HTML5, so the DOM is isomorphic and results are compared node-for-node. HTML
|
|
240
250
|
parsing itself is checked against the WHATWG html5lib-tests corpus, and
|
|
241
251
|
XPath-over-HTML semantics additionally against browsers via a WPT port.
|
|
252
|
+
HTML parsing and CSS selectors are also run in Chromium, Firefox and WebKit,
|
|
253
|
+
which are the reference where they and Nokogiri disagree.
|
|
242
254
|
See also [`spec/conformance/README.md`](spec/conformance/README.md).
|
|
243
255
|
|
|
244
256
|
| Suite | Input | Oracle | `rake` task |
|
|
245
257
|
|---|---|---|---|
|
|
246
258
|
| HTML parsing | HTML | WHATWG html5lib-tests (expected-tree corpus) | `conformance:html5` |
|
|
259
|
+
| HTML parsing | HTML | Chromium, Firefox, WebKit (Playwright) | `conformance:browsers` |
|
|
247
260
|
| XPath 1.0 | HTML | `Nokogiri::HTML5` (libxml2 XPath) — differential | `conformance:xpath` |
|
|
248
261
|
| XPath over HTML | HTML | browsers (WPT `domxpath`, hand-ported; runs under `rake spec`) | — |
|
|
249
262
|
| CSS selectors | HTML | `Nokogiri::HTML5#css` — differential | `conformance:css` |
|
|
@@ -251,15 +264,19 @@ See also [`spec/conformance/README.md`](spec/conformance/README.md).
|
|
|
251
264
|
| XPath 1.0 | XML | `Nokogiri::XML` — differential | `conformance:xpath_xml` |
|
|
252
265
|
| Parsed tree (property-based) | XML | `Nokogiri::XML` — differential | `conformance:xml_pbt` |
|
|
253
266
|
| CSS selectors | XML | `Nokogiri::XML` — differential | `conformance:css_xml` |
|
|
267
|
+
| CSS selectors | HTML, XML | Chromium, Firefox, WebKit `querySelectorAll` (Playwright) | `conformance:css_browsers` |
|
|
254
268
|
| XML Builder | Ruby DSL | `Nokogiri::XML::Builder` — differential | `conformance:builder` |
|
|
255
269
|
|
|
256
270
|
## Requirements
|
|
257
271
|
|
|
258
|
-
* CRuby 3.
|
|
259
|
-
*
|
|
272
|
+
* CRuby 3.3 or newer.
|
|
273
|
+
* Rust 1.84 or newer with `cargo` - the extension is a Rust crate. (Binary
|
|
274
|
+
gems are published for the common platforms, which need no toolchain.)
|
|
260
275
|
* libclang (clang's development library): rb-sys runs bindgen at build time and
|
|
261
276
|
reads Ruby's headers through it.
|
|
262
|
-
|
|
277
|
+
|
|
278
|
+
Development also needs CMake and a C toolchain, to build the vendored Lexbor
|
|
279
|
+
that the Rust port is tested against (`rake lexbor`).
|
|
263
280
|
|
|
264
281
|
## Build (development)
|
|
265
282
|
|