From 2d0550a5a2f74889bb5256bc79ddfea6f26b80e3 Mon Sep 17 00:00:00 2001 From: "vidur%netscape.com" Date: Fri, 25 Sep 1998 00:49:44 +0000 Subject: [PATCH] Added new style interfaces. Modified property slot id allocation. --- dom/public/Makefile | 2 +- dom/public/coreDom/MANIFEST | 2 + dom/public/coreDom/Makefile | 2 + dom/public/coreDom/makefile.win | 2 +- dom/public/coreDom/nsIDOMStyleSheet.h | 59 + .../coreDom/nsIDOMStyleSheetCollection.h | 57 + dom/public/coreDom/nsIDOMText.h | 2 +- dom/public/coreEvents/nsIDOMEvent.h | 2 +- dom/public/coreEvents/nsIDOMEventCapturer.h | 2 +- dom/public/coreEvents/nsIDOMNSEvent.h | 2 +- dom/public/css/MANIFEST | 26 + dom/public/css/Makefile | 37 + dom/public/css/makefile.win | 34 + dom/public/css/nsIDOMCSSFontFaceRule.h | 57 + dom/public/css/nsIDOMCSSMediaRule.h | 69 + dom/public/css/nsIDOMCSSPageRule.h | 64 + dom/public/css/nsIDOMCSSStyleDeclaration.h | 922 ++++ dom/public/css/nsIDOMCSSStyleRule.h | 52 + dom/public/css/nsIDOMCSSStyleRuleCollection.h | 57 + dom/public/css/nsIDOMCSSStyleRuleSimple.h | 64 + dom/public/css/nsIDOMCSSStyleSheet.h | 93 + dom/public/html/nsIDOMHTMLAnchorElement.h | 2 +- dom/public/html/nsIDOMHTMLAppletElement.h | 2 +- dom/public/html/nsIDOMHTMLAreaElement.h | 2 +- dom/public/html/nsIDOMHTMLBRElement.h | 2 +- dom/public/html/nsIDOMHTMLBaseElement.h | 2 +- dom/public/html/nsIDOMHTMLBaseFontElement.h | 2 +- dom/public/html/nsIDOMHTMLBodyElement.h | 2 +- dom/public/html/nsIDOMHTMLButtonElement.h | 2 +- dom/public/html/nsIDOMHTMLCollection.h | 2 +- dom/public/html/nsIDOMHTMLDListElement.h | 2 +- dom/public/html/nsIDOMHTMLDelElement.h | 2 +- dom/public/html/nsIDOMHTMLDirectoryElement.h | 2 +- dom/public/html/nsIDOMHTMLDivElement.h | 2 +- dom/public/html/nsIDOMHTMLDocument.h | 2 +- dom/public/html/nsIDOMHTMLElement.h | 7 +- dom/public/html/nsIDOMHTMLFontElement.h | 2 +- dom/public/html/nsIDOMHTMLFormElement.h | 2 +- dom/public/html/nsIDOMHTMLFrameElement.h | 2 +- dom/public/html/nsIDOMHTMLFrameSetElement.h | 2 +- dom/public/html/nsIDOMHTMLHRElement.h | 2 +- dom/public/html/nsIDOMHTMLHeadElement.h | 2 +- dom/public/html/nsIDOMHTMLHeadingElement.h | 2 +- dom/public/html/nsIDOMHTMLHtmlElement.h | 2 +- dom/public/html/nsIDOMHTMLIFrameElement.h | 2 +- dom/public/html/nsIDOMHTMLImageElement.h | 4 +- dom/public/html/nsIDOMHTMLInputElement.h | 2 +- dom/public/html/nsIDOMHTMLInsElement.h | 2 +- dom/public/html/nsIDOMHTMLIsIndexElement.h | 2 +- dom/public/html/nsIDOMHTMLLIElement.h | 2 +- dom/public/html/nsIDOMHTMLLabelElement.h | 2 +- dom/public/html/nsIDOMHTMLLegendElement.h | 2 +- dom/public/html/nsIDOMHTMLLinkElement.h | 2 +- dom/public/html/nsIDOMHTMLMapElement.h | 2 +- dom/public/html/nsIDOMHTMLMenuElement.h | 2 +- dom/public/html/nsIDOMHTMLMetaElement.h | 2 +- dom/public/html/nsIDOMHTMLModElement.h | 2 +- dom/public/html/nsIDOMHTMLOListElement.h | 2 +- dom/public/html/nsIDOMHTMLObjectElement.h | 2 +- dom/public/html/nsIDOMHTMLOptGroupElement.h | 2 +- dom/public/html/nsIDOMHTMLOptionElement.h | 2 +- dom/public/html/nsIDOMHTMLParagraphElement.h | 2 +- dom/public/html/nsIDOMHTMLParamElement.h | 2 +- dom/public/html/nsIDOMHTMLPreElement.h | 2 +- dom/public/html/nsIDOMHTMLQuoteElement.h | 2 +- dom/public/html/nsIDOMHTMLScriptElement.h | 2 +- dom/public/html/nsIDOMHTMLSelectElement.h | 2 +- dom/public/html/nsIDOMHTMLStyleElement.h | 2 +- .../html/nsIDOMHTMLTableCaptionElement.h | 2 +- dom/public/html/nsIDOMHTMLTableCellElement.h | 2 +- dom/public/html/nsIDOMHTMLTableColElement.h | 2 +- dom/public/html/nsIDOMHTMLTableElement.h | 2 +- dom/public/html/nsIDOMHTMLTableRowElement.h | 2 +- .../html/nsIDOMHTMLTableSectionElement.h | 2 +- dom/public/html/nsIDOMHTMLTbodyElement.h | 2 +- dom/public/html/nsIDOMHTMLTextAreaElement.h | 2 +- dom/public/html/nsIDOMHTMLTfootElement.h | 2 +- dom/public/html/nsIDOMHTMLTheadElement.h | 2 +- dom/public/html/nsIDOMHTMLTitleElement.h | 2 +- dom/public/html/nsIDOMHTMLUListElement.h | 2 +- dom/public/html/nsIDOMImage.h | 2 +- dom/public/html/nsIDOMNSHTMLDocument.h | 2 +- dom/public/html/nsIDOMNSHTMLFormElement.h | 2 +- dom/public/idl/coreDom/makefile.win | 4 +- dom/public/idl/css/CSSStyleDeclaration.idl | 2 +- dom/public/idl/html/HTMLElement.idl | 1 + dom/public/idl/makefile.win | 2 +- dom/public/makefile.win | 2 +- dom/public/nsIDOMLocation.h | 2 +- dom/public/nsIDOMNavigator.h | 2 +- dom/public/nsIDOMWindow.h | 2 +- dom/public/nsIDOMWindowCollection.h | 2 +- dom/src/Makefile | 2 +- dom/src/base/nsJSLocation.cpp | 16 +- dom/src/base/nsJSNavigator.cpp | 14 +- dom/src/base/nsJSWindow.cpp | 24 +- dom/src/base/nsJSWindowCollection.cpp | 2 +- dom/src/build/Makefile | 2 + dom/src/build/makefile.win | 2 + dom/src/build/nsDOMFactory.cpp | 2 + dom/src/coreDOM/Makefile | 2 + dom/src/coreDOM/makefile.win | 4 + dom/src/coreDOM/nsJSAttribute.cpp | 6 +- dom/src/coreDOM/nsJSData.cpp | 4 +- dom/src/coreDOM/nsJSDocument.cpp | 8 +- dom/src/coreDOM/nsJSDocumentFragment.cpp | 2 +- dom/src/coreDOM/nsJSDocumentType.cpp | 4 +- dom/src/coreDOM/nsJSElement.cpp | 2 +- dom/src/coreDOM/nsJSNamedNodeMap.cpp | 2 +- dom/src/coreDOM/nsJSNode.cpp | 22 +- dom/src/coreDOM/nsJSNodeList.cpp | 2 +- dom/src/coreDOM/nsJSProcessingInstruction.cpp | 4 +- dom/src/coreDOM/nsJSStyleSheet.cpp | 371 ++ dom/src/coreDOM/nsJSStyleSheetCollection.cpp | 418 ++ dom/src/css/Makefile | 43 + dom/src/css/makefile.win | 49 + dom/src/css/nsJSCSSFontFaceRule.cpp | 387 ++ dom/src/css/nsJSCSSMediaRule.cpp | 493 ++ dom/src/css/nsJSCSSPageRule.cpp | 417 ++ dom/src/css/nsJSCSSStyleDeclaration.cpp | 4200 +++++++++++++++++ dom/src/css/nsJSCSSStyleRule.cpp | 345 ++ dom/src/css/nsJSCSSStyleRuleCollection.cpp | 418 ++ dom/src/css/nsJSCSSStyleRuleSimple.cpp | 417 ++ dom/src/css/nsJSCSSStyleSheet.cpp | 677 +++ dom/src/events/nsJSEvent.cpp | 32 +- dom/src/html/nsJSHTMLAnchorElement.cpp | 24 +- dom/src/html/nsJSHTMLAppletElement.cpp | 22 +- dom/src/html/nsJSHTMLAreaElement.cpp | 16 +- dom/src/html/nsJSHTMLBRElement.cpp | 2 +- dom/src/html/nsJSHTMLBaseElement.cpp | 4 +- dom/src/html/nsJSHTMLBaseFontElement.cpp | 6 +- dom/src/html/nsJSHTMLBodyElement.cpp | 12 +- dom/src/html/nsJSHTMLButtonElement.cpp | 14 +- dom/src/html/nsJSHTMLCollection.cpp | 2 +- dom/src/html/nsJSHTMLDListElement.cpp | 2 +- dom/src/html/nsJSHTMLDelElement.cpp | 4 +- dom/src/html/nsJSHTMLDirectoryElement.cpp | 2 +- dom/src/html/nsJSHTMLDivElement.cpp | 2 +- dom/src/html/nsJSHTMLDocument.cpp | 48 +- dom/src/html/nsJSHTMLElement.cpp | 42 +- dom/src/html/nsJSHTMLFontElement.cpp | 6 +- dom/src/html/nsJSHTMLFormElement.cpp | 18 +- dom/src/html/nsJSHTMLFrameElement.cpp | 16 +- dom/src/html/nsJSHTMLFrameSetElement.cpp | 4 +- dom/src/html/nsJSHTMLHRElement.cpp | 8 +- dom/src/html/nsJSHTMLHeadElement.cpp | 2 +- dom/src/html/nsJSHTMLHeadingElement.cpp | 2 +- dom/src/html/nsJSHTMLHtmlElement.cpp | 2 +- dom/src/html/nsJSHTMLIFrameElement.cpp | 20 +- dom/src/html/nsJSHTMLImageElement.cpp | 26 +- dom/src/html/nsJSHTMLInputElement.cpp | 36 +- dom/src/html/nsJSHTMLInsElement.cpp | 4 +- dom/src/html/nsJSHTMLIsIndexElement.cpp | 4 +- dom/src/html/nsJSHTMLLIElement.cpp | 4 +- dom/src/html/nsJSHTMLLabelElement.cpp | 6 +- dom/src/html/nsJSHTMLLegendElement.cpp | 6 +- dom/src/html/nsJSHTMLLinkElement.cpp | 18 +- dom/src/html/nsJSHTMLMapElement.cpp | 4 +- dom/src/html/nsJSHTMLMenuElement.cpp | 2 +- dom/src/html/nsJSHTMLMetaElement.cpp | 8 +- dom/src/html/nsJSHTMLModElement.cpp | 4 +- dom/src/html/nsJSHTMLOListElement.cpp | 6 +- dom/src/html/nsJSHTMLObjectElement.cpp | 36 +- dom/src/html/nsJSHTMLOptGroupElement.cpp | 4 +- dom/src/html/nsJSHTMLOptionElement.cpp | 16 +- dom/src/html/nsJSHTMLParagraphElement.cpp | 2 +- dom/src/html/nsJSHTMLParamElement.cpp | 8 +- dom/src/html/nsJSHTMLPreElement.cpp | 2 +- dom/src/html/nsJSHTMLQuoteElement.cpp | 2 +- dom/src/html/nsJSHTMLScriptElement.cpp | 14 +- dom/src/html/nsJSHTMLSelectElement.cpp | 22 +- dom/src/html/nsJSHTMLStyleElement.cpp | 6 +- dom/src/html/nsJSHTMLTableCaptionElement.cpp | 2 +- dom/src/html/nsJSHTMLTableCellElement.cpp | 30 +- dom/src/html/nsJSHTMLTableColElement.cpp | 12 +- dom/src/html/nsJSHTMLTableElement.cpp | 28 +- dom/src/html/nsJSHTMLTableRowElement.cpp | 16 +- dom/src/html/nsJSHTMLTableSectionElement.cpp | 6 +- dom/src/html/nsJSHTMLTbodyElement.cpp | 8 +- dom/src/html/nsJSHTMLTextAreaElement.cpp | 18 +- dom/src/html/nsJSHTMLTfootElement.cpp | 8 +- dom/src/html/nsJSHTMLTheadElement.cpp | 8 +- dom/src/html/nsJSHTMLTitleElement.cpp | 2 +- dom/src/html/nsJSHTMLUListElement.cpp | 4 +- dom/src/makefile.win | 2 +- dom/tools/JSStubGen.cpp | 5 +- 186 files changed, 10351 insertions(+), 468 deletions(-) create mode 100644 dom/public/coreDom/nsIDOMStyleSheet.h create mode 100644 dom/public/coreDom/nsIDOMStyleSheetCollection.h create mode 100644 dom/public/css/MANIFEST create mode 100644 dom/public/css/Makefile create mode 100644 dom/public/css/makefile.win create mode 100644 dom/public/css/nsIDOMCSSFontFaceRule.h create mode 100644 dom/public/css/nsIDOMCSSMediaRule.h create mode 100644 dom/public/css/nsIDOMCSSPageRule.h create mode 100644 dom/public/css/nsIDOMCSSStyleDeclaration.h create mode 100644 dom/public/css/nsIDOMCSSStyleRule.h create mode 100644 dom/public/css/nsIDOMCSSStyleRuleCollection.h create mode 100644 dom/public/css/nsIDOMCSSStyleRuleSimple.h create mode 100644 dom/public/css/nsIDOMCSSStyleSheet.h create mode 100644 dom/src/coreDOM/nsJSStyleSheet.cpp create mode 100644 dom/src/coreDOM/nsJSStyleSheetCollection.cpp create mode 100644 dom/src/css/Makefile create mode 100644 dom/src/css/makefile.win create mode 100644 dom/src/css/nsJSCSSFontFaceRule.cpp create mode 100644 dom/src/css/nsJSCSSMediaRule.cpp create mode 100644 dom/src/css/nsJSCSSPageRule.cpp create mode 100644 dom/src/css/nsJSCSSStyleDeclaration.cpp create mode 100644 dom/src/css/nsJSCSSStyleRule.cpp create mode 100644 dom/src/css/nsJSCSSStyleRuleCollection.cpp create mode 100644 dom/src/css/nsJSCSSStyleRuleSimple.cpp create mode 100644 dom/src/css/nsJSCSSStyleSheet.cpp diff --git a/dom/public/Makefile b/dom/public/Makefile index c8d3e149f542..4a72b1013e08 100644 --- a/dom/public/Makefile +++ b/dom/public/Makefile @@ -17,7 +17,7 @@ DEPTH=../.. -DIRS = coreDom coreEvents events html +DIRS = coreDom coreEvents events html css DEFINES = -D_IMPL_NS_DOM diff --git a/dom/public/coreDom/MANIFEST b/dom/public/coreDom/MANIFEST index 8e3f74f515a8..38b3e6cf8e34 100644 --- a/dom/public/coreDom/MANIFEST +++ b/dom/public/coreDom/MANIFEST @@ -30,3 +30,5 @@ nsIDOMNamedNodeMap.h nsIDOMNodeList.h nsIDOMProcessingInstruction.h nsIDOMText.h +nsIDOMStyleSheet.h +nsIDOMStyleSheetCollection.h \ No newline at end of file diff --git a/dom/public/coreDom/Makefile b/dom/public/coreDom/Makefile index 438c8bbfdc41..431ccfc88abe 100644 --- a/dom/public/coreDom/Makefile +++ b/dom/public/coreDom/Makefile @@ -34,6 +34,8 @@ EXPORTS = \ nsIDOMNodeList.h \ nsIDOMProcessingInstruction.h \ nsIDOMText.h \ + nsIDOMStyleSheet.h \ + nsIDOMStyleSheetCollection.h \ $(NULL) MODULE = dom diff --git a/dom/public/coreDom/makefile.win b/dom/public/coreDom/makefile.win index 0e79a9ac0c09..32d66d83c419 100644 --- a/dom/public/coreDom/makefile.win +++ b/dom/public/coreDom/makefile.win @@ -23,7 +23,7 @@ EXPORTS=nsIDOMAttribute.h nsIDOMCDATASection.h nsIDOMComment.h nsIDOMData.h \ nsIDOMDOM.h nsIDOMDocument.h nsIDOMDocumentType.h \ nsIDOMDocumentFragment.h nsIDOMElement.h nsIDOMNode.h \ nsIDOMNamedNodeMap.h nsIDOMNodeList.h nsIDOMProcessingInstruction.h \ - nsIDOMText.h + nsIDOMText.h nsIDOMStyleSheet.h nsIDOMStyleSheetCollection.h MODULE=dom diff --git a/dom/public/coreDom/nsIDOMStyleSheet.h b/dom/public/coreDom/nsIDOMStyleSheet.h new file mode 100644 index 000000000000..a536b2dbef55 --- /dev/null +++ b/dom/public/coreDom/nsIDOMStyleSheet.h @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#ifndef nsIDOMStyleSheet_h__ +#define nsIDOMStyleSheet_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" + + +#define NS_IDOMSTYLESHEET_IID \ +{ 0x6f7652ee, 0xee43, 0x11d1, \ + { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + +class nsIDOMStyleSheet : public nsISupports { +public: + + NS_IMETHOD GetDisabled(PRBool* aDisabled)=0; + NS_IMETHOD SetDisabled(PRBool aDisabled)=0; + + NS_IMETHOD GetReadOnly(PRBool* aReadOnly)=0; +}; + + +#define NS_DECL_IDOMSTYLESHEET \ + NS_IMETHOD GetDisabled(PRBool* aDisabled); \ + NS_IMETHOD SetDisabled(PRBool aDisabled); \ + NS_IMETHOD GetReadOnly(PRBool* aReadOnly); \ + + + +#define NS_FORWARD_IDOMSTYLESHEET(_to) \ + NS_IMETHOD GetDisabled(PRBool* aDisabled) { return _to##GetDisabled(aDisabled); } \ + NS_IMETHOD SetDisabled(PRBool aDisabled) { return _to##SetDisabled(aDisabled); } \ + NS_IMETHOD GetReadOnly(PRBool* aReadOnly) { return _to##GetReadOnly(aReadOnly); } \ + + +extern nsresult NS_InitStyleSheetClass(nsIScriptContext *aContext, void **aPrototype); + +extern "C" NS_DOM nsresult NS_NewScriptStyleSheet(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); + +#endif // nsIDOMStyleSheet_h__ diff --git a/dom/public/coreDom/nsIDOMStyleSheetCollection.h b/dom/public/coreDom/nsIDOMStyleSheetCollection.h new file mode 100644 index 000000000000..69b43ff057fc --- /dev/null +++ b/dom/public/coreDom/nsIDOMStyleSheetCollection.h @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#ifndef nsIDOMStyleSheetCollection_h__ +#define nsIDOMStyleSheetCollection_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" + +class nsIDOMStyleSheet; + +#define NS_IDOMSTYLESHEETCOLLECTION_IID \ +{ 0x6f7652ef, 0xee43, 0x11d1, \ + { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + +class nsIDOMStyleSheetCollection : public nsISupports { +public: + + NS_IMETHOD GetLength(PRUint32* aLength)=0; + + NS_IMETHOD Item(PRUint32 aIndex, nsIDOMStyleSheet** aReturn)=0; +}; + + +#define NS_DECL_IDOMSTYLESHEETCOLLECTION \ + NS_IMETHOD GetLength(PRUint32* aLength); \ + NS_IMETHOD Item(PRUint32 aIndex, nsIDOMStyleSheet** aReturn); \ + + + +#define NS_FORWARD_IDOMSTYLESHEETCOLLECTION(_to) \ + NS_IMETHOD GetLength(PRUint32* aLength) { return _to##GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 aIndex, nsIDOMStyleSheet** aReturn) { return _to##Item(aIndex, aReturn); } \ + + +extern nsresult NS_InitStyleSheetCollectionClass(nsIScriptContext *aContext, void **aPrototype); + +extern "C" NS_DOM nsresult NS_NewScriptStyleSheetCollection(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); + +#endif // nsIDOMStyleSheetCollection_h__ diff --git a/dom/public/coreDom/nsIDOMText.h b/dom/public/coreDom/nsIDOMText.h index 772166576284..bbc55b2c4f57 100644 --- a/dom/public/coreDom/nsIDOMText.h +++ b/dom/public/coreDom/nsIDOMText.h @@ -28,7 +28,7 @@ class nsIDOMText; #define NS_IDOMTEXT_IID \ -{ 0x6f7652ee, 0xee43, 0x11d1, \ +{ 0x6f7652f0, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMText : public nsIDOMData { diff --git a/dom/public/coreEvents/nsIDOMEvent.h b/dom/public/coreEvents/nsIDOMEvent.h index 29be327a9bf9..c8cae0f7da2c 100644 --- a/dom/public/coreEvents/nsIDOMEvent.h +++ b/dom/public/coreEvents/nsIDOMEvent.h @@ -27,7 +27,7 @@ class nsIDOMNode; #define NS_IDOMEVENT_IID \ -{ 0x6f76532e, 0xee43, 0x11d1, \ +{ 0x6f765330, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMEvent : public nsISupports { diff --git a/dom/public/coreEvents/nsIDOMEventCapturer.h b/dom/public/coreEvents/nsIDOMEventCapturer.h index d8942a4113a4..c7345f107945 100644 --- a/dom/public/coreEvents/nsIDOMEventCapturer.h +++ b/dom/public/coreEvents/nsIDOMEventCapturer.h @@ -27,7 +27,7 @@ #define NS_IDOMEVENTCAPTURER_IID \ -{ 0x6f765330, 0xee43, 0x11d1, \ +{ 0x6f76533a, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMEventCapturer : public nsIDOMEventReceiver { diff --git a/dom/public/coreEvents/nsIDOMNSEvent.h b/dom/public/coreEvents/nsIDOMNSEvent.h index 57392c723eae..2ef0f87927eb 100644 --- a/dom/public/coreEvents/nsIDOMNSEvent.h +++ b/dom/public/coreEvents/nsIDOMNSEvent.h @@ -26,7 +26,7 @@ #define NS_IDOMNSEVENT_IID \ -{ 0x6f76532f, 0xee43, 0x11d1, \ +{ 0x6f765331, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMNSEvent : public nsISupports { diff --git a/dom/public/css/MANIFEST b/dom/public/css/MANIFEST new file mode 100644 index 000000000000..3ae025ee21dc --- /dev/null +++ b/dom/public/css/MANIFEST @@ -0,0 +1,26 @@ +# The contents of this file are subject to the Netscape Public License +# Version 1.0 (the "NPL"); you may not use this file except in +# compliance with the NPL. You may obtain a copy of the NPL at +# http://www.mozilla.org/NPL/ +# +# Software distributed under the NPL is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +# for the specific language governing rights and limitations under the +# NPL. +# +# The Initial Developer of this code under the NPL is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All Rights +# Reserved. +# +# This is a list of local files which get copied to the mozilla:dist:dom directory +# + +nsIDOMCSSFontFaceRule.h +nsIDOMCSSMediaRule.h +nsIDOMCSSPageRule.h +nsIDOMCSSStyleDeclaration.h +nsIDOMCSSStyleRule.h +nsIDOMCSSStyleRuleCollection.h +nsIDOMCSSStyleRuleSimple.h +nsIDOMCSSStyleSheet.h diff --git a/dom/public/css/Makefile b/dom/public/css/Makefile new file mode 100644 index 000000000000..ec3e0501b1bb --- /dev/null +++ b/dom/public/css/Makefile @@ -0,0 +1,37 @@ +#!gmake +# +# The contents of this file are subject to the Netscape Public License +# Version 1.0 (the "NPL"); you may not use this file except in +# compliance with the NPL. You may obtain a copy of the NPL at +# http://www.mozilla.org/NPL/ +# +# Software distributed under the NPL is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +# for the specific language governing rights and limitations under the +# NPL. +# +# The Initial Developer of this code under the NPL is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All Rights +# Reserved. + +DEPTH=../../.. + +DEFINES = -D_IMPL_NS_DOM + +EXPORTS = \ + nsIDOMCSSFontFaceRule.h \ + nsIDOMCSSMediaRule.h \ + nsIDOMCSSPageRule.h \ + nsIDOMCSSStyleDeclaration.h \ + nsIDOMCSSStyleRule.h \ + nsIDOMCSSStyleRuleCollection.h \ + nsIDOMCSSStyleRuleSimple.h \ + nsIDOMCSSStyleSheet.h + $(NULL) + +MODULE = dom + +include $(DEPTH)/config/config.mk + +include $(DEPTH)/config/rules.mk diff --git a/dom/public/css/makefile.win b/dom/public/css/makefile.win new file mode 100644 index 000000000000..89e28ac609e1 --- /dev/null +++ b/dom/public/css/makefile.win @@ -0,0 +1,34 @@ +#!nmake +# +# The contents of this file are subject to the Netscape Public License +# Version 1.0 (the "NPL"); you may not use this file except in +# compliance with the NPL. You may obtain a copy of the NPL at +# http://www.mozilla.org/NPL/ +# +# Software distributed under the NPL is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +# for the specific language governing rights and limitations under the +# NPL. +# +# The Initial Developer of this code under the NPL is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All Rights +# Reserved. + +DEPTH=..\..\.. +IGNORE_MANIFEST=1 + +DEFINES=-D_IMPL_NS_DOM +EXPORTS= \ + nsIDOMCSSFontFaceRule.h \ + nsIDOMCSSMediaRule.h \ + nsIDOMCSSPageRule.h \ + nsIDOMCSSStyleDeclaration.h \ + nsIDOMCSSStyleRule.h \ + nsIDOMCSSStyleRuleCollection.h \ + nsIDOMCSSStyleRuleSimple.h \ + nsIDOMCSSStyleSheet.h + +MODULE=dom + +include <$(DEPTH)\config\rules.mak> diff --git a/dom/public/css/nsIDOMCSSFontFaceRule.h b/dom/public/css/nsIDOMCSSFontFaceRule.h new file mode 100644 index 000000000000..f8e5f11d849c --- /dev/null +++ b/dom/public/css/nsIDOMCSSFontFaceRule.h @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#ifndef nsIDOMCSSFontFaceRule_h__ +#define nsIDOMCSSFontFaceRule_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" +#include "nsIDOMCSSStyleRule.h" + +class nsIDOMCSSStyleDeclaration; + +#define NS_IDOMCSSFONTFACERULE_IID \ +{ 0x6f765332, 0xee43, 0x11d1, \ + { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + +class nsIDOMCSSFontFaceRule : public nsIDOMCSSStyleRule { +public: + + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle)=0; + NS_IMETHOD SetStyle(nsIDOMCSSStyleDeclaration* aStyle)=0; +}; + + +#define NS_DECL_IDOMCSSFONTFACERULE \ + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle); \ + NS_IMETHOD SetStyle(nsIDOMCSSStyleDeclaration* aStyle); \ + + + +#define NS_FORWARD_IDOMCSSFONTFACERULE(_to) \ + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle) { return _to##GetStyle(aStyle); } \ + NS_IMETHOD SetStyle(nsIDOMCSSStyleDeclaration* aStyle) { return _to##SetStyle(aStyle); } \ + + +extern nsresult NS_InitCSSFontFaceRuleClass(nsIScriptContext *aContext, void **aPrototype); + +extern "C" NS_DOM nsresult NS_NewScriptCSSFontFaceRule(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); + +#endif // nsIDOMCSSFontFaceRule_h__ diff --git a/dom/public/css/nsIDOMCSSMediaRule.h b/dom/public/css/nsIDOMCSSMediaRule.h new file mode 100644 index 000000000000..31e6f54d4384 --- /dev/null +++ b/dom/public/css/nsIDOMCSSMediaRule.h @@ -0,0 +1,69 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#ifndef nsIDOMCSSMediaRule_h__ +#define nsIDOMCSSMediaRule_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" +#include "nsIDOMCSSStyleRule.h" + +class nsIDOMCSSStyleRuleCollection; + +#define NS_IDOMCSSMEDIARULE_IID \ +{ 0x6f765333, 0xee43, 0x11d1, \ + { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + +class nsIDOMCSSMediaRule : public nsIDOMCSSStyleRule { +public: + + NS_IMETHOD GetMediaTypes(nsString& aMediaTypes)=0; + NS_IMETHOD SetMediaTypes(const nsString& aMediaTypes)=0; + + NS_IMETHOD GetRules(nsIDOMCSSStyleRuleCollection** aRules)=0; + + NS_IMETHOD AddRule(const nsString& aSelector, const nsString& aDeclaration, PRUint32 aIndex, PRUint32* aReturn)=0; + + NS_IMETHOD RemoveRule(PRUint32 aIndex)=0; +}; + + +#define NS_DECL_IDOMCSSMEDIARULE \ + NS_IMETHOD GetMediaTypes(nsString& aMediaTypes); \ + NS_IMETHOD SetMediaTypes(const nsString& aMediaTypes); \ + NS_IMETHOD GetRules(nsIDOMCSSStyleRuleCollection** aRules); \ + NS_IMETHOD AddRule(const nsString& aSelector, const nsString& aDeclaration, PRUint32 aIndex, PRUint32* aReturn); \ + NS_IMETHOD RemoveRule(PRUint32 aIndex); \ + + + +#define NS_FORWARD_IDOMCSSMEDIARULE(_to) \ + NS_IMETHOD GetMediaTypes(nsString& aMediaTypes) { return _to##GetMediaTypes(aMediaTypes); } \ + NS_IMETHOD SetMediaTypes(const nsString& aMediaTypes) { return _to##SetMediaTypes(aMediaTypes); } \ + NS_IMETHOD GetRules(nsIDOMCSSStyleRuleCollection** aRules) { return _to##GetRules(aRules); } \ + NS_IMETHOD AddRule(const nsString& aSelector, const nsString& aDeclaration, PRUint32 aIndex, PRUint32* aReturn) { return _to##AddRule(aSelector, aDeclaration, aIndex, aReturn); } \ + NS_IMETHOD RemoveRule(PRUint32 aIndex) { return _to##RemoveRule(aIndex); } \ + + +extern nsresult NS_InitCSSMediaRuleClass(nsIScriptContext *aContext, void **aPrototype); + +extern "C" NS_DOM nsresult NS_NewScriptCSSMediaRule(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); + +#endif // nsIDOMCSSMediaRule_h__ diff --git a/dom/public/css/nsIDOMCSSPageRule.h b/dom/public/css/nsIDOMCSSPageRule.h new file mode 100644 index 000000000000..f435a6c1d630 --- /dev/null +++ b/dom/public/css/nsIDOMCSSPageRule.h @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#ifndef nsIDOMCSSPageRule_h__ +#define nsIDOMCSSPageRule_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" +#include "nsIDOMCSSStyleRule.h" + +class nsIDOMCSSStyleDeclaration; + +#define NS_IDOMCSSPAGERULE_IID \ +{ 0x6f765334, 0xee43, 0x11d1, \ + { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + +class nsIDOMCSSPageRule : public nsIDOMCSSStyleRule { +public: + + NS_IMETHOD GetSelectorText(nsString& aSelectorText)=0; + NS_IMETHOD SetSelectorText(const nsString& aSelectorText)=0; + + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle)=0; + NS_IMETHOD SetStyle(nsIDOMCSSStyleDeclaration* aStyle)=0; +}; + + +#define NS_DECL_IDOMCSSPAGERULE \ + NS_IMETHOD GetSelectorText(nsString& aSelectorText); \ + NS_IMETHOD SetSelectorText(const nsString& aSelectorText); \ + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle); \ + NS_IMETHOD SetStyle(nsIDOMCSSStyleDeclaration* aStyle); \ + + + +#define NS_FORWARD_IDOMCSSPAGERULE(_to) \ + NS_IMETHOD GetSelectorText(nsString& aSelectorText) { return _to##GetSelectorText(aSelectorText); } \ + NS_IMETHOD SetSelectorText(const nsString& aSelectorText) { return _to##SetSelectorText(aSelectorText); } \ + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle) { return _to##GetStyle(aStyle); } \ + NS_IMETHOD SetStyle(nsIDOMCSSStyleDeclaration* aStyle) { return _to##SetStyle(aStyle); } \ + + +extern nsresult NS_InitCSSPageRuleClass(nsIScriptContext *aContext, void **aPrototype); + +extern "C" NS_DOM nsresult NS_NewScriptCSSPageRule(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); + +#endif // nsIDOMCSSPageRule_h__ diff --git a/dom/public/css/nsIDOMCSSStyleDeclaration.h b/dom/public/css/nsIDOMCSSStyleDeclaration.h new file mode 100644 index 000000000000..23ab6fbbe8cf --- /dev/null +++ b/dom/public/css/nsIDOMCSSStyleDeclaration.h @@ -0,0 +1,922 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#ifndef nsIDOMCSSStyleDeclaration_h__ +#define nsIDOMCSSStyleDeclaration_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" + + +#define NS_IDOMCSSSTYLEDECLARATION_IID \ +{ 0x6f765335, 0xee43, 0x11d1, \ + { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + +class nsIDOMCSSStyleDeclaration : public nsISupports { +public: + + NS_IMETHOD GetLength(PRUint32* aLength)=0; + + NS_IMETHOD GetAzimuth(nsString& aAzimuth)=0; + NS_IMETHOD SetAzimuth(const nsString& aAzimuth)=0; + + NS_IMETHOD GetBackground(nsString& aBackground)=0; + NS_IMETHOD SetBackground(const nsString& aBackground)=0; + + NS_IMETHOD GetBackgroundAttachment(nsString& aBackgroundAttachment)=0; + NS_IMETHOD SetBackgroundAttachment(const nsString& aBackgroundAttachment)=0; + + NS_IMETHOD GetBackgroundColor(nsString& aBackgroundColor)=0; + NS_IMETHOD SetBackgroundColor(const nsString& aBackgroundColor)=0; + + NS_IMETHOD GetBackgroundImage(nsString& aBackgroundImage)=0; + NS_IMETHOD SetBackgroundImage(const nsString& aBackgroundImage)=0; + + NS_IMETHOD GetBackgroundPosition(nsString& aBackgroundPosition)=0; + NS_IMETHOD SetBackgroundPosition(const nsString& aBackgroundPosition)=0; + + NS_IMETHOD GetBackgroundRepeat(nsString& aBackgroundRepeat)=0; + NS_IMETHOD SetBackgroundRepeat(const nsString& aBackgroundRepeat)=0; + + NS_IMETHOD GetBorder(nsString& aBorder)=0; + NS_IMETHOD SetBorder(const nsString& aBorder)=0; + + NS_IMETHOD GetBorderCollapse(nsString& aBorderCollapse)=0; + NS_IMETHOD SetBorderCollapse(const nsString& aBorderCollapse)=0; + + NS_IMETHOD GetBorderColor(nsString& aBorderColor)=0; + NS_IMETHOD SetBorderColor(const nsString& aBorderColor)=0; + + NS_IMETHOD GetBorderSpacing(nsString& aBorderSpacing)=0; + NS_IMETHOD SetBorderSpacing(const nsString& aBorderSpacing)=0; + + NS_IMETHOD GetBorderStyle(nsString& aBorderStyle)=0; + NS_IMETHOD SetBorderStyle(const nsString& aBorderStyle)=0; + + NS_IMETHOD GetBorderTop(nsString& aBorderTop)=0; + NS_IMETHOD SetBorderTop(const nsString& aBorderTop)=0; + + NS_IMETHOD GetBorderRight(nsString& aBorderRight)=0; + NS_IMETHOD SetBorderRight(const nsString& aBorderRight)=0; + + NS_IMETHOD GetBorderBottom(nsString& aBorderBottom)=0; + NS_IMETHOD SetBorderBottom(const nsString& aBorderBottom)=0; + + NS_IMETHOD GetBorderLeft(nsString& aBorderLeft)=0; + NS_IMETHOD SetBorderLeft(const nsString& aBorderLeft)=0; + + NS_IMETHOD GetBorderTopColor(nsString& aBorderTopColor)=0; + NS_IMETHOD SetBorderTopColor(const nsString& aBorderTopColor)=0; + + NS_IMETHOD GetBorderRightColor(nsString& aBorderRightColor)=0; + NS_IMETHOD SetBorderRightColor(const nsString& aBorderRightColor)=0; + + NS_IMETHOD GetBorderBottomColor(nsString& aBorderBottomColor)=0; + NS_IMETHOD SetBorderBottomColor(const nsString& aBorderBottomColor)=0; + + NS_IMETHOD GetBorderLeftColor(nsString& aBorderLeftColor)=0; + NS_IMETHOD SetBorderLeftColor(const nsString& aBorderLeftColor)=0; + + NS_IMETHOD GetBorderTopStyle(nsString& aBorderTopStyle)=0; + NS_IMETHOD SetBorderTopStyle(const nsString& aBorderTopStyle)=0; + + NS_IMETHOD GetBorderRightStyle(nsString& aBorderRightStyle)=0; + NS_IMETHOD SetBorderRightStyle(const nsString& aBorderRightStyle)=0; + + NS_IMETHOD GetBorderBottomStyle(nsString& aBorderBottomStyle)=0; + NS_IMETHOD SetBorderBottomStyle(const nsString& aBorderBottomStyle)=0; + + NS_IMETHOD GetBorderLeftStyle(nsString& aBorderLeftStyle)=0; + NS_IMETHOD SetBorderLeftStyle(const nsString& aBorderLeftStyle)=0; + + NS_IMETHOD GetBorderTopWidth(nsString& aBorderTopWidth)=0; + NS_IMETHOD SetBorderTopWidth(const nsString& aBorderTopWidth)=0; + + NS_IMETHOD GetBorderRightWidth(nsString& aBorderRightWidth)=0; + NS_IMETHOD SetBorderRightWidth(const nsString& aBorderRightWidth)=0; + + NS_IMETHOD GetBorderBottomWidth(nsString& aBorderBottomWidth)=0; + NS_IMETHOD SetBorderBottomWidth(const nsString& aBorderBottomWidth)=0; + + NS_IMETHOD GetBorderLeftWidth(nsString& aBorderLeftWidth)=0; + NS_IMETHOD SetBorderLeftWidth(const nsString& aBorderLeftWidth)=0; + + NS_IMETHOD GetBorderWidth(nsString& aBorderWidth)=0; + NS_IMETHOD SetBorderWidth(const nsString& aBorderWidth)=0; + + NS_IMETHOD GetBottom(nsString& aBottom)=0; + NS_IMETHOD SetBottom(const nsString& aBottom)=0; + + NS_IMETHOD GetCaptionSide(nsString& aCaptionSide)=0; + NS_IMETHOD SetCaptionSide(const nsString& aCaptionSide)=0; + + NS_IMETHOD GetClear(nsString& aClear)=0; + NS_IMETHOD SetClear(const nsString& aClear)=0; + + NS_IMETHOD GetClip(nsString& aClip)=0; + NS_IMETHOD SetClip(const nsString& aClip)=0; + + NS_IMETHOD GetColor(nsString& aColor)=0; + NS_IMETHOD SetColor(const nsString& aColor)=0; + + NS_IMETHOD GetContent(nsString& aContent)=0; + NS_IMETHOD SetContent(const nsString& aContent)=0; + + NS_IMETHOD GetCounterIncrement(nsString& aCounterIncrement)=0; + NS_IMETHOD SetCounterIncrement(const nsString& aCounterIncrement)=0; + + NS_IMETHOD GetCounterReset(nsString& aCounterReset)=0; + NS_IMETHOD SetCounterReset(const nsString& aCounterReset)=0; + + NS_IMETHOD GetCue(nsString& aCue)=0; + NS_IMETHOD SetCue(const nsString& aCue)=0; + + NS_IMETHOD GetCueAfter(nsString& aCueAfter)=0; + NS_IMETHOD SetCueAfter(const nsString& aCueAfter)=0; + + NS_IMETHOD GetCueBefore(nsString& aCueBefore)=0; + NS_IMETHOD SetCueBefore(const nsString& aCueBefore)=0; + + NS_IMETHOD GetCursor(nsString& aCursor)=0; + NS_IMETHOD SetCursor(const nsString& aCursor)=0; + + NS_IMETHOD GetDirection(nsString& aDirection)=0; + NS_IMETHOD SetDirection(const nsString& aDirection)=0; + + NS_IMETHOD GetDisplay(nsString& aDisplay)=0; + NS_IMETHOD SetDisplay(const nsString& aDisplay)=0; + + NS_IMETHOD GetElevation(nsString& aElevation)=0; + NS_IMETHOD SetElevation(const nsString& aElevation)=0; + + NS_IMETHOD GetEmptyCells(nsString& aEmptyCells)=0; + NS_IMETHOD SetEmptyCells(const nsString& aEmptyCells)=0; + + NS_IMETHOD GetStyleFloat(nsString& aStyleFloat)=0; + NS_IMETHOD SetStyleFloat(const nsString& aStyleFloat)=0; + + NS_IMETHOD GetFont(nsString& aFont)=0; + NS_IMETHOD SetFont(const nsString& aFont)=0; + + NS_IMETHOD GetFontFamily(nsString& aFontFamily)=0; + NS_IMETHOD SetFontFamily(const nsString& aFontFamily)=0; + + NS_IMETHOD GetFontSize(nsString& aFontSize)=0; + NS_IMETHOD SetFontSize(const nsString& aFontSize)=0; + + NS_IMETHOD GetFontSizeAdjust(nsString& aFontSizeAdjust)=0; + NS_IMETHOD SetFontSizeAdjust(const nsString& aFontSizeAdjust)=0; + + NS_IMETHOD GetFontStretch(nsString& aFontStretch)=0; + NS_IMETHOD SetFontStretch(const nsString& aFontStretch)=0; + + NS_IMETHOD GetFontStyle(nsString& aFontStyle)=0; + NS_IMETHOD SetFontStyle(const nsString& aFontStyle)=0; + + NS_IMETHOD GetFontVariant(nsString& aFontVariant)=0; + NS_IMETHOD SetFontVariant(const nsString& aFontVariant)=0; + + NS_IMETHOD GetFontWeight(nsString& aFontWeight)=0; + NS_IMETHOD SetFontWeight(const nsString& aFontWeight)=0; + + NS_IMETHOD GetHeight(nsString& aHeight)=0; + NS_IMETHOD SetHeight(const nsString& aHeight)=0; + + NS_IMETHOD GetLeft(nsString& aLeft)=0; + NS_IMETHOD SetLeft(const nsString& aLeft)=0; + + NS_IMETHOD GetLetterSpacing(nsString& aLetterSpacing)=0; + NS_IMETHOD SetLetterSpacing(const nsString& aLetterSpacing)=0; + + NS_IMETHOD GetLineHeight(nsString& aLineHeight)=0; + NS_IMETHOD SetLineHeight(const nsString& aLineHeight)=0; + + NS_IMETHOD GetListStyle(nsString& aListStyle)=0; + NS_IMETHOD SetListStyle(const nsString& aListStyle)=0; + + NS_IMETHOD GetListStyleImage(nsString& aListStyleImage)=0; + NS_IMETHOD SetListStyleImage(const nsString& aListStyleImage)=0; + + NS_IMETHOD GetListStylePosition(nsString& aListStylePosition)=0; + NS_IMETHOD SetListStylePosition(const nsString& aListStylePosition)=0; + + NS_IMETHOD GetListStyleType(nsString& aListStyleType)=0; + NS_IMETHOD SetListStyleType(const nsString& aListStyleType)=0; + + NS_IMETHOD GetMargin(nsString& aMargin)=0; + NS_IMETHOD SetMargin(const nsString& aMargin)=0; + + NS_IMETHOD GetMarginTop(nsString& aMarginTop)=0; + NS_IMETHOD SetMarginTop(const nsString& aMarginTop)=0; + + NS_IMETHOD GetMarginRight(nsString& aMarginRight)=0; + NS_IMETHOD SetMarginRight(const nsString& aMarginRight)=0; + + NS_IMETHOD GetMarginBottom(nsString& aMarginBottom)=0; + NS_IMETHOD SetMarginBottom(const nsString& aMarginBottom)=0; + + NS_IMETHOD GetMarginLeft(nsString& aMarginLeft)=0; + NS_IMETHOD SetMarginLeft(const nsString& aMarginLeft)=0; + + NS_IMETHOD GetMarkerOffset(nsString& aMarkerOffset)=0; + NS_IMETHOD SetMarkerOffset(const nsString& aMarkerOffset)=0; + + NS_IMETHOD GetMarks(nsString& aMarks)=0; + NS_IMETHOD SetMarks(const nsString& aMarks)=0; + + NS_IMETHOD GetMaxHeight(nsString& aMaxHeight)=0; + NS_IMETHOD SetMaxHeight(const nsString& aMaxHeight)=0; + + NS_IMETHOD GetMaxWidth(nsString& aMaxWidth)=0; + NS_IMETHOD SetMaxWidth(const nsString& aMaxWidth)=0; + + NS_IMETHOD GetMinHeight(nsString& aMinHeight)=0; + NS_IMETHOD SetMinHeight(const nsString& aMinHeight)=0; + + NS_IMETHOD GetMinWidth(nsString& aMinWidth)=0; + NS_IMETHOD SetMinWidth(const nsString& aMinWidth)=0; + + NS_IMETHOD GetOrphans(nsString& aOrphans)=0; + NS_IMETHOD SetOrphans(const nsString& aOrphans)=0; + + NS_IMETHOD GetOutline(nsString& aOutline)=0; + NS_IMETHOD SetOutline(const nsString& aOutline)=0; + + NS_IMETHOD GetOutlineColor(nsString& aOutlineColor)=0; + NS_IMETHOD SetOutlineColor(const nsString& aOutlineColor)=0; + + NS_IMETHOD GetOutlineStyle(nsString& aOutlineStyle)=0; + NS_IMETHOD SetOutlineStyle(const nsString& aOutlineStyle)=0; + + NS_IMETHOD GetOutlineWidth(nsString& aOutlineWidth)=0; + NS_IMETHOD SetOutlineWidth(const nsString& aOutlineWidth)=0; + + NS_IMETHOD GetOverflow(nsString& aOverflow)=0; + NS_IMETHOD SetOverflow(const nsString& aOverflow)=0; + + NS_IMETHOD GetPadding(nsString& aPadding)=0; + NS_IMETHOD SetPadding(const nsString& aPadding)=0; + + NS_IMETHOD GetPaddingTop(nsString& aPaddingTop)=0; + NS_IMETHOD SetPaddingTop(const nsString& aPaddingTop)=0; + + NS_IMETHOD GetPaddingRight(nsString& aPaddingRight)=0; + NS_IMETHOD SetPaddingRight(const nsString& aPaddingRight)=0; + + NS_IMETHOD GetPaddingBottom(nsString& aPaddingBottom)=0; + NS_IMETHOD SetPaddingBottom(const nsString& aPaddingBottom)=0; + + NS_IMETHOD GetPaddingLeft(nsString& aPaddingLeft)=0; + NS_IMETHOD SetPaddingLeft(const nsString& aPaddingLeft)=0; + + NS_IMETHOD GetPage(nsString& aPage)=0; + NS_IMETHOD SetPage(const nsString& aPage)=0; + + NS_IMETHOD GetPageBreakAfter(nsString& aPageBreakAfter)=0; + NS_IMETHOD SetPageBreakAfter(const nsString& aPageBreakAfter)=0; + + NS_IMETHOD GetPageBreakBefore(nsString& aPageBreakBefore)=0; + NS_IMETHOD SetPageBreakBefore(const nsString& aPageBreakBefore)=0; + + NS_IMETHOD GetPageBreakInside(nsString& aPageBreakInside)=0; + NS_IMETHOD SetPageBreakInside(const nsString& aPageBreakInside)=0; + + NS_IMETHOD GetPause(nsString& aPause)=0; + NS_IMETHOD SetPause(const nsString& aPause)=0; + + NS_IMETHOD GetPauseAfter(nsString& aPauseAfter)=0; + NS_IMETHOD SetPauseAfter(const nsString& aPauseAfter)=0; + + NS_IMETHOD GetPauseBefore(nsString& aPauseBefore)=0; + NS_IMETHOD SetPauseBefore(const nsString& aPauseBefore)=0; + + NS_IMETHOD GetPitch(nsString& aPitch)=0; + NS_IMETHOD SetPitch(const nsString& aPitch)=0; + + NS_IMETHOD GetPitchRange(nsString& aPitchRange)=0; + NS_IMETHOD SetPitchRange(const nsString& aPitchRange)=0; + + NS_IMETHOD GetPlayDuring(nsString& aPlayDuring)=0; + NS_IMETHOD SetPlayDuring(const nsString& aPlayDuring)=0; + + NS_IMETHOD GetPosition(nsString& aPosition)=0; + NS_IMETHOD SetPosition(const nsString& aPosition)=0; + + NS_IMETHOD GetQuotes(nsString& aQuotes)=0; + NS_IMETHOD SetQuotes(const nsString& aQuotes)=0; + + NS_IMETHOD GetRichness(nsString& aRichness)=0; + NS_IMETHOD SetRichness(const nsString& aRichness)=0; + + NS_IMETHOD GetRight(nsString& aRight)=0; + NS_IMETHOD SetRight(const nsString& aRight)=0; + + NS_IMETHOD GetSize(nsString& aSize)=0; + NS_IMETHOD SetSize(const nsString& aSize)=0; + + NS_IMETHOD GetSpeak(nsString& aSpeak)=0; + NS_IMETHOD SetSpeak(const nsString& aSpeak)=0; + + NS_IMETHOD GetSpeakHeader(nsString& aSpeakHeader)=0; + NS_IMETHOD SetSpeakHeader(const nsString& aSpeakHeader)=0; + + NS_IMETHOD GetSpeakNumeral(nsString& aSpeakNumeral)=0; + NS_IMETHOD SetSpeakNumeral(const nsString& aSpeakNumeral)=0; + + NS_IMETHOD GetSpeakPunctuation(nsString& aSpeakPunctuation)=0; + NS_IMETHOD SetSpeakPunctuation(const nsString& aSpeakPunctuation)=0; + + NS_IMETHOD GetSpeechRate(nsString& aSpeechRate)=0; + NS_IMETHOD SetSpeechRate(const nsString& aSpeechRate)=0; + + NS_IMETHOD GetStress(nsString& aStress)=0; + NS_IMETHOD SetStress(const nsString& aStress)=0; + + NS_IMETHOD GetTableLayout(nsString& aTableLayout)=0; + NS_IMETHOD SetTableLayout(const nsString& aTableLayout)=0; + + NS_IMETHOD GetTextAlign(nsString& aTextAlign)=0; + NS_IMETHOD SetTextAlign(const nsString& aTextAlign)=0; + + NS_IMETHOD GetTextDecoration(nsString& aTextDecoration)=0; + NS_IMETHOD SetTextDecoration(const nsString& aTextDecoration)=0; + + NS_IMETHOD GetTextIndent(nsString& aTextIndent)=0; + NS_IMETHOD SetTextIndent(const nsString& aTextIndent)=0; + + NS_IMETHOD GetTextShadow(nsString& aTextShadow)=0; + NS_IMETHOD SetTextShadow(const nsString& aTextShadow)=0; + + NS_IMETHOD GetTextTransform(nsString& aTextTransform)=0; + NS_IMETHOD SetTextTransform(const nsString& aTextTransform)=0; + + NS_IMETHOD GetTop(nsString& aTop)=0; + NS_IMETHOD SetTop(const nsString& aTop)=0; + + NS_IMETHOD GetUnicodeBidi(nsString& aUnicodeBidi)=0; + NS_IMETHOD SetUnicodeBidi(const nsString& aUnicodeBidi)=0; + + NS_IMETHOD GetVerticalAlign(nsString& aVerticalAlign)=0; + NS_IMETHOD SetVerticalAlign(const nsString& aVerticalAlign)=0; + + NS_IMETHOD GetVisibility(nsString& aVisibility)=0; + NS_IMETHOD SetVisibility(const nsString& aVisibility)=0; + + NS_IMETHOD GetVoiceFamily(nsString& aVoiceFamily)=0; + NS_IMETHOD SetVoiceFamily(const nsString& aVoiceFamily)=0; + + NS_IMETHOD GetVolume(nsString& aVolume)=0; + NS_IMETHOD SetVolume(const nsString& aVolume)=0; + + NS_IMETHOD GetWhiteSpace(nsString& aWhiteSpace)=0; + NS_IMETHOD SetWhiteSpace(const nsString& aWhiteSpace)=0; + + NS_IMETHOD GetWidows(nsString& aWidows)=0; + NS_IMETHOD SetWidows(const nsString& aWidows)=0; + + NS_IMETHOD GetWidth(nsString& aWidth)=0; + NS_IMETHOD SetWidth(const nsString& aWidth)=0; + + NS_IMETHOD GetWordSpacing(nsString& aWordSpacing)=0; + NS_IMETHOD SetWordSpacing(const nsString& aWordSpacing)=0; + + NS_IMETHOD GetZIndex(nsString& aZIndex)=0; + NS_IMETHOD SetZIndex(const nsString& aZIndex)=0; + + NS_IMETHOD GetPropertyValue(const nsString& aPropertyName, nsString& aReturn)=0; + + NS_IMETHOD GetPropertyPriority(const nsString& aPropertyName, nsString& aReturn)=0; + + NS_IMETHOD SetProperty(const nsString& aPropertyName, const nsString& aValue, const nsString& aPriority)=0; + + NS_IMETHOD Item(PRUint32 aIndex, nsString& aReturn)=0; +}; + + +#define NS_DECL_IDOMCSSSTYLEDECLARATION \ + NS_IMETHOD GetLength(PRUint32* aLength); \ + NS_IMETHOD GetAzimuth(nsString& aAzimuth); \ + NS_IMETHOD SetAzimuth(const nsString& aAzimuth); \ + NS_IMETHOD GetBackground(nsString& aBackground); \ + NS_IMETHOD SetBackground(const nsString& aBackground); \ + NS_IMETHOD GetBackgroundAttachment(nsString& aBackgroundAttachment); \ + NS_IMETHOD SetBackgroundAttachment(const nsString& aBackgroundAttachment); \ + NS_IMETHOD GetBackgroundColor(nsString& aBackgroundColor); \ + NS_IMETHOD SetBackgroundColor(const nsString& aBackgroundColor); \ + NS_IMETHOD GetBackgroundImage(nsString& aBackgroundImage); \ + NS_IMETHOD SetBackgroundImage(const nsString& aBackgroundImage); \ + NS_IMETHOD GetBackgroundPosition(nsString& aBackgroundPosition); \ + NS_IMETHOD SetBackgroundPosition(const nsString& aBackgroundPosition); \ + NS_IMETHOD GetBackgroundRepeat(nsString& aBackgroundRepeat); \ + NS_IMETHOD SetBackgroundRepeat(const nsString& aBackgroundRepeat); \ + NS_IMETHOD GetBorder(nsString& aBorder); \ + NS_IMETHOD SetBorder(const nsString& aBorder); \ + NS_IMETHOD GetBorderCollapse(nsString& aBorderCollapse); \ + NS_IMETHOD SetBorderCollapse(const nsString& aBorderCollapse); \ + NS_IMETHOD GetBorderColor(nsString& aBorderColor); \ + NS_IMETHOD SetBorderColor(const nsString& aBorderColor); \ + NS_IMETHOD GetBorderSpacing(nsString& aBorderSpacing); \ + NS_IMETHOD SetBorderSpacing(const nsString& aBorderSpacing); \ + NS_IMETHOD GetBorderStyle(nsString& aBorderStyle); \ + NS_IMETHOD SetBorderStyle(const nsString& aBorderStyle); \ + NS_IMETHOD GetBorderTop(nsString& aBorderTop); \ + NS_IMETHOD SetBorderTop(const nsString& aBorderTop); \ + NS_IMETHOD GetBorderRight(nsString& aBorderRight); \ + NS_IMETHOD SetBorderRight(const nsString& aBorderRight); \ + NS_IMETHOD GetBorderBottom(nsString& aBorderBottom); \ + NS_IMETHOD SetBorderBottom(const nsString& aBorderBottom); \ + NS_IMETHOD GetBorderLeft(nsString& aBorderLeft); \ + NS_IMETHOD SetBorderLeft(const nsString& aBorderLeft); \ + NS_IMETHOD GetBorderTopColor(nsString& aBorderTopColor); \ + NS_IMETHOD SetBorderTopColor(const nsString& aBorderTopColor); \ + NS_IMETHOD GetBorderRightColor(nsString& aBorderRightColor); \ + NS_IMETHOD SetBorderRightColor(const nsString& aBorderRightColor); \ + NS_IMETHOD GetBorderBottomColor(nsString& aBorderBottomColor); \ + NS_IMETHOD SetBorderBottomColor(const nsString& aBorderBottomColor); \ + NS_IMETHOD GetBorderLeftColor(nsString& aBorderLeftColor); \ + NS_IMETHOD SetBorderLeftColor(const nsString& aBorderLeftColor); \ + NS_IMETHOD GetBorderTopStyle(nsString& aBorderTopStyle); \ + NS_IMETHOD SetBorderTopStyle(const nsString& aBorderTopStyle); \ + NS_IMETHOD GetBorderRightStyle(nsString& aBorderRightStyle); \ + NS_IMETHOD SetBorderRightStyle(const nsString& aBorderRightStyle); \ + NS_IMETHOD GetBorderBottomStyle(nsString& aBorderBottomStyle); \ + NS_IMETHOD SetBorderBottomStyle(const nsString& aBorderBottomStyle); \ + NS_IMETHOD GetBorderLeftStyle(nsString& aBorderLeftStyle); \ + NS_IMETHOD SetBorderLeftStyle(const nsString& aBorderLeftStyle); \ + NS_IMETHOD GetBorderTopWidth(nsString& aBorderTopWidth); \ + NS_IMETHOD SetBorderTopWidth(const nsString& aBorderTopWidth); \ + NS_IMETHOD GetBorderRightWidth(nsString& aBorderRightWidth); \ + NS_IMETHOD SetBorderRightWidth(const nsString& aBorderRightWidth); \ + NS_IMETHOD GetBorderBottomWidth(nsString& aBorderBottomWidth); \ + NS_IMETHOD SetBorderBottomWidth(const nsString& aBorderBottomWidth); \ + NS_IMETHOD GetBorderLeftWidth(nsString& aBorderLeftWidth); \ + NS_IMETHOD SetBorderLeftWidth(const nsString& aBorderLeftWidth); \ + NS_IMETHOD GetBorderWidth(nsString& aBorderWidth); \ + NS_IMETHOD SetBorderWidth(const nsString& aBorderWidth); \ + NS_IMETHOD GetBottom(nsString& aBottom); \ + NS_IMETHOD SetBottom(const nsString& aBottom); \ + NS_IMETHOD GetCaptionSide(nsString& aCaptionSide); \ + NS_IMETHOD SetCaptionSide(const nsString& aCaptionSide); \ + NS_IMETHOD GetClear(nsString& aClear); \ + NS_IMETHOD SetClear(const nsString& aClear); \ + NS_IMETHOD GetClip(nsString& aClip); \ + NS_IMETHOD SetClip(const nsString& aClip); \ + NS_IMETHOD GetColor(nsString& aColor); \ + NS_IMETHOD SetColor(const nsString& aColor); \ + NS_IMETHOD GetContent(nsString& aContent); \ + NS_IMETHOD SetContent(const nsString& aContent); \ + NS_IMETHOD GetCounterIncrement(nsString& aCounterIncrement); \ + NS_IMETHOD SetCounterIncrement(const nsString& aCounterIncrement); \ + NS_IMETHOD GetCounterReset(nsString& aCounterReset); \ + NS_IMETHOD SetCounterReset(const nsString& aCounterReset); \ + NS_IMETHOD GetCue(nsString& aCue); \ + NS_IMETHOD SetCue(const nsString& aCue); \ + NS_IMETHOD GetCueAfter(nsString& aCueAfter); \ + NS_IMETHOD SetCueAfter(const nsString& aCueAfter); \ + NS_IMETHOD GetCueBefore(nsString& aCueBefore); \ + NS_IMETHOD SetCueBefore(const nsString& aCueBefore); \ + NS_IMETHOD GetCursor(nsString& aCursor); \ + NS_IMETHOD SetCursor(const nsString& aCursor); \ + NS_IMETHOD GetDirection(nsString& aDirection); \ + NS_IMETHOD SetDirection(const nsString& aDirection); \ + NS_IMETHOD GetDisplay(nsString& aDisplay); \ + NS_IMETHOD SetDisplay(const nsString& aDisplay); \ + NS_IMETHOD GetElevation(nsString& aElevation); \ + NS_IMETHOD SetElevation(const nsString& aElevation); \ + NS_IMETHOD GetEmptyCells(nsString& aEmptyCells); \ + NS_IMETHOD SetEmptyCells(const nsString& aEmptyCells); \ + NS_IMETHOD GetStyleFloat(nsString& aStyleFloat); \ + NS_IMETHOD SetStyleFloat(const nsString& aStyleFloat); \ + NS_IMETHOD GetFont(nsString& aFont); \ + NS_IMETHOD SetFont(const nsString& aFont); \ + NS_IMETHOD GetFontFamily(nsString& aFontFamily); \ + NS_IMETHOD SetFontFamily(const nsString& aFontFamily); \ + NS_IMETHOD GetFontSize(nsString& aFontSize); \ + NS_IMETHOD SetFontSize(const nsString& aFontSize); \ + NS_IMETHOD GetFontSizeAdjust(nsString& aFontSizeAdjust); \ + NS_IMETHOD SetFontSizeAdjust(const nsString& aFontSizeAdjust); \ + NS_IMETHOD GetFontStretch(nsString& aFontStretch); \ + NS_IMETHOD SetFontStretch(const nsString& aFontStretch); \ + NS_IMETHOD GetFontStyle(nsString& aFontStyle); \ + NS_IMETHOD SetFontStyle(const nsString& aFontStyle); \ + NS_IMETHOD GetFontVariant(nsString& aFontVariant); \ + NS_IMETHOD SetFontVariant(const nsString& aFontVariant); \ + NS_IMETHOD GetFontWeight(nsString& aFontWeight); \ + NS_IMETHOD SetFontWeight(const nsString& aFontWeight); \ + NS_IMETHOD GetHeight(nsString& aHeight); \ + NS_IMETHOD SetHeight(const nsString& aHeight); \ + NS_IMETHOD GetLeft(nsString& aLeft); \ + NS_IMETHOD SetLeft(const nsString& aLeft); \ + NS_IMETHOD GetLetterSpacing(nsString& aLetterSpacing); \ + NS_IMETHOD SetLetterSpacing(const nsString& aLetterSpacing); \ + NS_IMETHOD GetLineHeight(nsString& aLineHeight); \ + NS_IMETHOD SetLineHeight(const nsString& aLineHeight); \ + NS_IMETHOD GetListStyle(nsString& aListStyle); \ + NS_IMETHOD SetListStyle(const nsString& aListStyle); \ + NS_IMETHOD GetListStyleImage(nsString& aListStyleImage); \ + NS_IMETHOD SetListStyleImage(const nsString& aListStyleImage); \ + NS_IMETHOD GetListStylePosition(nsString& aListStylePosition); \ + NS_IMETHOD SetListStylePosition(const nsString& aListStylePosition); \ + NS_IMETHOD GetListStyleType(nsString& aListStyleType); \ + NS_IMETHOD SetListStyleType(const nsString& aListStyleType); \ + NS_IMETHOD GetMargin(nsString& aMargin); \ + NS_IMETHOD SetMargin(const nsString& aMargin); \ + NS_IMETHOD GetMarginTop(nsString& aMarginTop); \ + NS_IMETHOD SetMarginTop(const nsString& aMarginTop); \ + NS_IMETHOD GetMarginRight(nsString& aMarginRight); \ + NS_IMETHOD SetMarginRight(const nsString& aMarginRight); \ + NS_IMETHOD GetMarginBottom(nsString& aMarginBottom); \ + NS_IMETHOD SetMarginBottom(const nsString& aMarginBottom); \ + NS_IMETHOD GetMarginLeft(nsString& aMarginLeft); \ + NS_IMETHOD SetMarginLeft(const nsString& aMarginLeft); \ + NS_IMETHOD GetMarkerOffset(nsString& aMarkerOffset); \ + NS_IMETHOD SetMarkerOffset(const nsString& aMarkerOffset); \ + NS_IMETHOD GetMarks(nsString& aMarks); \ + NS_IMETHOD SetMarks(const nsString& aMarks); \ + NS_IMETHOD GetMaxHeight(nsString& aMaxHeight); \ + NS_IMETHOD SetMaxHeight(const nsString& aMaxHeight); \ + NS_IMETHOD GetMaxWidth(nsString& aMaxWidth); \ + NS_IMETHOD SetMaxWidth(const nsString& aMaxWidth); \ + NS_IMETHOD GetMinHeight(nsString& aMinHeight); \ + NS_IMETHOD SetMinHeight(const nsString& aMinHeight); \ + NS_IMETHOD GetMinWidth(nsString& aMinWidth); \ + NS_IMETHOD SetMinWidth(const nsString& aMinWidth); \ + NS_IMETHOD GetOrphans(nsString& aOrphans); \ + NS_IMETHOD SetOrphans(const nsString& aOrphans); \ + NS_IMETHOD GetOutline(nsString& aOutline); \ + NS_IMETHOD SetOutline(const nsString& aOutline); \ + NS_IMETHOD GetOutlineColor(nsString& aOutlineColor); \ + NS_IMETHOD SetOutlineColor(const nsString& aOutlineColor); \ + NS_IMETHOD GetOutlineStyle(nsString& aOutlineStyle); \ + NS_IMETHOD SetOutlineStyle(const nsString& aOutlineStyle); \ + NS_IMETHOD GetOutlineWidth(nsString& aOutlineWidth); \ + NS_IMETHOD SetOutlineWidth(const nsString& aOutlineWidth); \ + NS_IMETHOD GetOverflow(nsString& aOverflow); \ + NS_IMETHOD SetOverflow(const nsString& aOverflow); \ + NS_IMETHOD GetPadding(nsString& aPadding); \ + NS_IMETHOD SetPadding(const nsString& aPadding); \ + NS_IMETHOD GetPaddingTop(nsString& aPaddingTop); \ + NS_IMETHOD SetPaddingTop(const nsString& aPaddingTop); \ + NS_IMETHOD GetPaddingRight(nsString& aPaddingRight); \ + NS_IMETHOD SetPaddingRight(const nsString& aPaddingRight); \ + NS_IMETHOD GetPaddingBottom(nsString& aPaddingBottom); \ + NS_IMETHOD SetPaddingBottom(const nsString& aPaddingBottom); \ + NS_IMETHOD GetPaddingLeft(nsString& aPaddingLeft); \ + NS_IMETHOD SetPaddingLeft(const nsString& aPaddingLeft); \ + NS_IMETHOD GetPage(nsString& aPage); \ + NS_IMETHOD SetPage(const nsString& aPage); \ + NS_IMETHOD GetPageBreakAfter(nsString& aPageBreakAfter); \ + NS_IMETHOD SetPageBreakAfter(const nsString& aPageBreakAfter); \ + NS_IMETHOD GetPageBreakBefore(nsString& aPageBreakBefore); \ + NS_IMETHOD SetPageBreakBefore(const nsString& aPageBreakBefore); \ + NS_IMETHOD GetPageBreakInside(nsString& aPageBreakInside); \ + NS_IMETHOD SetPageBreakInside(const nsString& aPageBreakInside); \ + NS_IMETHOD GetPause(nsString& aPause); \ + NS_IMETHOD SetPause(const nsString& aPause); \ + NS_IMETHOD GetPauseAfter(nsString& aPauseAfter); \ + NS_IMETHOD SetPauseAfter(const nsString& aPauseAfter); \ + NS_IMETHOD GetPauseBefore(nsString& aPauseBefore); \ + NS_IMETHOD SetPauseBefore(const nsString& aPauseBefore); \ + NS_IMETHOD GetPitch(nsString& aPitch); \ + NS_IMETHOD SetPitch(const nsString& aPitch); \ + NS_IMETHOD GetPitchRange(nsString& aPitchRange); \ + NS_IMETHOD SetPitchRange(const nsString& aPitchRange); \ + NS_IMETHOD GetPlayDuring(nsString& aPlayDuring); \ + NS_IMETHOD SetPlayDuring(const nsString& aPlayDuring); \ + NS_IMETHOD GetPosition(nsString& aPosition); \ + NS_IMETHOD SetPosition(const nsString& aPosition); \ + NS_IMETHOD GetQuotes(nsString& aQuotes); \ + NS_IMETHOD SetQuotes(const nsString& aQuotes); \ + NS_IMETHOD GetRichness(nsString& aRichness); \ + NS_IMETHOD SetRichness(const nsString& aRichness); \ + NS_IMETHOD GetRight(nsString& aRight); \ + NS_IMETHOD SetRight(const nsString& aRight); \ + NS_IMETHOD GetSize(nsString& aSize); \ + NS_IMETHOD SetSize(const nsString& aSize); \ + NS_IMETHOD GetSpeak(nsString& aSpeak); \ + NS_IMETHOD SetSpeak(const nsString& aSpeak); \ + NS_IMETHOD GetSpeakHeader(nsString& aSpeakHeader); \ + NS_IMETHOD SetSpeakHeader(const nsString& aSpeakHeader); \ + NS_IMETHOD GetSpeakNumeral(nsString& aSpeakNumeral); \ + NS_IMETHOD SetSpeakNumeral(const nsString& aSpeakNumeral); \ + NS_IMETHOD GetSpeakPunctuation(nsString& aSpeakPunctuation); \ + NS_IMETHOD SetSpeakPunctuation(const nsString& aSpeakPunctuation); \ + NS_IMETHOD GetSpeechRate(nsString& aSpeechRate); \ + NS_IMETHOD SetSpeechRate(const nsString& aSpeechRate); \ + NS_IMETHOD GetStress(nsString& aStress); \ + NS_IMETHOD SetStress(const nsString& aStress); \ + NS_IMETHOD GetTableLayout(nsString& aTableLayout); \ + NS_IMETHOD SetTableLayout(const nsString& aTableLayout); \ + NS_IMETHOD GetTextAlign(nsString& aTextAlign); \ + NS_IMETHOD SetTextAlign(const nsString& aTextAlign); \ + NS_IMETHOD GetTextDecoration(nsString& aTextDecoration); \ + NS_IMETHOD SetTextDecoration(const nsString& aTextDecoration); \ + NS_IMETHOD GetTextIndent(nsString& aTextIndent); \ + NS_IMETHOD SetTextIndent(const nsString& aTextIndent); \ + NS_IMETHOD GetTextShadow(nsString& aTextShadow); \ + NS_IMETHOD SetTextShadow(const nsString& aTextShadow); \ + NS_IMETHOD GetTextTransform(nsString& aTextTransform); \ + NS_IMETHOD SetTextTransform(const nsString& aTextTransform); \ + NS_IMETHOD GetTop(nsString& aTop); \ + NS_IMETHOD SetTop(const nsString& aTop); \ + NS_IMETHOD GetUnicodeBidi(nsString& aUnicodeBidi); \ + NS_IMETHOD SetUnicodeBidi(const nsString& aUnicodeBidi); \ + NS_IMETHOD GetVerticalAlign(nsString& aVerticalAlign); \ + NS_IMETHOD SetVerticalAlign(const nsString& aVerticalAlign); \ + NS_IMETHOD GetVisibility(nsString& aVisibility); \ + NS_IMETHOD SetVisibility(const nsString& aVisibility); \ + NS_IMETHOD GetVoiceFamily(nsString& aVoiceFamily); \ + NS_IMETHOD SetVoiceFamily(const nsString& aVoiceFamily); \ + NS_IMETHOD GetVolume(nsString& aVolume); \ + NS_IMETHOD SetVolume(const nsString& aVolume); \ + NS_IMETHOD GetWhiteSpace(nsString& aWhiteSpace); \ + NS_IMETHOD SetWhiteSpace(const nsString& aWhiteSpace); \ + NS_IMETHOD GetWidows(nsString& aWidows); \ + NS_IMETHOD SetWidows(const nsString& aWidows); \ + NS_IMETHOD GetWidth(nsString& aWidth); \ + NS_IMETHOD SetWidth(const nsString& aWidth); \ + NS_IMETHOD GetWordSpacing(nsString& aWordSpacing); \ + NS_IMETHOD SetWordSpacing(const nsString& aWordSpacing); \ + NS_IMETHOD GetZIndex(nsString& aZIndex); \ + NS_IMETHOD SetZIndex(const nsString& aZIndex); \ + NS_IMETHOD GetPropertyValue(const nsString& aPropertyName, nsString& aReturn); \ + NS_IMETHOD GetPropertyPriority(const nsString& aPropertyName, nsString& aReturn); \ + NS_IMETHOD SetProperty(const nsString& aPropertyName, const nsString& aValue, const nsString& aPriority); \ + NS_IMETHOD Item(PRUint32 aIndex, nsString& aReturn); \ + + + +#define NS_FORWARD_IDOMCSSSTYLEDECLARATION(_to) \ + NS_IMETHOD GetLength(PRUint32* aLength) { return _to##GetLength(aLength); } \ + NS_IMETHOD GetAzimuth(nsString& aAzimuth) { return _to##GetAzimuth(aAzimuth); } \ + NS_IMETHOD SetAzimuth(const nsString& aAzimuth) { return _to##SetAzimuth(aAzimuth); } \ + NS_IMETHOD GetBackground(nsString& aBackground) { return _to##GetBackground(aBackground); } \ + NS_IMETHOD SetBackground(const nsString& aBackground) { return _to##SetBackground(aBackground); } \ + NS_IMETHOD GetBackgroundAttachment(nsString& aBackgroundAttachment) { return _to##GetBackgroundAttachment(aBackgroundAttachment); } \ + NS_IMETHOD SetBackgroundAttachment(const nsString& aBackgroundAttachment) { return _to##SetBackgroundAttachment(aBackgroundAttachment); } \ + NS_IMETHOD GetBackgroundColor(nsString& aBackgroundColor) { return _to##GetBackgroundColor(aBackgroundColor); } \ + NS_IMETHOD SetBackgroundColor(const nsString& aBackgroundColor) { return _to##SetBackgroundColor(aBackgroundColor); } \ + NS_IMETHOD GetBackgroundImage(nsString& aBackgroundImage) { return _to##GetBackgroundImage(aBackgroundImage); } \ + NS_IMETHOD SetBackgroundImage(const nsString& aBackgroundImage) { return _to##SetBackgroundImage(aBackgroundImage); } \ + NS_IMETHOD GetBackgroundPosition(nsString& aBackgroundPosition) { return _to##GetBackgroundPosition(aBackgroundPosition); } \ + NS_IMETHOD SetBackgroundPosition(const nsString& aBackgroundPosition) { return _to##SetBackgroundPosition(aBackgroundPosition); } \ + NS_IMETHOD GetBackgroundRepeat(nsString& aBackgroundRepeat) { return _to##GetBackgroundRepeat(aBackgroundRepeat); } \ + NS_IMETHOD SetBackgroundRepeat(const nsString& aBackgroundRepeat) { return _to##SetBackgroundRepeat(aBackgroundRepeat); } \ + NS_IMETHOD GetBorder(nsString& aBorder) { return _to##GetBorder(aBorder); } \ + NS_IMETHOD SetBorder(const nsString& aBorder) { return _to##SetBorder(aBorder); } \ + NS_IMETHOD GetBorderCollapse(nsString& aBorderCollapse) { return _to##GetBorderCollapse(aBorderCollapse); } \ + NS_IMETHOD SetBorderCollapse(const nsString& aBorderCollapse) { return _to##SetBorderCollapse(aBorderCollapse); } \ + NS_IMETHOD GetBorderColor(nsString& aBorderColor) { return _to##GetBorderColor(aBorderColor); } \ + NS_IMETHOD SetBorderColor(const nsString& aBorderColor) { return _to##SetBorderColor(aBorderColor); } \ + NS_IMETHOD GetBorderSpacing(nsString& aBorderSpacing) { return _to##GetBorderSpacing(aBorderSpacing); } \ + NS_IMETHOD SetBorderSpacing(const nsString& aBorderSpacing) { return _to##SetBorderSpacing(aBorderSpacing); } \ + NS_IMETHOD GetBorderStyle(nsString& aBorderStyle) { return _to##GetBorderStyle(aBorderStyle); } \ + NS_IMETHOD SetBorderStyle(const nsString& aBorderStyle) { return _to##SetBorderStyle(aBorderStyle); } \ + NS_IMETHOD GetBorderTop(nsString& aBorderTop) { return _to##GetBorderTop(aBorderTop); } \ + NS_IMETHOD SetBorderTop(const nsString& aBorderTop) { return _to##SetBorderTop(aBorderTop); } \ + NS_IMETHOD GetBorderRight(nsString& aBorderRight) { return _to##GetBorderRight(aBorderRight); } \ + NS_IMETHOD SetBorderRight(const nsString& aBorderRight) { return _to##SetBorderRight(aBorderRight); } \ + NS_IMETHOD GetBorderBottom(nsString& aBorderBottom) { return _to##GetBorderBottom(aBorderBottom); } \ + NS_IMETHOD SetBorderBottom(const nsString& aBorderBottom) { return _to##SetBorderBottom(aBorderBottom); } \ + NS_IMETHOD GetBorderLeft(nsString& aBorderLeft) { return _to##GetBorderLeft(aBorderLeft); } \ + NS_IMETHOD SetBorderLeft(const nsString& aBorderLeft) { return _to##SetBorderLeft(aBorderLeft); } \ + NS_IMETHOD GetBorderTopColor(nsString& aBorderTopColor) { return _to##GetBorderTopColor(aBorderTopColor); } \ + NS_IMETHOD SetBorderTopColor(const nsString& aBorderTopColor) { return _to##SetBorderTopColor(aBorderTopColor); } \ + NS_IMETHOD GetBorderRightColor(nsString& aBorderRightColor) { return _to##GetBorderRightColor(aBorderRightColor); } \ + NS_IMETHOD SetBorderRightColor(const nsString& aBorderRightColor) { return _to##SetBorderRightColor(aBorderRightColor); } \ + NS_IMETHOD GetBorderBottomColor(nsString& aBorderBottomColor) { return _to##GetBorderBottomColor(aBorderBottomColor); } \ + NS_IMETHOD SetBorderBottomColor(const nsString& aBorderBottomColor) { return _to##SetBorderBottomColor(aBorderBottomColor); } \ + NS_IMETHOD GetBorderLeftColor(nsString& aBorderLeftColor) { return _to##GetBorderLeftColor(aBorderLeftColor); } \ + NS_IMETHOD SetBorderLeftColor(const nsString& aBorderLeftColor) { return _to##SetBorderLeftColor(aBorderLeftColor); } \ + NS_IMETHOD GetBorderTopStyle(nsString& aBorderTopStyle) { return _to##GetBorderTopStyle(aBorderTopStyle); } \ + NS_IMETHOD SetBorderTopStyle(const nsString& aBorderTopStyle) { return _to##SetBorderTopStyle(aBorderTopStyle); } \ + NS_IMETHOD GetBorderRightStyle(nsString& aBorderRightStyle) { return _to##GetBorderRightStyle(aBorderRightStyle); } \ + NS_IMETHOD SetBorderRightStyle(const nsString& aBorderRightStyle) { return _to##SetBorderRightStyle(aBorderRightStyle); } \ + NS_IMETHOD GetBorderBottomStyle(nsString& aBorderBottomStyle) { return _to##GetBorderBottomStyle(aBorderBottomStyle); } \ + NS_IMETHOD SetBorderBottomStyle(const nsString& aBorderBottomStyle) { return _to##SetBorderBottomStyle(aBorderBottomStyle); } \ + NS_IMETHOD GetBorderLeftStyle(nsString& aBorderLeftStyle) { return _to##GetBorderLeftStyle(aBorderLeftStyle); } \ + NS_IMETHOD SetBorderLeftStyle(const nsString& aBorderLeftStyle) { return _to##SetBorderLeftStyle(aBorderLeftStyle); } \ + NS_IMETHOD GetBorderTopWidth(nsString& aBorderTopWidth) { return _to##GetBorderTopWidth(aBorderTopWidth); } \ + NS_IMETHOD SetBorderTopWidth(const nsString& aBorderTopWidth) { return _to##SetBorderTopWidth(aBorderTopWidth); } \ + NS_IMETHOD GetBorderRightWidth(nsString& aBorderRightWidth) { return _to##GetBorderRightWidth(aBorderRightWidth); } \ + NS_IMETHOD SetBorderRightWidth(const nsString& aBorderRightWidth) { return _to##SetBorderRightWidth(aBorderRightWidth); } \ + NS_IMETHOD GetBorderBottomWidth(nsString& aBorderBottomWidth) { return _to##GetBorderBottomWidth(aBorderBottomWidth); } \ + NS_IMETHOD SetBorderBottomWidth(const nsString& aBorderBottomWidth) { return _to##SetBorderBottomWidth(aBorderBottomWidth); } \ + NS_IMETHOD GetBorderLeftWidth(nsString& aBorderLeftWidth) { return _to##GetBorderLeftWidth(aBorderLeftWidth); } \ + NS_IMETHOD SetBorderLeftWidth(const nsString& aBorderLeftWidth) { return _to##SetBorderLeftWidth(aBorderLeftWidth); } \ + NS_IMETHOD GetBorderWidth(nsString& aBorderWidth) { return _to##GetBorderWidth(aBorderWidth); } \ + NS_IMETHOD SetBorderWidth(const nsString& aBorderWidth) { return _to##SetBorderWidth(aBorderWidth); } \ + NS_IMETHOD GetBottom(nsString& aBottom) { return _to##GetBottom(aBottom); } \ + NS_IMETHOD SetBottom(const nsString& aBottom) { return _to##SetBottom(aBottom); } \ + NS_IMETHOD GetCaptionSide(nsString& aCaptionSide) { return _to##GetCaptionSide(aCaptionSide); } \ + NS_IMETHOD SetCaptionSide(const nsString& aCaptionSide) { return _to##SetCaptionSide(aCaptionSide); } \ + NS_IMETHOD GetClear(nsString& aClear) { return _to##GetClear(aClear); } \ + NS_IMETHOD SetClear(const nsString& aClear) { return _to##SetClear(aClear); } \ + NS_IMETHOD GetClip(nsString& aClip) { return _to##GetClip(aClip); } \ + NS_IMETHOD SetClip(const nsString& aClip) { return _to##SetClip(aClip); } \ + NS_IMETHOD GetColor(nsString& aColor) { return _to##GetColor(aColor); } \ + NS_IMETHOD SetColor(const nsString& aColor) { return _to##SetColor(aColor); } \ + NS_IMETHOD GetContent(nsString& aContent) { return _to##GetContent(aContent); } \ + NS_IMETHOD SetContent(const nsString& aContent) { return _to##SetContent(aContent); } \ + NS_IMETHOD GetCounterIncrement(nsString& aCounterIncrement) { return _to##GetCounterIncrement(aCounterIncrement); } \ + NS_IMETHOD SetCounterIncrement(const nsString& aCounterIncrement) { return _to##SetCounterIncrement(aCounterIncrement); } \ + NS_IMETHOD GetCounterReset(nsString& aCounterReset) { return _to##GetCounterReset(aCounterReset); } \ + NS_IMETHOD SetCounterReset(const nsString& aCounterReset) { return _to##SetCounterReset(aCounterReset); } \ + NS_IMETHOD GetCue(nsString& aCue) { return _to##GetCue(aCue); } \ + NS_IMETHOD SetCue(const nsString& aCue) { return _to##SetCue(aCue); } \ + NS_IMETHOD GetCueAfter(nsString& aCueAfter) { return _to##GetCueAfter(aCueAfter); } \ + NS_IMETHOD SetCueAfter(const nsString& aCueAfter) { return _to##SetCueAfter(aCueAfter); } \ + NS_IMETHOD GetCueBefore(nsString& aCueBefore) { return _to##GetCueBefore(aCueBefore); } \ + NS_IMETHOD SetCueBefore(const nsString& aCueBefore) { return _to##SetCueBefore(aCueBefore); } \ + NS_IMETHOD GetCursor(nsString& aCursor) { return _to##GetCursor(aCursor); } \ + NS_IMETHOD SetCursor(const nsString& aCursor) { return _to##SetCursor(aCursor); } \ + NS_IMETHOD GetDirection(nsString& aDirection) { return _to##GetDirection(aDirection); } \ + NS_IMETHOD SetDirection(const nsString& aDirection) { return _to##SetDirection(aDirection); } \ + NS_IMETHOD GetDisplay(nsString& aDisplay) { return _to##GetDisplay(aDisplay); } \ + NS_IMETHOD SetDisplay(const nsString& aDisplay) { return _to##SetDisplay(aDisplay); } \ + NS_IMETHOD GetElevation(nsString& aElevation) { return _to##GetElevation(aElevation); } \ + NS_IMETHOD SetElevation(const nsString& aElevation) { return _to##SetElevation(aElevation); } \ + NS_IMETHOD GetEmptyCells(nsString& aEmptyCells) { return _to##GetEmptyCells(aEmptyCells); } \ + NS_IMETHOD SetEmptyCells(const nsString& aEmptyCells) { return _to##SetEmptyCells(aEmptyCells); } \ + NS_IMETHOD GetStyleFloat(nsString& aStyleFloat) { return _to##GetStyleFloat(aStyleFloat); } \ + NS_IMETHOD SetStyleFloat(const nsString& aStyleFloat) { return _to##SetStyleFloat(aStyleFloat); } \ + NS_IMETHOD GetFont(nsString& aFont) { return _to##GetFont(aFont); } \ + NS_IMETHOD SetFont(const nsString& aFont) { return _to##SetFont(aFont); } \ + NS_IMETHOD GetFontFamily(nsString& aFontFamily) { return _to##GetFontFamily(aFontFamily); } \ + NS_IMETHOD SetFontFamily(const nsString& aFontFamily) { return _to##SetFontFamily(aFontFamily); } \ + NS_IMETHOD GetFontSize(nsString& aFontSize) { return _to##GetFontSize(aFontSize); } \ + NS_IMETHOD SetFontSize(const nsString& aFontSize) { return _to##SetFontSize(aFontSize); } \ + NS_IMETHOD GetFontSizeAdjust(nsString& aFontSizeAdjust) { return _to##GetFontSizeAdjust(aFontSizeAdjust); } \ + NS_IMETHOD SetFontSizeAdjust(const nsString& aFontSizeAdjust) { return _to##SetFontSizeAdjust(aFontSizeAdjust); } \ + NS_IMETHOD GetFontStretch(nsString& aFontStretch) { return _to##GetFontStretch(aFontStretch); } \ + NS_IMETHOD SetFontStretch(const nsString& aFontStretch) { return _to##SetFontStretch(aFontStretch); } \ + NS_IMETHOD GetFontStyle(nsString& aFontStyle) { return _to##GetFontStyle(aFontStyle); } \ + NS_IMETHOD SetFontStyle(const nsString& aFontStyle) { return _to##SetFontStyle(aFontStyle); } \ + NS_IMETHOD GetFontVariant(nsString& aFontVariant) { return _to##GetFontVariant(aFontVariant); } \ + NS_IMETHOD SetFontVariant(const nsString& aFontVariant) { return _to##SetFontVariant(aFontVariant); } \ + NS_IMETHOD GetFontWeight(nsString& aFontWeight) { return _to##GetFontWeight(aFontWeight); } \ + NS_IMETHOD SetFontWeight(const nsString& aFontWeight) { return _to##SetFontWeight(aFontWeight); } \ + NS_IMETHOD GetHeight(nsString& aHeight) { return _to##GetHeight(aHeight); } \ + NS_IMETHOD SetHeight(const nsString& aHeight) { return _to##SetHeight(aHeight); } \ + NS_IMETHOD GetLeft(nsString& aLeft) { return _to##GetLeft(aLeft); } \ + NS_IMETHOD SetLeft(const nsString& aLeft) { return _to##SetLeft(aLeft); } \ + NS_IMETHOD GetLetterSpacing(nsString& aLetterSpacing) { return _to##GetLetterSpacing(aLetterSpacing); } \ + NS_IMETHOD SetLetterSpacing(const nsString& aLetterSpacing) { return _to##SetLetterSpacing(aLetterSpacing); } \ + NS_IMETHOD GetLineHeight(nsString& aLineHeight) { return _to##GetLineHeight(aLineHeight); } \ + NS_IMETHOD SetLineHeight(const nsString& aLineHeight) { return _to##SetLineHeight(aLineHeight); } \ + NS_IMETHOD GetListStyle(nsString& aListStyle) { return _to##GetListStyle(aListStyle); } \ + NS_IMETHOD SetListStyle(const nsString& aListStyle) { return _to##SetListStyle(aListStyle); } \ + NS_IMETHOD GetListStyleImage(nsString& aListStyleImage) { return _to##GetListStyleImage(aListStyleImage); } \ + NS_IMETHOD SetListStyleImage(const nsString& aListStyleImage) { return _to##SetListStyleImage(aListStyleImage); } \ + NS_IMETHOD GetListStylePosition(nsString& aListStylePosition) { return _to##GetListStylePosition(aListStylePosition); } \ + NS_IMETHOD SetListStylePosition(const nsString& aListStylePosition) { return _to##SetListStylePosition(aListStylePosition); } \ + NS_IMETHOD GetListStyleType(nsString& aListStyleType) { return _to##GetListStyleType(aListStyleType); } \ + NS_IMETHOD SetListStyleType(const nsString& aListStyleType) { return _to##SetListStyleType(aListStyleType); } \ + NS_IMETHOD GetMargin(nsString& aMargin) { return _to##GetMargin(aMargin); } \ + NS_IMETHOD SetMargin(const nsString& aMargin) { return _to##SetMargin(aMargin); } \ + NS_IMETHOD GetMarginTop(nsString& aMarginTop) { return _to##GetMarginTop(aMarginTop); } \ + NS_IMETHOD SetMarginTop(const nsString& aMarginTop) { return _to##SetMarginTop(aMarginTop); } \ + NS_IMETHOD GetMarginRight(nsString& aMarginRight) { return _to##GetMarginRight(aMarginRight); } \ + NS_IMETHOD SetMarginRight(const nsString& aMarginRight) { return _to##SetMarginRight(aMarginRight); } \ + NS_IMETHOD GetMarginBottom(nsString& aMarginBottom) { return _to##GetMarginBottom(aMarginBottom); } \ + NS_IMETHOD SetMarginBottom(const nsString& aMarginBottom) { return _to##SetMarginBottom(aMarginBottom); } \ + NS_IMETHOD GetMarginLeft(nsString& aMarginLeft) { return _to##GetMarginLeft(aMarginLeft); } \ + NS_IMETHOD SetMarginLeft(const nsString& aMarginLeft) { return _to##SetMarginLeft(aMarginLeft); } \ + NS_IMETHOD GetMarkerOffset(nsString& aMarkerOffset) { return _to##GetMarkerOffset(aMarkerOffset); } \ + NS_IMETHOD SetMarkerOffset(const nsString& aMarkerOffset) { return _to##SetMarkerOffset(aMarkerOffset); } \ + NS_IMETHOD GetMarks(nsString& aMarks) { return _to##GetMarks(aMarks); } \ + NS_IMETHOD SetMarks(const nsString& aMarks) { return _to##SetMarks(aMarks); } \ + NS_IMETHOD GetMaxHeight(nsString& aMaxHeight) { return _to##GetMaxHeight(aMaxHeight); } \ + NS_IMETHOD SetMaxHeight(const nsString& aMaxHeight) { return _to##SetMaxHeight(aMaxHeight); } \ + NS_IMETHOD GetMaxWidth(nsString& aMaxWidth) { return _to##GetMaxWidth(aMaxWidth); } \ + NS_IMETHOD SetMaxWidth(const nsString& aMaxWidth) { return _to##SetMaxWidth(aMaxWidth); } \ + NS_IMETHOD GetMinHeight(nsString& aMinHeight) { return _to##GetMinHeight(aMinHeight); } \ + NS_IMETHOD SetMinHeight(const nsString& aMinHeight) { return _to##SetMinHeight(aMinHeight); } \ + NS_IMETHOD GetMinWidth(nsString& aMinWidth) { return _to##GetMinWidth(aMinWidth); } \ + NS_IMETHOD SetMinWidth(const nsString& aMinWidth) { return _to##SetMinWidth(aMinWidth); } \ + NS_IMETHOD GetOrphans(nsString& aOrphans) { return _to##GetOrphans(aOrphans); } \ + NS_IMETHOD SetOrphans(const nsString& aOrphans) { return _to##SetOrphans(aOrphans); } \ + NS_IMETHOD GetOutline(nsString& aOutline) { return _to##GetOutline(aOutline); } \ + NS_IMETHOD SetOutline(const nsString& aOutline) { return _to##SetOutline(aOutline); } \ + NS_IMETHOD GetOutlineColor(nsString& aOutlineColor) { return _to##GetOutlineColor(aOutlineColor); } \ + NS_IMETHOD SetOutlineColor(const nsString& aOutlineColor) { return _to##SetOutlineColor(aOutlineColor); } \ + NS_IMETHOD GetOutlineStyle(nsString& aOutlineStyle) { return _to##GetOutlineStyle(aOutlineStyle); } \ + NS_IMETHOD SetOutlineStyle(const nsString& aOutlineStyle) { return _to##SetOutlineStyle(aOutlineStyle); } \ + NS_IMETHOD GetOutlineWidth(nsString& aOutlineWidth) { return _to##GetOutlineWidth(aOutlineWidth); } \ + NS_IMETHOD SetOutlineWidth(const nsString& aOutlineWidth) { return _to##SetOutlineWidth(aOutlineWidth); } \ + NS_IMETHOD GetOverflow(nsString& aOverflow) { return _to##GetOverflow(aOverflow); } \ + NS_IMETHOD SetOverflow(const nsString& aOverflow) { return _to##SetOverflow(aOverflow); } \ + NS_IMETHOD GetPadding(nsString& aPadding) { return _to##GetPadding(aPadding); } \ + NS_IMETHOD SetPadding(const nsString& aPadding) { return _to##SetPadding(aPadding); } \ + NS_IMETHOD GetPaddingTop(nsString& aPaddingTop) { return _to##GetPaddingTop(aPaddingTop); } \ + NS_IMETHOD SetPaddingTop(const nsString& aPaddingTop) { return _to##SetPaddingTop(aPaddingTop); } \ + NS_IMETHOD GetPaddingRight(nsString& aPaddingRight) { return _to##GetPaddingRight(aPaddingRight); } \ + NS_IMETHOD SetPaddingRight(const nsString& aPaddingRight) { return _to##SetPaddingRight(aPaddingRight); } \ + NS_IMETHOD GetPaddingBottom(nsString& aPaddingBottom) { return _to##GetPaddingBottom(aPaddingBottom); } \ + NS_IMETHOD SetPaddingBottom(const nsString& aPaddingBottom) { return _to##SetPaddingBottom(aPaddingBottom); } \ + NS_IMETHOD GetPaddingLeft(nsString& aPaddingLeft) { return _to##GetPaddingLeft(aPaddingLeft); } \ + NS_IMETHOD SetPaddingLeft(const nsString& aPaddingLeft) { return _to##SetPaddingLeft(aPaddingLeft); } \ + NS_IMETHOD GetPage(nsString& aPage) { return _to##GetPage(aPage); } \ + NS_IMETHOD SetPage(const nsString& aPage) { return _to##SetPage(aPage); } \ + NS_IMETHOD GetPageBreakAfter(nsString& aPageBreakAfter) { return _to##GetPageBreakAfter(aPageBreakAfter); } \ + NS_IMETHOD SetPageBreakAfter(const nsString& aPageBreakAfter) { return _to##SetPageBreakAfter(aPageBreakAfter); } \ + NS_IMETHOD GetPageBreakBefore(nsString& aPageBreakBefore) { return _to##GetPageBreakBefore(aPageBreakBefore); } \ + NS_IMETHOD SetPageBreakBefore(const nsString& aPageBreakBefore) { return _to##SetPageBreakBefore(aPageBreakBefore); } \ + NS_IMETHOD GetPageBreakInside(nsString& aPageBreakInside) { return _to##GetPageBreakInside(aPageBreakInside); } \ + NS_IMETHOD SetPageBreakInside(const nsString& aPageBreakInside) { return _to##SetPageBreakInside(aPageBreakInside); } \ + NS_IMETHOD GetPause(nsString& aPause) { return _to##GetPause(aPause); } \ + NS_IMETHOD SetPause(const nsString& aPause) { return _to##SetPause(aPause); } \ + NS_IMETHOD GetPauseAfter(nsString& aPauseAfter) { return _to##GetPauseAfter(aPauseAfter); } \ + NS_IMETHOD SetPauseAfter(const nsString& aPauseAfter) { return _to##SetPauseAfter(aPauseAfter); } \ + NS_IMETHOD GetPauseBefore(nsString& aPauseBefore) { return _to##GetPauseBefore(aPauseBefore); } \ + NS_IMETHOD SetPauseBefore(const nsString& aPauseBefore) { return _to##SetPauseBefore(aPauseBefore); } \ + NS_IMETHOD GetPitch(nsString& aPitch) { return _to##GetPitch(aPitch); } \ + NS_IMETHOD SetPitch(const nsString& aPitch) { return _to##SetPitch(aPitch); } \ + NS_IMETHOD GetPitchRange(nsString& aPitchRange) { return _to##GetPitchRange(aPitchRange); } \ + NS_IMETHOD SetPitchRange(const nsString& aPitchRange) { return _to##SetPitchRange(aPitchRange); } \ + NS_IMETHOD GetPlayDuring(nsString& aPlayDuring) { return _to##GetPlayDuring(aPlayDuring); } \ + NS_IMETHOD SetPlayDuring(const nsString& aPlayDuring) { return _to##SetPlayDuring(aPlayDuring); } \ + NS_IMETHOD GetPosition(nsString& aPosition) { return _to##GetPosition(aPosition); } \ + NS_IMETHOD SetPosition(const nsString& aPosition) { return _to##SetPosition(aPosition); } \ + NS_IMETHOD GetQuotes(nsString& aQuotes) { return _to##GetQuotes(aQuotes); } \ + NS_IMETHOD SetQuotes(const nsString& aQuotes) { return _to##SetQuotes(aQuotes); } \ + NS_IMETHOD GetRichness(nsString& aRichness) { return _to##GetRichness(aRichness); } \ + NS_IMETHOD SetRichness(const nsString& aRichness) { return _to##SetRichness(aRichness); } \ + NS_IMETHOD GetRight(nsString& aRight) { return _to##GetRight(aRight); } \ + NS_IMETHOD SetRight(const nsString& aRight) { return _to##SetRight(aRight); } \ + NS_IMETHOD GetSize(nsString& aSize) { return _to##GetSize(aSize); } \ + NS_IMETHOD SetSize(const nsString& aSize) { return _to##SetSize(aSize); } \ + NS_IMETHOD GetSpeak(nsString& aSpeak) { return _to##GetSpeak(aSpeak); } \ + NS_IMETHOD SetSpeak(const nsString& aSpeak) { return _to##SetSpeak(aSpeak); } \ + NS_IMETHOD GetSpeakHeader(nsString& aSpeakHeader) { return _to##GetSpeakHeader(aSpeakHeader); } \ + NS_IMETHOD SetSpeakHeader(const nsString& aSpeakHeader) { return _to##SetSpeakHeader(aSpeakHeader); } \ + NS_IMETHOD GetSpeakNumeral(nsString& aSpeakNumeral) { return _to##GetSpeakNumeral(aSpeakNumeral); } \ + NS_IMETHOD SetSpeakNumeral(const nsString& aSpeakNumeral) { return _to##SetSpeakNumeral(aSpeakNumeral); } \ + NS_IMETHOD GetSpeakPunctuation(nsString& aSpeakPunctuation) { return _to##GetSpeakPunctuation(aSpeakPunctuation); } \ + NS_IMETHOD SetSpeakPunctuation(const nsString& aSpeakPunctuation) { return _to##SetSpeakPunctuation(aSpeakPunctuation); } \ + NS_IMETHOD GetSpeechRate(nsString& aSpeechRate) { return _to##GetSpeechRate(aSpeechRate); } \ + NS_IMETHOD SetSpeechRate(const nsString& aSpeechRate) { return _to##SetSpeechRate(aSpeechRate); } \ + NS_IMETHOD GetStress(nsString& aStress) { return _to##GetStress(aStress); } \ + NS_IMETHOD SetStress(const nsString& aStress) { return _to##SetStress(aStress); } \ + NS_IMETHOD GetTableLayout(nsString& aTableLayout) { return _to##GetTableLayout(aTableLayout); } \ + NS_IMETHOD SetTableLayout(const nsString& aTableLayout) { return _to##SetTableLayout(aTableLayout); } \ + NS_IMETHOD GetTextAlign(nsString& aTextAlign) { return _to##GetTextAlign(aTextAlign); } \ + NS_IMETHOD SetTextAlign(const nsString& aTextAlign) { return _to##SetTextAlign(aTextAlign); } \ + NS_IMETHOD GetTextDecoration(nsString& aTextDecoration) { return _to##GetTextDecoration(aTextDecoration); } \ + NS_IMETHOD SetTextDecoration(const nsString& aTextDecoration) { return _to##SetTextDecoration(aTextDecoration); } \ + NS_IMETHOD GetTextIndent(nsString& aTextIndent) { return _to##GetTextIndent(aTextIndent); } \ + NS_IMETHOD SetTextIndent(const nsString& aTextIndent) { return _to##SetTextIndent(aTextIndent); } \ + NS_IMETHOD GetTextShadow(nsString& aTextShadow) { return _to##GetTextShadow(aTextShadow); } \ + NS_IMETHOD SetTextShadow(const nsString& aTextShadow) { return _to##SetTextShadow(aTextShadow); } \ + NS_IMETHOD GetTextTransform(nsString& aTextTransform) { return _to##GetTextTransform(aTextTransform); } \ + NS_IMETHOD SetTextTransform(const nsString& aTextTransform) { return _to##SetTextTransform(aTextTransform); } \ + NS_IMETHOD GetTop(nsString& aTop) { return _to##GetTop(aTop); } \ + NS_IMETHOD SetTop(const nsString& aTop) { return _to##SetTop(aTop); } \ + NS_IMETHOD GetUnicodeBidi(nsString& aUnicodeBidi) { return _to##GetUnicodeBidi(aUnicodeBidi); } \ + NS_IMETHOD SetUnicodeBidi(const nsString& aUnicodeBidi) { return _to##SetUnicodeBidi(aUnicodeBidi); } \ + NS_IMETHOD GetVerticalAlign(nsString& aVerticalAlign) { return _to##GetVerticalAlign(aVerticalAlign); } \ + NS_IMETHOD SetVerticalAlign(const nsString& aVerticalAlign) { return _to##SetVerticalAlign(aVerticalAlign); } \ + NS_IMETHOD GetVisibility(nsString& aVisibility) { return _to##GetVisibility(aVisibility); } \ + NS_IMETHOD SetVisibility(const nsString& aVisibility) { return _to##SetVisibility(aVisibility); } \ + NS_IMETHOD GetVoiceFamily(nsString& aVoiceFamily) { return _to##GetVoiceFamily(aVoiceFamily); } \ + NS_IMETHOD SetVoiceFamily(const nsString& aVoiceFamily) { return _to##SetVoiceFamily(aVoiceFamily); } \ + NS_IMETHOD GetVolume(nsString& aVolume) { return _to##GetVolume(aVolume); } \ + NS_IMETHOD SetVolume(const nsString& aVolume) { return _to##SetVolume(aVolume); } \ + NS_IMETHOD GetWhiteSpace(nsString& aWhiteSpace) { return _to##GetWhiteSpace(aWhiteSpace); } \ + NS_IMETHOD SetWhiteSpace(const nsString& aWhiteSpace) { return _to##SetWhiteSpace(aWhiteSpace); } \ + NS_IMETHOD GetWidows(nsString& aWidows) { return _to##GetWidows(aWidows); } \ + NS_IMETHOD SetWidows(const nsString& aWidows) { return _to##SetWidows(aWidows); } \ + NS_IMETHOD GetWidth(nsString& aWidth) { return _to##GetWidth(aWidth); } \ + NS_IMETHOD SetWidth(const nsString& aWidth) { return _to##SetWidth(aWidth); } \ + NS_IMETHOD GetWordSpacing(nsString& aWordSpacing) { return _to##GetWordSpacing(aWordSpacing); } \ + NS_IMETHOD SetWordSpacing(const nsString& aWordSpacing) { return _to##SetWordSpacing(aWordSpacing); } \ + NS_IMETHOD GetZIndex(nsString& aZIndex) { return _to##GetZIndex(aZIndex); } \ + NS_IMETHOD SetZIndex(const nsString& aZIndex) { return _to##SetZIndex(aZIndex); } \ + NS_IMETHOD GetPropertyValue(const nsString& aPropertyName, nsString& aReturn) { return _to##GetPropertyValue(aPropertyName, aReturn); } \ + NS_IMETHOD GetPropertyPriority(const nsString& aPropertyName, nsString& aReturn) { return _to##GetPropertyPriority(aPropertyName, aReturn); } \ + NS_IMETHOD SetProperty(const nsString& aPropertyName, const nsString& aValue, const nsString& aPriority) { return _to##SetProperty(aPropertyName, aValue, aPriority); } \ + NS_IMETHOD Item(PRUint32 aIndex, nsString& aReturn) { return _to##Item(aIndex, aReturn); } \ + + +extern nsresult NS_InitCSSStyleDeclarationClass(nsIScriptContext *aContext, void **aPrototype); + +extern "C" NS_DOM nsresult NS_NewScriptCSSStyleDeclaration(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); + +#endif // nsIDOMCSSStyleDeclaration_h__ diff --git a/dom/public/css/nsIDOMCSSStyleRule.h b/dom/public/css/nsIDOMCSSStyleRule.h new file mode 100644 index 000000000000..688efe76a82d --- /dev/null +++ b/dom/public/css/nsIDOMCSSStyleRule.h @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#ifndef nsIDOMCSSStyleRule_h__ +#define nsIDOMCSSStyleRule_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" + + +#define NS_IDOMCSSSTYLERULE_IID \ +{ 0x6f765336, 0xee43, 0x11d1, \ + { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + +class nsIDOMCSSStyleRule : public nsISupports { +public: + + NS_IMETHOD GetType(nsString& aType)=0; +}; + + +#define NS_DECL_IDOMCSSSTYLERULE \ + NS_IMETHOD GetType(nsString& aType); \ + + + +#define NS_FORWARD_IDOMCSSSTYLERULE(_to) \ + NS_IMETHOD GetType(nsString& aType) { return _to##GetType(aType); } \ + + +extern nsresult NS_InitCSSStyleRuleClass(nsIScriptContext *aContext, void **aPrototype); + +extern "C" NS_DOM nsresult NS_NewScriptCSSStyleRule(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); + +#endif // nsIDOMCSSStyleRule_h__ diff --git a/dom/public/css/nsIDOMCSSStyleRuleCollection.h b/dom/public/css/nsIDOMCSSStyleRuleCollection.h new file mode 100644 index 000000000000..369b7e0c9a04 --- /dev/null +++ b/dom/public/css/nsIDOMCSSStyleRuleCollection.h @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#ifndef nsIDOMCSSStyleRuleCollection_h__ +#define nsIDOMCSSStyleRuleCollection_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" + +class nsIDOMCSSStyleRule; + +#define NS_IDOMCSSSTYLERULECOLLECTION_IID \ +{ 0x6f765337, 0xee43, 0x11d1, \ + { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + +class nsIDOMCSSStyleRuleCollection : public nsISupports { +public: + + NS_IMETHOD GetLength(PRUint32* aLength)=0; + + NS_IMETHOD Item(PRUint32 aIndex, nsIDOMCSSStyleRule** aReturn)=0; +}; + + +#define NS_DECL_IDOMCSSSTYLERULECOLLECTION \ + NS_IMETHOD GetLength(PRUint32* aLength); \ + NS_IMETHOD Item(PRUint32 aIndex, nsIDOMCSSStyleRule** aReturn); \ + + + +#define NS_FORWARD_IDOMCSSSTYLERULECOLLECTION(_to) \ + NS_IMETHOD GetLength(PRUint32* aLength) { return _to##GetLength(aLength); } \ + NS_IMETHOD Item(PRUint32 aIndex, nsIDOMCSSStyleRule** aReturn) { return _to##Item(aIndex, aReturn); } \ + + +extern nsresult NS_InitCSSStyleRuleCollectionClass(nsIScriptContext *aContext, void **aPrototype); + +extern "C" NS_DOM nsresult NS_NewScriptCSSStyleRuleCollection(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); + +#endif // nsIDOMCSSStyleRuleCollection_h__ diff --git a/dom/public/css/nsIDOMCSSStyleRuleSimple.h b/dom/public/css/nsIDOMCSSStyleRuleSimple.h new file mode 100644 index 000000000000..c39e1bcb91ce --- /dev/null +++ b/dom/public/css/nsIDOMCSSStyleRuleSimple.h @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#ifndef nsIDOMCSSStyleRuleSimple_h__ +#define nsIDOMCSSStyleRuleSimple_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" +#include "nsIDOMCSSStyleRule.h" + +class nsIDOMCSSStyleDeclaration; + +#define NS_IDOMCSSSTYLERULESIMPLE_IID \ +{ 0x6f765338, 0xee43, 0x11d1, \ + { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + +class nsIDOMCSSStyleRuleSimple : public nsIDOMCSSStyleRule { +public: + + NS_IMETHOD GetSelectorText(nsString& aSelectorText)=0; + NS_IMETHOD SetSelectorText(const nsString& aSelectorText)=0; + + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle)=0; + NS_IMETHOD SetStyle(nsIDOMCSSStyleDeclaration* aStyle)=0; +}; + + +#define NS_DECL_IDOMCSSSTYLERULESIMPLE \ + NS_IMETHOD GetSelectorText(nsString& aSelectorText); \ + NS_IMETHOD SetSelectorText(const nsString& aSelectorText); \ + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle); \ + NS_IMETHOD SetStyle(nsIDOMCSSStyleDeclaration* aStyle); \ + + + +#define NS_FORWARD_IDOMCSSSTYLERULESIMPLE(_to) \ + NS_IMETHOD GetSelectorText(nsString& aSelectorText) { return _to##GetSelectorText(aSelectorText); } \ + NS_IMETHOD SetSelectorText(const nsString& aSelectorText) { return _to##SetSelectorText(aSelectorText); } \ + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle) { return _to##GetStyle(aStyle); } \ + NS_IMETHOD SetStyle(nsIDOMCSSStyleDeclaration* aStyle) { return _to##SetStyle(aStyle); } \ + + +extern nsresult NS_InitCSSStyleRuleSimpleClass(nsIScriptContext *aContext, void **aPrototype); + +extern "C" NS_DOM nsresult NS_NewScriptCSSStyleRuleSimple(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); + +#endif // nsIDOMCSSStyleRuleSimple_h__ diff --git a/dom/public/css/nsIDOMCSSStyleSheet.h b/dom/public/css/nsIDOMCSSStyleSheet.h new file mode 100644 index 000000000000..88bd78f9e1dc --- /dev/null +++ b/dom/public/css/nsIDOMCSSStyleSheet.h @@ -0,0 +1,93 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#ifndef nsIDOMCSSStyleSheet_h__ +#define nsIDOMCSSStyleSheet_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" +#include "nsIDOMStyleSheet.h" + +class nsIDOMHTMLElement; +class nsIDOMStyleSheetCollection; +class nsIDOMCSSStyleRuleCollection; +class nsIDOMCSSStyleSheet; + +#define NS_IDOMCSSSTYLESHEET_IID \ +{ 0x6f765339, 0xee43, 0x11d1, \ + { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + +class nsIDOMCSSStyleSheet : public nsIDOMStyleSheet { +public: + + NS_IMETHOD GetOwningElement(nsIDOMHTMLElement** aOwningElement)=0; + + NS_IMETHOD GetParentStyleSheet(nsIDOMCSSStyleSheet** aParentStyleSheet)=0; + + NS_IMETHOD GetHref(nsString& aHref)=0; + + NS_IMETHOD GetTitle(nsString& aTitle)=0; + + NS_IMETHOD GetImports(nsIDOMStyleSheetCollection** aImports)=0; + + NS_IMETHOD GetRules(nsIDOMCSSStyleRuleCollection** aRules)=0; + + NS_IMETHOD AddRule(const nsString& aSelector, const nsString& aDeclaration, PRUint32 aIndex, PRUint32* aReturn)=0; + + NS_IMETHOD AddImport(const nsString& aUrl, PRUint32 aIndex, PRUint32* aReturn)=0; + + NS_IMETHOD RemoveRule(PRUint32 aIndex)=0; + + NS_IMETHOD RemoveImport(PRUint32 aIndex)=0; +}; + + +#define NS_DECL_IDOMCSSSTYLESHEET \ + NS_IMETHOD GetOwningElement(nsIDOMHTMLElement** aOwningElement); \ + NS_IMETHOD GetParentStyleSheet(nsIDOMCSSStyleSheet** aParentStyleSheet); \ + NS_IMETHOD GetHref(nsString& aHref); \ + NS_IMETHOD GetTitle(nsString& aTitle); \ + NS_IMETHOD GetImports(nsIDOMStyleSheetCollection** aImports); \ + NS_IMETHOD GetRules(nsIDOMCSSStyleRuleCollection** aRules); \ + NS_IMETHOD AddRule(const nsString& aSelector, const nsString& aDeclaration, PRUint32 aIndex, PRUint32* aReturn); \ + NS_IMETHOD AddImport(const nsString& aUrl, PRUint32 aIndex, PRUint32* aReturn); \ + NS_IMETHOD RemoveRule(PRUint32 aIndex); \ + NS_IMETHOD RemoveImport(PRUint32 aIndex); \ + + + +#define NS_FORWARD_IDOMCSSSTYLESHEET(_to) \ + NS_IMETHOD GetOwningElement(nsIDOMHTMLElement** aOwningElement) { return _to##GetOwningElement(aOwningElement); } \ + NS_IMETHOD GetParentStyleSheet(nsIDOMCSSStyleSheet** aParentStyleSheet) { return _to##GetParentStyleSheet(aParentStyleSheet); } \ + NS_IMETHOD GetHref(nsString& aHref) { return _to##GetHref(aHref); } \ + NS_IMETHOD GetTitle(nsString& aTitle) { return _to##GetTitle(aTitle); } \ + NS_IMETHOD GetImports(nsIDOMStyleSheetCollection** aImports) { return _to##GetImports(aImports); } \ + NS_IMETHOD GetRules(nsIDOMCSSStyleRuleCollection** aRules) { return _to##GetRules(aRules); } \ + NS_IMETHOD AddRule(const nsString& aSelector, const nsString& aDeclaration, PRUint32 aIndex, PRUint32* aReturn) { return _to##AddRule(aSelector, aDeclaration, aIndex, aReturn); } \ + NS_IMETHOD AddImport(const nsString& aUrl, PRUint32 aIndex, PRUint32* aReturn) { return _to##AddImport(aUrl, aIndex, aReturn); } \ + NS_IMETHOD RemoveRule(PRUint32 aIndex) { return _to##RemoveRule(aIndex); } \ + NS_IMETHOD RemoveImport(PRUint32 aIndex) { return _to##RemoveImport(aIndex); } \ + + +extern nsresult NS_InitCSSStyleSheetClass(nsIScriptContext *aContext, void **aPrototype); + +extern "C" NS_DOM nsresult NS_NewScriptCSSStyleSheet(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); + +#endif // nsIDOMCSSStyleSheet_h__ diff --git a/dom/public/html/nsIDOMHTMLAnchorElement.h b/dom/public/html/nsIDOMHTMLAnchorElement.h index 17a0c65cd803..769430ff370a 100644 --- a/dom/public/html/nsIDOMHTMLAnchorElement.h +++ b/dom/public/html/nsIDOMHTMLAnchorElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLANCHORELEMENT_IID \ -{ 0x6f7652ef, 0xee43, 0x11d1, \ +{ 0x6f7652f1, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLAnchorElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLAppletElement.h b/dom/public/html/nsIDOMHTMLAppletElement.h index 9d837e5f1149..641e11447cda 100644 --- a/dom/public/html/nsIDOMHTMLAppletElement.h +++ b/dom/public/html/nsIDOMHTMLAppletElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLAPPLETELEMENT_IID \ -{ 0x6f7652f0, 0xee43, 0x11d1, \ +{ 0x6f7652f2, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLAppletElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLAreaElement.h b/dom/public/html/nsIDOMHTMLAreaElement.h index 573a96a335f4..c91368f85aa6 100644 --- a/dom/public/html/nsIDOMHTMLAreaElement.h +++ b/dom/public/html/nsIDOMHTMLAreaElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLAREAELEMENT_IID \ -{ 0x6f7652f1, 0xee43, 0x11d1, \ +{ 0x6f7652f3, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLAreaElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLBRElement.h b/dom/public/html/nsIDOMHTMLBRElement.h index 5bb48ccfcb33..5bccf93f4509 100644 --- a/dom/public/html/nsIDOMHTMLBRElement.h +++ b/dom/public/html/nsIDOMHTMLBRElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLBRELEMENT_IID \ -{ 0x6f7652f5, 0xee43, 0x11d1, \ +{ 0x6f7652f7, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLBRElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLBaseElement.h b/dom/public/html/nsIDOMHTMLBaseElement.h index 4786bda80398..06e4e016f61b 100644 --- a/dom/public/html/nsIDOMHTMLBaseElement.h +++ b/dom/public/html/nsIDOMHTMLBaseElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLBASEELEMENT_IID \ -{ 0x6f7652f2, 0xee43, 0x11d1, \ +{ 0x6f7652f4, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLBaseElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLBaseFontElement.h b/dom/public/html/nsIDOMHTMLBaseFontElement.h index 9d1f78c27771..4b65dfd21b96 100644 --- a/dom/public/html/nsIDOMHTMLBaseFontElement.h +++ b/dom/public/html/nsIDOMHTMLBaseFontElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLBASEFONTELEMENT_IID \ -{ 0x6f7652f3, 0xee43, 0x11d1, \ +{ 0x6f7652f5, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLBaseFontElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLBodyElement.h b/dom/public/html/nsIDOMHTMLBodyElement.h index b85955cd8d71..5ca9e8b9cd01 100644 --- a/dom/public/html/nsIDOMHTMLBodyElement.h +++ b/dom/public/html/nsIDOMHTMLBodyElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLBODYELEMENT_IID \ -{ 0x6f7652f4, 0xee43, 0x11d1, \ +{ 0x6f7652f6, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLBodyElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLButtonElement.h b/dom/public/html/nsIDOMHTMLButtonElement.h index 12f225202972..f2bf9b3a15dd 100644 --- a/dom/public/html/nsIDOMHTMLButtonElement.h +++ b/dom/public/html/nsIDOMHTMLButtonElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLBUTTONELEMENT_IID \ -{ 0x6f7652f6, 0xee43, 0x11d1, \ +{ 0x6f7652f8, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLButtonElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLCollection.h b/dom/public/html/nsIDOMHTMLCollection.h index 2ac31060fc5a..1c9d39d2e566 100644 --- a/dom/public/html/nsIDOMHTMLCollection.h +++ b/dom/public/html/nsIDOMHTMLCollection.h @@ -27,7 +27,7 @@ class nsIDOMNode; #define NS_IDOMHTMLCOLLECTION_IID \ -{ 0x6f7652f7, 0xee43, 0x11d1, \ +{ 0x6f7652f9, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLCollection : public nsISupports { diff --git a/dom/public/html/nsIDOMHTMLDListElement.h b/dom/public/html/nsIDOMHTMLDListElement.h index 85450289de74..5b24aa7d9001 100644 --- a/dom/public/html/nsIDOMHTMLDListElement.h +++ b/dom/public/html/nsIDOMHTMLDListElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLDLISTELEMENT_IID \ -{ 0x6f7652fb, 0xee43, 0x11d1, \ +{ 0x6f7652fd, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLDListElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLDelElement.h b/dom/public/html/nsIDOMHTMLDelElement.h index dc06752da37d..1b38c788e681 100644 --- a/dom/public/html/nsIDOMHTMLDelElement.h +++ b/dom/public/html/nsIDOMHTMLDelElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLDELELEMENT_IID \ -{ 0x6f7652f8, 0xee43, 0x11d1, \ +{ 0x6f7652fa, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLDelElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLDirectoryElement.h b/dom/public/html/nsIDOMHTMLDirectoryElement.h index bca0281b005c..ff58c9fa14d2 100644 --- a/dom/public/html/nsIDOMHTMLDirectoryElement.h +++ b/dom/public/html/nsIDOMHTMLDirectoryElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLDIRECTORYELEMENT_IID \ -{ 0x6f7652f9, 0xee43, 0x11d1, \ +{ 0x6f7652fb, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLDirectoryElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLDivElement.h b/dom/public/html/nsIDOMHTMLDivElement.h index a28200f302c7..165aa1b5450e 100644 --- a/dom/public/html/nsIDOMHTMLDivElement.h +++ b/dom/public/html/nsIDOMHTMLDivElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLDIVELEMENT_IID \ -{ 0x6f7652fa, 0xee43, 0x11d1, \ +{ 0x6f7652fc, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLDivElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLDocument.h b/dom/public/html/nsIDOMHTMLDocument.h index 1ebfa7772be8..af48a56ada4a 100644 --- a/dom/public/html/nsIDOMHTMLDocument.h +++ b/dom/public/html/nsIDOMHTMLDocument.h @@ -32,7 +32,7 @@ class nsIDOMHTMLCollection; class nsIDOMNodeList; #define NS_IDOMHTMLDOCUMENT_IID \ -{ 0x6f7652fc, 0xee43, 0x11d1, \ +{ 0x6f7652fe, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLDocument : public nsIDOMDocument { diff --git a/dom/public/html/nsIDOMHTMLElement.h b/dom/public/html/nsIDOMHTMLElement.h index 3f29cb36e4ba..c7daaafdbc21 100644 --- a/dom/public/html/nsIDOMHTMLElement.h +++ b/dom/public/html/nsIDOMHTMLElement.h @@ -25,9 +25,10 @@ #include "nsIScriptContext.h" #include "nsIDOMElement.h" +class nsIDOMCSSStyleDeclaration; #define NS_IDOMHTMLELEMENT_IID \ -{ 0x6f7652fd, 0xee43, 0x11d1, \ +{ 0x6f7652ff, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLElement : public nsIDOMElement { @@ -47,6 +48,8 @@ public: NS_IMETHOD GetClassName(nsString& aClassName)=0; NS_IMETHOD SetClassName(const nsString& aClassName)=0; + + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle)=0; }; @@ -61,6 +64,7 @@ public: NS_IMETHOD SetDir(const nsString& aDir); \ NS_IMETHOD GetClassName(nsString& aClassName); \ NS_IMETHOD SetClassName(const nsString& aClassName); \ + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle); \ @@ -75,6 +79,7 @@ public: NS_IMETHOD SetDir(const nsString& aDir) { return _to##SetDir(aDir); } \ NS_IMETHOD GetClassName(nsString& aClassName) { return _to##GetClassName(aClassName); } \ NS_IMETHOD SetClassName(const nsString& aClassName) { return _to##SetClassName(aClassName); } \ + NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle) { return _to##GetStyle(aStyle); } \ extern nsresult NS_InitHTMLElementClass(nsIScriptContext *aContext, void **aPrototype); diff --git a/dom/public/html/nsIDOMHTMLFontElement.h b/dom/public/html/nsIDOMHTMLFontElement.h index db96bb0a8d41..914e0ad6372a 100644 --- a/dom/public/html/nsIDOMHTMLFontElement.h +++ b/dom/public/html/nsIDOMHTMLFontElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLFONTELEMENT_IID \ -{ 0x6f7652fe, 0xee43, 0x11d1, \ +{ 0x6f765300, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLFontElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLFormElement.h b/dom/public/html/nsIDOMHTMLFormElement.h index 596da56f5a08..21ac1903a785 100644 --- a/dom/public/html/nsIDOMHTMLFormElement.h +++ b/dom/public/html/nsIDOMHTMLFormElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLCollection; #define NS_IDOMHTMLFORMELEMENT_IID \ -{ 0x6f7652ff, 0xee43, 0x11d1, \ +{ 0x6f765301, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLFormElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLFrameElement.h b/dom/public/html/nsIDOMHTMLFrameElement.h index ed413827a7a2..50d58c149607 100644 --- a/dom/public/html/nsIDOMHTMLFrameElement.h +++ b/dom/public/html/nsIDOMHTMLFrameElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLFRAMEELEMENT_IID \ -{ 0x6f765300, 0xee43, 0x11d1, \ +{ 0x6f765302, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLFrameElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLFrameSetElement.h b/dom/public/html/nsIDOMHTMLFrameSetElement.h index 50d1b91e0334..9cb916345228 100644 --- a/dom/public/html/nsIDOMHTMLFrameSetElement.h +++ b/dom/public/html/nsIDOMHTMLFrameSetElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLFRAMESETELEMENT_IID \ -{ 0x6f765301, 0xee43, 0x11d1, \ +{ 0x6f765303, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLFrameSetElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLHRElement.h b/dom/public/html/nsIDOMHTMLHRElement.h index 14125c29b13e..489d3a00e450 100644 --- a/dom/public/html/nsIDOMHTMLHRElement.h +++ b/dom/public/html/nsIDOMHTMLHRElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLHRELEMENT_IID \ -{ 0x6f765304, 0xee43, 0x11d1, \ +{ 0x6f765306, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLHRElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLHeadElement.h b/dom/public/html/nsIDOMHTMLHeadElement.h index 46f0e27b1c92..819637506ebc 100644 --- a/dom/public/html/nsIDOMHTMLHeadElement.h +++ b/dom/public/html/nsIDOMHTMLHeadElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLHEADELEMENT_IID \ -{ 0x6f765302, 0xee43, 0x11d1, \ +{ 0x6f765304, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLHeadElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLHeadingElement.h b/dom/public/html/nsIDOMHTMLHeadingElement.h index fdc79d967327..23cbaec1195c 100644 --- a/dom/public/html/nsIDOMHTMLHeadingElement.h +++ b/dom/public/html/nsIDOMHTMLHeadingElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLHEADINGELEMENT_IID \ -{ 0x6f765303, 0xee43, 0x11d1, \ +{ 0x6f765305, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLHeadingElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLHtmlElement.h b/dom/public/html/nsIDOMHTMLHtmlElement.h index c70ee3abbb5d..013f2f320b3e 100644 --- a/dom/public/html/nsIDOMHTMLHtmlElement.h +++ b/dom/public/html/nsIDOMHTMLHtmlElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLHTMLELEMENT_IID \ -{ 0x6f765305, 0xee43, 0x11d1, \ +{ 0x6f765307, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLHtmlElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLIFrameElement.h b/dom/public/html/nsIDOMHTMLIFrameElement.h index 436ae6794747..92f9e9b83b92 100644 --- a/dom/public/html/nsIDOMHTMLIFrameElement.h +++ b/dom/public/html/nsIDOMHTMLIFrameElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLIFRAMEELEMENT_IID \ -{ 0x6f765306, 0xee43, 0x11d1, \ +{ 0x6f765308, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLIFrameElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLImageElement.h b/dom/public/html/nsIDOMHTMLImageElement.h index fc08f3a60274..c488e31a8214 100644 --- a/dom/public/html/nsIDOMHTMLImageElement.h +++ b/dom/public/html/nsIDOMHTMLImageElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLIMAGEELEMENT_IID \ -{ 0x6f765307, 0xee43, 0x11d1, \ +{ 0x6f765309, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLImageElement : public nsIDOMHTMLElement { @@ -134,7 +134,7 @@ public: #define NS_IDOMHTMLIMAGEELEMENTFACTORY_IID \ -{ 0x6f765308, 0xee43, 0x11d1, \ +{ 0x6f76530a, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLImageElementFactory : public nsISupports { diff --git a/dom/public/html/nsIDOMHTMLInputElement.h b/dom/public/html/nsIDOMHTMLInputElement.h index 24abc973211b..1711f9c5e66c 100644 --- a/dom/public/html/nsIDOMHTMLInputElement.h +++ b/dom/public/html/nsIDOMHTMLInputElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLINPUTELEMENT_IID \ -{ 0x6f765309, 0xee43, 0x11d1, \ +{ 0x6f76530b, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLInputElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLInsElement.h b/dom/public/html/nsIDOMHTMLInsElement.h index 19d1e57652ea..b047ef2fd793 100644 --- a/dom/public/html/nsIDOMHTMLInsElement.h +++ b/dom/public/html/nsIDOMHTMLInsElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLINSELEMENT_IID \ -{ 0x6f76530a, 0xee43, 0x11d1, \ +{ 0x6f76530c, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLInsElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLIsIndexElement.h b/dom/public/html/nsIDOMHTMLIsIndexElement.h index cd77896bc753..28407746d3e3 100644 --- a/dom/public/html/nsIDOMHTMLIsIndexElement.h +++ b/dom/public/html/nsIDOMHTMLIsIndexElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLISINDEXELEMENT_IID \ -{ 0x6f76530b, 0xee43, 0x11d1, \ +{ 0x6f76530d, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLIsIndexElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLLIElement.h b/dom/public/html/nsIDOMHTMLLIElement.h index 1de4d1bcbf5a..e4de11fbbb7a 100644 --- a/dom/public/html/nsIDOMHTMLLIElement.h +++ b/dom/public/html/nsIDOMHTMLLIElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLLIELEMENT_IID \ -{ 0x6f76530e, 0xee43, 0x11d1, \ +{ 0x6f765310, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLLIElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLLabelElement.h b/dom/public/html/nsIDOMHTMLLabelElement.h index 98cf62126eff..f9c5505457d8 100644 --- a/dom/public/html/nsIDOMHTMLLabelElement.h +++ b/dom/public/html/nsIDOMHTMLLabelElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLLABELELEMENT_IID \ -{ 0x6f76530c, 0xee43, 0x11d1, \ +{ 0x6f76530e, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLLabelElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLLegendElement.h b/dom/public/html/nsIDOMHTMLLegendElement.h index 6f0a3b3c765b..4289bb4144f0 100644 --- a/dom/public/html/nsIDOMHTMLLegendElement.h +++ b/dom/public/html/nsIDOMHTMLLegendElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLLEGENDELEMENT_IID \ -{ 0x6f76530d, 0xee43, 0x11d1, \ +{ 0x6f76530f, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLLegendElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLLinkElement.h b/dom/public/html/nsIDOMHTMLLinkElement.h index e0ef809b206d..4cc8ae6cd8a6 100644 --- a/dom/public/html/nsIDOMHTMLLinkElement.h +++ b/dom/public/html/nsIDOMHTMLLinkElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLLINKELEMENT_IID \ -{ 0x6f76530f, 0xee43, 0x11d1, \ +{ 0x6f765311, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLLinkElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLMapElement.h b/dom/public/html/nsIDOMHTMLMapElement.h index c4869732450e..864c103ef1fa 100644 --- a/dom/public/html/nsIDOMHTMLMapElement.h +++ b/dom/public/html/nsIDOMHTMLMapElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLCollection; #define NS_IDOMHTMLMAPELEMENT_IID \ -{ 0x6f765310, 0xee43, 0x11d1, \ +{ 0x6f765312, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLMapElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLMenuElement.h b/dom/public/html/nsIDOMHTMLMenuElement.h index ba1a4c5b584c..21337fce0bf6 100644 --- a/dom/public/html/nsIDOMHTMLMenuElement.h +++ b/dom/public/html/nsIDOMHTMLMenuElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLMENUELEMENT_IID \ -{ 0x6f765311, 0xee43, 0x11d1, \ +{ 0x6f765313, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLMenuElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLMetaElement.h b/dom/public/html/nsIDOMHTMLMetaElement.h index 2100e94fb344..ed2025c7fa59 100644 --- a/dom/public/html/nsIDOMHTMLMetaElement.h +++ b/dom/public/html/nsIDOMHTMLMetaElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLMETAELEMENT_IID \ -{ 0x6f765312, 0xee43, 0x11d1, \ +{ 0x6f765314, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLMetaElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLModElement.h b/dom/public/html/nsIDOMHTMLModElement.h index 0767a9c32399..a3ea503d6daa 100644 --- a/dom/public/html/nsIDOMHTMLModElement.h +++ b/dom/public/html/nsIDOMHTMLModElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLMODELEMENT_IID \ -{ 0x6f765313, 0xee43, 0x11d1, \ +{ 0x6f765315, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLModElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLOListElement.h b/dom/public/html/nsIDOMHTMLOListElement.h index a99838815c29..460bbe69807a 100644 --- a/dom/public/html/nsIDOMHTMLOListElement.h +++ b/dom/public/html/nsIDOMHTMLOListElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLOLISTELEMENT_IID \ -{ 0x6f765315, 0xee43, 0x11d1, \ +{ 0x6f765317, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLOListElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLObjectElement.h b/dom/public/html/nsIDOMHTMLObjectElement.h index 1d0e0e2a56be..71f81ec5d4dd 100644 --- a/dom/public/html/nsIDOMHTMLObjectElement.h +++ b/dom/public/html/nsIDOMHTMLObjectElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLOBJECTELEMENT_IID \ -{ 0x6f765314, 0xee43, 0x11d1, \ +{ 0x6f765316, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLObjectElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLOptGroupElement.h b/dom/public/html/nsIDOMHTMLOptGroupElement.h index 3e6c38ec6b50..98a15fbbc96f 100644 --- a/dom/public/html/nsIDOMHTMLOptGroupElement.h +++ b/dom/public/html/nsIDOMHTMLOptGroupElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLOPTGROUPELEMENT_IID \ -{ 0x6f765316, 0xee43, 0x11d1, \ +{ 0x6f765318, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLOptGroupElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLOptionElement.h b/dom/public/html/nsIDOMHTMLOptionElement.h index 1e07ab9184f4..e32de28b5a8b 100644 --- a/dom/public/html/nsIDOMHTMLOptionElement.h +++ b/dom/public/html/nsIDOMHTMLOptionElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLOPTIONELEMENT_IID \ -{ 0x6f765317, 0xee43, 0x11d1, \ +{ 0x6f765319, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLOptionElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLParagraphElement.h b/dom/public/html/nsIDOMHTMLParagraphElement.h index 5fac9e013947..ebcd180fa443 100644 --- a/dom/public/html/nsIDOMHTMLParagraphElement.h +++ b/dom/public/html/nsIDOMHTMLParagraphElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLPARAGRAPHELEMENT_IID \ -{ 0x6f765318, 0xee43, 0x11d1, \ +{ 0x6f76531a, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLParagraphElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLParamElement.h b/dom/public/html/nsIDOMHTMLParamElement.h index ab631369ecda..f7585f5d59ca 100644 --- a/dom/public/html/nsIDOMHTMLParamElement.h +++ b/dom/public/html/nsIDOMHTMLParamElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLPARAMELEMENT_IID \ -{ 0x6f765319, 0xee43, 0x11d1, \ +{ 0x6f76531b, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLParamElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLPreElement.h b/dom/public/html/nsIDOMHTMLPreElement.h index a66c4d29cdff..7eac0a60419c 100644 --- a/dom/public/html/nsIDOMHTMLPreElement.h +++ b/dom/public/html/nsIDOMHTMLPreElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLPREELEMENT_IID \ -{ 0x6f76531a, 0xee43, 0x11d1, \ +{ 0x6f76531c, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLPreElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLQuoteElement.h b/dom/public/html/nsIDOMHTMLQuoteElement.h index 0a6040de74ff..76a463f73553 100644 --- a/dom/public/html/nsIDOMHTMLQuoteElement.h +++ b/dom/public/html/nsIDOMHTMLQuoteElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLQUOTEELEMENT_IID \ -{ 0x6f76531b, 0xee43, 0x11d1, \ +{ 0x6f76531d, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLQuoteElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLScriptElement.h b/dom/public/html/nsIDOMHTMLScriptElement.h index cab37461f597..e367fa414638 100644 --- a/dom/public/html/nsIDOMHTMLScriptElement.h +++ b/dom/public/html/nsIDOMHTMLScriptElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLSCRIPTELEMENT_IID \ -{ 0x6f76531c, 0xee43, 0x11d1, \ +{ 0x6f76531e, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLScriptElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLSelectElement.h b/dom/public/html/nsIDOMHTMLSelectElement.h index 66ba1dddf35b..848d78f7907a 100644 --- a/dom/public/html/nsIDOMHTMLSelectElement.h +++ b/dom/public/html/nsIDOMHTMLSelectElement.h @@ -30,7 +30,7 @@ class nsIDOMHTMLFormElement; class nsIDOMHTMLCollection; #define NS_IDOMHTMLSELECTELEMENT_IID \ -{ 0x6f76531d, 0xee43, 0x11d1, \ +{ 0x6f76531f, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLSelectElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLStyleElement.h b/dom/public/html/nsIDOMHTMLStyleElement.h index f5581933906e..b7e1e437e2c3 100644 --- a/dom/public/html/nsIDOMHTMLStyleElement.h +++ b/dom/public/html/nsIDOMHTMLStyleElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLSTYLEELEMENT_IID \ -{ 0x6f76531e, 0xee43, 0x11d1, \ +{ 0x6f765320, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLStyleElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLTableCaptionElement.h b/dom/public/html/nsIDOMHTMLTableCaptionElement.h index eea564e13881..3705a4c0a011 100644 --- a/dom/public/html/nsIDOMHTMLTableCaptionElement.h +++ b/dom/public/html/nsIDOMHTMLTableCaptionElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLTABLECAPTIONELEMENT_IID \ -{ 0x6f76531f, 0xee43, 0x11d1, \ +{ 0x6f765321, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTableCaptionElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLTableCellElement.h b/dom/public/html/nsIDOMHTMLTableCellElement.h index 4d69daaa89e2..9c07ef0b4511 100644 --- a/dom/public/html/nsIDOMHTMLTableCellElement.h +++ b/dom/public/html/nsIDOMHTMLTableCellElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLTABLECELLELEMENT_IID \ -{ 0x6f765320, 0xee43, 0x11d1, \ +{ 0x6f765322, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTableCellElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLTableColElement.h b/dom/public/html/nsIDOMHTMLTableColElement.h index 45f099f42c1b..82580e6cfcea 100644 --- a/dom/public/html/nsIDOMHTMLTableColElement.h +++ b/dom/public/html/nsIDOMHTMLTableColElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLTABLECOLELEMENT_IID \ -{ 0x6f765321, 0xee43, 0x11d1, \ +{ 0x6f765323, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTableColElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLTableElement.h b/dom/public/html/nsIDOMHTMLTableElement.h index 53ab58a41b34..cb7bab9267fd 100644 --- a/dom/public/html/nsIDOMHTMLTableElement.h +++ b/dom/public/html/nsIDOMHTMLTableElement.h @@ -31,7 +31,7 @@ class nsIDOMHTMLTableSectionElement; class nsIDOMHTMLCollection; #define NS_IDOMHTMLTABLEELEMENT_IID \ -{ 0x6f765322, 0xee43, 0x11d1, \ +{ 0x6f765324, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTableElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLTableRowElement.h b/dom/public/html/nsIDOMHTMLTableRowElement.h index 6b5fecae585d..08d33ed19b0b 100644 --- a/dom/public/html/nsIDOMHTMLTableRowElement.h +++ b/dom/public/html/nsIDOMHTMLTableRowElement.h @@ -29,7 +29,7 @@ class nsIDOMHTMLElement; class nsIDOMHTMLCollection; #define NS_IDOMHTMLTABLEROWELEMENT_IID \ -{ 0x6f765323, 0xee43, 0x11d1, \ +{ 0x6f765325, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTableRowElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLTableSectionElement.h b/dom/public/html/nsIDOMHTMLTableSectionElement.h index 4599b9e505b4..ef7b1e926f35 100644 --- a/dom/public/html/nsIDOMHTMLTableSectionElement.h +++ b/dom/public/html/nsIDOMHTMLTableSectionElement.h @@ -29,7 +29,7 @@ class nsIDOMHTMLElement; class nsIDOMHTMLCollection; #define NS_IDOMHTMLTABLESECTIONELEMENT_IID \ -{ 0x6f765324, 0xee43, 0x11d1, \ +{ 0x6f765326, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTableSectionElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLTbodyElement.h b/dom/public/html/nsIDOMHTMLTbodyElement.h index f65d5eea30a5..64a86dd64704 100644 --- a/dom/public/html/nsIDOMHTMLTbodyElement.h +++ b/dom/public/html/nsIDOMHTMLTbodyElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLTBODYELEMENT_IID \ -{ 0x6f765325, 0xee43, 0x11d1, \ +{ 0x6f765327, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTbodyElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLTextAreaElement.h b/dom/public/html/nsIDOMHTMLTextAreaElement.h index 996d91f0cb66..9bce97e6a22f 100644 --- a/dom/public/html/nsIDOMHTMLTextAreaElement.h +++ b/dom/public/html/nsIDOMHTMLTextAreaElement.h @@ -28,7 +28,7 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLTEXTAREAELEMENT_IID \ -{ 0x6f765326, 0xee43, 0x11d1, \ +{ 0x6f765328, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTextAreaElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLTfootElement.h b/dom/public/html/nsIDOMHTMLTfootElement.h index f809d43f86ad..5c08c41d8e99 100644 --- a/dom/public/html/nsIDOMHTMLTfootElement.h +++ b/dom/public/html/nsIDOMHTMLTfootElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLTFOOTELEMENT_IID \ -{ 0x6f765327, 0xee43, 0x11d1, \ +{ 0x6f765329, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTfootElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLTheadElement.h b/dom/public/html/nsIDOMHTMLTheadElement.h index 315f6db4999a..3175ae98e097 100644 --- a/dom/public/html/nsIDOMHTMLTheadElement.h +++ b/dom/public/html/nsIDOMHTMLTheadElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLTHEADELEMENT_IID \ -{ 0x6f765328, 0xee43, 0x11d1, \ +{ 0x6f76532a, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTheadElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLTitleElement.h b/dom/public/html/nsIDOMHTMLTitleElement.h index e019c0223d41..6b279077f08b 100644 --- a/dom/public/html/nsIDOMHTMLTitleElement.h +++ b/dom/public/html/nsIDOMHTMLTitleElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLTITLEELEMENT_IID \ -{ 0x6f765329, 0xee43, 0x11d1, \ +{ 0x6f76532b, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLTitleElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMHTMLUListElement.h b/dom/public/html/nsIDOMHTMLUListElement.h index a4592f0384fa..c76559b7d879 100644 --- a/dom/public/html/nsIDOMHTMLUListElement.h +++ b/dom/public/html/nsIDOMHTMLUListElement.h @@ -27,7 +27,7 @@ #define NS_IDOMHTMLULISTELEMENT_IID \ -{ 0x6f76532a, 0xee43, 0x11d1, \ +{ 0x6f76532c, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMHTMLUListElement : public nsIDOMHTMLElement { diff --git a/dom/public/html/nsIDOMImage.h b/dom/public/html/nsIDOMImage.h index e810cc2c6ebb..a5f52e99c306 100644 --- a/dom/public/html/nsIDOMImage.h +++ b/dom/public/html/nsIDOMImage.h @@ -26,7 +26,7 @@ #define NS_IDOMIMAGE_IID \ -{ 0x6f76532b, 0xee43, 0x11d1, \ +{ 0x6f76532d, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMImage : public nsISupports { diff --git a/dom/public/html/nsIDOMNSHTMLDocument.h b/dom/public/html/nsIDOMNSHTMLDocument.h index 56cbb33ed59d..bd5861f5546c 100644 --- a/dom/public/html/nsIDOMNSHTMLDocument.h +++ b/dom/public/html/nsIDOMNSHTMLDocument.h @@ -28,7 +28,7 @@ class nsIDOMElement; class nsIDOMHTMLCollection; #define NS_IDOMNSHTMLDOCUMENT_IID \ -{ 0x6f76532c, 0xee43, 0x11d1, \ +{ 0x6f76532e, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMNSHTMLDocument : public nsISupports { diff --git a/dom/public/html/nsIDOMNSHTMLFormElement.h b/dom/public/html/nsIDOMNSHTMLFormElement.h index 850452c6f17c..236ee95e3233 100644 --- a/dom/public/html/nsIDOMNSHTMLFormElement.h +++ b/dom/public/html/nsIDOMNSHTMLFormElement.h @@ -27,7 +27,7 @@ class nsIDOMElement; #define NS_IDOMNSHTMLFORMELEMENT_IID \ -{ 0x6f76532d, 0xee43, 0x11d1, \ +{ 0x6f76532f, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMNSHTMLFormElement : public nsISupports { diff --git a/dom/public/idl/coreDom/makefile.win b/dom/public/idl/coreDom/makefile.win index 2775a68df436..0342e173ce4f 100644 --- a/dom/public/idl/coreDom/makefile.win +++ b/dom/public/idl/coreDom/makefile.win @@ -34,7 +34,9 @@ IDLSRCS = \ Node.idl \ NodeList.idl \ ProcessingInstruction.idl \ - Text.idl + Text.idl \ + StyleSheet.idl \ + StyleSheetCollection.idl XPCOM_DESTDIR=$(DEPTH)\dom\public\coreDom diff --git a/dom/public/idl/css/CSSStyleDeclaration.idl b/dom/public/idl/css/CSSStyleDeclaration.idl index fa77a827476d..d2adbcbd9a9b 100644 --- a/dom/public/idl/css/CSSStyleDeclaration.idl +++ b/dom/public/idl/css/CSSStyleDeclaration.idl @@ -51,7 +51,7 @@ attribute wstring display; attribute wstring elevation; attribute wstring emptyCells; - attribute wstring float; + attribute wstring styleFloat; attribute wstring font; attribute wstring fontFamily; attribute wstring fontSize; diff --git a/dom/public/idl/html/HTMLElement.idl b/dom/public/idl/html/HTMLElement.idl index b30c17f0aef9..b759f983f47f 100644 --- a/dom/public/idl/html/HTMLElement.idl +++ b/dom/public/idl/html/HTMLElement.idl @@ -4,4 +4,5 @@ attribute wstring lang; attribute wstring dir; attribute wstring className; + readonly attribute CSSStyleDeclaration style; }; diff --git a/dom/public/idl/makefile.win b/dom/public/idl/makefile.win index 0adaa08dac93..4791550b8a4a 100644 --- a/dom/public/idl/makefile.win +++ b/dom/public/idl/makefile.win @@ -18,7 +18,7 @@ DEPTH=..\..\.. IGNORE_MANIFEST=1 -DIRS=coreDom html events +DIRS=coreDom html events css MODULE=raptor IDLSRCS = \ diff --git a/dom/public/makefile.win b/dom/public/makefile.win index acc5aedd07c2..dc6c7ae78843 100644 --- a/dom/public/makefile.win +++ b/dom/public/makefile.win @@ -18,7 +18,7 @@ DEPTH=..\.. IGNORE_MANIFEST=1 -DIRS=coreDom coreEvents events html +DIRS=coreDom coreEvents events html css DEFINES=-D_IMPL_NS_DOM EXPORTS=nsIScriptContext.h nsIJSScriptObject.h nsIScriptObjectOwner.h \ nsIScriptGlobalObject.h nsIDOMWindow.h nsIScriptContextOwner.h \ diff --git a/dom/public/nsIDOMLocation.h b/dom/public/nsIDOMLocation.h index 2ca991d460fa..fcdd843e1501 100644 --- a/dom/public/nsIDOMLocation.h +++ b/dom/public/nsIDOMLocation.h @@ -27,7 +27,7 @@ #define NS_IDOMLOCATION_IID \ -{ 0x6f765331, 0xee43, 0x11d1, \ +{ 0x6f76533b, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMLocation : public nsISupports { diff --git a/dom/public/nsIDOMNavigator.h b/dom/public/nsIDOMNavigator.h index 5017ee371f3a..1ae6f34f4c64 100644 --- a/dom/public/nsIDOMNavigator.h +++ b/dom/public/nsIDOMNavigator.h @@ -26,7 +26,7 @@ #define NS_IDOMNAVIGATOR_IID \ -{ 0x6f765332, 0xee43, 0x11d1, \ +{ 0x6f76533c, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMNavigator : public nsISupports { diff --git a/dom/public/nsIDOMWindow.h b/dom/public/nsIDOMWindow.h index a5120735a567..28bc8b4da13e 100644 --- a/dom/public/nsIDOMWindow.h +++ b/dom/public/nsIDOMWindow.h @@ -31,7 +31,7 @@ class nsIDOMWindowCollection; class nsIDOMWindow; #define NS_IDOMWINDOW_IID \ -{ 0x6f765333, 0xee43, 0x11d1, \ +{ 0x6f76533d, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMWindow : public nsISupports { diff --git a/dom/public/nsIDOMWindowCollection.h b/dom/public/nsIDOMWindowCollection.h index 5c4b2985b94f..564a1e6981e4 100644 --- a/dom/public/nsIDOMWindowCollection.h +++ b/dom/public/nsIDOMWindowCollection.h @@ -27,7 +27,7 @@ class nsIDOMWindow; #define NS_IDOMWINDOWCOLLECTION_IID \ -{ 0x6f765334, 0xee43, 0x11d1, \ +{ 0x6f76533e, 0xee43, 0x11d1, \ { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } class nsIDOMWindowCollection : public nsISupports { diff --git a/dom/src/Makefile b/dom/src/Makefile index b8d75531de6b..3d266145fd3f 100644 --- a/dom/src/Makefile +++ b/dom/src/Makefile @@ -17,6 +17,6 @@ DEPTH=../.. -DIRS = base coreDOM html events jsurl build +DIRS = base coreDOM html css events jsurl build include $(DEPTH)/config/rules.mk diff --git a/dom/src/base/nsJSLocation.cpp b/dom/src/base/nsJSLocation.cpp index a9b07bc2983d..95e45217f2d2 100644 --- a/dom/src/base/nsJSLocation.cpp +++ b/dom/src/base/nsJSLocation.cpp @@ -39,14 +39,14 @@ NS_DEF_PTR(nsIDOMLocation); // Location property ids // enum Location_slots { - LOCATION_HASH = -11, - LOCATION_HOST = -12, - LOCATION_HOSTNAME = -13, - LOCATION_HREF = -14, - LOCATION_PATHNAME = -15, - LOCATION_PORT = -16, - LOCATION_PROTOCOL = -17, - LOCATION_SEARCH = -18 + LOCATION_HASH = -1, + LOCATION_HOST = -2, + LOCATION_HOSTNAME = -3, + LOCATION_HREF = -4, + LOCATION_PATHNAME = -5, + LOCATION_PORT = -6, + LOCATION_PROTOCOL = -7, + LOCATION_SEARCH = -8 }; /***********************************************************************/ diff --git a/dom/src/base/nsJSNavigator.cpp b/dom/src/base/nsJSNavigator.cpp index 232e5b32960a..78468a315c2a 100644 --- a/dom/src/base/nsJSNavigator.cpp +++ b/dom/src/base/nsJSNavigator.cpp @@ -39,13 +39,13 @@ NS_DEF_PTR(nsIDOMNavigator); // Navigator property ids // enum Navigator_slots { - NAVIGATOR_USERAGENT = -11, - NAVIGATOR_APPCODENAME = -12, - NAVIGATOR_APPVERSION = -13, - NAVIGATOR_APPNAME = -14, - NAVIGATOR_LANGUAGE = -15, - NAVIGATOR_PLATFORM = -16, - NAVIGATOR_SECURITYPOLICY = -17 + NAVIGATOR_USERAGENT = -1, + NAVIGATOR_APPCODENAME = -2, + NAVIGATOR_APPVERSION = -3, + NAVIGATOR_APPNAME = -4, + NAVIGATOR_LANGUAGE = -5, + NAVIGATOR_PLATFORM = -6, + NAVIGATOR_SECURITYPOLICY = -7 }; /***********************************************************************/ diff --git a/dom/src/base/nsJSWindow.cpp b/dom/src/base/nsJSWindow.cpp index 7bd2d1c1e182..85f7248accb4 100644 --- a/dom/src/base/nsJSWindow.cpp +++ b/dom/src/base/nsJSWindow.cpp @@ -51,18 +51,18 @@ NS_DEF_PTR(nsIDOMWindow); // Window property ids // enum Window_slots { - WINDOW_WINDOW = -11, - WINDOW_SELF = -12, - WINDOW_DOCUMENT = -13, - WINDOW_NAVIGATOR = -14, - WINDOW_PARENT = -15, - WINDOW_TOP = -16, - WINDOW_CLOSED = -17, - WINDOW_FRAMES = -18, - WINDOW_OPENER = -19, - WINDOW_STATUS = -110, - WINDOW_DEFAULTSTATUS = -111, - WINDOW_NAME = -112 + WINDOW_WINDOW = -1, + WINDOW_SELF = -2, + WINDOW_DOCUMENT = -3, + WINDOW_NAVIGATOR = -4, + WINDOW_PARENT = -5, + WINDOW_TOP = -6, + WINDOW_CLOSED = -7, + WINDOW_FRAMES = -8, + WINDOW_OPENER = -9, + WINDOW_STATUS = -10, + WINDOW_DEFAULTSTATUS = -11, + WINDOW_NAME = -12 }; /***********************************************************************/ diff --git a/dom/src/base/nsJSWindowCollection.cpp b/dom/src/base/nsJSWindowCollection.cpp index 4559a8f73f55..85f595ac162c 100644 --- a/dom/src/base/nsJSWindowCollection.cpp +++ b/dom/src/base/nsJSWindowCollection.cpp @@ -42,7 +42,7 @@ NS_DEF_PTR(nsIDOMWindow); // WindowCollection property ids // enum WindowCollection_slots { - WINDOWCOLLECTION_LENGTH = -11 + WINDOWCOLLECTION_LENGTH = -1 }; /***********************************************************************/ diff --git a/dom/src/build/Makefile b/dom/src/build/Makefile index 7c981da4f6bb..5b463e740ad7 100644 --- a/dom/src/build/Makefile +++ b/dom/src/build/Makefile @@ -51,6 +51,7 @@ EXTRA_DSO_LDOPTS = \ -ljsdomcore_s \ -ljsdomevents_s \ -ljsdomhtml_s \ + -ljsdomcss_s \ -ljsurl \ -L$(DIST)/bin \ -lraptorbase \ @@ -70,6 +71,7 @@ EXTRA_DSO_LDOPTS = \ $(DIST)/lib/libjsdomcore_s.a \ $(DIST)/lib/libjsdomevents_s.a \ $(DIST)/lib/libjsdomhtml_s.a \ + $(DIST)/lib/libjsdomcss_s.a \ $(DIST)/lib/libjsurl.a \ $(LD_NONE) \ $(DIST)/bin/libraptorbase.so \ diff --git a/dom/src/build/makefile.win b/dom/src/build/makefile.win index a9f53439dae4..410ba721c946 100644 --- a/dom/src/build/makefile.win +++ b/dom/src/build/makefile.win @@ -38,6 +38,7 @@ MISCDEP = \ $(DIST)\lib\jsdomcore_s.lib \ $(DIST)\lib\jsdomevents_s.lib \ $(DIST)\lib\jsdomhtml_s.lib \ + $(DIST)\lib\jsdomcss_s.lib \ $(DIST)\lib\jsurl.lib \ $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\netlib.lib \ @@ -58,6 +59,7 @@ LLIBS= \ $(DIST)\lib\jsdomcore_s.lib \ $(DIST)\lib\jsdomevents_s.lib \ $(DIST)\lib\jsdomhtml_s.lib \ + $(DIST)\lib\jsdomcss_s.lib \ $(DIST)\lib\jsurl.lib \ $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\netlib.lib \ diff --git a/dom/src/build/nsDOMFactory.cpp b/dom/src/build/nsDOMFactory.cpp index c9090c430527..ca3f8f22f840 100644 --- a/dom/src/build/nsDOMFactory.cpp +++ b/dom/src/build/nsDOMFactory.cpp @@ -105,6 +105,7 @@ #include "nsIDOMNSHTMLFormElement.h" #include "nsIDOMNavigator.h" #include "nsIDOMLocation.h" +#include "nsIDOMCSSStyleDeclaration.h" #include "plhash.h" static NS_DEFINE_IID(kIDOMNativeObjectRegistry, NS_IDOM_NATIVE_OBJECT_REGISTRY_IID); @@ -671,5 +672,6 @@ void XXXDomNeverCalled() NS_NewScriptNavigator(0, 0, 0, 0); NS_NewScriptLocation(0, 0, 0, 0); NS_NewScriptEventListener(0, 0, 0); + NS_NewScriptCSSStyleDeclaration(0, 0, 0, 0); NET_InitJavaScriptProtocol(); } diff --git a/dom/src/coreDOM/Makefile b/dom/src/coreDOM/Makefile index c4b49cbc6928..4a0924cf2622 100644 --- a/dom/src/coreDOM/Makefile +++ b/dom/src/coreDOM/Makefile @@ -34,6 +34,8 @@ CPPSRCS = \ nsJSNodeList.cpp \ nsJSProcessingInstruction.cpp \ nsJSText.cpp \ + nsJSStyleSheet.cpp \ + nsJSStyleCollection.cpp \ $(NULL) DEFINES = -D_IMPL_NS_DOM diff --git a/dom/src/coreDOM/makefile.win b/dom/src/coreDOM/makefile.win index 36a96120c95f..009707871895 100644 --- a/dom/src/coreDOM/makefile.win +++ b/dom/src/coreDOM/makefile.win @@ -38,6 +38,8 @@ CPPSRCS = \ nsJSNodeList.cpp \ nsJSProcessingInstruction.cpp \ nsJSText.cpp \ + nsJSStyleSheet.cpp \ + nsJSStyleCollection.cpp \ $(NULL) CPP_OBJS= \ @@ -55,6 +57,8 @@ CPP_OBJS= \ .\$(OBJDIR)\nsJSNodeList.obj \ .\$(OBJDIR)\nsJSProcessingInstruction.obj \ .\$(OBJDIR)\nsJSText.obj \ + .\$(OBJDIR)\nsJSStyleSheet.obj \ + .\$(OBJDIR)\nsJSStyleSheetCollection.obj \ $(NULL) diff --git a/dom/src/coreDOM/nsJSAttribute.cpp b/dom/src/coreDOM/nsJSAttribute.cpp index 74d6709029c8..ff9793096631 100644 --- a/dom/src/coreDOM/nsJSAttribute.cpp +++ b/dom/src/coreDOM/nsJSAttribute.cpp @@ -39,9 +39,9 @@ NS_DEF_PTR(nsIDOMAttribute); // Attribute property ids // enum Attribute_slots { - ATTRIBUTE_NAME = -11, - ATTRIBUTE_SPECIFIED = -12, - ATTRIBUTE_VALUE = -13 + ATTRIBUTE_NAME = -1, + ATTRIBUTE_SPECIFIED = -2, + ATTRIBUTE_VALUE = -3 }; /***********************************************************************/ diff --git a/dom/src/coreDOM/nsJSData.cpp b/dom/src/coreDOM/nsJSData.cpp index d0c6914ae9af..362d855a9728 100644 --- a/dom/src/coreDOM/nsJSData.cpp +++ b/dom/src/coreDOM/nsJSData.cpp @@ -39,8 +39,8 @@ NS_DEF_PTR(nsIDOMData); // Data property ids // enum Data_slots { - DATA_DATA = -11, - DATA_SIZE = -12 + DATA_DATA = -1, + DATA_SIZE = -2 }; /***********************************************************************/ diff --git a/dom/src/coreDOM/nsJSDocument.cpp b/dom/src/coreDOM/nsJSDocument.cpp index d9a272491616..4712a50a3c86 100644 --- a/dom/src/coreDOM/nsJSDocument.cpp +++ b/dom/src/coreDOM/nsJSDocument.cpp @@ -72,10 +72,10 @@ NS_DEF_PTR(nsIDOMNodeList); // Document property ids // enum Document_slots { - DOCUMENT_DOCUMENTTYPE = -11, - DOCUMENT_PROLOG = -12, - DOCUMENT_EPILOG = -13, - DOCUMENT_DOCUMENTELEMENT = -14 + DOCUMENT_DOCUMENTTYPE = -1, + DOCUMENT_PROLOG = -2, + DOCUMENT_EPILOG = -3, + DOCUMENT_DOCUMENTELEMENT = -4 }; /***********************************************************************/ diff --git a/dom/src/coreDOM/nsJSDocumentFragment.cpp b/dom/src/coreDOM/nsJSDocumentFragment.cpp index e85f7ea7ce32..05dcacfccc4b 100644 --- a/dom/src/coreDOM/nsJSDocumentFragment.cpp +++ b/dom/src/coreDOM/nsJSDocumentFragment.cpp @@ -42,7 +42,7 @@ NS_DEF_PTR(nsIDOMDocumentFragment); // DocumentFragment property ids // enum DocumentFragment_slots { - DOCUMENTFRAGMENT_MASTERDOC = -11 + DOCUMENTFRAGMENT_MASTERDOC = -1 }; /***********************************************************************/ diff --git a/dom/src/coreDOM/nsJSDocumentType.cpp b/dom/src/coreDOM/nsJSDocumentType.cpp index b6065fb3fae0..0ea55be366ab 100644 --- a/dom/src/coreDOM/nsJSDocumentType.cpp +++ b/dom/src/coreDOM/nsJSDocumentType.cpp @@ -42,8 +42,8 @@ NS_DEF_PTR(nsIDOMDocumentType); // DocumentType property ids // enum DocumentType_slots { - DOCUMENTTYPE_NAME = -11, - DOCUMENTTYPE_ENTITIES = -12 + DOCUMENTTYPE_NAME = -1, + DOCUMENTTYPE_ENTITIES = -2 }; /***********************************************************************/ diff --git a/dom/src/coreDOM/nsJSElement.cpp b/dom/src/coreDOM/nsJSElement.cpp index 201093f00062..9a3738b4b4cd 100644 --- a/dom/src/coreDOM/nsJSElement.cpp +++ b/dom/src/coreDOM/nsJSElement.cpp @@ -45,7 +45,7 @@ NS_DEF_PTR(nsIDOMNodeList); // Element property ids // enum Element_slots { - ELEMENT_TAGNAME = -11 + ELEMENT_TAGNAME = -1 }; /***********************************************************************/ diff --git a/dom/src/coreDOM/nsJSNamedNodeMap.cpp b/dom/src/coreDOM/nsJSNamedNodeMap.cpp index 1f2db6a4cdbd..a177eb96e282 100644 --- a/dom/src/coreDOM/nsJSNamedNodeMap.cpp +++ b/dom/src/coreDOM/nsJSNamedNodeMap.cpp @@ -42,7 +42,7 @@ NS_DEF_PTR(nsIDOMNode); // NamedNodeMap property ids // enum NamedNodeMap_slots { - NAMEDNODEMAP_LENGTH = -11 + NAMEDNODEMAP_LENGTH = -1 }; /***********************************************************************/ diff --git a/dom/src/coreDOM/nsJSNode.cpp b/dom/src/coreDOM/nsJSNode.cpp index f68ff0f92374..7aac1f579c64 100644 --- a/dom/src/coreDOM/nsJSNode.cpp +++ b/dom/src/coreDOM/nsJSNode.cpp @@ -45,17 +45,17 @@ NS_DEF_PTR(nsIDOMNodeList); // Node property ids // enum Node_slots { - NODE_NODENAME = -11, - NODE_NODEVALUE = -12, - NODE_NODETYPE = -13, - NODE_PARENTNODE = -14, - NODE_CHILDNODES = -15, - NODE_HASCHILDNODES = -16, - NODE_FIRSTCHILD = -17, - NODE_LASTCHILD = -18, - NODE_PREVIOUSSIBLING = -19, - NODE_NEXTSIBLING = -110, - NODE_ATTRIBUTES = -111 + NODE_NODENAME = -1, + NODE_NODEVALUE = -2, + NODE_NODETYPE = -3, + NODE_PARENTNODE = -4, + NODE_CHILDNODES = -5, + NODE_HASCHILDNODES = -6, + NODE_FIRSTCHILD = -7, + NODE_LASTCHILD = -8, + NODE_PREVIOUSSIBLING = -9, + NODE_NEXTSIBLING = -10, + NODE_ATTRIBUTES = -11 }; /***********************************************************************/ diff --git a/dom/src/coreDOM/nsJSNodeList.cpp b/dom/src/coreDOM/nsJSNodeList.cpp index 811bc03ec594..b05888dce6c7 100644 --- a/dom/src/coreDOM/nsJSNodeList.cpp +++ b/dom/src/coreDOM/nsJSNodeList.cpp @@ -42,7 +42,7 @@ NS_DEF_PTR(nsIDOMNodeList); // NodeList property ids // enum NodeList_slots { - NODELIST_LENGTH = -11 + NODELIST_LENGTH = -1 }; /***********************************************************************/ diff --git a/dom/src/coreDOM/nsJSProcessingInstruction.cpp b/dom/src/coreDOM/nsJSProcessingInstruction.cpp index cbf9cc11317a..9a37d66bdb8d 100644 --- a/dom/src/coreDOM/nsJSProcessingInstruction.cpp +++ b/dom/src/coreDOM/nsJSProcessingInstruction.cpp @@ -39,8 +39,8 @@ NS_DEF_PTR(nsIDOMProcessingInstruction); // ProcessingInstruction property ids // enum ProcessingInstruction_slots { - PROCESSINGINSTRUCTION_TARGET = -11, - PROCESSINGINSTRUCTION_DATA = -12 + PROCESSINGINSTRUCTION_TARGET = -1, + PROCESSINGINSTRUCTION_DATA = -2 }; /***********************************************************************/ diff --git a/dom/src/coreDOM/nsJSStyleSheet.cpp b/dom/src/coreDOM/nsJSStyleSheet.cpp new file mode 100644 index 000000000000..55e4dc0c1ffa --- /dev/null +++ b/dom/src/coreDOM/nsJSStyleSheet.cpp @@ -0,0 +1,371 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#include "jsapi.h" +#include "nscore.h" +#include "nsIScriptContext.h" +#include "nsIJSScriptObject.h" +#include "nsIScriptObjectOwner.h" +#include "nsIScriptGlobalObject.h" +#include "nsIPtr.h" +#include "nsString.h" +#include "nsIDOMStyleSheet.h" + + +static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); +static NS_DEFINE_IID(kIJSScriptObjectIID, NS_IJSSCRIPTOBJECT_IID); +static NS_DEFINE_IID(kIScriptGlobalObjectIID, NS_ISCRIPTGLOBALOBJECT_IID); +static NS_DEFINE_IID(kIStyleSheetIID, NS_IDOMSTYLESHEET_IID); + +NS_DEF_PTR(nsIDOMStyleSheet); + +// +// StyleSheet property ids +// +enum StyleSheet_slots { + STYLESHEET_DISABLED = -1, + STYLESHEET_READONLY = -2 +}; + +/***********************************************************************/ +// +// StyleSheet Properties Getter +// +PR_STATIC_CALLBACK(JSBool) +GetStyleSheetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMStyleSheet *a = (nsIDOMStyleSheet*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case STYLESHEET_DISABLED: + { + PRBool prop; + if (NS_OK == a->GetDisabled(&prop)) { + *vp = BOOLEAN_TO_JSVAL(prop); + } + else { + return JS_FALSE; + } + break; + } + case STYLESHEET_READONLY: + { + PRBool prop; + if (NS_OK == a->GetReadOnly(&prop)) { + *vp = BOOLEAN_TO_JSVAL(prop); + } + else { + return JS_FALSE; + } + break; + } + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + +/***********************************************************************/ +// +// StyleSheet Properties Setter +// +PR_STATIC_CALLBACK(JSBool) +SetStyleSheetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMStyleSheet *a = (nsIDOMStyleSheet*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case STYLESHEET_DISABLED: + { + PRBool prop; + JSBool temp; + if (JSVAL_IS_BOOLEAN(*vp) && JS_ValueToBoolean(cx, *vp, &temp)) { + prop = (PRBool)temp; + } + else { + JS_ReportError(cx, "Parameter must be a boolean"); + return JS_FALSE; + } + + a->SetDisabled(prop); + + break; + } + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + + +// +// StyleSheet finalizer +// +PR_STATIC_CALLBACK(void) +FinalizeStyleSheet(JSContext *cx, JSObject *obj) +{ + nsIDOMStyleSheet *a = (nsIDOMStyleSheet*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == a->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + owner->SetScriptObject(nsnull); + NS_RELEASE(owner); + } + + NS_RELEASE(a); + } +} + + +// +// StyleSheet enumerate +// +PR_STATIC_CALLBACK(JSBool) +EnumerateStyleSheet(JSContext *cx, JSObject *obj) +{ + nsIDOMStyleSheet *a = (nsIDOMStyleSheet*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->EnumerateProperty(cx); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +// +// StyleSheet resolve +// +PR_STATIC_CALLBACK(JSBool) +ResolveStyleSheet(JSContext *cx, JSObject *obj, jsval id) +{ + nsIDOMStyleSheet *a = (nsIDOMStyleSheet*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->Resolve(cx, id); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +/***********************************************************************/ +// +// class for StyleSheet +// +JSClass StyleSheetClass = { + "StyleSheet", + JSCLASS_HAS_PRIVATE, + JS_PropertyStub, + JS_PropertyStub, + GetStyleSheetProperty, + SetStyleSheetProperty, + EnumerateStyleSheet, + ResolveStyleSheet, + JS_ConvertStub, + FinalizeStyleSheet +}; + + +// +// StyleSheet class properties +// +static JSPropertySpec StyleSheetProperties[] = +{ + {"disabled", STYLESHEET_DISABLED, JSPROP_ENUMERATE}, + {"readOnly", STYLESHEET_READONLY, JSPROP_ENUMERATE | JSPROP_READONLY}, + {0} +}; + + +// +// StyleSheet class methods +// +static JSFunctionSpec StyleSheetMethods[] = +{ + {0} +}; + + +// +// StyleSheet constructor +// +PR_STATIC_CALLBACK(JSBool) +StyleSheet(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + return JS_FALSE; +} + + +// +// StyleSheet class initialization +// +nsresult NS_InitStyleSheetClass(nsIScriptContext *aContext, void **aPrototype) +{ + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + JSObject *proto = nsnull; + JSObject *constructor = nsnull; + JSObject *parent_proto = nsnull; + JSObject *global = JS_GetGlobalObject(jscontext); + jsval vp; + + if ((PR_TRUE != JS_LookupProperty(jscontext, global, "StyleSheet", &vp)) || + !JSVAL_IS_OBJECT(vp) || + ((constructor = JSVAL_TO_OBJECT(vp)) == nsnull) || + (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || + !JSVAL_IS_OBJECT(vp)) { + + proto = JS_InitClass(jscontext, // context + global, // global object + parent_proto, // parent proto + &StyleSheetClass, // JSClass + StyleSheet, // JSNative ctor + 0, // ctor args + StyleSheetProperties, // proto props + StyleSheetMethods, // proto funcs + nsnull, // ctor props (static) + nsnull); // ctor funcs (static) + if (nsnull == proto) { + return NS_ERROR_FAILURE; + } + + } + else if ((nsnull != constructor) && JSVAL_IS_OBJECT(vp)) { + proto = JSVAL_TO_OBJECT(vp); + } + else { + return NS_ERROR_FAILURE; + } + + if (aPrototype) { + *aPrototype = proto; + } + return NS_OK; +} + + +// +// Method for creating a new StyleSheet JavaScript object +// +extern "C" NS_DOM nsresult NS_NewScriptStyleSheet(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +{ + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptStyleSheet"); + JSObject *proto; + JSObject *parent; + nsIScriptObjectOwner *owner; + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + nsresult result = NS_OK; + nsIDOMStyleSheet *aStyleSheet; + + if (nsnull == aParent) { + parent = nsnull; + } + else if (NS_OK == aParent->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + if (NS_OK != owner->GetScriptObject(aContext, (void **)&parent)) { + NS_RELEASE(owner); + return NS_ERROR_FAILURE; + } + NS_RELEASE(owner); + } + else { + return NS_ERROR_FAILURE; + } + + if (NS_OK != NS_InitStyleSheetClass(aContext, (void **)&proto)) { + return NS_ERROR_FAILURE; + } + + result = aSupports->QueryInterface(kIStyleSheetIID, (void **)&aStyleSheet); + if (NS_OK != result) { + return result; + } + + // create a js object for this class + *aReturn = JS_NewObject(jscontext, &StyleSheetClass, proto, parent); + if (nsnull != *aReturn) { + // connect the native object to the js object + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aStyleSheet); + } + else { + NS_RELEASE(aStyleSheet); + return NS_ERROR_FAILURE; + } + + return NS_OK; +} diff --git a/dom/src/coreDOM/nsJSStyleSheetCollection.cpp b/dom/src/coreDOM/nsJSStyleSheetCollection.cpp new file mode 100644 index 000000000000..d8d2f3603a8b --- /dev/null +++ b/dom/src/coreDOM/nsJSStyleSheetCollection.cpp @@ -0,0 +1,418 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#include "jsapi.h" +#include "nscore.h" +#include "nsIScriptContext.h" +#include "nsIJSScriptObject.h" +#include "nsIScriptObjectOwner.h" +#include "nsIScriptGlobalObject.h" +#include "nsIPtr.h" +#include "nsString.h" +#include "nsIDOMStyleSheetCollection.h" +#include "nsIDOMStyleSheet.h" + + +static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); +static NS_DEFINE_IID(kIJSScriptObjectIID, NS_IJSSCRIPTOBJECT_IID); +static NS_DEFINE_IID(kIScriptGlobalObjectIID, NS_ISCRIPTGLOBALOBJECT_IID); +static NS_DEFINE_IID(kIStyleSheetCollectionIID, NS_IDOMSTYLESHEETCOLLECTION_IID); +static NS_DEFINE_IID(kIStyleSheetIID, NS_IDOMSTYLESHEET_IID); + +NS_DEF_PTR(nsIDOMStyleSheetCollection); +NS_DEF_PTR(nsIDOMStyleSheet); + +// +// StyleSheetCollection property ids +// +enum StyleSheetCollection_slots { + STYLESHEETCOLLECTION_LENGTH = -1 +}; + +/***********************************************************************/ +// +// StyleSheetCollection Properties Getter +// +PR_STATIC_CALLBACK(JSBool) +GetStyleSheetCollectionProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMStyleSheetCollection *a = (nsIDOMStyleSheetCollection*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case STYLESHEETCOLLECTION_LENGTH: + { + PRUint32 prop; + if (NS_OK == a->GetLength(&prop)) { + *vp = INT_TO_JSVAL(prop); + } + else { + return JS_FALSE; + } + break; + } + default: + { + nsIDOMStyleSheet* prop; + if (NS_OK == a->Item(JSVAL_TO_INT(id), &prop)) { + // get the js object + if (prop != nsnull) { + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == prop->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + JSObject *object = nsnull; + nsIScriptContext *script_cx = (nsIScriptContext *)JS_GetContextPrivate(cx); + if (NS_OK == owner->GetScriptObject(script_cx, (void**)&object)) { + // set the return value + *vp = OBJECT_TO_JSVAL(object); + } + NS_RELEASE(owner); + } + NS_RELEASE(prop); + } + else { + *vp = JSVAL_NULL; + } + } + else { + return JS_FALSE; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + +/***********************************************************************/ +// +// StyleSheetCollection Properties Setter +// +PR_STATIC_CALLBACK(JSBool) +SetStyleSheetCollectionProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMStyleSheetCollection *a = (nsIDOMStyleSheetCollection*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case 0: + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + + +// +// StyleSheetCollection finalizer +// +PR_STATIC_CALLBACK(void) +FinalizeStyleSheetCollection(JSContext *cx, JSObject *obj) +{ + nsIDOMStyleSheetCollection *a = (nsIDOMStyleSheetCollection*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == a->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + owner->SetScriptObject(nsnull); + NS_RELEASE(owner); + } + + NS_RELEASE(a); + } +} + + +// +// StyleSheetCollection enumerate +// +PR_STATIC_CALLBACK(JSBool) +EnumerateStyleSheetCollection(JSContext *cx, JSObject *obj) +{ + nsIDOMStyleSheetCollection *a = (nsIDOMStyleSheetCollection*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->EnumerateProperty(cx); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +// +// StyleSheetCollection resolve +// +PR_STATIC_CALLBACK(JSBool) +ResolveStyleSheetCollection(JSContext *cx, JSObject *obj, jsval id) +{ + nsIDOMStyleSheetCollection *a = (nsIDOMStyleSheetCollection*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->Resolve(cx, id); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +// +// Native method Item +// +PR_STATIC_CALLBACK(JSBool) +StyleSheetCollectionItem(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMStyleSheetCollection *nativeThis = (nsIDOMStyleSheetCollection*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + nsIDOMStyleSheet* nativeRet; + PRUint32 b0; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 1) { + + if (!JS_ValueToInt32(cx, argv[0], (int32 *)&b0)) { + JS_ReportError(cx, "Parameter must be a number"); + return JS_FALSE; + } + + if (NS_OK != nativeThis->Item(b0, &nativeRet)) { + return JS_FALSE; + } + + if (nativeRet != nsnull) { + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == nativeRet->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + JSObject *object = nsnull; + nsIScriptContext *script_cx = (nsIScriptContext *)JS_GetContextPrivate(cx); + if (NS_OK == owner->GetScriptObject(script_cx, (void**)&object)) { + // set the return value + *rval = OBJECT_TO_JSVAL(object); + } + NS_RELEASE(owner); + } + NS_RELEASE(nativeRet); + } + else { + *rval = JSVAL_NULL; + } + } + else { + JS_ReportError(cx, "Function item requires 1 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +/***********************************************************************/ +// +// class for StyleSheetCollection +// +JSClass StyleSheetCollectionClass = { + "StyleSheetCollection", + JSCLASS_HAS_PRIVATE, + JS_PropertyStub, + JS_PropertyStub, + GetStyleSheetCollectionProperty, + SetStyleSheetCollectionProperty, + EnumerateStyleSheetCollection, + ResolveStyleSheetCollection, + JS_ConvertStub, + FinalizeStyleSheetCollection +}; + + +// +// StyleSheetCollection class properties +// +static JSPropertySpec StyleSheetCollectionProperties[] = +{ + {"length", STYLESHEETCOLLECTION_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY}, + {0} +}; + + +// +// StyleSheetCollection class methods +// +static JSFunctionSpec StyleSheetCollectionMethods[] = +{ + {"item", StyleSheetCollectionItem, 1}, + {0} +}; + + +// +// StyleSheetCollection constructor +// +PR_STATIC_CALLBACK(JSBool) +StyleSheetCollection(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + return JS_FALSE; +} + + +// +// StyleSheetCollection class initialization +// +nsresult NS_InitStyleSheetCollectionClass(nsIScriptContext *aContext, void **aPrototype) +{ + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + JSObject *proto = nsnull; + JSObject *constructor = nsnull; + JSObject *parent_proto = nsnull; + JSObject *global = JS_GetGlobalObject(jscontext); + jsval vp; + + if ((PR_TRUE != JS_LookupProperty(jscontext, global, "StyleSheetCollection", &vp)) || + !JSVAL_IS_OBJECT(vp) || + ((constructor = JSVAL_TO_OBJECT(vp)) == nsnull) || + (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || + !JSVAL_IS_OBJECT(vp)) { + + proto = JS_InitClass(jscontext, // context + global, // global object + parent_proto, // parent proto + &StyleSheetCollectionClass, // JSClass + StyleSheetCollection, // JSNative ctor + 0, // ctor args + StyleSheetCollectionProperties, // proto props + StyleSheetCollectionMethods, // proto funcs + nsnull, // ctor props (static) + nsnull); // ctor funcs (static) + if (nsnull == proto) { + return NS_ERROR_FAILURE; + } + + } + else if ((nsnull != constructor) && JSVAL_IS_OBJECT(vp)) { + proto = JSVAL_TO_OBJECT(vp); + } + else { + return NS_ERROR_FAILURE; + } + + if (aPrototype) { + *aPrototype = proto; + } + return NS_OK; +} + + +// +// Method for creating a new StyleSheetCollection JavaScript object +// +extern "C" NS_DOM nsresult NS_NewScriptStyleSheetCollection(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +{ + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptStyleSheetCollection"); + JSObject *proto; + JSObject *parent; + nsIScriptObjectOwner *owner; + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + nsresult result = NS_OK; + nsIDOMStyleSheetCollection *aStyleSheetCollection; + + if (nsnull == aParent) { + parent = nsnull; + } + else if (NS_OK == aParent->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + if (NS_OK != owner->GetScriptObject(aContext, (void **)&parent)) { + NS_RELEASE(owner); + return NS_ERROR_FAILURE; + } + NS_RELEASE(owner); + } + else { + return NS_ERROR_FAILURE; + } + + if (NS_OK != NS_InitStyleSheetCollectionClass(aContext, (void **)&proto)) { + return NS_ERROR_FAILURE; + } + + result = aSupports->QueryInterface(kIStyleSheetCollectionIID, (void **)&aStyleSheetCollection); + if (NS_OK != result) { + return result; + } + + // create a js object for this class + *aReturn = JS_NewObject(jscontext, &StyleSheetCollectionClass, proto, parent); + if (nsnull != *aReturn) { + // connect the native object to the js object + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aStyleSheetCollection); + } + else { + NS_RELEASE(aStyleSheetCollection); + return NS_ERROR_FAILURE; + } + + return NS_OK; +} diff --git a/dom/src/css/Makefile b/dom/src/css/Makefile new file mode 100644 index 000000000000..e6040ba3679a --- /dev/null +++ b/dom/src/css/Makefile @@ -0,0 +1,43 @@ +#!gmake +# +# The contents of this file are subject to the Netscape Public License +# Version 1.0 (the "NPL"); you may not use this file except in +# compliance with the NPL. You may obtain a copy of the NPL at +# http://www.mozilla.org/NPL/ +# +# Software distributed under the NPL is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +# for the specific language governing rights and limitations under the +# NPL. +# +# The Initial Developer of this code under the NPL is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All Rights +# Reserved. + +DEPTH=../../.. + +LIBRARY_NAME = jsdomcss_s + +CPPSRCS = \ + nsJSCSSFontFaceRule.cpp \ + nsJSCSSMediaRule.cpp \ + nsJSCSSPageRule.cpp \ + nsJSCSSStyleDeclaration.cpp \ + nsJSCSSStyleRule.cpp \ + nsJSCSSStyleRuleCollection.cpp \ + nsJSCSSStyleRuleSimple.cpp \ + nsJSCSSStyleSheet.cpp \ + $(NULL) + +DEFINES = -D_IMPL_NS_DOM + +MODULE = raptor + +REQUIRES = xpcom raptor dom js netlib + +include $(DEPTH)/config/config.mk + +MKSHLIB := + +include $(DEPTH)/config/rules.mk diff --git a/dom/src/css/makefile.win b/dom/src/css/makefile.win new file mode 100644 index 000000000000..04ee20c6a898 --- /dev/null +++ b/dom/src/css/makefile.win @@ -0,0 +1,49 @@ +# Copyright (C) 1998 Netscape Communications Corporation. All Rights +# Reserved. + +DEPTH=..\..\.. +IGNORE_MANIFEST=1 + +LIBRARY_NAME=jsdomcss_s +MODULE=raptor +REQUIRES=xpcom raptor js netlib +DEFINES=-D_IMPL_NS_DOM -DWIN32_LEAN_AND_MEAN + +CPPSRCS = \ + nsJSCSSFontFaceRule.cpp \ + nsJSCSSMediaRule.cpp \ + nsJSCSSPageRule.cpp \ + nsJSCSSStyleDeclaration.cpp \ + nsJSCSSStyleRule.cpp \ + nsJSCSSStyleRuleCollection.cpp \ + nsJSCSSStyleRuleSimple.cpp \ + nsJSCSSStyleSheet.cpp \ + $(NULL) + +CPP_OBJS= \ + .\$(OBJDIR)\nsJSCSSFontFaceRule.obj \ + .\$(OBJDIR)\nsJSCSSMediaRule.obj \ + .\$(OBJDIR)\nsJSCSSPageRule.obj \ + .\$(OBJDIR)\nsJSCSSStyleDeclaration.obj \ + .\$(OBJDIR)\nsJSCSSStyleRule.obj \ + .\$(OBJDIR)\nsJSCSSStyleRuleCollection.obj \ + .\$(OBJDIR)\nsJSCSSStyleRuleSimple.obj \ + .\$(OBJDIR)\nsJSCSSStyleSheet.obj \ + $(NULL) + +LINCS=-I$(XPDIST)\public\xpcom -I$(XPDIST)\public\raptor \ + -I$(XPDIST)\public\dom -I$(XPDIST)\public\js -I$(PUBLIC)\netlib + +LCFLAGS = \ + $(LCFLAGS) \ + $(DEFINES) \ + $(NULL) + + +include <$(DEPTH)\config\rules.mak> + +libs:: $(LIBRARY) + $(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib + +clobber:: + rm -f $(DIST)\lib\$(LIBRARY_NAME).lib diff --git a/dom/src/css/nsJSCSSFontFaceRule.cpp b/dom/src/css/nsJSCSSFontFaceRule.cpp new file mode 100644 index 000000000000..c4c73bc8eb49 --- /dev/null +++ b/dom/src/css/nsJSCSSFontFaceRule.cpp @@ -0,0 +1,387 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#include "jsapi.h" +#include "nscore.h" +#include "nsIScriptContext.h" +#include "nsIJSScriptObject.h" +#include "nsIScriptObjectOwner.h" +#include "nsIScriptGlobalObject.h" +#include "nsIPtr.h" +#include "nsString.h" +#include "nsIDOMCSSStyleDeclaration.h" +#include "nsIDOMCSSFontFaceRule.h" + + +static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); +static NS_DEFINE_IID(kIJSScriptObjectIID, NS_IJSSCRIPTOBJECT_IID); +static NS_DEFINE_IID(kIScriptGlobalObjectIID, NS_ISCRIPTGLOBALOBJECT_IID); +static NS_DEFINE_IID(kICSSStyleDeclarationIID, NS_IDOMCSSSTYLEDECLARATION_IID); +static NS_DEFINE_IID(kICSSFontFaceRuleIID, NS_IDOMCSSFONTFACERULE_IID); + +NS_DEF_PTR(nsIDOMCSSStyleDeclaration); +NS_DEF_PTR(nsIDOMCSSFontFaceRule); + +// +// CSSFontFaceRule property ids +// +enum CSSFontFaceRule_slots { + CSSFONTFACERULE_STYLE = -1 +}; + +/***********************************************************************/ +// +// CSSFontFaceRule Properties Getter +// +PR_STATIC_CALLBACK(JSBool) +GetCSSFontFaceRuleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSFontFaceRule *a = (nsIDOMCSSFontFaceRule*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case CSSFONTFACERULE_STYLE: + { + nsIDOMCSSStyleDeclaration* prop; + if (NS_OK == a->GetStyle(&prop)) { + // get the js object + if (prop != nsnull) { + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == prop->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + JSObject *object = nsnull; + nsIScriptContext *script_cx = (nsIScriptContext *)JS_GetContextPrivate(cx); + if (NS_OK == owner->GetScriptObject(script_cx, (void**)&object)) { + // set the return value + *vp = OBJECT_TO_JSVAL(object); + } + NS_RELEASE(owner); + } + NS_RELEASE(prop); + } + else { + *vp = JSVAL_NULL; + } + } + else { + return JS_FALSE; + } + break; + } + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + +/***********************************************************************/ +// +// CSSFontFaceRule Properties Setter +// +PR_STATIC_CALLBACK(JSBool) +SetCSSFontFaceRuleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSFontFaceRule *a = (nsIDOMCSSFontFaceRule*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case CSSFONTFACERULE_STYLE: + { + nsIDOMCSSStyleDeclaration* prop; + if (JSVAL_IS_NULL(*vp)) { + prop = nsnull; + } + else if (JSVAL_IS_OBJECT(*vp)) { + JSObject *jsobj = JSVAL_TO_OBJECT(*vp); + nsISupports *supports = (nsISupports *)JS_GetPrivate(cx, jsobj); + if (NS_OK != supports->QueryInterface(kICSSStyleDeclarationIID, (void **)&prop)) { + JS_ReportError(cx, "Parameter must be of type CSSStyleDeclaration"); + return JS_FALSE; + } + } + else { + JS_ReportError(cx, "Parameter must be an object"); + return JS_FALSE; + } + + a->SetStyle(prop); + if (prop) NS_RELEASE(prop); + break; + } + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + + +// +// CSSFontFaceRule finalizer +// +PR_STATIC_CALLBACK(void) +FinalizeCSSFontFaceRule(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSFontFaceRule *a = (nsIDOMCSSFontFaceRule*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == a->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + owner->SetScriptObject(nsnull); + NS_RELEASE(owner); + } + + NS_RELEASE(a); + } +} + + +// +// CSSFontFaceRule enumerate +// +PR_STATIC_CALLBACK(JSBool) +EnumerateCSSFontFaceRule(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSFontFaceRule *a = (nsIDOMCSSFontFaceRule*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->EnumerateProperty(cx); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +// +// CSSFontFaceRule resolve +// +PR_STATIC_CALLBACK(JSBool) +ResolveCSSFontFaceRule(JSContext *cx, JSObject *obj, jsval id) +{ + nsIDOMCSSFontFaceRule *a = (nsIDOMCSSFontFaceRule*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->Resolve(cx, id); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +/***********************************************************************/ +// +// class for CSSFontFaceRule +// +JSClass CSSFontFaceRuleClass = { + "CSSFontFaceRule", + JSCLASS_HAS_PRIVATE, + JS_PropertyStub, + JS_PropertyStub, + GetCSSFontFaceRuleProperty, + SetCSSFontFaceRuleProperty, + EnumerateCSSFontFaceRule, + ResolveCSSFontFaceRule, + JS_ConvertStub, + FinalizeCSSFontFaceRule +}; + + +// +// CSSFontFaceRule class properties +// +static JSPropertySpec CSSFontFaceRuleProperties[] = +{ + {"style", CSSFONTFACERULE_STYLE, JSPROP_ENUMERATE}, + {0} +}; + + +// +// CSSFontFaceRule class methods +// +static JSFunctionSpec CSSFontFaceRuleMethods[] = +{ + {0} +}; + + +// +// CSSFontFaceRule constructor +// +PR_STATIC_CALLBACK(JSBool) +CSSFontFaceRule(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + return JS_FALSE; +} + + +// +// CSSFontFaceRule class initialization +// +nsresult NS_InitCSSFontFaceRuleClass(nsIScriptContext *aContext, void **aPrototype) +{ + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + JSObject *proto = nsnull; + JSObject *constructor = nsnull; + JSObject *parent_proto = nsnull; + JSObject *global = JS_GetGlobalObject(jscontext); + jsval vp; + + if ((PR_TRUE != JS_LookupProperty(jscontext, global, "CSSFontFaceRule", &vp)) || + !JSVAL_IS_OBJECT(vp) || + ((constructor = JSVAL_TO_OBJECT(vp)) == nsnull) || + (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || + !JSVAL_IS_OBJECT(vp)) { + + if (NS_OK != NS_InitCSSStyleRuleClass(aContext, (void **)&parent_proto)) { + return NS_ERROR_FAILURE; + } + proto = JS_InitClass(jscontext, // context + global, // global object + parent_proto, // parent proto + &CSSFontFaceRuleClass, // JSClass + CSSFontFaceRule, // JSNative ctor + 0, // ctor args + CSSFontFaceRuleProperties, // proto props + CSSFontFaceRuleMethods, // proto funcs + nsnull, // ctor props (static) + nsnull); // ctor funcs (static) + if (nsnull == proto) { + return NS_ERROR_FAILURE; + } + + } + else if ((nsnull != constructor) && JSVAL_IS_OBJECT(vp)) { + proto = JSVAL_TO_OBJECT(vp); + } + else { + return NS_ERROR_FAILURE; + } + + if (aPrototype) { + *aPrototype = proto; + } + return NS_OK; +} + + +// +// Method for creating a new CSSFontFaceRule JavaScript object +// +extern "C" NS_DOM nsresult NS_NewScriptCSSFontFaceRule(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +{ + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptCSSFontFaceRule"); + JSObject *proto; + JSObject *parent; + nsIScriptObjectOwner *owner; + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + nsresult result = NS_OK; + nsIDOMCSSFontFaceRule *aCSSFontFaceRule; + + if (nsnull == aParent) { + parent = nsnull; + } + else if (NS_OK == aParent->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + if (NS_OK != owner->GetScriptObject(aContext, (void **)&parent)) { + NS_RELEASE(owner); + return NS_ERROR_FAILURE; + } + NS_RELEASE(owner); + } + else { + return NS_ERROR_FAILURE; + } + + if (NS_OK != NS_InitCSSFontFaceRuleClass(aContext, (void **)&proto)) { + return NS_ERROR_FAILURE; + } + + result = aSupports->QueryInterface(kICSSFontFaceRuleIID, (void **)&aCSSFontFaceRule); + if (NS_OK != result) { + return result; + } + + // create a js object for this class + *aReturn = JS_NewObject(jscontext, &CSSFontFaceRuleClass, proto, parent); + if (nsnull != *aReturn) { + // connect the native object to the js object + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aCSSFontFaceRule); + } + else { + NS_RELEASE(aCSSFontFaceRule); + return NS_ERROR_FAILURE; + } + + return NS_OK; +} diff --git a/dom/src/css/nsJSCSSMediaRule.cpp b/dom/src/css/nsJSCSSMediaRule.cpp new file mode 100644 index 000000000000..f13fb94fc128 --- /dev/null +++ b/dom/src/css/nsJSCSSMediaRule.cpp @@ -0,0 +1,493 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#include "jsapi.h" +#include "nscore.h" +#include "nsIScriptContext.h" +#include "nsIJSScriptObject.h" +#include "nsIScriptObjectOwner.h" +#include "nsIScriptGlobalObject.h" +#include "nsIPtr.h" +#include "nsString.h" +#include "nsIDOMCSSStyleRuleCollection.h" +#include "nsIDOMCSSMediaRule.h" + + +static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); +static NS_DEFINE_IID(kIJSScriptObjectIID, NS_IJSSCRIPTOBJECT_IID); +static NS_DEFINE_IID(kIScriptGlobalObjectIID, NS_ISCRIPTGLOBALOBJECT_IID); +static NS_DEFINE_IID(kICSSStyleRuleCollectionIID, NS_IDOMCSSSTYLERULECOLLECTION_IID); +static NS_DEFINE_IID(kICSSMediaRuleIID, NS_IDOMCSSMEDIARULE_IID); + +NS_DEF_PTR(nsIDOMCSSStyleRuleCollection); +NS_DEF_PTR(nsIDOMCSSMediaRule); + +// +// CSSMediaRule property ids +// +enum CSSMediaRule_slots { + CSSMEDIARULE_MEDIATYPES = -1, + CSSMEDIARULE_RULES = -2 +}; + +/***********************************************************************/ +// +// CSSMediaRule Properties Getter +// +PR_STATIC_CALLBACK(JSBool) +GetCSSMediaRuleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSMediaRule *a = (nsIDOMCSSMediaRule*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case CSSMEDIARULE_MEDIATYPES: + { + nsAutoString prop; + if (NS_OK == a->GetMediaTypes(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSMEDIARULE_RULES: + { + nsIDOMCSSStyleRuleCollection* prop; + if (NS_OK == a->GetRules(&prop)) { + // get the js object + if (prop != nsnull) { + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == prop->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + JSObject *object = nsnull; + nsIScriptContext *script_cx = (nsIScriptContext *)JS_GetContextPrivate(cx); + if (NS_OK == owner->GetScriptObject(script_cx, (void**)&object)) { + // set the return value + *vp = OBJECT_TO_JSVAL(object); + } + NS_RELEASE(owner); + } + NS_RELEASE(prop); + } + else { + *vp = JSVAL_NULL; + } + } + else { + return JS_FALSE; + } + break; + } + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + +/***********************************************************************/ +// +// CSSMediaRule Properties Setter +// +PR_STATIC_CALLBACK(JSBool) +SetCSSMediaRuleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSMediaRule *a = (nsIDOMCSSMediaRule*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case CSSMEDIARULE_MEDIATYPES: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetMediaTypes(prop); + + break; + } + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + + +// +// CSSMediaRule finalizer +// +PR_STATIC_CALLBACK(void) +FinalizeCSSMediaRule(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSMediaRule *a = (nsIDOMCSSMediaRule*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == a->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + owner->SetScriptObject(nsnull); + NS_RELEASE(owner); + } + + NS_RELEASE(a); + } +} + + +// +// CSSMediaRule enumerate +// +PR_STATIC_CALLBACK(JSBool) +EnumerateCSSMediaRule(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSMediaRule *a = (nsIDOMCSSMediaRule*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->EnumerateProperty(cx); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +// +// CSSMediaRule resolve +// +PR_STATIC_CALLBACK(JSBool) +ResolveCSSMediaRule(JSContext *cx, JSObject *obj, jsval id) +{ + nsIDOMCSSMediaRule *a = (nsIDOMCSSMediaRule*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->Resolve(cx, id); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +// +// Native method AddRule +// +PR_STATIC_CALLBACK(JSBool) +CSSMediaRuleAddRule(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMCSSMediaRule *nativeThis = (nsIDOMCSSMediaRule*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + PRUint32 nativeRet; + nsAutoString b0; + nsAutoString b1; + PRUint32 b2; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 3) { + + JSString *jsstring0 = JS_ValueToString(cx, argv[0]); + if (nsnull != jsstring0) { + b0.SetString(JS_GetStringChars(jsstring0)); + } + else { + b0.SetString(""); // Should this really be null?? + } + + JSString *jsstring1 = JS_ValueToString(cx, argv[1]); + if (nsnull != jsstring1) { + b1.SetString(JS_GetStringChars(jsstring1)); + } + else { + b1.SetString(""); // Should this really be null?? + } + + if (!JS_ValueToInt32(cx, argv[2], (int32 *)&b2)) { + JS_ReportError(cx, "Parameter must be a number"); + return JS_FALSE; + } + + if (NS_OK != nativeThis->AddRule(b0, b1, b2, &nativeRet)) { + return JS_FALSE; + } + + *rval = INT_TO_JSVAL(nativeRet); + } + else { + JS_ReportError(cx, "Function addRule requires 3 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +// +// Native method RemoveRule +// +PR_STATIC_CALLBACK(JSBool) +CSSMediaRuleRemoveRule(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMCSSMediaRule *nativeThis = (nsIDOMCSSMediaRule*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + PRUint32 b0; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 1) { + + if (!JS_ValueToInt32(cx, argv[0], (int32 *)&b0)) { + JS_ReportError(cx, "Parameter must be a number"); + return JS_FALSE; + } + + if (NS_OK != nativeThis->RemoveRule(b0)) { + return JS_FALSE; + } + + *rval = JSVAL_VOID; + } + else { + JS_ReportError(cx, "Function removeRule requires 1 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +/***********************************************************************/ +// +// class for CSSMediaRule +// +JSClass CSSMediaRuleClass = { + "CSSMediaRule", + JSCLASS_HAS_PRIVATE, + JS_PropertyStub, + JS_PropertyStub, + GetCSSMediaRuleProperty, + SetCSSMediaRuleProperty, + EnumerateCSSMediaRule, + ResolveCSSMediaRule, + JS_ConvertStub, + FinalizeCSSMediaRule +}; + + +// +// CSSMediaRule class properties +// +static JSPropertySpec CSSMediaRuleProperties[] = +{ + {"mediaTypes", CSSMEDIARULE_MEDIATYPES, JSPROP_ENUMERATE}, + {"rules", CSSMEDIARULE_RULES, JSPROP_ENUMERATE | JSPROP_READONLY}, + {0} +}; + + +// +// CSSMediaRule class methods +// +static JSFunctionSpec CSSMediaRuleMethods[] = +{ + {"addRule", CSSMediaRuleAddRule, 3}, + {"removeRule", CSSMediaRuleRemoveRule, 1}, + {0} +}; + + +// +// CSSMediaRule constructor +// +PR_STATIC_CALLBACK(JSBool) +CSSMediaRule(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + return JS_FALSE; +} + + +// +// CSSMediaRule class initialization +// +nsresult NS_InitCSSMediaRuleClass(nsIScriptContext *aContext, void **aPrototype) +{ + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + JSObject *proto = nsnull; + JSObject *constructor = nsnull; + JSObject *parent_proto = nsnull; + JSObject *global = JS_GetGlobalObject(jscontext); + jsval vp; + + if ((PR_TRUE != JS_LookupProperty(jscontext, global, "CSSMediaRule", &vp)) || + !JSVAL_IS_OBJECT(vp) || + ((constructor = JSVAL_TO_OBJECT(vp)) == nsnull) || + (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || + !JSVAL_IS_OBJECT(vp)) { + + if (NS_OK != NS_InitCSSStyleRuleClass(aContext, (void **)&parent_proto)) { + return NS_ERROR_FAILURE; + } + proto = JS_InitClass(jscontext, // context + global, // global object + parent_proto, // parent proto + &CSSMediaRuleClass, // JSClass + CSSMediaRule, // JSNative ctor + 0, // ctor args + CSSMediaRuleProperties, // proto props + CSSMediaRuleMethods, // proto funcs + nsnull, // ctor props (static) + nsnull); // ctor funcs (static) + if (nsnull == proto) { + return NS_ERROR_FAILURE; + } + + } + else if ((nsnull != constructor) && JSVAL_IS_OBJECT(vp)) { + proto = JSVAL_TO_OBJECT(vp); + } + else { + return NS_ERROR_FAILURE; + } + + if (aPrototype) { + *aPrototype = proto; + } + return NS_OK; +} + + +// +// Method for creating a new CSSMediaRule JavaScript object +// +extern "C" NS_DOM nsresult NS_NewScriptCSSMediaRule(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +{ + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptCSSMediaRule"); + JSObject *proto; + JSObject *parent; + nsIScriptObjectOwner *owner; + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + nsresult result = NS_OK; + nsIDOMCSSMediaRule *aCSSMediaRule; + + if (nsnull == aParent) { + parent = nsnull; + } + else if (NS_OK == aParent->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + if (NS_OK != owner->GetScriptObject(aContext, (void **)&parent)) { + NS_RELEASE(owner); + return NS_ERROR_FAILURE; + } + NS_RELEASE(owner); + } + else { + return NS_ERROR_FAILURE; + } + + if (NS_OK != NS_InitCSSMediaRuleClass(aContext, (void **)&proto)) { + return NS_ERROR_FAILURE; + } + + result = aSupports->QueryInterface(kICSSMediaRuleIID, (void **)&aCSSMediaRule); + if (NS_OK != result) { + return result; + } + + // create a js object for this class + *aReturn = JS_NewObject(jscontext, &CSSMediaRuleClass, proto, parent); + if (nsnull != *aReturn) { + // connect the native object to the js object + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aCSSMediaRule); + } + else { + NS_RELEASE(aCSSMediaRule); + return NS_ERROR_FAILURE; + } + + return NS_OK; +} diff --git a/dom/src/css/nsJSCSSPageRule.cpp b/dom/src/css/nsJSCSSPageRule.cpp new file mode 100644 index 000000000000..b733673edf22 --- /dev/null +++ b/dom/src/css/nsJSCSSPageRule.cpp @@ -0,0 +1,417 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#include "jsapi.h" +#include "nscore.h" +#include "nsIScriptContext.h" +#include "nsIJSScriptObject.h" +#include "nsIScriptObjectOwner.h" +#include "nsIScriptGlobalObject.h" +#include "nsIPtr.h" +#include "nsString.h" +#include "nsIDOMCSSPageRule.h" +#include "nsIDOMCSSStyleDeclaration.h" + + +static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); +static NS_DEFINE_IID(kIJSScriptObjectIID, NS_IJSSCRIPTOBJECT_IID); +static NS_DEFINE_IID(kIScriptGlobalObjectIID, NS_ISCRIPTGLOBALOBJECT_IID); +static NS_DEFINE_IID(kICSSPageRuleIID, NS_IDOMCSSPAGERULE_IID); +static NS_DEFINE_IID(kICSSStyleDeclarationIID, NS_IDOMCSSSTYLEDECLARATION_IID); + +NS_DEF_PTR(nsIDOMCSSPageRule); +NS_DEF_PTR(nsIDOMCSSStyleDeclaration); + +// +// CSSPageRule property ids +// +enum CSSPageRule_slots { + CSSPAGERULE_SELECTORTEXT = -1, + CSSPAGERULE_STYLE = -2 +}; + +/***********************************************************************/ +// +// CSSPageRule Properties Getter +// +PR_STATIC_CALLBACK(JSBool) +GetCSSPageRuleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSPageRule *a = (nsIDOMCSSPageRule*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case CSSPAGERULE_SELECTORTEXT: + { + nsAutoString prop; + if (NS_OK == a->GetSelectorText(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSPAGERULE_STYLE: + { + nsIDOMCSSStyleDeclaration* prop; + if (NS_OK == a->GetStyle(&prop)) { + // get the js object + if (prop != nsnull) { + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == prop->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + JSObject *object = nsnull; + nsIScriptContext *script_cx = (nsIScriptContext *)JS_GetContextPrivate(cx); + if (NS_OK == owner->GetScriptObject(script_cx, (void**)&object)) { + // set the return value + *vp = OBJECT_TO_JSVAL(object); + } + NS_RELEASE(owner); + } + NS_RELEASE(prop); + } + else { + *vp = JSVAL_NULL; + } + } + else { + return JS_FALSE; + } + break; + } + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + +/***********************************************************************/ +// +// CSSPageRule Properties Setter +// +PR_STATIC_CALLBACK(JSBool) +SetCSSPageRuleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSPageRule *a = (nsIDOMCSSPageRule*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case CSSPAGERULE_SELECTORTEXT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetSelectorText(prop); + + break; + } + case CSSPAGERULE_STYLE: + { + nsIDOMCSSStyleDeclaration* prop; + if (JSVAL_IS_NULL(*vp)) { + prop = nsnull; + } + else if (JSVAL_IS_OBJECT(*vp)) { + JSObject *jsobj = JSVAL_TO_OBJECT(*vp); + nsISupports *supports = (nsISupports *)JS_GetPrivate(cx, jsobj); + if (NS_OK != supports->QueryInterface(kICSSStyleDeclarationIID, (void **)&prop)) { + JS_ReportError(cx, "Parameter must be of type CSSStyleDeclaration"); + return JS_FALSE; + } + } + else { + JS_ReportError(cx, "Parameter must be an object"); + return JS_FALSE; + } + + a->SetStyle(prop); + if (prop) NS_RELEASE(prop); + break; + } + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + + +// +// CSSPageRule finalizer +// +PR_STATIC_CALLBACK(void) +FinalizeCSSPageRule(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSPageRule *a = (nsIDOMCSSPageRule*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == a->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + owner->SetScriptObject(nsnull); + NS_RELEASE(owner); + } + + NS_RELEASE(a); + } +} + + +// +// CSSPageRule enumerate +// +PR_STATIC_CALLBACK(JSBool) +EnumerateCSSPageRule(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSPageRule *a = (nsIDOMCSSPageRule*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->EnumerateProperty(cx); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +// +// CSSPageRule resolve +// +PR_STATIC_CALLBACK(JSBool) +ResolveCSSPageRule(JSContext *cx, JSObject *obj, jsval id) +{ + nsIDOMCSSPageRule *a = (nsIDOMCSSPageRule*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->Resolve(cx, id); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +/***********************************************************************/ +// +// class for CSSPageRule +// +JSClass CSSPageRuleClass = { + "CSSPageRule", + JSCLASS_HAS_PRIVATE, + JS_PropertyStub, + JS_PropertyStub, + GetCSSPageRuleProperty, + SetCSSPageRuleProperty, + EnumerateCSSPageRule, + ResolveCSSPageRule, + JS_ConvertStub, + FinalizeCSSPageRule +}; + + +// +// CSSPageRule class properties +// +static JSPropertySpec CSSPageRuleProperties[] = +{ + {"selectorText", CSSPAGERULE_SELECTORTEXT, JSPROP_ENUMERATE}, + {"style", CSSPAGERULE_STYLE, JSPROP_ENUMERATE}, + {0} +}; + + +// +// CSSPageRule class methods +// +static JSFunctionSpec CSSPageRuleMethods[] = +{ + {0} +}; + + +// +// CSSPageRule constructor +// +PR_STATIC_CALLBACK(JSBool) +CSSPageRule(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + return JS_FALSE; +} + + +// +// CSSPageRule class initialization +// +nsresult NS_InitCSSPageRuleClass(nsIScriptContext *aContext, void **aPrototype) +{ + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + JSObject *proto = nsnull; + JSObject *constructor = nsnull; + JSObject *parent_proto = nsnull; + JSObject *global = JS_GetGlobalObject(jscontext); + jsval vp; + + if ((PR_TRUE != JS_LookupProperty(jscontext, global, "CSSPageRule", &vp)) || + !JSVAL_IS_OBJECT(vp) || + ((constructor = JSVAL_TO_OBJECT(vp)) == nsnull) || + (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || + !JSVAL_IS_OBJECT(vp)) { + + if (NS_OK != NS_InitCSSStyleRuleClass(aContext, (void **)&parent_proto)) { + return NS_ERROR_FAILURE; + } + proto = JS_InitClass(jscontext, // context + global, // global object + parent_proto, // parent proto + &CSSPageRuleClass, // JSClass + CSSPageRule, // JSNative ctor + 0, // ctor args + CSSPageRuleProperties, // proto props + CSSPageRuleMethods, // proto funcs + nsnull, // ctor props (static) + nsnull); // ctor funcs (static) + if (nsnull == proto) { + return NS_ERROR_FAILURE; + } + + } + else if ((nsnull != constructor) && JSVAL_IS_OBJECT(vp)) { + proto = JSVAL_TO_OBJECT(vp); + } + else { + return NS_ERROR_FAILURE; + } + + if (aPrototype) { + *aPrototype = proto; + } + return NS_OK; +} + + +// +// Method for creating a new CSSPageRule JavaScript object +// +extern "C" NS_DOM nsresult NS_NewScriptCSSPageRule(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +{ + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptCSSPageRule"); + JSObject *proto; + JSObject *parent; + nsIScriptObjectOwner *owner; + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + nsresult result = NS_OK; + nsIDOMCSSPageRule *aCSSPageRule; + + if (nsnull == aParent) { + parent = nsnull; + } + else if (NS_OK == aParent->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + if (NS_OK != owner->GetScriptObject(aContext, (void **)&parent)) { + NS_RELEASE(owner); + return NS_ERROR_FAILURE; + } + NS_RELEASE(owner); + } + else { + return NS_ERROR_FAILURE; + } + + if (NS_OK != NS_InitCSSPageRuleClass(aContext, (void **)&proto)) { + return NS_ERROR_FAILURE; + } + + result = aSupports->QueryInterface(kICSSPageRuleIID, (void **)&aCSSPageRule); + if (NS_OK != result) { + return result; + } + + // create a js object for this class + *aReturn = JS_NewObject(jscontext, &CSSPageRuleClass, proto, parent); + if (nsnull != *aReturn) { + // connect the native object to the js object + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aCSSPageRule); + } + else { + NS_RELEASE(aCSSPageRule); + return NS_ERROR_FAILURE; + } + + return NS_OK; +} diff --git a/dom/src/css/nsJSCSSStyleDeclaration.cpp b/dom/src/css/nsJSCSSStyleDeclaration.cpp new file mode 100644 index 000000000000..e74ea645ef9b --- /dev/null +++ b/dom/src/css/nsJSCSSStyleDeclaration.cpp @@ -0,0 +1,4200 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#include "jsapi.h" +#include "nscore.h" +#include "nsIScriptContext.h" +#include "nsIJSScriptObject.h" +#include "nsIScriptObjectOwner.h" +#include "nsIScriptGlobalObject.h" +#include "nsIPtr.h" +#include "nsString.h" +#include "nsIDOMCSSStyleDeclaration.h" + + +static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); +static NS_DEFINE_IID(kIJSScriptObjectIID, NS_IJSSCRIPTOBJECT_IID); +static NS_DEFINE_IID(kIScriptGlobalObjectIID, NS_ISCRIPTGLOBALOBJECT_IID); +static NS_DEFINE_IID(kICSSStyleDeclarationIID, NS_IDOMCSSSTYLEDECLARATION_IID); + +NS_DEF_PTR(nsIDOMCSSStyleDeclaration); + +// +// CSSStyleDeclaration property ids +// +enum CSSStyleDeclaration_slots { + CSSSTYLEDECLARATION_LENGTH = -1, + CSSSTYLEDECLARATION_AZIMUTH = -2, + CSSSTYLEDECLARATION_BACKGROUND = -3, + CSSSTYLEDECLARATION_BACKGROUNDATTACHMENT = -4, + CSSSTYLEDECLARATION_BACKGROUNDCOLOR = -5, + CSSSTYLEDECLARATION_BACKGROUNDIMAGE = -6, + CSSSTYLEDECLARATION_BACKGROUNDPOSITION = -7, + CSSSTYLEDECLARATION_BACKGROUNDREPEAT = -8, + CSSSTYLEDECLARATION_BORDER = -9, + CSSSTYLEDECLARATION_BORDERCOLLAPSE = -10, + CSSSTYLEDECLARATION_BORDERCOLOR = -11, + CSSSTYLEDECLARATION_BORDERSPACING = -12, + CSSSTYLEDECLARATION_BORDERSTYLE = -13, + CSSSTYLEDECLARATION_BORDERTOP = -14, + CSSSTYLEDECLARATION_BORDERRIGHT = -15, + CSSSTYLEDECLARATION_BORDERBOTTOM = -16, + CSSSTYLEDECLARATION_BORDERLEFT = -17, + CSSSTYLEDECLARATION_BORDERTOPCOLOR = -18, + CSSSTYLEDECLARATION_BORDERRIGHTCOLOR = -19, + CSSSTYLEDECLARATION_BORDERBOTTOMCOLOR = -20, + CSSSTYLEDECLARATION_BORDERLEFTCOLOR = -21, + CSSSTYLEDECLARATION_BORDERTOPSTYLE = -22, + CSSSTYLEDECLARATION_BORDERRIGHTSTYLE = -23, + CSSSTYLEDECLARATION_BORDERBOTTOMSTYLE = -24, + CSSSTYLEDECLARATION_BORDERLEFTSTYLE = -25, + CSSSTYLEDECLARATION_BORDERTOPWIDTH = -26, + CSSSTYLEDECLARATION_BORDERRIGHTWIDTH = -27, + CSSSTYLEDECLARATION_BORDERBOTTOMWIDTH = -28, + CSSSTYLEDECLARATION_BORDERLEFTWIDTH = -29, + CSSSTYLEDECLARATION_BORDERWIDTH = -30, + CSSSTYLEDECLARATION_BOTTOM = -31, + CSSSTYLEDECLARATION_CAPTIONSIDE = -32, + CSSSTYLEDECLARATION_CLEAR = -33, + CSSSTYLEDECLARATION_CLIP = -34, + CSSSTYLEDECLARATION_COLOR = -35, + CSSSTYLEDECLARATION_CONTENT = -36, + CSSSTYLEDECLARATION_COUNTERINCREMENT = -37, + CSSSTYLEDECLARATION_COUNTERRESET = -38, + CSSSTYLEDECLARATION_CUE = -39, + CSSSTYLEDECLARATION_CUEAFTER = -40, + CSSSTYLEDECLARATION_CUEBEFORE = -41, + CSSSTYLEDECLARATION_CURSOR = -42, + CSSSTYLEDECLARATION_DIRECTION = -43, + CSSSTYLEDECLARATION_DISPLAY = -44, + CSSSTYLEDECLARATION_ELEVATION = -45, + CSSSTYLEDECLARATION_EMPTYCELLS = -46, + CSSSTYLEDECLARATION_STYLEFLOAT = -47, + CSSSTYLEDECLARATION_FONT = -48, + CSSSTYLEDECLARATION_FONTFAMILY = -49, + CSSSTYLEDECLARATION_FONTSIZE = -50, + CSSSTYLEDECLARATION_FONTSIZEADJUST = -51, + CSSSTYLEDECLARATION_FONTSTRETCH = -52, + CSSSTYLEDECLARATION_FONTSTYLE = -53, + CSSSTYLEDECLARATION_FONTVARIANT = -54, + CSSSTYLEDECLARATION_FONTWEIGHT = -55, + CSSSTYLEDECLARATION_HEIGHT = -56, + CSSSTYLEDECLARATION_LEFT = -57, + CSSSTYLEDECLARATION_LETTERSPACING = -58, + CSSSTYLEDECLARATION_LINEHEIGHT = -59, + CSSSTYLEDECLARATION_LISTSTYLE = -60, + CSSSTYLEDECLARATION_LISTSTYLEIMAGE = -61, + CSSSTYLEDECLARATION_LISTSTYLEPOSITION = -62, + CSSSTYLEDECLARATION_LISTSTYLETYPE = -63, + CSSSTYLEDECLARATION_MARGIN = -64, + CSSSTYLEDECLARATION_MARGINTOP = -65, + CSSSTYLEDECLARATION_MARGINRIGHT = -66, + CSSSTYLEDECLARATION_MARGINBOTTOM = -67, + CSSSTYLEDECLARATION_MARGINLEFT = -68, + CSSSTYLEDECLARATION_MARKEROFFSET = -69, + CSSSTYLEDECLARATION_MARKS = -70, + CSSSTYLEDECLARATION_MAXHEIGHT = -71, + CSSSTYLEDECLARATION_MAXWIDTH = -72, + CSSSTYLEDECLARATION_MINHEIGHT = -73, + CSSSTYLEDECLARATION_MINWIDTH = -74, + CSSSTYLEDECLARATION_ORPHANS = -75, + CSSSTYLEDECLARATION_OUTLINE = -76, + CSSSTYLEDECLARATION_OUTLINECOLOR = -77, + CSSSTYLEDECLARATION_OUTLINESTYLE = -78, + CSSSTYLEDECLARATION_OUTLINEWIDTH = -79, + CSSSTYLEDECLARATION_OVERFLOW = -80, + CSSSTYLEDECLARATION_PADDING = -81, + CSSSTYLEDECLARATION_PADDINGTOP = -82, + CSSSTYLEDECLARATION_PADDINGRIGHT = -83, + CSSSTYLEDECLARATION_PADDINGBOTTOM = -84, + CSSSTYLEDECLARATION_PADDINGLEFT = -85, + CSSSTYLEDECLARATION_PAGE = -86, + CSSSTYLEDECLARATION_PAGEBREAKAFTER = -87, + CSSSTYLEDECLARATION_PAGEBREAKBEFORE = -88, + CSSSTYLEDECLARATION_PAGEBREAKINSIDE = -89, + CSSSTYLEDECLARATION_PAUSE = -90, + CSSSTYLEDECLARATION_PAUSEAFTER = -91, + CSSSTYLEDECLARATION_PAUSEBEFORE = -92, + CSSSTYLEDECLARATION_PITCH = -93, + CSSSTYLEDECLARATION_PITCHRANGE = -94, + CSSSTYLEDECLARATION_PLAYDURING = -95, + CSSSTYLEDECLARATION_POSITION = -96, + CSSSTYLEDECLARATION_QUOTES = -97, + CSSSTYLEDECLARATION_RICHNESS = -98, + CSSSTYLEDECLARATION_RIGHT = -99, + CSSSTYLEDECLARATION_SIZE = -100, + CSSSTYLEDECLARATION_SPEAK = -101, + CSSSTYLEDECLARATION_SPEAKHEADER = -102, + CSSSTYLEDECLARATION_SPEAKNUMERAL = -103, + CSSSTYLEDECLARATION_SPEAKPUNCTUATION = -104, + CSSSTYLEDECLARATION_SPEECHRATE = -105, + CSSSTYLEDECLARATION_STRESS = -106, + CSSSTYLEDECLARATION_TABLELAYOUT = -107, + CSSSTYLEDECLARATION_TEXTALIGN = -108, + CSSSTYLEDECLARATION_TEXTDECORATION = -109, + CSSSTYLEDECLARATION_TEXTINDENT = -110, + CSSSTYLEDECLARATION_TEXTSHADOW = -111, + CSSSTYLEDECLARATION_TEXTTRANSFORM = -112, + CSSSTYLEDECLARATION_TOP = -113, + CSSSTYLEDECLARATION_UNICODEBIDI = -114, + CSSSTYLEDECLARATION_VERTICALALIGN = -115, + CSSSTYLEDECLARATION_VISIBILITY = -116, + CSSSTYLEDECLARATION_VOICEFAMILY = -117, + CSSSTYLEDECLARATION_VOLUME = -118, + CSSSTYLEDECLARATION_WHITESPACE = -119, + CSSSTYLEDECLARATION_WIDOWS = -120, + CSSSTYLEDECLARATION_WIDTH = -121, + CSSSTYLEDECLARATION_WORDSPACING = -122, + CSSSTYLEDECLARATION_ZINDEX = -123 +}; + +/***********************************************************************/ +// +// CSSStyleDeclaration Properties Getter +// +PR_STATIC_CALLBACK(JSBool) +GetCSSStyleDeclarationProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSStyleDeclaration *a = (nsIDOMCSSStyleDeclaration*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case CSSSTYLEDECLARATION_LENGTH: + { + PRUint32 prop; + if (NS_OK == a->GetLength(&prop)) { + *vp = INT_TO_JSVAL(prop); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_AZIMUTH: + { + nsAutoString prop; + if (NS_OK == a->GetAzimuth(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BACKGROUND: + { + nsAutoString prop; + if (NS_OK == a->GetBackground(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BACKGROUNDATTACHMENT: + { + nsAutoString prop; + if (NS_OK == a->GetBackgroundAttachment(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BACKGROUNDCOLOR: + { + nsAutoString prop; + if (NS_OK == a->GetBackgroundColor(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BACKGROUNDIMAGE: + { + nsAutoString prop; + if (NS_OK == a->GetBackgroundImage(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BACKGROUNDPOSITION: + { + nsAutoString prop; + if (NS_OK == a->GetBackgroundPosition(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BACKGROUNDREPEAT: + { + nsAutoString prop; + if (NS_OK == a->GetBackgroundRepeat(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDER: + { + nsAutoString prop; + if (NS_OK == a->GetBorder(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERCOLLAPSE: + { + nsAutoString prop; + if (NS_OK == a->GetBorderCollapse(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERCOLOR: + { + nsAutoString prop; + if (NS_OK == a->GetBorderColor(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERSPACING: + { + nsAutoString prop; + if (NS_OK == a->GetBorderSpacing(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERSTYLE: + { + nsAutoString prop; + if (NS_OK == a->GetBorderStyle(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERTOP: + { + nsAutoString prop; + if (NS_OK == a->GetBorderTop(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERRIGHT: + { + nsAutoString prop; + if (NS_OK == a->GetBorderRight(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERBOTTOM: + { + nsAutoString prop; + if (NS_OK == a->GetBorderBottom(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERLEFT: + { + nsAutoString prop; + if (NS_OK == a->GetBorderLeft(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERTOPCOLOR: + { + nsAutoString prop; + if (NS_OK == a->GetBorderTopColor(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERRIGHTCOLOR: + { + nsAutoString prop; + if (NS_OK == a->GetBorderRightColor(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERBOTTOMCOLOR: + { + nsAutoString prop; + if (NS_OK == a->GetBorderBottomColor(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERLEFTCOLOR: + { + nsAutoString prop; + if (NS_OK == a->GetBorderLeftColor(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERTOPSTYLE: + { + nsAutoString prop; + if (NS_OK == a->GetBorderTopStyle(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERRIGHTSTYLE: + { + nsAutoString prop; + if (NS_OK == a->GetBorderRightStyle(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERBOTTOMSTYLE: + { + nsAutoString prop; + if (NS_OK == a->GetBorderBottomStyle(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERLEFTSTYLE: + { + nsAutoString prop; + if (NS_OK == a->GetBorderLeftStyle(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERTOPWIDTH: + { + nsAutoString prop; + if (NS_OK == a->GetBorderTopWidth(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERRIGHTWIDTH: + { + nsAutoString prop; + if (NS_OK == a->GetBorderRightWidth(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERBOTTOMWIDTH: + { + nsAutoString prop; + if (NS_OK == a->GetBorderBottomWidth(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERLEFTWIDTH: + { + nsAutoString prop; + if (NS_OK == a->GetBorderLeftWidth(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BORDERWIDTH: + { + nsAutoString prop; + if (NS_OK == a->GetBorderWidth(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_BOTTOM: + { + nsAutoString prop; + if (NS_OK == a->GetBottom(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_CAPTIONSIDE: + { + nsAutoString prop; + if (NS_OK == a->GetCaptionSide(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_CLEAR: + { + nsAutoString prop; + if (NS_OK == a->GetClear(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_CLIP: + { + nsAutoString prop; + if (NS_OK == a->GetClip(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_COLOR: + { + nsAutoString prop; + if (NS_OK == a->GetColor(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_CONTENT: + { + nsAutoString prop; + if (NS_OK == a->GetContent(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_COUNTERINCREMENT: + { + nsAutoString prop; + if (NS_OK == a->GetCounterIncrement(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_COUNTERRESET: + { + nsAutoString prop; + if (NS_OK == a->GetCounterReset(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_CUE: + { + nsAutoString prop; + if (NS_OK == a->GetCue(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_CUEAFTER: + { + nsAutoString prop; + if (NS_OK == a->GetCueAfter(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_CUEBEFORE: + { + nsAutoString prop; + if (NS_OK == a->GetCueBefore(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_CURSOR: + { + nsAutoString prop; + if (NS_OK == a->GetCursor(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_DIRECTION: + { + nsAutoString prop; + if (NS_OK == a->GetDirection(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_DISPLAY: + { + nsAutoString prop; + if (NS_OK == a->GetDisplay(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_ELEVATION: + { + nsAutoString prop; + if (NS_OK == a->GetElevation(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_EMPTYCELLS: + { + nsAutoString prop; + if (NS_OK == a->GetEmptyCells(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_STYLEFLOAT: + { + nsAutoString prop; + if (NS_OK == a->GetStyleFloat(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_FONT: + { + nsAutoString prop; + if (NS_OK == a->GetFont(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_FONTFAMILY: + { + nsAutoString prop; + if (NS_OK == a->GetFontFamily(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_FONTSIZE: + { + nsAutoString prop; + if (NS_OK == a->GetFontSize(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_FONTSIZEADJUST: + { + nsAutoString prop; + if (NS_OK == a->GetFontSizeAdjust(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_FONTSTRETCH: + { + nsAutoString prop; + if (NS_OK == a->GetFontStretch(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_FONTSTYLE: + { + nsAutoString prop; + if (NS_OK == a->GetFontStyle(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_FONTVARIANT: + { + nsAutoString prop; + if (NS_OK == a->GetFontVariant(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_FONTWEIGHT: + { + nsAutoString prop; + if (NS_OK == a->GetFontWeight(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_HEIGHT: + { + nsAutoString prop; + if (NS_OK == a->GetHeight(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_LEFT: + { + nsAutoString prop; + if (NS_OK == a->GetLeft(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_LETTERSPACING: + { + nsAutoString prop; + if (NS_OK == a->GetLetterSpacing(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_LINEHEIGHT: + { + nsAutoString prop; + if (NS_OK == a->GetLineHeight(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_LISTSTYLE: + { + nsAutoString prop; + if (NS_OK == a->GetListStyle(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_LISTSTYLEIMAGE: + { + nsAutoString prop; + if (NS_OK == a->GetListStyleImage(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_LISTSTYLEPOSITION: + { + nsAutoString prop; + if (NS_OK == a->GetListStylePosition(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_LISTSTYLETYPE: + { + nsAutoString prop; + if (NS_OK == a->GetListStyleType(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_MARGIN: + { + nsAutoString prop; + if (NS_OK == a->GetMargin(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_MARGINTOP: + { + nsAutoString prop; + if (NS_OK == a->GetMarginTop(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_MARGINRIGHT: + { + nsAutoString prop; + if (NS_OK == a->GetMarginRight(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_MARGINBOTTOM: + { + nsAutoString prop; + if (NS_OK == a->GetMarginBottom(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_MARGINLEFT: + { + nsAutoString prop; + if (NS_OK == a->GetMarginLeft(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_MARKEROFFSET: + { + nsAutoString prop; + if (NS_OK == a->GetMarkerOffset(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_MARKS: + { + nsAutoString prop; + if (NS_OK == a->GetMarks(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_MAXHEIGHT: + { + nsAutoString prop; + if (NS_OK == a->GetMaxHeight(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_MAXWIDTH: + { + nsAutoString prop; + if (NS_OK == a->GetMaxWidth(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_MINHEIGHT: + { + nsAutoString prop; + if (NS_OK == a->GetMinHeight(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_MINWIDTH: + { + nsAutoString prop; + if (NS_OK == a->GetMinWidth(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_ORPHANS: + { + nsAutoString prop; + if (NS_OK == a->GetOrphans(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_OUTLINE: + { + nsAutoString prop; + if (NS_OK == a->GetOutline(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_OUTLINECOLOR: + { + nsAutoString prop; + if (NS_OK == a->GetOutlineColor(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_OUTLINESTYLE: + { + nsAutoString prop; + if (NS_OK == a->GetOutlineStyle(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_OUTLINEWIDTH: + { + nsAutoString prop; + if (NS_OK == a->GetOutlineWidth(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_OVERFLOW: + { + nsAutoString prop; + if (NS_OK == a->GetOverflow(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_PADDING: + { + nsAutoString prop; + if (NS_OK == a->GetPadding(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_PADDINGTOP: + { + nsAutoString prop; + if (NS_OK == a->GetPaddingTop(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_PADDINGRIGHT: + { + nsAutoString prop; + if (NS_OK == a->GetPaddingRight(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_PADDINGBOTTOM: + { + nsAutoString prop; + if (NS_OK == a->GetPaddingBottom(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_PADDINGLEFT: + { + nsAutoString prop; + if (NS_OK == a->GetPaddingLeft(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_PAGE: + { + nsAutoString prop; + if (NS_OK == a->GetPage(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_PAGEBREAKAFTER: + { + nsAutoString prop; + if (NS_OK == a->GetPageBreakAfter(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_PAGEBREAKBEFORE: + { + nsAutoString prop; + if (NS_OK == a->GetPageBreakBefore(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_PAGEBREAKINSIDE: + { + nsAutoString prop; + if (NS_OK == a->GetPageBreakInside(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_PAUSE: + { + nsAutoString prop; + if (NS_OK == a->GetPause(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_PAUSEAFTER: + { + nsAutoString prop; + if (NS_OK == a->GetPauseAfter(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_PAUSEBEFORE: + { + nsAutoString prop; + if (NS_OK == a->GetPauseBefore(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_PITCH: + { + nsAutoString prop; + if (NS_OK == a->GetPitch(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_PITCHRANGE: + { + nsAutoString prop; + if (NS_OK == a->GetPitchRange(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_PLAYDURING: + { + nsAutoString prop; + if (NS_OK == a->GetPlayDuring(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_POSITION: + { + nsAutoString prop; + if (NS_OK == a->GetPosition(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_QUOTES: + { + nsAutoString prop; + if (NS_OK == a->GetQuotes(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_RICHNESS: + { + nsAutoString prop; + if (NS_OK == a->GetRichness(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_RIGHT: + { + nsAutoString prop; + if (NS_OK == a->GetRight(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_SIZE: + { + nsAutoString prop; + if (NS_OK == a->GetSize(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_SPEAK: + { + nsAutoString prop; + if (NS_OK == a->GetSpeak(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_SPEAKHEADER: + { + nsAutoString prop; + if (NS_OK == a->GetSpeakHeader(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_SPEAKNUMERAL: + { + nsAutoString prop; + if (NS_OK == a->GetSpeakNumeral(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_SPEAKPUNCTUATION: + { + nsAutoString prop; + if (NS_OK == a->GetSpeakPunctuation(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_SPEECHRATE: + { + nsAutoString prop; + if (NS_OK == a->GetSpeechRate(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_STRESS: + { + nsAutoString prop; + if (NS_OK == a->GetStress(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_TABLELAYOUT: + { + nsAutoString prop; + if (NS_OK == a->GetTableLayout(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_TEXTALIGN: + { + nsAutoString prop; + if (NS_OK == a->GetTextAlign(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_TEXTDECORATION: + { + nsAutoString prop; + if (NS_OK == a->GetTextDecoration(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_TEXTINDENT: + { + nsAutoString prop; + if (NS_OK == a->GetTextIndent(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_TEXTSHADOW: + { + nsAutoString prop; + if (NS_OK == a->GetTextShadow(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_TEXTTRANSFORM: + { + nsAutoString prop; + if (NS_OK == a->GetTextTransform(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_TOP: + { + nsAutoString prop; + if (NS_OK == a->GetTop(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_UNICODEBIDI: + { + nsAutoString prop; + if (NS_OK == a->GetUnicodeBidi(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_VERTICALALIGN: + { + nsAutoString prop; + if (NS_OK == a->GetVerticalAlign(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_VISIBILITY: + { + nsAutoString prop; + if (NS_OK == a->GetVisibility(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_VOICEFAMILY: + { + nsAutoString prop; + if (NS_OK == a->GetVoiceFamily(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_VOLUME: + { + nsAutoString prop; + if (NS_OK == a->GetVolume(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_WHITESPACE: + { + nsAutoString prop; + if (NS_OK == a->GetWhiteSpace(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_WIDOWS: + { + nsAutoString prop; + if (NS_OK == a->GetWidows(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_WIDTH: + { + nsAutoString prop; + if (NS_OK == a->GetWidth(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_WORDSPACING: + { + nsAutoString prop; + if (NS_OK == a->GetWordSpacing(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLEDECLARATION_ZINDEX: + { + nsAutoString prop; + if (NS_OK == a->GetZIndex(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + default: + { + nsAutoString prop; + if (NS_OK == a->Item(JSVAL_TO_INT(id), prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + +/***********************************************************************/ +// +// CSSStyleDeclaration Properties Setter +// +PR_STATIC_CALLBACK(JSBool) +SetCSSStyleDeclarationProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSStyleDeclaration *a = (nsIDOMCSSStyleDeclaration*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case CSSSTYLEDECLARATION_AZIMUTH: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetAzimuth(prop); + + break; + } + case CSSSTYLEDECLARATION_BACKGROUND: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBackground(prop); + + break; + } + case CSSSTYLEDECLARATION_BACKGROUNDATTACHMENT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBackgroundAttachment(prop); + + break; + } + case CSSSTYLEDECLARATION_BACKGROUNDCOLOR: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBackgroundColor(prop); + + break; + } + case CSSSTYLEDECLARATION_BACKGROUNDIMAGE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBackgroundImage(prop); + + break; + } + case CSSSTYLEDECLARATION_BACKGROUNDPOSITION: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBackgroundPosition(prop); + + break; + } + case CSSSTYLEDECLARATION_BACKGROUNDREPEAT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBackgroundRepeat(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDER: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorder(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERCOLLAPSE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderCollapse(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERCOLOR: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderColor(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERSPACING: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderSpacing(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERSTYLE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderStyle(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERTOP: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderTop(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERRIGHT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderRight(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERBOTTOM: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderBottom(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERLEFT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderLeft(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERTOPCOLOR: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderTopColor(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERRIGHTCOLOR: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderRightColor(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERBOTTOMCOLOR: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderBottomColor(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERLEFTCOLOR: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderLeftColor(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERTOPSTYLE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderTopStyle(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERRIGHTSTYLE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderRightStyle(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERBOTTOMSTYLE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderBottomStyle(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERLEFTSTYLE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderLeftStyle(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERTOPWIDTH: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderTopWidth(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERRIGHTWIDTH: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderRightWidth(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERBOTTOMWIDTH: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderBottomWidth(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERLEFTWIDTH: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderLeftWidth(prop); + + break; + } + case CSSSTYLEDECLARATION_BORDERWIDTH: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBorderWidth(prop); + + break; + } + case CSSSTYLEDECLARATION_BOTTOM: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetBottom(prop); + + break; + } + case CSSSTYLEDECLARATION_CAPTIONSIDE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetCaptionSide(prop); + + break; + } + case CSSSTYLEDECLARATION_CLEAR: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetClear(prop); + + break; + } + case CSSSTYLEDECLARATION_CLIP: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetClip(prop); + + break; + } + case CSSSTYLEDECLARATION_COLOR: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetColor(prop); + + break; + } + case CSSSTYLEDECLARATION_CONTENT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetContent(prop); + + break; + } + case CSSSTYLEDECLARATION_COUNTERINCREMENT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetCounterIncrement(prop); + + break; + } + case CSSSTYLEDECLARATION_COUNTERRESET: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetCounterReset(prop); + + break; + } + case CSSSTYLEDECLARATION_CUE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetCue(prop); + + break; + } + case CSSSTYLEDECLARATION_CUEAFTER: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetCueAfter(prop); + + break; + } + case CSSSTYLEDECLARATION_CUEBEFORE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetCueBefore(prop); + + break; + } + case CSSSTYLEDECLARATION_CURSOR: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetCursor(prop); + + break; + } + case CSSSTYLEDECLARATION_DIRECTION: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetDirection(prop); + + break; + } + case CSSSTYLEDECLARATION_DISPLAY: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetDisplay(prop); + + break; + } + case CSSSTYLEDECLARATION_ELEVATION: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetElevation(prop); + + break; + } + case CSSSTYLEDECLARATION_EMPTYCELLS: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetEmptyCells(prop); + + break; + } + case CSSSTYLEDECLARATION_STYLEFLOAT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetStyleFloat(prop); + + break; + } + case CSSSTYLEDECLARATION_FONT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetFont(prop); + + break; + } + case CSSSTYLEDECLARATION_FONTFAMILY: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetFontFamily(prop); + + break; + } + case CSSSTYLEDECLARATION_FONTSIZE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetFontSize(prop); + + break; + } + case CSSSTYLEDECLARATION_FONTSIZEADJUST: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetFontSizeAdjust(prop); + + break; + } + case CSSSTYLEDECLARATION_FONTSTRETCH: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetFontStretch(prop); + + break; + } + case CSSSTYLEDECLARATION_FONTSTYLE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetFontStyle(prop); + + break; + } + case CSSSTYLEDECLARATION_FONTVARIANT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetFontVariant(prop); + + break; + } + case CSSSTYLEDECLARATION_FONTWEIGHT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetFontWeight(prop); + + break; + } + case CSSSTYLEDECLARATION_HEIGHT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetHeight(prop); + + break; + } + case CSSSTYLEDECLARATION_LEFT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetLeft(prop); + + break; + } + case CSSSTYLEDECLARATION_LETTERSPACING: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetLetterSpacing(prop); + + break; + } + case CSSSTYLEDECLARATION_LINEHEIGHT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetLineHeight(prop); + + break; + } + case CSSSTYLEDECLARATION_LISTSTYLE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetListStyle(prop); + + break; + } + case CSSSTYLEDECLARATION_LISTSTYLEIMAGE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetListStyleImage(prop); + + break; + } + case CSSSTYLEDECLARATION_LISTSTYLEPOSITION: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetListStylePosition(prop); + + break; + } + case CSSSTYLEDECLARATION_LISTSTYLETYPE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetListStyleType(prop); + + break; + } + case CSSSTYLEDECLARATION_MARGIN: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetMargin(prop); + + break; + } + case CSSSTYLEDECLARATION_MARGINTOP: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetMarginTop(prop); + + break; + } + case CSSSTYLEDECLARATION_MARGINRIGHT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetMarginRight(prop); + + break; + } + case CSSSTYLEDECLARATION_MARGINBOTTOM: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetMarginBottom(prop); + + break; + } + case CSSSTYLEDECLARATION_MARGINLEFT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetMarginLeft(prop); + + break; + } + case CSSSTYLEDECLARATION_MARKEROFFSET: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetMarkerOffset(prop); + + break; + } + case CSSSTYLEDECLARATION_MARKS: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetMarks(prop); + + break; + } + case CSSSTYLEDECLARATION_MAXHEIGHT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetMaxHeight(prop); + + break; + } + case CSSSTYLEDECLARATION_MAXWIDTH: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetMaxWidth(prop); + + break; + } + case CSSSTYLEDECLARATION_MINHEIGHT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetMinHeight(prop); + + break; + } + case CSSSTYLEDECLARATION_MINWIDTH: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetMinWidth(prop); + + break; + } + case CSSSTYLEDECLARATION_ORPHANS: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetOrphans(prop); + + break; + } + case CSSSTYLEDECLARATION_OUTLINE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetOutline(prop); + + break; + } + case CSSSTYLEDECLARATION_OUTLINECOLOR: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetOutlineColor(prop); + + break; + } + case CSSSTYLEDECLARATION_OUTLINESTYLE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetOutlineStyle(prop); + + break; + } + case CSSSTYLEDECLARATION_OUTLINEWIDTH: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetOutlineWidth(prop); + + break; + } + case CSSSTYLEDECLARATION_OVERFLOW: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetOverflow(prop); + + break; + } + case CSSSTYLEDECLARATION_PADDING: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPadding(prop); + + break; + } + case CSSSTYLEDECLARATION_PADDINGTOP: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPaddingTop(prop); + + break; + } + case CSSSTYLEDECLARATION_PADDINGRIGHT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPaddingRight(prop); + + break; + } + case CSSSTYLEDECLARATION_PADDINGBOTTOM: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPaddingBottom(prop); + + break; + } + case CSSSTYLEDECLARATION_PADDINGLEFT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPaddingLeft(prop); + + break; + } + case CSSSTYLEDECLARATION_PAGE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPage(prop); + + break; + } + case CSSSTYLEDECLARATION_PAGEBREAKAFTER: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPageBreakAfter(prop); + + break; + } + case CSSSTYLEDECLARATION_PAGEBREAKBEFORE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPageBreakBefore(prop); + + break; + } + case CSSSTYLEDECLARATION_PAGEBREAKINSIDE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPageBreakInside(prop); + + break; + } + case CSSSTYLEDECLARATION_PAUSE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPause(prop); + + break; + } + case CSSSTYLEDECLARATION_PAUSEAFTER: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPauseAfter(prop); + + break; + } + case CSSSTYLEDECLARATION_PAUSEBEFORE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPauseBefore(prop); + + break; + } + case CSSSTYLEDECLARATION_PITCH: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPitch(prop); + + break; + } + case CSSSTYLEDECLARATION_PITCHRANGE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPitchRange(prop); + + break; + } + case CSSSTYLEDECLARATION_PLAYDURING: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPlayDuring(prop); + + break; + } + case CSSSTYLEDECLARATION_POSITION: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetPosition(prop); + + break; + } + case CSSSTYLEDECLARATION_QUOTES: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetQuotes(prop); + + break; + } + case CSSSTYLEDECLARATION_RICHNESS: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetRichness(prop); + + break; + } + case CSSSTYLEDECLARATION_RIGHT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetRight(prop); + + break; + } + case CSSSTYLEDECLARATION_SIZE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetSize(prop); + + break; + } + case CSSSTYLEDECLARATION_SPEAK: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetSpeak(prop); + + break; + } + case CSSSTYLEDECLARATION_SPEAKHEADER: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetSpeakHeader(prop); + + break; + } + case CSSSTYLEDECLARATION_SPEAKNUMERAL: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetSpeakNumeral(prop); + + break; + } + case CSSSTYLEDECLARATION_SPEAKPUNCTUATION: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetSpeakPunctuation(prop); + + break; + } + case CSSSTYLEDECLARATION_SPEECHRATE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetSpeechRate(prop); + + break; + } + case CSSSTYLEDECLARATION_STRESS: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetStress(prop); + + break; + } + case CSSSTYLEDECLARATION_TABLELAYOUT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetTableLayout(prop); + + break; + } + case CSSSTYLEDECLARATION_TEXTALIGN: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetTextAlign(prop); + + break; + } + case CSSSTYLEDECLARATION_TEXTDECORATION: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetTextDecoration(prop); + + break; + } + case CSSSTYLEDECLARATION_TEXTINDENT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetTextIndent(prop); + + break; + } + case CSSSTYLEDECLARATION_TEXTSHADOW: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetTextShadow(prop); + + break; + } + case CSSSTYLEDECLARATION_TEXTTRANSFORM: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetTextTransform(prop); + + break; + } + case CSSSTYLEDECLARATION_TOP: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetTop(prop); + + break; + } + case CSSSTYLEDECLARATION_UNICODEBIDI: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetUnicodeBidi(prop); + + break; + } + case CSSSTYLEDECLARATION_VERTICALALIGN: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetVerticalAlign(prop); + + break; + } + case CSSSTYLEDECLARATION_VISIBILITY: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetVisibility(prop); + + break; + } + case CSSSTYLEDECLARATION_VOICEFAMILY: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetVoiceFamily(prop); + + break; + } + case CSSSTYLEDECLARATION_VOLUME: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetVolume(prop); + + break; + } + case CSSSTYLEDECLARATION_WHITESPACE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetWhiteSpace(prop); + + break; + } + case CSSSTYLEDECLARATION_WIDOWS: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetWidows(prop); + + break; + } + case CSSSTYLEDECLARATION_WIDTH: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetWidth(prop); + + break; + } + case CSSSTYLEDECLARATION_WORDSPACING: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetWordSpacing(prop); + + break; + } + case CSSSTYLEDECLARATION_ZINDEX: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetZIndex(prop); + + break; + } + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + + +// +// CSSStyleDeclaration finalizer +// +PR_STATIC_CALLBACK(void) +FinalizeCSSStyleDeclaration(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSStyleDeclaration *a = (nsIDOMCSSStyleDeclaration*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == a->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + owner->SetScriptObject(nsnull); + NS_RELEASE(owner); + } + + NS_RELEASE(a); + } +} + + +// +// CSSStyleDeclaration enumerate +// +PR_STATIC_CALLBACK(JSBool) +EnumerateCSSStyleDeclaration(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSStyleDeclaration *a = (nsIDOMCSSStyleDeclaration*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->EnumerateProperty(cx); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +// +// CSSStyleDeclaration resolve +// +PR_STATIC_CALLBACK(JSBool) +ResolveCSSStyleDeclaration(JSContext *cx, JSObject *obj, jsval id) +{ + nsIDOMCSSStyleDeclaration *a = (nsIDOMCSSStyleDeclaration*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->Resolve(cx, id); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +// +// Native method GetPropertyValue +// +PR_STATIC_CALLBACK(JSBool) +CSSStyleDeclarationGetPropertyValue(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMCSSStyleDeclaration *nativeThis = (nsIDOMCSSStyleDeclaration*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + nsAutoString nativeRet; + nsAutoString b0; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 1) { + + JSString *jsstring0 = JS_ValueToString(cx, argv[0]); + if (nsnull != jsstring0) { + b0.SetString(JS_GetStringChars(jsstring0)); + } + else { + b0.SetString(""); // Should this really be null?? + } + + if (NS_OK != nativeThis->GetPropertyValue(b0, nativeRet)) { + return JS_FALSE; + } + + JSString *jsstring = JS_NewUCStringCopyN(cx, nativeRet, nativeRet.Length()); + // set the return value + *rval = STRING_TO_JSVAL(jsstring); + } + else { + JS_ReportError(cx, "Function getPropertyValue requires 1 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +// +// Native method GetPropertyPriority +// +PR_STATIC_CALLBACK(JSBool) +CSSStyleDeclarationGetPropertyPriority(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMCSSStyleDeclaration *nativeThis = (nsIDOMCSSStyleDeclaration*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + nsAutoString nativeRet; + nsAutoString b0; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 1) { + + JSString *jsstring0 = JS_ValueToString(cx, argv[0]); + if (nsnull != jsstring0) { + b0.SetString(JS_GetStringChars(jsstring0)); + } + else { + b0.SetString(""); // Should this really be null?? + } + + if (NS_OK != nativeThis->GetPropertyPriority(b0, nativeRet)) { + return JS_FALSE; + } + + JSString *jsstring = JS_NewUCStringCopyN(cx, nativeRet, nativeRet.Length()); + // set the return value + *rval = STRING_TO_JSVAL(jsstring); + } + else { + JS_ReportError(cx, "Function getPropertyPriority requires 1 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +// +// Native method SetProperty +// +PR_STATIC_CALLBACK(JSBool) +CSSStyleDeclarationSetProperty(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMCSSStyleDeclaration *nativeThis = (nsIDOMCSSStyleDeclaration*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + nsAutoString b0; + nsAutoString b1; + nsAutoString b2; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 3) { + + JSString *jsstring0 = JS_ValueToString(cx, argv[0]); + if (nsnull != jsstring0) { + b0.SetString(JS_GetStringChars(jsstring0)); + } + else { + b0.SetString(""); // Should this really be null?? + } + + JSString *jsstring1 = JS_ValueToString(cx, argv[1]); + if (nsnull != jsstring1) { + b1.SetString(JS_GetStringChars(jsstring1)); + } + else { + b1.SetString(""); // Should this really be null?? + } + + JSString *jsstring2 = JS_ValueToString(cx, argv[2]); + if (nsnull != jsstring2) { + b2.SetString(JS_GetStringChars(jsstring2)); + } + else { + b2.SetString(""); // Should this really be null?? + } + + if (NS_OK != nativeThis->SetProperty(b0, b1, b2)) { + return JS_FALSE; + } + + *rval = JSVAL_VOID; + } + else { + JS_ReportError(cx, "Function setProperty requires 3 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +// +// Native method Item +// +PR_STATIC_CALLBACK(JSBool) +CSSStyleDeclarationItem(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMCSSStyleDeclaration *nativeThis = (nsIDOMCSSStyleDeclaration*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + nsAutoString nativeRet; + PRUint32 b0; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 1) { + + if (!JS_ValueToInt32(cx, argv[0], (int32 *)&b0)) { + JS_ReportError(cx, "Parameter must be a number"); + return JS_FALSE; + } + + if (NS_OK != nativeThis->Item(b0, nativeRet)) { + return JS_FALSE; + } + + JSString *jsstring = JS_NewUCStringCopyN(cx, nativeRet, nativeRet.Length()); + // set the return value + *rval = STRING_TO_JSVAL(jsstring); + } + else { + JS_ReportError(cx, "Function item requires 1 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +/***********************************************************************/ +// +// class for CSSStyleDeclaration +// +JSClass CSSStyleDeclarationClass = { + "CSSStyleDeclaration", + JSCLASS_HAS_PRIVATE, + JS_PropertyStub, + JS_PropertyStub, + GetCSSStyleDeclarationProperty, + SetCSSStyleDeclarationProperty, + EnumerateCSSStyleDeclaration, + ResolveCSSStyleDeclaration, + JS_ConvertStub, + FinalizeCSSStyleDeclaration +}; + + +// +// CSSStyleDeclaration class properties +// +static JSPropertySpec CSSStyleDeclarationProperties[] = +{ + {"length", CSSSTYLEDECLARATION_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"azimuth", CSSSTYLEDECLARATION_AZIMUTH, JSPROP_ENUMERATE}, + {"background", CSSSTYLEDECLARATION_BACKGROUND, JSPROP_ENUMERATE}, + {"backgroundAttachment", CSSSTYLEDECLARATION_BACKGROUNDATTACHMENT, JSPROP_ENUMERATE}, + {"backgroundColor", CSSSTYLEDECLARATION_BACKGROUNDCOLOR, JSPROP_ENUMERATE}, + {"backgroundImage", CSSSTYLEDECLARATION_BACKGROUNDIMAGE, JSPROP_ENUMERATE}, + {"backgroundPosition", CSSSTYLEDECLARATION_BACKGROUNDPOSITION, JSPROP_ENUMERATE}, + {"backgroundRepeat", CSSSTYLEDECLARATION_BACKGROUNDREPEAT, JSPROP_ENUMERATE}, + {"border", CSSSTYLEDECLARATION_BORDER, JSPROP_ENUMERATE}, + {"borderCollapse", CSSSTYLEDECLARATION_BORDERCOLLAPSE, JSPROP_ENUMERATE}, + {"borderColor", CSSSTYLEDECLARATION_BORDERCOLOR, JSPROP_ENUMERATE}, + {"borderSpacing", CSSSTYLEDECLARATION_BORDERSPACING, JSPROP_ENUMERATE}, + {"borderStyle", CSSSTYLEDECLARATION_BORDERSTYLE, JSPROP_ENUMERATE}, + {"borderTop", CSSSTYLEDECLARATION_BORDERTOP, JSPROP_ENUMERATE}, + {"borderRight", CSSSTYLEDECLARATION_BORDERRIGHT, JSPROP_ENUMERATE}, + {"borderBottom", CSSSTYLEDECLARATION_BORDERBOTTOM, JSPROP_ENUMERATE}, + {"borderLeft", CSSSTYLEDECLARATION_BORDERLEFT, JSPROP_ENUMERATE}, + {"borderTopColor", CSSSTYLEDECLARATION_BORDERTOPCOLOR, JSPROP_ENUMERATE}, + {"borderRightColor", CSSSTYLEDECLARATION_BORDERRIGHTCOLOR, JSPROP_ENUMERATE}, + {"borderBottomColor", CSSSTYLEDECLARATION_BORDERBOTTOMCOLOR, JSPROP_ENUMERATE}, + {"borderLeftColor", CSSSTYLEDECLARATION_BORDERLEFTCOLOR, JSPROP_ENUMERATE}, + {"borderTopStyle", CSSSTYLEDECLARATION_BORDERTOPSTYLE, JSPROP_ENUMERATE}, + {"borderRightStyle", CSSSTYLEDECLARATION_BORDERRIGHTSTYLE, JSPROP_ENUMERATE}, + {"borderBottomStyle", CSSSTYLEDECLARATION_BORDERBOTTOMSTYLE, JSPROP_ENUMERATE}, + {"borderLeftStyle", CSSSTYLEDECLARATION_BORDERLEFTSTYLE, JSPROP_ENUMERATE}, + {"borderTopWidth", CSSSTYLEDECLARATION_BORDERTOPWIDTH, JSPROP_ENUMERATE}, + {"borderRightWidth", CSSSTYLEDECLARATION_BORDERRIGHTWIDTH, JSPROP_ENUMERATE}, + {"borderBottomWidth", CSSSTYLEDECLARATION_BORDERBOTTOMWIDTH, JSPROP_ENUMERATE}, + {"borderLeftWidth", CSSSTYLEDECLARATION_BORDERLEFTWIDTH, JSPROP_ENUMERATE}, + {"borderWidth", CSSSTYLEDECLARATION_BORDERWIDTH, JSPROP_ENUMERATE}, + {"bottom", CSSSTYLEDECLARATION_BOTTOM, JSPROP_ENUMERATE}, + {"captionSide", CSSSTYLEDECLARATION_CAPTIONSIDE, JSPROP_ENUMERATE}, + {"clear", CSSSTYLEDECLARATION_CLEAR, JSPROP_ENUMERATE}, + {"clip", CSSSTYLEDECLARATION_CLIP, JSPROP_ENUMERATE}, + {"color", CSSSTYLEDECLARATION_COLOR, JSPROP_ENUMERATE}, + {"content", CSSSTYLEDECLARATION_CONTENT, JSPROP_ENUMERATE}, + {"counterIncrement", CSSSTYLEDECLARATION_COUNTERINCREMENT, JSPROP_ENUMERATE}, + {"counterReset", CSSSTYLEDECLARATION_COUNTERRESET, JSPROP_ENUMERATE}, + {"cue", CSSSTYLEDECLARATION_CUE, JSPROP_ENUMERATE}, + {"cueAfter", CSSSTYLEDECLARATION_CUEAFTER, JSPROP_ENUMERATE}, + {"cueBefore", CSSSTYLEDECLARATION_CUEBEFORE, JSPROP_ENUMERATE}, + {"cursor", CSSSTYLEDECLARATION_CURSOR, JSPROP_ENUMERATE}, + {"direction", CSSSTYLEDECLARATION_DIRECTION, JSPROP_ENUMERATE}, + {"display", CSSSTYLEDECLARATION_DISPLAY, JSPROP_ENUMERATE}, + {"elevation", CSSSTYLEDECLARATION_ELEVATION, JSPROP_ENUMERATE}, + {"emptyCells", CSSSTYLEDECLARATION_EMPTYCELLS, JSPROP_ENUMERATE}, + {"styleFloat", CSSSTYLEDECLARATION_STYLEFLOAT, JSPROP_ENUMERATE}, + {"font", CSSSTYLEDECLARATION_FONT, JSPROP_ENUMERATE}, + {"fontFamily", CSSSTYLEDECLARATION_FONTFAMILY, JSPROP_ENUMERATE}, + {"fontSize", CSSSTYLEDECLARATION_FONTSIZE, JSPROP_ENUMERATE}, + {"fontSizeAdjust", CSSSTYLEDECLARATION_FONTSIZEADJUST, JSPROP_ENUMERATE}, + {"fontStretch", CSSSTYLEDECLARATION_FONTSTRETCH, JSPROP_ENUMERATE}, + {"fontStyle", CSSSTYLEDECLARATION_FONTSTYLE, JSPROP_ENUMERATE}, + {"fontVariant", CSSSTYLEDECLARATION_FONTVARIANT, JSPROP_ENUMERATE}, + {"fontWeight", CSSSTYLEDECLARATION_FONTWEIGHT, JSPROP_ENUMERATE}, + {"height", CSSSTYLEDECLARATION_HEIGHT, JSPROP_ENUMERATE}, + {"left", CSSSTYLEDECLARATION_LEFT, JSPROP_ENUMERATE}, + {"letterSpacing", CSSSTYLEDECLARATION_LETTERSPACING, JSPROP_ENUMERATE}, + {"lineHeight", CSSSTYLEDECLARATION_LINEHEIGHT, JSPROP_ENUMERATE}, + {"listStyle", CSSSTYLEDECLARATION_LISTSTYLE, JSPROP_ENUMERATE}, + {"listStyleImage", CSSSTYLEDECLARATION_LISTSTYLEIMAGE, JSPROP_ENUMERATE}, + {"listStylePosition", CSSSTYLEDECLARATION_LISTSTYLEPOSITION, JSPROP_ENUMERATE}, + {"listStyleType", CSSSTYLEDECLARATION_LISTSTYLETYPE, JSPROP_ENUMERATE}, + {"margin", CSSSTYLEDECLARATION_MARGIN, JSPROP_ENUMERATE}, + {"marginTop", CSSSTYLEDECLARATION_MARGINTOP, JSPROP_ENUMERATE}, + {"marginRight", CSSSTYLEDECLARATION_MARGINRIGHT, JSPROP_ENUMERATE}, + {"marginBottom", CSSSTYLEDECLARATION_MARGINBOTTOM, JSPROP_ENUMERATE}, + {"marginLeft", CSSSTYLEDECLARATION_MARGINLEFT, JSPROP_ENUMERATE}, + {"markerOffset", CSSSTYLEDECLARATION_MARKEROFFSET, JSPROP_ENUMERATE}, + {"marks", CSSSTYLEDECLARATION_MARKS, JSPROP_ENUMERATE}, + {"maxHeight", CSSSTYLEDECLARATION_MAXHEIGHT, JSPROP_ENUMERATE}, + {"maxWidth", CSSSTYLEDECLARATION_MAXWIDTH, JSPROP_ENUMERATE}, + {"minHeight", CSSSTYLEDECLARATION_MINHEIGHT, JSPROP_ENUMERATE}, + {"minWidth", CSSSTYLEDECLARATION_MINWIDTH, JSPROP_ENUMERATE}, + {"orphans", CSSSTYLEDECLARATION_ORPHANS, JSPROP_ENUMERATE}, + {"outline", CSSSTYLEDECLARATION_OUTLINE, JSPROP_ENUMERATE}, + {"outlineColor", CSSSTYLEDECLARATION_OUTLINECOLOR, JSPROP_ENUMERATE}, + {"outlineStyle", CSSSTYLEDECLARATION_OUTLINESTYLE, JSPROP_ENUMERATE}, + {"outlineWidth", CSSSTYLEDECLARATION_OUTLINEWIDTH, JSPROP_ENUMERATE}, + {"overflow", CSSSTYLEDECLARATION_OVERFLOW, JSPROP_ENUMERATE}, + {"padding", CSSSTYLEDECLARATION_PADDING, JSPROP_ENUMERATE}, + {"paddingTop", CSSSTYLEDECLARATION_PADDINGTOP, JSPROP_ENUMERATE}, + {"paddingRight", CSSSTYLEDECLARATION_PADDINGRIGHT, JSPROP_ENUMERATE}, + {"paddingBottom", CSSSTYLEDECLARATION_PADDINGBOTTOM, JSPROP_ENUMERATE}, + {"paddingLeft", CSSSTYLEDECLARATION_PADDINGLEFT, JSPROP_ENUMERATE}, + {"page", CSSSTYLEDECLARATION_PAGE, JSPROP_ENUMERATE}, + {"pageBreakAfter", CSSSTYLEDECLARATION_PAGEBREAKAFTER, JSPROP_ENUMERATE}, + {"pageBreakBefore", CSSSTYLEDECLARATION_PAGEBREAKBEFORE, JSPROP_ENUMERATE}, + {"pageBreakInside", CSSSTYLEDECLARATION_PAGEBREAKINSIDE, JSPROP_ENUMERATE}, + {"pause", CSSSTYLEDECLARATION_PAUSE, JSPROP_ENUMERATE}, + {"pauseAfter", CSSSTYLEDECLARATION_PAUSEAFTER, JSPROP_ENUMERATE}, + {"pauseBefore", CSSSTYLEDECLARATION_PAUSEBEFORE, JSPROP_ENUMERATE}, + {"pitch", CSSSTYLEDECLARATION_PITCH, JSPROP_ENUMERATE}, + {"pitchRange", CSSSTYLEDECLARATION_PITCHRANGE, JSPROP_ENUMERATE}, + {"playDuring", CSSSTYLEDECLARATION_PLAYDURING, JSPROP_ENUMERATE}, + {"position", CSSSTYLEDECLARATION_POSITION, JSPROP_ENUMERATE}, + {"quotes", CSSSTYLEDECLARATION_QUOTES, JSPROP_ENUMERATE}, + {"richness", CSSSTYLEDECLARATION_RICHNESS, JSPROP_ENUMERATE}, + {"right", CSSSTYLEDECLARATION_RIGHT, JSPROP_ENUMERATE}, + {"size", CSSSTYLEDECLARATION_SIZE, JSPROP_ENUMERATE}, + {"speak", CSSSTYLEDECLARATION_SPEAK, JSPROP_ENUMERATE}, + {"speakHeader", CSSSTYLEDECLARATION_SPEAKHEADER, JSPROP_ENUMERATE}, + {"speakNumeral", CSSSTYLEDECLARATION_SPEAKNUMERAL, JSPROP_ENUMERATE}, + {"speakPunctuation", CSSSTYLEDECLARATION_SPEAKPUNCTUATION, JSPROP_ENUMERATE}, + {"speechRate", CSSSTYLEDECLARATION_SPEECHRATE, JSPROP_ENUMERATE}, + {"stress", CSSSTYLEDECLARATION_STRESS, JSPROP_ENUMERATE}, + {"tableLayout", CSSSTYLEDECLARATION_TABLELAYOUT, JSPROP_ENUMERATE}, + {"textAlign", CSSSTYLEDECLARATION_TEXTALIGN, JSPROP_ENUMERATE}, + {"textDecoration", CSSSTYLEDECLARATION_TEXTDECORATION, JSPROP_ENUMERATE}, + {"textIndent", CSSSTYLEDECLARATION_TEXTINDENT, JSPROP_ENUMERATE}, + {"textShadow", CSSSTYLEDECLARATION_TEXTSHADOW, JSPROP_ENUMERATE}, + {"textTransform", CSSSTYLEDECLARATION_TEXTTRANSFORM, JSPROP_ENUMERATE}, + {"top", CSSSTYLEDECLARATION_TOP, JSPROP_ENUMERATE}, + {"unicodeBidi", CSSSTYLEDECLARATION_UNICODEBIDI, JSPROP_ENUMERATE}, + {"verticalAlign", CSSSTYLEDECLARATION_VERTICALALIGN, JSPROP_ENUMERATE}, + {"visibility", CSSSTYLEDECLARATION_VISIBILITY, JSPROP_ENUMERATE}, + {"voiceFamily", CSSSTYLEDECLARATION_VOICEFAMILY, JSPROP_ENUMERATE}, + {"volume", CSSSTYLEDECLARATION_VOLUME, JSPROP_ENUMERATE}, + {"whiteSpace", CSSSTYLEDECLARATION_WHITESPACE, JSPROP_ENUMERATE}, + {"widows", CSSSTYLEDECLARATION_WIDOWS, JSPROP_ENUMERATE}, + {"width", CSSSTYLEDECLARATION_WIDTH, JSPROP_ENUMERATE}, + {"wordSpacing", CSSSTYLEDECLARATION_WORDSPACING, JSPROP_ENUMERATE}, + {"zIndex", CSSSTYLEDECLARATION_ZINDEX, JSPROP_ENUMERATE}, + {0} +}; + + +// +// CSSStyleDeclaration class methods +// +static JSFunctionSpec CSSStyleDeclarationMethods[] = +{ + {"getPropertyValue", CSSStyleDeclarationGetPropertyValue, 1}, + {"getPropertyPriority", CSSStyleDeclarationGetPropertyPriority, 1}, + {"setProperty", CSSStyleDeclarationSetProperty, 3}, + {"item", CSSStyleDeclarationItem, 1}, + {0} +}; + + +// +// CSSStyleDeclaration constructor +// +PR_STATIC_CALLBACK(JSBool) +CSSStyleDeclaration(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + return JS_FALSE; +} + + +// +// CSSStyleDeclaration class initialization +// +nsresult NS_InitCSSStyleDeclarationClass(nsIScriptContext *aContext, void **aPrototype) +{ + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + JSObject *proto = nsnull; + JSObject *constructor = nsnull; + JSObject *parent_proto = nsnull; + JSObject *global = JS_GetGlobalObject(jscontext); + jsval vp; + + if ((PR_TRUE != JS_LookupProperty(jscontext, global, "CSSStyleDeclaration", &vp)) || + !JSVAL_IS_OBJECT(vp) || + ((constructor = JSVAL_TO_OBJECT(vp)) == nsnull) || + (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || + !JSVAL_IS_OBJECT(vp)) { + + proto = JS_InitClass(jscontext, // context + global, // global object + parent_proto, // parent proto + &CSSStyleDeclarationClass, // JSClass + CSSStyleDeclaration, // JSNative ctor + 0, // ctor args + CSSStyleDeclarationProperties, // proto props + CSSStyleDeclarationMethods, // proto funcs + nsnull, // ctor props (static) + nsnull); // ctor funcs (static) + if (nsnull == proto) { + return NS_ERROR_FAILURE; + } + + } + else if ((nsnull != constructor) && JSVAL_IS_OBJECT(vp)) { + proto = JSVAL_TO_OBJECT(vp); + } + else { + return NS_ERROR_FAILURE; + } + + if (aPrototype) { + *aPrototype = proto; + } + return NS_OK; +} + + +// +// Method for creating a new CSSStyleDeclaration JavaScript object +// +extern "C" NS_DOM nsresult NS_NewScriptCSSStyleDeclaration(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +{ + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptCSSStyleDeclaration"); + JSObject *proto; + JSObject *parent; + nsIScriptObjectOwner *owner; + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + nsresult result = NS_OK; + nsIDOMCSSStyleDeclaration *aCSSStyleDeclaration; + + if (nsnull == aParent) { + parent = nsnull; + } + else if (NS_OK == aParent->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + if (NS_OK != owner->GetScriptObject(aContext, (void **)&parent)) { + NS_RELEASE(owner); + return NS_ERROR_FAILURE; + } + NS_RELEASE(owner); + } + else { + return NS_ERROR_FAILURE; + } + + if (NS_OK != NS_InitCSSStyleDeclarationClass(aContext, (void **)&proto)) { + return NS_ERROR_FAILURE; + } + + result = aSupports->QueryInterface(kICSSStyleDeclarationIID, (void **)&aCSSStyleDeclaration); + if (NS_OK != result) { + return result; + } + + // create a js object for this class + *aReturn = JS_NewObject(jscontext, &CSSStyleDeclarationClass, proto, parent); + if (nsnull != *aReturn) { + // connect the native object to the js object + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aCSSStyleDeclaration); + } + else { + NS_RELEASE(aCSSStyleDeclaration); + return NS_ERROR_FAILURE; + } + + return NS_OK; +} diff --git a/dom/src/css/nsJSCSSStyleRule.cpp b/dom/src/css/nsJSCSSStyleRule.cpp new file mode 100644 index 000000000000..704768102663 --- /dev/null +++ b/dom/src/css/nsJSCSSStyleRule.cpp @@ -0,0 +1,345 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#include "jsapi.h" +#include "nscore.h" +#include "nsIScriptContext.h" +#include "nsIJSScriptObject.h" +#include "nsIScriptObjectOwner.h" +#include "nsIScriptGlobalObject.h" +#include "nsIPtr.h" +#include "nsString.h" +#include "nsIDOMCSSStyleRule.h" + + +static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); +static NS_DEFINE_IID(kIJSScriptObjectIID, NS_IJSSCRIPTOBJECT_IID); +static NS_DEFINE_IID(kIScriptGlobalObjectIID, NS_ISCRIPTGLOBALOBJECT_IID); +static NS_DEFINE_IID(kICSSStyleRuleIID, NS_IDOMCSSSTYLERULE_IID); + +NS_DEF_PTR(nsIDOMCSSStyleRule); + +// +// CSSStyleRule property ids +// +enum CSSStyleRule_slots { + CSSSTYLERULE_TYPE = -1 +}; + +/***********************************************************************/ +// +// CSSStyleRule Properties Getter +// +PR_STATIC_CALLBACK(JSBool) +GetCSSStyleRuleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSStyleRule *a = (nsIDOMCSSStyleRule*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case CSSSTYLERULE_TYPE: + { + nsAutoString prop; + if (NS_OK == a->GetType(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + +/***********************************************************************/ +// +// CSSStyleRule Properties Setter +// +PR_STATIC_CALLBACK(JSBool) +SetCSSStyleRuleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSStyleRule *a = (nsIDOMCSSStyleRule*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case 0: + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + + +// +// CSSStyleRule finalizer +// +PR_STATIC_CALLBACK(void) +FinalizeCSSStyleRule(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSStyleRule *a = (nsIDOMCSSStyleRule*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == a->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + owner->SetScriptObject(nsnull); + NS_RELEASE(owner); + } + + NS_RELEASE(a); + } +} + + +// +// CSSStyleRule enumerate +// +PR_STATIC_CALLBACK(JSBool) +EnumerateCSSStyleRule(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSStyleRule *a = (nsIDOMCSSStyleRule*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->EnumerateProperty(cx); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +// +// CSSStyleRule resolve +// +PR_STATIC_CALLBACK(JSBool) +ResolveCSSStyleRule(JSContext *cx, JSObject *obj, jsval id) +{ + nsIDOMCSSStyleRule *a = (nsIDOMCSSStyleRule*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->Resolve(cx, id); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +/***********************************************************************/ +// +// class for CSSStyleRule +// +JSClass CSSStyleRuleClass = { + "CSSStyleRule", + JSCLASS_HAS_PRIVATE, + JS_PropertyStub, + JS_PropertyStub, + GetCSSStyleRuleProperty, + SetCSSStyleRuleProperty, + EnumerateCSSStyleRule, + ResolveCSSStyleRule, + JS_ConvertStub, + FinalizeCSSStyleRule +}; + + +// +// CSSStyleRule class properties +// +static JSPropertySpec CSSStyleRuleProperties[] = +{ + {"type", CSSSTYLERULE_TYPE, JSPROP_ENUMERATE | JSPROP_READONLY}, + {0} +}; + + +// +// CSSStyleRule class methods +// +static JSFunctionSpec CSSStyleRuleMethods[] = +{ + {0} +}; + + +// +// CSSStyleRule constructor +// +PR_STATIC_CALLBACK(JSBool) +CSSStyleRule(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + return JS_FALSE; +} + + +// +// CSSStyleRule class initialization +// +nsresult NS_InitCSSStyleRuleClass(nsIScriptContext *aContext, void **aPrototype) +{ + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + JSObject *proto = nsnull; + JSObject *constructor = nsnull; + JSObject *parent_proto = nsnull; + JSObject *global = JS_GetGlobalObject(jscontext); + jsval vp; + + if ((PR_TRUE != JS_LookupProperty(jscontext, global, "CSSStyleRule", &vp)) || + !JSVAL_IS_OBJECT(vp) || + ((constructor = JSVAL_TO_OBJECT(vp)) == nsnull) || + (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || + !JSVAL_IS_OBJECT(vp)) { + + proto = JS_InitClass(jscontext, // context + global, // global object + parent_proto, // parent proto + &CSSStyleRuleClass, // JSClass + CSSStyleRule, // JSNative ctor + 0, // ctor args + CSSStyleRuleProperties, // proto props + CSSStyleRuleMethods, // proto funcs + nsnull, // ctor props (static) + nsnull); // ctor funcs (static) + if (nsnull == proto) { + return NS_ERROR_FAILURE; + } + + } + else if ((nsnull != constructor) && JSVAL_IS_OBJECT(vp)) { + proto = JSVAL_TO_OBJECT(vp); + } + else { + return NS_ERROR_FAILURE; + } + + if (aPrototype) { + *aPrototype = proto; + } + return NS_OK; +} + + +// +// Method for creating a new CSSStyleRule JavaScript object +// +extern "C" NS_DOM nsresult NS_NewScriptCSSStyleRule(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +{ + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptCSSStyleRule"); + JSObject *proto; + JSObject *parent; + nsIScriptObjectOwner *owner; + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + nsresult result = NS_OK; + nsIDOMCSSStyleRule *aCSSStyleRule; + + if (nsnull == aParent) { + parent = nsnull; + } + else if (NS_OK == aParent->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + if (NS_OK != owner->GetScriptObject(aContext, (void **)&parent)) { + NS_RELEASE(owner); + return NS_ERROR_FAILURE; + } + NS_RELEASE(owner); + } + else { + return NS_ERROR_FAILURE; + } + + if (NS_OK != NS_InitCSSStyleRuleClass(aContext, (void **)&proto)) { + return NS_ERROR_FAILURE; + } + + result = aSupports->QueryInterface(kICSSStyleRuleIID, (void **)&aCSSStyleRule); + if (NS_OK != result) { + return result; + } + + // create a js object for this class + *aReturn = JS_NewObject(jscontext, &CSSStyleRuleClass, proto, parent); + if (nsnull != *aReturn) { + // connect the native object to the js object + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aCSSStyleRule); + } + else { + NS_RELEASE(aCSSStyleRule); + return NS_ERROR_FAILURE; + } + + return NS_OK; +} diff --git a/dom/src/css/nsJSCSSStyleRuleCollection.cpp b/dom/src/css/nsJSCSSStyleRuleCollection.cpp new file mode 100644 index 000000000000..a3bd72487bff --- /dev/null +++ b/dom/src/css/nsJSCSSStyleRuleCollection.cpp @@ -0,0 +1,418 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#include "jsapi.h" +#include "nscore.h" +#include "nsIScriptContext.h" +#include "nsIJSScriptObject.h" +#include "nsIScriptObjectOwner.h" +#include "nsIScriptGlobalObject.h" +#include "nsIPtr.h" +#include "nsString.h" +#include "nsIDOMCSSStyleRule.h" +#include "nsIDOMCSSStyleRuleCollection.h" + + +static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); +static NS_DEFINE_IID(kIJSScriptObjectIID, NS_IJSSCRIPTOBJECT_IID); +static NS_DEFINE_IID(kIScriptGlobalObjectIID, NS_ISCRIPTGLOBALOBJECT_IID); +static NS_DEFINE_IID(kICSSStyleRuleIID, NS_IDOMCSSSTYLERULE_IID); +static NS_DEFINE_IID(kICSSStyleRuleCollectionIID, NS_IDOMCSSSTYLERULECOLLECTION_IID); + +NS_DEF_PTR(nsIDOMCSSStyleRule); +NS_DEF_PTR(nsIDOMCSSStyleRuleCollection); + +// +// CSSStyleRuleCollection property ids +// +enum CSSStyleRuleCollection_slots { + CSSSTYLERULECOLLECTION_LENGTH = -1 +}; + +/***********************************************************************/ +// +// CSSStyleRuleCollection Properties Getter +// +PR_STATIC_CALLBACK(JSBool) +GetCSSStyleRuleCollectionProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSStyleRuleCollection *a = (nsIDOMCSSStyleRuleCollection*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case CSSSTYLERULECOLLECTION_LENGTH: + { + PRUint32 prop; + if (NS_OK == a->GetLength(&prop)) { + *vp = INT_TO_JSVAL(prop); + } + else { + return JS_FALSE; + } + break; + } + default: + { + nsIDOMCSSStyleRule* prop; + if (NS_OK == a->Item(JSVAL_TO_INT(id), &prop)) { + // get the js object + if (prop != nsnull) { + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == prop->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + JSObject *object = nsnull; + nsIScriptContext *script_cx = (nsIScriptContext *)JS_GetContextPrivate(cx); + if (NS_OK == owner->GetScriptObject(script_cx, (void**)&object)) { + // set the return value + *vp = OBJECT_TO_JSVAL(object); + } + NS_RELEASE(owner); + } + NS_RELEASE(prop); + } + else { + *vp = JSVAL_NULL; + } + } + else { + return JS_FALSE; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + +/***********************************************************************/ +// +// CSSStyleRuleCollection Properties Setter +// +PR_STATIC_CALLBACK(JSBool) +SetCSSStyleRuleCollectionProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSStyleRuleCollection *a = (nsIDOMCSSStyleRuleCollection*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case 0: + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + + +// +// CSSStyleRuleCollection finalizer +// +PR_STATIC_CALLBACK(void) +FinalizeCSSStyleRuleCollection(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSStyleRuleCollection *a = (nsIDOMCSSStyleRuleCollection*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == a->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + owner->SetScriptObject(nsnull); + NS_RELEASE(owner); + } + + NS_RELEASE(a); + } +} + + +// +// CSSStyleRuleCollection enumerate +// +PR_STATIC_CALLBACK(JSBool) +EnumerateCSSStyleRuleCollection(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSStyleRuleCollection *a = (nsIDOMCSSStyleRuleCollection*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->EnumerateProperty(cx); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +// +// CSSStyleRuleCollection resolve +// +PR_STATIC_CALLBACK(JSBool) +ResolveCSSStyleRuleCollection(JSContext *cx, JSObject *obj, jsval id) +{ + nsIDOMCSSStyleRuleCollection *a = (nsIDOMCSSStyleRuleCollection*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->Resolve(cx, id); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +// +// Native method Item +// +PR_STATIC_CALLBACK(JSBool) +CSSStyleRuleCollectionItem(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMCSSStyleRuleCollection *nativeThis = (nsIDOMCSSStyleRuleCollection*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + nsIDOMCSSStyleRule* nativeRet; + PRUint32 b0; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 1) { + + if (!JS_ValueToInt32(cx, argv[0], (int32 *)&b0)) { + JS_ReportError(cx, "Parameter must be a number"); + return JS_FALSE; + } + + if (NS_OK != nativeThis->Item(b0, &nativeRet)) { + return JS_FALSE; + } + + if (nativeRet != nsnull) { + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == nativeRet->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + JSObject *object = nsnull; + nsIScriptContext *script_cx = (nsIScriptContext *)JS_GetContextPrivate(cx); + if (NS_OK == owner->GetScriptObject(script_cx, (void**)&object)) { + // set the return value + *rval = OBJECT_TO_JSVAL(object); + } + NS_RELEASE(owner); + } + NS_RELEASE(nativeRet); + } + else { + *rval = JSVAL_NULL; + } + } + else { + JS_ReportError(cx, "Function item requires 1 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +/***********************************************************************/ +// +// class for CSSStyleRuleCollection +// +JSClass CSSStyleRuleCollectionClass = { + "CSSStyleRuleCollection", + JSCLASS_HAS_PRIVATE, + JS_PropertyStub, + JS_PropertyStub, + GetCSSStyleRuleCollectionProperty, + SetCSSStyleRuleCollectionProperty, + EnumerateCSSStyleRuleCollection, + ResolveCSSStyleRuleCollection, + JS_ConvertStub, + FinalizeCSSStyleRuleCollection +}; + + +// +// CSSStyleRuleCollection class properties +// +static JSPropertySpec CSSStyleRuleCollectionProperties[] = +{ + {"length", CSSSTYLERULECOLLECTION_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY}, + {0} +}; + + +// +// CSSStyleRuleCollection class methods +// +static JSFunctionSpec CSSStyleRuleCollectionMethods[] = +{ + {"item", CSSStyleRuleCollectionItem, 1}, + {0} +}; + + +// +// CSSStyleRuleCollection constructor +// +PR_STATIC_CALLBACK(JSBool) +CSSStyleRuleCollection(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + return JS_FALSE; +} + + +// +// CSSStyleRuleCollection class initialization +// +nsresult NS_InitCSSStyleRuleCollectionClass(nsIScriptContext *aContext, void **aPrototype) +{ + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + JSObject *proto = nsnull; + JSObject *constructor = nsnull; + JSObject *parent_proto = nsnull; + JSObject *global = JS_GetGlobalObject(jscontext); + jsval vp; + + if ((PR_TRUE != JS_LookupProperty(jscontext, global, "CSSStyleRuleCollection", &vp)) || + !JSVAL_IS_OBJECT(vp) || + ((constructor = JSVAL_TO_OBJECT(vp)) == nsnull) || + (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || + !JSVAL_IS_OBJECT(vp)) { + + proto = JS_InitClass(jscontext, // context + global, // global object + parent_proto, // parent proto + &CSSStyleRuleCollectionClass, // JSClass + CSSStyleRuleCollection, // JSNative ctor + 0, // ctor args + CSSStyleRuleCollectionProperties, // proto props + CSSStyleRuleCollectionMethods, // proto funcs + nsnull, // ctor props (static) + nsnull); // ctor funcs (static) + if (nsnull == proto) { + return NS_ERROR_FAILURE; + } + + } + else if ((nsnull != constructor) && JSVAL_IS_OBJECT(vp)) { + proto = JSVAL_TO_OBJECT(vp); + } + else { + return NS_ERROR_FAILURE; + } + + if (aPrototype) { + *aPrototype = proto; + } + return NS_OK; +} + + +// +// Method for creating a new CSSStyleRuleCollection JavaScript object +// +extern "C" NS_DOM nsresult NS_NewScriptCSSStyleRuleCollection(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +{ + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptCSSStyleRuleCollection"); + JSObject *proto; + JSObject *parent; + nsIScriptObjectOwner *owner; + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + nsresult result = NS_OK; + nsIDOMCSSStyleRuleCollection *aCSSStyleRuleCollection; + + if (nsnull == aParent) { + parent = nsnull; + } + else if (NS_OK == aParent->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + if (NS_OK != owner->GetScriptObject(aContext, (void **)&parent)) { + NS_RELEASE(owner); + return NS_ERROR_FAILURE; + } + NS_RELEASE(owner); + } + else { + return NS_ERROR_FAILURE; + } + + if (NS_OK != NS_InitCSSStyleRuleCollectionClass(aContext, (void **)&proto)) { + return NS_ERROR_FAILURE; + } + + result = aSupports->QueryInterface(kICSSStyleRuleCollectionIID, (void **)&aCSSStyleRuleCollection); + if (NS_OK != result) { + return result; + } + + // create a js object for this class + *aReturn = JS_NewObject(jscontext, &CSSStyleRuleCollectionClass, proto, parent); + if (nsnull != *aReturn) { + // connect the native object to the js object + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aCSSStyleRuleCollection); + } + else { + NS_RELEASE(aCSSStyleRuleCollection); + return NS_ERROR_FAILURE; + } + + return NS_OK; +} diff --git a/dom/src/css/nsJSCSSStyleRuleSimple.cpp b/dom/src/css/nsJSCSSStyleRuleSimple.cpp new file mode 100644 index 000000000000..216765e0eff7 --- /dev/null +++ b/dom/src/css/nsJSCSSStyleRuleSimple.cpp @@ -0,0 +1,417 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#include "jsapi.h" +#include "nscore.h" +#include "nsIScriptContext.h" +#include "nsIJSScriptObject.h" +#include "nsIScriptObjectOwner.h" +#include "nsIScriptGlobalObject.h" +#include "nsIPtr.h" +#include "nsString.h" +#include "nsIDOMCSSStyleDeclaration.h" +#include "nsIDOMCSSStyleRuleSimple.h" + + +static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); +static NS_DEFINE_IID(kIJSScriptObjectIID, NS_IJSSCRIPTOBJECT_IID); +static NS_DEFINE_IID(kIScriptGlobalObjectIID, NS_ISCRIPTGLOBALOBJECT_IID); +static NS_DEFINE_IID(kICSSStyleDeclarationIID, NS_IDOMCSSSTYLEDECLARATION_IID); +static NS_DEFINE_IID(kICSSStyleRuleSimpleIID, NS_IDOMCSSSTYLERULESIMPLE_IID); + +NS_DEF_PTR(nsIDOMCSSStyleDeclaration); +NS_DEF_PTR(nsIDOMCSSStyleRuleSimple); + +// +// CSSStyleRuleSimple property ids +// +enum CSSStyleRuleSimple_slots { + CSSSTYLERULESIMPLE_SELECTORTEXT = -1, + CSSSTYLERULESIMPLE_STYLE = -2 +}; + +/***********************************************************************/ +// +// CSSStyleRuleSimple Properties Getter +// +PR_STATIC_CALLBACK(JSBool) +GetCSSStyleRuleSimpleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSStyleRuleSimple *a = (nsIDOMCSSStyleRuleSimple*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case CSSSTYLERULESIMPLE_SELECTORTEXT: + { + nsAutoString prop; + if (NS_OK == a->GetSelectorText(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLERULESIMPLE_STYLE: + { + nsIDOMCSSStyleDeclaration* prop; + if (NS_OK == a->GetStyle(&prop)) { + // get the js object + if (prop != nsnull) { + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == prop->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + JSObject *object = nsnull; + nsIScriptContext *script_cx = (nsIScriptContext *)JS_GetContextPrivate(cx); + if (NS_OK == owner->GetScriptObject(script_cx, (void**)&object)) { + // set the return value + *vp = OBJECT_TO_JSVAL(object); + } + NS_RELEASE(owner); + } + NS_RELEASE(prop); + } + else { + *vp = JSVAL_NULL; + } + } + else { + return JS_FALSE; + } + break; + } + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + +/***********************************************************************/ +// +// CSSStyleRuleSimple Properties Setter +// +PR_STATIC_CALLBACK(JSBool) +SetCSSStyleRuleSimpleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSStyleRuleSimple *a = (nsIDOMCSSStyleRuleSimple*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case CSSSTYLERULESIMPLE_SELECTORTEXT: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetSelectorText(prop); + + break; + } + case CSSSTYLERULESIMPLE_STYLE: + { + nsIDOMCSSStyleDeclaration* prop; + if (JSVAL_IS_NULL(*vp)) { + prop = nsnull; + } + else if (JSVAL_IS_OBJECT(*vp)) { + JSObject *jsobj = JSVAL_TO_OBJECT(*vp); + nsISupports *supports = (nsISupports *)JS_GetPrivate(cx, jsobj); + if (NS_OK != supports->QueryInterface(kICSSStyleDeclarationIID, (void **)&prop)) { + JS_ReportError(cx, "Parameter must be of type CSSStyleDeclaration"); + return JS_FALSE; + } + } + else { + JS_ReportError(cx, "Parameter must be an object"); + return JS_FALSE; + } + + a->SetStyle(prop); + if (prop) NS_RELEASE(prop); + break; + } + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + + +// +// CSSStyleRuleSimple finalizer +// +PR_STATIC_CALLBACK(void) +FinalizeCSSStyleRuleSimple(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSStyleRuleSimple *a = (nsIDOMCSSStyleRuleSimple*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == a->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + owner->SetScriptObject(nsnull); + NS_RELEASE(owner); + } + + NS_RELEASE(a); + } +} + + +// +// CSSStyleRuleSimple enumerate +// +PR_STATIC_CALLBACK(JSBool) +EnumerateCSSStyleRuleSimple(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSStyleRuleSimple *a = (nsIDOMCSSStyleRuleSimple*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->EnumerateProperty(cx); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +// +// CSSStyleRuleSimple resolve +// +PR_STATIC_CALLBACK(JSBool) +ResolveCSSStyleRuleSimple(JSContext *cx, JSObject *obj, jsval id) +{ + nsIDOMCSSStyleRuleSimple *a = (nsIDOMCSSStyleRuleSimple*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->Resolve(cx, id); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +/***********************************************************************/ +// +// class for CSSStyleRuleSimple +// +JSClass CSSStyleRuleSimpleClass = { + "CSSStyleRuleSimple", + JSCLASS_HAS_PRIVATE, + JS_PropertyStub, + JS_PropertyStub, + GetCSSStyleRuleSimpleProperty, + SetCSSStyleRuleSimpleProperty, + EnumerateCSSStyleRuleSimple, + ResolveCSSStyleRuleSimple, + JS_ConvertStub, + FinalizeCSSStyleRuleSimple +}; + + +// +// CSSStyleRuleSimple class properties +// +static JSPropertySpec CSSStyleRuleSimpleProperties[] = +{ + {"selectorText", CSSSTYLERULESIMPLE_SELECTORTEXT, JSPROP_ENUMERATE}, + {"style", CSSSTYLERULESIMPLE_STYLE, JSPROP_ENUMERATE}, + {0} +}; + + +// +// CSSStyleRuleSimple class methods +// +static JSFunctionSpec CSSStyleRuleSimpleMethods[] = +{ + {0} +}; + + +// +// CSSStyleRuleSimple constructor +// +PR_STATIC_CALLBACK(JSBool) +CSSStyleRuleSimple(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + return JS_FALSE; +} + + +// +// CSSStyleRuleSimple class initialization +// +nsresult NS_InitCSSStyleRuleSimpleClass(nsIScriptContext *aContext, void **aPrototype) +{ + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + JSObject *proto = nsnull; + JSObject *constructor = nsnull; + JSObject *parent_proto = nsnull; + JSObject *global = JS_GetGlobalObject(jscontext); + jsval vp; + + if ((PR_TRUE != JS_LookupProperty(jscontext, global, "CSSStyleRuleSimple", &vp)) || + !JSVAL_IS_OBJECT(vp) || + ((constructor = JSVAL_TO_OBJECT(vp)) == nsnull) || + (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || + !JSVAL_IS_OBJECT(vp)) { + + if (NS_OK != NS_InitCSSStyleRuleClass(aContext, (void **)&parent_proto)) { + return NS_ERROR_FAILURE; + } + proto = JS_InitClass(jscontext, // context + global, // global object + parent_proto, // parent proto + &CSSStyleRuleSimpleClass, // JSClass + CSSStyleRuleSimple, // JSNative ctor + 0, // ctor args + CSSStyleRuleSimpleProperties, // proto props + CSSStyleRuleSimpleMethods, // proto funcs + nsnull, // ctor props (static) + nsnull); // ctor funcs (static) + if (nsnull == proto) { + return NS_ERROR_FAILURE; + } + + } + else if ((nsnull != constructor) && JSVAL_IS_OBJECT(vp)) { + proto = JSVAL_TO_OBJECT(vp); + } + else { + return NS_ERROR_FAILURE; + } + + if (aPrototype) { + *aPrototype = proto; + } + return NS_OK; +} + + +// +// Method for creating a new CSSStyleRuleSimple JavaScript object +// +extern "C" NS_DOM nsresult NS_NewScriptCSSStyleRuleSimple(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +{ + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptCSSStyleRuleSimple"); + JSObject *proto; + JSObject *parent; + nsIScriptObjectOwner *owner; + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + nsresult result = NS_OK; + nsIDOMCSSStyleRuleSimple *aCSSStyleRuleSimple; + + if (nsnull == aParent) { + parent = nsnull; + } + else if (NS_OK == aParent->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + if (NS_OK != owner->GetScriptObject(aContext, (void **)&parent)) { + NS_RELEASE(owner); + return NS_ERROR_FAILURE; + } + NS_RELEASE(owner); + } + else { + return NS_ERROR_FAILURE; + } + + if (NS_OK != NS_InitCSSStyleRuleSimpleClass(aContext, (void **)&proto)) { + return NS_ERROR_FAILURE; + } + + result = aSupports->QueryInterface(kICSSStyleRuleSimpleIID, (void **)&aCSSStyleRuleSimple); + if (NS_OK != result) { + return result; + } + + // create a js object for this class + *aReturn = JS_NewObject(jscontext, &CSSStyleRuleSimpleClass, proto, parent); + if (nsnull != *aReturn) { + // connect the native object to the js object + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aCSSStyleRuleSimple); + } + else { + NS_RELEASE(aCSSStyleRuleSimple); + return NS_ERROR_FAILURE; + } + + return NS_OK; +} diff --git a/dom/src/css/nsJSCSSStyleSheet.cpp b/dom/src/css/nsJSCSSStyleSheet.cpp new file mode 100644 index 000000000000..1a63218eb365 --- /dev/null +++ b/dom/src/css/nsJSCSSStyleSheet.cpp @@ -0,0 +1,677 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* AUTO-GENERATED. DO NOT EDIT!!! */ + +#include "jsapi.h" +#include "nscore.h" +#include "nsIScriptContext.h" +#include "nsIJSScriptObject.h" +#include "nsIScriptObjectOwner.h" +#include "nsIScriptGlobalObject.h" +#include "nsIPtr.h" +#include "nsString.h" +#include "nsIDOMHTMLElement.h" +#include "nsIDOMStyleSheetCollection.h" +#include "nsIDOMCSSStyleRuleCollection.h" +#include "nsIDOMCSSStyleSheet.h" + + +static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); +static NS_DEFINE_IID(kIJSScriptObjectIID, NS_IJSSCRIPTOBJECT_IID); +static NS_DEFINE_IID(kIScriptGlobalObjectIID, NS_ISCRIPTGLOBALOBJECT_IID); +static NS_DEFINE_IID(kIHTMLElementIID, NS_IDOMHTMLELEMENT_IID); +static NS_DEFINE_IID(kIStyleSheetCollectionIID, NS_IDOMSTYLESHEETCOLLECTION_IID); +static NS_DEFINE_IID(kICSSStyleRuleCollectionIID, NS_IDOMCSSSTYLERULECOLLECTION_IID); +static NS_DEFINE_IID(kICSSStyleSheetIID, NS_IDOMCSSSTYLESHEET_IID); + +NS_DEF_PTR(nsIDOMHTMLElement); +NS_DEF_PTR(nsIDOMStyleSheetCollection); +NS_DEF_PTR(nsIDOMCSSStyleRuleCollection); +NS_DEF_PTR(nsIDOMCSSStyleSheet); + +// +// CSSStyleSheet property ids +// +enum CSSStyleSheet_slots { + CSSSTYLESHEET_OWNINGELEMENT = -1, + CSSSTYLESHEET_PARENTSTYLESHEET = -2, + CSSSTYLESHEET_HREF = -3, + CSSSTYLESHEET_TITLE = -4, + CSSSTYLESHEET_IMPORTS = -5, + CSSSTYLESHEET_RULES = -6 +}; + +/***********************************************************************/ +// +// CSSStyleSheet Properties Getter +// +PR_STATIC_CALLBACK(JSBool) +GetCSSStyleSheetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSStyleSheet *a = (nsIDOMCSSStyleSheet*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case CSSSTYLESHEET_OWNINGELEMENT: + { + nsIDOMHTMLElement* prop; + if (NS_OK == a->GetOwningElement(&prop)) { + // get the js object + if (prop != nsnull) { + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == prop->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + JSObject *object = nsnull; + nsIScriptContext *script_cx = (nsIScriptContext *)JS_GetContextPrivate(cx); + if (NS_OK == owner->GetScriptObject(script_cx, (void**)&object)) { + // set the return value + *vp = OBJECT_TO_JSVAL(object); + } + NS_RELEASE(owner); + } + NS_RELEASE(prop); + } + else { + *vp = JSVAL_NULL; + } + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLESHEET_PARENTSTYLESHEET: + { + nsIDOMCSSStyleSheet* prop; + if (NS_OK == a->GetParentStyleSheet(&prop)) { + // get the js object + if (prop != nsnull) { + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == prop->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + JSObject *object = nsnull; + nsIScriptContext *script_cx = (nsIScriptContext *)JS_GetContextPrivate(cx); + if (NS_OK == owner->GetScriptObject(script_cx, (void**)&object)) { + // set the return value + *vp = OBJECT_TO_JSVAL(object); + } + NS_RELEASE(owner); + } + NS_RELEASE(prop); + } + else { + *vp = JSVAL_NULL; + } + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLESHEET_HREF: + { + nsAutoString prop; + if (NS_OK == a->GetHref(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLESHEET_TITLE: + { + nsAutoString prop; + if (NS_OK == a->GetTitle(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLESHEET_IMPORTS: + { + nsIDOMStyleSheetCollection* prop; + if (NS_OK == a->GetImports(&prop)) { + // get the js object + if (prop != nsnull) { + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == prop->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + JSObject *object = nsnull; + nsIScriptContext *script_cx = (nsIScriptContext *)JS_GetContextPrivate(cx); + if (NS_OK == owner->GetScriptObject(script_cx, (void**)&object)) { + // set the return value + *vp = OBJECT_TO_JSVAL(object); + } + NS_RELEASE(owner); + } + NS_RELEASE(prop); + } + else { + *vp = JSVAL_NULL; + } + } + else { + return JS_FALSE; + } + break; + } + case CSSSTYLESHEET_RULES: + { + nsIDOMCSSStyleRuleCollection* prop; + if (NS_OK == a->GetRules(&prop)) { + // get the js object + if (prop != nsnull) { + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == prop->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + JSObject *object = nsnull; + nsIScriptContext *script_cx = (nsIScriptContext *)JS_GetContextPrivate(cx); + if (NS_OK == owner->GetScriptObject(script_cx, (void**)&object)) { + // set the return value + *vp = OBJECT_TO_JSVAL(object); + } + NS_RELEASE(owner); + } + NS_RELEASE(prop); + } + else { + *vp = JSVAL_NULL; + } + } + else { + return JS_FALSE; + } + break; + } + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->GetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + +/***********************************************************************/ +// +// CSSStyleSheet Properties Setter +// +PR_STATIC_CALLBACK(JSBool) +SetCSSStyleSheetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMCSSStyleSheet *a = (nsIDOMCSSStyleSheet*)JS_GetPrivate(cx, obj); + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == a) { + return JS_TRUE; + } + + if (JSVAL_IS_INT(id)) { + switch(JSVAL_TO_INT(id)) { + case 0: + default: + { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + } + } + else { + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + PRBool rval; + rval = object->SetProperty(cx, id, vp); + NS_RELEASE(object); + return rval; + } + } + + return PR_TRUE; +} + + +// +// CSSStyleSheet finalizer +// +PR_STATIC_CALLBACK(void) +FinalizeCSSStyleSheet(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSStyleSheet *a = (nsIDOMCSSStyleSheet*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == a->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + owner->SetScriptObject(nsnull); + NS_RELEASE(owner); + } + + NS_RELEASE(a); + } +} + + +// +// CSSStyleSheet enumerate +// +PR_STATIC_CALLBACK(JSBool) +EnumerateCSSStyleSheet(JSContext *cx, JSObject *obj) +{ + nsIDOMCSSStyleSheet *a = (nsIDOMCSSStyleSheet*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->EnumerateProperty(cx); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +// +// CSSStyleSheet resolve +// +PR_STATIC_CALLBACK(JSBool) +ResolveCSSStyleSheet(JSContext *cx, JSObject *obj, jsval id) +{ + nsIDOMCSSStyleSheet *a = (nsIDOMCSSStyleSheet*)JS_GetPrivate(cx, obj); + + if (nsnull != a) { + // get the js object + nsIJSScriptObject *object; + if (NS_OK == a->QueryInterface(kIJSScriptObjectIID, (void**)&object)) { + object->Resolve(cx, id); + NS_RELEASE(object); + } + } + return JS_TRUE; +} + + +// +// Native method AddRule +// +PR_STATIC_CALLBACK(JSBool) +CSSStyleSheetAddRule(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMCSSStyleSheet *nativeThis = (nsIDOMCSSStyleSheet*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + PRUint32 nativeRet; + nsAutoString b0; + nsAutoString b1; + PRUint32 b2; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 3) { + + JSString *jsstring0 = JS_ValueToString(cx, argv[0]); + if (nsnull != jsstring0) { + b0.SetString(JS_GetStringChars(jsstring0)); + } + else { + b0.SetString(""); // Should this really be null?? + } + + JSString *jsstring1 = JS_ValueToString(cx, argv[1]); + if (nsnull != jsstring1) { + b1.SetString(JS_GetStringChars(jsstring1)); + } + else { + b1.SetString(""); // Should this really be null?? + } + + if (!JS_ValueToInt32(cx, argv[2], (int32 *)&b2)) { + JS_ReportError(cx, "Parameter must be a number"); + return JS_FALSE; + } + + if (NS_OK != nativeThis->AddRule(b0, b1, b2, &nativeRet)) { + return JS_FALSE; + } + + *rval = INT_TO_JSVAL(nativeRet); + } + else { + JS_ReportError(cx, "Function addRule requires 3 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +// +// Native method AddImport +// +PR_STATIC_CALLBACK(JSBool) +CSSStyleSheetAddImport(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMCSSStyleSheet *nativeThis = (nsIDOMCSSStyleSheet*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + PRUint32 nativeRet; + nsAutoString b0; + PRUint32 b1; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 2) { + + JSString *jsstring0 = JS_ValueToString(cx, argv[0]); + if (nsnull != jsstring0) { + b0.SetString(JS_GetStringChars(jsstring0)); + } + else { + b0.SetString(""); // Should this really be null?? + } + + if (!JS_ValueToInt32(cx, argv[1], (int32 *)&b1)) { + JS_ReportError(cx, "Parameter must be a number"); + return JS_FALSE; + } + + if (NS_OK != nativeThis->AddImport(b0, b1, &nativeRet)) { + return JS_FALSE; + } + + *rval = INT_TO_JSVAL(nativeRet); + } + else { + JS_ReportError(cx, "Function addImport requires 2 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +// +// Native method RemoveRule +// +PR_STATIC_CALLBACK(JSBool) +CSSStyleSheetRemoveRule(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMCSSStyleSheet *nativeThis = (nsIDOMCSSStyleSheet*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + PRUint32 b0; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 1) { + + if (!JS_ValueToInt32(cx, argv[0], (int32 *)&b0)) { + JS_ReportError(cx, "Parameter must be a number"); + return JS_FALSE; + } + + if (NS_OK != nativeThis->RemoveRule(b0)) { + return JS_FALSE; + } + + *rval = JSVAL_VOID; + } + else { + JS_ReportError(cx, "Function removeRule requires 1 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +// +// Native method RemoveImport +// +PR_STATIC_CALLBACK(JSBool) +CSSStyleSheetRemoveImport(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMCSSStyleSheet *nativeThis = (nsIDOMCSSStyleSheet*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + PRUint32 b0; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 1) { + + if (!JS_ValueToInt32(cx, argv[0], (int32 *)&b0)) { + JS_ReportError(cx, "Parameter must be a number"); + return JS_FALSE; + } + + if (NS_OK != nativeThis->RemoveImport(b0)) { + return JS_FALSE; + } + + *rval = JSVAL_VOID; + } + else { + JS_ReportError(cx, "Function removeImport requires 1 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +/***********************************************************************/ +// +// class for CSSStyleSheet +// +JSClass CSSStyleSheetClass = { + "CSSStyleSheet", + JSCLASS_HAS_PRIVATE, + JS_PropertyStub, + JS_PropertyStub, + GetCSSStyleSheetProperty, + SetCSSStyleSheetProperty, + EnumerateCSSStyleSheet, + ResolveCSSStyleSheet, + JS_ConvertStub, + FinalizeCSSStyleSheet +}; + + +// +// CSSStyleSheet class properties +// +static JSPropertySpec CSSStyleSheetProperties[] = +{ + {"owningElement", CSSSTYLESHEET_OWNINGELEMENT, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"parentStyleSheet", CSSSTYLESHEET_PARENTSTYLESHEET, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"href", CSSSTYLESHEET_HREF, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"title", CSSSTYLESHEET_TITLE, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"imports", CSSSTYLESHEET_IMPORTS, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"rules", CSSSTYLESHEET_RULES, JSPROP_ENUMERATE | JSPROP_READONLY}, + {0} +}; + + +// +// CSSStyleSheet class methods +// +static JSFunctionSpec CSSStyleSheetMethods[] = +{ + {"addRule", CSSStyleSheetAddRule, 3}, + {"addImport", CSSStyleSheetAddImport, 2}, + {"removeRule", CSSStyleSheetRemoveRule, 1}, + {"removeImport", CSSStyleSheetRemoveImport, 1}, + {0} +}; + + +// +// CSSStyleSheet constructor +// +PR_STATIC_CALLBACK(JSBool) +CSSStyleSheet(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + return JS_FALSE; +} + + +// +// CSSStyleSheet class initialization +// +nsresult NS_InitCSSStyleSheetClass(nsIScriptContext *aContext, void **aPrototype) +{ + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + JSObject *proto = nsnull; + JSObject *constructor = nsnull; + JSObject *parent_proto = nsnull; + JSObject *global = JS_GetGlobalObject(jscontext); + jsval vp; + + if ((PR_TRUE != JS_LookupProperty(jscontext, global, "CSSStyleSheet", &vp)) || + !JSVAL_IS_OBJECT(vp) || + ((constructor = JSVAL_TO_OBJECT(vp)) == nsnull) || + (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || + !JSVAL_IS_OBJECT(vp)) { + + if (NS_OK != NS_InitStyleSheetClass(aContext, (void **)&parent_proto)) { + return NS_ERROR_FAILURE; + } + proto = JS_InitClass(jscontext, // context + global, // global object + parent_proto, // parent proto + &CSSStyleSheetClass, // JSClass + CSSStyleSheet, // JSNative ctor + 0, // ctor args + CSSStyleSheetProperties, // proto props + CSSStyleSheetMethods, // proto funcs + nsnull, // ctor props (static) + nsnull); // ctor funcs (static) + if (nsnull == proto) { + return NS_ERROR_FAILURE; + } + + } + else if ((nsnull != constructor) && JSVAL_IS_OBJECT(vp)) { + proto = JSVAL_TO_OBJECT(vp); + } + else { + return NS_ERROR_FAILURE; + } + + if (aPrototype) { + *aPrototype = proto; + } + return NS_OK; +} + + +// +// Method for creating a new CSSStyleSheet JavaScript object +// +extern "C" NS_DOM nsresult NS_NewScriptCSSStyleSheet(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +{ + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptCSSStyleSheet"); + JSObject *proto; + JSObject *parent; + nsIScriptObjectOwner *owner; + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + nsresult result = NS_OK; + nsIDOMCSSStyleSheet *aCSSStyleSheet; + + if (nsnull == aParent) { + parent = nsnull; + } + else if (NS_OK == aParent->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + if (NS_OK != owner->GetScriptObject(aContext, (void **)&parent)) { + NS_RELEASE(owner); + return NS_ERROR_FAILURE; + } + NS_RELEASE(owner); + } + else { + return NS_ERROR_FAILURE; + } + + if (NS_OK != NS_InitCSSStyleSheetClass(aContext, (void **)&proto)) { + return NS_ERROR_FAILURE; + } + + result = aSupports->QueryInterface(kICSSStyleSheetIID, (void **)&aCSSStyleSheet); + if (NS_OK != result) { + return result; + } + + // create a js object for this class + *aReturn = JS_NewObject(jscontext, &CSSStyleSheetClass, proto, parent); + if (nsnull != *aReturn) { + // connect the native object to the js object + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aCSSStyleSheet); + } + else { + NS_RELEASE(aCSSStyleSheet); + return NS_ERROR_FAILURE; + } + + return NS_OK; +} diff --git a/dom/src/events/nsJSEvent.cpp b/dom/src/events/nsJSEvent.cpp index ac738c0fe650..e24b72f45444 100644 --- a/dom/src/events/nsJSEvent.cpp +++ b/dom/src/events/nsJSEvent.cpp @@ -45,22 +45,22 @@ NS_DEF_PTR(nsIDOMNSEvent); // Event property ids // enum Event_slots { - EVENT_TYPE = -11, - EVENT_TARGET = -12, - EVENT_SCREENX = -13, - EVENT_SCREENY = -14, - EVENT_CLIENTX = -15, - EVENT_CLIENTY = -16, - EVENT_ALTKEY = -17, - EVENT_CTRLKEY = -18, - EVENT_SHIFTKEY = -19, - EVENT_METAKEY = -110, - EVENT_CANCELBUBBLE = -111, - EVENT_CHARCODE = -112, - EVENT_KEYCODE = -113, - EVENT_BUTTON = -114, - NSEVENT_LAYERX = -21, - NSEVENT_LAYERY = -22 + EVENT_TYPE = -1, + EVENT_TARGET = -2, + EVENT_SCREENX = -3, + EVENT_SCREENY = -4, + EVENT_CLIENTX = -5, + EVENT_CLIENTY = -6, + EVENT_ALTKEY = -7, + EVENT_CTRLKEY = -8, + EVENT_SHIFTKEY = -9, + EVENT_METAKEY = -10, + EVENT_CANCELBUBBLE = -11, + EVENT_CHARCODE = -12, + EVENT_KEYCODE = -13, + EVENT_BUTTON = -14, + NSEVENT_LAYERX = -15, + NSEVENT_LAYERY = -16 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLAnchorElement.cpp b/dom/src/html/nsJSHTMLAnchorElement.cpp index c81077648dd9..f7ce9c7fab43 100644 --- a/dom/src/html/nsJSHTMLAnchorElement.cpp +++ b/dom/src/html/nsJSHTMLAnchorElement.cpp @@ -39,18 +39,18 @@ NS_DEF_PTR(nsIDOMHTMLAnchorElement); // HTMLAnchorElement property ids // enum HTMLAnchorElement_slots { - HTMLANCHORELEMENT_ACCESSKEY = -11, - HTMLANCHORELEMENT_CHARSET = -12, - HTMLANCHORELEMENT_COORDS = -13, - HTMLANCHORELEMENT_HREF = -14, - HTMLANCHORELEMENT_HREFLANG = -15, - HTMLANCHORELEMENT_NAME = -16, - HTMLANCHORELEMENT_REL = -17, - HTMLANCHORELEMENT_REV = -18, - HTMLANCHORELEMENT_SHAPE = -19, - HTMLANCHORELEMENT_TABINDEX = -110, - HTMLANCHORELEMENT_TARGET = -111, - HTMLANCHORELEMENT_TYPE = -112 + HTMLANCHORELEMENT_ACCESSKEY = -1, + HTMLANCHORELEMENT_CHARSET = -2, + HTMLANCHORELEMENT_COORDS = -3, + HTMLANCHORELEMENT_HREF = -4, + HTMLANCHORELEMENT_HREFLANG = -5, + HTMLANCHORELEMENT_NAME = -6, + HTMLANCHORELEMENT_REL = -7, + HTMLANCHORELEMENT_REV = -8, + HTMLANCHORELEMENT_SHAPE = -9, + HTMLANCHORELEMENT_TABINDEX = -10, + HTMLANCHORELEMENT_TARGET = -11, + HTMLANCHORELEMENT_TYPE = -12 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLAppletElement.cpp b/dom/src/html/nsJSHTMLAppletElement.cpp index 676257b11e46..a0410fe8e013 100644 --- a/dom/src/html/nsJSHTMLAppletElement.cpp +++ b/dom/src/html/nsJSHTMLAppletElement.cpp @@ -39,17 +39,17 @@ NS_DEF_PTR(nsIDOMHTMLAppletElement); // HTMLAppletElement property ids // enum HTMLAppletElement_slots { - HTMLAPPLETELEMENT_ALIGN = -11, - HTMLAPPLETELEMENT_ALT = -12, - HTMLAPPLETELEMENT_ARCHIVE = -13, - HTMLAPPLETELEMENT_CODE = -14, - HTMLAPPLETELEMENT_CODEBASE = -15, - HTMLAPPLETELEMENT_HEIGHT = -16, - HTMLAPPLETELEMENT_HSPACE = -17, - HTMLAPPLETELEMENT_NAME = -18, - HTMLAPPLETELEMENT_OBJECT = -19, - HTMLAPPLETELEMENT_VSPACE = -110, - HTMLAPPLETELEMENT_WIDTH = -111 + HTMLAPPLETELEMENT_ALIGN = -1, + HTMLAPPLETELEMENT_ALT = -2, + HTMLAPPLETELEMENT_ARCHIVE = -3, + HTMLAPPLETELEMENT_CODE = -4, + HTMLAPPLETELEMENT_CODEBASE = -5, + HTMLAPPLETELEMENT_HEIGHT = -6, + HTMLAPPLETELEMENT_HSPACE = -7, + HTMLAPPLETELEMENT_NAME = -8, + HTMLAPPLETELEMENT_OBJECT = -9, + HTMLAPPLETELEMENT_VSPACE = -10, + HTMLAPPLETELEMENT_WIDTH = -11 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLAreaElement.cpp b/dom/src/html/nsJSHTMLAreaElement.cpp index 47b40e939903..40c323bc0786 100644 --- a/dom/src/html/nsJSHTMLAreaElement.cpp +++ b/dom/src/html/nsJSHTMLAreaElement.cpp @@ -39,14 +39,14 @@ NS_DEF_PTR(nsIDOMHTMLAreaElement); // HTMLAreaElement property ids // enum HTMLAreaElement_slots { - HTMLAREAELEMENT_ACCESSKEY = -11, - HTMLAREAELEMENT_ALT = -12, - HTMLAREAELEMENT_COORDS = -13, - HTMLAREAELEMENT_HREF = -14, - HTMLAREAELEMENT_NOHREF = -15, - HTMLAREAELEMENT_SHAPE = -16, - HTMLAREAELEMENT_TABINDEX = -17, - HTMLAREAELEMENT_TARGET = -18 + HTMLAREAELEMENT_ACCESSKEY = -1, + HTMLAREAELEMENT_ALT = -2, + HTMLAREAELEMENT_COORDS = -3, + HTMLAREAELEMENT_HREF = -4, + HTMLAREAELEMENT_NOHREF = -5, + HTMLAREAELEMENT_SHAPE = -6, + HTMLAREAELEMENT_TABINDEX = -7, + HTMLAREAELEMENT_TARGET = -8 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLBRElement.cpp b/dom/src/html/nsJSHTMLBRElement.cpp index e7c515a265ac..ad7d51c70d45 100644 --- a/dom/src/html/nsJSHTMLBRElement.cpp +++ b/dom/src/html/nsJSHTMLBRElement.cpp @@ -39,7 +39,7 @@ NS_DEF_PTR(nsIDOMHTMLBRElement); // HTMLBRElement property ids // enum HTMLBRElement_slots { - HTMLBRELEMENT_CLEAR = -11 + HTMLBRELEMENT_CLEAR = -1 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLBaseElement.cpp b/dom/src/html/nsJSHTMLBaseElement.cpp index b64437898ee1..93e218a1ce74 100644 --- a/dom/src/html/nsJSHTMLBaseElement.cpp +++ b/dom/src/html/nsJSHTMLBaseElement.cpp @@ -39,8 +39,8 @@ NS_DEF_PTR(nsIDOMHTMLBaseElement); // HTMLBaseElement property ids // enum HTMLBaseElement_slots { - HTMLBASEELEMENT_HREF = -11, - HTMLBASEELEMENT_TARGET = -12 + HTMLBASEELEMENT_HREF = -1, + HTMLBASEELEMENT_TARGET = -2 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLBaseFontElement.cpp b/dom/src/html/nsJSHTMLBaseFontElement.cpp index 39c57eb6d13c..f89c90cb0630 100644 --- a/dom/src/html/nsJSHTMLBaseFontElement.cpp +++ b/dom/src/html/nsJSHTMLBaseFontElement.cpp @@ -39,9 +39,9 @@ NS_DEF_PTR(nsIDOMHTMLBaseFontElement); // HTMLBaseFontElement property ids // enum HTMLBaseFontElement_slots { - HTMLBASEFONTELEMENT_COLOR = -11, - HTMLBASEFONTELEMENT_FACE = -12, - HTMLBASEFONTELEMENT_SIZE = -13 + HTMLBASEFONTELEMENT_COLOR = -1, + HTMLBASEFONTELEMENT_FACE = -2, + HTMLBASEFONTELEMENT_SIZE = -3 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLBodyElement.cpp b/dom/src/html/nsJSHTMLBodyElement.cpp index 66a948f55fd6..af50927cef59 100644 --- a/dom/src/html/nsJSHTMLBodyElement.cpp +++ b/dom/src/html/nsJSHTMLBodyElement.cpp @@ -39,12 +39,12 @@ NS_DEF_PTR(nsIDOMHTMLBodyElement); // HTMLBodyElement property ids // enum HTMLBodyElement_slots { - HTMLBODYELEMENT_ALINK = -11, - HTMLBODYELEMENT_BACKGROUND = -12, - HTMLBODYELEMENT_BGCOLOR = -13, - HTMLBODYELEMENT_LINK = -14, - HTMLBODYELEMENT_TEXT = -15, - HTMLBODYELEMENT_VLINK = -16 + HTMLBODYELEMENT_ALINK = -1, + HTMLBODYELEMENT_BACKGROUND = -2, + HTMLBODYELEMENT_BGCOLOR = -3, + HTMLBODYELEMENT_LINK = -4, + HTMLBODYELEMENT_TEXT = -5, + HTMLBODYELEMENT_VLINK = -6 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLButtonElement.cpp b/dom/src/html/nsJSHTMLButtonElement.cpp index c95091931bbe..f9e32c578fb3 100644 --- a/dom/src/html/nsJSHTMLButtonElement.cpp +++ b/dom/src/html/nsJSHTMLButtonElement.cpp @@ -42,13 +42,13 @@ NS_DEF_PTR(nsIDOMHTMLButtonElement); // HTMLButtonElement property ids // enum HTMLButtonElement_slots { - HTMLBUTTONELEMENT_FORM = -11, - HTMLBUTTONELEMENT_ACCESSKEY = -12, - HTMLBUTTONELEMENT_DISABLED = -13, - HTMLBUTTONELEMENT_NAME = -14, - HTMLBUTTONELEMENT_TABINDEX = -15, - HTMLBUTTONELEMENT_TYPE = -16, - HTMLBUTTONELEMENT_VALUE = -17 + HTMLBUTTONELEMENT_FORM = -1, + HTMLBUTTONELEMENT_ACCESSKEY = -2, + HTMLBUTTONELEMENT_DISABLED = -3, + HTMLBUTTONELEMENT_NAME = -4, + HTMLBUTTONELEMENT_TABINDEX = -5, + HTMLBUTTONELEMENT_TYPE = -6, + HTMLBUTTONELEMENT_VALUE = -7 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLCollection.cpp b/dom/src/html/nsJSHTMLCollection.cpp index 5e04c2ad80c1..b742d9882368 100644 --- a/dom/src/html/nsJSHTMLCollection.cpp +++ b/dom/src/html/nsJSHTMLCollection.cpp @@ -42,7 +42,7 @@ NS_DEF_PTR(nsIDOMHTMLCollection); // HTMLCollection property ids // enum HTMLCollection_slots { - HTMLCOLLECTION_LENGTH = -11 + HTMLCOLLECTION_LENGTH = -1 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLDListElement.cpp b/dom/src/html/nsJSHTMLDListElement.cpp index e853b36413e9..fdecb4ce77cf 100644 --- a/dom/src/html/nsJSHTMLDListElement.cpp +++ b/dom/src/html/nsJSHTMLDListElement.cpp @@ -39,7 +39,7 @@ NS_DEF_PTR(nsIDOMHTMLDListElement); // HTMLDListElement property ids // enum HTMLDListElement_slots { - HTMLDLISTELEMENT_COMPACT = -11 + HTMLDLISTELEMENT_COMPACT = -1 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLDelElement.cpp b/dom/src/html/nsJSHTMLDelElement.cpp index 61f25b3b4ec8..06303ffce311 100644 --- a/dom/src/html/nsJSHTMLDelElement.cpp +++ b/dom/src/html/nsJSHTMLDelElement.cpp @@ -39,8 +39,8 @@ NS_DEF_PTR(nsIDOMHTMLDelElement); // HTMLDelElement property ids // enum HTMLDelElement_slots { - HTMLDELELEMENT_CITE = -11, - HTMLDELELEMENT_DATETIME = -12 + HTMLDELELEMENT_CITE = -1, + HTMLDELELEMENT_DATETIME = -2 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLDirectoryElement.cpp b/dom/src/html/nsJSHTMLDirectoryElement.cpp index 4e7628f8f63b..8aeb3c73f5a7 100644 --- a/dom/src/html/nsJSHTMLDirectoryElement.cpp +++ b/dom/src/html/nsJSHTMLDirectoryElement.cpp @@ -39,7 +39,7 @@ NS_DEF_PTR(nsIDOMHTMLDirectoryElement); // HTMLDirectoryElement property ids // enum HTMLDirectoryElement_slots { - HTMLDIRECTORYELEMENT_COMPACT = -11 + HTMLDIRECTORYELEMENT_COMPACT = -1 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLDivElement.cpp b/dom/src/html/nsJSHTMLDivElement.cpp index 292007cf597e..b38a6c94cc62 100644 --- a/dom/src/html/nsJSHTMLDivElement.cpp +++ b/dom/src/html/nsJSHTMLDivElement.cpp @@ -39,7 +39,7 @@ NS_DEF_PTR(nsIDOMHTMLDivElement); // HTMLDivElement property ids // enum HTMLDivElement_slots { - HTMLDIVELEMENT_ALIGN = -11 + HTMLDIVELEMENT_ALIGN = -1 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLDocument.cpp b/dom/src/html/nsJSHTMLDocument.cpp index d6e2d5047ee6..3db407339ddd 100644 --- a/dom/src/html/nsJSHTMLDocument.cpp +++ b/dom/src/html/nsJSHTMLDocument.cpp @@ -54,30 +54,30 @@ NS_DEF_PTR(nsIDOMNodeList); // HTMLDocument property ids // enum HTMLDocument_slots { - HTMLDOCUMENT_TITLE = -11, - HTMLDOCUMENT_REFERRER = -12, - HTMLDOCUMENT_FILESIZE = -13, - HTMLDOCUMENT_FILECREATEDDATE = -14, - HTMLDOCUMENT_FILEMODIFIEDDATE = -15, - HTMLDOCUMENT_FILEUPDATEDDATE = -16, - HTMLDOCUMENT_DOMAIN = -17, - HTMLDOCUMENT_URL = -18, - HTMLDOCUMENT_BODY = -19, - HTMLDOCUMENT_IMAGES = -110, - HTMLDOCUMENT_APPLETS = -111, - HTMLDOCUMENT_LINKS = -112, - HTMLDOCUMENT_FORMS = -113, - HTMLDOCUMENT_ANCHORS = -114, - HTMLDOCUMENT_COOKIE = -115, - NSHTMLDOCUMENT_ALINKCOLOR = -21, - NSHTMLDOCUMENT_LINKCOLOR = -22, - NSHTMLDOCUMENT_VLINKCOLOR = -23, - NSHTMLDOCUMENT_BGCOLOR = -24, - NSHTMLDOCUMENT_FGCOLOR = -25, - NSHTMLDOCUMENT_LASTMODIFIED = -26, - NSHTMLDOCUMENT_EMBEDS = -27, - NSHTMLDOCUMENT_LAYERS = -28, - NSHTMLDOCUMENT_PLUGINS = -29 + HTMLDOCUMENT_TITLE = -1, + HTMLDOCUMENT_REFERRER = -2, + HTMLDOCUMENT_FILESIZE = -3, + HTMLDOCUMENT_FILECREATEDDATE = -4, + HTMLDOCUMENT_FILEMODIFIEDDATE = -5, + HTMLDOCUMENT_FILEUPDATEDDATE = -6, + HTMLDOCUMENT_DOMAIN = -7, + HTMLDOCUMENT_URL = -8, + HTMLDOCUMENT_BODY = -9, + HTMLDOCUMENT_IMAGES = -10, + HTMLDOCUMENT_APPLETS = -11, + HTMLDOCUMENT_LINKS = -12, + HTMLDOCUMENT_FORMS = -13, + HTMLDOCUMENT_ANCHORS = -14, + HTMLDOCUMENT_COOKIE = -15, + NSHTMLDOCUMENT_ALINKCOLOR = -16, + NSHTMLDOCUMENT_LINKCOLOR = -17, + NSHTMLDOCUMENT_VLINKCOLOR = -18, + NSHTMLDOCUMENT_BGCOLOR = -19, + NSHTMLDOCUMENT_FGCOLOR = -20, + NSHTMLDOCUMENT_LASTMODIFIED = -21, + NSHTMLDOCUMENT_EMBEDS = -22, + NSHTMLDOCUMENT_LAYERS = -23, + NSHTMLDOCUMENT_PLUGINS = -24 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLElement.cpp b/dom/src/html/nsJSHTMLElement.cpp index 3e742967864b..8e7fc249ae51 100644 --- a/dom/src/html/nsJSHTMLElement.cpp +++ b/dom/src/html/nsJSHTMLElement.cpp @@ -26,24 +26,28 @@ #include "nsIPtr.h" #include "nsString.h" #include "nsIDOMHTMLElement.h" +#include "nsIDOMCSSStyleDeclaration.h" static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); static NS_DEFINE_IID(kIJSScriptObjectIID, NS_IJSSCRIPTOBJECT_IID); static NS_DEFINE_IID(kIScriptGlobalObjectIID, NS_ISCRIPTGLOBALOBJECT_IID); static NS_DEFINE_IID(kIHTMLElementIID, NS_IDOMHTMLELEMENT_IID); +static NS_DEFINE_IID(kICSSStyleDeclarationIID, NS_IDOMCSSSTYLEDECLARATION_IID); NS_DEF_PTR(nsIDOMHTMLElement); +NS_DEF_PTR(nsIDOMCSSStyleDeclaration); // // HTMLElement property ids // enum HTMLElement_slots { - HTMLELEMENT_ID = -11, - HTMLELEMENT_TITLE = -12, - HTMLELEMENT_LANG = -13, - HTMLELEMENT_DIR = -14, - HTMLELEMENT_CLASSNAME = -15 + HTMLELEMENT_ID = -1, + HTMLELEMENT_TITLE = -2, + HTMLELEMENT_LANG = -3, + HTMLELEMENT_DIR = -4, + HTMLELEMENT_CLASSNAME = -5, + HTMLELEMENT_STYLE = -6 }; /***********************************************************************/ @@ -127,6 +131,33 @@ GetHTMLElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } break; } + case HTMLELEMENT_STYLE: + { + nsIDOMCSSStyleDeclaration* prop; + if (NS_OK == a->GetStyle(&prop)) { + // get the js object + if (prop != nsnull) { + nsIScriptObjectOwner *owner = nsnull; + if (NS_OK == prop->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { + JSObject *object = nsnull; + nsIScriptContext *script_cx = (nsIScriptContext *)JS_GetContextPrivate(cx); + if (NS_OK == owner->GetScriptObject(script_cx, (void**)&object)) { + // set the return value + *vp = OBJECT_TO_JSVAL(object); + } + NS_RELEASE(owner); + } + NS_RELEASE(prop); + } + else { + *vp = JSVAL_NULL; + } + } + else { + return JS_FALSE; + } + break; + } default: { nsIJSScriptObject *object; @@ -358,6 +389,7 @@ static JSPropertySpec HTMLElementProperties[] = {"lang", HTMLELEMENT_LANG, JSPROP_ENUMERATE}, {"dir", HTMLELEMENT_DIR, JSPROP_ENUMERATE}, {"className", HTMLELEMENT_CLASSNAME, JSPROP_ENUMERATE}, + {"style", HTMLELEMENT_STYLE, JSPROP_ENUMERATE | JSPROP_READONLY}, {0} }; diff --git a/dom/src/html/nsJSHTMLFontElement.cpp b/dom/src/html/nsJSHTMLFontElement.cpp index ccab369dd25d..764e463b40c3 100644 --- a/dom/src/html/nsJSHTMLFontElement.cpp +++ b/dom/src/html/nsJSHTMLFontElement.cpp @@ -39,9 +39,9 @@ NS_DEF_PTR(nsIDOMHTMLFontElement); // HTMLFontElement property ids // enum HTMLFontElement_slots { - HTMLFONTELEMENT_COLOR = -11, - HTMLFONTELEMENT_FACE = -12, - HTMLFONTELEMENT_SIZE = -13 + HTMLFONTELEMENT_COLOR = -1, + HTMLFONTELEMENT_FACE = -2, + HTMLFONTELEMENT_SIZE = -3 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLFormElement.cpp b/dom/src/html/nsJSHTMLFormElement.cpp index 1d257e5c60df..aa3c007606b1 100644 --- a/dom/src/html/nsJSHTMLFormElement.cpp +++ b/dom/src/html/nsJSHTMLFormElement.cpp @@ -48,15 +48,15 @@ NS_DEF_PTR(nsIDOMHTMLCollection); // HTMLFormElement property ids // enum HTMLFormElement_slots { - HTMLFORMELEMENT_ELEMENTS = -11, - HTMLFORMELEMENT_NAME = -12, - HTMLFORMELEMENT_ACCEPTCHARSET = -13, - HTMLFORMELEMENT_ACTION = -14, - HTMLFORMELEMENT_ENCTYPE = -15, - HTMLFORMELEMENT_METHOD = -16, - HTMLFORMELEMENT_TARGET = -17, - NSHTMLFORMELEMENT_ENCODING = -21, - NSHTMLFORMELEMENT_LENGTH = -22 + HTMLFORMELEMENT_ELEMENTS = -1, + HTMLFORMELEMENT_NAME = -2, + HTMLFORMELEMENT_ACCEPTCHARSET = -3, + HTMLFORMELEMENT_ACTION = -4, + HTMLFORMELEMENT_ENCTYPE = -5, + HTMLFORMELEMENT_METHOD = -6, + HTMLFORMELEMENT_TARGET = -7, + NSHTMLFORMELEMENT_ENCODING = -8, + NSHTMLFORMELEMENT_LENGTH = -9 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLFrameElement.cpp b/dom/src/html/nsJSHTMLFrameElement.cpp index ae32094b87b4..fde578ab82fb 100644 --- a/dom/src/html/nsJSHTMLFrameElement.cpp +++ b/dom/src/html/nsJSHTMLFrameElement.cpp @@ -39,14 +39,14 @@ NS_DEF_PTR(nsIDOMHTMLFrameElement); // HTMLFrameElement property ids // enum HTMLFrameElement_slots { - HTMLFRAMEELEMENT_FRAMEBORDER = -11, - HTMLFRAMEELEMENT_LONGDESC = -12, - HTMLFRAMEELEMENT_MARGINHEIGHT = -13, - HTMLFRAMEELEMENT_MARGINWIDTH = -14, - HTMLFRAMEELEMENT_NAME = -15, - HTMLFRAMEELEMENT_NORESIZE = -16, - HTMLFRAMEELEMENT_SCROLLING = -17, - HTMLFRAMEELEMENT_SRC = -18 + HTMLFRAMEELEMENT_FRAMEBORDER = -1, + HTMLFRAMEELEMENT_LONGDESC = -2, + HTMLFRAMEELEMENT_MARGINHEIGHT = -3, + HTMLFRAMEELEMENT_MARGINWIDTH = -4, + HTMLFRAMEELEMENT_NAME = -5, + HTMLFRAMEELEMENT_NORESIZE = -6, + HTMLFRAMEELEMENT_SCROLLING = -7, + HTMLFRAMEELEMENT_SRC = -8 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLFrameSetElement.cpp b/dom/src/html/nsJSHTMLFrameSetElement.cpp index 4561de44b84f..9a0c752e3a3b 100644 --- a/dom/src/html/nsJSHTMLFrameSetElement.cpp +++ b/dom/src/html/nsJSHTMLFrameSetElement.cpp @@ -39,8 +39,8 @@ NS_DEF_PTR(nsIDOMHTMLFrameSetElement); // HTMLFrameSetElement property ids // enum HTMLFrameSetElement_slots { - HTMLFRAMESETELEMENT_COLS = -11, - HTMLFRAMESETELEMENT_ROWS = -12 + HTMLFRAMESETELEMENT_COLS = -1, + HTMLFRAMESETELEMENT_ROWS = -2 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLHRElement.cpp b/dom/src/html/nsJSHTMLHRElement.cpp index d52628dbf5a1..e5fcdf8bca2a 100644 --- a/dom/src/html/nsJSHTMLHRElement.cpp +++ b/dom/src/html/nsJSHTMLHRElement.cpp @@ -39,10 +39,10 @@ NS_DEF_PTR(nsIDOMHTMLHRElement); // HTMLHRElement property ids // enum HTMLHRElement_slots { - HTMLHRELEMENT_ALIGN = -11, - HTMLHRELEMENT_NOSHADE = -12, - HTMLHRELEMENT_SIZE = -13, - HTMLHRELEMENT_WIDTH = -14 + HTMLHRELEMENT_ALIGN = -1, + HTMLHRELEMENT_NOSHADE = -2, + HTMLHRELEMENT_SIZE = -3, + HTMLHRELEMENT_WIDTH = -4 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLHeadElement.cpp b/dom/src/html/nsJSHTMLHeadElement.cpp index 52381dedf120..0c2264d84827 100644 --- a/dom/src/html/nsJSHTMLHeadElement.cpp +++ b/dom/src/html/nsJSHTMLHeadElement.cpp @@ -39,7 +39,7 @@ NS_DEF_PTR(nsIDOMHTMLHeadElement); // HTMLHeadElement property ids // enum HTMLHeadElement_slots { - HTMLHEADELEMENT_PROFILE = -11 + HTMLHEADELEMENT_PROFILE = -1 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLHeadingElement.cpp b/dom/src/html/nsJSHTMLHeadingElement.cpp index f76e042ed49f..57a3c19c6869 100644 --- a/dom/src/html/nsJSHTMLHeadingElement.cpp +++ b/dom/src/html/nsJSHTMLHeadingElement.cpp @@ -39,7 +39,7 @@ NS_DEF_PTR(nsIDOMHTMLHeadingElement); // HTMLHeadingElement property ids // enum HTMLHeadingElement_slots { - HTMLHEADINGELEMENT_ALIGN = -11 + HTMLHEADINGELEMENT_ALIGN = -1 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLHtmlElement.cpp b/dom/src/html/nsJSHTMLHtmlElement.cpp index 2989b78a040c..7f78a63df525 100644 --- a/dom/src/html/nsJSHTMLHtmlElement.cpp +++ b/dom/src/html/nsJSHTMLHtmlElement.cpp @@ -39,7 +39,7 @@ NS_DEF_PTR(nsIDOMHTMLHtmlElement); // HTMLHtmlElement property ids // enum HTMLHtmlElement_slots { - HTMLHTMLELEMENT_VERSION = -11 + HTMLHTMLELEMENT_VERSION = -1 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLIFrameElement.cpp b/dom/src/html/nsJSHTMLIFrameElement.cpp index 048f2a3a2664..76bf7bfc49d5 100644 --- a/dom/src/html/nsJSHTMLIFrameElement.cpp +++ b/dom/src/html/nsJSHTMLIFrameElement.cpp @@ -39,16 +39,16 @@ NS_DEF_PTR(nsIDOMHTMLIFrameElement); // HTMLIFrameElement property ids // enum HTMLIFrameElement_slots { - HTMLIFRAMEELEMENT_ALIGN = -11, - HTMLIFRAMEELEMENT_FRAMEBORDER = -12, - HTMLIFRAMEELEMENT_HEIGHT = -13, - HTMLIFRAMEELEMENT_LONGDESC = -14, - HTMLIFRAMEELEMENT_MARGINHEIGHT = -15, - HTMLIFRAMEELEMENT_MARGINWIDTH = -16, - HTMLIFRAMEELEMENT_NAME = -17, - HTMLIFRAMEELEMENT_SCROLLING = -18, - HTMLIFRAMEELEMENT_SRC = -19, - HTMLIFRAMEELEMENT_WIDTH = -110 + HTMLIFRAMEELEMENT_ALIGN = -1, + HTMLIFRAMEELEMENT_FRAMEBORDER = -2, + HTMLIFRAMEELEMENT_HEIGHT = -3, + HTMLIFRAMEELEMENT_LONGDESC = -4, + HTMLIFRAMEELEMENT_MARGINHEIGHT = -5, + HTMLIFRAMEELEMENT_MARGINWIDTH = -6, + HTMLIFRAMEELEMENT_NAME = -7, + HTMLIFRAMEELEMENT_SCROLLING = -8, + HTMLIFRAMEELEMENT_SRC = -9, + HTMLIFRAMEELEMENT_WIDTH = -10 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLImageElement.cpp b/dom/src/html/nsJSHTMLImageElement.cpp index b2998c8ee651..edb885a0d9a7 100644 --- a/dom/src/html/nsJSHTMLImageElement.cpp +++ b/dom/src/html/nsJSHTMLImageElement.cpp @@ -46,19 +46,19 @@ NS_DEF_PTR(nsIDOMHTMLImageElement); // HTMLImageElement property ids // enum HTMLImageElement_slots { - HTMLIMAGEELEMENT_LOWSRC = -11, - HTMLIMAGEELEMENT_NAME = -12, - HTMLIMAGEELEMENT_ALIGN = -13, - HTMLIMAGEELEMENT_ALT = -14, - HTMLIMAGEELEMENT_BORDER = -15, - HTMLIMAGEELEMENT_HEIGHT = -16, - HTMLIMAGEELEMENT_HSPACE = -17, - HTMLIMAGEELEMENT_ISMAP = -18, - HTMLIMAGEELEMENT_LONGDESC = -19, - HTMLIMAGEELEMENT_SRC = -110, - HTMLIMAGEELEMENT_USEMAP = -111, - HTMLIMAGEELEMENT_VSPACE = -112, - HTMLIMAGEELEMENT_WIDTH = -113 + HTMLIMAGEELEMENT_LOWSRC = -1, + HTMLIMAGEELEMENT_NAME = -2, + HTMLIMAGEELEMENT_ALIGN = -3, + HTMLIMAGEELEMENT_ALT = -4, + HTMLIMAGEELEMENT_BORDER = -5, + HTMLIMAGEELEMENT_HEIGHT = -6, + HTMLIMAGEELEMENT_HSPACE = -7, + HTMLIMAGEELEMENT_ISMAP = -8, + HTMLIMAGEELEMENT_LONGDESC = -9, + HTMLIMAGEELEMENT_SRC = -10, + HTMLIMAGEELEMENT_USEMAP = -11, + HTMLIMAGEELEMENT_VSPACE = -12, + HTMLIMAGEELEMENT_WIDTH = -13 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLInputElement.cpp b/dom/src/html/nsJSHTMLInputElement.cpp index 1e7789d3bd01..292dfba68051 100644 --- a/dom/src/html/nsJSHTMLInputElement.cpp +++ b/dom/src/html/nsJSHTMLInputElement.cpp @@ -42,24 +42,24 @@ NS_DEF_PTR(nsIDOMHTMLFormElement); // HTMLInputElement property ids // enum HTMLInputElement_slots { - HTMLINPUTELEMENT_DEFAULTVALUE = -11, - HTMLINPUTELEMENT_DEFAULTCHECKED = -12, - HTMLINPUTELEMENT_FORM = -13, - HTMLINPUTELEMENT_ACCEPT = -14, - HTMLINPUTELEMENT_ACCESSKEY = -15, - HTMLINPUTELEMENT_ALIGN = -16, - HTMLINPUTELEMENT_ALT = -17, - HTMLINPUTELEMENT_CHECKED = -18, - HTMLINPUTELEMENT_DISABLED = -19, - HTMLINPUTELEMENT_MAXLENGTH = -110, - HTMLINPUTELEMENT_NAME = -111, - HTMLINPUTELEMENT_READONLY = -112, - HTMLINPUTELEMENT_SIZE = -113, - HTMLINPUTELEMENT_SRC = -114, - HTMLINPUTELEMENT_TABINDEX = -115, - HTMLINPUTELEMENT_TYPE = -116, - HTMLINPUTELEMENT_USEMAP = -117, - HTMLINPUTELEMENT_VALUE = -118 + HTMLINPUTELEMENT_DEFAULTVALUE = -1, + HTMLINPUTELEMENT_DEFAULTCHECKED = -2, + HTMLINPUTELEMENT_FORM = -3, + HTMLINPUTELEMENT_ACCEPT = -4, + HTMLINPUTELEMENT_ACCESSKEY = -5, + HTMLINPUTELEMENT_ALIGN = -6, + HTMLINPUTELEMENT_ALT = -7, + HTMLINPUTELEMENT_CHECKED = -8, + HTMLINPUTELEMENT_DISABLED = -9, + HTMLINPUTELEMENT_MAXLENGTH = -10, + HTMLINPUTELEMENT_NAME = -11, + HTMLINPUTELEMENT_READONLY = -12, + HTMLINPUTELEMENT_SIZE = -13, + HTMLINPUTELEMENT_SRC = -14, + HTMLINPUTELEMENT_TABINDEX = -15, + HTMLINPUTELEMENT_TYPE = -16, + HTMLINPUTELEMENT_USEMAP = -17, + HTMLINPUTELEMENT_VALUE = -18 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLInsElement.cpp b/dom/src/html/nsJSHTMLInsElement.cpp index a53a76086fac..e004bc074eef 100644 --- a/dom/src/html/nsJSHTMLInsElement.cpp +++ b/dom/src/html/nsJSHTMLInsElement.cpp @@ -39,8 +39,8 @@ NS_DEF_PTR(nsIDOMHTMLInsElement); // HTMLInsElement property ids // enum HTMLInsElement_slots { - HTMLINSELEMENT_CITE = -11, - HTMLINSELEMENT_DATETIME = -12 + HTMLINSELEMENT_CITE = -1, + HTMLINSELEMENT_DATETIME = -2 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLIsIndexElement.cpp b/dom/src/html/nsJSHTMLIsIndexElement.cpp index 2475460c7bc7..9d3e1d666e4c 100644 --- a/dom/src/html/nsJSHTMLIsIndexElement.cpp +++ b/dom/src/html/nsJSHTMLIsIndexElement.cpp @@ -42,8 +42,8 @@ NS_DEF_PTR(nsIDOMHTMLIsIndexElement); // HTMLIsIndexElement property ids // enum HTMLIsIndexElement_slots { - HTMLISINDEXELEMENT_FORM = -11, - HTMLISINDEXELEMENT_PROMPT = -12 + HTMLISINDEXELEMENT_FORM = -1, + HTMLISINDEXELEMENT_PROMPT = -2 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLLIElement.cpp b/dom/src/html/nsJSHTMLLIElement.cpp index 9887cc197f38..8322cc4c190b 100644 --- a/dom/src/html/nsJSHTMLLIElement.cpp +++ b/dom/src/html/nsJSHTMLLIElement.cpp @@ -39,8 +39,8 @@ NS_DEF_PTR(nsIDOMHTMLLIElement); // HTMLLIElement property ids // enum HTMLLIElement_slots { - HTMLLIELEMENT_TYPE = -11, - HTMLLIELEMENT_VALUE = -12 + HTMLLIELEMENT_TYPE = -1, + HTMLLIELEMENT_VALUE = -2 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLLabelElement.cpp b/dom/src/html/nsJSHTMLLabelElement.cpp index 36dfb4e4be77..e8199b3ed3d7 100644 --- a/dom/src/html/nsJSHTMLLabelElement.cpp +++ b/dom/src/html/nsJSHTMLLabelElement.cpp @@ -42,9 +42,9 @@ NS_DEF_PTR(nsIDOMHTMLLabelElement); // HTMLLabelElement property ids // enum HTMLLabelElement_slots { - HTMLLABELELEMENT_FORM = -11, - HTMLLABELELEMENT_ACCESSKEY = -12, - HTMLLABELELEMENT_HTMLFOR = -13 + HTMLLABELELEMENT_FORM = -1, + HTMLLABELELEMENT_ACCESSKEY = -2, + HTMLLABELELEMENT_HTMLFOR = -3 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLLegendElement.cpp b/dom/src/html/nsJSHTMLLegendElement.cpp index 8174f9c7c487..b1c27fad4dd0 100644 --- a/dom/src/html/nsJSHTMLLegendElement.cpp +++ b/dom/src/html/nsJSHTMLLegendElement.cpp @@ -42,9 +42,9 @@ NS_DEF_PTR(nsIDOMHTMLLegendElement); // HTMLLegendElement property ids // enum HTMLLegendElement_slots { - HTMLLEGENDELEMENT_FORM = -11, - HTMLLEGENDELEMENT_ACCESSKEY = -12, - HTMLLEGENDELEMENT_ALIGN = -13 + HTMLLEGENDELEMENT_FORM = -1, + HTMLLEGENDELEMENT_ACCESSKEY = -2, + HTMLLEGENDELEMENT_ALIGN = -3 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLLinkElement.cpp b/dom/src/html/nsJSHTMLLinkElement.cpp index d303a0498a92..8c64481b797e 100644 --- a/dom/src/html/nsJSHTMLLinkElement.cpp +++ b/dom/src/html/nsJSHTMLLinkElement.cpp @@ -39,15 +39,15 @@ NS_DEF_PTR(nsIDOMHTMLLinkElement); // HTMLLinkElement property ids // enum HTMLLinkElement_slots { - HTMLLINKELEMENT_DISABLED = -11, - HTMLLINKELEMENT_CHARSET = -12, - HTMLLINKELEMENT_HREF = -13, - HTMLLINKELEMENT_HREFLANG = -14, - HTMLLINKELEMENT_MEDIA = -15, - HTMLLINKELEMENT_REL = -16, - HTMLLINKELEMENT_REV = -17, - HTMLLINKELEMENT_TARGET = -18, - HTMLLINKELEMENT_TYPE = -19 + HTMLLINKELEMENT_DISABLED = -1, + HTMLLINKELEMENT_CHARSET = -2, + HTMLLINKELEMENT_HREF = -3, + HTMLLINKELEMENT_HREFLANG = -4, + HTMLLINKELEMENT_MEDIA = -5, + HTMLLINKELEMENT_REL = -6, + HTMLLINKELEMENT_REV = -7, + HTMLLINKELEMENT_TARGET = -8, + HTMLLINKELEMENT_TYPE = -9 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLMapElement.cpp b/dom/src/html/nsJSHTMLMapElement.cpp index 4f5eb4c61132..6b078fb78ab2 100644 --- a/dom/src/html/nsJSHTMLMapElement.cpp +++ b/dom/src/html/nsJSHTMLMapElement.cpp @@ -42,8 +42,8 @@ NS_DEF_PTR(nsIDOMHTMLCollection); // HTMLMapElement property ids // enum HTMLMapElement_slots { - HTMLMAPELEMENT_AREAS = -11, - HTMLMAPELEMENT_NAME = -12 + HTMLMAPELEMENT_AREAS = -1, + HTMLMAPELEMENT_NAME = -2 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLMenuElement.cpp b/dom/src/html/nsJSHTMLMenuElement.cpp index f9805441a48e..bd04ae786dc6 100644 --- a/dom/src/html/nsJSHTMLMenuElement.cpp +++ b/dom/src/html/nsJSHTMLMenuElement.cpp @@ -39,7 +39,7 @@ NS_DEF_PTR(nsIDOMHTMLMenuElement); // HTMLMenuElement property ids // enum HTMLMenuElement_slots { - HTMLMENUELEMENT_COMPACT = -11 + HTMLMENUELEMENT_COMPACT = -1 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLMetaElement.cpp b/dom/src/html/nsJSHTMLMetaElement.cpp index fbb63bbc788a..5ab3a8dd961b 100644 --- a/dom/src/html/nsJSHTMLMetaElement.cpp +++ b/dom/src/html/nsJSHTMLMetaElement.cpp @@ -39,10 +39,10 @@ NS_DEF_PTR(nsIDOMHTMLMetaElement); // HTMLMetaElement property ids // enum HTMLMetaElement_slots { - HTMLMETAELEMENT_CONTENT = -11, - HTMLMETAELEMENT_HTTPEQUIV = -12, - HTMLMETAELEMENT_NAME = -13, - HTMLMETAELEMENT_SCHEME = -14 + HTMLMETAELEMENT_CONTENT = -1, + HTMLMETAELEMENT_HTTPEQUIV = -2, + HTMLMETAELEMENT_NAME = -3, + HTMLMETAELEMENT_SCHEME = -4 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLModElement.cpp b/dom/src/html/nsJSHTMLModElement.cpp index 8b4e12ef81d7..7bfd461d8120 100644 --- a/dom/src/html/nsJSHTMLModElement.cpp +++ b/dom/src/html/nsJSHTMLModElement.cpp @@ -39,8 +39,8 @@ NS_DEF_PTR(nsIDOMHTMLModElement); // HTMLModElement property ids // enum HTMLModElement_slots { - HTMLMODELEMENT_CITE = -11, - HTMLMODELEMENT_DATETIME = -12 + HTMLMODELEMENT_CITE = -1, + HTMLMODELEMENT_DATETIME = -2 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLOListElement.cpp b/dom/src/html/nsJSHTMLOListElement.cpp index 4a944f0af591..39749c3f9ce9 100644 --- a/dom/src/html/nsJSHTMLOListElement.cpp +++ b/dom/src/html/nsJSHTMLOListElement.cpp @@ -39,9 +39,9 @@ NS_DEF_PTR(nsIDOMHTMLOListElement); // HTMLOListElement property ids // enum HTMLOListElement_slots { - HTMLOLISTELEMENT_COMPACT = -11, - HTMLOLISTELEMENT_START = -12, - HTMLOLISTELEMENT_TYPE = -13 + HTMLOLISTELEMENT_COMPACT = -1, + HTMLOLISTELEMENT_START = -2, + HTMLOLISTELEMENT_TYPE = -3 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLObjectElement.cpp b/dom/src/html/nsJSHTMLObjectElement.cpp index aff40d3e1420..4f43b70afee2 100644 --- a/dom/src/html/nsJSHTMLObjectElement.cpp +++ b/dom/src/html/nsJSHTMLObjectElement.cpp @@ -42,24 +42,24 @@ NS_DEF_PTR(nsIDOMHTMLObjectElement); // HTMLObjectElement property ids // enum HTMLObjectElement_slots { - HTMLOBJECTELEMENT_FORM = -11, - HTMLOBJECTELEMENT_CODE = -12, - HTMLOBJECTELEMENT_ALIGN = -13, - HTMLOBJECTELEMENT_ARCHIVE = -14, - HTMLOBJECTELEMENT_BORDER = -15, - HTMLOBJECTELEMENT_CODEBASE = -16, - HTMLOBJECTELEMENT_CODETYPE = -17, - HTMLOBJECTELEMENT_DATA = -18, - HTMLOBJECTELEMENT_DECLARE = -19, - HTMLOBJECTELEMENT_HEIGHT = -110, - HTMLOBJECTELEMENT_HSPACE = -111, - HTMLOBJECTELEMENT_NAME = -112, - HTMLOBJECTELEMENT_STANDBY = -113, - HTMLOBJECTELEMENT_TABINDEX = -114, - HTMLOBJECTELEMENT_TYPE = -115, - HTMLOBJECTELEMENT_USEMAP = -116, - HTMLOBJECTELEMENT_VSPACE = -117, - HTMLOBJECTELEMENT_WIDTH = -118 + HTMLOBJECTELEMENT_FORM = -1, + HTMLOBJECTELEMENT_CODE = -2, + HTMLOBJECTELEMENT_ALIGN = -3, + HTMLOBJECTELEMENT_ARCHIVE = -4, + HTMLOBJECTELEMENT_BORDER = -5, + HTMLOBJECTELEMENT_CODEBASE = -6, + HTMLOBJECTELEMENT_CODETYPE = -7, + HTMLOBJECTELEMENT_DATA = -8, + HTMLOBJECTELEMENT_DECLARE = -9, + HTMLOBJECTELEMENT_HEIGHT = -10, + HTMLOBJECTELEMENT_HSPACE = -11, + HTMLOBJECTELEMENT_NAME = -12, + HTMLOBJECTELEMENT_STANDBY = -13, + HTMLOBJECTELEMENT_TABINDEX = -14, + HTMLOBJECTELEMENT_TYPE = -15, + HTMLOBJECTELEMENT_USEMAP = -16, + HTMLOBJECTELEMENT_VSPACE = -17, + HTMLOBJECTELEMENT_WIDTH = -18 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLOptGroupElement.cpp b/dom/src/html/nsJSHTMLOptGroupElement.cpp index 9da380137f5b..1e74d578f8ef 100644 --- a/dom/src/html/nsJSHTMLOptGroupElement.cpp +++ b/dom/src/html/nsJSHTMLOptGroupElement.cpp @@ -39,8 +39,8 @@ NS_DEF_PTR(nsIDOMHTMLOptGroupElement); // HTMLOptGroupElement property ids // enum HTMLOptGroupElement_slots { - HTMLOPTGROUPELEMENT_DISABLED = -11, - HTMLOPTGROUPELEMENT_LABEL = -12 + HTMLOPTGROUPELEMENT_DISABLED = -1, + HTMLOPTGROUPELEMENT_LABEL = -2 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLOptionElement.cpp b/dom/src/html/nsJSHTMLOptionElement.cpp index cf07e89c8ee7..f7d99764c148 100644 --- a/dom/src/html/nsJSHTMLOptionElement.cpp +++ b/dom/src/html/nsJSHTMLOptionElement.cpp @@ -42,14 +42,14 @@ NS_DEF_PTR(nsIDOMHTMLOptionElement); // HTMLOptionElement property ids // enum HTMLOptionElement_slots { - HTMLOPTIONELEMENT_FORM = -11, - HTMLOPTIONELEMENT_DEFAULTSELECTED = -12, - HTMLOPTIONELEMENT_TEXT = -13, - HTMLOPTIONELEMENT_INDEX = -14, - HTMLOPTIONELEMENT_DISABLED = -15, - HTMLOPTIONELEMENT_LABEL = -16, - HTMLOPTIONELEMENT_SELECTED = -17, - HTMLOPTIONELEMENT_VALUE = -18 + HTMLOPTIONELEMENT_FORM = -1, + HTMLOPTIONELEMENT_DEFAULTSELECTED = -2, + HTMLOPTIONELEMENT_TEXT = -3, + HTMLOPTIONELEMENT_INDEX = -4, + HTMLOPTIONELEMENT_DISABLED = -5, + HTMLOPTIONELEMENT_LABEL = -6, + HTMLOPTIONELEMENT_SELECTED = -7, + HTMLOPTIONELEMENT_VALUE = -8 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLParagraphElement.cpp b/dom/src/html/nsJSHTMLParagraphElement.cpp index fa3085c60283..80ceffcb6a92 100644 --- a/dom/src/html/nsJSHTMLParagraphElement.cpp +++ b/dom/src/html/nsJSHTMLParagraphElement.cpp @@ -39,7 +39,7 @@ NS_DEF_PTR(nsIDOMHTMLParagraphElement); // HTMLParagraphElement property ids // enum HTMLParagraphElement_slots { - HTMLPARAGRAPHELEMENT_ALIGN = -11 + HTMLPARAGRAPHELEMENT_ALIGN = -1 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLParamElement.cpp b/dom/src/html/nsJSHTMLParamElement.cpp index b96ec523f705..8dd7d265487b 100644 --- a/dom/src/html/nsJSHTMLParamElement.cpp +++ b/dom/src/html/nsJSHTMLParamElement.cpp @@ -39,10 +39,10 @@ NS_DEF_PTR(nsIDOMHTMLParamElement); // HTMLParamElement property ids // enum HTMLParamElement_slots { - HTMLPARAMELEMENT_NAME = -11, - HTMLPARAMELEMENT_TYPE = -12, - HTMLPARAMELEMENT_VALUE = -13, - HTMLPARAMELEMENT_VALUETYPE = -14 + HTMLPARAMELEMENT_NAME = -1, + HTMLPARAMELEMENT_TYPE = -2, + HTMLPARAMELEMENT_VALUE = -3, + HTMLPARAMELEMENT_VALUETYPE = -4 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLPreElement.cpp b/dom/src/html/nsJSHTMLPreElement.cpp index b617a518ae73..edae5975f514 100644 --- a/dom/src/html/nsJSHTMLPreElement.cpp +++ b/dom/src/html/nsJSHTMLPreElement.cpp @@ -39,7 +39,7 @@ NS_DEF_PTR(nsIDOMHTMLPreElement); // HTMLPreElement property ids // enum HTMLPreElement_slots { - HTMLPREELEMENT_WIDTH = -11 + HTMLPREELEMENT_WIDTH = -1 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLQuoteElement.cpp b/dom/src/html/nsJSHTMLQuoteElement.cpp index 4573de7c3b10..d586f24e566c 100644 --- a/dom/src/html/nsJSHTMLQuoteElement.cpp +++ b/dom/src/html/nsJSHTMLQuoteElement.cpp @@ -39,7 +39,7 @@ NS_DEF_PTR(nsIDOMHTMLQuoteElement); // HTMLQuoteElement property ids // enum HTMLQuoteElement_slots { - HTMLQUOTEELEMENT_CITE = -11 + HTMLQUOTEELEMENT_CITE = -1 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLScriptElement.cpp b/dom/src/html/nsJSHTMLScriptElement.cpp index 24f4b8ed0169..3315e6c4a28c 100644 --- a/dom/src/html/nsJSHTMLScriptElement.cpp +++ b/dom/src/html/nsJSHTMLScriptElement.cpp @@ -39,13 +39,13 @@ NS_DEF_PTR(nsIDOMHTMLScriptElement); // HTMLScriptElement property ids // enum HTMLScriptElement_slots { - HTMLSCRIPTELEMENT_TEXT = -11, - HTMLSCRIPTELEMENT_HTMLFOR = -12, - HTMLSCRIPTELEMENT_EVENT = -13, - HTMLSCRIPTELEMENT_CHARSET = -14, - HTMLSCRIPTELEMENT_DEFER = -15, - HTMLSCRIPTELEMENT_SRC = -16, - HTMLSCRIPTELEMENT_TYPE = -17 + HTMLSCRIPTELEMENT_TEXT = -1, + HTMLSCRIPTELEMENT_HTMLFOR = -2, + HTMLSCRIPTELEMENT_EVENT = -3, + HTMLSCRIPTELEMENT_CHARSET = -4, + HTMLSCRIPTELEMENT_DEFER = -5, + HTMLSCRIPTELEMENT_SRC = -6, + HTMLSCRIPTELEMENT_TYPE = -7 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLSelectElement.cpp b/dom/src/html/nsJSHTMLSelectElement.cpp index 3d129d827287..35bc1dfa2c3c 100644 --- a/dom/src/html/nsJSHTMLSelectElement.cpp +++ b/dom/src/html/nsJSHTMLSelectElement.cpp @@ -48,17 +48,17 @@ NS_DEF_PTR(nsIDOMHTMLCollection); // HTMLSelectElement property ids // enum HTMLSelectElement_slots { - HTMLSELECTELEMENT_TYPE = -11, - HTMLSELECTELEMENT_SELECTEDINDEX = -12, - HTMLSELECTELEMENT_VALUE = -13, - HTMLSELECTELEMENT_LENGTH = -14, - HTMLSELECTELEMENT_FORM = -15, - HTMLSELECTELEMENT_OPTIONS = -16, - HTMLSELECTELEMENT_DISABLED = -17, - HTMLSELECTELEMENT_MULTIPLE = -18, - HTMLSELECTELEMENT_NAME = -19, - HTMLSELECTELEMENT_SIZE = -110, - HTMLSELECTELEMENT_TABINDEX = -111 + HTMLSELECTELEMENT_TYPE = -1, + HTMLSELECTELEMENT_SELECTEDINDEX = -2, + HTMLSELECTELEMENT_VALUE = -3, + HTMLSELECTELEMENT_LENGTH = -4, + HTMLSELECTELEMENT_FORM = -5, + HTMLSELECTELEMENT_OPTIONS = -6, + HTMLSELECTELEMENT_DISABLED = -7, + HTMLSELECTELEMENT_MULTIPLE = -8, + HTMLSELECTELEMENT_NAME = -9, + HTMLSELECTELEMENT_SIZE = -10, + HTMLSELECTELEMENT_TABINDEX = -11 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLStyleElement.cpp b/dom/src/html/nsJSHTMLStyleElement.cpp index 9e49b29048e9..33293748cce7 100644 --- a/dom/src/html/nsJSHTMLStyleElement.cpp +++ b/dom/src/html/nsJSHTMLStyleElement.cpp @@ -39,9 +39,9 @@ NS_DEF_PTR(nsIDOMHTMLStyleElement); // HTMLStyleElement property ids // enum HTMLStyleElement_slots { - HTMLSTYLEELEMENT_DISABLED = -11, - HTMLSTYLEELEMENT_MEDIA = -12, - HTMLSTYLEELEMENT_TYPE = -13 + HTMLSTYLEELEMENT_DISABLED = -1, + HTMLSTYLEELEMENT_MEDIA = -2, + HTMLSTYLEELEMENT_TYPE = -3 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLTableCaptionElement.cpp b/dom/src/html/nsJSHTMLTableCaptionElement.cpp index 9d4e2eda7efc..5b0e32975990 100644 --- a/dom/src/html/nsJSHTMLTableCaptionElement.cpp +++ b/dom/src/html/nsJSHTMLTableCaptionElement.cpp @@ -39,7 +39,7 @@ NS_DEF_PTR(nsIDOMHTMLTableCaptionElement); // HTMLTableCaptionElement property ids // enum HTMLTableCaptionElement_slots { - HTMLTABLECAPTIONELEMENT_ALIGN = -11 + HTMLTABLECAPTIONELEMENT_ALIGN = -1 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLTableCellElement.cpp b/dom/src/html/nsJSHTMLTableCellElement.cpp index 7d6c1b30d13a..2f8ce01efe06 100644 --- a/dom/src/html/nsJSHTMLTableCellElement.cpp +++ b/dom/src/html/nsJSHTMLTableCellElement.cpp @@ -39,21 +39,21 @@ NS_DEF_PTR(nsIDOMHTMLTableCellElement); // HTMLTableCellElement property ids // enum HTMLTableCellElement_slots { - HTMLTABLECELLELEMENT_CELLINDEX = -11, - HTMLTABLECELLELEMENT_ABBR = -12, - HTMLTABLECELLELEMENT_ALIGN = -13, - HTMLTABLECELLELEMENT_AXIS = -14, - HTMLTABLECELLELEMENT_BGCOLOR = -15, - HTMLTABLECELLELEMENT_CH = -16, - HTMLTABLECELLELEMENT_CHOFF = -17, - HTMLTABLECELLELEMENT_COLSPAN = -18, - HTMLTABLECELLELEMENT_HEADERS = -19, - HTMLTABLECELLELEMENT_HEIGHT = -110, - HTMLTABLECELLELEMENT_NOWRAP = -111, - HTMLTABLECELLELEMENT_ROWSPAN = -112, - HTMLTABLECELLELEMENT_SCOPE = -113, - HTMLTABLECELLELEMENT_VALIGN = -114, - HTMLTABLECELLELEMENT_WIDTH = -115 + HTMLTABLECELLELEMENT_CELLINDEX = -1, + HTMLTABLECELLELEMENT_ABBR = -2, + HTMLTABLECELLELEMENT_ALIGN = -3, + HTMLTABLECELLELEMENT_AXIS = -4, + HTMLTABLECELLELEMENT_BGCOLOR = -5, + HTMLTABLECELLELEMENT_CH = -6, + HTMLTABLECELLELEMENT_CHOFF = -7, + HTMLTABLECELLELEMENT_COLSPAN = -8, + HTMLTABLECELLELEMENT_HEADERS = -9, + HTMLTABLECELLELEMENT_HEIGHT = -10, + HTMLTABLECELLELEMENT_NOWRAP = -11, + HTMLTABLECELLELEMENT_ROWSPAN = -12, + HTMLTABLECELLELEMENT_SCOPE = -13, + HTMLTABLECELLELEMENT_VALIGN = -14, + HTMLTABLECELLELEMENT_WIDTH = -15 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLTableColElement.cpp b/dom/src/html/nsJSHTMLTableColElement.cpp index e649e3520079..a40057c62fe1 100644 --- a/dom/src/html/nsJSHTMLTableColElement.cpp +++ b/dom/src/html/nsJSHTMLTableColElement.cpp @@ -39,12 +39,12 @@ NS_DEF_PTR(nsIDOMHTMLTableColElement); // HTMLTableColElement property ids // enum HTMLTableColElement_slots { - HTMLTABLECOLELEMENT_ALIGN = -11, - HTMLTABLECOLELEMENT_CH = -12, - HTMLTABLECOLELEMENT_CHOFF = -13, - HTMLTABLECOLELEMENT_SPAN = -14, - HTMLTABLECOLELEMENT_VALIGN = -15, - HTMLTABLECOLELEMENT_WIDTH = -16 + HTMLTABLECOLELEMENT_ALIGN = -1, + HTMLTABLECOLELEMENT_CH = -2, + HTMLTABLECOLELEMENT_CHOFF = -3, + HTMLTABLECOLELEMENT_SPAN = -4, + HTMLTABLECOLELEMENT_VALIGN = -5, + HTMLTABLECOLELEMENT_WIDTH = -6 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLTableElement.cpp b/dom/src/html/nsJSHTMLTableElement.cpp index d897460a4346..be29f1e4ecd6 100644 --- a/dom/src/html/nsJSHTMLTableElement.cpp +++ b/dom/src/html/nsJSHTMLTableElement.cpp @@ -51,20 +51,20 @@ NS_DEF_PTR(nsIDOMHTMLCollection); // HTMLTableElement property ids // enum HTMLTableElement_slots { - HTMLTABLEELEMENT_CAPTION = -11, - HTMLTABLEELEMENT_THEAD = -12, - HTMLTABLEELEMENT_TFOOT = -13, - HTMLTABLEELEMENT_ROWS = -14, - HTMLTABLEELEMENT_TBODIES = -15, - HTMLTABLEELEMENT_ALIGN = -16, - HTMLTABLEELEMENT_BGCOLOR = -17, - HTMLTABLEELEMENT_BORDER = -18, - HTMLTABLEELEMENT_CELLPADDING = -19, - HTMLTABLEELEMENT_CELLSPACING = -110, - HTMLTABLEELEMENT_FRAME = -111, - HTMLTABLEELEMENT_RULES = -112, - HTMLTABLEELEMENT_SUMMARY = -113, - HTMLTABLEELEMENT_WIDTH = -114 + HTMLTABLEELEMENT_CAPTION = -1, + HTMLTABLEELEMENT_THEAD = -2, + HTMLTABLEELEMENT_TFOOT = -3, + HTMLTABLEELEMENT_ROWS = -4, + HTMLTABLEELEMENT_TBODIES = -5, + HTMLTABLEELEMENT_ALIGN = -6, + HTMLTABLEELEMENT_BGCOLOR = -7, + HTMLTABLEELEMENT_BORDER = -8, + HTMLTABLEELEMENT_CELLPADDING = -9, + HTMLTABLEELEMENT_CELLSPACING = -10, + HTMLTABLEELEMENT_FRAME = -11, + HTMLTABLEELEMENT_RULES = -12, + HTMLTABLEELEMENT_SUMMARY = -13, + HTMLTABLEELEMENT_WIDTH = -14 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLTableRowElement.cpp b/dom/src/html/nsJSHTMLTableRowElement.cpp index ef2cb1ee1895..e15d3ded05ff 100644 --- a/dom/src/html/nsJSHTMLTableRowElement.cpp +++ b/dom/src/html/nsJSHTMLTableRowElement.cpp @@ -45,14 +45,14 @@ NS_DEF_PTR(nsIDOMHTMLCollection); // HTMLTableRowElement property ids // enum HTMLTableRowElement_slots { - HTMLTABLEROWELEMENT_ROWINDEX = -11, - HTMLTABLEROWELEMENT_SECTIONROWINDEX = -12, - HTMLTABLEROWELEMENT_CELLS = -13, - HTMLTABLEROWELEMENT_ALIGN = -14, - HTMLTABLEROWELEMENT_BGCOLOR = -15, - HTMLTABLEROWELEMENT_CH = -16, - HTMLTABLEROWELEMENT_CHOFF = -17, - HTMLTABLEROWELEMENT_VALIGN = -18 + HTMLTABLEROWELEMENT_ROWINDEX = -1, + HTMLTABLEROWELEMENT_SECTIONROWINDEX = -2, + HTMLTABLEROWELEMENT_CELLS = -3, + HTMLTABLEROWELEMENT_ALIGN = -4, + HTMLTABLEROWELEMENT_BGCOLOR = -5, + HTMLTABLEROWELEMENT_CH = -6, + HTMLTABLEROWELEMENT_CHOFF = -7, + HTMLTABLEROWELEMENT_VALIGN = -8 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLTableSectionElement.cpp b/dom/src/html/nsJSHTMLTableSectionElement.cpp index f9e66e1f9c3b..7fd5162d894d 100644 --- a/dom/src/html/nsJSHTMLTableSectionElement.cpp +++ b/dom/src/html/nsJSHTMLTableSectionElement.cpp @@ -45,9 +45,9 @@ NS_DEF_PTR(nsIDOMHTMLCollection); // HTMLTableSectionElement property ids // enum HTMLTableSectionElement_slots { - HTMLTABLESECTIONELEMENT_ALIGN = -11, - HTMLTABLESECTIONELEMENT_VALIGN = -12, - HTMLTABLESECTIONELEMENT_ROWS = -13 + HTMLTABLESECTIONELEMENT_ALIGN = -1, + HTMLTABLESECTIONELEMENT_VALIGN = -2, + HTMLTABLESECTIONELEMENT_ROWS = -3 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLTbodyElement.cpp b/dom/src/html/nsJSHTMLTbodyElement.cpp index 802e82547494..c64504a0d0b1 100644 --- a/dom/src/html/nsJSHTMLTbodyElement.cpp +++ b/dom/src/html/nsJSHTMLTbodyElement.cpp @@ -39,10 +39,10 @@ NS_DEF_PTR(nsIDOMHTMLTbodyElement); // HTMLTbodyElement property ids // enum HTMLTbodyElement_slots { - HTMLTBODYELEMENT_ALIGN = -11, - HTMLTBODYELEMENT_CH = -12, - HTMLTBODYELEMENT_CHOFF = -13, - HTMLTBODYELEMENT_VALIGN = -14 + HTMLTBODYELEMENT_ALIGN = -1, + HTMLTBODYELEMENT_CH = -2, + HTMLTBODYELEMENT_CHOFF = -3, + HTMLTBODYELEMENT_VALIGN = -4 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLTextAreaElement.cpp b/dom/src/html/nsJSHTMLTextAreaElement.cpp index 58084e8fca24..a9fc2e42b96f 100644 --- a/dom/src/html/nsJSHTMLTextAreaElement.cpp +++ b/dom/src/html/nsJSHTMLTextAreaElement.cpp @@ -42,15 +42,15 @@ NS_DEF_PTR(nsIDOMHTMLTextAreaElement); // HTMLTextAreaElement property ids // enum HTMLTextAreaElement_slots { - HTMLTEXTAREAELEMENT_DEFAULTVALUE = -11, - HTMLTEXTAREAELEMENT_FORM = -12, - HTMLTEXTAREAELEMENT_ACCESSKEY = -13, - HTMLTEXTAREAELEMENT_COLS = -14, - HTMLTEXTAREAELEMENT_DISABLED = -15, - HTMLTEXTAREAELEMENT_NAME = -16, - HTMLTEXTAREAELEMENT_READONLY = -17, - HTMLTEXTAREAELEMENT_ROWS = -18, - HTMLTEXTAREAELEMENT_TABINDEX = -19 + HTMLTEXTAREAELEMENT_DEFAULTVALUE = -1, + HTMLTEXTAREAELEMENT_FORM = -2, + HTMLTEXTAREAELEMENT_ACCESSKEY = -3, + HTMLTEXTAREAELEMENT_COLS = -4, + HTMLTEXTAREAELEMENT_DISABLED = -5, + HTMLTEXTAREAELEMENT_NAME = -6, + HTMLTEXTAREAELEMENT_READONLY = -7, + HTMLTEXTAREAELEMENT_ROWS = -8, + HTMLTEXTAREAELEMENT_TABINDEX = -9 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLTfootElement.cpp b/dom/src/html/nsJSHTMLTfootElement.cpp index 955c093dc448..6780cff6b588 100644 --- a/dom/src/html/nsJSHTMLTfootElement.cpp +++ b/dom/src/html/nsJSHTMLTfootElement.cpp @@ -39,10 +39,10 @@ NS_DEF_PTR(nsIDOMHTMLTfootElement); // HTMLTfootElement property ids // enum HTMLTfootElement_slots { - HTMLTFOOTELEMENT_ALIGN = -11, - HTMLTFOOTELEMENT_CH = -12, - HTMLTFOOTELEMENT_CHOFF = -13, - HTMLTFOOTELEMENT_VALIGN = -14 + HTMLTFOOTELEMENT_ALIGN = -1, + HTMLTFOOTELEMENT_CH = -2, + HTMLTFOOTELEMENT_CHOFF = -3, + HTMLTFOOTELEMENT_VALIGN = -4 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLTheadElement.cpp b/dom/src/html/nsJSHTMLTheadElement.cpp index 8da683b5524b..b6412a42f1f0 100644 --- a/dom/src/html/nsJSHTMLTheadElement.cpp +++ b/dom/src/html/nsJSHTMLTheadElement.cpp @@ -39,10 +39,10 @@ NS_DEF_PTR(nsIDOMHTMLTheadElement); // HTMLTheadElement property ids // enum HTMLTheadElement_slots { - HTMLTHEADELEMENT_ALIGN = -11, - HTMLTHEADELEMENT_CH = -12, - HTMLTHEADELEMENT_CHOFF = -13, - HTMLTHEADELEMENT_VALIGN = -14 + HTMLTHEADELEMENT_ALIGN = -1, + HTMLTHEADELEMENT_CH = -2, + HTMLTHEADELEMENT_CHOFF = -3, + HTMLTHEADELEMENT_VALIGN = -4 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLTitleElement.cpp b/dom/src/html/nsJSHTMLTitleElement.cpp index c7e1abd7a2c4..89ca0fbcc226 100644 --- a/dom/src/html/nsJSHTMLTitleElement.cpp +++ b/dom/src/html/nsJSHTMLTitleElement.cpp @@ -39,7 +39,7 @@ NS_DEF_PTR(nsIDOMHTMLTitleElement); // HTMLTitleElement property ids // enum HTMLTitleElement_slots { - HTMLTITLEELEMENT_TEXT = -11 + HTMLTITLEELEMENT_TEXT = -1 }; /***********************************************************************/ diff --git a/dom/src/html/nsJSHTMLUListElement.cpp b/dom/src/html/nsJSHTMLUListElement.cpp index a129e793b6e7..1f92141bf620 100644 --- a/dom/src/html/nsJSHTMLUListElement.cpp +++ b/dom/src/html/nsJSHTMLUListElement.cpp @@ -39,8 +39,8 @@ NS_DEF_PTR(nsIDOMHTMLUListElement); // HTMLUListElement property ids // enum HTMLUListElement_slots { - HTMLULISTELEMENT_COMPACT = -11, - HTMLULISTELEMENT_TYPE = -12 + HTMLULISTELEMENT_COMPACT = -1, + HTMLULISTELEMENT_TYPE = -2 }; /***********************************************************************/ diff --git a/dom/src/makefile.win b/dom/src/makefile.win index 74aecf8ccd72..36c667e65ca3 100644 --- a/dom/src/makefile.win +++ b/dom/src/makefile.win @@ -18,6 +18,6 @@ DEPTH=..\.. IGNORE_MANIFEST=1 -DIRS = base coreDOM html events jsurl build +DIRS = base coreDOM html css events jsurl build include <$(DEPTH)\config\rules.mak> diff --git a/dom/tools/JSStubGen.cpp b/dom/tools/JSStubGen.cpp index c2c0aa47ac8d..eaa3328454a0 100644 --- a/dom/tools/JSStubGen.cpp +++ b/dom/tools/JSStubGen.cpp @@ -183,7 +183,7 @@ static const char *kPropEnumStr = "// %s property ids\n" "//\n" "enum %s_slots {\n"; -static const char *kPropSlotStr = " %s_%s = -%d%d"; +static const char *kPropSlotStr = " %s_%s = -%d"; void JSStubGen::GeneratePropertySlots(IdlSpecification &aSpec) @@ -191,6 +191,7 @@ JSStubGen::GeneratePropertySlots(IdlSpecification &aSpec) char buf[512]; ofstream *file = GetFile(); int any_props = 0; + int prop_counter = 0; int i, icount = aSpec.InterfaceCount(); for (i = 0; i < icount; i++) { @@ -216,7 +217,7 @@ JSStubGen::GeneratePropertySlots(IdlSpecification &aSpec) strcpy(attr_name, attr->GetName()); StrUpr(attr_name); - sprintf(buf, kPropSlotStr, iface_name, attr_name, i+1, a+1); + sprintf(buf, kPropSlotStr, iface_name, attr_name, ++prop_counter); *file << buf; if (a != acount-1) { *file << ",\n";