Fixing bug 106769. Document.prototype was not on the prototype chain for XMLDocument objects. sr=jband@netscape.com, r=bzbarsky@mit.edu

This commit is contained in:
jst%netscape.com 2001-10-26 02:23:56 +00:00
parent 730714aad2
commit 0c2c3d4fa4
4 changed files with 18 additions and 8 deletions

View File

@ -42,7 +42,7 @@
#include "nsWeakReference.h"
#include "nsWeakPtr.h"
#include "nsVoidArray.h"
#include "nsIDOMDocument.h"
#include "nsIDOMXMLDocument.h"
#include "nsIDOMDocumentView.h"
#include "nsIDOMDocumentXBL.h"
#include "nsIDOMNSDocument.h"
@ -212,9 +212,17 @@ protected:
void* mScriptObject;
};
// Base class for our document implementations
// Base class for our document implementations.
//
// Note that this class *implements* nsIDOMXMLDocument, but it's not
// really an nsIDOMXMLDocument. The reason for implementing
// nsIDOMXMLDocument on this class is to avoid having to duplicate all
// its inherited methods on document classes that *are*
// nsIDOMXMLDocument's. nsDocument's QI should *not* claim to support
// nsIDOMXMLDocument unless someone writes a real implementation of
// the interface.
class nsDocument : public nsIDocument,
public nsIDOMDocument,
public nsIDOMXMLDocument, // inherits nsIDOMDocument
public nsIDOMNSDocument,
public nsIDOMDocumentEvent,
public nsIDOMDocumentStyle,
@ -489,6 +497,9 @@ public:
// nsIDOMDocument
NS_DECL_NSIDOMDOCUMENT
// nsIDOMXMLDocument
NS_DECL_NSIDOMXMLDOCUMENT
// nsIDOMNSDocument
NS_DECL_NSIDOMNSDOCUMENT

View File

@ -56,8 +56,7 @@ class nsXMLDocument : public nsMarkupDocument,
public nsIXMLDocument,
public nsIHTMLContentContainer,
public nsIInterfaceRequestor,
public nsIHttpEventSink,
public nsIDOMXMLDocument
public nsIHttpEventSink
{
public:
nsXMLDocument();

View File

@ -37,10 +37,10 @@
*
* ***** END LICENSE BLOCK ***** */
#include "domstubs.idl"
#include "nsIDOMDocument.idl"
[scriptable, uuid(8816d003-e7c8-4065-8827-829b8d07b6e0)]
interface nsIDOMXMLDocument : nsISupports
interface nsIDOMXMLDocument : nsIDOMDocument
{
void load(in DOMString url);
};

View File

@ -987,7 +987,7 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIDOMScreen)
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(XMLDocument, nsIDOMDocument)
DOM_CLASSINFO_MAP_BEGIN(XMLDocument, nsIDOMXMLDocument)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocument)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMXMLDocument)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSDocument)