1998-04-13 20:24:54 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
1999-11-06 03:40:37 +00:00
|
|
|
* The contents of this file are subject to the Netscape Public
|
|
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.mozilla.org/NPL/
|
1998-04-13 20:24:54 +00:00
|
|
|
*
|
1999-11-06 03:40:37 +00:00
|
|
|
* Software distributed under the License is distributed on an "AS
|
|
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
* implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
1998-04-13 20:24:54 +00:00
|
|
|
*
|
1999-11-06 03:40:37 +00:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
1998-04-13 20:24:54 +00:00
|
|
|
* Communications Corporation. Portions created by Netscape are
|
1999-11-06 03:40:37 +00:00
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
1998-04-13 20:24:54 +00:00
|
|
|
*/
|
|
|
|
#ifndef nsDocument_h___
|
|
|
|
#define nsDocument_h___
|
|
|
|
|
|
|
|
#include "nsIDocument.h"
|
1999-08-25 10:51:55 +00:00
|
|
|
#include "nsWeakReference.h"
|
1999-09-21 06:44:56 +00:00
|
|
|
#include "nsWeakPtr.h"
|
1998-04-13 20:24:54 +00:00
|
|
|
#include "nsVoidArray.h"
|
|
|
|
#include "nsIDOMDocument.h"
|
2000-04-26 13:58:56 +00:00
|
|
|
#include "nsIDOMDocumentView.h"
|
2000-06-02 08:13:29 +00:00
|
|
|
#include "nsIDOMDocumentXBL.h"
|
1998-11-17 02:14:38 +00:00
|
|
|
#include "nsIDOMNSDocument.h"
|
2000-04-26 13:58:56 +00:00
|
|
|
#include "nsIDOMDocumentStyle.h"
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
#include "nsIDOMDocumentRange.h"
|
2001-09-07 09:30:03 +00:00
|
|
|
#include "nsIDOMDocumentTraversal.h"
|
2001-04-12 01:05:42 +00:00
|
|
|
#include "nsIDocumentObserver.h"
|
1999-09-21 14:18:52 +00:00
|
|
|
#include "nsIDOMEventReceiver.h"
|
1999-05-07 04:59:23 +00:00
|
|
|
#include "nsIDiskDocument.h"
|
2001-04-12 01:05:42 +00:00
|
|
|
#include "nsIDOMStyleSheetList.h"
|
1999-12-03 09:24:22 +00:00
|
|
|
#include "nsIScriptGlobalObject.h"
|
1999-03-28 22:22:54 +00:00
|
|
|
#include "nsIDOMEventTarget.h"
|
1998-08-28 15:57:59 +00:00
|
|
|
#include "nsIContent.h"
|
1999-03-31 20:49:25 +00:00
|
|
|
#include "nsGenericDOMNodeList.h"
|
1999-08-29 21:58:42 +00:00
|
|
|
#include "nsIPrincipal.h"
|
2000-05-09 21:42:40 +00:00
|
|
|
#include "nsIBindingManager.h"
|
2000-05-10 13:13:39 +00:00
|
|
|
#include "nsINodeInfo.h"
|
2000-05-16 11:35:12 +00:00
|
|
|
#include "nsIDOMDocumentEvent.h"
|
2000-05-26 22:45:26 +00:00
|
|
|
#include "nsISupportsArray.h"
|
2000-12-10 09:19:59 +00:00
|
|
|
#include "nsHashtable.h"
|
2001-01-29 23:17:55 +00:00
|
|
|
#include "nsIWordBreakerFactory.h"
|
|
|
|
#include "nsILineBreakerFactory.h"
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
#include "nsIScriptObjectPrincipal.h"
|
2001-04-30 23:35:09 +00:00
|
|
|
#include "nsIURI.h"
|
2001-05-17 05:54:16 +00:00
|
|
|
#include "nsScriptLoader.h"
|
2001-05-19 02:59:15 +00:00
|
|
|
#include "nsICSSLoader.h"
|
1998-04-30 19:53:05 +00:00
|
|
|
|
1998-06-08 00:57:15 +00:00
|
|
|
class nsIEventListenerManager;
|
2000-04-26 13:58:56 +00:00
|
|
|
class nsDOMStyleSheetList;
|
1999-05-07 04:59:23 +00:00
|
|
|
class nsIOutputStream;
|
1999-03-31 20:49:25 +00:00
|
|
|
class nsDocument;
|
2000-08-28 23:46:11 +00:00
|
|
|
class nsIDTD;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
|
1999-08-03 20:51:41 +00:00
|
|
|
#if 0
|
1998-05-27 17:51:41 +00:00
|
|
|
class nsPostData : public nsIPostData {
|
|
|
|
public:
|
1998-07-01 11:16:09 +00:00
|
|
|
nsPostData(PRBool aIsFile, char* aData);
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
virtual PRBool IsFile();
|
|
|
|
virtual const char* GetData();
|
|
|
|
virtual PRInt32 GetDataLength();
|
|
|
|
|
1998-05-27 17:51:41 +00:00
|
|
|
protected:
|
1998-07-01 11:16:09 +00:00
|
|
|
virtual ~nsPostData();
|
|
|
|
|
|
|
|
PRBool mIsFile;
|
|
|
|
char* mData;
|
|
|
|
PRInt32 mDataLen;
|
1998-05-27 17:51:41 +00:00
|
|
|
};
|
1999-08-03 20:51:41 +00:00
|
|
|
#endif
|
1998-05-27 17:51:41 +00:00
|
|
|
|
1999-01-23 07:01:40 +00:00
|
|
|
class nsDocHeaderData
|
|
|
|
{
|
|
|
|
public:
|
2000-08-23 17:27:06 +00:00
|
|
|
nsDocHeaderData(nsIAtom* aField, const nsAReadableString& aData)
|
1999-01-23 07:01:40 +00:00
|
|
|
{
|
|
|
|
mField = aField;
|
|
|
|
NS_IF_ADDREF(mField);
|
2000-04-03 11:20:35 +00:00
|
|
|
mData.Assign(aData);
|
1999-01-23 07:01:40 +00:00
|
|
|
mNext = nsnull;
|
|
|
|
}
|
|
|
|
~nsDocHeaderData(void)
|
|
|
|
{
|
|
|
|
NS_IF_RELEASE(mField);
|
|
|
|
if (nsnull != mNext) {
|
|
|
|
delete mNext;
|
|
|
|
mNext = nsnull;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
nsIAtom* mField;
|
2000-12-23 10:56:31 +00:00
|
|
|
nsString mData;
|
1999-01-23 07:01:40 +00:00
|
|
|
nsDocHeaderData* mNext;
|
|
|
|
};
|
1998-07-01 11:16:09 +00:00
|
|
|
|
1999-03-31 20:49:25 +00:00
|
|
|
// Represents the children of a document (prolog, epilog and
|
|
|
|
// document element)
|
|
|
|
class nsDocumentChildNodes : public nsGenericDOMNodeList
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsDocumentChildNodes(nsIDocument* aDocument);
|
|
|
|
~nsDocumentChildNodes();
|
|
|
|
|
|
|
|
NS_IMETHOD GetLength(PRUint32* aLength);
|
|
|
|
NS_IMETHOD Item(PRUint32 aIndex, nsIDOMNode** aReturn);
|
|
|
|
|
|
|
|
void DropReference();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
nsIDocument* mDocument;
|
|
|
|
};
|
|
|
|
|
2001-04-12 01:05:42 +00:00
|
|
|
|
|
|
|
class nsDOMStyleSheetList : public nsIDOMStyleSheetList,
|
|
|
|
public nsIDocumentObserver
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsDOMStyleSheetList(nsIDocument *aDocument);
|
|
|
|
virtual ~nsDOMStyleSheetList();
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
|
|
|
|
NS_DECL_NSIDOMSTYLESHEETLIST
|
2001-04-12 01:05:42 +00:00
|
|
|
|
|
|
|
NS_IMETHOD BeginUpdate(nsIDocument *aDocument) { return NS_OK; }
|
|
|
|
NS_IMETHOD EndUpdate(nsIDocument *aDocument) { return NS_OK; }
|
|
|
|
NS_IMETHOD BeginLoad(nsIDocument *aDocument) { return NS_OK; }
|
|
|
|
NS_IMETHOD EndLoad(nsIDocument *aDocument) { return NS_OK; }
|
|
|
|
NS_IMETHOD BeginReflow(nsIDocument *aDocument,
|
|
|
|
nsIPresShell* aShell) { return NS_OK; }
|
|
|
|
NS_IMETHOD EndReflow(nsIDocument *aDocument,
|
|
|
|
nsIPresShell* aShell) { return NS_OK; }
|
|
|
|
NS_IMETHOD ContentChanged(nsIDocument *aDocument,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsISupports* aSubContent) { return NS_OK; }
|
|
|
|
NS_IMETHOD ContentStatesChanged(nsIDocument* aDocument,
|
|
|
|
nsIContent* aContent1,
|
|
|
|
nsIContent* aContent2) { return NS_OK; }
|
|
|
|
NS_IMETHOD AttributeChanged(nsIDocument *aDocument,
|
|
|
|
nsIContent* aContent,
|
|
|
|
PRInt32 aNameSpaceID,
|
|
|
|
nsIAtom* aAttribute,
|
2001-08-25 02:01:08 +00:00
|
|
|
PRInt32 aModType,
|
2001-04-12 01:05:42 +00:00
|
|
|
PRInt32 aHint) { return NS_OK; }
|
|
|
|
NS_IMETHOD ContentAppended(nsIDocument *aDocument,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
PRInt32 aNewIndexInContainer)
|
|
|
|
{ return NS_OK; }
|
|
|
|
NS_IMETHOD ContentInserted(nsIDocument *aDocument,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIContent* aChild,
|
|
|
|
PRInt32 aIndexInContainer) { return NS_OK; }
|
|
|
|
NS_IMETHOD ContentReplaced(nsIDocument *aDocument,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIContent* aOldChild,
|
|
|
|
nsIContent* aNewChild,
|
|
|
|
PRInt32 aIndexInContainer) { return NS_OK; }
|
|
|
|
NS_IMETHOD ContentRemoved(nsIDocument *aDocument,
|
|
|
|
nsIContent* aContainer,
|
|
|
|
nsIContent* aChild,
|
|
|
|
PRInt32 aIndexInContainer) { return NS_OK; }
|
|
|
|
NS_IMETHOD StyleSheetAdded(nsIDocument *aDocument,
|
|
|
|
nsIStyleSheet* aStyleSheet);
|
|
|
|
NS_IMETHOD StyleSheetRemoved(nsIDocument *aDocument,
|
|
|
|
nsIStyleSheet* aStyleSheet);
|
|
|
|
NS_IMETHOD StyleSheetDisabledStateChanged(nsIDocument *aDocument,
|
|
|
|
nsIStyleSheet* aStyleSheet,
|
|
|
|
PRBool aDisabled) { return NS_OK; }
|
|
|
|
NS_IMETHOD StyleRuleChanged(nsIDocument *aDocument,
|
|
|
|
nsIStyleSheet* aStyleSheet,
|
|
|
|
nsIStyleRule* aStyleRule,
|
|
|
|
PRInt32 aHint) { return NS_OK; }
|
|
|
|
NS_IMETHOD StyleRuleAdded(nsIDocument *aDocument,
|
|
|
|
nsIStyleSheet* aStyleSheet,
|
|
|
|
nsIStyleRule* aStyleRule) { return NS_OK; }
|
|
|
|
NS_IMETHOD StyleRuleRemoved(nsIDocument *aDocument,
|
|
|
|
nsIStyleSheet* aStyleSheet,
|
|
|
|
nsIStyleRule* aStyleRule) { return NS_OK; }
|
|
|
|
NS_IMETHOD DocumentWillBeDestroyed(nsIDocument *aDocument);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
PRInt32 mLength;
|
|
|
|
nsIDocument* mDocument;
|
|
|
|
void* mScriptObject;
|
|
|
|
};
|
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
// Base class for our document implementations
|
1998-11-17 02:14:38 +00:00
|
|
|
class nsDocument : public nsIDocument,
|
|
|
|
public nsIDOMDocument,
|
|
|
|
public nsIDOMNSDocument,
|
2000-05-16 11:35:12 +00:00
|
|
|
public nsIDOMDocumentEvent,
|
2000-04-26 13:58:56 +00:00
|
|
|
public nsIDOMDocumentStyle,
|
|
|
|
public nsIDOMDocumentView,
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
public nsIDOMDocumentRange,
|
2001-09-07 09:30:03 +00:00
|
|
|
public nsIDOMDocumentTraversal,
|
2000-06-02 08:13:29 +00:00
|
|
|
public nsIDOMDocumentXBL,
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
public nsIDOM3Node,
|
1999-05-07 04:59:23 +00:00
|
|
|
public nsIDiskDocument,
|
1999-09-21 14:18:52 +00:00
|
|
|
public nsSupportsWeakReference,
|
2000-01-26 15:33:57 +00:00
|
|
|
public nsIDOMEventReceiver,
|
|
|
|
public nsIScriptObjectPrincipal
|
1998-12-18 17:34:34 +00:00
|
|
|
{
|
1998-04-13 20:24:54 +00:00
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
2001-06-20 03:27:48 +00:00
|
|
|
NS_IMETHOD GetArena(nsIArena** aArena);
|
1998-04-13 20:24:54 +00:00
|
|
|
|
2001-03-12 06:39:27 +00:00
|
|
|
NS_IMETHOD Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup);
|
|
|
|
|
1999-07-16 11:14:36 +00:00
|
|
|
NS_IMETHOD StartDocumentLoad(const char* aCommand,
|
|
|
|
nsIChannel* aChannel,
|
1999-07-20 08:46:33 +00:00
|
|
|
nsILoadGroup* aLoadGroup,
|
1999-11-15 22:17:54 +00:00
|
|
|
nsISupports* aContainer,
|
2000-05-01 06:58:53 +00:00
|
|
|
nsIStreamListener **aDocListener,
|
|
|
|
PRBool aReset = PR_TRUE);
|
1999-01-06 00:32:41 +00:00
|
|
|
|
Landing changes Vidur made while the tree was closed for beta1 work, here's a list of the changes. r=me
[1] Cutting down the size of content. Made nsIJSScriptObject inherit from nsIScriptObjectOwner
[2] Cutting down the size of content. Made nsITextContent inherit from nsIContent.
[3] Cutting down the size of content. Moved implementation of nsIDOMReceiver to nsListenerManager. This is not true aggregation since it isn't transitive, but it's OK for now. It will be necessary for nsListenerManager to have a reference to its content in the future anyway, so the transitivity could be done.
dom/public/nsDOMPropEnums.h,v - bug 12559
dom/public/nsIJSScriptObject.h,v - [1]
dom/public/html/MANIFEST,v - bug 12559
dom/public/html/Makefile.in,v - bug 12559
dom/public/html/makefile.win,v - bug 12559
dom/public/html/nsIDOMHTMLInputElement.h,v - bug 17544
dom/public/idl/html/HTMLAnchorElement.idl,v - bug 12559
dom/public/idl/html/HTMLAreaElement.idl,v - bug 12559
dom/public/idl/html/HTMLInputElement.idl,v - bug 17544
dom/src/base/nsGlobalWindow.cpp,v - bug 30700
dom/src/base/nsGlobalWindow.h,v - [1]
dom/src/base/nsLocation.cpp,v - [1]
dom/src/html/nsJSHTMLAnchorElement.cpp,v - bug 12559
dom/src/html/nsJSHTMLAreaElement.cpp,v - bug 12559
dom/src/html/nsJSHTMLInputElement.cpp,v - bug 17544
layout/base/public/nsIDocument.h,v - bug 27953
layout/base/public/nsITextContent.h,v - [2]
layout/base/src/nsCommentNode.cpp,v - [2]
layout/base/src/nsDocument.cpp,v - bug 27953
layout/base/src/nsDocument.h,v - bug 27953
layout/base/src/nsDocumentViewer.cpp,v - bug 27953
layout/base/src/nsGenericDOMDataNode.cpp,v - [3]
layout/base/src/nsGenericDOMDataNode.h,v - [3]
layout/base/src/nsGenericElement.cpp,v - [3]
layout/base/src/nsGenericElement.h,v - [3]
layout/base/src/nsNameSpaceManager.cpp,v - bug 7834
layout/base/src/nsStyleContext.cpp,v - outline property shouldn't reflow
layout/base/src/nsTextNode.cpp,v - [2]
layout/events/src/nsEventListenerManager.cpp,v - [3]
layout/events/src/nsEventListenerManager.h,v - [3]
layout/html/base/src/nsGfxScrollFrame.cpp,v - nsString->nsAutoString
layout/html/content/src/nsAttributeContent.cpp,v - [2]
layout/html/content/src/nsHTMLAnchorElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLAppletElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLAreaElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLBRElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLBaseElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLBaseFontElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLBodyElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLButtonElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLDListElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLDelElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLDirectoryElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLDivElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLEmbedElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLFieldSetElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLFontElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLFormElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLFrameElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLFrameSetElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLHRElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLHeadElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLHeadingElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLHtmlElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLIFrameElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLImageElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLInputElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLInsElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLIsIndexElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLLIElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLLabelElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLLayerElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLLegendElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLLinkElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLMapElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLMenuElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLMetaElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLModElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLOListElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLObjectElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLOptGroupElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLOptionElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLParagraphElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLParamElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLPreElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLQuoteElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLScriptElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLSelectElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLSpacerElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLSpanElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLStyleElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLTableCaptionElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLTableCellElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLTableColElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLTableColGroupElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLTableElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLTableRowElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLTableSectionElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLTextAreaElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLTitleElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLUListElement.cpp,v - [1][3]
layout/html/content/src/nsHTMLWBRElement.cpp,v - [1][3]
layout/html/document/src/nsHTMLDocument.cpp,v - bug 27953
layout/html/document/src/nsHTMLDocument.h,v - bug 27953
layout/xml/content/src/nsXMLCDATASection.cpp,v - [1][2]
layout/xml/content/src/nsXMLDocumentType.cpp,v - [1][2]
layout/xml/content/src/nsXMLElement.h,v - [1][2]
layout/xml/content/src/nsXMLEntity.cpp,v - [1][2]
layout/xml/content/src/nsXMLNotation.cpp,v - [1][2]
layout/xml/content/src/nsXMLProcessingInstruction.cpp,v - [1][2]
layout/xul/base/src/nsBoxFrame.cpp,v - nsString->nsAutoString
layout/xul/base/src/nsSliderFrame.cpp,v - nsString->nsAutoString
netwerk/protocol/http/src/nsHTTPRequest.cpp,v - nsString->nsAutoString
rdf/content/src/nsXULDocument.cpp,v - bug 27953
rdf/content/src/nsXULDocument.h,v - bug 27953
rdf/content/src/nsXULElement.h,v - [1]
xpcom/base/IIDS.h,v - bug 12559
2000-03-17 13:27:00 +00:00
|
|
|
NS_IMETHOD StopDocumentLoad();
|
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
/**
|
|
|
|
* Return the title of the document. May return null.
|
|
|
|
*/
|
|
|
|
virtual const nsString* GetDocumentTitle() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the URL for the document. May return null.
|
|
|
|
*/
|
2001-06-20 03:27:48 +00:00
|
|
|
NS_IMETHOD GetDocumentURL(nsIURI** aURI) const;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1999-08-29 21:58:42 +00:00
|
|
|
/**
|
|
|
|
* Return the principal responsible for this document.
|
|
|
|
*/
|
2000-01-26 15:33:57 +00:00
|
|
|
NS_IMETHOD GetPrincipal(nsIPrincipal **aPrincipal);
|
1999-08-29 21:58:42 +00:00
|
|
|
|
2000-03-21 04:09:58 +00:00
|
|
|
/**
|
|
|
|
* Update principal responsible for this document to the intersection
|
|
|
|
* of its previous value and aPrincipal, and return its new value.
|
|
|
|
*/
|
2000-03-23 04:53:16 +00:00
|
|
|
NS_IMETHOD AddPrincipal(nsIPrincipal *aPrincipal);
|
2000-03-21 04:09:58 +00:00
|
|
|
|
2001-09-11 21:12:23 +00:00
|
|
|
/**
|
|
|
|
* Return the content language of this document.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetContentLanguage(nsAWritableString& aContentLanguage) const;
|
|
|
|
|
1998-10-01 21:43:49 +00:00
|
|
|
/**
|
1999-06-25 02:17:37 +00:00
|
|
|
* Return the LoadGroup for the document. May return null.
|
1998-10-01 21:43:49 +00:00
|
|
|
*/
|
1999-09-18 06:20:49 +00:00
|
|
|
NS_IMETHOD GetDocumentLoadGroup(nsILoadGroup **aGroup) const;
|
1998-10-01 21:43:49 +00:00
|
|
|
|
1999-01-15 01:53:50 +00:00
|
|
|
/**
|
|
|
|
* Return the base URL for realtive URLs in the document. May return null (or the document URL).
|
|
|
|
*/
|
1999-06-23 03:29:44 +00:00
|
|
|
NS_IMETHOD GetBaseURL(nsIURI*& aURL) const;
|
2001-04-30 23:35:09 +00:00
|
|
|
NS_IMETHOD SetBaseURL(nsIURI* aURL);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get/Set the base target of a link in a document.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetBaseTarget(nsAWritableString &aBaseTarget);
|
|
|
|
NS_IMETHOD SetBaseTarget(const nsAReadableString &aBaseTarget);
|
1999-01-15 01:53:50 +00:00
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
/**
|
|
|
|
* Return a standard name for the document's character set. This will
|
|
|
|
* trigger a startDocumentLoad if necessary to answer the question.
|
|
|
|
*/
|
2000-08-23 17:27:06 +00:00
|
|
|
NS_IMETHOD GetDocumentCharacterSet(nsAWritableString& oCharsetID);
|
|
|
|
NS_IMETHOD SetDocumentCharacterSet(const nsAReadableString& aCharSetID);
|
1998-04-13 20:24:54 +00:00
|
|
|
|
2000-06-01 23:10:44 +00:00
|
|
|
/**
|
|
|
|
* Add an observer that gets notified whenever the charset changes.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD AddCharSetObserver(nsIObserver* aObserver);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove a charset observer.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD RemoveCharSetObserver(nsIObserver* aObserver);
|
|
|
|
|
2001-04-12 23:35:24 +00:00
|
|
|
#ifdef IBMBIDI
|
|
|
|
/**
|
|
|
|
* Check if the document contains bidi data.
|
|
|
|
* If so, we have to apply the Unicode Bidi Algorithm.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetBidiEnabled(PRBool* aBidiEnabled) const;
|
|
|
|
/**
|
|
|
|
* Indicate the document contains RTL characters.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD SetBidiEnabled(PRBool aBidiEnabled);
|
|
|
|
#endif // IBMBIDI
|
|
|
|
|
1999-02-23 03:31:26 +00:00
|
|
|
/**
|
|
|
|
* Return the Line Breaker for the document
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetLineBreaker(nsILineBreaker** aResult) ;
|
|
|
|
NS_IMETHOD SetLineBreaker(nsILineBreaker* aLineBreaker) ;
|
1999-03-27 00:58:41 +00:00
|
|
|
NS_IMETHOD GetWordBreaker(nsIWordBreaker** aResult) ;
|
|
|
|
NS_IMETHOD SetWordBreaker(nsIWordBreaker* aWordBreaker) ;
|
1999-02-23 03:31:26 +00:00
|
|
|
|
1999-01-23 07:01:40 +00:00
|
|
|
/**
|
|
|
|
* Access HTTP header data (this may also get set from other sources, like
|
|
|
|
* HTML META tags).
|
|
|
|
*/
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
NS_IMETHOD GetHeaderData(nsIAtom* aHeaderField,
|
|
|
|
nsAWritableString& aData) const;
|
|
|
|
NS_IMETHOD SetHeaderData(nsIAtom* aheaderField,
|
|
|
|
const nsAReadableString& aData);
|
1999-01-23 07:01:40 +00:00
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
/**
|
|
|
|
* Create a new presentation shell that will use aContext for
|
|
|
|
* it's presentation context (presentation context's <b>must not</b> be
|
|
|
|
* shared among multiple presentation shell's).
|
|
|
|
*/
|
1998-10-02 04:32:11 +00:00
|
|
|
#if 0
|
|
|
|
// XXX Temp hack: moved to nsMarkupDocument
|
1999-07-07 01:19:31 +00:00
|
|
|
NS_IMETHOD CreateShell(nsIPresContext* aContext,
|
|
|
|
nsIViewManager* aViewManager,
|
|
|
|
nsIStyleSet* aStyleSet,
|
|
|
|
nsIPresShell** aInstancePtrResult);
|
1998-10-02 04:32:11 +00:00
|
|
|
#endif
|
1998-04-13 20:24:54 +00:00
|
|
|
virtual PRBool DeleteShell(nsIPresShell* aShell);
|
|
|
|
virtual PRInt32 GetNumberOfShells();
|
2001-06-20 03:27:48 +00:00
|
|
|
NS_IMETHOD GetShellAt(PRInt32 aIndex, nsIPresShell** aShell);
|
1998-04-13 20:24:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the parent document of this document. Will return null
|
|
|
|
* unless this document is within a compound document and has a parent.
|
|
|
|
*/
|
2001-06-20 03:27:48 +00:00
|
|
|
NS_IMETHOD GetParentDocument(nsIDocument** aParent);
|
|
|
|
NS_IMETHOD SetParentDocument(nsIDocument* aParent);
|
|
|
|
NS_IMETHOD AddSubDocument(nsIDocument* aSubDoc);
|
|
|
|
NS_IMETHOD GetNumberOfSubDocuments(PRInt32* aCount);
|
|
|
|
NS_IMETHOD GetSubDocumentAt(PRInt32 aIndex, nsIDocument** aSubDoc);
|
1998-04-13 20:24:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the root content object for this document.
|
|
|
|
*/
|
2001-06-20 03:27:48 +00:00
|
|
|
NS_IMETHOD GetRootContent(nsIContent** aRoot);
|
|
|
|
NS_IMETHOD SetRootContent(nsIContent* aRoot);
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1999-03-31 20:49:25 +00:00
|
|
|
/**
|
|
|
|
* Get the direct children of the document - content in
|
|
|
|
* the prolog, the root content and content in the epilog.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD ChildAt(PRInt32 aIndex, nsIContent*& aResult) const;
|
|
|
|
NS_IMETHOD IndexOf(nsIContent* aPossibleChild, PRInt32& aIndex) const;
|
|
|
|
NS_IMETHOD GetChildCount(PRInt32& aCount);
|
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
/**
|
|
|
|
* Get the style sheets owned by this document.
|
1998-09-02 02:02:30 +00:00
|
|
|
* These are ordered, highest priority last
|
1998-04-13 20:24:54 +00:00
|
|
|
*/
|
2001-06-20 03:27:48 +00:00
|
|
|
NS_IMETHOD GetNumberOfStyleSheets(PRInt32* aCount);
|
|
|
|
NS_IMETHOD GetStyleSheetAt(PRInt32 aIndex, nsIStyleSheet** aSheet);
|
|
|
|
NS_IMETHOD GetIndexOfStyleSheet(nsIStyleSheet* aSheet, PRInt32* aIndex);
|
1998-04-13 20:24:54 +00:00
|
|
|
virtual void AddStyleSheet(nsIStyleSheet* aSheet);
|
1999-11-29 22:15:07 +00:00
|
|
|
virtual void RemoveStyleSheet(nsIStyleSheet* aSheet);
|
2000-05-27 20:03:14 +00:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
NS_IMETHOD UpdateStyleSheets(nsISupportsArray* aOldSheets,
|
|
|
|
nsISupportsArray* aNewSheets);
|
2000-05-27 20:03:14 +00:00
|
|
|
virtual void AddStyleSheetToStyleSets(nsIStyleSheet* aSheet);
|
|
|
|
virtual void RemoveStyleSheetFromStyleSets(nsIStyleSheet* aSheet);
|
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
NS_IMETHOD InsertStyleSheetAt(nsIStyleSheet* aSheet, PRInt32 aIndex,
|
|
|
|
PRBool aNotify);
|
1998-11-17 02:14:38 +00:00
|
|
|
virtual void SetStyleSheetDisabledState(nsIStyleSheet* aSheet,
|
|
|
|
PRBool mDisabled);
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1998-06-25 22:26:52 +00:00
|
|
|
/**
|
|
|
|
* Set the object from which a document can get a script context.
|
|
|
|
* This is the context within which all scripts (during document
|
|
|
|
* creation and during event handling) will run.
|
|
|
|
*/
|
1999-12-03 09:24:22 +00:00
|
|
|
NS_IMETHOD GetScriptGlobalObject(nsIScriptGlobalObject** aGlobalObject);
|
|
|
|
NS_IMETHOD SetScriptGlobalObject(nsIScriptGlobalObject* aGlobalObject);
|
1998-06-25 22:26:52 +00:00
|
|
|
|
1998-12-11 02:35:06 +00:00
|
|
|
/**
|
|
|
|
* Get the name space manager for this document
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetNameSpaceManager(nsINameSpaceManager*& aManager);
|
|
|
|
|
2001-05-17 05:54:16 +00:00
|
|
|
/**
|
|
|
|
* Get the script loader for this document
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetScriptLoader(nsIScriptLoader** aScriptLoader);
|
|
|
|
|
2001-07-20 08:14:44 +00:00
|
|
|
/**
|
|
|
|
* Get the focus controller for this document
|
|
|
|
* This can usually be gotten through the ScriptGlobalObject, but
|
|
|
|
* it is set to null during document destruction, when we still might
|
|
|
|
* need to fire focus events.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetFocusController(nsIFocusController** aFocusController);
|
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
/**
|
|
|
|
* Add a new observer of document change notifications. Whenever
|
|
|
|
* content is changed, appended, inserted or removed the observers are
|
|
|
|
* informed.
|
|
|
|
*/
|
|
|
|
virtual void AddObserver(nsIDocumentObserver* aObserver);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove an observer of document change notifications. This will
|
|
|
|
* return false if the observer cannot be found.
|
|
|
|
*/
|
|
|
|
virtual PRBool RemoveObserver(nsIDocumentObserver* aObserver);
|
|
|
|
|
|
|
|
// Observation hooks used by content nodes to propagate
|
|
|
|
// notifications to document observers.
|
2000-01-29 00:34:07 +00:00
|
|
|
NS_IMETHOD BeginUpdate();
|
|
|
|
NS_IMETHOD EndUpdate();
|
1998-06-03 15:45:36 +00:00
|
|
|
NS_IMETHOD BeginLoad();
|
|
|
|
NS_IMETHOD EndLoad();
|
1998-09-24 21:39:47 +00:00
|
|
|
NS_IMETHOD ContentChanged(nsIContent* aContent,
|
|
|
|
nsISupports* aSubContent);
|
2001-03-22 08:51:52 +00:00
|
|
|
NS_IMETHOD ContentStatesChanged(nsIContent* aContent1,
|
|
|
|
nsIContent* aContent2);
|
|
|
|
|
|
|
|
NS_IMETHOD AttributeWillChange(nsIContent* aChild,
|
|
|
|
PRInt32 aNameSpaceID,
|
|
|
|
nsIAtom* aAttribute);
|
1998-09-24 21:39:47 +00:00
|
|
|
NS_IMETHOD AttributeChanged(nsIContent* aChild,
|
1999-10-15 23:16:45 +00:00
|
|
|
PRInt32 aNameSpaceID,
|
1998-09-29 23:43:39 +00:00
|
|
|
nsIAtom* aAttribute,
|
2001-08-25 02:01:08 +00:00
|
|
|
PRInt32 aModType,
|
1998-09-29 23:43:39 +00:00
|
|
|
PRInt32 aHint);
|
1998-09-24 21:39:47 +00:00
|
|
|
NS_IMETHOD ContentAppended(nsIContent* aContainer,
|
|
|
|
PRInt32 aNewIndexInContainer);
|
|
|
|
NS_IMETHOD ContentInserted(nsIContent* aContainer,
|
|
|
|
nsIContent* aChild,
|
|
|
|
PRInt32 aIndexInContainer);
|
|
|
|
NS_IMETHOD ContentReplaced(nsIContent* aContainer,
|
|
|
|
nsIContent* aOldChild,
|
|
|
|
nsIContent* aNewChild,
|
|
|
|
PRInt32 aIndexInContainer);
|
|
|
|
NS_IMETHOD ContentRemoved(nsIContent* aContainer,
|
|
|
|
nsIContent* aChild,
|
|
|
|
PRInt32 aIndexInContainer);
|
1998-04-13 20:24:54 +00:00
|
|
|
|
1998-11-26 01:34:53 +00:00
|
|
|
NS_IMETHOD StyleRuleChanged(nsIStyleSheet* aStyleSheet,
|
|
|
|
nsIStyleRule* aStyleRule,
|
|
|
|
PRInt32 aHint); // See nsStyleConsts fot hint values
|
|
|
|
NS_IMETHOD StyleRuleAdded(nsIStyleSheet* aStyleSheet,
|
|
|
|
nsIStyleRule* aStyleRule);
|
|
|
|
NS_IMETHOD StyleRuleRemoved(nsIStyleSheet* aStyleSheet,
|
|
|
|
nsIStyleRule* aStyleRule);
|
|
|
|
|
2001-08-31 04:28:26 +00:00
|
|
|
NS_IMETHOD FlushPendingNotifications(PRBool aFlushReflows = PR_TRUE,
|
|
|
|
PRBool aUpdateViews = PR_FALSE);
|
2000-03-21 03:25:16 +00:00
|
|
|
NS_IMETHOD GetAndIncrementContentID(PRInt32* aID);
|
2000-05-09 21:42:40 +00:00
|
|
|
NS_IMETHOD GetBindingManager(nsIBindingManager** aResult);
|
2000-05-10 13:13:39 +00:00
|
|
|
NS_IMETHOD GetNodeInfoManager(nsINodeInfoManager*& aNodeInfoManager);
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
NS_IMETHOD AddReference(void *aKey, nsISupports *aReference);
|
|
|
|
NS_IMETHOD RemoveReference(void *aKey, nsISupports **aOldReference);
|
1998-05-08 15:07:41 +00:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
// nsIDOMNode
|
|
|
|
NS_DECL_NSIDOMNODE
|
2001-04-12 23:35:24 +00:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
// nsIDOM3Node
|
|
|
|
NS_DECL_NSIDOM3NODE
|
2001-04-12 23:35:24 +00:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
// nsIDOMDocument
|
|
|
|
NS_DECL_NSIDOMDOCUMENT
|
|
|
|
|
|
|
|
// nsIDOMNSDocument
|
|
|
|
NS_DECL_NSIDOMNSDOCUMENT
|
|
|
|
|
|
|
|
// nsIDOMDocumentEvent
|
|
|
|
NS_DECL_NSIDOMDOCUMENTEVENT
|
|
|
|
|
|
|
|
// nsIDOMDocumentStyle
|
|
|
|
NS_DECL_NSIDOMDOCUMENTSTYLE
|
1998-04-13 20:24:54 +00:00
|
|
|
|
2000-04-26 13:58:56 +00:00
|
|
|
// nsIDOMDocumentView
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
NS_DECL_NSIDOMDOCUMENTVIEW
|
2000-04-26 13:58:56 +00:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
// nsIDOMDocumentRange
|
|
|
|
NS_DECL_NSIDOMDOCUMENTRANGE
|
2000-06-02 08:13:29 +00:00
|
|
|
|
2001-09-07 09:30:03 +00:00
|
|
|
// nsIDOMDocumentTraversal
|
|
|
|
NS_DECL_NSIDOMDOCUMENTTRAVERSAL
|
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
// nsIDOMDocumentXBL
|
|
|
|
NS_DECL_NSIDOMDOCUMENTXBL
|
2000-05-16 11:35:12 +00:00
|
|
|
|
1998-09-15 21:31:58 +00:00
|
|
|
// nsIDOMEventReceiver interface
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
NS_IMETHOD AddEventListenerByIID(nsIDOMEventListener *aListener,
|
|
|
|
const nsIID& aIID);
|
|
|
|
NS_IMETHOD RemoveEventListenerByIID(nsIDOMEventListener *aListener,
|
|
|
|
const nsIID& aIID);
|
1998-07-31 22:09:51 +00:00
|
|
|
NS_IMETHOD GetListenerManager(nsIEventListenerManager** aInstancePtrResult);
|
2000-02-16 06:59:07 +00:00
|
|
|
NS_IMETHOD HandleEvent(nsIDOMEvent *aEvent);
|
1998-06-08 00:57:15 +00:00
|
|
|
|
1999-05-07 04:59:23 +00:00
|
|
|
// nsIDiskDocument inteface
|
2001-01-09 22:47:02 +00:00
|
|
|
NS_DECL_NSIDISKDOCUMENT
|
1999-05-07 04:59:23 +00:00
|
|
|
|
1999-03-28 22:22:54 +00:00
|
|
|
// nsIDOMEventTarget interface
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
NS_IMETHOD AddEventListener(const nsAReadableString& aType,
|
|
|
|
nsIDOMEventListener* aListener,
|
1999-07-19 19:54:34 +00:00
|
|
|
PRBool aUseCapture);
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
NS_IMETHOD RemoveEventListener(const nsAReadableString& aType,
|
|
|
|
nsIDOMEventListener* aListener,
|
1999-07-19 19:54:34 +00:00
|
|
|
PRBool aUseCapture);
|
2000-05-16 11:35:12 +00:00
|
|
|
NS_IMETHOD DispatchEvent(nsIDOMEvent* aEvent);
|
1999-03-28 22:22:54 +00:00
|
|
|
|
|
|
|
|
1999-11-24 06:03:41 +00:00
|
|
|
NS_IMETHOD HandleDOMEvent(nsIPresContext* aPresContext,
|
1998-07-23 02:55:33 +00:00
|
|
|
nsEvent* aEvent,
|
|
|
|
nsIDOMEvent** aDOMEvent,
|
|
|
|
PRUint32 aFlags,
|
1999-11-24 06:03:41 +00:00
|
|
|
nsEventStatus* aEventStatus);
|
1998-06-08 00:57:15 +00:00
|
|
|
|
2001-03-13 11:37:16 +00:00
|
|
|
NS_IMETHOD_(PRBool) EventCaptureRegistration(PRInt32 aCapturerIncrement);
|
|
|
|
|
1998-07-27 18:05:35 +00:00
|
|
|
|
2001-08-02 20:29:20 +00:00
|
|
|
NS_IMETHOD SetDocumentURL(nsIURI* aURI);
|
2000-06-17 01:46:58 +00:00
|
|
|
|
1998-07-17 23:00:54 +00:00
|
|
|
protected:
|
2000-08-28 23:46:11 +00:00
|
|
|
NS_IMETHOD GetDTD(nsIDTD** aDTD) const;
|
1998-07-17 23:00:54 +00:00
|
|
|
|
1999-05-18 23:03:04 +00:00
|
|
|
virtual void InternalAddStyleSheet(nsIStyleSheet* aSheet); // subclass hooks for sheet ordering
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
virtual void InternalInsertStyleSheetAt(nsIStyleSheet* aSheet,
|
|
|
|
PRInt32 aIndex);
|
2001-03-13 11:37:16 +00:00
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
nsDocument();
|
1998-04-30 18:21:59 +00:00
|
|
|
virtual ~nsDocument();
|
1998-04-13 20:24:54 +00:00
|
|
|
nsresult Init();
|
|
|
|
|
|
|
|
nsIArena* mArena;
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
nsString mDocumentTitle;
|
1999-06-23 03:29:44 +00:00
|
|
|
nsIURI* mDocumentURL;
|
2001-04-30 23:35:09 +00:00
|
|
|
nsCOMPtr<nsIURI> mDocumentBaseURL;
|
1999-08-29 21:58:42 +00:00
|
|
|
nsIPrincipal* mPrincipal;
|
1999-09-21 06:44:56 +00:00
|
|
|
nsWeakPtr mDocumentLoadGroup;
|
1999-04-27 21:49:25 +00:00
|
|
|
nsString mCharacterSet;
|
2000-06-01 23:10:44 +00:00
|
|
|
nsVoidArray mCharSetObservers;
|
1998-04-13 20:24:54 +00:00
|
|
|
nsIDocument* mParentDocument;
|
|
|
|
nsVoidArray mSubDocuments;
|
|
|
|
nsVoidArray mPresShells;
|
2001-01-25 14:19:38 +00:00
|
|
|
nsCOMPtr<nsISupportsArray> mChildren; // contains owning references
|
|
|
|
nsIContent* mRootContent; // a weak reference to the only element in
|
|
|
|
// mChildren, or null if no such element exists.
|
2001-09-06 19:16:03 +00:00
|
|
|
nsAutoVoidArray mStyleSheets;
|
|
|
|
nsAutoVoidArray mObservers; // basically always has at least 1 entry
|
1999-12-03 09:24:22 +00:00
|
|
|
nsCOMPtr<nsIScriptGlobalObject> mScriptGlobalObject;
|
1998-06-08 00:57:15 +00:00
|
|
|
nsIEventListenerManager* mListenerManager;
|
1998-07-22 23:32:19 +00:00
|
|
|
PRBool mInDestructor;
|
2001-04-12 01:05:42 +00:00
|
|
|
nsCOMPtr<nsIDOMStyleSheetList> mDOMStyleSheets;
|
1998-12-11 02:35:06 +00:00
|
|
|
nsINameSpaceManager* mNameSpaceManager;
|
2001-05-17 05:54:16 +00:00
|
|
|
nsCOMPtr<nsIScriptLoader> mScriptLoader;
|
1999-01-23 07:01:40 +00:00
|
|
|
nsDocHeaderData* mHeaderData;
|
2001-01-29 23:17:55 +00:00
|
|
|
nsCOMPtr<nsILineBreaker> mLineBreaker;
|
|
|
|
nsCOMPtr<nsIWordBreaker> mWordBreaker;
|
1999-03-31 20:49:25 +00:00
|
|
|
nsDocumentChildNodes* mChildNodes;
|
2000-03-21 03:25:16 +00:00
|
|
|
// A content ID counter used to give a monotonically increasing ID to the content
|
|
|
|
// objects in the document's content model
|
|
|
|
PRInt32 mNextContentID;
|
|
|
|
|
2001-04-12 23:35:24 +00:00
|
|
|
#ifdef IBMBIDI
|
|
|
|
PRBool mBidiEnabled;
|
|
|
|
#endif // IBMBIDI
|
|
|
|
|
1999-05-07 04:59:23 +00:00
|
|
|
// disk file members
|
2001-01-09 22:47:02 +00:00
|
|
|
nsCOMPtr<nsIFile> mFileSpec;
|
|
|
|
PRInt32 mModCount;
|
2000-05-09 21:42:40 +00:00
|
|
|
|
2000-08-28 23:46:11 +00:00
|
|
|
nsIDTD* mDTD;
|
|
|
|
|
2000-05-09 21:42:40 +00:00
|
|
|
nsCOMPtr<nsIBindingManager> mBindingManager;
|
2000-05-10 13:13:39 +00:00
|
|
|
nsCOMPtr<nsINodeInfoManager> mNodeInfoManager; // OWNER
|
2001-05-19 02:59:15 +00:00
|
|
|
|
|
|
|
PRBool mIsGoingAway; // True if the document is being destroyed.
|
|
|
|
|
2000-12-10 09:19:59 +00:00
|
|
|
nsSupportsHashtable* mBoxObjectTable;
|
2001-03-13 11:37:16 +00:00
|
|
|
PRInt32 mNumCapturers; //Number of capturing event handlers in doc. Used to optimize event delivery.
|
2001-01-25 14:19:38 +00:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 16:46:42 +00:00
|
|
|
nsSupportsHashtable mContentWrapperHash;
|
|
|
|
|
2001-05-19 02:59:15 +00:00
|
|
|
nsCOMPtr<nsICSSLoader> mCSSLoader;
|
2001-07-20 08:14:44 +00:00
|
|
|
nsWeakPtr mFocusController;
|
2001-05-19 02:59:15 +00:00
|
|
|
|
2001-09-11 21:12:23 +00:00
|
|
|
nsString mContentLanguage;
|
2001-09-24 22:43:23 +00:00
|
|
|
nsString mContentType;
|
2001-09-11 21:12:23 +00:00
|
|
|
|
2001-01-25 14:19:38 +00:00
|
|
|
private:
|
|
|
|
// These are not implemented and not supported.
|
|
|
|
nsDocument(const nsDocument& aOther);
|
|
|
|
nsDocument& operator=(const nsDocument& aOther);
|
1998-04-13 20:24:54 +00:00
|
|
|
};
|
|
|
|
|
2001-04-12 01:05:42 +00:00
|
|
|
|
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
#endif /* nsDocument_h___ */
|