mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Make svg:use use an actual shadow tree.
This fixes a couple fuzz bugs and prevents special-casing <svg:use> even more in bug 1431255. Unfortunately not as many hacks went away as I'd have hoped, since we still need to match document rules, see the linked SVGWG issues. But blocks_ancestor_combinators goes away, which is nice since it's on a very hot path. Bug: 1450250 Reviewed-by: heycam Differential Revision: https://phabricator.services.mozilla.com/D2154 MozReview-Commit-ID: C4mthjoSNFh
This commit is contained in:
parent
1a91beaf57
commit
02d27ad3dd
5 changed files with 25 additions and 29 deletions
|
@ -418,10 +418,6 @@ where
|
|||
match combinator {
|
||||
Combinator::NextSibling | Combinator::LaterSibling => element.prev_sibling_element(),
|
||||
Combinator::Child | Combinator::Descendant => {
|
||||
if element.blocks_ancestor_combinators() {
|
||||
return None;
|
||||
}
|
||||
|
||||
match element.parent_element() {
|
||||
Some(e) => return Some(e),
|
||||
None => {},
|
||||
|
|
|
@ -129,11 +129,4 @@ pub trait Element: Sized + Clone + Debug {
|
|||
fn ignores_nth_child_selectors(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// Return true if we want to stop lookup ancestor of the current
|
||||
/// element while matching complex selectors with descendant/child
|
||||
/// combinator.
|
||||
fn blocks_ancestor_combinators(&self) -> bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue