<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>54465</bug_id>
          
          <creation_ts>2011-02-15 08:50:50 -0800</creation_ts>
          <short_desc>CSS selectors are applied to SVG shadow trees</short_desc>
          <delta_ts>2014-05-12 06:08:01 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Antti Koivisto">koivisto</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>krit</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>351308</commentid>
    <comment_count>0</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2011-02-15 08:50:50 -0800</bug_when>
    <thetext>This

CSSStyleSelector::SelectorMatch CSSStyleSelector::SelectorChecker::checkSelector(CSSSelector* sel, Element* e, HashSet&lt;AtomicStringImpl*&gt;* selectorAttrs, PseudoId&amp; 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-&gt;isSVGElement() &amp;&amp; e-&gt;isShadowRoot())
        return SelectorFailsCompletely;
#endif

won&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>351333</commentid>
    <comment_count>1</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2011-02-15 09:12:09 -0800</bug_when>
    <thetext>If this is fixed we can use selector fast path also for SVG (https://bugs.webkit.org/show_bug.cgi?id=54460)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1008552</commentid>
    <comment_count>2</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2014-05-12 06:08:01 -0700</bug_when>
    <thetext>These lines don&apos;t seem to exist anymore.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>