diff --git a/mozilla/content/base/src/nsContentIterator.cpp b/mozilla/content/base/src/nsContentIterator.cpp index 5877ef5aac8..0fa96ef0bd2 100644 --- a/mozilla/content/base/src/nsContentIterator.cpp +++ b/mozilla/content/base/src/nsContentIterator.cpp @@ -1441,8 +1441,10 @@ nsresult nsContentSubtreeIterator::Init(nsIDOMRange* aRange) // does not fully contain any node. PRBool nodeBefore, nodeAfter; - if (NS_FAILED(CompareNodeToRange(firstCandidate, aRange, &nodeBefore, &nodeAfter))) + if (NS_FAILED(nsRange::CompareNodeToRange(firstCandidate, aRange, + &nodeBefore, &nodeAfter))) return NS_ERROR_FAILURE; + if (nodeBefore || nodeAfter) { MakeEmpty(); @@ -1504,8 +1506,10 @@ nsresult nsContentSubtreeIterator::Init(nsIDOMRange* aRange) // is indeed contained. Else we have a range that // does not fully contain any node. - if (NS_FAILED(CompareNodeToRange(lastCandidate, aRange, &nodeBefore, &nodeAfter))) + if (NS_FAILED(nsRange::CompareNodeToRange(lastCandidate, aRange, &nodeBefore, + &nodeAfter))) return NS_ERROR_FAILURE; + if (nodeBefore || nodeAfter) { MakeEmpty(); @@ -1635,8 +1639,10 @@ nsresult nsContentSubtreeIterator::GetTopAncestorInRange( // sanity check: aNode is itself in the range PRBool nodeBefore, nodeAfter; - if (NS_FAILED(CompareNodeToRange(aNode, mRange, &nodeBefore, &nodeAfter))) + if (NS_FAILED(nsRange::CompareNodeToRange(aNode, mRange, &nodeBefore, + &nodeAfter))) return NS_ERROR_FAILURE; + if (nodeBefore || nodeAfter) return NS_ERROR_FAILURE; @@ -1654,8 +1660,10 @@ nsresult nsContentSubtreeIterator::GetTopAncestorInRange( } else return NS_ERROR_FAILURE; } - if (NS_FAILED(CompareNodeToRange(parent, mRange, &nodeBefore, &nodeAfter))) + if (NS_FAILED(nsRange::CompareNodeToRange(parent, mRange, &nodeBefore, + &nodeAfter))) return NS_ERROR_FAILURE; + if (nodeBefore || nodeAfter) { *outAnestor = aNode; diff --git a/mozilla/content/base/src/nsGeneratedIterator.cpp b/mozilla/content/base/src/nsGeneratedIterator.cpp index 35074fadf61..bdf0eab44f4 100644 --- a/mozilla/content/base/src/nsGeneratedIterator.cpp +++ b/mozilla/content/base/src/nsGeneratedIterator.cpp @@ -1040,8 +1040,11 @@ nsresult nsGeneratedSubtreeIterator::Init(nsIDOMRange* aRange) // does not fully contain any node. PRBool nodeBefore(PR_FALSE), nodeAfter(PR_FALSE); - if (!mFirstIter && NS_FAILED(CompareNodeToRange(firstCandidate, aRange, &nodeBefore, &nodeAfter))) + if (!mFirstIter && + NS_FAILED(nsRange::CompareNodeToRange(firstCandidate, aRange, + &nodeBefore, &nodeAfter))) return NS_ERROR_FAILURE; + if (nodeBefore || nodeAfter) { MakeEmpty(); @@ -1122,9 +1125,10 @@ nsresult nsGeneratedSubtreeIterator::Init(nsIDOMRange* aRange) // is indeed contained. Else we have a range that // does not fully contain any node. - if (!mLastIter && NS_FAILED(CompareNodeToRange(lastCandidate, aRange, &nodeBefore, &nodeAfter))) + if (!mLastIter && + NS_FAILED(nsRange::CompareNodeToRange(lastCandidate, aRange, &nodeBefore, + &nodeAfter))) return NS_ERROR_FAILURE; - if (nodeBefore || nodeAfter) { @@ -1230,8 +1234,10 @@ nsresult nsGeneratedSubtreeIterator::GetTopAncestorInRange( // sanity check: aNode is itself in the range PRBool nodeBefore, nodeAfter; - if (NS_FAILED(CompareNodeToRange(aNode, mRange, &nodeBefore, &nodeAfter))) + if (NS_FAILED(nsRange::CompareNodeToRange(aNode, mRange, &nodeBefore, + &nodeAfter))) return NS_ERROR_FAILURE; + if (nodeBefore || nodeAfter) return NS_ERROR_FAILURE; @@ -1240,8 +1246,10 @@ nsresult nsGeneratedSubtreeIterator::GetTopAncestorInRange( { if (NS_FAILED(aNode->GetParent(*getter_AddRefs(parent))) || !parent) return NS_ERROR_FAILURE; - if (NS_FAILED(CompareNodeToRange(parent, mRange, &nodeBefore, &nodeAfter))) + if (NS_FAILED(nsRange::CompareNodeToRange(parent, mRange, &nodeBefore, + &nodeAfter))) return NS_ERROR_FAILURE; + if (nodeBefore || nodeAfter) { *outAnestor = aNode; diff --git a/mozilla/content/base/src/nsRange.cpp b/mozilla/content/base/src/nsRange.cpp index 236c18ebe58..eaf213935bf 100644 --- a/mozilla/content/base/src/nsRange.cpp +++ b/mozilla/content/base/src/nsRange.cpp @@ -178,10 +178,11 @@ PRBool IsNodeIntersectsRange(nsIContent* aNode, nsIDOMRange* aRange) // Note that both of the above might be true. // If neither are true, the node is contained inside of the range. // XXX - callers responsibility to ensure node in same doc as range! -nsresult CompareNodeToRange(nsIContent* aNode, - nsIDOMRange* aRange, - PRBool *outNodeBefore, - PRBool *outNodeAfter) + +// static +nsresult +nsRange::CompareNodeToRange(nsIContent* aNode, nsIDOMRange* aRange, + PRBool *outNodeBefore, PRBool *outNodeAfter) { // create a pair of dom points that expresses location of node: // NODE(start), NODE(end) @@ -377,12 +378,11 @@ nsRangeUtils::IsNodeIntersectsRange(nsIContent* aNode, nsIDOMRange* aRange) } NS_IMETHODIMP -nsRangeUtils::CompareNodeToRange(nsIContent* aNode, - nsIDOMRange* aRange, - PRBool *outNodeBefore, - PRBool *outNodeAfter) +nsRangeUtils::CompareNodeToRange(nsIContent* aNode, nsIDOMRange* aRange, + PRBool *outNodeBefore, PRBool *outNodeAfter) { - return ::CompareNodeToRange(aNode, aRange, outNodeBefore, outNodeAfter); + return nsRange::CompareNodeToRange(aNode, aRange, outNodeBefore, + outNodeAfter); } #ifdef XP_MAC @@ -1171,12 +1171,6 @@ nsresult nsRange::Collapse(PRBool aToStart) return DoSetRange(mEndParent,mEndOffset,mEndParent,mEndOffset); } -nsresult nsRange::Unposition() -{ - return DoSetRange(nsCOMPtr(),0,nsCOMPtr(),0); - // note that "nsCOMPtr()" is the moral equivalent of null -} - nsresult nsRange::SelectNode(nsIDOMNode* aN) { if (!nsContentUtils::CanCallerAccess(aN)) { @@ -1749,8 +1743,9 @@ nsresult nsRange::DeleteContents() return CollapseRangeAfterDelete(this); } -nsresult nsRange::CompareBoundaryPoints(PRUint16 how, nsIDOMRange* srcRange, - PRInt32* aCmpRet) +NS_IMETHODIMP +nsRange::CompareBoundaryPoints(PRUint16 how, nsIDOMRange* srcRange, + PRInt16* aCmpRet) { if(IsDetached()) return NS_ERROR_DOM_INVALID_STATE_ERR; diff --git a/mozilla/content/base/src/nsRange.h b/mozilla/content/base/src/nsRange.h index 0dafa13455a..6630afc3cd2 100644 --- a/mozilla/content/base/src/nsRange.h +++ b/mozilla/content/base/src/nsRange.h @@ -90,49 +90,7 @@ public: static void Shutdown(); // nsIDOMRange interface - - NS_IMETHOD GetIsPositioned(PRBool* aIsPositioned); - - NS_IMETHOD GetStartContainer(nsIDOMNode** aStartParent); - NS_IMETHOD GetStartOffset(PRInt32* aStartOffset); - - NS_IMETHOD GetEndContainer(nsIDOMNode** aEndParent); - NS_IMETHOD GetEndOffset(PRInt32* aEndOffset); - - NS_IMETHOD GetCollapsed(PRBool* aIsCollapsed); - - NS_IMETHOD GetCommonAncestorContainer(nsIDOMNode** aCommonParent); - - NS_IMETHOD SetStart(nsIDOMNode* aParent, PRInt32 aOffset); - NS_IMETHOD SetStartBefore(nsIDOMNode* aSibling); - NS_IMETHOD SetStartAfter(nsIDOMNode* aSibling); - - NS_IMETHOD SetEnd(nsIDOMNode* aParent, PRInt32 aOffset); - NS_IMETHOD SetEndBefore(nsIDOMNode* aSibling); - NS_IMETHOD SetEndAfter(nsIDOMNode* aSibling); - - NS_IMETHOD Collapse(PRBool aToStart); - - NS_IMETHOD Unposition(); - - NS_IMETHOD SelectNode(nsIDOMNode* aN); - NS_IMETHOD SelectNodeContents(nsIDOMNode* aN); - - NS_IMETHOD CompareBoundaryPoints(PRUint16 how, nsIDOMRange* srcRange, PRInt32* ret); - - NS_IMETHOD DeleteContents(); - - NS_IMETHOD ExtractContents(nsIDOMDocumentFragment** aReturn); - NS_IMETHOD CloneContents(nsIDOMDocumentFragment** aReturn); - - NS_IMETHOD InsertNode(nsIDOMNode* aN); - NS_IMETHOD SurroundContents(nsIDOMNode* aN); - - NS_IMETHOD CloneRange(nsIDOMRange** aReturn); - - NS_IMETHOD Detach(); - - NS_IMETHOD ToString(nsAString& aReturn); + NS_DECL_NSIDOMRANGE /*BEGIN nsIDOMNSRange interface implementations*/ NS_IMETHOD CreateContextualFragment(const nsAString& aFragment, @@ -201,6 +159,17 @@ public: nsIDOMNode** closestAncestor, nsIDOMNode** farthestAncestor); +/****************************************************************************** + * Utility routine to detect if a content node starts before a range and/or + * ends after a range. If neither it is contained inside the range. + * + * XXX - callers responsibility to ensure node in same doc as range! + * + *****************************************************************************/ + static nsresult CompareNodeToRange(nsIContent* aNode, nsIDOMRange* aRange, + PRBool *outNodeBefore, + PRBool *outNodeAfter); + protected: // CollapseRangeAfterDelete() should only be called from DeleteContents() @@ -227,6 +196,7 @@ protected: nsresult ContentOwnsUs(nsIDOMNode* domNode); + nsresult GetIsPositioned(PRBool* aIsPositioned); }; // Make a new nsIDOMRange object @@ -251,19 +221,6 @@ PRInt32 ComparePoints(nsIDOMNode* aParent1, PRInt32 aOffset1, PRBool IsNodeIntersectsRange(nsIContent* aNode, nsIDOMRange* aRange); -/************************************************************************************* - * Utility routine to detect if a content node starts before a range and/or - * ends after a range. If neither it is contained inside the range. - * - * XXX - callers responsibility to ensure node in same doc as range! - * - ************************************************************************************/ -nsresult CompareNodeToRange(nsIContent* aNode, - nsIDOMRange* aRange, - PRBool *outNodeBefore, - PRBool *outNodeAfter); - - /************************************************************************************* * Utility routine to create a pair of dom points to represent * the start and end locations of a single node. Return false diff --git a/mozilla/content/base/src/nsSelection.cpp b/mozilla/content/base/src/nsSelection.cpp index ef7a15945f0..df15ac78f02 100644 --- a/mozilla/content/base/src/nsSelection.cpp +++ b/mozilla/content/base/src/nsSelection.cpp @@ -6946,9 +6946,9 @@ nsTypedSelection::ContainsNode(nsIDOMNode* aNode, PRBool aRecursive, PRBool* aYe // else not recursive -- node itself must be contained, // so we need to do more checking PRBool nodeStartsBeforeRange, nodeEndsAfterRange; - if (NS_SUCCEEDED(CompareNodeToRange(content, range, - &nodeStartsBeforeRange, - &nodeEndsAfterRange))) + if (NS_SUCCEEDED(nsRange::CompareNodeToRange(content, range, + &nodeStartsBeforeRange, + &nodeEndsAfterRange))) { #ifdef DEBUG_ContainsNode nsAutoString name, value; diff --git a/mozilla/content/html/document/src/nsHTMLDocument.h b/mozilla/content/html/document/src/nsHTMLDocument.h index 0f7d928c70d..d7113d30906 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.h +++ b/mozilla/content/html/document/src/nsHTMLDocument.h @@ -162,7 +162,25 @@ public: NS_DECL_NSIDOM3NODE // nsIDOMHTMLDocument interface - NS_DECL_NSIDOMHTMLDOCUMENT + NS_IMETHOD GetTitle(nsAString & aTitle); + NS_IMETHOD SetTitle(const nsAString & aTitle); + NS_IMETHOD GetReferrer(nsAString & aReferrer); + NS_IMETHOD GetURL(nsAString & aURL); + NS_IMETHOD GetBody(nsIDOMHTMLElement * *aBody); + NS_IMETHOD SetBody(nsIDOMHTMLElement * aBody); + NS_IMETHOD GetImages(nsIDOMHTMLCollection * *aImages); + NS_IMETHOD GetApplets(nsIDOMHTMLCollection * *aApplets); + NS_IMETHOD GetLinks(nsIDOMHTMLCollection * *aLinks); + NS_IMETHOD GetForms(nsIDOMHTMLCollection * *aForms); + NS_IMETHOD GetAnchors(nsIDOMHTMLCollection * *aAnchors); + NS_IMETHOD GetCookie(nsAString & aCookie); + NS_IMETHOD SetCookie(const nsAString & aCookie); + NS_IMETHOD Open(void); + NS_IMETHOD Close(void); + NS_IMETHOD Write(const nsAString & text); + NS_IMETHOD Writeln(const nsAString & text); + NS_IMETHOD GetElementsByName(const nsAString & elementName, + nsIDOMNodeList **_retval); // nsIDOMNSHTMLDocument interface NS_DECL_NSIDOMNSHTMLDOCUMENT diff --git a/mozilla/dom/public/idl/base/domstubs.idl b/mozilla/dom/public/idl/base/domstubs.idl index 74a0e5ea358..f366b7de97f 100644 --- a/mozilla/dom/public/idl/base/domstubs.idl +++ b/mozilla/dom/public/idl/base/domstubs.idl @@ -78,7 +78,10 @@ interface nsIDOMNodeList; interface nsIDOMNotation; interface nsIDOMProcessingInstruction; interface nsIDOMText; + +// Needed for raises() in our IDL interface DOMException; +interface RangeException; // Style Sheets interface nsIDOMStyleSheetList; diff --git a/mozilla/dom/public/idl/css/nsIDOMCSSPrimitiveValue.idl b/mozilla/dom/public/idl/css/nsIDOMCSSPrimitiveValue.idl index 1a82d651356..c009f236760 100644 --- a/mozilla/dom/public/idl/css/nsIDOMCSSPrimitiveValue.idl +++ b/mozilla/dom/public/idl/css/nsIDOMCSSPrimitiveValue.idl @@ -39,9 +39,20 @@ #include "nsIDOMCSSValue.idl" +/** + * The nsIDOMCSSPrimitiveValue interface is a datatype for a primitive + * CSS value in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + [scriptable, uuid(e249031f-8df9-4e7a-b644-18946dce0019)] interface nsIDOMCSSPrimitiveValue : nsIDOMCSSValue { + // UnitTypes const unsigned short CSS_UNKNOWN = 0; const unsigned short CSS_NUMBER = 1; const unsigned short CSS_PERCENTAGE = 2; diff --git a/mozilla/dom/public/idl/css/nsIDOMCSSRule.idl b/mozilla/dom/public/idl/css/nsIDOMCSSRule.idl index c5815ecbc68..2d80e6aff1a 100644 --- a/mozilla/dom/public/idl/css/nsIDOMCSSRule.idl +++ b/mozilla/dom/public/idl/css/nsIDOMCSSRule.idl @@ -40,9 +40,20 @@ #include "domstubs.idl" +/** + * The nsIDOMCSSRule interface is a datatype for a CSS style rule in + * the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + [scriptable, uuid(a6cf90c1-15b3-11d2-932e-00805f8add32)] interface nsIDOMCSSRule : nsISupports { + // RuleType const unsigned short UNKNOWN_RULE = 0; const unsigned short STYLE_RULE = 1; const unsigned short CHARSET_RULE = 2; diff --git a/mozilla/dom/public/idl/css/nsIDOMCSSRuleList.idl b/mozilla/dom/public/idl/css/nsIDOMCSSRuleList.idl index 27ee8f7d269..7b0c075ad92 100644 --- a/mozilla/dom/public/idl/css/nsIDOMCSSRuleList.idl +++ b/mozilla/dom/public/idl/css/nsIDOMCSSRuleList.idl @@ -40,6 +40,16 @@ #include "domstubs.idl" +/** + * The nsIDOMCSSRuleList interface is a datatype for a list of CSS + * style rules in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + [scriptable, uuid(a6cf90c0-15b3-11d2-932e-00805f8add32)] interface nsIDOMCSSRuleList : nsISupports { diff --git a/mozilla/dom/public/idl/css/nsIDOMCSSStyleDeclaration.idl b/mozilla/dom/public/idl/css/nsIDOMCSSStyleDeclaration.idl index 3a337bca36c..375c7eb3778 100644 --- a/mozilla/dom/public/idl/css/nsIDOMCSSStyleDeclaration.idl +++ b/mozilla/dom/public/idl/css/nsIDOMCSSStyleDeclaration.idl @@ -40,6 +40,16 @@ #include "domstubs.idl" +/** + * The nsIDOMCSSStyleDeclaration interface is a datatype for a CSS + * style declaration in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + [scriptable, uuid(a6cf90be-15b3-11d2-932e-00805f8add32)] interface nsIDOMCSSStyleDeclaration : nsISupports { @@ -55,9 +65,7 @@ interface nsIDOMCSSStyleDeclaration : nsISupports in DOMString value, in DOMString priority) raises(DOMException); - readonly attribute unsigned long length; DOMString item(in unsigned long index); - - readonly attribute nsIDOMCSSRule parentRule; + readonly attribute nsIDOMCSSRule parentRule; }; diff --git a/mozilla/dom/public/idl/css/nsIDOMCSSStyleSheet.idl b/mozilla/dom/public/idl/css/nsIDOMCSSStyleSheet.idl index c99042fb64b..02a75521160 100644 --- a/mozilla/dom/public/idl/css/nsIDOMCSSStyleSheet.idl +++ b/mozilla/dom/public/idl/css/nsIDOMCSSStyleSheet.idl @@ -40,6 +40,16 @@ #include "nsIDOMStyleSheet.idl" +/** + * The nsIDOMCSSStyleSheet interface is a datatype for a CSS style + * sheet in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + [scriptable, uuid(a6cf90c2-15b3-11d2-932e-00805f8add32)] interface nsIDOMCSSStyleSheet : nsIDOMStyleSheet { diff --git a/mozilla/dom/public/idl/css/nsIDOMCSSValue.idl b/mozilla/dom/public/idl/css/nsIDOMCSSValue.idl index 7e30d922698..2852e7db882 100644 --- a/mozilla/dom/public/idl/css/nsIDOMCSSValue.idl +++ b/mozilla/dom/public/idl/css/nsIDOMCSSValue.idl @@ -39,9 +39,20 @@ #include "domstubs.idl" +/** + * The nsIDOMCSSValue interface is a datatype for a CSS value in the + * Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + [scriptable, uuid(009f7ea5-9e80-41be-b008-db62f10823f2)] interface nsIDOMCSSValue : nsISupports { + // UnitTypes const unsigned short CSS_INHERIT = 0; const unsigned short CSS_PRIMITIVE_VALUE = 1; const unsigned short CSS_VALUE_LIST = 2; diff --git a/mozilla/dom/public/idl/css/nsIDOMCSSValueList.idl b/mozilla/dom/public/idl/css/nsIDOMCSSValueList.idl index f7f65209333..ea2ba87e4dd 100644 --- a/mozilla/dom/public/idl/css/nsIDOMCSSValueList.idl +++ b/mozilla/dom/public/idl/css/nsIDOMCSSValueList.idl @@ -37,22 +37,19 @@ #include "nsIDOMCSSValue.idl" +/** + * The nsIDOMCSSValueList interface is a datatype for a list of CSS + * values in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + [scriptable, uuid(8f09fa84-39b9-4dca-9b2f-db0eeb186286)] interface nsIDOMCSSValueList : nsIDOMCSSValue { - // Introduced in DOM Level 2: - - /** - * The number of items in the CSSValueList. - */ - readonly attribute unsigned long length; - - /** - * Retrieve the indexth CSSValue from the CSSValueList. - * - * @param index Specifies the index of the desired - * CSSValue in the list. - * @return nsIDOMCSSValue The CSSValue at the requested index. - */ + readonly attribute unsigned long length; nsIDOMCSSValue item(in unsigned long index); }; diff --git a/mozilla/dom/public/idl/events/nsIDOMMouseEvent.idl b/mozilla/dom/public/idl/events/nsIDOMMouseEvent.idl index 40ad2923c30..d95d44a9939 100644 --- a/mozilla/dom/public/idl/events/nsIDOMMouseEvent.idl +++ b/mozilla/dom/public/idl/events/nsIDOMMouseEvent.idl @@ -40,6 +40,16 @@ #include "nsIDOMUIEvent.idl" +/** + * The nsIDOMMouseEvent interface is the datatype for all mouse events + * in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Events/ + * + * @status FROZEN + */ + [scriptable, uuid(ff751edc-8b02-aae7-0010-8301838a3123)] interface nsIDOMMouseEvent : nsIDOMUIEvent { @@ -49,9 +59,9 @@ interface nsIDOMMouseEvent : nsIDOMUIEvent readonly attribute long clientX; readonly attribute long clientY; - readonly attribute boolean altKey; readonly attribute boolean ctrlKey; readonly attribute boolean shiftKey; + readonly attribute boolean altKey; readonly attribute boolean metaKey; readonly attribute unsigned short button; diff --git a/mozilla/dom/public/idl/events/nsIDOMUIEvent.idl b/mozilla/dom/public/idl/events/nsIDOMUIEvent.idl index eb6f0a1ae94..207eaabf934 100644 --- a/mozilla/dom/public/idl/events/nsIDOMUIEvent.idl +++ b/mozilla/dom/public/idl/events/nsIDOMUIEvent.idl @@ -40,6 +40,16 @@ #include "nsIDOMEvent.idl" +/** + * The nsIDOMUIEvent interface is the datatype for all UI events in the + * Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Events/ + * + * @status FROZEN + */ + [scriptable, uuid(a6cf90c3-15b3-11d2-932e-00805f8add32)] interface nsIDOMUIEvent : nsIDOMEvent { diff --git a/mozilla/dom/public/idl/html/nsIDOMHTMLAppletElement.idl b/mozilla/dom/public/idl/html/nsIDOMHTMLAppletElement.idl index 9ebbe318961..4d77a26ab7b 100644 --- a/mozilla/dom/public/idl/html/nsIDOMHTMLAppletElement.idl +++ b/mozilla/dom/public/idl/html/nsIDOMHTMLAppletElement.idl @@ -40,6 +40,16 @@ #include "nsIDOMHTMLElement.idl" +/** + * The nsIDOMHTMLAppletElement interface is the interface to a [X]HTML + * applet element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + [scriptable, uuid(a6cf90ae-15b3-11d2-932e-00805f8add32)] interface nsIDOMHTMLAppletElement : nsIDOMHTMLElement { @@ -49,9 +59,12 @@ interface nsIDOMHTMLAppletElement : nsIDOMHTMLElement attribute DOMString code; attribute DOMString codeBase; attribute DOMString height; + // Modified in DOM Level 2: attribute long hspace; attribute DOMString name; + // Modified in DOM Level 2: attribute DOMString object; + // Modified in DOM Level 2: attribute long vspace; attribute DOMString width; }; diff --git a/mozilla/dom/public/idl/html/nsIDOMHTMLAreaElement.idl b/mozilla/dom/public/idl/html/nsIDOMHTMLAreaElement.idl index b19d98926cd..bbba5f44ecd 100644 --- a/mozilla/dom/public/idl/html/nsIDOMHTMLAreaElement.idl +++ b/mozilla/dom/public/idl/html/nsIDOMHTMLAreaElement.idl @@ -40,6 +40,16 @@ #include "nsIDOMHTMLElement.idl" +/** + * The nsIDOMHTMLAreaElement interface is the interface to a [X]HTML + * area element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + [scriptable, uuid(a6cf90b0-15b3-11d2-932e-00805f8add32)] interface nsIDOMHTMLAreaElement : nsIDOMHTMLElement { diff --git a/mozilla/dom/public/idl/html/nsIDOMHTMLBaseElement.idl b/mozilla/dom/public/idl/html/nsIDOMHTMLBaseElement.idl index 003c53ffbc8..8240e2dd912 100644 --- a/mozilla/dom/public/idl/html/nsIDOMHTMLBaseElement.idl +++ b/mozilla/dom/public/idl/html/nsIDOMHTMLBaseElement.idl @@ -40,6 +40,16 @@ #include "nsIDOMHTMLElement.idl" +/** + * The nsIDOMHTMLBaseElement interface is the interface to a [X]HTML + * base element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + [scriptable, uuid(a6cf908b-15b3-11d2-932e-00805f8add32)] interface nsIDOMHTMLBaseElement : nsIDOMHTMLElement { diff --git a/mozilla/dom/public/idl/html/nsIDOMHTMLBodyElement.idl b/mozilla/dom/public/idl/html/nsIDOMHTMLBodyElement.idl index ef5d7074123..56149379a97 100644 --- a/mozilla/dom/public/idl/html/nsIDOMHTMLBodyElement.idl +++ b/mozilla/dom/public/idl/html/nsIDOMHTMLBodyElement.idl @@ -40,6 +40,16 @@ #include "nsIDOMHTMLElement.idl" +/** + * The nsIDOMHTMLBodyElement interface is the interface to a [X]HTML + * body element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + [scriptable, uuid(a6cf908e-15b3-11d2-932e-00805f8add32)] interface nsIDOMHTMLBodyElement : nsIDOMHTMLElement { diff --git a/mozilla/dom/public/idl/html/nsIDOMHTMLCollection.idl b/mozilla/dom/public/idl/html/nsIDOMHTMLCollection.idl index 18b785361ca..51ee2045695 100644 --- a/mozilla/dom/public/idl/html/nsIDOMHTMLCollection.idl +++ b/mozilla/dom/public/idl/html/nsIDOMHTMLCollection.idl @@ -40,6 +40,16 @@ #include "domstubs.idl" +/** + * The nsIDOMHTMLCollection interface is an interface to a collection + * of [X]HTML elements. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + [scriptable, uuid(a6cf9083-15b3-11d2-932e-00805f8add32)] interface nsIDOMHTMLCollection : nsISupports { diff --git a/mozilla/dom/public/idl/html/nsIDOMHTMLDocument.idl b/mozilla/dom/public/idl/html/nsIDOMHTMLDocument.idl index 2eca3c29d42..386de11e56e 100644 --- a/mozilla/dom/public/idl/html/nsIDOMHTMLDocument.idl +++ b/mozilla/dom/public/idl/html/nsIDOMHTMLDocument.idl @@ -40,12 +40,24 @@ #include "nsIDOMDocument.idl" +/** + * The nsIDOMHTMLDocument interface is the interface to a [X]HTML + * document object. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + [scriptable, uuid(a6cf9084-15b3-11d2-932e-00805f8add32)] interface nsIDOMHTMLDocument : nsIDOMDocument { attribute DOMString title; readonly attribute DOMString referrer; - attribute DOMString domain; + // domain is readonly per spec, but it's settable in + // nsIDOMNSHTMLDocument + [noscript] readonly attribute DOMString domain; readonly attribute DOMString URL; attribute nsIDOMHTMLElement body; readonly attribute nsIDOMHTMLCollection images; @@ -54,7 +66,11 @@ interface nsIDOMHTMLDocument : nsIDOMDocument readonly attribute nsIDOMHTMLCollection forms; readonly attribute nsIDOMHTMLCollection anchors; attribute DOMString cookie; + // raises(DOMException) on setting + // open() is noscript here since the DOM Level 0 version of open() + // returned nsIDOMDocument, and not void. The script version of + // open() is defined in nsIDOMNSHTMLDocument. [noscript] void open(); void close(); diff --git a/mozilla/dom/public/idl/html/nsIDOMHTMLElement.idl b/mozilla/dom/public/idl/html/nsIDOMHTMLElement.idl index f53bcd79278..ee9d6e8ba8a 100644 --- a/mozilla/dom/public/idl/html/nsIDOMHTMLElement.idl +++ b/mozilla/dom/public/idl/html/nsIDOMHTMLElement.idl @@ -40,6 +40,17 @@ #include "nsIDOMElement.idl" +/** + * The nsIDOMHTMLElement interface is the primary [X]HTML element + * interface. It represents a single [X]HTML element in the document + * tree. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + [scriptable, uuid(a6cf9085-15b3-11d2-932e-00805f8add32)] interface nsIDOMHTMLElement : nsIDOMElement { diff --git a/mozilla/dom/public/idl/html/nsIDOMHTMLFrameElement.idl b/mozilla/dom/public/idl/html/nsIDOMHTMLFrameElement.idl index 6c3945154b3..3d9146bb816 100644 --- a/mozilla/dom/public/idl/html/nsIDOMHTMLFrameElement.idl +++ b/mozilla/dom/public/idl/html/nsIDOMHTMLFrameElement.idl @@ -40,6 +40,16 @@ #include "nsIDOMHTMLElement.idl" +/** + * The nsIDOMHTMLFrameElement interface is the interface to a [X]HTML + * frame element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + [scriptable, uuid(a6cf90b9-15b3-11d2-932e-00805f8add32)] interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement { diff --git a/mozilla/dom/public/idl/html/nsIDOMHTMLIFrameElement.idl b/mozilla/dom/public/idl/html/nsIDOMHTMLIFrameElement.idl index a17be733e66..6366a469284 100644 --- a/mozilla/dom/public/idl/html/nsIDOMHTMLIFrameElement.idl +++ b/mozilla/dom/public/idl/html/nsIDOMHTMLIFrameElement.idl @@ -40,6 +40,16 @@ #include "nsIDOMHTMLElement.idl" +/** + * The nsIDOMHTMLIFrameElement interface is the interface to a [X]HTML + * iframe element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + [scriptable, uuid(a6cf90ba-15b3-11d2-932e-00805f8add32)] interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement { diff --git a/mozilla/dom/public/idl/html/nsIDOMHTMLImageElement.idl b/mozilla/dom/public/idl/html/nsIDOMHTMLImageElement.idl index e086ff810ad..44ae791a0a6 100644 --- a/mozilla/dom/public/idl/html/nsIDOMHTMLImageElement.idl +++ b/mozilla/dom/public/idl/html/nsIDOMHTMLImageElement.idl @@ -40,6 +40,16 @@ #include "nsIDOMHTMLElement.idl" +/** + * The nsIDOMHTMLImageElement interface is the interface to a [X]HTML + * img element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + [scriptable, uuid(a6cf90ab-15b3-11d2-932e-00805f8add32)] interface nsIDOMHTMLImageElement : nsIDOMHTMLElement { @@ -47,12 +57,16 @@ interface nsIDOMHTMLImageElement : nsIDOMHTMLElement attribute DOMString align; attribute DOMString alt; attribute DOMString border; + // Modified in DOM Level 2: attribute long height; + // Modified in DOM Level 2: attribute long hspace; attribute boolean isMap; attribute DOMString longDesc; attribute DOMString src; - attribute long vspace; - attribute long width; attribute DOMString useMap; + // Modified in DOM Level 2: + attribute long vspace; + // Modified in DOM Level 2: + attribute long width; }; diff --git a/mozilla/dom/public/idl/html/nsIDOMHTMLInputElement.idl b/mozilla/dom/public/idl/html/nsIDOMHTMLInputElement.idl index bd61d511cd8..7d1eafb6b3f 100644 --- a/mozilla/dom/public/idl/html/nsIDOMHTMLInputElement.idl +++ b/mozilla/dom/public/idl/html/nsIDOMHTMLInputElement.idl @@ -40,6 +40,16 @@ #include "nsIDOMHTMLElement.idl" +/** + * The nsIDOMHTMLInputElement interface is the interface to a [X]HTML + * input element. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-HTML/ + * + * @status FROZEN + */ + [scriptable, uuid(a6cf9093-15b3-11d2-932e-00805f8add32)] interface nsIDOMHTMLInputElement : nsIDOMHTMLElement { @@ -55,9 +65,11 @@ interface nsIDOMHTMLInputElement : nsIDOMHTMLElement attribute long maxLength; attribute DOMString name; attribute boolean readOnly; + // Modified in DOM Level 2: attribute unsigned long size; attribute DOMString src; attribute long tabIndex; + // Modified in DOM Level 2: attribute DOMString type; attribute DOMString useMap; attribute DOMString value; diff --git a/mozilla/dom/public/idl/html/nsIDOMNSHTMLDocument.idl b/mozilla/dom/public/idl/html/nsIDOMNSHTMLDocument.idl index 2fac39969c1..70a7f15e2e9 100644 --- a/mozilla/dom/public/idl/html/nsIDOMNSHTMLDocument.idl +++ b/mozilla/dom/public/idl/html/nsIDOMNSHTMLDocument.idl @@ -51,6 +51,7 @@ interface nsIDOMNSHTMLDocument : nsISupports attribute DOMString bgColor; attribute DOMString fgColor; readonly attribute DOMString lastModified; + attribute DOMString domain; readonly attribute nsIDOMHTMLCollection embeds; diff --git a/mozilla/dom/public/idl/range/nsIDOMDocumentRange.idl b/mozilla/dom/public/idl/range/nsIDOMDocumentRange.idl index b006d4d908b..8bda1930047 100644 --- a/mozilla/dom/public/idl/range/nsIDOMDocumentRange.idl +++ b/mozilla/dom/public/idl/range/nsIDOMDocumentRange.idl @@ -39,8 +39,17 @@ #include "domstubs.idl" +/** + * The nsIDOMDocumentRange interface is an interface to a document + * object that supports ranges in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ + * + * @status FROZEN + */ + [scriptable, uuid(7b9badc6-c9bc-447a-8670-dbd195aed24b)] -// Introduced in DOM Level 2: interface nsIDOMDocumentRange : nsISupports { - nsIDOMRange createRange(); + nsIDOMRange createRange(); }; diff --git a/mozilla/dom/public/idl/range/nsIDOMRange.idl b/mozilla/dom/public/idl/range/nsIDOMRange.idl index 8520a2b9a46..2707e4b0999 100644 --- a/mozilla/dom/public/idl/range/nsIDOMRange.idl +++ b/mozilla/dom/public/idl/range/nsIDOMRange.idl @@ -38,162 +38,80 @@ * * ***** END LICENSE BLOCK ***** */ -/* - * The complete Range spec is located at: - * http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html - */ #include "domstubs.idl" + +/** + * The nsIDOMRange interface is an interface to a DOM range object. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ + * + * @status FROZEN + */ + [scriptable, uuid(a6cf90ce-15b3-11d2-932e-00805f8add32)] interface nsIDOMRange : nsISupports { - /** - * CompareHow group - * Passed as a parameter to the compareBoundaryPoints method. - */ - const unsigned short START_TO_START = 0;// Compare start boundary-point of sourceRange to start boundary-point of Range on which compareBoundaryPoints is invoked - const unsigned short START_TO_END = 1; // Compare start boundary-point of sourceRange to end boundary-point of Range on which compareBoundaryPoints is invoked - const unsigned short END_TO_START = 2; // Compare end boundary-point of sourceRange to start boundary-point of Range on which compareBoundaryPoints is invoked - const unsigned short END_TO_END = 3; // Compare end boundary-point of sourceRange to end boundary-point of Range on which compareBoundaryPoints is invoked + readonly attribute nsIDOMNode startContainer; + // raises(DOMException) on retrieval - readonly attribute nsIDOMNode startContainer;// Node within which the Range begins - readonly attribute long startOffset; // Offset within the starting node of the Range - readonly attribute nsIDOMNode endContainer; // Node within which the Range ends - readonly attribute long endOffset; // Offset within the ending node of the Range + readonly attribute long startOffset; + // raises(DOMException) on retrieval - readonly attribute boolean collapsed; // TRUE if the Range is collapsed - readonly attribute nsIDOMNode commonAncestorContainer; //The deepest common ancestor container of the Range's two boundary-points + readonly attribute nsIDOMNode endContainer; + // raises(DOMException) on retrieval + readonly attribute long endOffset; + // raises(DOMException) on retrieval - /** - * Sets the attributes describing the start of the Range. The start - * position of a Range is guaranteed to never be after the end position. - * To enforce this restriction, if the start is set to be at a position - * after the end, the Range is collapsed to that position - * @param parent The Parent Node value. This parameter must not be null. - * @param offset start offset value. - */ - void setStart(in nsIDOMNode parent, in long offset); + readonly attribute boolean collapsed; + // raises(DOMException) on retrieval - /** - * Sets the start position to be before the specified node. - * @param sibling Range starts before sibling Node. - */ - void setStartBefore(in nsIDOMNode sibling); + readonly attribute nsIDOMNode commonAncestorContainer; + // raises(DOMException) on retrieval - /** - * Sets the start position to be after the specified node. - * @param sibling Range starts after sibling Node. - */ - void setStartAfter(in nsIDOMNode sibling); + void setStart(in nsIDOMNode refNode, in long offset) + raises(RangeException, DOMException); + void setEnd(in nsIDOMNode refNode, in long offset) + raises(RangeException, DOMException); + void setStartBefore(in nsIDOMNode refNode) + raises(RangeException, DOMException); + void setStartAfter(in nsIDOMNode refNode) + raises(RangeException, DOMException); + void setEndBefore(in nsIDOMNode refNode) + raises(RangeException, DOMException); + void setEndAfter(in nsIDOMNode refNode) + raises(RangeException, DOMException); + void collapse(in boolean toStart) + raises(DOMException); + void selectNode(in nsIDOMNode refNode) + raises(RangeException, DOMException); + void selectNodeContents(in nsIDOMNode refNode) + raises(RangeException, DOMException); - /** - * Sets the attributes describing the end of a Range. If the - * end is set to be at a position before the start, the Range - * is collapsed to that position. - * @param parent The Parent Node value. This parameter must not be null. - * @param offset end offset value. - */ - void setEnd(in nsIDOMNode parent, in long offset); + // CompareHow + const unsigned short START_TO_START = 0; + const unsigned short START_TO_END = 1; + const unsigned short END_TO_END = 2; + const unsigned short END_TO_START = 3; - /** - * Sets the end position to be before the specified node - * @param sibling Range ends before sibling Node. - */ - void setEndBefore(in nsIDOMNode sibling); - - /** - * Sets the end position to be after the specified node - * @param sibling Range ends before sibling Node. - */ - void setEndAfter(in nsIDOMNode sibling); - - /** - * Collapse a Range onto one of its boundary-points - * @param toStart If TRUE. collapses the Range onto its start, - * if FALSE, collapses onto its end. - */ - void collapse(in boolean toStart); - - /** - * Select a node and its contents. Replaces the - * contents of the range with this node. - * @param n The Node to select. - */ - void selectNode(in nsIDOMNode n); - - /** - * Select the contents within a node. Replace the - * contents of the range with this node's contents. - * @param n Node to select from. - */ - void selectNodeContents(in nsIDOMNode n); - - /** - * Compare the boundary-points of two Ranges in a document. - * @param how parameter from CompareHow group, how the boundary points - * are to be compared. - * @param srcRange the range which will have its boundary points compared. - * Return Value: -1, 0 or 1 depending on whether the corresponding - * boundary-point of the Range is before, equal to, or after the - * corresponding boundary-point of sourceRange. - */ - long compareBoundaryPoints(in unsigned short how, in nsIDOMRange srcRange); - - /** - * Removes the contents of a Range from the containing document or document - * fragment without returning a reference to the removed content. - */ - void deleteContents(); - - /** - * Moves the contents of a Range from the containing document or document - * fragment to a new DocumentFragment. - * Return Value: A DocumentFragment containing the extracted contents. - */ - nsIDOMDocumentFragment extractContents(); - - /** - * Duplicates the contents of a Range - * Return Value: A DocumentFragment that contains content equivalent to this Range. - */ - nsIDOMDocumentFragment cloneContents(); - - /** - * Inserts a node into the Document or DocumentFragment at the start of the Range. - * If the container is a Text node, this will be split at the start of the Range. - * Adjacent Text nodes will not be automatically merged. - * @param n The node to insert at the start of the Range - */ - void insertNode(in nsIDOMNode n); - - /** - * Reparents the contents of the Range to the given node and inserts - * the node at the position of the start of the Range. - * @param n The node to surround the contents with. - */ - void surroundContents(in nsIDOMNode n); - - /** - * Produces a new Range whose boundary-points are equal to the - * boundary-points of the Range. - * Return Value: The duplicated Range. - */ - nsIDOMRange cloneRange(); - - /** - * Called to indicate that the Range is no longer in use and that - * the implementation may relinquish any resources associated with - * this Range. Subsequent calls to any methods or attribute getters - * on this Range will result in a DOMException being thrown with an - * error code of INVALID_STATE_ERR. - */ - void detach(); - - /** - * Returns the contents of a Range as a string. This string contains - * only the data characters, not any markup. - * Return Value: The contents of the Range. - */ - DOMString toString(); + short compareBoundaryPoints(in unsigned short how, + in nsIDOMRange sourceRange) + raises(DOMException); + void deleteContents() + raises(DOMException); + nsIDOMDocumentFragment extractContents() + raises(DOMException); + nsIDOMDocumentFragment cloneContents() + raises(DOMException); + void insertNode(in nsIDOMNode newNode) + raises(DOMException, RangeException); + void surroundContents(in nsIDOMNode newParent) + raises(DOMException, RangeException); + nsIDOMRange cloneRange() + raises(DOMException); + DOMString toString() + raises(DOMException); + void detach() + raises(DOMException); }; - diff --git a/mozilla/dom/public/idl/stylesheets/nsIDOMDocumentStyle.idl b/mozilla/dom/public/idl/stylesheets/nsIDOMDocumentStyle.idl index 6d6c51a5a88..111cd71f0d8 100644 --- a/mozilla/dom/public/idl/stylesheets/nsIDOMDocumentStyle.idl +++ b/mozilla/dom/public/idl/stylesheets/nsIDOMDocumentStyle.idl @@ -40,6 +40,16 @@ #include "domstubs.idl" +/** + * The nsIDOMDocumentStyle interface is an interface to a document + * object that supports style sheets in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + [scriptable, uuid(3d9f4973-dd2e-48f5-b5f7-2634e09eadd9)] interface nsIDOMDocumentStyle : nsISupports { diff --git a/mozilla/dom/public/idl/stylesheets/nsIDOMMediaList.idl b/mozilla/dom/public/idl/stylesheets/nsIDOMMediaList.idl index 28eef1d9d76..fb658d9ced7 100644 --- a/mozilla/dom/public/idl/stylesheets/nsIDOMMediaList.idl +++ b/mozilla/dom/public/idl/stylesheets/nsIDOMMediaList.idl @@ -40,6 +40,16 @@ #include "domstubs.idl" +/** + * The nsIDOMMediaList interface is a datatype for a list of media + * types in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + [scriptable, uuid(9b0c2ed7-111c-4824-adf9-ef0da6dad371)] interface nsIDOMMediaList : nsISupports { @@ -48,7 +58,6 @@ interface nsIDOMMediaList : nsISupports readonly attribute unsigned long length; DOMString item(in unsigned long index); - void deleteMedium(in DOMString oldMedium) raises(DOMException); void appendMedium(in DOMString newMedium) diff --git a/mozilla/dom/public/idl/stylesheets/nsIDOMStyleSheet.idl b/mozilla/dom/public/idl/stylesheets/nsIDOMStyleSheet.idl index 621fc43b759..c83d9238ab4 100644 --- a/mozilla/dom/public/idl/stylesheets/nsIDOMStyleSheet.idl +++ b/mozilla/dom/public/idl/stylesheets/nsIDOMStyleSheet.idl @@ -40,6 +40,16 @@ #include "domstubs.idl" +/** + * The nsIDOMStyleSheet interface is a datatype for a style sheet in + * the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Style + * + * @status FROZEN + */ + [scriptable, uuid(a6cf9080-15b3-11d2-932e-00805f8add32)] interface nsIDOMStyleSheet : nsISupports { diff --git a/mozilla/dom/public/idl/views/nsIDOMAbstractView.idl b/mozilla/dom/public/idl/views/nsIDOMAbstractView.idl index d119f179ee1..97b85522283 100644 --- a/mozilla/dom/public/idl/views/nsIDOMAbstractView.idl +++ b/mozilla/dom/public/idl/views/nsIDOMAbstractView.idl @@ -39,10 +39,18 @@ #include "domstubs.idl" +/** + * The nsIDOMAbstractView interface is a datatype for a view in the + * Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Views + * + * @status FROZEN + */ + [scriptable, uuid(F51EBADE-8B1A-11D3-AAE7-0010830123B4)] interface nsIDOMAbstractView : nsISupports { - readonly attribute nsIDOMDocumentView document; }; - diff --git a/mozilla/dom/public/idl/views/nsIDOMDocumentView.idl b/mozilla/dom/public/idl/views/nsIDOMDocumentView.idl index 9ecc4719d90..3927e545a6c 100644 --- a/mozilla/dom/public/idl/views/nsIDOMDocumentView.idl +++ b/mozilla/dom/public/idl/views/nsIDOMDocumentView.idl @@ -39,10 +39,19 @@ #include "domstubs.idl" +/** + * The nsIDOMDocumentView interface is a datatype for a document that + * supports views in the Document Object Model. + * + * For more information on this interface please see + * http://www.w3.org/TR/DOM-Level-2-Views + * + * @status FROZEN + */ + [scriptable, uuid(1ACDB2BA-1DD2-11B2-95BC-9542495D2569)] interface nsIDOMDocumentView : nsISupports { - readonly attribute nsIDOMAbstractView defaultView; }; diff --git a/mozilla/editor/libeditor/base/nsSelectionState.cpp b/mozilla/editor/libeditor/base/nsSelectionState.cpp index d9788bba950..b6adbc2463d 100644 --- a/mozilla/editor/libeditor/base/nsSelectionState.cpp +++ b/mozilla/editor/libeditor/base/nsSelectionState.cpp @@ -167,7 +167,7 @@ nsSelectionState::IsEqual(nsSelectionState *aSelState) itsItem->GetRange(address_of(itsRange)); if (!myRange || !itsRange) return PR_FALSE; - PRInt32 compResult; + PRInt16 compResult; myRange->CompareBoundaryPoints(nsIDOMRange::START_TO_START, itsRange, &compResult); if (compResult) return PR_FALSE; myRange->CompareBoundaryPoints(nsIDOMRange::END_TO_END, itsRange, &compResult); diff --git a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp index 338398dc820..b1a364388a8 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp @@ -7460,7 +7460,7 @@ nsHTMLEditRules::UpdateDocChangeRange(nsIDOMRange *aRange) } else { - PRInt32 result; + PRInt16 result; // compare starts of ranges res = mDocChangeRange->CompareBoundaryPoints(nsIDOMRange::START_TO_START, aRange, &result); diff --git a/mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp b/mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp index d3dc3545b6a..1e2f577de0a 100644 --- a/mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp +++ b/mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp @@ -1223,7 +1223,7 @@ nsTypeAheadFind::FindItNow(nsIPresShell *aPresShell, return NS_ERROR_FAILURE; } - PRInt32 rangeCompareResult = 0; + PRInt16 rangeCompareResult = 0; mStartPointRange->CompareBoundaryPoints(nsIDOMRange::START_TO_START, mSearchRange, &rangeCompareResult); // No need to wrap find in doc if starting at beginning diff --git a/mozilla/layout/generic/nsSelection.cpp b/mozilla/layout/generic/nsSelection.cpp index ef7a15945f0..df15ac78f02 100644 --- a/mozilla/layout/generic/nsSelection.cpp +++ b/mozilla/layout/generic/nsSelection.cpp @@ -6946,9 +6946,9 @@ nsTypedSelection::ContainsNode(nsIDOMNode* aNode, PRBool aRecursive, PRBool* aYe // else not recursive -- node itself must be contained, // so we need to do more checking PRBool nodeStartsBeforeRange, nodeEndsAfterRange; - if (NS_SUCCEEDED(CompareNodeToRange(content, range, - &nodeStartsBeforeRange, - &nodeEndsAfterRange))) + if (NS_SUCCEEDED(nsRange::CompareNodeToRange(content, range, + &nodeStartsBeforeRange, + &nodeEndsAfterRange))) { #ifdef DEBUG_ContainsNode nsAutoString name, value;