Improve modern layout and viewport rendering

This commit is contained in:
SGavrl committed 2026-07-30 20:24:57 +00:00
1 parent aff0172987
commit 10b8492116
22 files changed
+5978 -450

No files matched your search

+16
View File
@@ -1031,6 +1031,22 @@ mod tests {
assert_eq!(node.as_element().unwrap().local.as_ref(), "span");
}
#[test]
fn compiled_nested_is_descendant_matches_with_ancestor_filter() {
let tree = parse_html(
r#"<div class="**:[.line]:block"><code><span id="target" class="line">x</span></code></div>"#,
);
let target = tree.get_element_by_id("target").unwrap();
let compiled = tree
.compile_rule_selector(r#":is(.\*\*\:\[\.line\]\:block *).line"#)
.unwrap();
let mut matcher = tree.matcher();
for ancestor in tree.ancestors(target).into_iter().rev() {
matcher.push_ancestor(&tree, ancestor);
}
assert!(matcher.matches(&tree, target, &compiled));
}
#[test]
fn test_query_selector_attribute() {
let tree = parse_html(