Bug 54465

Summary: CSS selectors are applied to SVG shadow trees
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: krit, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   

Antti Koivisto
Reported 2011-02-15 08:50:50 PST
This CSSStyleSelector::SelectorMatch CSSStyleSelector::SelectorChecker::checkSelector(CSSSelector* sel, Element* e, HashSet<AtomicStringImpl*>* selectorAttrs, PseudoId& dynamicPseudo, bool isSubSelector, bool encounteredLink, RenderStyle* elementStyle, RenderStyle* elementParentStyle) const { #if ENABLE(SVG) // Spec: CSS2 selectors cannot be applied to the (conceptually) cloned DOM tree // because its contents are not part of the formal document structure. if (e->isSVGElement() && e->isShadowRoot()) return SelectorFailsCompletely; #endif won't achieve what the comment claims. If the match succeed without reaching the root the selector will still get applied. We should not be running selector matching in the shadow tree at all.
Attachments
Antti Koivisto
Comment 1 2011-02-15 09:12:09 PST
If this is fixed we can use selector fast path also for SVG (https://bugs.webkit.org/show_bug.cgi?id=54460)
Dirk Schulze
Comment 2 2014-05-12 06:08:01 PDT
These lines don't seem to exist anymore.
Note You need to log in before you can comment on or make changes to this bug.