[webkit-reviews] review granted: [Bug 5737] Implement DOM3 namespace functions : [Attachment 4690] Implement functions

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Mon Nov 14 14:10:10 PST 2005

Eric Seidel <macdome at opendarwin.org> has granted Anders Carlsson
<andersca at mac.com>'s request for review:
Bug 5737: Implement DOM3 namespace functions

Attachment 4690: Implement functions

------- Additional Comments from Eric Seidel <macdome at opendarwin.org>
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())

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()) ==
+	 return prefix();

should just be:

if (_namespaceURI.isNull())
    return DOMString();
 if (namespaceURI() == _namespaceURI &&
originalElement->lookupNamespaceURI(prefix()) == _namespaceURI)
    return prefix();

More information about the webkit-reviews mailing list