RESOLVED FIXED 5737
Implement DOM3 namespace functions
https://bugs.webkit.org/show_bug.cgi?id=5737
Summary Implement DOM3 namespace functions
Anders Carlsson
Reported 2005-11-13 23:27:12 PST
In DOM3, there are three namespace lookup functions added to the Node interface: * lookupNamespaceURI * lookupPrefix * isDefaultNamespace These should be implemented
Attachments
Implement functions (51.77 KB, patch)
2005-11-14 12:01 PST, Anders Carlsson
eric: review+
Anders Carlsson
Comment 1 2005-11-14 12:01:32 PST
Created attachment 4690 [details] Implement functions
Eric Seidel (no email)
Comment 2 2005-11-14 14:10:10 PST
Comment on attachment 4690 [details] Implement functions We talked about this at length over IRC. Looks good. It's nice that we can just copy this directly from the spec... r=me. A couple things you could fix before landing: A couple of the lines could be condensed using: if (Foo *foo = bar()) foo->doFoo(); isDefaultNamespace's element functionality should be implemented in terms of lookupNamespaceURI to prevent repeating ourselves. (if it has no prefix, check the namespace, if it does, look it up and check it). + if (!namespaceURI().isNull() && namespaceURI() == _namespaceURI && + !prefix().isNull() && originalElement->lookupNamespaceURI(prefix()) == _namespaceURI) + return prefix(); should just be: if (_namespaceURI.isNull()) return DOMString(); if (namespaceURI() == _namespaceURI && originalElement->lookupNamespaceURI(prefix()) == _namespaceURI) return prefix();
Anders Carlsson
Comment 3 2005-11-16 01:47:51 PST
I've committed this patch, but I haven't yet fixed isDefaultNamespace to use lookupNamespaceURI yet.
Lucas Forschler
Comment 4 2019-02-06 09:02:41 PST
Mass moving XML DOM bugs to the "DOM" Component.
Note You need to log in before you can comment on or make changes to this bug.