Bug 85865
Summary: | [Shadow] ShadowRoot.getElementsByTagNameNS should return nodes in ShadowRoot | ||
---|---|---|---|
Product: | WebKit | Reporter: | Dominic Cooney <dominicc> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | ahmad.saleem792, ap, bfulgham, cdumez, rniwa, tasak |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://w3c-test.org/webapps/ShadowDOM/tests/submissions/Google/tests.html | ||
Bug Depends on: | |||
Bug Blocks: | 85862 |
Dominic Cooney
This manifests as a test failure at <http://w3c-test.org/webapps/ShadowDOM/tests/submissions/Google/tests.html>
"Upper-boundary encapsulation: no nodes other than shadow root descendants are accessible with shadow root DOM tree accessor methods" … "assert_equals: no nodes other than shadow root descendants are accessible with ShadowRoot.getElementsByTagNameNS expected 2 but got 0"
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Takashi Sakamoto
(In reply to comment #0)
> This manifests as a test failure at <http://w3c-test.org/webapps/ShadowDOM/tests/submissions/Google/tests.html>
>
> "Upper-boundary encapsulation: no nodes other than shadow root descendants are accessible with shadow root DOM tree accessor methods" … "assert_equals: no nodes other than shadow root descendants are accessible with ShadowRoot.getElementsByTagNameNS expected 2 but got 0"
I think, the test uses 'null' for the first argument of getElementsByTagNameNS, i.e. s.getElementsByTagNameNS(null, 'div'). However, these div elements has namespace URI, i.e. "http://www.w3.org/1999/xhtml".
So TreeNodeList::nodeMatches cannot match any div elements and s.getElementsByTagNameNS returns no nodes.
I'm not sure, but, I guess, this is a bug of tests.js.
Best regards,
Takashi Sakamoto
Takashi Sakamoto
(In reply to comment #1)
> (In reply to comment #0)
> > This manifests as a test failure at <http://w3c-test.org/webapps/ShadowDOM/tests/submissions/Google/tests.html>
> >
> > "Upper-boundary encapsulation: no nodes other than shadow root descendants are accessible with shadow root DOM tree accessor methods" … "assert_equals: no nodes other than shadow root descendants are accessible with ShadowRoot.getElementsByTagNameNS expected 2 but got 0"
>
> I think, the test uses 'null' for the first argument of getElementsByTagNameNS, i.e. s.getElementsByTagNameNS(null, 'div'). However, these div elements has namespace URI, i.e. "http://www.w3.org/1999/xhtml".
Sorry. "these div elements have namespace URI"
> So TreeNodeList::nodeMatches cannot match any div elements and s.getElementsByTagNameNS returns no nodes.
>
> I'm not sure, but, I guess, this is a bug of tests.js.
>
> Best regards,
> Takashi Sakamoto
Ahmad Saleem
We seems to pass all tests related to getElementsByTagNameNS -
https://wpt.fyi/results/dom/nodes?label=master&label=experimental&aligned&view=subtest&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&label=experimental&aligned&view=subtest&q=shadow%20root
Ryosuke Niwa
We have this working now.