<?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>85865</bug_id>
          
          <creation_ts>2012-05-07 23:24:42 -0700</creation_ts>
          <short_desc>[Shadow] ShadowRoot.getElementsByTagNameNS should return nodes in ShadowRoot</short_desc>
          <delta_ts>2022-08-12 10:01:09 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc>http://w3c-test.org/webapps/ShadowDOM/tests/submissions/Google/tests.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>85862</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Dominic Cooney">dominicc</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>rniwa</cc>
    
    <cc>tasak</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>618347</commentid>
    <comment_count>0</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2012-05-07 23:24:42 -0700</bug_when>
    <thetext>This manifests as a test failure at &lt;http://w3c-test.org/webapps/ShadowDOM/tests/submissions/Google/tests.html&gt;

&quot;Upper-boundary encapsulation: no nodes other than shadow root descendants are accessible with shadow root DOM tree accessor methods&quot; … &quot;assert_equals: no nodes other than shadow root descendants are accessible with ShadowRoot.getElementsByTagNameNS expected 2 but got 0&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>630120</commentid>
    <comment_count>1</comment_count>
    <who name="Takashi Sakamoto">tasak</who>
    <bug_when>2012-05-22 02:15:16 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; This manifests as a test failure at &lt;http://w3c-test.org/webapps/ShadowDOM/tests/submissions/Google/tests.html&gt;
&gt; 
&gt; &quot;Upper-boundary encapsulation: no nodes other than shadow root descendants are accessible with shadow root DOM tree accessor methods&quot; … &quot;assert_equals: no nodes other than shadow root descendants are accessible with ShadowRoot.getElementsByTagNameNS expected 2 but got 0&quot;

I think, the test uses &apos;null&apos; for the first argument of getElementsByTagNameNS, i.e. s.getElementsByTagNameNS(null, &apos;div&apos;). However, these div elements has namespace URI, i.e. &quot;http://www.w3.org/1999/xhtml&quot;.
So TreeNodeList::nodeMatches cannot match any div elements and s.getElementsByTagNameNS returns no nodes.

I&apos;m not sure, but, I guess, this is a bug of tests.js.

Best regards,
Takashi Sakamoto</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>630122</commentid>
    <comment_count>2</comment_count>
    <who name="Takashi Sakamoto">tasak</who>
    <bug_when>2012-05-22 02:16:17 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; (In reply to comment #0)
&gt; &gt; This manifests as a test failure at &lt;http://w3c-test.org/webapps/ShadowDOM/tests/submissions/Google/tests.html&gt;
&gt; &gt; 
&gt; &gt; &quot;Upper-boundary encapsulation: no nodes other than shadow root descendants are accessible with shadow root DOM tree accessor methods&quot; … &quot;assert_equals: no nodes other than shadow root descendants are accessible with ShadowRoot.getElementsByTagNameNS expected 2 but got 0&quot;
&gt; 
&gt; I think, the test uses &apos;null&apos; for the first argument of getElementsByTagNameNS, i.e. s.getElementsByTagNameNS(null, &apos;div&apos;). However, these div elements has namespace URI, i.e. &quot;http://www.w3.org/1999/xhtml&quot;.

Sorry. &quot;these div elements have namespace URI&quot;

&gt; So TreeNodeList::nodeMatches cannot match any div elements and s.getElementsByTagNameNS returns no nodes.
&gt; 
&gt; I&apos;m not sure, but, I guess, this is a bug of tests.js.
&gt; 
&gt; Best regards,
&gt; Takashi Sakamoto</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890855</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-12 04:35:37 -0700</bug_when>
    <thetext>We seems to pass all tests related to getElementsByTagNameNS - 

https://wpt.fyi/results/dom/nodes?label=master&amp;label=experimental&amp;aligned&amp;view=subtest&amp;q=getElementsByTagNameNS

Is it still applicable and further from shadow root, Safari only fail following test:

https://wpt.fyi/results/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-004.html?label=master&amp;label=experimental&amp;aligned&amp;view=subtest&amp;q=shadow%20root</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890909</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-08-12 10:01:09 -0700</bug_when>
    <thetext>We have this working now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>