Skip to content

Commit 79d565f

Browse files
committed
update selectors to v0.25
1 parent eb5c30c commit 79d565f

File tree

3 files changed

+94
-61
lines changed

3 files changed

+94
-61
lines changed

Cargo.lock

Lines changed: 86 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ seahash = "4.1.0"
3737
memchr = "2.4"
3838
base64 = "0.22"
3939
rmp-serde = "0.15"
40-
cssparser = { version = "0.29", optional = true }
41-
selectors = { version = "0.24", optional = true }
40+
cssparser = { version = "0.31", optional = true }
41+
selectors = { version = "0.25", optional = true }
4242
thiserror = "1.0"
4343
flatbuffers = { version = "25.2.10" }
4444

src/filters/cosmetic.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -636,12 +636,10 @@ mod css_validation {
636636
let mock_stylesheet = format!("{}{{mock-stylesheet-marker}}", selector);
637637
let mut pi = ParserInput::new(&mock_stylesheet);
638638
let mut parser = Parser::new(&mut pi);
639-
let mut rule_list_parser = cssparser::RuleListParser::new_for_stylesheet(
640-
&mut parser,
641-
QualifiedRuleParserImpl {
642-
accept_abp_selectors,
643-
},
644-
);
639+
let mut parser_impl = QualifiedRuleParserImpl {
640+
accept_abp_selectors,
641+
};
642+
let mut rule_list_parser = cssparser::StyleSheetParser::new(&mut parser, &mut parser_impl);
645643

646644
let prelude = rule_list_parser.next().and_then(|r| r.ok());
647645

@@ -792,6 +790,7 @@ mod css_validation {
792790
accept_abp_selectors: self.accept_abp_selectors,
793791
},
794792
input,
793+
selectors::parser::ParseRelative::No,
795794
)
796795
.map_err(|_| ParseError {
797796
kind: cssparser::ParseErrorKind::Custom(()),
@@ -1004,7 +1003,7 @@ mod css_validation {
10041003
struct SelectorImpl;
10051004

10061005
impl selectors::parser::SelectorImpl for SelectorImpl {
1007-
type ExtraMatchingData = ();
1006+
type ExtraMatchingData<'a> = ();
10081007
type AttrValue = CssString;
10091008
type Identifier = CssIdent;
10101009
type LocalName = CssString;

0 commit comments

Comments
 (0)