Bug 54465
Summary: | CSS selectors are applied to SVG shadow trees | ||
---|---|---|---|
Product: | WebKit | Reporter: | Antti Koivisto <koivisto> |
Component: | SVG | Assignee: | 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
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Antti Koivisto
If this is fixed we can use selector fast path also for SVG (https://bugs.webkit.org/show_bug.cgi?id=54460)
Dirk Schulze
These lines don't seem to exist anymore.