Check for XML and XMLS namespace during 'locating a namespace' (#31374)

* Check for XML and XMLS namespace  during 'locating a namespace'

* Address review comments

* Remove test expectation in legacy layout meta
This commit is contained in:
Keith Yeung 2024-02-20 10:28:25 +08:00 committed by GitHub
parent 5b7ee86fd1
commit b993518892
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 22 additions and 41 deletions

View file

@ -2399,7 +2399,7 @@ impl Node {
}
}
// https://dom.spec.whatwg.org/#locate-a-namespace
/// <https://dom.spec.whatwg.org/#locate-a-namespace>
pub fn locate_namespace(node: &Node, prefix: Option<DOMString>) -> Namespace {
match node.type_id() {
NodeTypeId::Element(_) => node.downcast::<Element>().unwrap().locate_namespace(prefix),