From f74bce4fb8754b6277aca2dbfcc9fbe8f8d56c3c Mon Sep 17 00:00:00 2001 From: Darnell Andries Date: Fri, 14 Feb 2025 16:55:49 -0800 Subject: [PATCH] Vendor Rust scraper library --- .../browser/document_extractor/Cargo.toml | 3 +- .../rust/chromium_crates_io/Cargo.lock | 91 +- .../rust/chromium_crates_io/gnrt_config.toml | 18 +- .../.cargo-checksum.json | 0 .../cssparser-0.34.0/.cargo_vcs_info.json | 6 + .../.github/workflows/main.yml | 81 + .../vendor/cssparser-0.34.0/.gitignore | 3 + .../vendor/cssparser-0.34.0/Cargo.toml | 70 + .../vendor/cssparser-0.34.0/Cargo.toml.orig | 41 + .../LICENSE | 0 .../vendor/cssparser-0.34.0/README.md | 57 + .../vendor/cssparser-0.34.0/docs/.nojekyll | 0 .../vendor/cssparser-0.34.0/docs/404.html | 3 + .../vendor/cssparser-0.34.0/docs/index.html | 3 + .../vendor/cssparser-0.34.0/src/color.rs | 348 ++ .../vendor/cssparser-0.34.0/src/cow_rc_str.rs | 185 + .../vendor/cssparser-0.34.0/src/from_bytes.rs | 64 + .../vendor/cssparser-0.34.0/src/lib.rs | 108 + .../vendor/cssparser-0.34.0/src/macros.rs | 204 + .../vendor/cssparser-0.34.0/src/nth.rs | 145 + .../vendor/cssparser-0.34.0/src/parser.rs | 1175 ++++ .../src/rules_and_declarations.rs | 538 ++ .../vendor/cssparser-0.34.0/src/serializer.rs | 591 +++ .../cssparser-0.34.0/src/size_of_tests.rs | 52 + .../vendor/cssparser-0.34.0/src/tests.rs | 1352 +++++ .../vendor/cssparser-0.34.0/src/tokenizer.rs | 1407 +++++ .../cssparser-0.34.0/src/unicode_range.rs | 179 + .../.cargo_vcs_info.json | 5 - .../vendor/cssparser-macros-0.6.0/lib.rs | 39 - .../.cargo-checksum.json | 1 + .../.cargo_vcs_info.json | 6 + .../Cargo.toml | 19 +- .../Cargo.toml.orig | 4 +- .../vendor/cssparser-macros-0.6.1/LICENSE | 373 ++ .../vendor/cssparser-macros-0.6.1/lib.rs | 190 + .../ego-tree-0.10.0/.cargo-checksum.json | 1 + .../ego-tree-0.10.0/.cargo_vcs_info.json | 6 + .../ego-tree-0.10.0/.github/dependabot.yml | 11 + .../.github/workflows/test.yml | 47 + .../vendor/ego-tree-0.10.0/.gitignore | 4 + .../vendor/ego-tree-0.10.0/Cargo.toml | 87 + .../vendor/ego-tree-0.10.0/Cargo.toml.orig | 23 + .../vendor/ego-tree-0.10.0/LICENSE | 13 + .../vendor/ego-tree-0.10.0/README.md | 123 + .../ego-tree-0.10.0/examples/simple_tree.rs | 28 + .../vendor/ego-tree-0.10.0/src/display.rs | 89 + .../vendor/ego-tree-0.10.0/src/iter.rs | 356 ++ .../vendor/ego-tree-0.10.0/src/lib.rs | 939 ++++ .../vendor/ego-tree-0.10.0/src/serde.rs | 157 + .../vendor/ego-tree-0.10.0/src/sort.rs | 120 + .../vendor/ego-tree-0.10.0/tests/iter.rs | 236 + .../vendor/ego-tree-0.10.0/tests/macro.rs | 165 + .../vendor/ego-tree-0.10.0/tests/node_mut.rs | 429 ++ .../vendor/ego-tree-0.10.0/tests/node_ref.rs | 83 + .../vendor/ego-tree-0.10.0/tests/serde.rs | 96 + .../vendor/ego-tree-0.10.0/tests/sort.rs | 91 + .../vendor/ego-tree-0.10.0/tests/subtree.rs | 35 + .../vendor/ego-tree-0.10.0/tests/tree.rs | 240 + .../getopts-0.2.21/.cargo-checksum.json | 1 + .../getopts-0.2.21/.cargo_vcs_info.json | 5 + .../getopts-0.2.21/.github/workflows/main.yml | 15 + .../vendor/getopts-0.2.21/.gitignore | 6 + .../vendor/getopts-0.2.21/Cargo.toml | 40 + .../vendor/getopts-0.2.21/Cargo.toml.orig | 25 + .../vendor/getopts-0.2.21/LICENSE-APACHE | 201 + .../vendor/getopts-0.2.21/LICENSE-MIT | 25 + .../vendor/getopts-0.2.21/README.md | 15 + .../vendor/getopts-0.2.21/src/lib.rs | 1046 ++++ .../vendor/getopts-0.2.21/src/tests/mod.rs | 1254 +++++ .../vendor/getopts-0.2.21/tests/smoke.rs | 8 + .../phf_macros-0.11.3/.cargo-checksum.json | 1 + .../phf_macros-0.11.3/.cargo_vcs_info.json | 6 + .../vendor/phf_macros-0.11.3/CHANGELOG.md | 361 ++ .../vendor/phf_macros-0.11.3/Cargo.lock | 97 + .../vendor/phf_macros-0.11.3/Cargo.toml | 62 + .../vendor/phf_macros-0.11.3/Cargo.toml.orig | 26 + .../vendor/phf_macros-0.11.3/LICENSE | 20 + .../vendor/phf_macros-0.11.3/README.md | 127 + .../vendor/phf_macros-0.11.3/src/lib.rs | 338 ++ .../scraper-0.22.0/.cargo-checksum.json | 1 + .../scraper-0.22.0/.cargo_vcs_info.json | 6 + .../vendor/scraper-0.22.0/Cargo.lock | 626 +++ .../vendor/scraper-0.22.0/Cargo.toml | 84 + .../vendor/scraper-0.22.0/Cargo.toml.orig | 38 + .../vendor/scraper-0.22.0/LICENSE | 1 + .../vendor/scraper-0.22.0/README.md | 1 + .../scraper-0.22.0/examples/document.rs | 28 + .../scraper-0.22.0/examples/fragment.rs | 28 + .../vendor/scraper-0.22.0/scraper.1 | 72 + .../scraper-0.22.0/src/element_ref/element.rs | 212 + .../scraper-0.22.0/src/element_ref/mod.rs | 236 + .../src/element_ref/serializable.rs | 15 + .../vendor/scraper-0.22.0/src/error.rs | 119 + .../vendor/scraper-0.22.0/src/error/utils.rs | 91 + .../vendor/scraper-0.22.0/src/html/mod.rs | 269 + .../scraper-0.22.0/src/html/serializable.rs | 27 + .../scraper-0.22.0/src/html/tree_sink.rs | 297 ++ .../vendor/scraper-0.22.0/src/lib.rs | 182 + .../vendor/scraper-0.22.0/src/main.rs | 132 + .../vendor/scraper-0.22.0/src/node.rs | 388 ++ .../scraper-0.22.0/src/node/serializable.rs | 52 + .../vendor/scraper-0.22.0/src/selectable.rs | 70 + .../vendor/scraper-0.22.0/src/selector.rs | 257 + .../vendor/scraper-0.22.0/src/test.rs | 46 + .../selectors-0.26.0/.cargo-checksum.json | 1 + .../selectors-0.26.0/.cargo_vcs_info.json | 6 + .../vendor/selectors-0.26.0/CHANGES.md | 1 + .../vendor/selectors-0.26.0/Cargo.toml | 88 + .../vendor/selectors-0.26.0/Cargo.toml.orig | 37 + .../vendor/selectors-0.26.0/README.md | 25 + .../vendor/selectors-0.26.0/attr.rs | 196 + .../vendor/selectors-0.26.0/bloom.rs | 422 ++ .../vendor/selectors-0.26.0/build.rs | 77 + .../vendor/selectors-0.26.0/builder.rs | 425 ++ .../vendor/selectors-0.26.0/context.rs | 466 ++ .../vendor/selectors-0.26.0/kleene_value.rs | 134 + .../vendor/selectors-0.26.0/lib.rs | 23 + .../vendor/selectors-0.26.0/matching.rs | 1516 ++++++ .../selectors-0.26.0/nth_index_cache.rs | 102 + .../vendor/selectors-0.26.0/parser.rs | 4711 +++++++++++++++++ .../relative_selector/cache.rs | 81 + .../relative_selector/filter.rs | 159 + .../selectors-0.26.0/relative_selector/mod.rs | 6 + .../vendor/selectors-0.26.0/sink.rs | 31 + .../vendor/selectors-0.26.0/tree.rs | 181 + .../vendor/selectors-0.26.0/visitor.rs | 137 + .../servo_arc-0.4.0/.cargo-checksum.json | 1 + .../servo_arc-0.4.0/.cargo_vcs_info.json | 6 + .../vendor/servo_arc-0.4.0/Cargo.toml | 44 + .../vendor/servo_arc-0.4.0/Cargo.toml.orig | 21 + .../vendor/servo_arc-0.4.0/LICENSE-APACHE | 201 + .../vendor/servo_arc-0.4.0/LICENSE-MIT | 23 + .../vendor/servo_arc-0.4.0/lib.rs | 1198 +++++ third_party/rust/cssparser/v0_27/BUILD.gn | 8 +- third_party/rust/cssparser/v0_28/BUILD.gn | 8 +- third_party/rust/cssparser/v0_34/BUILD.gn | 61 + .../rust/cssparser/v0_34/README.chromium | 10 + .../rust/cssparser_macros/v0_6/BUILD.gn | 12 +- .../cssparser_macros/v0_6/README.chromium | 6 +- third_party/rust/ego_tree/v0_10/BUILD.gn | 40 + .../rust/ego_tree/v0_10/README.chromium | 10 + third_party/rust/getopts/v0_2/BUILD.gn | 38 + third_party/rust/getopts/v0_2/README.chromium | 11 + third_party/rust/phf/v0_11/BUILD.gn | 11 +- third_party/rust/phf_macros/v0_11/BUILD.gn | 44 + .../rust/phf_macros/v0_11/README.chromium | 10 + third_party/rust/phf_macros/v0_8/BUILD.gn | 3 + third_party/rust/scraper/v0_22/BUILD.gn | 64 + .../rust/scraper/v0_22/README.chromium | 10 + third_party/rust/selectors/v0_26/BUILD.gn | 75 + .../rust/selectors/v0_26/README.chromium | 10 + third_party/rust/servo_arc/v0_4/BUILD.gn | 40 + .../rust/servo_arc/v0_4/README.chromium | 10 + third_party/rust/unicode_width/v0_1/BUILD.gn | 8 + .../rust/unicode_width/v0_1/README.chromium | 11 + 155 files changed, 28436 insertions(+), 80 deletions(-) rename third_party/rust/chromium_crates_io/vendor/{cssparser-macros-0.6.0 => cssparser-0.34.0}/.cargo-checksum.json (100%) create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/.cargo_vcs_info.json create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/.github/workflows/main.yml create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/.gitignore create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/Cargo.toml create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/Cargo.toml.orig rename third_party/rust/chromium_crates_io/vendor/{cssparser-macros-0.6.0 => cssparser-0.34.0}/LICENSE (100%) create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/README.md create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/docs/.nojekyll create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/docs/404.html create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/docs/index.html create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/src/color.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/src/cow_rc_str.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/src/from_bytes.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/src/lib.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/src/macros.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/src/nth.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/src/parser.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/src/rules_and_declarations.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/src/serializer.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/src/size_of_tests.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/src/tests.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/src/tokenizer.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/src/unicode_range.rs delete mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-macros-0.6.0/.cargo_vcs_info.json delete mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-macros-0.6.0/lib.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-macros-0.6.1/.cargo-checksum.json create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-macros-0.6.1/.cargo_vcs_info.json rename third_party/rust/chromium_crates_io/vendor/{cssparser-macros-0.6.0 => cssparser-macros-0.6.1}/Cargo.toml (63%) rename third_party/rust/chromium_crates_io/vendor/{cssparser-macros-0.6.0 => cssparser-macros-0.6.1}/Cargo.toml.orig (81%) create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-macros-0.6.1/LICENSE create mode 100644 third_party/rust/chromium_crates_io/vendor/cssparser-macros-0.6.1/lib.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/.cargo-checksum.json create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/.cargo_vcs_info.json create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/.github/dependabot.yml create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/.github/workflows/test.yml create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/.gitignore create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/Cargo.toml create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/Cargo.toml.orig create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/LICENSE create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/README.md create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/examples/simple_tree.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/src/display.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/src/iter.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/src/lib.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/src/serde.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/src/sort.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/tests/iter.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/tests/macro.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/tests/node_mut.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/tests/node_ref.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/tests/serde.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/tests/sort.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/tests/subtree.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/ego-tree-0.10.0/tests/tree.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/getopts-0.2.21/.cargo-checksum.json create mode 100644 third_party/rust/chromium_crates_io/vendor/getopts-0.2.21/.cargo_vcs_info.json create mode 100644 third_party/rust/chromium_crates_io/vendor/getopts-0.2.21/.github/workflows/main.yml create mode 100644 third_party/rust/chromium_crates_io/vendor/getopts-0.2.21/.gitignore create mode 100644 third_party/rust/chromium_crates_io/vendor/getopts-0.2.21/Cargo.toml create mode 100644 third_party/rust/chromium_crates_io/vendor/getopts-0.2.21/Cargo.toml.orig create mode 100644 third_party/rust/chromium_crates_io/vendor/getopts-0.2.21/LICENSE-APACHE create mode 100644 third_party/rust/chromium_crates_io/vendor/getopts-0.2.21/LICENSE-MIT create mode 100644 third_party/rust/chromium_crates_io/vendor/getopts-0.2.21/README.md create mode 100644 third_party/rust/chromium_crates_io/vendor/getopts-0.2.21/src/lib.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/getopts-0.2.21/src/tests/mod.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/getopts-0.2.21/tests/smoke.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/phf_macros-0.11.3/.cargo-checksum.json create mode 100644 third_party/rust/chromium_crates_io/vendor/phf_macros-0.11.3/.cargo_vcs_info.json create mode 100644 third_party/rust/chromium_crates_io/vendor/phf_macros-0.11.3/CHANGELOG.md create mode 100644 third_party/rust/chromium_crates_io/vendor/phf_macros-0.11.3/Cargo.lock create mode 100644 third_party/rust/chromium_crates_io/vendor/phf_macros-0.11.3/Cargo.toml create mode 100644 third_party/rust/chromium_crates_io/vendor/phf_macros-0.11.3/Cargo.toml.orig create mode 100644 third_party/rust/chromium_crates_io/vendor/phf_macros-0.11.3/LICENSE create mode 100644 third_party/rust/chromium_crates_io/vendor/phf_macros-0.11.3/README.md create mode 100644 third_party/rust/chromium_crates_io/vendor/phf_macros-0.11.3/src/lib.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/.cargo-checksum.json create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/.cargo_vcs_info.json create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/Cargo.lock create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/Cargo.toml create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/Cargo.toml.orig create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/LICENSE create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/README.md create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/examples/document.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/examples/fragment.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/scraper.1 create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/src/element_ref/element.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/src/element_ref/mod.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/src/element_ref/serializable.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/src/error.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/src/error/utils.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/src/html/mod.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/src/html/serializable.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/src/html/tree_sink.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/src/lib.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/src/main.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/src/node.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/src/node/serializable.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/src/selectable.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/src/selector.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/scraper-0.22.0/src/test.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/.cargo-checksum.json create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/.cargo_vcs_info.json create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/CHANGES.md create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/Cargo.toml create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/Cargo.toml.orig create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/README.md create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/attr.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/bloom.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/build.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/builder.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/context.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/kleene_value.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/lib.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/matching.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/nth_index_cache.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/parser.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/relative_selector/cache.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/relative_selector/filter.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/relative_selector/mod.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/sink.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/tree.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/selectors-0.26.0/visitor.rs create mode 100644 third_party/rust/chromium_crates_io/vendor/servo_arc-0.4.0/.cargo-checksum.json create mode 100644 third_party/rust/chromium_crates_io/vendor/servo_arc-0.4.0/.cargo_vcs_info.json create mode 100644 third_party/rust/chromium_crates_io/vendor/servo_arc-0.4.0/Cargo.toml create mode 100644 third_party/rust/chromium_crates_io/vendor/servo_arc-0.4.0/Cargo.toml.orig create mode 100644 third_party/rust/chromium_crates_io/vendor/servo_arc-0.4.0/LICENSE-APACHE create mode 100644 third_party/rust/chromium_crates_io/vendor/servo_arc-0.4.0/LICENSE-MIT create mode 100644 third_party/rust/chromium_crates_io/vendor/servo_arc-0.4.0/lib.rs create mode 100644 third_party/rust/cssparser/v0_34/BUILD.gn create mode 100644 third_party/rust/cssparser/v0_34/README.chromium create mode 100644 third_party/rust/ego_tree/v0_10/BUILD.gn create mode 100644 third_party/rust/ego_tree/v0_10/README.chromium create mode 100644 third_party/rust/getopts/v0_2/BUILD.gn create mode 100644 third_party/rust/getopts/v0_2/README.chromium create mode 100644 third_party/rust/phf_macros/v0_11/BUILD.gn create mode 100644 third_party/rust/phf_macros/v0_11/README.chromium create mode 100644 third_party/rust/scraper/v0_22/BUILD.gn create mode 100644 third_party/rust/scraper/v0_22/README.chromium create mode 100644 third_party/rust/selectors/v0_26/BUILD.gn create mode 100644 third_party/rust/selectors/v0_26/README.chromium create mode 100644 third_party/rust/servo_arc/v0_4/BUILD.gn create mode 100644 third_party/rust/servo_arc/v0_4/README.chromium create mode 100644 third_party/rust/unicode_width/v0_1/BUILD.gn create mode 100644 third_party/rust/unicode_width/v0_1/README.chromium diff --git a/components/web_discovery/browser/document_extractor/Cargo.toml b/components/web_discovery/browser/document_extractor/Cargo.toml index 3211320d6dcc..efb3afae020b 100644 --- a/components/web_discovery/browser/document_extractor/Cargo.toml +++ b/components/web_discovery/browser/document_extractor/Cargo.toml @@ -7,8 +7,7 @@ license = "MPL-2.0" [dependencies] cxx = "1" -kuchikiki = "0.8.7-speedreader" -html5ever = "0.29.1" +scraper = "0.22" [lib] name = "document_extractor_cxx" diff --git a/third_party/rust/chromium_crates_io/Cargo.lock b/third_party/rust/chromium_crates_io/Cargo.lock index bbf6dee5e77b..9a6ceecb4a36 100644 --- a/third_party/rust/chromium_crates_io/Cargo.lock +++ b/third_party/rust/chromium_crates_io/Cargo.lock @@ -533,13 +533,25 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "cssparser" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa 1.0.14", + "phf 0.11.3", + "smallvec", +] + [[package]] name = "cssparser-macros" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote", - "syn 1.0.109", + "syn 2.0.96", ] [[package]] @@ -672,8 +684,7 @@ name = "document-extractor" version = "0.1.0" dependencies = [ "cxx", - "html5ever", - "kuchikiki", + "scraper", ] [[package]] @@ -689,6 +700,11 @@ dependencies = [ "dtoa", ] +[[package]] +name = "ego-tree" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "either" version = "1.8.1" @@ -990,6 +1006,14 @@ dependencies = [ "version_check", ] +[[package]] +name = "getopts" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-width", +] + [[package]] name = "getrandom" version = "0.1.16" @@ -1643,7 +1667,7 @@ name = "phf" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "phf_macros", + "phf_macros 0.8.0", "phf_shared 0.8.0", "proc-macro-hack", ] @@ -1653,6 +1677,7 @@ name = "phf" version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "phf_macros 0.11.3", "phf_shared 0.11.3", ] @@ -1714,6 +1739,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_generator 0.11.3", + "phf_shared 0.11.3", + "proc-macro2", + "quote", + "syn 2.0.96", +] + [[package]] name = "phf_shared" version = "0.8.0" @@ -2024,6 +2061,20 @@ name = "scopeguard" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "scraper" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cssparser 0.34.0", + "ego-tree", + "getopts", + "html5ever", + "precomputed-hash", + "selectors 0.26.0", + "tendril", +] + [[package]] name = "seahash" version = "3.0.7" @@ -2043,7 +2094,7 @@ dependencies = [ "phf 0.8.0", "phf_codegen 0.8.0", "precomputed-hash", - "servo_arc", + "servo_arc 0.1.1", "smallvec", "thin-slice", ] @@ -2061,7 +2112,25 @@ dependencies = [ "phf 0.8.0", "phf_codegen 0.8.0", "precomputed-hash", - "servo_arc", + "servo_arc 0.1.1", + "smallvec", +] + +[[package]] +name = "selectors" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 2.8.0", + "cssparser 0.34.0", + "derive_more", + "fxhash", + "log", + "new_debug_unreachable", + "phf 0.11.3", + "phf_codegen 0.11.3", + "precomputed-hash", + "servo_arc 0.4.0", "smallvec", ] @@ -2152,6 +2221,14 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "servo_arc" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "stable_deref_trait", +] + [[package]] name = "sha2" version = "0.9.9" diff --git a/third_party/rust/chromium_crates_io/gnrt_config.toml b/third_party/rust/chromium_crates_io/gnrt_config.toml index 67cb0047ffc7..344938233a1c 100644 --- a/third_party/rust/chromium_crates_io/gnrt_config.toml +++ b/third_party/rust/chromium_crates_io/gnrt_config.toml @@ -153,9 +153,13 @@ if (is_apple && target_cpu == "arm64") { build_script_outputs = [ "lib.rs" ] [crate.cssparser] -build_script_outputs = [ "tokenizer.rs" ] -extra_build_script_src_roots = [ "../build" ] license_files = ['LICENSE'] +extra_kv = { raw_gn = ''' +if (epoch == "0.28" || epoch == "0.27") { + build_script_inputs = [ "//brave/third_party/rust/chromium_crates_io/vendor/cssparser-" + cargo_pkg_version + "/build/match_byte.rs" ] + build_script_outputs = [ "tokenizer.rs" ] + } +''' } [crate.cssparser-macros] license_files = ['LICENSE'] @@ -283,6 +287,13 @@ license_files = ['LICENSE-Apache'] [crate.num-traits] extra_kv = { rustflags = [ "--cfg", "has_i128", "--cfg", "has_to_int_unchecked", "--cfg", "has_reverse_bits", "--cfg", "has_leading_trailing_ones", "--cfg", "has_int_assignop_ref", "--cfg", "has_div_euclid", "--cfg", "has_copysign" ] } +[crate.phf_macros] +extra_kv = { raw_gn = ''' +if (epoch == "0.11") { + output_name = "phf_macros_v0_11" +} +''' } + [crate.powerfmt] license_files = ['LICENSE-Apache'] @@ -374,6 +385,9 @@ extra_kv = { rustenv = [ "TYPENUM_BUILD_CONSTS=\" + rebase_path(target_gen_dir) [crate.uint] license_files = ['../../../../../common/licenses/Apache-2.0'] +[crate.unicode-width] +license_files = ['../../../../../common/licenses/Apache-2.0'] + [crate.wasi] license_files = ['../../../../../common/licenses/Apache-2.0'] diff --git a/third_party/rust/chromium_crates_io/vendor/cssparser-macros-0.6.0/.cargo-checksum.json b/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/.cargo-checksum.json similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/cssparser-macros-0.6.0/.cargo-checksum.json rename to third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/.cargo-checksum.json diff --git a/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/.cargo_vcs_info.json b/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/.cargo_vcs_info.json new file mode 100644 index 000000000000..7e6f5be881e6 --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "5dc6d916a73159745e1fc1dd1f745e05d3130b0f" + }, + "path_in_vcs": "" +} \ No newline at end of file diff --git a/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/.github/workflows/main.yml b/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/.github/workflows/main.yml new file mode 100644 index 000000000000..b08ddef76de7 --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/.github/workflows/main.yml @@ -0,0 +1,81 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + merge_group: + types: [checks_requested] + +jobs: + linux-ci: + name: Linux + runs-on: ubuntu-latest + strategy: + matrix: + toolchain: + - nightly + - beta + - stable + - 1.63.0 + features: + - + - --features dummy_match_byte + include: + - toolchain: nightly + features: --features bench + - toolchain: nightly + features: --features bench,dummy_match_byte + steps: + - uses: actions/checkout@v2 + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.toolchain }} + override: true + components: rustfmt, clippy, ${{ matrix.toolchain == 'nightly' && 'miri,rust-src' || '' }} + + - name: Cargo format & lint + run: cargo fmt --check && cargo clippy -- -Dwarnings + + - name: Cargo build + run: cargo build ${{ matrix.features }} + + - name: Cargo doc + run: cargo doc ${{ matrix.features }} + + - name: Cargo test + run: cargo test ${{ matrix.features }} + + - name: macros build + run: cargo build + working-directory: macros + + - name: Color build + run: cargo build + working-directory: color + + - name: Color test + run: cargo test + working-directory: color + + - name: Cargo miri test + if: "matrix.toolchain == 'nightly'" + run: cargo miri test --features skip_long_tests ${{ matrix.features }} + + build_result: + name: Result + runs-on: ubuntu-latest + needs: + - "linux-ci" + + steps: + - name: Mark the job as successful + run: exit 0 + if: success() + - name: Mark the job as unsuccessful + run: exit 1 + if: "!success()" diff --git a/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/.gitignore b/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/.gitignore new file mode 100644 index 000000000000..0b837eae334b --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/.gitignore @@ -0,0 +1,3 @@ +target +/Cargo.lock +/.cargo/config diff --git a/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/Cargo.toml b/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/Cargo.toml new file mode 100644 index 000000000000..bceceea9d289 --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/Cargo.toml @@ -0,0 +1,70 @@ +# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO +# +# When uploading crates to the registry Cargo will automatically +# "normalize" Cargo.toml files for maximal compatibility +# with all versions of Cargo and also rewrite `path` dependencies +# to registry (e.g., crates.io) dependencies. +# +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. + +[package] +edition = "2018" +rust-version = "1.63" +name = "cssparser" +version = "0.34.0" +authors = ["Simon Sapin "] +exclude = [ + "src/css-parsing-tests/**", + "src/big-data-url.css", +] +description = "Rust implementation of CSS Syntax Level 3" +documentation = "https://docs.rs/cssparser/" +readme = "README.md" +keywords = [ + "css", + "syntax", + "parser", +] +license = "MPL-2.0" +repository = "https://github.com/servo/rust-cssparser" + +[profile.profiling] +debug = 2 +inherits = "release" + +[dependencies.cssparser-macros] +version = "0.6.1" + +[dependencies.dtoa-short] +version = "0.3" + +[dependencies.itoa] +version = "1.0" + +[dependencies.phf] +version = "0.11.2" +features = ["macros"] + +[dependencies.serde] +version = "1.0" +features = ["derive"] +optional = true + +[dependencies.smallvec] +version = "1.0" + +[dev-dependencies.difference] +version = "2.0" + +[dev-dependencies.encoding_rs] +version = "0.8" + +[dev-dependencies.serde_json] +version = "1.0.25" + +[features] +bench = [] +dummy_match_byte = [] +skip_long_tests = [] diff --git a/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/Cargo.toml.orig b/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/Cargo.toml.orig new file mode 100644 index 000000000000..f783f19ffc9e --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/Cargo.toml.orig @@ -0,0 +1,41 @@ +[package] +name = "cssparser" +version = "0.34.0" +authors = ["Simon Sapin "] + +description = "Rust implementation of CSS Syntax Level 3" +documentation = "https://docs.rs/cssparser/" +repository = "https://github.com/servo/rust-cssparser" +readme = "README.md" +keywords = ["css", "syntax", "parser"] +license = "MPL-2.0" +edition = "2018" +rust-version = "1.63" + +exclude = ["src/css-parsing-tests/**", "src/big-data-url.css"] + +[dev-dependencies] +serde_json = "1.0.25" +difference = "2.0" +encoding_rs = "0.8" + +[dependencies] +cssparser-macros = { path = "./macros", version = "0.6.1" } +dtoa-short = "0.3" +itoa = "1.0" +phf = { version = "0.11.2", features = ["macros"] } +serde = { version = "1.0", features = ["derive"], optional = true } +smallvec = "1.0" + +[profile.profiling] +inherits = "release" +debug = true + +[features] +bench = [] +dummy_match_byte = [] +# Useful for skipping tests when execution is slow, e.g., under miri +skip_long_tests = [] + +[workspace] +members = [".", "./macros", "./color"] diff --git a/third_party/rust/chromium_crates_io/vendor/cssparser-macros-0.6.0/LICENSE b/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/LICENSE similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/cssparser-macros-0.6.0/LICENSE rename to third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/LICENSE diff --git a/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/README.md b/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/README.md new file mode 100644 index 000000000000..d9ca4ada84b1 --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/cssparser-0.34.0/README.md @@ -0,0 +1,57 @@ +rust-cssparser +============== + +[![Build Status](https://github.com/servo/rust-cssparser/actions/workflows/main.yml/badge.svg)](https://github.com/servo/rust-cssparser/actions) + +[Documentation](https://docs.rs/cssparser) + +Rust implementation of +[CSS Syntax Module Level 3](https://drafts.csswg.org/css-syntax/) + + +Overview +-------- + +Parsing CSS involves a series of steps: + +* When parsing from bytes, + (e.g. reading a file or fetching an URL from the network,) + detect the character encoding + (based on a `Content-Type` HTTP header, an `@charset` rule, a BOM, etc.) + and decode to Unicode text. + + rust-cssparser does not do this yet and just assumes UTF-8. + + This step is skipped when parsing from Unicode, e.g. in an HTML `