Closed Bug 199399 Opened 21 years ago Closed 21 years ago

Eliminate nsIXMLDocument

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jst, Unassigned)

References

Details

(Whiteboard: [HAVE FIX])

Attachments

(1 file)

Once bug 111514 is fixed it looks like we can eliminate nsIXMLDocument from
Mozilla. After bug 111514 is fixed it'll only have one method in it and I don't
see anyone using that...
Attachment #121242 - Flags: superreview?(heikki)
Attachment #121242 - Flags: review?(peterv)
Status: NEW → ASSIGNED
Whiteboard: [HAVE FIX]
Comment on attachment 121242 [details] [diff] [review]
Eliminate nsIXMLDocument

>Index: content/base/src/nsGenericElement.cpp
>===================================================================

>+    nsCOMPtr<nsIContent> tmp(content);
>+    tmp->GetParent(*getter_AddRefs(content));

Small nit, you could make this:

    nsCOMPtr<nsIContent> tmp;
    content.swap(tmp);
    tmp->GetParent(*getter_AddRefs(content));

Avoids one addref/release pair.
Attachment #121242 - Flags: review?(peterv) → review+
Comment on attachment 121242 [details] [diff] [review]
Eliminate nsIXMLDocument

I am concerned that now non-XML documents would pay a perf penalty for baseURI
access. Could you do some other check in nsGenericElement to avoid entering the
while loop in nsGenericElement, maybe QI to nsIDOMXMLDocument or something? See
this link for where we use baseURI in chrome:
http://lxr.mozilla.org/seamonkey/search?string=%5C.baseURI

Add newline to to the end of content/xml/document/public/MANIFEST
Attachment #121242 - Flags: superreview?(heikki) → superreview+
Comment on attachment 121242 [details] [diff] [review]
Eliminate nsIXMLDocument

I am concerned that now non-XML documents would pay a perf penalty for baseURI
access. Could you do some other check in nsGenericElement to avoid entering the
while loop in nsGenericElement, maybe QI to nsIDOMXMLDocument or something? See
this link for where we use baseURI in chrome:
http://lxr.mozilla.org/seamonkey/search?string=%5C.baseURI

Add newline to to the end of content/xml/document/public/MANIFEST
I intentionally did *not* want to check what type of document we're dealing with
in nsGenericElement.cpp, since even if we're not dealing with an XML document
(i.e. it's an HTML or XHTML document) we still want to find XML base info if it
exists in the ancestor chain (i.e. think of an SVG element embedded in an XHTML
document). I'm not too worried about this walk up the ancestor chain from a
performance point of view, I don't see it being used in any place where
performance is all that critical.

PS. There is a new line at the end of the MANIFEST file, but there wasn't one on
the line I removed (that's what the diff tells you).
Fix checked in. FIXED.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: