WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
85865
[Shadow] ShadowRoot.getElementsByTagNameNS should return nodes in ShadowRoot
https://bugs.webkit.org/show_bug.cgi?id=85865
Summary
[Shadow] ShadowRoot.getElementsByTagNameNS should return nodes in ShadowRoot
Dominic Cooney
Reported
2012-05-07 23:24:42 PDT
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
Comment 1
2012-05-22 02:15:16 PDT
(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
Comment 2
2012-05-22 02:16:17 PDT
(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
Comment 3
2022-08-12 04:35:37 PDT
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
Comment 4
2022-08-12 10:01:09 PDT
We have this working now.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug