From a0e09b1568e8fb5dfdf0ca066c7829431aa4c292 Mon Sep 17 00:00:00 2001 From: "vidur%netscape.com" Date: Tue, 20 Oct 1998 17:07:23 +0000 Subject: [PATCH] Updated DOM interfaces to match final W3C recommendation. Modified IDL compiler to take IIDs git-svn-id: svn://10.0.0.236/trunk@13207 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsDocument.cpp | 96 ++-- mozilla/content/base/src/nsDocument.h | 27 +- .../html/content/src/nsGenericHTMLElement.cpp | 111 ++--- .../html/content/src/nsGenericHTMLElement.h | 43 +- .../html/content/src/nsHTMLAnchorElement.cpp | 2 +- .../html/content/src/nsHTMLAppletElement.cpp | 2 +- .../html/content/src/nsHTMLAreaElement.cpp | 2 +- .../html/content/src/nsHTMLBRElement.cpp | 2 +- .../html/content/src/nsHTMLBaseElement.cpp | 2 +- .../content/src/nsHTMLBaseFontElement.cpp | 2 +- .../html/content/src/nsHTMLBodyElement.cpp | 2 +- .../html/content/src/nsHTMLButtonElement.cpp | 60 +-- .../html/content/src/nsHTMLDListElement.cpp | 2 +- .../html/content/src/nsHTMLDelElement.cpp | 14 +- .../content/src/nsHTMLDirectoryElement.cpp | 2 +- .../html/content/src/nsHTMLDivElement.cpp | 2 +- .../html/content/src/nsHTMLEmbedElement.cpp | 2 +- .../content/src/nsHTMLFieldSetElement.cpp | 2 +- .../html/content/src/nsHTMLFontElement.cpp | 2 +- .../html/content/src/nsHTMLFormElement.cpp | 11 +- .../html/content/src/nsHTMLFrameElement.cpp | 2 +- .../content/src/nsHTMLFrameSetElement.cpp | 2 +- .../html/content/src/nsHTMLHRElement.cpp | 2 +- .../html/content/src/nsHTMLHeadElement.cpp | 2 +- .../html/content/src/nsHTMLHeadingElement.cpp | 2 +- .../html/content/src/nsHTMLHtmlElement.cpp | 2 +- .../html/content/src/nsHTMLIFrameElement.cpp | 2 +- .../html/content/src/nsHTMLImageElement.cpp | 2 +- .../html/content/src/nsHTMLInputElement.cpp | 2 +- .../html/content/src/nsHTMLInsElement.cpp | 14 +- .../html/content/src/nsHTMLIsIndexElement.cpp | 8 +- .../html/content/src/nsHTMLLIElement.cpp | 2 +- .../html/content/src/nsHTMLLabelElement.cpp | 9 +- .../html/content/src/nsHTMLLegendElement.cpp | 15 +- .../html/content/src/nsHTMLLinkElement.cpp | 2 +- .../html/content/src/nsHTMLMapElement.cpp | 9 +- .../html/content/src/nsHTMLMenuElement.cpp | 2 +- .../html/content/src/nsHTMLMetaElement.cpp | 2 +- .../html/content/src/nsHTMLModElement.cpp | 2 +- .../html/content/src/nsHTMLOListElement.cpp | 2 +- .../html/content/src/nsHTMLObjectElement.cpp | 9 +- .../content/src/nsHTMLOptGroupElement.cpp | 2 +- .../html/content/src/nsHTMLOptionElement.cpp | 25 +- .../content/src/nsHTMLParagraphElement.cpp | 2 +- .../html/content/src/nsHTMLParamElement.cpp | 2 +- .../html/content/src/nsHTMLPreElement.cpp | 2 +- .../html/content/src/nsHTMLQuoteElement.cpp | 2 +- .../html/content/src/nsHTMLScriptElement.cpp | 2 +- .../html/content/src/nsHTMLSelectElement.cpp | 92 ++-- .../content/src/nsHTMLSharedObjectElement.cpp | 9 +- .../html/content/src/nsHTMLSpacerElement.cpp | 2 +- .../html/content/src/nsHTMLSpanElement.cpp | 2 +- .../html/content/src/nsHTMLStyleElement.cpp | 2 +- .../content/src/nsHTMLTableCaptionElement.cpp | 2 +- .../content/src/nsHTMLTableCellElement.cpp | 2 +- .../content/src/nsHTMLTableColElement.cpp | 4 +- .../src/nsHTMLTableColGroupElement.cpp | 2 +- .../html/content/src/nsHTMLTableElement.cpp | 16 +- .../content/src/nsHTMLTableRowElement.cpp | 2 +- .../content/src/nsHTMLTableSectionElement.cpp | 16 +- .../content/src/nsHTMLTextAreaElement.cpp | 76 ++- .../html/content/src/nsHTMLTitleElement.cpp | 2 +- .../html/content/src/nsHTMLUListElement.cpp | 2 +- .../html/content/src/nsHTMLWBRElement.cpp | 2 +- .../html/document/src/nsHTMLDocument.cpp | 103 ++-- .../html/document/src/nsHTMLDocument.h | 25 +- mozilla/dom/public/MANIFEST | 4 - mozilla/dom/public/Makefile | 6 +- mozilla/dom/public/base/MANIFEST | 22 + mozilla/dom/public/base/Makefile | 33 ++ mozilla/dom/public/base/makefile.win | 28 ++ .../dom/public/{ => base}/nsIDOMLocation.h | 4 +- .../dom/public/{ => base}/nsIDOMNavigator.h | 4 +- mozilla/dom/public/{ => base}/nsIDOMWindow.h | 4 +- .../{ => base}/nsIDOMWindowCollection.h | 4 +- mozilla/dom/public/coreDom/MANIFEST | 8 +- mozilla/dom/public/coreDom/Makefile | 8 +- mozilla/dom/public/coreDom/makefile.win | 7 +- .../{nsIDOMAttribute.h => nsIDOMAttr.h} | 28 +- .../dom/public/coreDom/nsIDOMCDATASection.h | 4 +- .../dom/public/coreDom/nsIDOMCharacterData.h | 80 ++++ mozilla/dom/public/coreDom/nsIDOMComment.h | 8 +- mozilla/dom/public/coreDom/nsIDOMDOM.h | 57 --- .../public/coreDom/nsIDOMDOMImplementation.h | 52 ++ mozilla/dom/public/coreDom/nsIDOMData.h | 80 ---- mozilla/dom/public/coreDom/nsIDOMDocument.h | 51 +- .../public/coreDom/nsIDOMDocumentFragment.h | 9 +- .../dom/public/coreDom/nsIDOMDocumentType.h | 17 +- mozilla/dom/public/coreDom/nsIDOMElement.h | 30 +- mozilla/dom/public/coreDom/nsIDOMEntity.h | 61 +++ .../public/coreDom/nsIDOMEntityReference.h | 49 ++ .../dom/public/coreDom/nsIDOMNamedNodeMap.h | 10 +- mozilla/dom/public/coreDom/nsIDOMNode.h | 53 +- mozilla/dom/public/coreDom/nsIDOMNodeList.h | 4 +- mozilla/dom/public/coreDom/nsIDOMNotation.h | 57 +++ .../coreDom/nsIDOMProcessingInstruction.h | 7 +- mozilla/dom/public/coreDom/nsIDOMStyleSheet.h | 4 +- .../coreDom/nsIDOMStyleSheetCollection.h | 4 +- mozilla/dom/public/coreDom/nsIDOMText.h | 12 +- mozilla/dom/public/coreEvents/nsIDOMEvent.h | 4 +- .../public/coreEvents/nsIDOMEventCapturer.h | 4 +- mozilla/dom/public/coreEvents/nsIDOMNSEvent.h | 4 +- .../dom/public/css/nsIDOMCSSFontFaceRule.h | 4 +- mozilla/dom/public/css/nsIDOMCSSMediaRule.h | 4 +- mozilla/dom/public/css/nsIDOMCSSPageRule.h | 4 +- .../public/css/nsIDOMCSSStyleDeclaration.h | 4 +- mozilla/dom/public/css/nsIDOMCSSStyleRule.h | 4 +- .../public/css/nsIDOMCSSStyleRuleCollection.h | 4 +- .../dom/public/css/nsIDOMCSSStyleRuleSimple.h | 4 +- mozilla/dom/public/css/nsIDOMCSSStyleSheet.h | 4 +- mozilla/dom/public/html/MANIFEST | 6 +- mozilla/dom/public/html/Makefile | 6 +- mozilla/dom/public/html/makefile.win | 8 +- .../dom/public/html/nsIDOMHTMLAnchorElement.h | 4 +- .../dom/public/html/nsIDOMHTMLAppletElement.h | 4 +- .../dom/public/html/nsIDOMHTMLAreaElement.h | 4 +- mozilla/dom/public/html/nsIDOMHTMLBRElement.h | 4 +- .../dom/public/html/nsIDOMHTMLBaseElement.h | 4 +- .../public/html/nsIDOMHTMLBaseFontElement.h | 4 +- ...lement.h => nsIDOMHTMLBlockquoteElement.h} | 29 +- .../dom/public/html/nsIDOMHTMLBodyElement.h | 4 +- .../dom/public/html/nsIDOMHTMLButtonElement.h | 10 +- .../dom/public/html/nsIDOMHTMLCollection.h | 4 +- .../dom/public/html/nsIDOMHTMLDListElement.h | 4 +- .../dom/public/html/nsIDOMHTMLDelElement.h | 63 --- .../public/html/nsIDOMHTMLDirectoryElement.h | 4 +- .../dom/public/html/nsIDOMHTMLDivElement.h | 4 +- mozilla/dom/public/html/nsIDOMHTMLDocument.h | 20 +- mozilla/dom/public/html/nsIDOMHTMLElement.h | 4 +- .../public/html/nsIDOMHTMLFieldSetElement.h | 4 +- .../dom/public/html/nsIDOMHTMLFontElement.h | 4 +- .../dom/public/html/nsIDOMHTMLFormElement.h | 19 +- .../dom/public/html/nsIDOMHTMLFrameElement.h | 4 +- .../public/html/nsIDOMHTMLFrameSetElement.h | 4 +- mozilla/dom/public/html/nsIDOMHTMLHRElement.h | 4 +- .../dom/public/html/nsIDOMHTMLHeadElement.h | 4 +- .../public/html/nsIDOMHTMLHeadingElement.h | 4 +- .../dom/public/html/nsIDOMHTMLHtmlElement.h | 4 +- .../dom/public/html/nsIDOMHTMLIFrameElement.h | 4 +- .../dom/public/html/nsIDOMHTMLImageElement.h | 8 +- .../dom/public/html/nsIDOMHTMLInputElement.h | 4 +- .../public/html/nsIDOMHTMLIsIndexElement.h | 7 +- mozilla/dom/public/html/nsIDOMHTMLLIElement.h | 4 +- .../dom/public/html/nsIDOMHTMLLabelElement.h | 7 +- .../dom/public/html/nsIDOMHTMLLegendElement.h | 7 +- .../dom/public/html/nsIDOMHTMLLinkElement.h | 4 +- .../dom/public/html/nsIDOMHTMLMapElement.h | 7 +- .../dom/public/html/nsIDOMHTMLMenuElement.h | 4 +- .../dom/public/html/nsIDOMHTMLMetaElement.h | 4 +- .../dom/public/html/nsIDOMHTMLModElement.h | 4 +- .../dom/public/html/nsIDOMHTMLOListElement.h | 4 +- .../dom/public/html/nsIDOMHTMLObjectElement.h | 7 +- .../public/html/nsIDOMHTMLOptGroupElement.h | 4 +- .../dom/public/html/nsIDOMHTMLOptionElement.h | 13 +- .../public/html/nsIDOMHTMLParagraphElement.h | 4 +- .../dom/public/html/nsIDOMHTMLParamElement.h | 4 +- .../dom/public/html/nsIDOMHTMLPreElement.h | 4 +- .../dom/public/html/nsIDOMHTMLQuoteElement.h | 4 +- .../dom/public/html/nsIDOMHTMLScriptElement.h | 4 +- .../dom/public/html/nsIDOMHTMLSelectElement.h | 22 +- .../dom/public/html/nsIDOMHTMLStyleElement.h | 4 +- .../html/nsIDOMHTMLTableCaptionElement.h | 4 +- .../public/html/nsIDOMHTMLTableCellElement.h | 4 +- .../public/html/nsIDOMHTMLTableColElement.h | 4 +- .../dom/public/html/nsIDOMHTMLTableElement.h | 10 +- .../public/html/nsIDOMHTMLTableRowElement.h | 4 +- .../html/nsIDOMHTMLTableSectionElement.h | 21 +- .../dom/public/html/nsIDOMHTMLTbodyElement.h | 77 --- .../public/html/nsIDOMHTMLTextAreaElement.h | 18 +- .../dom/public/html/nsIDOMHTMLTfootElement.h | 77 --- .../dom/public/html/nsIDOMHTMLTheadElement.h | 77 --- .../dom/public/html/nsIDOMHTMLTitleElement.h | 4 +- .../dom/public/html/nsIDOMHTMLUListElement.h | 4 +- mozilla/dom/public/html/nsIDOMImage.h | 4 +- .../dom/public/html/nsIDOMNSHTMLDocument.h | 4 +- .../dom/public/html/nsIDOMNSHTMLFormElement.h | 8 +- mozilla/dom/public/idl/Window.idl | 51 -- .../dom/public/idl/{ => base}/Location.idl | 3 + .../dom/public/idl/{ => base}/Navigator.idl | 3 + mozilla/dom/public/idl/base/Window.idl | 56 +++ .../idl/{ => base}/WindowCollection.idl | 3 + mozilla/dom/public/idl/base/makefile.win | 58 +++ mozilla/dom/public/idl/coreDom/Attr.idl | 8 + mozilla/dom/public/idl/coreDom/Attribute.idl | 5 - .../dom/public/idl/coreDom/CDATASection.idl | 6 +- .../dom/public/idl/coreDom/CharacterData.idl | 25 + mozilla/dom/public/idl/coreDom/Comment.idl | 7 +- mozilla/dom/public/idl/coreDom/DOM.idl | 5 - .../public/idl/coreDom/DOMImplementation.idl | 7 + mozilla/dom/public/idl/coreDom/Data.idl | 18 - mozilla/dom/public/idl/coreDom/Document.idl | 38 +- .../public/idl/coreDom/DocumentFragment.idl | 4 +- .../dom/public/idl/coreDom/DocumentType.idl | 12 +- mozilla/dom/public/idl/coreDom/Element.idl | 31 +- mozilla/dom/public/idl/coreDom/Entity.idl | 8 + .../public/idl/coreDom/EntityReference.idl | 5 + .../dom/public/idl/coreDom/NamedNodeMap.idl | 20 +- mozilla/dom/public/idl/coreDom/Node.idl | 79 +-- mozilla/dom/public/idl/coreDom/NodeList.idl | 11 +- mozilla/dom/public/idl/coreDom/Notation.idl | 7 + .../idl/coreDom/ProcessingInstruction.idl | 12 +- mozilla/dom/public/idl/coreDom/StyleSheet.idl | 3 + .../idl/coreDom/StyleSheetCollection.idl | 3 + mozilla/dom/public/idl/coreDom/Text.idl | 12 +- mozilla/dom/public/idl/coreDom/makefile.win | 9 +- .../dom/public/idl/css/CSSFontFaceRule.idl | 3 + mozilla/dom/public/idl/css/CSSMediaRule.idl | 3 + mozilla/dom/public/idl/css/CSSPageRule.idl | 3 + .../public/idl/css/CSSStyleDeclaration.idl | 3 + mozilla/dom/public/idl/css/CSSStyleRule.idl | 3 + .../public/idl/css/CSSStyleRuleCollection.idl | 3 + .../dom/public/idl/css/CSSStyleRuleSimple.idl | 3 + mozilla/dom/public/idl/css/CSSStyleSheet.idl | 3 + mozilla/dom/public/idl/events/Event.idl | 6 + .../dom/public/idl/html/HTMLAnchorElement.idl | 35 +- .../dom/public/idl/html/HTMLAppletElement.idl | 29 +- .../dom/public/idl/html/HTMLAreaElement.idl | 23 +- mozilla/dom/public/idl/html/HTMLBRElement.idl | 9 +- .../dom/public/idl/html/HTMLBaseElement.idl | 11 +- .../public/idl/html/HTMLBaseFontElement.idl | 13 +- .../public/idl/html/HTMLBlockquoteElement.idl | 8 + .../dom/public/idl/html/HTMLBodyElement.idl | 19 +- .../dom/public/idl/html/HTMLButtonElement.idl | 21 +- .../dom/public/idl/html/HTMLCollection.idl | 13 +- .../dom/public/idl/html/HTMLDListElement.idl | 9 +- .../dom/public/idl/html/HTMLDelElement.idl | 4 - .../public/idl/html/HTMLDirectoryElement.idl | 9 +- .../dom/public/idl/html/HTMLDivElement.idl | 9 +- mozilla/dom/public/idl/html/HTMLDocument.idl | 48 +- mozilla/dom/public/idl/html/HTMLElement.idl | 19 +- .../public/idl/html/HTMLFieldsetElement.idl | 9 +- .../dom/public/idl/html/HTMLFontElement.idl | 13 +- .../dom/public/idl/html/HTMLFormElement.idl | 29 +- .../dom/public/idl/html/HTMLFrameElement.idl | 23 +- .../public/idl/html/HTMLFrameSetElement.idl | 11 +- mozilla/dom/public/idl/html/HTMLHRElement.idl | 15 +- .../dom/public/idl/html/HTMLHeadElement.idl | 9 +- .../public/idl/html/HTMLHeadingElement.idl | 9 +- .../dom/public/idl/html/HTMLHtmlElement.idl | 9 +- .../dom/public/idl/html/HTMLIFrameElement.idl | 27 +- .../dom/public/idl/html/HTMLImageElement.idl | 41 +- .../dom/public/idl/html/HTMLInputElement.idl | 51 +- .../dom/public/idl/html/HTMLInsElement.idl | 4 - .../public/idl/html/HTMLIsIndexElement.idl | 11 +- mozilla/dom/public/idl/html/HTMLLIElement.idl | 11 +- .../dom/public/idl/html/HTMLLabelElement.idl | 13 +- .../dom/public/idl/html/HTMLLegendElement.idl | 13 +- .../dom/public/idl/html/HTMLLinkElement.idl | 25 +- .../dom/public/idl/html/HTMLMapElement.idl | 11 +- .../dom/public/idl/html/HTMLMenuElement.idl | 9 +- .../dom/public/idl/html/HTMLMetaElement.idl | 15 +- .../dom/public/idl/html/HTMLModElement.idl | 11 +- .../dom/public/idl/html/HTMLOListElement.idl | 13 +- .../dom/public/idl/html/HTMLObjectElement.idl | 43 +- .../public/idl/html/HTMLOptGroupElement.idl | 11 +- .../dom/public/idl/html/HTMLOptionElement.idl | 23 +- .../public/idl/html/HTMLParagraphElement.idl | 9 +- .../dom/public/idl/html/HTMLParamElement.idl | 15 +- .../dom/public/idl/html/HTMLPreElement.idl | 9 +- .../dom/public/idl/html/HTMLQuoteElement.idl | 9 +- .../dom/public/idl/html/HTMLScriptElement.idl | 21 +- .../dom/public/idl/html/HTMLSelectElement.idl | 39 +- .../dom/public/idl/html/HTMLStyleElement.idl | 13 +- .../idl/html/HTMLTableCaptionElement.idl | 9 +- .../public/idl/html/HTMLTableCellElement.idl | 37 +- .../public/idl/html/HTMLTableColElement.idl | 19 +- .../dom/public/idl/html/HTMLTableElement.idl | 51 +- .../public/idl/html/HTMLTableRowElement.idl | 27 +- .../idl/html/HTMLTableSectionElement.idl | 19 +- .../dom/public/idl/html/HTMLTbodyElement.idl | 6 - .../public/idl/html/HTMLTextAreaElement.idl | 33 +- .../dom/public/idl/html/HTMLTfootElement.idl | 6 - .../dom/public/idl/html/HTMLTheadElement.idl | 6 - .../dom/public/idl/html/HTMLTitleElement.idl | 9 +- .../dom/public/idl/html/HTMLUListElement.idl | 11 +- mozilla/dom/public/idl/html/makefile.win | 6 +- mozilla/dom/public/idl/makefile.win | 47 +- mozilla/dom/public/makefile.win | 7 +- .../dom/public/nsIDOMScriptObjectFactory.h | 28 +- mozilla/dom/src/base/nsJSEnvironment.cpp | 4 +- mozilla/dom/src/base/nsJSWindow.cpp | 4 +- mozilla/dom/src/build/nsDOMFactory.cpp | 71 ++- mozilla/dom/src/coreDOM/Makefile | 8 +- mozilla/dom/src/coreDOM/makefile.win | 16 +- .../{nsJSAttribute.cpp => nsJSAttr.cpp} | 133 +++--- .../{nsJSData.cpp => nsJSCharacterData.cpp} | 176 +++---- mozilla/dom/src/coreDOM/nsJSComment.cpp | 2 +- ...{nsJSDOM.cpp => nsJSDOMImplementation.cpp} | 179 +++---- mozilla/dom/src/coreDOM/nsJSDocument.cpp | 250 ++++++---- .../dom/src/coreDOM/nsJSDocumentFragment.cpp | 38 +- mozilla/dom/src/coreDOM/nsJSDocumentType.cpp | 77 ++- mozilla/dom/src/coreDOM/nsJSElement.cpp | 60 ++- .../nsJSEntity.cpp} | 164 +++---- .../dom/src/coreDOM/nsJSEntityReference.cpp | 329 +++++++++++++ mozilla/dom/src/coreDOM/nsJSNamedNodeMap.cpp | 20 +- mozilla/dom/src/coreDOM/nsJSNode.cpp | 216 +++++---- mozilla/dom/src/coreDOM/nsJSNotation.cpp | 363 ++++++++++++++ .../src/coreDOM/nsJSProcessingInstruction.cpp | 17 +- mozilla/dom/src/coreDOM/nsJSText.cpp | 90 +--- mozilla/dom/src/html/Makefile | 6 +- mozilla/dom/src/html/makefile.win | 12 +- ...ment.cpp => nsJSHTMLBlockquoteElement.cpp} | 138 +++--- .../dom/src/html/nsJSHTMLButtonElement.cpp | 42 +- mozilla/dom/src/html/nsJSHTMLDocument.cpp | 102 +--- mozilla/dom/src/html/nsJSHTMLFormElement.cpp | 136 +++--- .../dom/src/html/nsJSHTMLIsIndexElement.cpp | 25 +- mozilla/dom/src/html/nsJSHTMLLabelElement.cpp | 25 +- .../dom/src/html/nsJSHTMLLegendElement.cpp | 25 +- mozilla/dom/src/html/nsJSHTMLMapElement.cpp | 25 +- .../dom/src/html/nsJSHTMLObjectElement.cpp | 25 +- .../dom/src/html/nsJSHTMLOptionElement.cpp | 60 +-- .../dom/src/html/nsJSHTMLSelectElement.cpp | 87 +--- mozilla/dom/src/html/nsJSHTMLTableElement.cpp | 50 +- .../src/html/nsJSHTMLTableSectionElement.cpp | 89 +++- mozilla/dom/src/html/nsJSHTMLTbodyElement.cpp | 452 ------------------ .../dom/src/html/nsJSHTMLTextAreaElement.cpp | 72 ++- mozilla/dom/src/html/nsJSHTMLTfootElement.cpp | 452 ------------------ mozilla/dom/src/html/nsJSHTMLTheadElement.cpp | 452 ------------------ mozilla/dom/tests/js/DumpHTML.js | 10 +- mozilla/dom/tests/js/DumpTree.js | 8 +- mozilla/dom/tests/js/tables/changeCaption.js | 8 +- mozilla/dom/tests/js/tables/changeCell.js | 12 +- mozilla/dom/tools/IdlInterface.cpp | 38 ++ mozilla/dom/tools/IdlInterface.h | 6 +- mozilla/dom/tools/IdlParser.cpp | 13 +- mozilla/dom/tools/IdlScanner.cpp | 33 +- mozilla/dom/tools/IdlScanner.h | 1 + mozilla/dom/tools/JSStubGen.cpp | 2 +- mozilla/dom/tools/XPCOMGen.cpp | 21 +- mozilla/layout/base/src/nsDocument.cpp | 96 ++-- mozilla/layout/base/src/nsDocument.h | 27 +- .../layout/html/content/src/nsCommentNode.cpp | 18 +- .../html/content/src/nsGenericDOMDataNode.cpp | 51 +- .../html/content/src/nsGenericDOMDataNode.h | 73 +-- .../html/content/src/nsGenericHTMLElement.cpp | 111 ++--- .../html/content/src/nsGenericHTMLElement.h | 43 +- .../html/content/src/nsHTMLAnchorElement.cpp | 2 +- .../html/content/src/nsHTMLAppletElement.cpp | 2 +- .../html/content/src/nsHTMLAreaElement.cpp | 2 +- .../html/content/src/nsHTMLBRElement.cpp | 2 +- .../html/content/src/nsHTMLBaseElement.cpp | 2 +- .../content/src/nsHTMLBaseFontElement.cpp | 2 +- .../html/content/src/nsHTMLBodyElement.cpp | 2 +- .../html/content/src/nsHTMLButtonElement.cpp | 60 +-- .../html/content/src/nsHTMLDListElement.cpp | 2 +- .../html/content/src/nsHTMLDelElement.cpp | 14 +- .../content/src/nsHTMLDirectoryElement.cpp | 2 +- .../html/content/src/nsHTMLDivElement.cpp | 2 +- .../html/content/src/nsHTMLEmbedElement.cpp | 2 +- .../content/src/nsHTMLFieldSetElement.cpp | 2 +- .../html/content/src/nsHTMLFontElement.cpp | 2 +- .../html/content/src/nsHTMLFormElement.cpp | 11 +- .../html/content/src/nsHTMLFrameElement.cpp | 2 +- .../content/src/nsHTMLFrameSetElement.cpp | 2 +- .../html/content/src/nsHTMLHRElement.cpp | 2 +- .../html/content/src/nsHTMLHeadElement.cpp | 2 +- .../html/content/src/nsHTMLHeadingElement.cpp | 2 +- .../html/content/src/nsHTMLHtmlElement.cpp | 2 +- .../html/content/src/nsHTMLIFrameElement.cpp | 2 +- .../html/content/src/nsHTMLImageElement.cpp | 2 +- .../html/content/src/nsHTMLInputElement.cpp | 2 +- .../html/content/src/nsHTMLInsElement.cpp | 14 +- .../html/content/src/nsHTMLIsIndexElement.cpp | 8 +- .../html/content/src/nsHTMLLIElement.cpp | 2 +- .../html/content/src/nsHTMLLabelElement.cpp | 9 +- .../html/content/src/nsHTMLLayerElement.cpp | 2 +- .../html/content/src/nsHTMLLegendElement.cpp | 15 +- .../html/content/src/nsHTMLLinkElement.cpp | 2 +- .../html/content/src/nsHTMLMapElement.cpp | 9 +- .../html/content/src/nsHTMLMenuElement.cpp | 2 +- .../html/content/src/nsHTMLMetaElement.cpp | 2 +- .../html/content/src/nsHTMLModElement.cpp | 2 +- .../html/content/src/nsHTMLOListElement.cpp | 2 +- .../html/content/src/nsHTMLObjectElement.cpp | 9 +- .../content/src/nsHTMLOptGroupElement.cpp | 2 +- .../html/content/src/nsHTMLOptionElement.cpp | 25 +- .../content/src/nsHTMLParagraphElement.cpp | 2 +- .../html/content/src/nsHTMLParamElement.cpp | 2 +- .../html/content/src/nsHTMLPreElement.cpp | 2 +- .../html/content/src/nsHTMLQuoteElement.cpp | 2 +- .../html/content/src/nsHTMLScriptElement.cpp | 2 +- .../html/content/src/nsHTMLSelectElement.cpp | 92 ++-- .../html/content/src/nsHTMLSpacerElement.cpp | 2 +- .../html/content/src/nsHTMLSpanElement.cpp | 2 +- .../html/content/src/nsHTMLStyleElement.cpp | 2 +- .../content/src/nsHTMLTableCaptionElement.cpp | 2 +- .../content/src/nsHTMLTableCellElement.cpp | 2 +- .../content/src/nsHTMLTableColElement.cpp | 4 +- .../src/nsHTMLTableColGroupElement.cpp | 2 +- .../html/content/src/nsHTMLTableElement.cpp | 16 +- .../content/src/nsHTMLTableRowElement.cpp | 2 +- .../content/src/nsHTMLTableSectionElement.cpp | 16 +- .../content/src/nsHTMLTextAreaElement.cpp | 76 ++- .../html/content/src/nsHTMLTitleElement.cpp | 2 +- .../html/content/src/nsHTMLUListElement.cpp | 2 +- .../html/content/src/nsHTMLWBRElement.cpp | 2 +- .../layout/html/content/src/nsTextNode.cpp | 28 +- .../html/document/src/nsHTMLDocument.cpp | 103 ++-- .../layout/html/document/src/nsHTMLDocument.h | 25 +- mozilla/layout/html/tests/TestAppend.js | 8 +- mozilla/layout/html/tests/TestAttributes.cpp | 2 +- mozilla/layout/html/tests/TestDelete.js | 10 +- mozilla/layout/html/tests/TestInsert.js | 6 +- mozilla/layout/html/tests/TestTextDOM.js | 74 +-- .../webshell/tests/viewer/nsEditorMode.cpp | 12 +- mozilla/xpcom/base/IIDS.h | 190 ++++---- mozilla/xpcom/src/IIDS.h | 190 ++++---- 407 files changed, 4720 insertions(+), 5604 deletions(-) create mode 100644 mozilla/dom/public/base/MANIFEST create mode 100644 mozilla/dom/public/base/Makefile create mode 100644 mozilla/dom/public/base/makefile.win rename mozilla/dom/public/{ => base}/nsIDOMLocation.h (98%) rename mozilla/dom/public/{ => base}/nsIDOMNavigator.h (97%) rename mozilla/dom/public/{ => base}/nsIDOMWindow.h (99%) rename mozilla/dom/public/{ => base}/nsIDOMWindowCollection.h (96%) rename mozilla/dom/public/coreDom/{nsIDOMAttribute.h => nsIDOMAttr.h} (66%) create mode 100644 mozilla/dom/public/coreDom/nsIDOMCharacterData.h delete mode 100644 mozilla/dom/public/coreDom/nsIDOMDOM.h create mode 100644 mozilla/dom/public/coreDom/nsIDOMDOMImplementation.h delete mode 100644 mozilla/dom/public/coreDom/nsIDOMData.h create mode 100644 mozilla/dom/public/coreDom/nsIDOMEntity.h create mode 100644 mozilla/dom/public/coreDom/nsIDOMEntityReference.h create mode 100644 mozilla/dom/public/coreDom/nsIDOMNotation.h rename mozilla/dom/public/html/{nsIDOMHTMLInsElement.h => nsIDOMHTMLBlockquoteElement.h} (55%) delete mode 100644 mozilla/dom/public/html/nsIDOMHTMLDelElement.h delete mode 100644 mozilla/dom/public/html/nsIDOMHTMLTbodyElement.h delete mode 100644 mozilla/dom/public/html/nsIDOMHTMLTfootElement.h delete mode 100644 mozilla/dom/public/html/nsIDOMHTMLTheadElement.h delete mode 100644 mozilla/dom/public/idl/Window.idl rename mozilla/dom/public/idl/{ => base}/Location.idl (78%) rename mozilla/dom/public/idl/{ => base}/Navigator.idl (79%) create mode 100644 mozilla/dom/public/idl/base/Window.idl rename mozilla/dom/public/idl/{ => base}/WindowCollection.idl (67%) create mode 100644 mozilla/dom/public/idl/base/makefile.win create mode 100644 mozilla/dom/public/idl/coreDom/Attr.idl delete mode 100644 mozilla/dom/public/idl/coreDom/Attribute.idl create mode 100644 mozilla/dom/public/idl/coreDom/CharacterData.idl delete mode 100644 mozilla/dom/public/idl/coreDom/DOM.idl create mode 100644 mozilla/dom/public/idl/coreDom/DOMImplementation.idl delete mode 100644 mozilla/dom/public/idl/coreDom/Data.idl create mode 100644 mozilla/dom/public/idl/coreDom/Entity.idl create mode 100644 mozilla/dom/public/idl/coreDom/EntityReference.idl create mode 100644 mozilla/dom/public/idl/coreDom/Notation.idl create mode 100644 mozilla/dom/public/idl/html/HTMLBlockquoteElement.idl delete mode 100644 mozilla/dom/public/idl/html/HTMLDelElement.idl delete mode 100644 mozilla/dom/public/idl/html/HTMLInsElement.idl delete mode 100644 mozilla/dom/public/idl/html/HTMLTbodyElement.idl delete mode 100644 mozilla/dom/public/idl/html/HTMLTfootElement.idl delete mode 100644 mozilla/dom/public/idl/html/HTMLTheadElement.idl rename mozilla/dom/src/coreDOM/{nsJSAttribute.cpp => nsJSAttr.cpp} (69%) rename mozilla/dom/src/coreDOM/{nsJSData.cpp => nsJSCharacterData.cpp} (68%) rename mozilla/dom/src/coreDOM/{nsJSDOM.cpp => nsJSDOMImplementation.cpp} (62%) rename mozilla/dom/src/{html/nsJSHTMLDelElement.cpp => coreDOM/nsJSEntity.cpp} (64%) create mode 100644 mozilla/dom/src/coreDOM/nsJSEntityReference.cpp create mode 100644 mozilla/dom/src/coreDOM/nsJSNotation.cpp rename mozilla/dom/src/html/{nsJSHTMLInsElement.cpp => nsJSHTMLBlockquoteElement.cpp} (64%) delete mode 100644 mozilla/dom/src/html/nsJSHTMLTbodyElement.cpp delete mode 100644 mozilla/dom/src/html/nsJSHTMLTfootElement.cpp delete mode 100644 mozilla/dom/src/html/nsJSHTMLTheadElement.cpp diff --git a/mozilla/content/base/src/nsDocument.cpp b/mozilla/content/base/src/nsDocument.cpp index 8fb9b430851..4282c91699e 100644 --- a/mozilla/content/base/src/nsDocument.cpp +++ b/mozilla/content/base/src/nsDocument.cpp @@ -620,38 +620,27 @@ nsresult nsDocument::SetScriptObject(void *aScriptObject) // // nsIDOMDocument interface // -NS_IMETHODIMP -nsDocument::GetMasterDoc(nsIDOMDocument **aDocument) -{ - NS_ADDREF_THIS(); - *aDocument = (nsIDOMDocument*)this; - return NS_OK; -} - NS_IMETHODIMP -nsDocument::GetDocumentType(nsIDOMDocumentType** aDocumentType) +nsDocument::GetDoctype(nsIDOMDocumentType** aDoctype) { - //XXX TBI + // Should be implemented by subclass return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP -nsDocument::GetProlog(nsIDOMNodeList** aProlog) +nsDocument::GetImplementation(nsIDOMDOMImplementation** aImplementation) { - *aProlog = nsnull; - return NS_OK; -} - -NS_IMETHODIMP -nsDocument::GetEpilog(nsIDOMNodeList** aEpilog) -{ - *aEpilog = nsnull; - return NS_OK; + // XXX To be implemented + return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP nsDocument::GetDocumentElement(nsIDOMElement** aDocumentElement) { + if (nsnull == aDocumentElement) { + return NS_ERROR_NULL_POINTER; + } + nsresult res = NS_ERROR_FAILURE; if (nsnull != mRootContent) { @@ -662,51 +651,39 @@ nsDocument::GetDocumentElement(nsIDOMElement** aDocumentElement) return res; } -#if 0 -NS_IMETHODIMP -nsDocument::SetDocumentElement(nsIDOMElement *aElement) -{ - NS_PRECONDITION(nsnull != aElement, "null arg"); - nsIContent* content; - - nsresult res = aElement->QueryInterface(kIContentIID, (void**)&content); - if (NS_OK == res) { - SetRootContent(content); - NS_RELEASE(content); - } - else NS_ASSERTION(0, "Must be an nsIContent"); // nsIContent not supported. Who are you? - - return res; -} -#endif - NS_IMETHODIMP nsDocument::CreateElement(const nsString& aTagName, - nsIDOMNamedNodeMap* aAttributes, - nsIDOMElement** aReturn) + nsIDOMElement** aReturn) { - //XXX TBI + // Should be implemented by subclass return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP nsDocument::CreateTextNode(const nsString& aData, nsIDOMText** aReturn) { - //XXX TBI + // Should be implemented by subclass return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP nsDocument::CreateDocumentFragment(nsIDOMDocumentFragment** aReturn) { - //XXX TBI + // Should be implemented by subclass return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP nsDocument::CreateComment(const nsString& aData, nsIDOMComment** aReturn) { - //XXX TBI + // Should be implemented by subclass + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsDocument::CreateCDATASection(const nsString& aData, nsIDOMCDATASection** aReturn) +{ + // Should be implemented by subclass return NS_ERROR_NOT_IMPLEMENTED; } @@ -715,16 +692,23 @@ nsDocument::CreateProcessingInstruction(const nsString& aTarget, const nsString& aData, nsIDOMProcessingInstruction** aReturn) { - //XXX TBI + // Should be implemented by subclass return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP nsDocument::CreateAttribute(const nsString& aName, - nsIDOMNode* aValue, - nsIDOMAttribute** aReturn) + nsIDOMAttr** aReturn) { - //XXX TBI + // Should be implemented by subclass + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsDocument::CreateEntityReference(const nsString& aName, + nsIDOMEntityReference** aReturn) +{ + // Should be implemented by subclass return NS_ERROR_NOT_IMPLEMENTED; } @@ -767,10 +751,10 @@ nsDocument::SetNodeValue(const nsString& aNodeValue) } NS_IMETHODIMP -nsDocument::GetNodeType(PRInt32* aNodeType) +nsDocument::GetNodeType(PRUint16* aNodeType) { - // XXX TBI - return NS_ERROR_NOT_IMPLEMENTED; + *aNodeType = nsIDOMNode::DOCUMENT_NODE; + return NS_OK; } NS_IMETHODIMP @@ -788,7 +772,7 @@ nsDocument::GetChildNodes(nsIDOMNodeList** aChildNodes) } NS_IMETHODIMP -nsDocument::GetHasChildNodes(PRBool* aHasChildNodes) +nsDocument::HasChildNodes(PRBool* aHasChildNodes) { // XXX TBI return NS_ERROR_NOT_IMPLEMENTED; @@ -858,17 +842,17 @@ nsDocument::AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn) } NS_IMETHODIMP -nsDocument::CloneNode(nsIDOMNode** aReturn) +nsDocument::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { // XXX TBI return NS_ERROR_NOT_IMPLEMENTED; } + NS_IMETHODIMP -nsDocument::Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn) +nsDocument::GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { - // XXX TBI - return NS_ERROR_NOT_IMPLEMENTED; + return QueryInterface(kIDOMDocumentIID, (void **)aOwnerDocument); } nsresult nsDocument::GetListenerManager(nsIEventListenerManager **aInstancePtrResult) diff --git a/mozilla/content/base/src/nsDocument.h b/mozilla/content/base/src/nsDocument.h index 89bf58dcdf1..e817cd84b6e 100644 --- a/mozilla/content/base/src/nsDocument.h +++ b/mozilla/content/base/src/nsDocument.h @@ -196,40 +196,39 @@ public: NS_IMETHOD SetScriptObject(void *aScriptObject); // nsIDOMDocument interface - NS_IMETHOD GetMasterDoc(nsIDOMDocument **aDocument); - NS_IMETHOD GetDocumentType(nsIDOMDocumentType** aDocumentType); - NS_IMETHOD GetProlog(nsIDOMNodeList** aProlog); - NS_IMETHOD GetEpilog(nsIDOMNodeList** aEpilog); + NS_IMETHOD GetDoctype(nsIDOMDocumentType** aDoctype); + NS_IMETHOD GetImplementation(nsIDOMDOMImplementation** aImplementation); NS_IMETHOD GetDocumentElement(nsIDOMElement** aDocumentElement); + + NS_IMETHOD CreateElement(const nsString& aTagName, nsIDOMElement** aReturn); NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment** aReturn); - NS_IMETHOD CreateComment(const nsString& aData, nsIDOMComment** aReturn); - NS_IMETHOD CreateProcessingInstruction(const nsString& aTarget, const nsString& aData, nsIDOMProcessingInstruction** aReturn); - NS_IMETHOD CreateAttribute(const nsString& aName, nsIDOMNode* aValue, nsIDOMAttribute** aReturn); - NS_IMETHOD CreateElement(const nsString& aTagName, - nsIDOMNamedNodeMap* aAttributes, - nsIDOMElement** aReturn); NS_IMETHOD CreateTextNode(const nsString& aData, nsIDOMText** aReturn); + NS_IMETHOD CreateComment(const nsString& aData, nsIDOMComment** aReturn); + NS_IMETHOD CreateCDATASection(const nsString& aData, nsIDOMCDATASection** aReturn); + NS_IMETHOD CreateProcessingInstruction(const nsString& aTarget, const nsString& aData, nsIDOMProcessingInstruction** aReturn); + NS_IMETHOD CreateAttribute(const nsString& aName, nsIDOMAttr** aReturn); + NS_IMETHOD CreateEntityReference(const nsString& aName, nsIDOMEntityReference** aReturn); NS_IMETHOD GetElementsByTagName(const nsString& aTagname, nsIDOMNodeList** aReturn); // nsIDOMNode interface NS_IMETHOD GetNodeName(nsString& aNodeName); NS_IMETHOD GetNodeValue(nsString& aNodeValue); NS_IMETHOD SetNodeValue(const nsString& aNodeValue); - NS_IMETHOD GetNodeType(PRInt32* aNodeType); + NS_IMETHOD GetNodeType(PRUint16* aNodeType); NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode); NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes); - NS_IMETHOD GetHasChildNodes(PRBool* aHasChildNodes); + NS_IMETHOD HasChildNodes(PRBool* aHasChildNodes); NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild); NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild); NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling); NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling); NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes); + NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument); NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn); NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aReturn); NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn); NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn); - NS_IMETHOD CloneNode(nsIDOMNode** aReturn); - NS_IMETHOD Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn); + NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn); // nsIDOMEventCapturer interface NS_IMETHOD CaptureEvent(const nsString& aType); diff --git a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp index 41eb8e99d63..bd248d62957 100644 --- a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp +++ b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp @@ -23,7 +23,7 @@ #include "nsICSSStyleRule.h" #include "nsICSSDeclaration.h" #include "nsIDocument.h" -#include "nsIDOMAttribute.h" +#include "nsIDOMAttr.h" #include "nsIDOMEventReceiver.h" #include "nsIDOMNamedNodeMap.h" #include "nsIDOMNodeList.h" @@ -75,7 +75,7 @@ NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); NS_DEFINE_IID(kIContentIID, NS_ICONTENT_IID); //NS_DEFINE_IID(kIHTMLContentIID, NS_IHTMLCONTENT_IID); -static NS_DEFINE_IID(kIDOMAttributeIID, NS_IDOMATTRIBUTE_IID); +static NS_DEFINE_IID(kIDOMAttrIID, NS_IDOMATTR_IID); static NS_DEFINE_IID(kIDOMNamedNodeMapIID, NS_IDOMNAMEDNODEMAP_IID); static NS_DEFINE_IID(kIPrivateDOMEventIID, NS_IPRIVATEDOMEVENT_IID); static NS_DEFINE_IID(kIStyleRuleIID, NS_ISTYLE_RULE_IID); @@ -83,11 +83,12 @@ static NS_DEFINE_IID(kIHTMLDocumentIID, NS_IHTMLDOCUMENT_IID); static NS_DEFINE_IID(kICSSStyleRuleIID, NS_ICSS_STYLE_RULE_IID); static NS_DEFINE_IID(kIDOMNodeListIID, NS_IDOMNODELIST_IID); static NS_DEFINE_IID(kIDOMCSSStyleDeclarationIID, NS_IDOMCSSSTYLEDECLARATION_IID); +static NS_DEFINE_IID(kIDOMDocumentIID, NS_IDOMNODE_IID); // Attribute helper class used to wrap up an attribute with a dom -// object that implements nsIDOMAttribute and nsIDOMNode and +// object that implements nsIDOMAttr and nsIDOMNode and // nsIScriptObjectOwner -class DOMAttribute : public nsIDOMAttribute, public nsIScriptObjectOwner { +class DOMAttribute : public nsIDOMAttr, public nsIScriptObjectOwner { public: DOMAttribute(const nsString &aName, const nsString &aValue); ~DOMAttribute(); @@ -97,20 +98,20 @@ public: NS_IMETHOD GetScriptObject(nsIScriptContext* aContext, void** aScriptObject); NS_IMETHOD SetScriptObject(void *aScriptObject); - // nsIDOMAttribute interface + // nsIDOMAttr interface NS_IMETHOD GetSpecified(PRBool* aSpecified); - NS_IMETHOD SetSpecified(PRBool aSpecified); NS_IMETHOD GetName(nsString& aReturn); NS_IMETHOD GetValue(nsString& aReturn); - + NS_IMETHOD SetValue(const nsString& aValue); + // nsIDOMNode interface NS_IMETHOD GetNodeName(nsString& aNodeName); NS_IMETHOD GetNodeValue(nsString& aNodeValue); NS_IMETHOD SetNodeValue(const nsString& aNodeValue); - NS_IMETHOD GetNodeType(PRInt32* aNodeType); + NS_IMETHOD GetNodeType(PRUint16* aNodeType); NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode); NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes); - NS_IMETHOD GetHasChildNodes(PRBool* aHasChildNodes); + NS_IMETHOD HasChildNodes(PRBool* aHasChildNodes); NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild); NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild); NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling); @@ -122,8 +123,8 @@ public: nsIDOMNode** aReturn); NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn); NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn); - NS_IMETHOD CloneNode(nsIDOMNode** aReturn); - NS_IMETHOD Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn); + NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn); + NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument); private: nsString mName; @@ -147,7 +148,7 @@ public: // nsIDOMNamedNodeMap interface NS_IMETHOD GetLength(PRUint32* aSize); NS_IMETHOD GetNamedItem(const nsString& aName, nsIDOMNode** aReturn); - NS_IMETHOD SetNamedItem(nsIDOMNode* aNode); + NS_IMETHOD SetNamedItem(nsIDOMNode* aNode, nsIDOMNode** aReturn); NS_IMETHOD RemoveNamedItem(const nsString& aName, nsIDOMNode** aReturn); NS_IMETHOD Item(PRUint32 aIndex, nsIDOMNode** aReturn); @@ -200,8 +201,8 @@ DOMAttribute::QueryInterface(REFNSIID aIID, void** aInstancePtr) if (NULL == aInstancePtr) { return NS_ERROR_NULL_POINTER; } - if (aIID.Equals(kIDOMAttributeIID)) { - nsIDOMAttribute* tmp = this; + if (aIID.Equals(kIDOMAttrIID)) { + nsIDOMAttr* tmp = this; *aInstancePtr = (void*)tmp; NS_ADDREF_THIS(); return NS_OK; @@ -213,7 +214,7 @@ DOMAttribute::QueryInterface(REFNSIID aIID, void** aInstancePtr) return NS_OK; } if (aIID.Equals(kISupportsIID)) { - nsIDOMAttribute* tmp1 = this; + nsIDOMAttr* tmp1 = this; nsISupports* tmp2 = tmp1; *aInstancePtr = (void*)tmp2; NS_ADDREF_THIS(); @@ -232,10 +233,10 @@ DOMAttribute::GetScriptObject(nsIScriptContext *aContext, { nsresult res = NS_OK; if (nsnull == mScriptObject) { - res = NS_NewScriptAttribute(aContext, - (nsISupports *)(nsIDOMAttribute *)this, - nsnull, - (void **)&mScriptObject); + res = NS_NewScriptAttr(aContext, + (nsISupports *)(nsIDOMAttr *)this, + nsnull, + (void **)&mScriptObject); } *aScriptObject = mScriptObject; return res; @@ -263,13 +264,14 @@ DOMAttribute::GetValue(nsString& aValue) } nsresult -DOMAttribute::GetSpecified(PRBool* aSpecified) +DOMAttribute::SetValue(const nsString& aValue) { - return NS_ERROR_NOT_IMPLEMENTED; + mValue = aValue; + return NS_OK; } nsresult -DOMAttribute::SetSpecified(PRBool specified) +DOMAttribute::GetSpecified(PRBool* aSpecified) { return NS_ERROR_NOT_IMPLEMENTED; } @@ -294,9 +296,9 @@ DOMAttribute::SetNodeValue(const nsString& aNodeValue) } NS_IMETHODIMP -DOMAttribute::GetNodeType(PRInt32* aNodeType) +DOMAttribute::GetNodeType(PRUint16* aNodeType) { - *aNodeType = (PRInt32)nsIDOMNode::ATTRIBUTE; + *aNodeType = (PRUint16)nsIDOMNode::ATTRIBUTE_NODE; return NS_OK; } @@ -315,7 +317,7 @@ DOMAttribute::GetChildNodes(nsIDOMNodeList** aChildNodes) } NS_IMETHODIMP -DOMAttribute::GetHasChildNodes(PRBool* aHasChildNodes) +DOMAttribute::HasChildNodes(PRBool* aHasChildNodes) { *aHasChildNodes = PR_FALSE; return NS_OK; @@ -381,7 +383,7 @@ DOMAttribute::AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn) } NS_IMETHODIMP -DOMAttribute::CloneNode(nsIDOMNode** aReturn) +DOMAttribute::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { DOMAttribute* newAttr = new DOMAttribute(mName, mValue); if (nsnull == newAttr) { @@ -392,8 +394,8 @@ DOMAttribute::CloneNode(nsIDOMNode** aReturn) return NS_OK; } -NS_IMETHODIMP -DOMAttribute::Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn) +NS_IMETHODIMP +DOMAttribute::GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { // XXX TBI return NS_OK; @@ -479,13 +481,13 @@ DOMAttributeMap::GetNamedItem(const nsString &aAttrName, } nsresult -DOMAttributeMap::SetNamedItem(nsIDOMNode *aNode) +DOMAttributeMap::SetNamedItem(nsIDOMNode *aNode, nsIDOMNode **aReturn) { - nsIDOMAttribute *attribute; + nsIDOMAttr *attribute; nsAutoString name, value; nsresult err; - if (NS_OK != (err = aNode->QueryInterface(kIDOMAttributeIID, + if (NS_OK != (err = aNode->QueryInterface(kIDOMAttrIID, (void **)&attribute))) { return err; } @@ -803,9 +805,9 @@ nsGenericHTMLElement::SetNodeValue(const nsString& aNodeValue) } nsresult -nsGenericHTMLElement::GetNodeType(PRInt32* aNodeType) +nsGenericHTMLElement::GetNodeType(PRUint16* aNodeType) { - *aNodeType = nsIDOMNode::ELEMENT; + *aNodeType = (PRUint16)nsIDOMNode::ELEMENT_NODE; return NS_OK; } @@ -865,6 +867,21 @@ nsGenericHTMLElement::GetNextSibling(nsIDOMNode** aNextSibling) return NS_OK; } +nsresult +nsGenericHTMLElement::GetOwnerDocument(nsIDOMDocument** aOwnerDocument) +{ + // XXX Actually the owner document is the document in whose context + // the element has been created. We should be able to get at it + // whether or not we are attached to the document. + if (nsnull != mDocument) { + return mDocument->QueryInterface(kIDOMDocumentIID, (void **)aOwnerDocument); + } + else { + *aOwnerDocument = nsnull; + return NS_OK; + } +} + nsresult nsGenericHTMLElement::GetAttributes(nsIDOMNamedNodeMap** aAttributes) { @@ -920,7 +937,7 @@ nsGenericHTMLElement::RemoveAttribute(const nsString& aName) nsresult nsGenericHTMLElement::GetAttributeNode(const nsString& aName, - nsIDOMAttribute** aReturn) + nsIDOMAttr** aReturn) { nsAutoString value; if (NS_CONTENT_ATTR_NOT_THERE != GetAttribute(aName, value)) { @@ -930,7 +947,8 @@ nsGenericHTMLElement::GetAttributeNode(const nsString& aName, } nsresult -nsGenericHTMLElement::SetAttributeNode(nsIDOMAttribute* aAttribute) +nsGenericHTMLElement::SetAttributeNode(nsIDOMAttr* aAttribute, + nsIDOMAttr** aReturn) { NS_PRECONDITION(nsnull != aAttribute, "null attribute"); @@ -950,7 +968,8 @@ nsGenericHTMLElement::SetAttributeNode(nsIDOMAttribute* aAttribute) } nsresult -nsGenericHTMLElement::RemoveAttributeNode(nsIDOMAttribute* aAttribute) +nsGenericHTMLElement::RemoveAttributeNode(nsIDOMAttr* aAttribute, + nsIDOMAttr** aReturn) { NS_PRECONDITION(nsnull != aAttribute, "null attribute"); @@ -2845,15 +2864,6 @@ nsGenericHTMLLeafElement::CopyInnerTo(nsIHTMLContent* aSrcContent, return NS_OK; } -nsresult -nsGenericHTMLLeafElement::Equals(nsIDOMNode* aNode, PRBool aDeep, - PRBool* aReturn) -{ - // XXX not yet implemented - *aReturn = PR_FALSE; - return NS_OK; -} - nsresult nsGenericHTMLLeafElement::GetChildNodes(nsIDOMNodeList** aChildNodes) { @@ -3060,15 +3070,6 @@ nsGenericHTMLContainerElement::CopyInnerTo(nsIHTMLContent* aSrcContent, return NS_OK; } -nsresult -nsGenericHTMLContainerElement::Equals(nsIDOMNode* aNode, PRBool aDeep, - PRBool* aReturn) -{ - // XXX not yet implemented - *aReturn = PR_FALSE; - return NS_OK; -} - nsresult nsGenericHTMLContainerElement::GetChildNodes(nsIDOMNodeList** aChildNodes) { @@ -3083,7 +3084,7 @@ nsGenericHTMLContainerElement::GetChildNodes(nsIDOMNodeList** aChildNodes) } nsresult -nsGenericHTMLContainerElement::GetHasChildNodes(PRBool* aReturn) +nsGenericHTMLContainerElement::HasChildNodes(PRBool* aReturn) { if (0 != mChildren.Count()) { *aReturn = PR_TRUE; diff --git a/mozilla/content/html/content/src/nsGenericHTMLElement.h b/mozilla/content/html/content/src/nsGenericHTMLElement.h index 25ff051aef0..ca3c3701f57 100644 --- a/mozilla/content/html/content/src/nsGenericHTMLElement.h +++ b/mozilla/content/html/content/src/nsGenericHTMLElement.h @@ -35,7 +35,7 @@ extern const nsIID kISupportsIID; extern const nsIID kIContentIID; extern const nsIID kIHTMLContentIID; -class nsIDOMAttribute; +class nsIDOMAttr; class nsIDOMEventListener; class nsIDOMNodeList; class nsIEventListenerManager; @@ -48,7 +48,7 @@ class nsISupportsArray; class nsIDOMScriptObjectFactory; class nsChildContentList; class nsDOMCSSDeclaration; - +class nsIDOMCSSStyleDeclaration; // There are a set of DOM- and scripting-specific instance variables // that may only be instantiated when a content object is accessed @@ -73,11 +73,12 @@ public: nsresult GetNodeName(nsString& aNodeName); nsresult GetNodeValue(nsString& aNodeValue); nsresult SetNodeValue(const nsString& aNodeValue); - nsresult GetNodeType(PRInt32* aNodeType); + nsresult GetNodeType(PRUint16* aNodeType); nsresult GetParentNode(nsIDOMNode** aParentNode); nsresult GetAttributes(nsIDOMNamedNodeMap** aAttributes); nsresult GetPreviousSibling(nsIDOMNode** aPreviousSibling); nsresult GetNextSibling(nsIDOMNode** aNextSibling); + nsresult GetOwnerDocument(nsIDOMDocument** aOwnerDocument); // Implementation for nsIDOMElement nsresult GetTagName(nsString& aTagName); @@ -85,9 +86,9 @@ public: nsresult SetDOMAttribute(const nsString& aName, const nsString& aValue); nsresult RemoveAttribute(const nsString& aName); nsresult GetAttributeNode(const nsString& aName, - nsIDOMAttribute** aReturn); - nsresult SetAttributeNode(nsIDOMAttribute* aNewAttr); - nsresult RemoveAttributeNode(nsIDOMAttribute* aOldAttr); + nsIDOMAttr** aReturn); + nsresult SetAttributeNode(nsIDOMAttr* aNewAttr, nsIDOMAttr** aReturn); + nsresult RemoveAttributeNode(nsIDOMAttr* aOldAttr, nsIDOMAttr** aReturn); nsresult GetElementsByTagName(const nsString& aTagname, nsIDOMNodeList** aReturn); nsresult Normalize(); @@ -338,9 +339,8 @@ public: nsGenericHTMLLeafElement* aDest); // Remainder of nsIDOMHTMLElement (and nsIDOMNode) - nsresult Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn); nsresult GetChildNodes(nsIDOMNodeList** aChildNodes); - nsresult GetHasChildNodes(PRBool* aHasChildNodes) { + nsresult HasChildNodes(PRBool* aHasChildNodes) { *aHasChildNodes = PR_FALSE; return NS_OK; } @@ -416,9 +416,8 @@ public: nsGenericHTMLContainerElement* aDest); // Remainder of nsIDOMHTMLElement (and nsIDOMNode) - nsresult Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn); nsresult GetChildNodes(nsIDOMNodeList** aChildNodes); - nsresult GetHasChildNodes(PRBool* aHasChildNodes); + nsresult HasChildNodes(PRBool* aHasChildNodes); nsresult GetFirstChild(nsIDOMNode** aFirstChild); nsresult GetLastChild(nsIDOMNode** aLastChild); nsresult InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, @@ -454,7 +453,7 @@ public: * nsGenericHTMLContainerContent) * * Note that classes using this macro will need to implement: - * NS_IMETHOD CloneNode(nsIDOMNode** aReturn); + * NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn); */ #define NS_IMPL_IDOMNODE_USING_GENERIC(_g) \ NS_IMETHOD GetNodeName(nsString& aNodeName) { \ @@ -466,7 +465,7 @@ public: NS_IMETHOD SetNodeValue(const nsString& aNodeValue) { \ return _g.SetNodeValue(aNodeValue); \ } \ - NS_IMETHOD GetNodeType(PRInt32* aNodeType) { \ + NS_IMETHOD GetNodeType(PRUint16* aNodeType) { \ return _g.GetNodeType(aNodeType); \ } \ NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode) { \ @@ -475,8 +474,8 @@ public: NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes) { \ return _g.GetChildNodes(aChildNodes); \ } \ - NS_IMETHOD GetHasChildNodes(PRBool* aHasChildNodes) { \ - return _g.GetHasChildNodes(aHasChildNodes); \ + NS_IMETHOD HasChildNodes(PRBool* aHasChildNodes) { \ + return _g.HasChildNodes(aHasChildNodes); \ } \ NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild) { \ return _g.GetFirstChild(aFirstChild); \ @@ -507,10 +506,10 @@ public: NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn) { \ return _g.RemoveChild(aOldChild, aReturn); \ } \ - NS_IMETHOD Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn) { \ - return _g.Equals(aNode, aDeep, aReturn); \ + NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { \ + return _g.GetOwnerDocument(aOwnerDocument); \ } \ - NS_IMETHOD CloneNode(nsIDOMNode** aReturn); + NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn); /** * Implement the nsIDOMElement API by forwarding the methods to a @@ -531,14 +530,14 @@ public: return _g.RemoveAttribute(aName); \ } \ NS_IMETHOD GetAttributeNode(const nsString& aName, \ - nsIDOMAttribute** aReturn) { \ + nsIDOMAttr** aReturn) { \ return _g.GetAttributeNode(aName, aReturn); \ } \ - NS_IMETHOD SetAttributeNode(nsIDOMAttribute* aNewAttr) { \ - return _g.SetAttributeNode(aNewAttr); \ + NS_IMETHOD SetAttributeNode(nsIDOMAttr* aNewAttr, nsIDOMAttr** aReturn) { \ + return _g.SetAttributeNode(aNewAttr, aReturn); \ } \ - NS_IMETHOD RemoveAttributeNode(nsIDOMAttribute* aOldAttr) { \ - return _g.RemoveAttributeNode(aOldAttr); \ + NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* aOldAttr, nsIDOMAttr** aReturn) {\ + return _g.RemoveAttributeNode(aOldAttr, aReturn); \ } \ NS_IMETHOD GetElementsByTagName(const nsString& aTagname, \ nsIDOMNodeList** aReturn) { \ diff --git a/mozilla/content/html/content/src/nsHTMLAnchorElement.cpp b/mozilla/content/html/content/src/nsHTMLAnchorElement.cpp index 37d1530d36d..046fe5aa86f 100644 --- a/mozilla/content/html/content/src/nsHTMLAnchorElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLAnchorElement.cpp @@ -144,7 +144,7 @@ nsHTMLAnchorElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLAnchorElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLAnchorElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLAnchorElement* it = new nsHTMLAnchorElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLAppletElement.cpp b/mozilla/content/html/content/src/nsHTMLAppletElement.cpp index f0d7a78b653..cb68c258f9e 100644 --- a/mozilla/content/html/content/src/nsHTMLAppletElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLAppletElement.cpp @@ -132,7 +132,7 @@ nsHTMLAppletElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLAppletElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLAppletElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLAppletElement* it = new nsHTMLAppletElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLAreaElement.cpp b/mozilla/content/html/content/src/nsHTMLAreaElement.cpp index 38aac68dff2..da011020b78 100644 --- a/mozilla/content/html/content/src/nsHTMLAreaElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLAreaElement.cpp @@ -126,7 +126,7 @@ nsHTMLAreaElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLAreaElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLAreaElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLAreaElement* it = new nsHTMLAreaElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLBRElement.cpp b/mozilla/content/html/content/src/nsHTMLBRElement.cpp index 5ef3df38fd5..25da1f70d24 100644 --- a/mozilla/content/html/content/src/nsHTMLBRElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLBRElement.cpp @@ -113,7 +113,7 @@ nsHTMLBRElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLBRElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLBRElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLBRElement* it = new nsHTMLBRElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLBaseElement.cpp b/mozilla/content/html/content/src/nsHTMLBaseElement.cpp index fa0b9686e69..4d4e86d125e 100644 --- a/mozilla/content/html/content/src/nsHTMLBaseElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLBaseElement.cpp @@ -114,7 +114,7 @@ nsHTMLBaseElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLBaseElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLBaseElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLBaseElement* it = new nsHTMLBaseElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLBaseFontElement.cpp b/mozilla/content/html/content/src/nsHTMLBaseFontElement.cpp index 6dccb6523f6..fb7dc37f918 100644 --- a/mozilla/content/html/content/src/nsHTMLBaseFontElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLBaseFontElement.cpp @@ -116,7 +116,7 @@ nsHTMLBaseFontElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLBaseFontElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLBaseFontElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLBaseFontElement* it = new nsHTMLBaseFontElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLBodyElement.cpp b/mozilla/content/html/content/src/nsHTMLBodyElement.cpp index 5ba9fa96614..54839c4527e 100644 --- a/mozilla/content/html/content/src/nsHTMLBodyElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLBodyElement.cpp @@ -274,7 +274,7 @@ nsHTMLBodyElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLBodyElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLBodyElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLBodyElement* it = new nsHTMLBodyElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLButtonElement.cpp b/mozilla/content/html/content/src/nsHTMLButtonElement.cpp index 1b52ac7531c..d5822c7f2c9 100644 --- a/mozilla/content/html/content/src/nsHTMLButtonElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLButtonElement.cpp @@ -59,7 +59,6 @@ public: // nsIDOMHTMLButtonElement NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetAccessKey(nsString& aAccessKey); NS_IMETHOD SetAccessKey(const nsString& aAccessKey); NS_IMETHOD GetDisabled(PRBool* aDisabled); @@ -69,7 +68,6 @@ public: NS_IMETHOD GetTabIndex(PRInt32* aTabIndex); NS_IMETHOD SetTabIndex(PRInt32 aTabIndex); NS_IMETHOD GetType(nsString& aType); - NS_IMETHOD SetType(const nsString& aType); NS_IMETHOD GetValue(nsString& aValue); NS_IMETHOD SetValue(const nsString& aValue); @@ -86,6 +84,7 @@ public: NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner) // nsIFormControl + NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetType(PRInt32* aType); NS_IMETHOD SetWidget(nsIWidget* aWidget) { return NS_OK; }; NS_IMETHOD Init() { return NS_OK; } @@ -179,7 +178,7 @@ nsHTMLButtonElement::Release() // nsIDOMHTMLButtonElement nsresult -nsHTMLButtonElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLButtonElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLButtonElement* it = new nsHTMLButtonElement(mInner.mTag); if (nsnull == it) { @@ -189,30 +188,6 @@ nsHTMLButtonElement::CloneNode(nsIDOMNode** aReturn) return it->QueryInterface(kIDOMNodeIID, (void**) aReturn); } -// An important assumption is that if aForm is null, the previous mForm will not be released -// This allows nsHTMLFormElement to deal with circular references. -NS_IMETHODIMP -nsHTMLButtonElement::SetForm(nsIDOMHTMLFormElement* aForm) -{ - nsresult result = NS_OK; - if (nsnull == aForm) { - mForm = nsnull; - return NS_OK; - } else { - NS_IF_RELEASE(mForm); - nsIFormControl* formControl = nsnull; - result = QueryInterface(kIFormControlIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - result = aForm->QueryInterface(kIFormIID, (void**)&mForm); // keep the ref - if ((NS_OK == result) && mForm) { - mForm->AddElement(formControl); - } - NS_RELEASE(formControl); - } - } - return result; -} - NS_IMETHODIMP nsHTMLButtonElement::GetForm(nsIDOMHTMLFormElement** aForm) { @@ -227,11 +202,16 @@ nsHTMLButtonElement::GetForm(nsIDOMHTMLFormElement** aForm) } return result; } +NS_IMETHODIMP +nsHTMLButtonElement::GetType(nsString& aType) +{ + aType.SetString("button"); + return NS_OK; +} NS_IMPL_STRING_ATTR(nsHTMLButtonElement, AccessKey, accesskey, eSetAttrNotify_None) NS_IMPL_BOOL_ATTR(nsHTMLButtonElement, Disabled, disabled, eSetAttrNotify_Render) NS_IMPL_STRING_ATTR(nsHTMLButtonElement, Name, name, eSetAttrNotify_Restart) -NS_IMPL_STRING_ATTR(nsHTMLButtonElement, Type, type, eSetAttrNotify_Restart) NS_IMPL_INT_ATTR(nsHTMLButtonElement, TabIndex, tabindex, eSetAttrNotify_None) NS_IMPL_STRING_ATTR(nsHTMLButtonElement, Value, value, eSetAttrNotify_Render) @@ -399,3 +379,27 @@ nsHTMLButtonElement::GetType(PRInt32* aType) return NS_FORM_NOTOK; } } + +// An important assumption is that if aForm is null, the previous mForm will not be released +// This allows nsHTMLFormElement to deal with circular references. +NS_IMETHODIMP +nsHTMLButtonElement::SetForm(nsIDOMHTMLFormElement* aForm) +{ + nsresult result = NS_OK; + if (nsnull == aForm) { + mForm = nsnull; + return NS_OK; + } else { + NS_IF_RELEASE(mForm); + nsIFormControl* formControl = nsnull; + result = QueryInterface(kIFormControlIID, (void**)&formControl); + if ((NS_OK == result) && formControl) { + result = aForm->QueryInterface(kIFormIID, (void**)&mForm); // keep the ref + if ((NS_OK == result) && mForm) { + mForm->AddElement(formControl); + } + NS_RELEASE(formControl); + } + } + return result; +} diff --git a/mozilla/content/html/content/src/nsHTMLDListElement.cpp b/mozilla/content/html/content/src/nsHTMLDListElement.cpp index f92025a20c3..f742474109e 100644 --- a/mozilla/content/html/content/src/nsHTMLDListElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLDListElement.cpp @@ -113,7 +113,7 @@ nsHTMLDListElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLDListElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLDListElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLDListElement* it = new nsHTMLDListElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLDelElement.cpp b/mozilla/content/html/content/src/nsHTMLDelElement.cpp index e220083bdff..8e8566b4002 100644 --- a/mozilla/content/html/content/src/nsHTMLDelElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLDelElement.cpp @@ -16,7 +16,7 @@ * Corporation. Portions created by Netscape are Copyright (C) 1998 * Netscape Communications Corporation. All Rights Reserved. */ -#include "nsIDOMHTMLDelElement.h" +#include "nsIDOMHTMLModElement.h" #include "nsIScriptObjectOwner.h" #include "nsIDOMEventReceiver.h" #include "nsIHTMLContent.h" @@ -27,9 +27,9 @@ #include "nsStyleConsts.h" #include "nsIPresContext.h" -static NS_DEFINE_IID(kIDOMHTMLDelElementIID, NS_IDOMHTMLDELELEMENT_IID); +static NS_DEFINE_IID(kIDOMHTMLModElementIID, NS_IDOMHTMLMODELEMENT_IID); -class nsHTMLDelElement : public nsIDOMHTMLDelElement, +class nsHTMLDelElement : public nsIDOMHTMLModElement, public nsIScriptObjectOwner, public nsIDOMEventReceiver, public nsIHTMLContent @@ -50,7 +50,7 @@ public: // nsIDOMHTMLElement NS_IMPL_IDOMHTMLELEMENT_USING_GENERIC(mInner) - // nsIDOMHTMLDelElement + // nsIDOMHTMLModElement NS_IMETHOD GetCite(nsString& aCite); NS_IMETHOD SetCite(const nsString& aCite); NS_IMETHOD GetDateTime(nsString& aDateTime); @@ -104,8 +104,8 @@ nsresult nsHTMLDelElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) { NS_IMPL_HTML_CONTENT_QUERY_INTERFACE(aIID, aInstancePtr, this) - if (aIID.Equals(kIDOMHTMLDelElementIID)) { - nsIDOMHTMLDelElement* tmp = this; + if (aIID.Equals(kIDOMHTMLModElementIID)) { + nsIDOMHTMLModElement* tmp = this; *aInstancePtr = (void*) tmp; mRefCnt++; return NS_OK; @@ -114,7 +114,7 @@ nsHTMLDelElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLDelElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLDelElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLDelElement* it = new nsHTMLDelElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLDirectoryElement.cpp b/mozilla/content/html/content/src/nsHTMLDirectoryElement.cpp index 96b9bb94731..36d64cbbe45 100644 --- a/mozilla/content/html/content/src/nsHTMLDirectoryElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLDirectoryElement.cpp @@ -117,7 +117,7 @@ nsHTMLDirectoryElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLDirectoryElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLDirectoryElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLDirectoryElement* it = new nsHTMLDirectoryElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLDivElement.cpp b/mozilla/content/html/content/src/nsHTMLDivElement.cpp index 8c5f3c2114d..2f468078d83 100644 --- a/mozilla/content/html/content/src/nsHTMLDivElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLDivElement.cpp @@ -115,7 +115,7 @@ nsHTMLDivElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLDivElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLDivElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLDivElement* it = new nsHTMLDivElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLEmbedElement.cpp b/mozilla/content/html/content/src/nsHTMLEmbedElement.cpp index 8c7d2fbbe0f..3ad2f3319e9 100644 --- a/mozilla/content/html/content/src/nsHTMLEmbedElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLEmbedElement.cpp @@ -114,7 +114,7 @@ nsHTMLEmbedElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLEmbedElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLEmbedElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLEmbedElement* it = new nsHTMLEmbedElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLFieldSetElement.cpp b/mozilla/content/html/content/src/nsHTMLFieldSetElement.cpp index 4961456550f..b7ba9507699 100644 --- a/mozilla/content/html/content/src/nsHTMLFieldSetElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLFieldSetElement.cpp @@ -155,7 +155,7 @@ nsHTMLFieldSetElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) // nsIDOMHTMLFieldSetElement nsresult -nsHTMLFieldSetElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLFieldSetElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLFieldSetElement* it = new nsHTMLFieldSetElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLFontElement.cpp b/mozilla/content/html/content/src/nsHTMLFontElement.cpp index 9bbbdbd519e..b03104efc6d 100644 --- a/mozilla/content/html/content/src/nsHTMLFontElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLFontElement.cpp @@ -119,7 +119,7 @@ nsHTMLFontElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLFontElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLFontElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLFontElement* it = new nsHTMLFontElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLFormElement.cpp b/mozilla/content/html/content/src/nsHTMLFormElement.cpp index 565a0de3b04..9c8b9a0e0e6 100644 --- a/mozilla/content/html/content/src/nsHTMLFormElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLFormElement.cpp @@ -71,6 +71,7 @@ public: // nsIDOMHTMLFormElement NS_IMETHOD GetElements(nsIDOMHTMLCollection** aElements); NS_IMETHOD GetName(nsString& aName); + NS_IMETHOD SetName(const nsString& aName); NS_IMETHOD GetAcceptCharset(nsString& aAcceptCharset); NS_IMETHOD SetAcceptCharset(const nsString& aAcceptCharset); NS_IMETHOD GetAction(nsString& aAction); @@ -81,12 +82,12 @@ public: NS_IMETHOD SetMethod(const nsString& aMethod); NS_IMETHOD GetTarget(nsString& aTarget); NS_IMETHOD SetTarget(const nsString& aTarget); + NS_IMETHOD GetLength(PRUint32* aLength); NS_IMETHOD Reset(); NS_IMETHOD Submit(); // nsIDOMNSHTMLFormElement NS_IMETHOD GetEncoding(nsString& aEncoding); - NS_IMETHOD GetLength(PRUint32* aLength); NS_IMETHOD NamedItem(const nsString& aName, nsIDOMElement** aReturn); // nsIScriptObjectOwner @@ -233,7 +234,7 @@ nsTraceRefcnt::Release((nsIForm*)this, mRefCnt-1, __FILE__, __LINE__); // nsIDOMHTMLFormElement nsresult -nsHTMLFormElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLFormElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLFormElement* it = new nsHTMLFormElement(mInner.mTag); if (nsnull == it) { @@ -257,6 +258,12 @@ nsHTMLFormElement::GetName(nsString& aValue) return mInner.GetAttribute(nsHTMLAtoms::name, aValue); } +NS_IMETHODIMP +nsHTMLFormElement::SetName(const nsString& aValue) +{ + return mInner.SetAttribute(nsHTMLAtoms::name, aValue, PR_TRUE); +} + NS_IMPL_STRING_ATTR(nsHTMLFormElement, AcceptCharset, acceptcharset, eSetAttrNotify_None) NS_IMPL_STRING_ATTR(nsHTMLFormElement, Action, action, eSetAttrNotify_None) NS_IMPL_STRING_ATTR(nsHTMLFormElement, Enctype, enctype, eSetAttrNotify_None) diff --git a/mozilla/content/html/content/src/nsHTMLFrameElement.cpp b/mozilla/content/html/content/src/nsHTMLFrameElement.cpp index 4c4204a34c1..61c25b9acc4 100644 --- a/mozilla/content/html/content/src/nsHTMLFrameElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLFrameElement.cpp @@ -126,7 +126,7 @@ nsHTMLFrameElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLFrameElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLFrameElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLFrameElement* it = new nsHTMLFrameElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLFrameSetElement.cpp b/mozilla/content/html/content/src/nsHTMLFrameSetElement.cpp index d5c65ee5a86..2716332470e 100644 --- a/mozilla/content/html/content/src/nsHTMLFrameSetElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLFrameSetElement.cpp @@ -114,7 +114,7 @@ nsHTMLFrameSetElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLFrameSetElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLFrameSetElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLFrameSetElement* it = new nsHTMLFrameSetElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLHRElement.cpp b/mozilla/content/html/content/src/nsHTMLHRElement.cpp index 54fa2ba0616..e5d413f5e5f 100644 --- a/mozilla/content/html/content/src/nsHTMLHRElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLHRElement.cpp @@ -119,7 +119,7 @@ nsHTMLHRElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLHRElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLHRElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLHRElement* it = new nsHTMLHRElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLHeadElement.cpp b/mozilla/content/html/content/src/nsHTMLHeadElement.cpp index a037a38f546..e959c35f940 100644 --- a/mozilla/content/html/content/src/nsHTMLHeadElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLHeadElement.cpp @@ -112,7 +112,7 @@ nsHTMLHeadElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLHeadElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLHeadElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLHeadElement* it = new nsHTMLHeadElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLHeadingElement.cpp b/mozilla/content/html/content/src/nsHTMLHeadingElement.cpp index 5b8ba7c43c0..3bc105bd8de 100644 --- a/mozilla/content/html/content/src/nsHTMLHeadingElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLHeadingElement.cpp @@ -113,7 +113,7 @@ nsHTMLHeadingElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLHeadingElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLHeadingElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLHeadingElement* it = new nsHTMLHeadingElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLHtmlElement.cpp b/mozilla/content/html/content/src/nsHTMLHtmlElement.cpp index 2991431cf68..169f1bd18fe 100644 --- a/mozilla/content/html/content/src/nsHTMLHtmlElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLHtmlElement.cpp @@ -116,7 +116,7 @@ nsHTMLHtmlElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLHtmlElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLHtmlElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLHtmlElement* it; NS_NEWXPCOM(it, nsHTMLHtmlElement); diff --git a/mozilla/content/html/content/src/nsHTMLIFrameElement.cpp b/mozilla/content/html/content/src/nsHTMLIFrameElement.cpp index b06b3874608..ae6fa214282 100644 --- a/mozilla/content/html/content/src/nsHTMLIFrameElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLIFrameElement.cpp @@ -138,7 +138,7 @@ nsHTMLIFrameElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLIFrameElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLIFrameElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLIFrameElement* it = new nsHTMLIFrameElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLImageElement.cpp b/mozilla/content/html/content/src/nsHTMLImageElement.cpp index 7279e11edcc..c3f82650034 100644 --- a/mozilla/content/html/content/src/nsHTMLImageElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLImageElement.cpp @@ -157,7 +157,7 @@ nsHTMLImageElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLImageElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLImageElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLImageElement* it = new nsHTMLImageElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLInputElement.cpp b/mozilla/content/html/content/src/nsHTMLInputElement.cpp index 861b9ac089d..f0d6b6cb78e 100644 --- a/mozilla/content/html/content/src/nsHTMLInputElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLInputElement.cpp @@ -213,7 +213,7 @@ nsHTMLInputElement::Release() // nsIDOMHTMLInputElement nsresult -nsHTMLInputElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLInputElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLInputElement* it = new nsHTMLInputElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLInsElement.cpp b/mozilla/content/html/content/src/nsHTMLInsElement.cpp index d5146328430..72fe0333c89 100644 --- a/mozilla/content/html/content/src/nsHTMLInsElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLInsElement.cpp @@ -16,7 +16,7 @@ * Corporation. Portions created by Netscape are Copyright (C) 1998 * Netscape Communications Corporation. All Rights Reserved. */ -#include "nsIDOMHTMLInsElement.h" +#include "nsIDOMHTMLModElement.h" #include "nsIScriptObjectOwner.h" #include "nsIDOMEventReceiver.h" #include "nsIHTMLContent.h" @@ -27,9 +27,9 @@ #include "nsStyleConsts.h" #include "nsIPresContext.h" -static NS_DEFINE_IID(kIDOMHTMLInsElementIID, NS_IDOMHTMLINSELEMENT_IID); +static NS_DEFINE_IID(kIDOMHTMLModElementIID, NS_IDOMHTMLMODELEMENT_IID); -class nsHTMLInsElement : public nsIDOMHTMLInsElement, +class nsHTMLInsElement : public nsIDOMHTMLModElement, public nsIScriptObjectOwner, public nsIDOMEventReceiver, public nsIHTMLContent @@ -50,7 +50,7 @@ public: // nsIDOMHTMLElement NS_IMPL_IDOMHTMLELEMENT_USING_GENERIC(mInner) - // nsIDOMHTMLInsElement + // nsIDOMHTMLModElement NS_IMETHOD GetCite(nsString& aCite); NS_IMETHOD SetCite(const nsString& aCite); NS_IMETHOD GetDateTime(nsString& aDateTime); @@ -104,8 +104,8 @@ nsresult nsHTMLInsElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) { NS_IMPL_HTML_CONTENT_QUERY_INTERFACE(aIID, aInstancePtr, this) - if (aIID.Equals(kIDOMHTMLInsElementIID)) { - nsIDOMHTMLInsElement* tmp = this; + if (aIID.Equals(kIDOMHTMLModElementIID)) { + nsIDOMHTMLModElement* tmp = this; *aInstancePtr = (void*) tmp; mRefCnt++; return NS_OK; @@ -114,7 +114,7 @@ nsHTMLInsElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLInsElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLInsElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLInsElement* it = new nsHTMLInsElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLIsIndexElement.cpp b/mozilla/content/html/content/src/nsHTMLIsIndexElement.cpp index 60f60e2934a..06e424dbf7d 100644 --- a/mozilla/content/html/content/src/nsHTMLIsIndexElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLIsIndexElement.cpp @@ -52,7 +52,6 @@ public: // nsIDOMHTMLIsIndexElement NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetPrompt(nsString& aPrompt); NS_IMETHOD SetPrompt(const nsString& aPrompt); @@ -114,7 +113,7 @@ nsHTMLIsIndexElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLIsIndexElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLIsIndexElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLIsIndexElement* it = new nsHTMLIsIndexElement(mInner.mTag); if (nsnull == it) { @@ -131,11 +130,6 @@ nsHTMLIsIndexElement::GetForm(nsIDOMHTMLFormElement** aForm) return NS_OK; } -NS_IMETHODIMP -nsHTMLIsIndexElement::SetForm(nsIDOMHTMLFormElement* aForm) -{ - return NS_OK; -} NS_IMPL_STRING_ATTR(nsHTMLIsIndexElement, Prompt, prompt, eSetAttrNotify_Restart) diff --git a/mozilla/content/html/content/src/nsHTMLLIElement.cpp b/mozilla/content/html/content/src/nsHTMLLIElement.cpp index dbb9cc98f50..16c5555cb89 100644 --- a/mozilla/content/html/content/src/nsHTMLLIElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLLIElement.cpp @@ -115,7 +115,7 @@ nsHTMLLIElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLLIElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLLIElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLLIElement* it = new nsHTMLLIElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLLabelElement.cpp b/mozilla/content/html/content/src/nsHTMLLabelElement.cpp index bee260dd58d..ac8a11f181f 100644 --- a/mozilla/content/html/content/src/nsHTMLLabelElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLLabelElement.cpp @@ -52,7 +52,6 @@ public: // nsIDOMHTMLLabelElement NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetAccessKey(nsString& aAccessKey); NS_IMETHOD SetAccessKey(const nsString& aAccessKey); NS_IMETHOD GetHtmlFor(nsString& aHtmlFor); @@ -116,7 +115,7 @@ nsHTMLLabelElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLLabelElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLLabelElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLLabelElement* it = new nsHTMLLabelElement(mInner.mTag); if (nsnull == it) { @@ -133,12 +132,6 @@ nsHTMLLabelElement::GetForm(nsIDOMHTMLFormElement** aForm) return NS_OK; } -NS_IMETHODIMP -nsHTMLLabelElement::SetForm(nsIDOMHTMLFormElement* aForm) -{ - return NS_OK; -} - NS_IMPL_STRING_ATTR(nsHTMLLabelElement, AccessKey, accesskey, eSetAttrNotify_None) NS_IMPL_STRING_ATTR(nsHTMLLabelElement, HtmlFor, _for, eSetAttrNotify_None) diff --git a/mozilla/content/html/content/src/nsHTMLLegendElement.cpp b/mozilla/content/html/content/src/nsHTMLLegendElement.cpp index 214782368f1..bcb6ef88b22 100644 --- a/mozilla/content/html/content/src/nsHTMLLegendElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLLegendElement.cpp @@ -56,7 +56,6 @@ public: // nsIDOMHTMLLegendElement NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetAccessKey(nsString& aAccessKey); NS_IMETHOD SetAccessKey(const nsString& aAccessKey); NS_IMETHOD GetAlign(nsString& aAlign); @@ -125,7 +124,7 @@ nsHTMLLegendElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLLegendElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLLegendElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLLegendElement* it = new nsHTMLLegendElement(mInner.mTag); if (nsnull == it) { @@ -150,18 +149,6 @@ nsHTMLLegendElement::GetForm(nsIDOMHTMLFormElement** aForm) return result; } -NS_IMETHODIMP -nsHTMLLegendElement::SetForm(nsIDOMHTMLFormElement* aForm) -{ - if (nsnull == aForm) { - mForm = nsnull; - return NS_OK; - } else { - NS_IF_RELEASE(mForm); - return aForm->QueryInterface(kIFormIID, (void**)&mForm); - } -} - NS_IMPL_STRING_ATTR(nsHTMLLegendElement, AccessKey, accesskey, eSetAttrNotify_None) NS_IMPL_STRING_ATTR(nsHTMLLegendElement, Align, align, eSetAttrNotify_Reflow) diff --git a/mozilla/content/html/content/src/nsHTMLLinkElement.cpp b/mozilla/content/html/content/src/nsHTMLLinkElement.cpp index f375035dca2..c5c30fe55d6 100644 --- a/mozilla/content/html/content/src/nsHTMLLinkElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLLinkElement.cpp @@ -128,7 +128,7 @@ nsHTMLLinkElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLLinkElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLLinkElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLLinkElement* it = new nsHTMLLinkElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLMapElement.cpp b/mozilla/content/html/content/src/nsHTMLMapElement.cpp index 8368a571dba..29f6cc641ca 100644 --- a/mozilla/content/html/content/src/nsHTMLMapElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLMapElement.cpp @@ -52,7 +52,6 @@ public: // nsIDOMHTMLMapElement NS_IMETHOD GetAreas(nsIDOMHTMLCollection** aAreas); - NS_IMETHOD SetAreas(nsIDOMHTMLCollection* aAreas); NS_IMETHOD GetName(nsString& aName); NS_IMETHOD SetName(const nsString& aName); @@ -114,7 +113,7 @@ nsHTMLMapElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLMapElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLMapElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLMapElement* it = new nsHTMLMapElement(mInner.mTag); if (nsnull == it) { @@ -131,12 +130,6 @@ nsHTMLMapElement::GetAreas(nsIDOMHTMLCollection** aAreas) return NS_ERROR_OUT_OF_MEMORY;/* XXX */ } -NS_IMETHODIMP -nsHTMLMapElement::SetAreas(nsIDOMHTMLCollection* aAreas) -{ - // XXX write me - return NS_OK; -} NS_IMPL_STRING_ATTR(nsHTMLMapElement, Name, name, eSetAttrNotify_Restart) diff --git a/mozilla/content/html/content/src/nsHTMLMenuElement.cpp b/mozilla/content/html/content/src/nsHTMLMenuElement.cpp index 176296ea26e..95c0589049a 100644 --- a/mozilla/content/html/content/src/nsHTMLMenuElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLMenuElement.cpp @@ -117,7 +117,7 @@ nsHTMLMenuElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLMenuElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLMenuElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLMenuElement* it = new nsHTMLMenuElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLMetaElement.cpp b/mozilla/content/html/content/src/nsHTMLMetaElement.cpp index faad4dd533e..7ee2ceb0907 100644 --- a/mozilla/content/html/content/src/nsHTMLMetaElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLMetaElement.cpp @@ -118,7 +118,7 @@ nsHTMLMetaElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLMetaElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLMetaElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLMetaElement* it = new nsHTMLMetaElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLModElement.cpp b/mozilla/content/html/content/src/nsHTMLModElement.cpp index f044ae1bf7b..22bb0f9815c 100644 --- a/mozilla/content/html/content/src/nsHTMLModElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLModElement.cpp @@ -114,7 +114,7 @@ nsHTMLModElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLModElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLModElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLModElement* it = new nsHTMLModElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLOListElement.cpp b/mozilla/content/html/content/src/nsHTMLOListElement.cpp index 8e9a656072a..722999e0597 100644 --- a/mozilla/content/html/content/src/nsHTMLOListElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLOListElement.cpp @@ -117,7 +117,7 @@ nsHTMLOListElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLOListElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLOListElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLOListElement* it = new nsHTMLOListElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLObjectElement.cpp b/mozilla/content/html/content/src/nsHTMLObjectElement.cpp index 813345d747b..c7c0b65e475 100644 --- a/mozilla/content/html/content/src/nsHTMLObjectElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLObjectElement.cpp @@ -52,7 +52,6 @@ public: // nsIDOMHTMLObjectElement NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetCode(nsString& aCode); NS_IMETHOD SetCode(const nsString& aCode); NS_IMETHOD GetAlign(nsString& aAlign); @@ -146,7 +145,7 @@ nsHTMLObjectElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLObjectElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLObjectElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLObjectElement* it = new nsHTMLObjectElement(mInner.mTag); if (nsnull == it) { @@ -163,12 +162,6 @@ nsHTMLObjectElement::GetForm(nsIDOMHTMLFormElement** aForm) return NS_OK; } -NS_IMETHODIMP -nsHTMLObjectElement::SetForm(nsIDOMHTMLFormElement* aForm) -{ - return NS_OK; -} - NS_IMPL_STRING_ATTR(nsHTMLObjectElement, Code, code, eSetAttrNotify_Restart) NS_IMPL_STRING_ATTR(nsHTMLObjectElement, Align, align, eSetAttrNotify_Reflow) NS_IMPL_STRING_ATTR(nsHTMLObjectElement, Archive, archive, eSetAttrNotify_Restart) diff --git a/mozilla/content/html/content/src/nsHTMLOptGroupElement.cpp b/mozilla/content/html/content/src/nsHTMLOptGroupElement.cpp index bd59dd73eaa..7f6476b6224 100644 --- a/mozilla/content/html/content/src/nsHTMLOptGroupElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLOptGroupElement.cpp @@ -114,7 +114,7 @@ nsHTMLOptGroupElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLOptGroupElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLOptGroupElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLOptGroupElement* it = new nsHTMLOptGroupElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLOptionElement.cpp b/mozilla/content/html/content/src/nsHTMLOptionElement.cpp index f22eca07a04..4b3c38efe50 100644 --- a/mozilla/content/html/content/src/nsHTMLOptionElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLOptionElement.cpp @@ -61,11 +61,9 @@ public: // nsIDOMHTMLOptionElement NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetDefaultSelected(PRBool* aDefaultSelected); NS_IMETHOD SetDefaultSelected(PRBool aDefaultSelected); NS_IMETHOD GetText(nsString& aText); - NS_IMETHOD SetText(const nsString& aText); NS_IMETHOD GetIndex(PRInt32* aIndex); NS_IMETHOD SetIndex(PRInt32 aIndex); NS_IMETHOD GetDisabled(PRBool* aDisabled); @@ -73,7 +71,6 @@ public: NS_IMETHOD GetLabel(nsString& aLabel); NS_IMETHOD SetLabel(const nsString& aLabel); NS_IMETHOD GetSelected(PRBool* aSelected); - NS_IMETHOD SetSelected(PRBool aSelected); NS_IMETHOD GetValue(nsString& aValue); NS_IMETHOD SetValue(const nsString& aValue); @@ -158,7 +155,7 @@ nsHTMLOptionElement::Release() } nsresult -nsHTMLOptionElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLOptionElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLOptionElement* it = new nsHTMLOptionElement(mInner.mTag); if (nsnull == it) { @@ -184,22 +181,18 @@ nsHTMLOptionElement::GetForm(nsIDOMHTMLFormElement** aForm) } NS_IMETHODIMP -nsHTMLOptionElement::SetForm(nsIDOMHTMLFormElement* aForm) +nsHTMLOptionElement::GetSelected(PRBool *aSelected) { - if (nsnull == aForm) { - mForm = nsnull; - return NS_OK; - } else { - NS_IF_RELEASE(mForm); - return aForm->QueryInterface(kIFormIID, (void**)&mForm); - } + nsHTMLValue val; + nsresult rv = mInner.GetAttribute(nsHTMLAtoms::selected, val); + *aSelected = NS_CONTENT_ATTR_NOT_THERE != rv; + return NS_OK; } NS_IMPL_BOOL_ATTR(nsHTMLOptionElement, DefaultSelected, defaultselected, eSetAttrNotify_None) NS_IMPL_INT_ATTR(nsHTMLOptionElement, Index, index, eSetAttrNotify_None) NS_IMPL_BOOL_ATTR(nsHTMLOptionElement, Disabled, disabled, eSetAttrNotify_Render) NS_IMPL_STRING_ATTR(nsHTMLOptionElement, Label, label, eSetAttrNotify_Render) -NS_IMPL_BOOL_ATTR(nsHTMLOptionElement, Selected, selected, eSetAttrNotify_Render) NS_IMPL_STRING_ATTR(nsHTMLOptionElement, Value, value, eSetAttrNotify_Render) NS_IMETHODIMP @@ -272,9 +265,3 @@ nsHTMLOptionElement::GetText(nsString& aText) return result; } -NS_IMETHODIMP -nsHTMLOptionElement::SetText(const nsString& aText) -{ - // XXX write me - return NS_OK; -} diff --git a/mozilla/content/html/content/src/nsHTMLParagraphElement.cpp b/mozilla/content/html/content/src/nsHTMLParagraphElement.cpp index f3acc6293ee..fdb768963d5 100644 --- a/mozilla/content/html/content/src/nsHTMLParagraphElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLParagraphElement.cpp @@ -118,7 +118,7 @@ nsHTMLParagraphElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLParagraphElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLParagraphElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLParagraphElement* it; NS_NEWXPCOM(it, nsHTMLParagraphElement); diff --git a/mozilla/content/html/content/src/nsHTMLParamElement.cpp b/mozilla/content/html/content/src/nsHTMLParamElement.cpp index c09e7f28a73..2aa1d56b120 100644 --- a/mozilla/content/html/content/src/nsHTMLParamElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLParamElement.cpp @@ -118,7 +118,7 @@ nsHTMLParamElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLParamElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLParamElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLParamElement* it = new nsHTMLParamElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLPreElement.cpp b/mozilla/content/html/content/src/nsHTMLPreElement.cpp index 7a3e590469c..c1513e98720 100644 --- a/mozilla/content/html/content/src/nsHTMLPreElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLPreElement.cpp @@ -115,7 +115,7 @@ nsHTMLPreElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLPreElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLPreElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLPreElement* it = new nsHTMLPreElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLQuoteElement.cpp b/mozilla/content/html/content/src/nsHTMLQuoteElement.cpp index 265f77b28cb..d2249f00659 100644 --- a/mozilla/content/html/content/src/nsHTMLQuoteElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLQuoteElement.cpp @@ -112,7 +112,7 @@ nsHTMLQuoteElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLQuoteElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLQuoteElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLQuoteElement* it = new nsHTMLQuoteElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLScriptElement.cpp b/mozilla/content/html/content/src/nsHTMLScriptElement.cpp index 5846410ec60..2c521aa5d64 100644 --- a/mozilla/content/html/content/src/nsHTMLScriptElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLScriptElement.cpp @@ -125,7 +125,7 @@ nsHTMLScriptElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLScriptElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLScriptElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLScriptElement* it = new nsHTMLScriptElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLSelectElement.cpp b/mozilla/content/html/content/src/nsHTMLSelectElement.cpp index e496bdf5bbc..a32f5a88d7c 100644 --- a/mozilla/content/html/content/src/nsHTMLSelectElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLSelectElement.cpp @@ -91,17 +91,13 @@ public: // nsIDOMHTMLSelectElement NS_IMETHOD GetType(nsString& aType); - NS_IMETHOD SetType(const nsString& aType); NS_IMETHOD GetSelectedIndex(PRInt32* aSelectedIndex); NS_IMETHOD SetSelectedIndex(PRInt32 aSelectedIndex); NS_IMETHOD GetValue(nsString& aValue); NS_IMETHOD SetValue(const nsString& aValue); - NS_IMETHOD GetLength(PRInt32* aLength); - NS_IMETHOD SetLength(PRInt32 aLength); + NS_IMETHOD GetLength(PRUint32* aLength); NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetOptions(nsIDOMHTMLCollection** aOptions); - NS_IMETHOD SetOptions(nsIDOMHTMLCollection* aOptions); NS_IMETHOD GetDisabled(PRBool* aDisabled); NS_IMETHOD SetDisabled(PRBool aDisabled); NS_IMETHOD GetMultiple(PRBool* aMultiple); @@ -130,6 +126,7 @@ public: NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner) // nsIFormControl + NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetType(PRInt32* aType); NS_IMETHOD SetWidget(nsIWidget* aWidget); NS_IMETHOD Init(); @@ -226,7 +223,7 @@ nsHTMLSelectElement::Release() // nsIDOMHTMLSelectElement nsresult -nsHTMLSelectElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLSelectElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLSelectElement* it = new nsHTMLSelectElement(mInner.mTag); if (nsnull == it) { @@ -265,30 +262,6 @@ nsHTMLSelectElement::GetForm(nsIDOMHTMLFormElement** aForm) return result; } -// An important assumption is that if aForm is null, the previous mForm will not be released -// This allows nsHTMLFormElement to deal with circular references. -NS_IMETHODIMP -nsHTMLSelectElement::SetForm(nsIDOMHTMLFormElement* aForm) -{ - nsresult result = NS_OK; - if (nsnull == aForm) { - mForm = nsnull; - return NS_OK; - } else { - NS_IF_RELEASE(mForm); - nsIFormControl* formControl = nsnull; - result = QueryInterface(kIFormControlIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - result = aForm->QueryInterface(kIFormIID, (void**)&mForm); // keep the ref - if ((NS_OK == result) && mForm) { - mForm->AddElement(formControl); - } - NS_RELEASE(formControl); - } - } - return result; -} - NS_IMETHODIMP nsHTMLSelectElement::GetOptions(nsIDOMHTMLCollection** aValue) { @@ -301,21 +274,38 @@ nsHTMLSelectElement::GetOptions(nsIDOMHTMLCollection** aValue) } NS_IMETHODIMP -nsHTMLSelectElement::SetOptions(nsIDOMHTMLCollection* aValue) +nsHTMLSelectElement::GetType(nsString& aType) { - if (mOptions) { - mOptions->Clear(); - NS_RELEASE(mOptions); + PRBool isMultiple; + nsresult result = NS_OK; + + result = GetMultiple(&isMultiple); + if (NS_OK == result) { + if (isMultiple) { + aType.SetString("select-multiple"); + } + else { + aType.SetString("select-one"); + } + } + + return NS_OK; +} + +NS_IMETHODIMP +nsHTMLSelectElement::GetLength(PRUint32* aLength) +{ + if (nsnull != mOptions) { + return mOptions->GetLength(aLength); + } + else { + *aLength = 0; + return NS_OK; } - mOptions = new nsOptionList(aValue); - NS_ADDREF(mOptions); - return NS_OK; } -NS_IMPL_STRING_ATTR(nsHTMLSelectElement, Type, type, eSetAttrNotify_Restart) NS_IMPL_INT_ATTR(nsHTMLSelectElement, SelectedIndex, selectedindex, eSetAttrNotify_None) NS_IMPL_STRING_ATTR(nsHTMLSelectElement, Value, value, eSetAttrNotify_Render) -NS_IMPL_INT_ATTR(nsHTMLSelectElement, Length, length, eSetAttrNotify_Restart) NS_IMPL_BOOL_ATTR(nsHTMLSelectElement, Disabled, disabled, eSetAttrNotify_Render) NS_IMPL_BOOL_ATTR(nsHTMLSelectElement, Multiple, multiple, eSetAttrNotify_Restart) NS_IMPL_STRING_ATTR(nsHTMLSelectElement, Name, name, eSetAttrNotify_Restart) @@ -459,6 +449,30 @@ nsHTMLSelectElement::SetWidget(nsIWidget* aWidget) return NS_OK; } +// An important assumption is that if aForm is null, the previous mForm will not be released +// This allows nsHTMLFormElement to deal with circular references. +NS_IMETHODIMP +nsHTMLSelectElement::SetForm(nsIDOMHTMLFormElement* aForm) +{ + nsresult result = NS_OK; + if (nsnull == aForm) { + mForm = nsnull; + return NS_OK; + } else { + NS_IF_RELEASE(mForm); + nsIFormControl* formControl = nsnull; + result = QueryInterface(kIFormControlIID, (void**)&formControl); + if ((NS_OK == result) && formControl) { + result = aForm->QueryInterface(kIFormIID, (void**)&mForm); // keep the ref + if ((NS_OK == result) && mForm) { + mForm->AddElement(formControl); + } + NS_RELEASE(formControl); + } + } + return result; +} + void GetOptionsRecurse(nsIContent* aContent, nsVoidArray& aOptions) { PRInt32 numChildren; diff --git a/mozilla/content/html/content/src/nsHTMLSharedObjectElement.cpp b/mozilla/content/html/content/src/nsHTMLSharedObjectElement.cpp index 813345d747b..c7c0b65e475 100644 --- a/mozilla/content/html/content/src/nsHTMLSharedObjectElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLSharedObjectElement.cpp @@ -52,7 +52,6 @@ public: // nsIDOMHTMLObjectElement NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetCode(nsString& aCode); NS_IMETHOD SetCode(const nsString& aCode); NS_IMETHOD GetAlign(nsString& aAlign); @@ -146,7 +145,7 @@ nsHTMLObjectElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLObjectElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLObjectElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLObjectElement* it = new nsHTMLObjectElement(mInner.mTag); if (nsnull == it) { @@ -163,12 +162,6 @@ nsHTMLObjectElement::GetForm(nsIDOMHTMLFormElement** aForm) return NS_OK; } -NS_IMETHODIMP -nsHTMLObjectElement::SetForm(nsIDOMHTMLFormElement* aForm) -{ - return NS_OK; -} - NS_IMPL_STRING_ATTR(nsHTMLObjectElement, Code, code, eSetAttrNotify_Restart) NS_IMPL_STRING_ATTR(nsHTMLObjectElement, Align, align, eSetAttrNotify_Reflow) NS_IMPL_STRING_ATTR(nsHTMLObjectElement, Archive, archive, eSetAttrNotify_Restart) diff --git a/mozilla/content/html/content/src/nsHTMLSpacerElement.cpp b/mozilla/content/html/content/src/nsHTMLSpacerElement.cpp index a4cd287b9a3..095eecdfcc4 100644 --- a/mozilla/content/html/content/src/nsHTMLSpacerElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLSpacerElement.cpp @@ -113,7 +113,7 @@ nsHTMLSpacerElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLSpacerElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLSpacerElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLSpacerElement* it = new nsHTMLSpacerElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLSpanElement.cpp b/mozilla/content/html/content/src/nsHTMLSpanElement.cpp index 0ecbf3e5922..a1a62dce89e 100644 --- a/mozilla/content/html/content/src/nsHTMLSpanElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLSpanElement.cpp @@ -100,7 +100,7 @@ nsHTMLSpanElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLSpanElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLSpanElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLSpanElement* it = new nsHTMLSpanElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLStyleElement.cpp b/mozilla/content/html/content/src/nsHTMLStyleElement.cpp index 007437b3d06..efd63f9d4dc 100644 --- a/mozilla/content/html/content/src/nsHTMLStyleElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLStyleElement.cpp @@ -118,7 +118,7 @@ nsHTMLStyleElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLStyleElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLStyleElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLStyleElement* it = new nsHTMLStyleElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLTableCaptionElement.cpp b/mozilla/content/html/content/src/nsHTMLTableCaptionElement.cpp index 2964d130261..58cfd38fa3f 100644 --- a/mozilla/content/html/content/src/nsHTMLTableCaptionElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableCaptionElement.cpp @@ -113,7 +113,7 @@ nsHTMLTableCaptionElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTableCaptionElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTableCaptionElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTableCaptionElement* it = new nsHTMLTableCaptionElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp b/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp index 5da498cdfa2..e19ccdb8474 100644 --- a/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableCellElement.cpp @@ -161,7 +161,7 @@ nsHTMLTableCellElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTableCellElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTableCellElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTableCellElement* it = new nsHTMLTableCellElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLTableColElement.cpp b/mozilla/content/html/content/src/nsHTMLTableColElement.cpp index fdb7cd535d1..cdc47409caa 100644 --- a/mozilla/content/html/content/src/nsHTMLTableColElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableColElement.cpp @@ -135,7 +135,7 @@ nsHTMLTableColElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTableColElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTableColElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTableColElement* it = new nsHTMLTableColElement(mInner.mTag); if (nsnull == it) { @@ -295,4 +295,4 @@ NS_METHOD nsHTMLTableColElement::GetSpanValue(PRInt32* aSpan) *aSpan = span; } return NS_OK; -} \ No newline at end of file +} diff --git a/mozilla/content/html/content/src/nsHTMLTableColGroupElement.cpp b/mozilla/content/html/content/src/nsHTMLTableColGroupElement.cpp index 58f3fdda7d2..58be3e543bd 100644 --- a/mozilla/content/html/content/src/nsHTMLTableColGroupElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableColGroupElement.cpp @@ -124,7 +124,7 @@ nsHTMLTableColGroupElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTableColGroupElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTableColGroupElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTableColGroupElement* it = new nsHTMLTableColGroupElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLTableElement.cpp b/mozilla/content/html/content/src/nsHTMLTableElement.cpp index b0ddf797442..2a0083d2536 100644 --- a/mozilla/content/html/content/src/nsHTMLTableElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableElement.cpp @@ -60,9 +60,7 @@ public: NS_IMETHOD GetTFoot(nsIDOMHTMLTableSectionElement** aTFoot); NS_IMETHOD SetTFoot(nsIDOMHTMLTableSectionElement* aTFoot); NS_IMETHOD GetRows(nsIDOMHTMLCollection** aRows); - NS_IMETHOD SetRows(nsIDOMHTMLCollection* aRows); NS_IMETHOD GetTBodies(nsIDOMHTMLCollection** aTBodies); - NS_IMETHOD SetTBodies(nsIDOMHTMLCollection* aTBodies); NS_IMETHOD GetAlign(nsString& aAlign); NS_IMETHOD SetAlign(const nsString& aAlign); NS_IMETHOD GetBgColor(nsString& aBgColor); @@ -148,7 +146,7 @@ nsHTMLTableElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTableElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTableElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTableElement* it = new nsHTMLTableElement(mInner.mTag); if (nsnull == it) { @@ -217,12 +215,6 @@ nsHTMLTableElement::GetRows(nsIDOMHTMLCollection** aValue) return NS_OK; // XXX write me } -NS_IMETHODIMP -nsHTMLTableElement::SetRows(nsIDOMHTMLCollection* aValue) -{ - return NS_OK; // XXX write me -} - NS_IMETHODIMP nsHTMLTableElement::GetTBodies(nsIDOMHTMLCollection** aValue) { @@ -230,12 +222,6 @@ nsHTMLTableElement::GetTBodies(nsIDOMHTMLCollection** aValue) return NS_OK; // XXX write me } -NS_IMETHODIMP -nsHTMLTableElement::SetTBodies(nsIDOMHTMLCollection* aValue) -{ - return NS_OK; // XXX write me -} - NS_IMETHODIMP nsHTMLTableElement::CreateTHead(nsIDOMHTMLElement** aValue) { diff --git a/mozilla/content/html/content/src/nsHTMLTableRowElement.cpp b/mozilla/content/html/content/src/nsHTMLTableRowElement.cpp index 54e5b5b7505..7f7a7787121 100644 --- a/mozilla/content/html/content/src/nsHTMLTableRowElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableRowElement.cpp @@ -129,7 +129,7 @@ nsHTMLTableRowElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTableRowElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTableRowElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTableRowElement* it = new nsHTMLTableRowElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLTableSectionElement.cpp b/mozilla/content/html/content/src/nsHTMLTableSectionElement.cpp index f1ffad73d03..02c9c7d4a98 100644 --- a/mozilla/content/html/content/src/nsHTMLTableSectionElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableSectionElement.cpp @@ -54,12 +54,15 @@ public: NS_IMPL_IDOMHTMLELEMENT_USING_GENERIC(mInner) // nsIDOMHTMLTableSectionElement + NS_IMETHOD GetCh(nsString& aCh); + NS_IMETHOD SetCh(const nsString& aCh); + NS_IMETHOD GetChOff(nsString& aChOff); + NS_IMETHOD SetChOff(const nsString& aChOff); NS_IMETHOD GetAlign(nsString& aAlign); NS_IMETHOD SetAlign(const nsString& aAlign); NS_IMETHOD GetVAlign(nsString& aVAlign); NS_IMETHOD SetVAlign(const nsString& aVAlign); NS_IMETHOD GetRows(nsIDOMHTMLCollection** aRows); - NS_IMETHOD SetRows(nsIDOMHTMLCollection* aRows); NS_IMETHOD InsertRow(PRInt32 aIndex, nsIDOMHTMLElement** aReturn); NS_IMETHOD DeleteRow(PRInt32 aIndex); @@ -121,7 +124,7 @@ nsHTMLTableSectionElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTableSectionElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTableSectionElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTableSectionElement* it = new nsHTMLTableSectionElement(mInner.mTag); if (nsnull == it) { @@ -133,6 +136,8 @@ nsHTMLTableSectionElement::CloneNode(nsIDOMNode** aReturn) NS_IMPL_STRING_ATTR(nsHTMLTableSectionElement, Align, align, eSetAttrNotify_Reflow) NS_IMPL_STRING_ATTR(nsHTMLTableSectionElement, VAlign, valign, eSetAttrNotify_Reflow) +NS_IMPL_STRING_ATTR(nsHTMLTableSectionElement, Ch, ch, eSetAttrNotify_Reflow) +NS_IMPL_STRING_ATTR(nsHTMLTableSectionElement, ChOff, choff, eSetAttrNotify_Reflow) NS_IMETHODIMP nsHTMLTableSectionElement::GetRows(nsIDOMHTMLCollection** aValue) @@ -142,13 +147,6 @@ nsHTMLTableSectionElement::GetRows(nsIDOMHTMLCollection** aValue) return NS_OK; } -NS_IMETHODIMP -nsHTMLTableSectionElement::SetRows(nsIDOMHTMLCollection* aValue) -{ - // XXX write me - return NS_OK; -} - NS_IMETHODIMP nsHTMLTableSectionElement::InsertRow(PRInt32 aIndex, nsIDOMHTMLElement** aValue) { diff --git a/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp b/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp index ba1b9289c69..70300bf8a1a 100644 --- a/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp @@ -65,7 +65,6 @@ public: NS_IMETHOD GetDefaultValue(nsString& aDefaultValue); NS_IMETHOD SetDefaultValue(const nsString& aDefaultValue); NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetAccessKey(nsString& aAccessKey); NS_IMETHOD SetAccessKey(const nsString& aAccessKey); NS_IMETHOD GetCols(PRInt32* aCols); @@ -80,6 +79,9 @@ public: NS_IMETHOD SetRows(PRInt32 aRows); NS_IMETHOD GetTabIndex(PRInt32* aTabIndex); NS_IMETHOD SetTabIndex(PRInt32 aTabIndex); + NS_IMETHOD GetType(nsString& aType); + NS_IMETHOD GetValue(nsString& aValue); + NS_IMETHOD SetValue(const nsString& aValue); NS_IMETHOD Blur(); NS_IMETHOD Focus(); NS_IMETHOD Select(); @@ -97,6 +99,7 @@ public: NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner) // nsIFormControl + NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetType(PRInt32* aType); NS_IMETHOD SetWidget(nsIWidget* aWidget); NS_IMETHOD Init() { return NS_OK; } @@ -182,7 +185,7 @@ nsHTMLTextAreaElement::Release() // nsIDOMHTMLTextAreaElement nsresult -nsHTMLTextAreaElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTextAreaElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTextAreaElement* it = new nsHTMLTextAreaElement(mInner.mTag); if (nsnull == it) { @@ -207,29 +210,6 @@ nsHTMLTextAreaElement::GetForm(nsIDOMHTMLFormElement** aForm) return result; } -// An important assumption is that if aForm is null, the previous mForm will not be released -// This allows nsHTMLFormElement to deal with circular references. -NS_IMETHODIMP -nsHTMLTextAreaElement::SetForm(nsIDOMHTMLFormElement* aForm) -{ - nsresult result = NS_OK; - if (nsnull == aForm) { - mForm = nsnull; - return NS_OK; - } else { - NS_IF_RELEASE(mForm); - nsIFormControl* formControl = nsnull; - result = QueryInterface(kIFormControlIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - result = aForm->QueryInterface(kIFormIID, (void**)&mForm); // keep the ref - if ((NS_OK == result) && mForm) { - mForm->AddElement(formControl); - } - NS_RELEASE(formControl); - } - } - return result; -} NS_IMETHODIMP nsHTMLTextAreaElement::Blur() // XXX not tested @@ -266,7 +246,6 @@ nsHTMLTextAreaElement::Select() // XXX not tested return NS_OK; } -//NS_IMPL_STRING_ATTR(nsHTMLTextAreaElement, DefaultValue, defaultvalue, eSetAttrNotify_None) NS_IMPL_STRING_ATTR(nsHTMLTextAreaElement, AccessKey, accesskey, eSetAttrNotify_None) NS_IMPL_INT_ATTR(nsHTMLTextAreaElement, Cols, cols, eSetAttrNotify_Reflow) NS_IMPL_BOOL_ATTR(nsHTMLTextAreaElement, Disabled, disabled, eSetAttrNotify_Render) @@ -274,6 +253,28 @@ NS_IMPL_STRING_ATTR(nsHTMLTextAreaElement, Name, name, eSetAttrNotify_Restart) NS_IMPL_BOOL_ATTR(nsHTMLTextAreaElement, ReadOnly, readonly, eSetAttrNotify_Render) NS_IMPL_INT_ATTR(nsHTMLTextAreaElement, Rows, rows, eSetAttrNotify_Reflow) NS_IMPL_INT_ATTR(nsHTMLTextAreaElement, TabIndex, tabindex, eSetAttrNotify_None) + + +NS_IMETHODIMP +nsHTMLTextAreaElement::GetType(nsString& aType) +{ + aType.SetString("textarea"); + return NS_OK; +} + +NS_IMETHODIMP +nsHTMLTextAreaElement::GetValue(nsString& aValue) +{ + // XXX TBI + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsHTMLTextAreaElement::SetValue(const nsString& aValue) +{ + // XXX TBI + return NS_ERROR_NOT_IMPLEMENTED; +} NS_IMETHODIMP nsHTMLTextAreaElement::GetDefaultValue(nsString& aDefaultValue) @@ -410,4 +411,27 @@ nsHTMLTextAreaElement::SetWidget(nsIWidget* aWidget) return NS_OK; } +// An important assumption is that if aForm is null, the previous mForm will not be released +// This allows nsHTMLFormElement to deal with circular references. +NS_IMETHODIMP +nsHTMLTextAreaElement::SetForm(nsIDOMHTMLFormElement* aForm) +{ + nsresult result = NS_OK; + if (nsnull == aForm) { + mForm = nsnull; + return NS_OK; + } else { + NS_IF_RELEASE(mForm); + nsIFormControl* formControl = nsnull; + result = QueryInterface(kIFormControlIID, (void**)&formControl); + if ((NS_OK == result) && formControl) { + result = aForm->QueryInterface(kIFormIID, (void**)&mForm); // keep the ref + if ((NS_OK == result) && mForm) { + mForm->AddElement(formControl); + } + NS_RELEASE(formControl); + } + } + return result; +} diff --git a/mozilla/content/html/content/src/nsHTMLTitleElement.cpp b/mozilla/content/html/content/src/nsHTMLTitleElement.cpp index 98b68ddaaf9..0afd8d23275 100644 --- a/mozilla/content/html/content/src/nsHTMLTitleElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTitleElement.cpp @@ -113,7 +113,7 @@ nsHTMLTitleElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTitleElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTitleElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTitleElement* it = new nsHTMLTitleElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLUListElement.cpp b/mozilla/content/html/content/src/nsHTMLUListElement.cpp index 1c7da2b00e6..df6d7bc6f0f 100644 --- a/mozilla/content/html/content/src/nsHTMLUListElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLUListElement.cpp @@ -118,7 +118,7 @@ nsHTMLUListElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLUListElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLUListElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLUListElement* it = new nsHTMLUListElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/content/src/nsHTMLWBRElement.cpp b/mozilla/content/html/content/src/nsHTMLWBRElement.cpp index 01884378f92..15cb407f6a0 100644 --- a/mozilla/content/html/content/src/nsHTMLWBRElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLWBRElement.cpp @@ -112,7 +112,7 @@ nsHTMLWBRElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLWBRElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLWBRElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLWBRElement* it = new nsHTMLWBRElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index 39a9926f2b6..53adbc127e7 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -32,6 +32,7 @@ #include "nsIDOMNode.h" // for Find #include "nsIDOMElement.h" #include "nsIDOMText.h" +#include "nsIDOMComment.h" #include "nsIDOMHTMLFormElement.h" #include "nsIPostToServer.h" #include "nsIStreamListener.h" @@ -70,6 +71,7 @@ static NS_DEFINE_IID(kIDocumentIID, NS_IDOCUMENT_IID); static NS_DEFINE_IID(kIContentIID, NS_ICONTENT_IID); static NS_DEFINE_IID(kIDOMElementIID, NS_IDOMELEMENT_IID); static NS_DEFINE_IID(kIDOMTextIID, NS_IDOMTEXT_IID); +static NS_DEFINE_IID(kIDOMCommentIID, NS_IDOMCOMMENT_IID); static NS_DEFINE_IID(kIDOMNodeIID, NS_IDOMNODE_IID); static NS_DEFINE_IID(kIHTMLDocumentIID, NS_IHTMLDOCUMENT_IID); static NS_DEFINE_IID(kIDOMHTMLDocumentIID, NS_IDOMHTMLDOCUMENT_IID); @@ -623,7 +625,6 @@ nsHTMLDocument::SetDTDMode(nsDTDMode aMode) // NS_IMETHODIMP nsHTMLDocument::CreateElement(const nsString& aTagName, - nsIDOMNamedNodeMap* aAttributes, nsIDOMElement** aReturn) { nsIHTMLContent* content; @@ -643,14 +644,74 @@ nsHTMLDocument::CreateTextNode(const nsString& aData, nsIDOMText** aTextNode) if (NS_OK == rv) { rv = text->QueryInterface(kIDOMTextIID, (void**)aTextNode); - (*aTextNode)->Append(aData); + (*aTextNode)->AppendData(aData); } return rv; } NS_IMETHODIMP -nsHTMLDocument::GetDocumentType(nsIDOMDocumentType** aDocumentType) +nsHTMLDocument::CreateDocumentFragment(nsIDOMDocumentFragment** aReturn) +{ + // XXX To be implemented + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsHTMLDocument::CreateComment(const nsString& aData, nsIDOMComment** aReturn) +{ + nsIHTMLContent* comment = nsnull; + nsresult rv = NS_NewCommentNode(&comment); + + if (NS_OK == rv) { + rv = comment->QueryInterface(kIDOMCommentIID, (void**)aReturn); + (*aReturn)->AppendData(aData); + } + + return rv; +} + +NS_IMETHODIMP +nsHTMLDocument::CreateProcessingInstruction(const nsString& aTarget, + const nsString& aData, + nsIDOMProcessingInstruction** aReturn) +{ + // There are no PIs for HTML + *aReturn = nsnull; + + return NS_OK; +} + +NS_IMETHODIMP +nsHTMLDocument::CreateCDATASection(const nsString& aData, + nsIDOMCDATASection** aReturn) +{ + // There are no CDATASections in HTML + *aReturn = nsnull; + + return NS_OK; +} + +NS_IMETHODIMP +nsHTMLDocument::CreateEntityReference(const nsString& aName, + nsIDOMEntityReference** aReturn) +{ + // There are no EntityReferences in HTML + *aReturn = nsnull; + + return NS_OK; +} + +NS_IMETHODIMP +nsHTMLDocument::CreateAttribute(const nsString& aName, + nsIDOMAttr** aReturn) +{ + // XXX To be implemented + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsHTMLDocument::GetDoctype(nsIDOMDocumentType** aDocumentType) { // There's no document type for a HTML document *aDocumentType = nsnull; @@ -676,34 +737,6 @@ nsHTMLDocument::GetReferrer(nsString& aReferrer) return NS_ERROR_NOT_IMPLEMENTED; } -NS_IMETHODIMP -nsHTMLDocument::GetFileSize(nsString& aFileSize) -{ - //XXX TBI - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsHTMLDocument::GetFileCreatedDate(nsString& aFileCreatedDate) -{ - //XXX TBI - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsHTMLDocument::GetFileModifiedDate(nsString& aFileModifiedDate) -{ - //XXX TBI - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsHTMLDocument::GetFileUpdatedDate(nsString& aFileUpdatedDate) -{ - //XXX TBI - return NS_ERROR_NOT_IMPLEMENTED; -} - NS_IMETHODIMP nsHTMLDocument::GetDomain(nsString& aDomain) { @@ -1666,7 +1699,7 @@ PRBool nsHTMLDocument::BuildBlockTraversing(nsIDOMNode * aParent, NS_RELEASE(textContent); } else { PRBool hasChildNode; - aParent->GetHasChildNodes(&hasChildNode); + aParent->HasChildNodes(&hasChildNode); if (hasChildNode) { nsIDOMNode * child; if (mSearchDirection == kForward) { @@ -1706,7 +1739,7 @@ PRBool nsHTMLDocument::BuildBlockFromStack(nsIDOMNode * aParent, nsIDOMNode * stackChild = mChildStack[aStackInx]; PRBool hasChildNode; - aParent->GetHasChildNodes(&hasChildNode); + aParent->HasChildNodes(&hasChildNode); if (hasChildNode) { nsIDOMNode * child = stackChild; NS_ADDREF(child); @@ -1798,7 +1831,7 @@ void printDOMRefs(nsIDOMNode * aNode, PRInt32 aLevel) delete[] cStr; PRBool hasChildren; - aNode->GetHasChildNodes(&hasChildren); + aNode->HasChildNodes(&hasChildren); if (hasChildren) { nsIDOMNode * childNode; aNode->GetFirstChild(&childNode); @@ -1825,7 +1858,7 @@ nsIDOMNode * FindDOMNode(nsIDOMNode * aNode, nsIContent * aContent) } PRBool hasChildren; - aNode->GetHasChildNodes(&hasChildren); + aNode->HasChildNodes(&hasChildren); if (hasChildren) { nsIDOMNode * childNode; aNode->GetFirstChild(&childNode); diff --git a/mozilla/content/html/document/src/nsHTMLDocument.h b/mozilla/content/html/document/src/nsHTMLDocument.h index 09197293870..ff9cb8a9db1 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.h +++ b/mozilla/content/html/document/src/nsHTMLDocument.h @@ -60,25 +60,18 @@ public: NS_IMETHOD SetDTDMode(nsDTDMode aMode); // nsIDOMDocument interface - NS_IMETHOD GetMasterDoc(nsIDOMDocument **aDocument) - { return nsDocument::GetMasterDoc(aDocument); } - NS_IMETHOD GetDocumentType(nsIDOMDocumentType** aDocumentType); - NS_IMETHOD GetProlog(nsIDOMNodeList** aProlog) - { return nsDocument::GetProlog(aProlog); } - NS_IMETHOD GetEpilog(nsIDOMNodeList** aEpilog) - { return nsDocument::GetEpilog(aEpilog); } + NS_IMETHOD GetDoctype(nsIDOMDocumentType** aDocumentType); + NS_IMETHOD GetImplementation(nsIDOMDOMImplementation** aImplementation) + { return nsDocument::GetImplementation(aImplementation); } NS_IMETHOD GetDocumentElement(nsIDOMElement** aDocumentElement) { return nsDocument::GetDocumentElement(aDocumentElement); } - NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment** aReturn) - { return nsDocument::CreateDocumentFragment(aReturn); } - NS_IMETHOD CreateComment(const nsString& aData, nsIDOMComment** aReturn) - { return nsDocument::CreateComment(aData, aReturn); } - NS_IMETHOD CreateProcessingInstruction(const nsString& aTarget, const nsString& aData, nsIDOMProcessingInstruction** aReturn) - { return nsDocument::CreateProcessingInstruction(aTarget, aData, aReturn); } - NS_IMETHOD CreateAttribute(const nsString& aName, nsIDOMNode* aValue, nsIDOMAttribute** aReturn) - { return nsDocument::CreateAttribute(aName, aValue, aReturn); } + NS_IMETHOD CreateCDATASection(const nsString& aData, nsIDOMCDATASection** aReturn); + NS_IMETHOD CreateEntityReference(const nsString& aName, nsIDOMEntityReference** aReturn); + NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment** aReturn); + NS_IMETHOD CreateComment(const nsString& aData, nsIDOMComment** aReturn); + NS_IMETHOD CreateProcessingInstruction(const nsString& aTarget, const nsString& aData, nsIDOMProcessingInstruction** aReturn); + NS_IMETHOD CreateAttribute(const nsString& aName, nsIDOMAttr** aReturn); NS_IMETHOD CreateElement(const nsString& aTagName, - nsIDOMNamedNodeMap* aAttributes, nsIDOMElement** aReturn); NS_IMETHOD CreateTextNode(const nsString& aData, nsIDOMText** aReturn); NS_IMETHOD GetElementsByTagName(const nsString& aTagname, nsIDOMNodeList** aReturn) diff --git a/mozilla/dom/public/MANIFEST b/mozilla/dom/public/MANIFEST index 62baba46b5f..403f850aa87 100644 --- a/mozilla/dom/public/MANIFEST +++ b/mozilla/dom/public/MANIFEST @@ -22,10 +22,6 @@ nsIScriptObjectOwner.h nsIScriptContextOwner.h nsIScriptGlobalObject.h nsIScriptEventListener.h -nsIDOMWindow.h -nsIDOMLocation.h -nsIDOMNavigator.h -nsIDOMWindowCollection.h nsIDOMScriptObjectFactory.h nsIDOMNativeObjectRegistry.h nsDOMCID.h \ No newline at end of file diff --git a/mozilla/dom/public/Makefile b/mozilla/dom/public/Makefile index 4a72b1013e0..94d5d369acd 100644 --- a/mozilla/dom/public/Makefile +++ b/mozilla/dom/public/Makefile @@ -17,7 +17,7 @@ DEPTH=../.. -DIRS = coreDom coreEvents events html css +DIRS = base coreDom coreEvents events html css DEFINES = -D_IMPL_NS_DOM @@ -28,10 +28,6 @@ EXPORTS = \ nsIScriptEventListener.h \ nsIScriptObjectOwner.h \ nsIScriptGlobalObject.h \ - nsIDOMWindow.h \ - nsIDOMNavigator.h \ - nsIDOMLocation.h \ - nsIDOMWindowCollection.h \ nsIDOMScriptObjectFactory.h \ nsIDOMNativeObjectRegistry.h \ nsDOMCID.h \ diff --git a/mozilla/dom/public/base/MANIFEST b/mozilla/dom/public/base/MANIFEST new file mode 100644 index 00000000000..330c9c6ef3e --- /dev/null +++ b/mozilla/dom/public/base/MANIFEST @@ -0,0 +1,22 @@ +# 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 +# + +nsIDOMWindow.h +nsIDOMLocation.h +nsIDOMNavigator.h +nsIDOMWindowCollection.h diff --git a/mozilla/dom/public/base/Makefile b/mozilla/dom/public/base/Makefile new file mode 100644 index 00000000000..2aaa7e1906f --- /dev/null +++ b/mozilla/dom/public/base/Makefile @@ -0,0 +1,33 @@ +#!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 = \ + nsIDOMWindow.h \ + nsIDOMNavigator.h \ + nsIDOMLocation.h \ + nsIDOMWindowCollection.h \ + $(NULL) + +MODULE = dom + +include $(DEPTH)/config/config.mk + +include $(DEPTH)/config/rules.mk diff --git a/mozilla/dom/public/base/makefile.win b/mozilla/dom/public/base/makefile.win new file mode 100644 index 00000000000..a4e8c5fcccb --- /dev/null +++ b/mozilla/dom/public/base/makefile.win @@ -0,0 +1,28 @@ +#!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=nsIDOMWindow.h nsIDOMNavigator.h nsIDOMLocation.h \ + nsIDOMWindowCollection.h + +MODULE=dom + +include <$(DEPTH)\config\rules.mak> + diff --git a/mozilla/dom/public/nsIDOMLocation.h b/mozilla/dom/public/base/nsIDOMLocation.h similarity index 98% rename from mozilla/dom/public/nsIDOMLocation.h rename to mozilla/dom/public/base/nsIDOMLocation.h index d6cca1151e7..1f6a0e0be00 100644 --- a/mozilla/dom/public/nsIDOMLocation.h +++ b/mozilla/dom/public/base/nsIDOMLocation.h @@ -27,8 +27,8 @@ #define NS_IDOMLOCATION_IID \ -{ 0x6f76533c, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf906d, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMLocation : public nsISupports { public: diff --git a/mozilla/dom/public/nsIDOMNavigator.h b/mozilla/dom/public/base/nsIDOMNavigator.h similarity index 97% rename from mozilla/dom/public/nsIDOMNavigator.h rename to mozilla/dom/public/base/nsIDOMNavigator.h index 8a62564803f..0f0cf564164 100644 --- a/mozilla/dom/public/nsIDOMNavigator.h +++ b/mozilla/dom/public/base/nsIDOMNavigator.h @@ -26,8 +26,8 @@ #define NS_IDOMNAVIGATOR_IID \ -{ 0x6f76533d, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf906e, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMNavigator : public nsISupports { public: diff --git a/mozilla/dom/public/nsIDOMWindow.h b/mozilla/dom/public/base/nsIDOMWindow.h similarity index 99% rename from mozilla/dom/public/nsIDOMWindow.h rename to mozilla/dom/public/base/nsIDOMWindow.h index f0eac846c5f..51349542054 100644 --- a/mozilla/dom/public/nsIDOMWindow.h +++ b/mozilla/dom/public/base/nsIDOMWindow.h @@ -31,8 +31,8 @@ class nsIDOMWindowCollection; class nsIDOMWindow; #define NS_IDOMWINDOW_IID \ -{ 0x6f76533e, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf906b, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMWindow : public nsISupports { public: diff --git a/mozilla/dom/public/nsIDOMWindowCollection.h b/mozilla/dom/public/base/nsIDOMWindowCollection.h similarity index 96% rename from mozilla/dom/public/nsIDOMWindowCollection.h rename to mozilla/dom/public/base/nsIDOMWindowCollection.h index f705f4b9b79..3d5363e3c0f 100644 --- a/mozilla/dom/public/nsIDOMWindowCollection.h +++ b/mozilla/dom/public/base/nsIDOMWindowCollection.h @@ -27,8 +27,8 @@ class nsIDOMWindow; #define NS_IDOMWINDOWCOLLECTION_IID \ -{ 0x6f76533f, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf906f, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMWindowCollection : public nsISupports { public: diff --git a/mozilla/dom/public/coreDom/MANIFEST b/mozilla/dom/public/coreDom/MANIFEST index 38b3e6cf8e3..b316116adae 100644 --- a/mozilla/dom/public/coreDom/MANIFEST +++ b/mozilla/dom/public/coreDom/MANIFEST @@ -16,15 +16,17 @@ # This is a list of local files which get copied to the mozilla:dist:dom directory # -nsIDOMAttribute.h +nsIDOMAttr.h nsIDOMCDATASection.h +nsIDOMCharacterData.h nsIDOMComment.h -nsIDOMData.h -nsIDOMDOM.h +nsIDOMDOMImplementation.h nsIDOMDocument.h nsIDOMDocumentType.h nsIDOMDocumentFragment.h nsIDOMElement.h +nsIDOMEntity.h +nsIDOMEntityReference.h nsIDOMNode.h nsIDOMNamedNodeMap.h nsIDOMNodeList.h diff --git a/mozilla/dom/public/coreDom/Makefile b/mozilla/dom/public/coreDom/Makefile index 431ccfc88ab..49be4836074 100644 --- a/mozilla/dom/public/coreDom/Makefile +++ b/mozilla/dom/public/coreDom/Makefile @@ -20,15 +20,17 @@ DEPTH=../../.. DEFINES = -D_IMPL_NS_DOM EXPORTS = \ - nsIDOMAttribute.h \ + nsIDOMAttr.h \ nsIDOMCDATASection.h \ + nsIDOMCharacterData.h \ nsIDOMComment.h \ - nsIDOMData.h \ - nsIDOMDOM.h \ + nsIDOMDOMImplementation.h \ nsIDOMDocument.h \ nsIDOMDocumentType.h \ nsIDOMDocumentFragment.h \ nsIDOMElement.h \ + nsIDOMEntity.h \ + nsIDOMEntityReference.h \ nsIDOMNode.h \ nsIDOMNamedNodeMap.h \ nsIDOMNodeList.h \ diff --git a/mozilla/dom/public/coreDom/makefile.win b/mozilla/dom/public/coreDom/makefile.win index 32d66d83c41..314b51b3076 100644 --- a/mozilla/dom/public/coreDom/makefile.win +++ b/mozilla/dom/public/coreDom/makefile.win @@ -19,9 +19,10 @@ DEPTH=..\..\.. IGNORE_MANIFEST=1 DEFINES=-D_IMPL_NS_DOM -EXPORTS=nsIDOMAttribute.h nsIDOMCDATASection.h nsIDOMComment.h nsIDOMData.h \ - nsIDOMDOM.h nsIDOMDocument.h nsIDOMDocumentType.h \ - nsIDOMDocumentFragment.h nsIDOMElement.h nsIDOMNode.h \ +EXPORTS=nsIDOMAttr.h nsIDOMCDATASection.h nsIDOMCharacterData.h \ + nsIDOMComment.h nsIDOMDOMImplementation.h nsIDOMDocument.h \ + nsIDOMDocumentType.h nsIDOMDocumentFragment.h nsIDOMElement.h \ + nsIDOMEntity.h nsIDOMEntityReference.h nsIDOMNode.h \ nsIDOMNamedNodeMap.h nsIDOMNodeList.h nsIDOMProcessingInstruction.h \ nsIDOMText.h nsIDOMStyleSheet.h nsIDOMStyleSheetCollection.h diff --git a/mozilla/dom/public/coreDom/nsIDOMAttribute.h b/mozilla/dom/public/coreDom/nsIDOMAttr.h similarity index 66% rename from mozilla/dom/public/coreDom/nsIDOMAttribute.h rename to mozilla/dom/public/coreDom/nsIDOMAttr.h index 6a3adb02076..beba3adafe7 100644 --- a/mozilla/dom/public/coreDom/nsIDOMAttribute.h +++ b/mozilla/dom/public/coreDom/nsIDOMAttr.h @@ -17,8 +17,8 @@ */ /* AUTO-GENERATED. DO NOT EDIT!!! */ -#ifndef nsIDOMAttribute_h__ -#define nsIDOMAttribute_h__ +#ifndef nsIDOMAttr_h__ +#define nsIDOMAttr_h__ #include "nsISupports.h" #include "nsString.h" @@ -26,39 +26,39 @@ #include "nsIDOMNode.h" -#define NS_IDOMATTRIBUTE_IID \ -{ 0x6f7652e0, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } +#define NS_IDOMATTR_IID \ + { 0xa6cf9070, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } -class nsIDOMAttribute : public nsIDOMNode { +class nsIDOMAttr : public nsIDOMNode { public: NS_IMETHOD GetName(nsString& aName)=0; NS_IMETHOD GetSpecified(PRBool* aSpecified)=0; - NS_IMETHOD SetSpecified(PRBool aSpecified)=0; NS_IMETHOD GetValue(nsString& aValue)=0; + NS_IMETHOD SetValue(const nsString& aValue)=0; }; -#define NS_DECL_IDOMATTRIBUTE \ +#define NS_DECL_IDOMATTR \ NS_IMETHOD GetName(nsString& aName); \ NS_IMETHOD GetSpecified(PRBool* aSpecified); \ - NS_IMETHOD SetSpecified(PRBool aSpecified); \ NS_IMETHOD GetValue(nsString& aValue); \ + NS_IMETHOD SetValue(const nsString& aValue); \ -#define NS_FORWARD_IDOMATTRIBUTE(_to) \ +#define NS_FORWARD_IDOMATTR(_to) \ NS_IMETHOD GetName(nsString& aName) { return _to##GetName(aName); } \ NS_IMETHOD GetSpecified(PRBool* aSpecified) { return _to##GetSpecified(aSpecified); } \ - NS_IMETHOD SetSpecified(PRBool aSpecified) { return _to##SetSpecified(aSpecified); } \ NS_IMETHOD GetValue(nsString& aValue) { return _to##GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsString& aValue) { return _to##SetValue(aValue); } \ -extern nsresult NS_InitAttributeClass(nsIScriptContext *aContext, void **aPrototype); +extern nsresult NS_InitAttrClass(nsIScriptContext *aContext, void **aPrototype); -extern "C" NS_DOM nsresult NS_NewScriptAttribute(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); +extern "C" NS_DOM nsresult NS_NewScriptAttr(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); -#endif // nsIDOMAttribute_h__ +#endif // nsIDOMAttr_h__ diff --git a/mozilla/dom/public/coreDom/nsIDOMCDATASection.h b/mozilla/dom/public/coreDom/nsIDOMCDATASection.h index 9146bc88235..12ffdb0759a 100644 --- a/mozilla/dom/public/coreDom/nsIDOMCDATASection.h +++ b/mozilla/dom/public/coreDom/nsIDOMCDATASection.h @@ -27,8 +27,8 @@ #define NS_IDOMCDATASECTION_IID \ -{ 0x6f7652e1, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9071, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMCDATASection : public nsIDOMText { public: diff --git a/mozilla/dom/public/coreDom/nsIDOMCharacterData.h b/mozilla/dom/public/coreDom/nsIDOMCharacterData.h new file mode 100644 index 00000000000..c25ab0683cb --- /dev/null +++ b/mozilla/dom/public/coreDom/nsIDOMCharacterData.h @@ -0,0 +1,80 @@ +/* -*- 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 nsIDOMCharacterData_h__ +#define nsIDOMCharacterData_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" +#include "nsIDOMNode.h" + + +#define NS_IDOMCHARACTERDATA_IID \ + { 0xa6cf9072, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } + +class nsIDOMCharacterData : public nsIDOMNode { +public: + + NS_IMETHOD GetData(nsString& aData)=0; + NS_IMETHOD SetData(const nsString& aData)=0; + + NS_IMETHOD GetLength(PRUint32* aLength)=0; + + NS_IMETHOD SubstringData(PRUint32 aOffset, PRUint32 aCount, nsString& aReturn)=0; + + NS_IMETHOD AppendData(const nsString& aArg)=0; + + NS_IMETHOD InsertData(PRUint32 aOffset, const nsString& aArg)=0; + + NS_IMETHOD DeleteData(PRUint32 aOffset, PRUint32 aCount)=0; + + NS_IMETHOD ReplaceData(PRUint32 aOffset, PRUint32 aCount, const nsString& aArg)=0; +}; + + +#define NS_DECL_IDOMCHARACTERDATA \ + NS_IMETHOD GetData(nsString& aData); \ + NS_IMETHOD SetData(const nsString& aData); \ + NS_IMETHOD GetLength(PRUint32* aLength); \ + NS_IMETHOD SubstringData(PRUint32 aOffset, PRUint32 aCount, nsString& aReturn); \ + NS_IMETHOD AppendData(const nsString& aArg); \ + NS_IMETHOD InsertData(PRUint32 aOffset, const nsString& aArg); \ + NS_IMETHOD DeleteData(PRUint32 aOffset, PRUint32 aCount); \ + NS_IMETHOD ReplaceData(PRUint32 aOffset, PRUint32 aCount, const nsString& aArg); \ + + + +#define NS_FORWARD_IDOMCHARACTERDATA(_to) \ + NS_IMETHOD GetData(nsString& aData) { return _to##GetData(aData); } \ + NS_IMETHOD SetData(const nsString& aData) { return _to##SetData(aData); } \ + NS_IMETHOD GetLength(PRUint32* aLength) { return _to##GetLength(aLength); } \ + NS_IMETHOD SubstringData(PRUint32 aOffset, PRUint32 aCount, nsString& aReturn) { return _to##SubstringData(aOffset, aCount, aReturn); } \ + NS_IMETHOD AppendData(const nsString& aArg) { return _to##AppendData(aArg); } \ + NS_IMETHOD InsertData(PRUint32 aOffset, const nsString& aArg) { return _to##InsertData(aOffset, aArg); } \ + NS_IMETHOD DeleteData(PRUint32 aOffset, PRUint32 aCount) { return _to##DeleteData(aOffset, aCount); } \ + NS_IMETHOD ReplaceData(PRUint32 aOffset, PRUint32 aCount, const nsString& aArg) { return _to##ReplaceData(aOffset, aCount, aArg); } \ + + +extern nsresult NS_InitCharacterDataClass(nsIScriptContext *aContext, void **aPrototype); + +extern "C" NS_DOM nsresult NS_NewScriptCharacterData(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); + +#endif // nsIDOMCharacterData_h__ diff --git a/mozilla/dom/public/coreDom/nsIDOMComment.h b/mozilla/dom/public/coreDom/nsIDOMComment.h index acef4650104..40f6a35e6b9 100644 --- a/mozilla/dom/public/coreDom/nsIDOMComment.h +++ b/mozilla/dom/public/coreDom/nsIDOMComment.h @@ -23,14 +23,14 @@ #include "nsISupports.h" #include "nsString.h" #include "nsIScriptContext.h" -#include "nsIDOMData.h" +#include "nsIDOMCharacterData.h" #define NS_IDOMCOMMENT_IID \ -{ 0x6f7652e2, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9073, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } -class nsIDOMComment : public nsIDOMData { +class nsIDOMComment : public nsIDOMCharacterData { public: }; diff --git a/mozilla/dom/public/coreDom/nsIDOMDOM.h b/mozilla/dom/public/coreDom/nsIDOMDOM.h deleted file mode 100644 index 2ac9315090d..00000000000 --- a/mozilla/dom/public/coreDom/nsIDOMDOM.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- 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 nsIDOMDOM_h__ -#define nsIDOMDOM_h__ - -#include "nsISupports.h" -#include "nsString.h" -#include "nsIScriptContext.h" - -class nsIDOMDocument; - -#define NS_IDOMDOM_IID \ -{ 0x6f7652e7, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } - -class nsIDOMDOM : public nsISupports { -public: - - NS_IMETHOD CreateDocument(const nsString& aType, nsIDOMDocument** aReturn)=0; - - NS_IMETHOD HasFeature(const nsString& aFeature, PRBool* aReturn)=0; -}; - - -#define NS_DECL_IDOMDOM \ - NS_IMETHOD CreateDocument(const nsString& aType, nsIDOMDocument** aReturn); \ - NS_IMETHOD HasFeature(const nsString& aFeature, PRBool* aReturn); \ - - - -#define NS_FORWARD_IDOMDOM(_to) \ - NS_IMETHOD CreateDocument(const nsString& aType, nsIDOMDocument** aReturn) { return _to##CreateDocument(aType, aReturn); } \ - NS_IMETHOD HasFeature(const nsString& aFeature, PRBool* aReturn) { return _to##HasFeature(aFeature, aReturn); } \ - - -extern nsresult NS_InitDOMClass(nsIScriptContext *aContext, void **aPrototype); - -extern "C" NS_DOM nsresult NS_NewScriptDOM(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); - -#endif // nsIDOMDOM_h__ diff --git a/mozilla/dom/public/coreDom/nsIDOMDOMImplementation.h b/mozilla/dom/public/coreDom/nsIDOMDOMImplementation.h new file mode 100644 index 00000000000..2ca6d6bde31 --- /dev/null +++ b/mozilla/dom/public/coreDom/nsIDOMDOMImplementation.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 nsIDOMDOMImplementation_h__ +#define nsIDOMDOMImplementation_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" + + +#define NS_IDOMDOMIMPLEMENTATION_IID \ + { 0xa6cf9074, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } + +class nsIDOMDOMImplementation : public nsISupports { +public: + + NS_IMETHOD HasFeature(const nsString& aFeature, const nsString& aVersion, PRBool* aReturn)=0; +}; + + +#define NS_DECL_IDOMDOMIMPLEMENTATION \ + NS_IMETHOD HasFeature(const nsString& aFeature, const nsString& aVersion, PRBool* aReturn); \ + + + +#define NS_FORWARD_IDOMDOMIMPLEMENTATION(_to) \ + NS_IMETHOD HasFeature(const nsString& aFeature, const nsString& aVersion, PRBool* aReturn) { return _to##HasFeature(aFeature, aVersion, aReturn); } \ + + +extern nsresult NS_InitDOMImplementationClass(nsIScriptContext *aContext, void **aPrototype); + +extern "C" NS_DOM nsresult NS_NewScriptDOMImplementation(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); + +#endif // nsIDOMDOMImplementation_h__ diff --git a/mozilla/dom/public/coreDom/nsIDOMData.h b/mozilla/dom/public/coreDom/nsIDOMData.h deleted file mode 100644 index af763856ea2..00000000000 --- a/mozilla/dom/public/coreDom/nsIDOMData.h +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- 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 nsIDOMData_h__ -#define nsIDOMData_h__ - -#include "nsISupports.h" -#include "nsString.h" -#include "nsIScriptContext.h" -#include "nsIDOMNode.h" - - -#define NS_IDOMDATA_IID \ -{ 0x6f7652e3, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } - -class nsIDOMData : public nsIDOMNode { -public: - - NS_IMETHOD GetData(nsString& aData)=0; - NS_IMETHOD SetData(const nsString& aData)=0; - - NS_IMETHOD GetSize(PRUint32* aSize)=0; - - NS_IMETHOD Substring(PRUint32 aStart, PRUint32 aEnd, nsString& aReturn)=0; - - NS_IMETHOD Append(const nsString& aData)=0; - - NS_IMETHOD Insert(PRUint32 aOffset, const nsString& aData)=0; - - NS_IMETHOD Remove(PRUint32 aOffset, PRUint32 aCount)=0; - - NS_IMETHOD Replace(PRUint32 aOffset, PRUint32 aCount, const nsString& aData)=0; -}; - - -#define NS_DECL_IDOMDATA \ - NS_IMETHOD GetData(nsString& aData); \ - NS_IMETHOD SetData(const nsString& aData); \ - NS_IMETHOD GetSize(PRUint32* aSize); \ - NS_IMETHOD Substring(PRUint32 aStart, PRUint32 aEnd, nsString& aReturn); \ - NS_IMETHOD Append(const nsString& aData); \ - NS_IMETHOD Insert(PRUint32 aOffset, const nsString& aData); \ - NS_IMETHOD Remove(PRUint32 aOffset, PRUint32 aCount); \ - NS_IMETHOD Replace(PRUint32 aOffset, PRUint32 aCount, const nsString& aData); \ - - - -#define NS_FORWARD_IDOMDATA(_to) \ - NS_IMETHOD GetData(nsString& aData) { return _to##GetData(aData); } \ - NS_IMETHOD SetData(const nsString& aData) { return _to##SetData(aData); } \ - NS_IMETHOD GetSize(PRUint32* aSize) { return _to##GetSize(aSize); } \ - NS_IMETHOD Substring(PRUint32 aStart, PRUint32 aEnd, nsString& aReturn) { return _to##Substring(aStart, aEnd, aReturn); } \ - NS_IMETHOD Append(const nsString& aData) { return _to##Append(aData); } \ - NS_IMETHOD Insert(PRUint32 aOffset, const nsString& aData) { return _to##Insert(aOffset, aData); } \ - NS_IMETHOD Remove(PRUint32 aOffset, PRUint32 aCount) { return _to##Remove(aOffset, aCount); } \ - NS_IMETHOD Replace(PRUint32 aOffset, PRUint32 aCount, const nsString& aData) { return _to##Replace(aOffset, aCount, aData); } \ - - -extern nsresult NS_InitDataClass(nsIScriptContext *aContext, void **aPrototype); - -extern "C" NS_DOM nsresult NS_NewScriptData(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); - -#endif // nsIDOMData_h__ diff --git a/mozilla/dom/public/coreDom/nsIDOMDocument.h b/mozilla/dom/public/coreDom/nsIDOMDocument.h index df69674b507..d0a952c8c82 100644 --- a/mozilla/dom/public/coreDom/nsIDOMDocument.h +++ b/mozilla/dom/public/coreDom/nsIDOMDocument.h @@ -23,35 +23,34 @@ #include "nsISupports.h" #include "nsString.h" #include "nsIScriptContext.h" -#include "nsIDOMDocumentFragment.h" +#include "nsIDOMNode.h" class nsIDOMElement; class nsIDOMProcessingInstruction; -class nsIDOMNamedNodeMap; -class nsIDOMAttribute; -class nsIDOMNode; +class nsIDOMAttr; +class nsIDOMCDATASection; class nsIDOMText; +class nsIDOMDOMImplementation; class nsIDOMDocumentType; +class nsIDOMEntityReference; class nsIDOMDocumentFragment; class nsIDOMComment; class nsIDOMNodeList; #define NS_IDOMDOCUMENT_IID \ -{ 0x6f7652e4, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9075, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } -class nsIDOMDocument : public nsIDOMDocumentFragment { +class nsIDOMDocument : public nsIDOMNode { public: - NS_IMETHOD GetDocumentType(nsIDOMDocumentType** aDocumentType)=0; + NS_IMETHOD GetDoctype(nsIDOMDocumentType** aDoctype)=0; - NS_IMETHOD GetProlog(nsIDOMNodeList** aProlog)=0; - - NS_IMETHOD GetEpilog(nsIDOMNodeList** aEpilog)=0; + NS_IMETHOD GetImplementation(nsIDOMDOMImplementation** aImplementation)=0; NS_IMETHOD GetDocumentElement(nsIDOMElement** aDocumentElement)=0; - NS_IMETHOD CreateElement(const nsString& aTagName, nsIDOMNamedNodeMap* aAttributes, nsIDOMElement** aReturn)=0; + NS_IMETHOD CreateElement(const nsString& aTagName, nsIDOMElement** aReturn)=0; NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment** aReturn)=0; @@ -59,40 +58,46 @@ public: NS_IMETHOD CreateComment(const nsString& aData, nsIDOMComment** aReturn)=0; + NS_IMETHOD CreateCDATASection(const nsString& aData, nsIDOMCDATASection** aReturn)=0; + NS_IMETHOD CreateProcessingInstruction(const nsString& aTarget, const nsString& aData, nsIDOMProcessingInstruction** aReturn)=0; - NS_IMETHOD CreateAttribute(const nsString& aName, nsIDOMNode* aValue, nsIDOMAttribute** aReturn)=0; + NS_IMETHOD CreateAttribute(const nsString& aName, nsIDOMAttr** aReturn)=0; + + NS_IMETHOD CreateEntityReference(const nsString& aName, nsIDOMEntityReference** aReturn)=0; NS_IMETHOD GetElementsByTagName(const nsString& aTagname, nsIDOMNodeList** aReturn)=0; }; #define NS_DECL_IDOMDOCUMENT \ - NS_IMETHOD GetDocumentType(nsIDOMDocumentType** aDocumentType); \ - NS_IMETHOD GetProlog(nsIDOMNodeList** aProlog); \ - NS_IMETHOD GetEpilog(nsIDOMNodeList** aEpilog); \ + NS_IMETHOD GetDoctype(nsIDOMDocumentType** aDoctype); \ + NS_IMETHOD GetImplementation(nsIDOMDOMImplementation** aImplementation); \ NS_IMETHOD GetDocumentElement(nsIDOMElement** aDocumentElement); \ - NS_IMETHOD CreateElement(const nsString& aTagName, nsIDOMNamedNodeMap* aAttributes, nsIDOMElement** aReturn); \ + NS_IMETHOD CreateElement(const nsString& aTagName, nsIDOMElement** aReturn); \ NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment** aReturn); \ NS_IMETHOD CreateTextNode(const nsString& aData, nsIDOMText** aReturn); \ NS_IMETHOD CreateComment(const nsString& aData, nsIDOMComment** aReturn); \ + NS_IMETHOD CreateCDATASection(const nsString& aData, nsIDOMCDATASection** aReturn); \ NS_IMETHOD CreateProcessingInstruction(const nsString& aTarget, const nsString& aData, nsIDOMProcessingInstruction** aReturn); \ - NS_IMETHOD CreateAttribute(const nsString& aName, nsIDOMNode* aValue, nsIDOMAttribute** aReturn); \ + NS_IMETHOD CreateAttribute(const nsString& aName, nsIDOMAttr** aReturn); \ + NS_IMETHOD CreateEntityReference(const nsString& aName, nsIDOMEntityReference** aReturn); \ NS_IMETHOD GetElementsByTagName(const nsString& aTagname, nsIDOMNodeList** aReturn); \ #define NS_FORWARD_IDOMDOCUMENT(_to) \ - NS_IMETHOD GetDocumentType(nsIDOMDocumentType** aDocumentType) { return _to##GetDocumentType(aDocumentType); } \ - NS_IMETHOD GetProlog(nsIDOMNodeList** aProlog) { return _to##GetProlog(aProlog); } \ - NS_IMETHOD GetEpilog(nsIDOMNodeList** aEpilog) { return _to##GetEpilog(aEpilog); } \ + NS_IMETHOD GetDoctype(nsIDOMDocumentType** aDoctype) { return _to##GetDoctype(aDoctype); } \ + NS_IMETHOD GetImplementation(nsIDOMDOMImplementation** aImplementation) { return _to##GetImplementation(aImplementation); } \ NS_IMETHOD GetDocumentElement(nsIDOMElement** aDocumentElement) { return _to##GetDocumentElement(aDocumentElement); } \ - NS_IMETHOD CreateElement(const nsString& aTagName, nsIDOMNamedNodeMap* aAttributes, nsIDOMElement** aReturn) { return _to##CreateElement(aTagName, aAttributes, aReturn); } \ + NS_IMETHOD CreateElement(const nsString& aTagName, nsIDOMElement** aReturn) { return _to##CreateElement(aTagName, aReturn); } \ NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment** aReturn) { return _to##CreateDocumentFragment(aReturn); } \ NS_IMETHOD CreateTextNode(const nsString& aData, nsIDOMText** aReturn) { return _to##CreateTextNode(aData, aReturn); } \ NS_IMETHOD CreateComment(const nsString& aData, nsIDOMComment** aReturn) { return _to##CreateComment(aData, aReturn); } \ + NS_IMETHOD CreateCDATASection(const nsString& aData, nsIDOMCDATASection** aReturn) { return _to##CreateCDATASection(aData, aReturn); } \ NS_IMETHOD CreateProcessingInstruction(const nsString& aTarget, const nsString& aData, nsIDOMProcessingInstruction** aReturn) { return _to##CreateProcessingInstruction(aTarget, aData, aReturn); } \ - NS_IMETHOD CreateAttribute(const nsString& aName, nsIDOMNode* aValue, nsIDOMAttribute** aReturn) { return _to##CreateAttribute(aName, aValue, aReturn); } \ + NS_IMETHOD CreateAttribute(const nsString& aName, nsIDOMAttr** aReturn) { return _to##CreateAttribute(aName, aReturn); } \ + NS_IMETHOD CreateEntityReference(const nsString& aName, nsIDOMEntityReference** aReturn) { return _to##CreateEntityReference(aName, aReturn); } \ NS_IMETHOD GetElementsByTagName(const nsString& aTagname, nsIDOMNodeList** aReturn) { return _to##GetElementsByTagName(aTagname, aReturn); } \ diff --git a/mozilla/dom/public/coreDom/nsIDOMDocumentFragment.h b/mozilla/dom/public/coreDom/nsIDOMDocumentFragment.h index 0e89a68fb16..6d5d90ed0da 100644 --- a/mozilla/dom/public/coreDom/nsIDOMDocumentFragment.h +++ b/mozilla/dom/public/coreDom/nsIDOMDocumentFragment.h @@ -25,26 +25,21 @@ #include "nsIScriptContext.h" #include "nsIDOMNode.h" -class nsIDOMDocument; #define NS_IDOMDOCUMENTFRAGMENT_IID \ -{ 0x6f7652e5, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9076, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMDocumentFragment : public nsIDOMNode { public: - - NS_IMETHOD GetMasterDoc(nsIDOMDocument** aMasterDoc)=0; }; #define NS_DECL_IDOMDOCUMENTFRAGMENT \ - NS_IMETHOD GetMasterDoc(nsIDOMDocument** aMasterDoc); \ #define NS_FORWARD_IDOMDOCUMENTFRAGMENT(_to) \ - NS_IMETHOD GetMasterDoc(nsIDOMDocument** aMasterDoc) { return _to##GetMasterDoc(aMasterDoc); } \ extern nsresult NS_InitDocumentFragmentClass(nsIScriptContext *aContext, void **aPrototype); diff --git a/mozilla/dom/public/coreDom/nsIDOMDocumentType.h b/mozilla/dom/public/coreDom/nsIDOMDocumentType.h index fbd723f1d35..43ef51c714f 100644 --- a/mozilla/dom/public/coreDom/nsIDOMDocumentType.h +++ b/mozilla/dom/public/coreDom/nsIDOMDocumentType.h @@ -23,37 +23,36 @@ #include "nsISupports.h" #include "nsString.h" #include "nsIScriptContext.h" +#include "nsIDOMNode.h" class nsIDOMNamedNodeMap; #define NS_IDOMDOCUMENTTYPE_IID \ -{ 0x6f7652e6, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9077, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } -class nsIDOMDocumentType : public nsISupports { +class nsIDOMDocumentType : public nsIDOMNode { public: NS_IMETHOD GetName(nsString& aName)=0; - NS_IMETHOD SetName(const nsString& aName)=0; NS_IMETHOD GetEntities(nsIDOMNamedNodeMap** aEntities)=0; - NS_IMETHOD SetEntities(nsIDOMNamedNodeMap* aEntities)=0; + + NS_IMETHOD GetNotations(nsIDOMNamedNodeMap** aNotations)=0; }; #define NS_DECL_IDOMDOCUMENTTYPE \ NS_IMETHOD GetName(nsString& aName); \ - NS_IMETHOD SetName(const nsString& aName); \ NS_IMETHOD GetEntities(nsIDOMNamedNodeMap** aEntities); \ - NS_IMETHOD SetEntities(nsIDOMNamedNodeMap* aEntities); \ + NS_IMETHOD GetNotations(nsIDOMNamedNodeMap** aNotations); \ #define NS_FORWARD_IDOMDOCUMENTTYPE(_to) \ NS_IMETHOD GetName(nsString& aName) { return _to##GetName(aName); } \ - NS_IMETHOD SetName(const nsString& aName) { return _to##SetName(aName); } \ NS_IMETHOD GetEntities(nsIDOMNamedNodeMap** aEntities) { return _to##GetEntities(aEntities); } \ - NS_IMETHOD SetEntities(nsIDOMNamedNodeMap* aEntities) { return _to##SetEntities(aEntities); } \ + NS_IMETHOD GetNotations(nsIDOMNamedNodeMap** aNotations) { return _to##GetNotations(aNotations); } \ extern nsresult NS_InitDocumentTypeClass(nsIScriptContext *aContext, void **aPrototype); diff --git a/mozilla/dom/public/coreDom/nsIDOMElement.h b/mozilla/dom/public/coreDom/nsIDOMElement.h index 75bb6355d58..651cab23d5d 100644 --- a/mozilla/dom/public/coreDom/nsIDOMElement.h +++ b/mozilla/dom/public/coreDom/nsIDOMElement.h @@ -25,12 +25,12 @@ #include "nsIScriptContext.h" #include "nsIDOMNode.h" -class nsIDOMAttribute; +class nsIDOMAttr; class nsIDOMNodeList; #define NS_IDOMELEMENT_IID \ -{ 0x6f7652e8, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9078, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMElement : public nsIDOMNode { public: @@ -43,13 +43,13 @@ public: NS_IMETHOD RemoveAttribute(const nsString& aName)=0; - NS_IMETHOD GetAttributeNode(const nsString& aName, nsIDOMAttribute** aReturn)=0; + NS_IMETHOD GetAttributeNode(const nsString& aName, nsIDOMAttr** aReturn)=0; - NS_IMETHOD SetAttributeNode(nsIDOMAttribute* aNewAttr)=0; + NS_IMETHOD SetAttributeNode(nsIDOMAttr* aNewAttr, nsIDOMAttr** aReturn)=0; - NS_IMETHOD RemoveAttributeNode(nsIDOMAttribute* aOldAttr)=0; + NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* aOldAttr, nsIDOMAttr** aReturn)=0; - NS_IMETHOD GetElementsByTagName(const nsString& aTagname, nsIDOMNodeList** aReturn)=0; + NS_IMETHOD GetElementsByTagName(const nsString& aName, nsIDOMNodeList** aReturn)=0; NS_IMETHOD Normalize()=0; }; @@ -60,10 +60,10 @@ public: NS_IMETHOD GetDOMAttribute(const nsString& aName, nsString& aReturn); \ NS_IMETHOD SetDOMAttribute(const nsString& aName, const nsString& aValue); \ NS_IMETHOD RemoveAttribute(const nsString& aName); \ - NS_IMETHOD GetAttributeNode(const nsString& aName, nsIDOMAttribute** aReturn); \ - NS_IMETHOD SetAttributeNode(nsIDOMAttribute* aNewAttr); \ - NS_IMETHOD RemoveAttributeNode(nsIDOMAttribute* aOldAttr); \ - NS_IMETHOD GetElementsByTagName(const nsString& aTagname, nsIDOMNodeList** aReturn); \ + NS_IMETHOD GetAttributeNode(const nsString& aName, nsIDOMAttr** aReturn); \ + NS_IMETHOD SetAttributeNode(nsIDOMAttr* aNewAttr, nsIDOMAttr** aReturn); \ + NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* aOldAttr, nsIDOMAttr** aReturn); \ + NS_IMETHOD GetElementsByTagName(const nsString& aName, nsIDOMNodeList** aReturn); \ NS_IMETHOD Normalize(); \ @@ -73,10 +73,10 @@ public: NS_IMETHOD GetDOMAttribute(const nsString& aName, nsString& aReturn) { return _to##GetDOMAttribute(aName, aReturn); } \ NS_IMETHOD SetDOMAttribute(const nsString& aName, const nsString& aValue) { return _to##SetDOMAttribute(aName, aValue); } \ NS_IMETHOD RemoveAttribute(const nsString& aName) { return _to##RemoveAttribute(aName); } \ - NS_IMETHOD GetAttributeNode(const nsString& aName, nsIDOMAttribute** aReturn) { return _to##GetAttributeNode(aName, aReturn); } \ - NS_IMETHOD SetAttributeNode(nsIDOMAttribute* aNewAttr) { return _to##SetAttributeNode(aNewAttr); } \ - NS_IMETHOD RemoveAttributeNode(nsIDOMAttribute* aOldAttr) { return _to##RemoveAttributeNode(aOldAttr); } \ - NS_IMETHOD GetElementsByTagName(const nsString& aTagname, nsIDOMNodeList** aReturn) { return _to##GetElementsByTagName(aTagname, aReturn); } \ + NS_IMETHOD GetAttributeNode(const nsString& aName, nsIDOMAttr** aReturn) { return _to##GetAttributeNode(aName, aReturn); } \ + NS_IMETHOD SetAttributeNode(nsIDOMAttr* aNewAttr, nsIDOMAttr** aReturn) { return _to##SetAttributeNode(aNewAttr, aReturn); } \ + NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* aOldAttr, nsIDOMAttr** aReturn) { return _to##RemoveAttributeNode(aOldAttr, aReturn); } \ + NS_IMETHOD GetElementsByTagName(const nsString& aName, nsIDOMNodeList** aReturn) { return _to##GetElementsByTagName(aName, aReturn); } \ NS_IMETHOD Normalize() { return _to##Normalize(); } \ diff --git a/mozilla/dom/public/coreDom/nsIDOMEntity.h b/mozilla/dom/public/coreDom/nsIDOMEntity.h new file mode 100644 index 00000000000..453ac672b08 --- /dev/null +++ b/mozilla/dom/public/coreDom/nsIDOMEntity.h @@ -0,0 +1,61 @@ +/* -*- 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 nsIDOMEntity_h__ +#define nsIDOMEntity_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" +#include "nsIDOMNode.h" + + +#define NS_IDOMENTITY_IID \ + { 0xa6cf9079, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } + +class nsIDOMEntity : public nsIDOMNode { +public: + + NS_IMETHOD GetPublicId(nsString& aPublicId)=0; + + NS_IMETHOD GetSystemId(nsString& aSystemId)=0; + + NS_IMETHOD GetNotationName(nsString& aNotationName)=0; +}; + + +#define NS_DECL_IDOMENTITY \ + NS_IMETHOD GetPublicId(nsString& aPublicId); \ + NS_IMETHOD GetSystemId(nsString& aSystemId); \ + NS_IMETHOD GetNotationName(nsString& aNotationName); \ + + + +#define NS_FORWARD_IDOMENTITY(_to) \ + NS_IMETHOD GetPublicId(nsString& aPublicId) { return _to##GetPublicId(aPublicId); } \ + NS_IMETHOD GetSystemId(nsString& aSystemId) { return _to##GetSystemId(aSystemId); } \ + NS_IMETHOD GetNotationName(nsString& aNotationName) { return _to##GetNotationName(aNotationName); } \ + + +extern nsresult NS_InitEntityClass(nsIScriptContext *aContext, void **aPrototype); + +extern "C" NS_DOM nsresult NS_NewScriptEntity(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); + +#endif // nsIDOMEntity_h__ diff --git a/mozilla/dom/public/coreDom/nsIDOMEntityReference.h b/mozilla/dom/public/coreDom/nsIDOMEntityReference.h new file mode 100644 index 00000000000..9d62165abbc --- /dev/null +++ b/mozilla/dom/public/coreDom/nsIDOMEntityReference.h @@ -0,0 +1,49 @@ +/* -*- 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 nsIDOMEntityReference_h__ +#define nsIDOMEntityReference_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" +#include "nsIDOMNode.h" + + +#define NS_IDOMENTITYREFERENCE_IID \ + { 0xa6cf907a, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } + +class nsIDOMEntityReference : public nsIDOMNode { +public: +}; + + +#define NS_DECL_IDOMENTITYREFERENCE \ + + + +#define NS_FORWARD_IDOMENTITYREFERENCE(_to) \ + + +extern nsresult NS_InitEntityReferenceClass(nsIScriptContext *aContext, void **aPrototype); + +extern "C" NS_DOM nsresult NS_NewScriptEntityReference(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); + +#endif // nsIDOMEntityReference_h__ diff --git a/mozilla/dom/public/coreDom/nsIDOMNamedNodeMap.h b/mozilla/dom/public/coreDom/nsIDOMNamedNodeMap.h index 56a6850e127..65be8a8f666 100644 --- a/mozilla/dom/public/coreDom/nsIDOMNamedNodeMap.h +++ b/mozilla/dom/public/coreDom/nsIDOMNamedNodeMap.h @@ -27,8 +27,8 @@ class nsIDOMNode; #define NS_IDOMNAMEDNODEMAP_IID \ -{ 0x6f7652ea, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf907b, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMNamedNodeMap : public nsISupports { public: @@ -37,7 +37,7 @@ public: NS_IMETHOD GetNamedItem(const nsString& aName, nsIDOMNode** aReturn)=0; - NS_IMETHOD SetNamedItem(nsIDOMNode* aNode)=0; + NS_IMETHOD SetNamedItem(nsIDOMNode* aArg, nsIDOMNode** aReturn)=0; NS_IMETHOD RemoveNamedItem(const nsString& aName, nsIDOMNode** aReturn)=0; @@ -48,7 +48,7 @@ public: #define NS_DECL_IDOMNAMEDNODEMAP \ NS_IMETHOD GetLength(PRUint32* aLength); \ NS_IMETHOD GetNamedItem(const nsString& aName, nsIDOMNode** aReturn); \ - NS_IMETHOD SetNamedItem(nsIDOMNode* aNode); \ + NS_IMETHOD SetNamedItem(nsIDOMNode* aArg, nsIDOMNode** aReturn); \ NS_IMETHOD RemoveNamedItem(const nsString& aName, nsIDOMNode** aReturn); \ NS_IMETHOD Item(PRUint32 aIndex, nsIDOMNode** aReturn); \ @@ -57,7 +57,7 @@ public: #define NS_FORWARD_IDOMNAMEDNODEMAP(_to) \ NS_IMETHOD GetLength(PRUint32* aLength) { return _to##GetLength(aLength); } \ NS_IMETHOD GetNamedItem(const nsString& aName, nsIDOMNode** aReturn) { return _to##GetNamedItem(aName, aReturn); } \ - NS_IMETHOD SetNamedItem(nsIDOMNode* aNode) { return _to##SetNamedItem(aNode); } \ + NS_IMETHOD SetNamedItem(nsIDOMNode* aArg, nsIDOMNode** aReturn) { return _to##SetNamedItem(aArg, aReturn); } \ NS_IMETHOD RemoveNamedItem(const nsString& aName, nsIDOMNode** aReturn) { return _to##RemoveNamedItem(aName, aReturn); } \ NS_IMETHOD Item(PRUint32 aIndex, nsIDOMNode** aReturn) { return _to##Item(aIndex, aReturn); } \ diff --git a/mozilla/dom/public/coreDom/nsIDOMNode.h b/mozilla/dom/public/coreDom/nsIDOMNode.h index 1b9ec20afe6..15f09d621b9 100644 --- a/mozilla/dom/public/coreDom/nsIDOMNode.h +++ b/mozilla/dom/public/coreDom/nsIDOMNode.h @@ -24,27 +24,30 @@ #include "nsString.h" #include "nsIScriptContext.h" +class nsIDOMDocument; class nsIDOMNamedNodeMap; class nsIDOMNode; class nsIDOMNodeList; #define NS_IDOMNODE_IID \ -{ 0x6f7652eb, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf907c, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMNode : public nsISupports { public: enum { - DOCUMENT = 1, - ELEMENT = 2, - ATTRIBUTE = 3, - PROCESSING_INSTRUCTION = 4, - COMMENT = 5, - TEXT = 6, - CDATA_SECTION = 7, - DOCUMENT_FRAGMENT = 8, - ENTITY_DECLARATION = 9, - ENTITY_REFERENCE = 10 + ELEMENT_NODE = 1, + ATTRIBUTE_NODE = 2, + TEXT_NODE = 3, + CDATA_SECTION_NODE = 4, + ENTITY_REFERENCE_NODE = 5, + ENTITY_NODE = 6, + PROCESSING_INSTRUCTION_NODE = 7, + COMMENT_NODE = 8, + DOCUMENT_NODE = 9, + DOCUMENT_TYPE_NODE = 10, + DOCUMENT_FRAGMENT_NODE = 11, + NOTATION_NODE = 12 }; NS_IMETHOD GetNodeName(nsString& aNodeName)=0; @@ -52,14 +55,12 @@ public: NS_IMETHOD GetNodeValue(nsString& aNodeValue)=0; NS_IMETHOD SetNodeValue(const nsString& aNodeValue)=0; - NS_IMETHOD GetNodeType(PRInt32* aNodeType)=0; + NS_IMETHOD GetNodeType(PRUint16* aNodeType)=0; NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode)=0; NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes)=0; - NS_IMETHOD GetHasChildNodes(PRBool* aHasChildNodes)=0; - NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild)=0; NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild)=0; @@ -70,6 +71,8 @@ public: NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes)=0; + NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument)=0; + NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn)=0; NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aReturn)=0; @@ -78,9 +81,9 @@ public: NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn)=0; - NS_IMETHOD CloneNode(nsIDOMNode** aReturn)=0; + NS_IMETHOD HasChildNodes(PRBool* aReturn)=0; - NS_IMETHOD Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn)=0; + NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn)=0; }; @@ -88,21 +91,21 @@ public: NS_IMETHOD GetNodeName(nsString& aNodeName); \ NS_IMETHOD GetNodeValue(nsString& aNodeValue); \ NS_IMETHOD SetNodeValue(const nsString& aNodeValue); \ - NS_IMETHOD GetNodeType(PRInt32* aNodeType); \ + NS_IMETHOD GetNodeType(PRUint16* aNodeType); \ NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode); \ NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes); \ - NS_IMETHOD GetHasChildNodes(PRBool* aHasChildNodes); \ NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild); \ NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild); \ NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling); \ NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling); \ NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes); \ + NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument); \ NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn); \ NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aReturn); \ NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn); \ NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn); \ - NS_IMETHOD CloneNode(nsIDOMNode** aReturn); \ - NS_IMETHOD Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn); \ + NS_IMETHOD HasChildNodes(PRBool* aReturn); \ + NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn); \ @@ -110,21 +113,21 @@ public: NS_IMETHOD GetNodeName(nsString& aNodeName) { return _to##GetNodeName(aNodeName); } \ NS_IMETHOD GetNodeValue(nsString& aNodeValue) { return _to##GetNodeValue(aNodeValue); } \ NS_IMETHOD SetNodeValue(const nsString& aNodeValue) { return _to##SetNodeValue(aNodeValue); } \ - NS_IMETHOD GetNodeType(PRInt32* aNodeType) { return _to##GetNodeType(aNodeType); } \ + NS_IMETHOD GetNodeType(PRUint16* aNodeType) { return _to##GetNodeType(aNodeType); } \ NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode) { return _to##GetParentNode(aParentNode); } \ NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes) { return _to##GetChildNodes(aChildNodes); } \ - NS_IMETHOD GetHasChildNodes(PRBool* aHasChildNodes) { return _to##GetHasChildNodes(aHasChildNodes); } \ NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild) { return _to##GetFirstChild(aFirstChild); } \ NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild) { return _to##GetLastChild(aLastChild); } \ NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling) { return _to##GetPreviousSibling(aPreviousSibling); } \ NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling) { return _to##GetNextSibling(aNextSibling); } \ NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes) { return _to##GetAttributes(aAttributes); } \ + NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { return _to##GetOwnerDocument(aOwnerDocument); } \ NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn) { return _to##InsertBefore(aNewChild, aRefChild, aReturn); } \ NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aReturn) { return _to##ReplaceChild(aNewChild, aOldChild, aReturn); } \ NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn) { return _to##RemoveChild(aOldChild, aReturn); } \ NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn) { return _to##AppendChild(aNewChild, aReturn); } \ - NS_IMETHOD CloneNode(nsIDOMNode** aReturn) { return _to##CloneNode(aReturn); } \ - NS_IMETHOD Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn) { return _to##Equals(aNode, aDeep, aReturn); } \ + NS_IMETHOD HasChildNodes(PRBool* aReturn) { return _to##HasChildNodes(aReturn); } \ + NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { return _to##CloneNode(aDeep, aReturn); } \ extern nsresult NS_InitNodeClass(nsIScriptContext *aContext, void **aPrototype); diff --git a/mozilla/dom/public/coreDom/nsIDOMNodeList.h b/mozilla/dom/public/coreDom/nsIDOMNodeList.h index cfefc527c3f..95deb34ee93 100644 --- a/mozilla/dom/public/coreDom/nsIDOMNodeList.h +++ b/mozilla/dom/public/coreDom/nsIDOMNodeList.h @@ -27,8 +27,8 @@ class nsIDOMNode; #define NS_IDOMNODELIST_IID \ -{ 0x6f7652ec, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf907d, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMNodeList : public nsISupports { public: diff --git a/mozilla/dom/public/coreDom/nsIDOMNotation.h b/mozilla/dom/public/coreDom/nsIDOMNotation.h new file mode 100644 index 00000000000..35f7466f16b --- /dev/null +++ b/mozilla/dom/public/coreDom/nsIDOMNotation.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 nsIDOMNotation_h__ +#define nsIDOMNotation_h__ + +#include "nsISupports.h" +#include "nsString.h" +#include "nsIScriptContext.h" +#include "nsIDOMNode.h" + + +#define NS_IDOMNOTATION_IID \ + { 0xa6cf907e, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } + +class nsIDOMNotation : public nsIDOMNode { +public: + + NS_IMETHOD GetPublicId(nsString& aPublicId)=0; + + NS_IMETHOD GetSystemId(nsString& aSystemId)=0; +}; + + +#define NS_DECL_IDOMNOTATION \ + NS_IMETHOD GetPublicId(nsString& aPublicId); \ + NS_IMETHOD GetSystemId(nsString& aSystemId); \ + + + +#define NS_FORWARD_IDOMNOTATION(_to) \ + NS_IMETHOD GetPublicId(nsString& aPublicId) { return _to##GetPublicId(aPublicId); } \ + NS_IMETHOD GetSystemId(nsString& aSystemId) { return _to##GetSystemId(aSystemId); } \ + + +extern nsresult NS_InitNotationClass(nsIScriptContext *aContext, void **aPrototype); + +extern "C" NS_DOM nsresult NS_NewScriptNotation(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); + +#endif // nsIDOMNotation_h__ diff --git a/mozilla/dom/public/coreDom/nsIDOMProcessingInstruction.h b/mozilla/dom/public/coreDom/nsIDOMProcessingInstruction.h index b4d1c6c3396..0c5529ac704 100644 --- a/mozilla/dom/public/coreDom/nsIDOMProcessingInstruction.h +++ b/mozilla/dom/public/coreDom/nsIDOMProcessingInstruction.h @@ -27,14 +27,13 @@ #define NS_IDOMPROCESSINGINSTRUCTION_IID \ -{ 0x6f7652ed, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf907f, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMProcessingInstruction : public nsIDOMNode { public: NS_IMETHOD GetTarget(nsString& aTarget)=0; - NS_IMETHOD SetTarget(const nsString& aTarget)=0; NS_IMETHOD GetData(nsString& aData)=0; NS_IMETHOD SetData(const nsString& aData)=0; @@ -43,7 +42,6 @@ public: #define NS_DECL_IDOMPROCESSINGINSTRUCTION \ NS_IMETHOD GetTarget(nsString& aTarget); \ - NS_IMETHOD SetTarget(const nsString& aTarget); \ NS_IMETHOD GetData(nsString& aData); \ NS_IMETHOD SetData(const nsString& aData); \ @@ -51,7 +49,6 @@ public: #define NS_FORWARD_IDOMPROCESSINGINSTRUCTION(_to) \ NS_IMETHOD GetTarget(nsString& aTarget) { return _to##GetTarget(aTarget); } \ - NS_IMETHOD SetTarget(const nsString& aTarget) { return _to##SetTarget(aTarget); } \ NS_IMETHOD GetData(nsString& aData) { return _to##GetData(aData); } \ NS_IMETHOD SetData(const nsString& aData) { return _to##SetData(aData); } \ diff --git a/mozilla/dom/public/coreDom/nsIDOMStyleSheet.h b/mozilla/dom/public/coreDom/nsIDOMStyleSheet.h index a536b2dbef5..a000ab59a03 100644 --- a/mozilla/dom/public/coreDom/nsIDOMStyleSheet.h +++ b/mozilla/dom/public/coreDom/nsIDOMStyleSheet.h @@ -26,8 +26,8 @@ #define NS_IDOMSTYLESHEET_IID \ -{ 0x6f7652ee, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9080, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMStyleSheet : public nsISupports { public: diff --git a/mozilla/dom/public/coreDom/nsIDOMStyleSheetCollection.h b/mozilla/dom/public/coreDom/nsIDOMStyleSheetCollection.h index 69b43ff057f..9823bfe7e02 100644 --- a/mozilla/dom/public/coreDom/nsIDOMStyleSheetCollection.h +++ b/mozilla/dom/public/coreDom/nsIDOMStyleSheetCollection.h @@ -27,8 +27,8 @@ class nsIDOMStyleSheet; #define NS_IDOMSTYLESHEETCOLLECTION_IID \ -{ 0x6f7652ef, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9081, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMStyleSheetCollection : public nsISupports { public: diff --git a/mozilla/dom/public/coreDom/nsIDOMText.h b/mozilla/dom/public/coreDom/nsIDOMText.h index bbc55b2c4f5..f9ec9fae92c 100644 --- a/mozilla/dom/public/coreDom/nsIDOMText.h +++ b/mozilla/dom/public/coreDom/nsIDOMText.h @@ -23,32 +23,28 @@ #include "nsISupports.h" #include "nsString.h" #include "nsIScriptContext.h" -#include "nsIDOMData.h" +#include "nsIDOMCharacterData.h" class nsIDOMText; #define NS_IDOMTEXT_IID \ -{ 0x6f7652f0, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9082, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } -class nsIDOMText : public nsIDOMData { +class nsIDOMText : public nsIDOMCharacterData { public: NS_IMETHOD SplitText(PRUint32 aOffset, nsIDOMText** aReturn)=0; - - NS_IMETHOD JoinText(nsIDOMText* aNode1, nsIDOMText* aNode2, nsIDOMText** aReturn)=0; }; #define NS_DECL_IDOMTEXT \ NS_IMETHOD SplitText(PRUint32 aOffset, nsIDOMText** aReturn); \ - NS_IMETHOD JoinText(nsIDOMText* aNode1, nsIDOMText* aNode2, nsIDOMText** aReturn); \ #define NS_FORWARD_IDOMTEXT(_to) \ NS_IMETHOD SplitText(PRUint32 aOffset, nsIDOMText** aReturn) { return _to##SplitText(aOffset, aReturn); } \ - NS_IMETHOD JoinText(nsIDOMText* aNode1, nsIDOMText* aNode2, nsIDOMText** aReturn) { return _to##JoinText(aNode1, aNode2, aReturn); } \ extern nsresult NS_InitTextClass(nsIScriptContext *aContext, void **aPrototype); diff --git a/mozilla/dom/public/coreEvents/nsIDOMEvent.h b/mozilla/dom/public/coreEvents/nsIDOMEvent.h index de1c904a1ab..cc8c59c1442 100644 --- a/mozilla/dom/public/coreEvents/nsIDOMEvent.h +++ b/mozilla/dom/public/coreEvents/nsIDOMEvent.h @@ -27,8 +27,8 @@ class nsIDOMNode; #define NS_IDOMEVENT_IID \ -{ 0x6f765331, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90c3, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMEvent : public nsISupports { public: diff --git a/mozilla/dom/public/coreEvents/nsIDOMEventCapturer.h b/mozilla/dom/public/coreEvents/nsIDOMEventCapturer.h index 0adbdbf438a..bb127e86c77 100644 --- a/mozilla/dom/public/coreEvents/nsIDOMEventCapturer.h +++ b/mozilla/dom/public/coreEvents/nsIDOMEventCapturer.h @@ -27,8 +27,8 @@ #define NS_IDOMEVENTCAPTURER_IID \ -{ 0x6f76533b, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf906c, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMEventCapturer : public nsIDOMEventReceiver { public: diff --git a/mozilla/dom/public/coreEvents/nsIDOMNSEvent.h b/mozilla/dom/public/coreEvents/nsIDOMNSEvent.h index 837b68f7083..5a63a234c4a 100644 --- a/mozilla/dom/public/coreEvents/nsIDOMNSEvent.h +++ b/mozilla/dom/public/coreEvents/nsIDOMNSEvent.h @@ -27,8 +27,8 @@ class nsIDOMRenderingContext; #define NS_IDOMNSEVENT_IID \ -{ 0x6f765332, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90c4, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMNSEvent : public nsISupports { public: diff --git a/mozilla/dom/public/css/nsIDOMCSSFontFaceRule.h b/mozilla/dom/public/css/nsIDOMCSSFontFaceRule.h index 9f20ef97721..8695f3b7618 100644 --- a/mozilla/dom/public/css/nsIDOMCSSFontFaceRule.h +++ b/mozilla/dom/public/css/nsIDOMCSSFontFaceRule.h @@ -28,8 +28,8 @@ class nsIDOMCSSStyleDeclaration; #define NS_IDOMCSSFONTFACERULE_IID \ -{ 0x6f765333, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90bb, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMCSSFontFaceRule : public nsIDOMCSSStyleRule { public: diff --git a/mozilla/dom/public/css/nsIDOMCSSMediaRule.h b/mozilla/dom/public/css/nsIDOMCSSMediaRule.h index d5534fb3ac6..b0fbf73f327 100644 --- a/mozilla/dom/public/css/nsIDOMCSSMediaRule.h +++ b/mozilla/dom/public/css/nsIDOMCSSMediaRule.h @@ -28,8 +28,8 @@ class nsIDOMCSSStyleRuleCollection; #define NS_IDOMCSSMEDIARULE_IID \ -{ 0x6f765334, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90bc, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMCSSMediaRule : public nsIDOMCSSStyleRule { public: diff --git a/mozilla/dom/public/css/nsIDOMCSSPageRule.h b/mozilla/dom/public/css/nsIDOMCSSPageRule.h index 1d1d2771ad0..b893e3b7c8f 100644 --- a/mozilla/dom/public/css/nsIDOMCSSPageRule.h +++ b/mozilla/dom/public/css/nsIDOMCSSPageRule.h @@ -28,8 +28,8 @@ class nsIDOMCSSStyleDeclaration; #define NS_IDOMCSSPAGERULE_IID \ -{ 0x6f765335, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90bd, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMCSSPageRule : public nsIDOMCSSStyleRule { public: diff --git a/mozilla/dom/public/css/nsIDOMCSSStyleDeclaration.h b/mozilla/dom/public/css/nsIDOMCSSStyleDeclaration.h index 4ebb46cf2bb..e4365d88428 100644 --- a/mozilla/dom/public/css/nsIDOMCSSStyleDeclaration.h +++ b/mozilla/dom/public/css/nsIDOMCSSStyleDeclaration.h @@ -26,8 +26,8 @@ #define NS_IDOMCSSSTYLEDECLARATION_IID \ -{ 0x6f765336, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90be, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMCSSStyleDeclaration : public nsISupports { public: diff --git a/mozilla/dom/public/css/nsIDOMCSSStyleRule.h b/mozilla/dom/public/css/nsIDOMCSSStyleRule.h index 7817c3e77b6..c7e1a04b6b8 100644 --- a/mozilla/dom/public/css/nsIDOMCSSStyleRule.h +++ b/mozilla/dom/public/css/nsIDOMCSSStyleRule.h @@ -26,8 +26,8 @@ #define NS_IDOMCSSSTYLERULE_IID \ -{ 0x6f765337, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90bf, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMCSSStyleRule : public nsISupports { public: diff --git a/mozilla/dom/public/css/nsIDOMCSSStyleRuleCollection.h b/mozilla/dom/public/css/nsIDOMCSSStyleRuleCollection.h index 46bebd1d2f6..18e5b27aec3 100644 --- a/mozilla/dom/public/css/nsIDOMCSSStyleRuleCollection.h +++ b/mozilla/dom/public/css/nsIDOMCSSStyleRuleCollection.h @@ -27,8 +27,8 @@ class nsIDOMCSSStyleRule; #define NS_IDOMCSSSTYLERULECOLLECTION_IID \ -{ 0x6f765338, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90c0, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMCSSStyleRuleCollection : public nsISupports { public: diff --git a/mozilla/dom/public/css/nsIDOMCSSStyleRuleSimple.h b/mozilla/dom/public/css/nsIDOMCSSStyleRuleSimple.h index 5b58e7fcc3e..216a42ad732 100644 --- a/mozilla/dom/public/css/nsIDOMCSSStyleRuleSimple.h +++ b/mozilla/dom/public/css/nsIDOMCSSStyleRuleSimple.h @@ -28,8 +28,8 @@ class nsIDOMCSSStyleDeclaration; #define NS_IDOMCSSSTYLERULESIMPLE_IID \ -{ 0x6f765339, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90c1, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMCSSStyleRuleSimple : public nsIDOMCSSStyleRule { public: diff --git a/mozilla/dom/public/css/nsIDOMCSSStyleSheet.h b/mozilla/dom/public/css/nsIDOMCSSStyleSheet.h index 450991cdbdd..b9979943244 100644 --- a/mozilla/dom/public/css/nsIDOMCSSStyleSheet.h +++ b/mozilla/dom/public/css/nsIDOMCSSStyleSheet.h @@ -31,8 +31,8 @@ class nsIDOMCSSStyleRuleCollection; class nsIDOMCSSStyleSheet; #define NS_IDOMCSSSTYLESHEET_IID \ -{ 0x6f76533a, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90c2, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMCSSStyleSheet : public nsIDOMStyleSheet { public: diff --git a/mozilla/dom/public/html/MANIFEST b/mozilla/dom/public/html/MANIFEST index 9948fc0d9c2..7eeba219936 100644 --- a/mozilla/dom/public/html/MANIFEST +++ b/mozilla/dom/public/html/MANIFEST @@ -8,11 +8,11 @@ nsIDOMHTMLAreaElement.h nsIDOMHTMLBRElement.h nsIDOMHTMLBaseElement.h nsIDOMHTMLBaseFontElement.h +nsIDOMHTMLBlockquoteElement.h nsIDOMHTMLBodyElement.h nsIDOMHTMLButtonElement.h nsIDOMHTMLCollection.h nsIDOMHTMLDListElement.h -nsIDOMHTMLDelElement.h nsIDOMHTMLDirectoryElement.h nsIDOMHTMLDivElement.h nsIDOMHTMLDocument.h @@ -29,7 +29,6 @@ nsIDOMHTMLHeadingElement.h nsIDOMHTMLHtmlElement.h nsIDOMHTMLImageElement.h nsIDOMHTMLInputElement.h -nsIDOMHTMLInsElement.h nsIDOMHTMLIsIndexElement.h nsIDOMHTMLLIElement.h nsIDOMHTMLLabelElement.h @@ -56,10 +55,7 @@ nsIDOMHTMLTableColElement.h nsIDOMHTMLTableElement.h nsIDOMHTMLTableRowElement.h nsIDOMHTMLTableSectionElement.h -nsIDOMHTMLTbodyElement.h nsIDOMHTMLTextAreaElement.h -nsIDOMHTMLTfootElement.h -nsIDOMHTMLTheadElement.h nsIDOMHTMLTitleElement.h nsIDOMHTMLUListElement.h nsIDOMImage.h diff --git a/mozilla/dom/public/html/Makefile b/mozilla/dom/public/html/Makefile index 0fb815c1069..88cb0c72b7d 100644 --- a/mozilla/dom/public/html/Makefile +++ b/mozilla/dom/public/html/Makefile @@ -27,11 +27,11 @@ EXPORTS = \ nsIDOMHTMLBRElement.h \ nsIDOMHTMLBaseElement.h \ nsIDOMHTMLBaseFontElement.h \ + nsIDOMHTMLBlockquoteElement.h \ nsIDOMHTMLBodyElement.h \ nsIDOMHTMLButtonElement.h \ nsIDOMHTMLCollection.h \ nsIDOMHTMLDListElement.h \ - nsIDOMHTMLDelElement.h \ nsIDOMHTMLDirectoryElement.h \ nsIDOMHTMLDivElement.h \ nsIDOMHTMLDocument.h \ @@ -48,7 +48,6 @@ EXPORTS = \ nsIDOMHTMLHtmlElement.h \ nsIDOMHTMLImageElement.h \ nsIDOMHTMLInputElement.h \ - nsIDOMHTMLInsElement.h \ nsIDOMHTMLIsIndexElement.h \ nsIDOMHTMLLIElement.h \ nsIDOMHTMLLabelElement.h \ @@ -75,10 +74,7 @@ EXPORTS = \ nsIDOMHTMLTableElement.h \ nsIDOMHTMLTableRowElement.h \ nsIDOMHTMLTableSectionElement.h \ - nsIDOMHTMLTbodyElement.h \ nsIDOMHTMLTextAreaElement.h \ - nsIDOMHTMLTfootElement.h \ - nsIDOMHTMLTheadElement.h \ nsIDOMHTMLTitleElement.h \ nsIDOMHTMLUListElement.h \ nsIDOMImage.h \ diff --git a/mozilla/dom/public/html/makefile.win b/mozilla/dom/public/html/makefile.win index 8bcc5fdfbb7..0c7a6aa78a6 100644 --- a/mozilla/dom/public/html/makefile.win +++ b/mozilla/dom/public/html/makefile.win @@ -27,11 +27,11 @@ EXPORTS= \ nsIDOMHTMLBRElement.h \ nsIDOMHTMLBaseElement.h \ nsIDOMHTMLBaseFontElement.h \ + nsIDOMHTMLBlockquoteElement.h \ nsIDOMHTMLBodyElement.h \ nsIDOMHTMLButtonElement.h \ nsIDOMHTMLCollection.h \ nsIDOMHTMLDListElement.h \ - nsIDOMHTMLDelElement.h \ nsIDOMHTMLDirectoryElement.h \ nsIDOMHTMLDivElement.h \ nsIDOMHTMLDocument.h \ @@ -48,7 +48,6 @@ EXPORTS= \ nsIDOMHTMLHtmlElement.h \ nsIDOMHTMLImageElement.h \ nsIDOMHTMLInputElement.h \ - nsIDOMHTMLInsElement.h \ nsIDOMHTMLIsIndexElement.h \ nsIDOMHTMLLIElement.h \ $(NULL) @@ -78,10 +77,7 @@ EXPORTS2= \ nsIDOMHTMLTableElement.h \ nsIDOMHTMLTableRowElement.h \ nsIDOMHTMLTableSectionElement.h \ - nsIDOMHTMLTbodyElement.h \ nsIDOMHTMLTextAreaElement.h \ - nsIDOMHTMLTfootElement.h \ - nsIDOMHTMLTheadElement.h \ nsIDOMHTMLTitleElement.h \ nsIDOMHTMLUListElement.h \ nsIDOMImage.h \ @@ -94,3 +90,5 @@ include <$(DEPTH)\config\rules.mak> export:: $(XPDIST)\public\$(MODULE) for %f in ($(EXPORTS2)) do $(MAKE_INSTALL:/=\) %f $(XPDIST:/=\)\public\$(MODULE:/=\) +clobber:: $(XPDIST)\public\$(MODULE) + -for %g in ($(EXPORTS2)) do $(RM) $(XPDIST:/=\)\public\$(MODULE:/=\)\%g diff --git a/mozilla/dom/public/html/nsIDOMHTMLAnchorElement.h b/mozilla/dom/public/html/nsIDOMHTMLAnchorElement.h index 769430ff370..5e140ee5667 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLAnchorElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLAnchorElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLANCHORELEMENT_IID \ -{ 0x6f7652f1, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90aa, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLAnchorElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLAppletElement.h b/mozilla/dom/public/html/nsIDOMHTMLAppletElement.h index 641e11447cd..d658d9721cb 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLAppletElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLAppletElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLAPPLETELEMENT_IID \ -{ 0x6f7652f2, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90ae, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLAppletElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLAreaElement.h b/mozilla/dom/public/html/nsIDOMHTMLAreaElement.h index c91368f85aa..e02136f240b 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLAreaElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLAreaElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLAREAELEMENT_IID \ -{ 0x6f7652f3, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90b0, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLAreaElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLBRElement.h b/mozilla/dom/public/html/nsIDOMHTMLBRElement.h index 5bccf93f450..80a54d86a81 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLBRElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLBRElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLBRELEMENT_IID \ -{ 0x6f7652f7, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90a5, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLBRElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLBaseElement.h b/mozilla/dom/public/html/nsIDOMHTMLBaseElement.h index 06e4e016f61..80e0b3e7ebc 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLBaseElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLBaseElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLBASEELEMENT_IID \ -{ 0x6f7652f4, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf908b, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLBaseElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLBaseFontElement.h b/mozilla/dom/public/html/nsIDOMHTMLBaseFontElement.h index 4b65dfd21b9..668886f103b 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLBaseFontElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLBaseFontElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLBASEFONTELEMENT_IID \ -{ 0x6f7652f5, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90a6, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLBaseFontElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLInsElement.h b/mozilla/dom/public/html/nsIDOMHTMLBlockquoteElement.h similarity index 55% rename from mozilla/dom/public/html/nsIDOMHTMLInsElement.h rename to mozilla/dom/public/html/nsIDOMHTMLBlockquoteElement.h index 3495e8c84a6..cf44bb08172 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLInsElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLBlockquoteElement.h @@ -17,8 +17,8 @@ */ /* AUTO-GENERATED. DO NOT EDIT!!! */ -#ifndef nsIDOMHTMLInsElement_h__ -#define nsIDOMHTMLInsElement_h__ +#ifndef nsIDOMHTMLBlockquoteElement_h__ +#define nsIDOMHTMLBlockquoteElement_h__ #include "nsISupports.h" #include "nsString.h" @@ -26,38 +26,31 @@ #include "nsIDOMHTMLElement.h" -#define NS_IDOMHTMLINSELEMENT_IID \ -{ 0x6f76530d, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } +#define NS_IDOMHTMLBLOCKQUOTEELEMENT_IID \ + { 0xa6cf909f, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } -class nsIDOMHTMLInsElement : public nsIDOMHTMLElement { +class nsIDOMHTMLBlockquoteElement : public nsIDOMHTMLElement { public: NS_IMETHOD GetCite(nsString& aCite)=0; NS_IMETHOD SetCite(const nsString& aCite)=0; - - NS_IMETHOD GetDateTime(nsString& aDateTime)=0; - NS_IMETHOD SetDateTime(const nsString& aDateTime)=0; }; -#define NS_DECL_IDOMHTMLINSELEMENT \ +#define NS_DECL_IDOMHTMLBLOCKQUOTEELEMENT \ NS_IMETHOD GetCite(nsString& aCite); \ NS_IMETHOD SetCite(const nsString& aCite); \ - NS_IMETHOD GetDateTime(nsString& aDateTime); \ - NS_IMETHOD SetDateTime(const nsString& aDateTime); \ -#define NS_FORWARD_IDOMHTMLINSELEMENT(_to) \ +#define NS_FORWARD_IDOMHTMLBLOCKQUOTEELEMENT(_to) \ NS_IMETHOD GetCite(nsString& aCite) { return _to##GetCite(aCite); } \ NS_IMETHOD SetCite(const nsString& aCite) { return _to##SetCite(aCite); } \ - NS_IMETHOD GetDateTime(nsString& aDateTime) { return _to##GetDateTime(aDateTime); } \ - NS_IMETHOD SetDateTime(const nsString& aDateTime) { return _to##SetDateTime(aDateTime); } \ -extern nsresult NS_InitHTMLInsElementClass(nsIScriptContext *aContext, void **aPrototype); +extern nsresult NS_InitHTMLBlockquoteElementClass(nsIScriptContext *aContext, void **aPrototype); -extern "C" NS_DOM nsresult NS_NewScriptHTMLInsElement(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); +extern "C" NS_DOM nsresult NS_NewScriptHTMLBlockquoteElement(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); -#endif // nsIDOMHTMLInsElement_h__ +#endif // nsIDOMHTMLBlockquoteElement_h__ diff --git a/mozilla/dom/public/html/nsIDOMHTMLBodyElement.h b/mozilla/dom/public/html/nsIDOMHTMLBodyElement.h index 5ca9e8b9cd0..37496405343 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLBodyElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLBodyElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLBODYELEMENT_IID \ -{ 0x6f7652f6, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf908e, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLBodyElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLButtonElement.h b/mozilla/dom/public/html/nsIDOMHTMLButtonElement.h index f2bf9b3a15d..f2406a60ed7 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLButtonElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLButtonElement.h @@ -28,14 +28,13 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLBUTTONELEMENT_IID \ -{ 0x6f7652f8, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9095, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLButtonElement : public nsIDOMHTMLElement { public: NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm)=0; - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm)=0; NS_IMETHOD GetAccessKey(nsString& aAccessKey)=0; NS_IMETHOD SetAccessKey(const nsString& aAccessKey)=0; @@ -50,7 +49,6 @@ public: NS_IMETHOD SetTabIndex(PRInt32 aTabIndex)=0; NS_IMETHOD GetType(nsString& aType)=0; - NS_IMETHOD SetType(const nsString& aType)=0; NS_IMETHOD GetValue(nsString& aValue)=0; NS_IMETHOD SetValue(const nsString& aValue)=0; @@ -59,7 +57,6 @@ public: #define NS_DECL_IDOMHTMLBUTTONELEMENT \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); \ NS_IMETHOD GetAccessKey(nsString& aAccessKey); \ NS_IMETHOD SetAccessKey(const nsString& aAccessKey); \ NS_IMETHOD GetDisabled(PRBool* aDisabled); \ @@ -69,7 +66,6 @@ public: NS_IMETHOD GetTabIndex(PRInt32* aTabIndex); \ NS_IMETHOD SetTabIndex(PRInt32 aTabIndex); \ NS_IMETHOD GetType(nsString& aType); \ - NS_IMETHOD SetType(const nsString& aType); \ NS_IMETHOD GetValue(nsString& aValue); \ NS_IMETHOD SetValue(const nsString& aValue); \ @@ -77,7 +73,6 @@ public: #define NS_FORWARD_IDOMHTMLBUTTONELEMENT(_to) \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm) { return _to##GetForm(aForm); } \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm) { return _to##SetForm(aForm); } \ NS_IMETHOD GetAccessKey(nsString& aAccessKey) { return _to##GetAccessKey(aAccessKey); } \ NS_IMETHOD SetAccessKey(const nsString& aAccessKey) { return _to##SetAccessKey(aAccessKey); } \ NS_IMETHOD GetDisabled(PRBool* aDisabled) { return _to##GetDisabled(aDisabled); } \ @@ -87,7 +82,6 @@ public: NS_IMETHOD GetTabIndex(PRInt32* aTabIndex) { return _to##GetTabIndex(aTabIndex); } \ NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return _to##SetTabIndex(aTabIndex); } \ NS_IMETHOD GetType(nsString& aType) { return _to##GetType(aType); } \ - NS_IMETHOD SetType(const nsString& aType) { return _to##SetType(aType); } \ NS_IMETHOD GetValue(nsString& aValue) { return _to##GetValue(aValue); } \ NS_IMETHOD SetValue(const nsString& aValue) { return _to##SetValue(aValue); } \ diff --git a/mozilla/dom/public/html/nsIDOMHTMLCollection.h b/mozilla/dom/public/html/nsIDOMHTMLCollection.h index 1c9d39d2e56..b91a00c9937 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLCollection.h +++ b/mozilla/dom/public/html/nsIDOMHTMLCollection.h @@ -27,8 +27,8 @@ class nsIDOMNode; #define NS_IDOMHTMLCOLLECTION_IID \ -{ 0x6f7652f9, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9083, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLCollection : public nsISupports { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLDListElement.h b/mozilla/dom/public/html/nsIDOMHTMLDListElement.h index 5b24aa7d900..cfb4d11ac74 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLDListElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLDListElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLDLISTELEMENT_IID \ -{ 0x6f7652fd, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf909b, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLDListElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLDelElement.h b/mozilla/dom/public/html/nsIDOMHTMLDelElement.h deleted file mode 100644 index 1b38c788e68..00000000000 --- a/mozilla/dom/public/html/nsIDOMHTMLDelElement.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- 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 nsIDOMHTMLDelElement_h__ -#define nsIDOMHTMLDelElement_h__ - -#include "nsISupports.h" -#include "nsString.h" -#include "nsIScriptContext.h" -#include "nsIDOMHTMLElement.h" - - -#define NS_IDOMHTMLDELELEMENT_IID \ -{ 0x6f7652fa, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } - -class nsIDOMHTMLDelElement : public nsIDOMHTMLElement { -public: - - NS_IMETHOD GetCite(nsString& aCite)=0; - NS_IMETHOD SetCite(const nsString& aCite)=0; - - NS_IMETHOD GetDateTime(nsString& aDateTime)=0; - NS_IMETHOD SetDateTime(const nsString& aDateTime)=0; -}; - - -#define NS_DECL_IDOMHTMLDELELEMENT \ - NS_IMETHOD GetCite(nsString& aCite); \ - NS_IMETHOD SetCite(const nsString& aCite); \ - NS_IMETHOD GetDateTime(nsString& aDateTime); \ - NS_IMETHOD SetDateTime(const nsString& aDateTime); \ - - - -#define NS_FORWARD_IDOMHTMLDELELEMENT(_to) \ - NS_IMETHOD GetCite(nsString& aCite) { return _to##GetCite(aCite); } \ - NS_IMETHOD SetCite(const nsString& aCite) { return _to##SetCite(aCite); } \ - NS_IMETHOD GetDateTime(nsString& aDateTime) { return _to##GetDateTime(aDateTime); } \ - NS_IMETHOD SetDateTime(const nsString& aDateTime) { return _to##SetDateTime(aDateTime); } \ - - -extern nsresult NS_InitHTMLDelElementClass(nsIScriptContext *aContext, void **aPrototype); - -extern "C" NS_DOM nsresult NS_NewScriptHTMLDelElement(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); - -#endif // nsIDOMHTMLDelElement_h__ diff --git a/mozilla/dom/public/html/nsIDOMHTMLDirectoryElement.h b/mozilla/dom/public/html/nsIDOMHTMLDirectoryElement.h index ff58c9fa14d..5b9967a9e6a 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLDirectoryElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLDirectoryElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLDIRECTORYELEMENT_IID \ -{ 0x6f7652fb, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf909c, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLDirectoryElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLDivElement.h b/mozilla/dom/public/html/nsIDOMHTMLDivElement.h index 165aa1b5450..7911b504381 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLDivElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLDivElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLDIVELEMENT_IID \ -{ 0x6f7652fc, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90a0, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLDivElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLDocument.h b/mozilla/dom/public/html/nsIDOMHTMLDocument.h index af48a56ada4..f52249ae5eb 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLDocument.h +++ b/mozilla/dom/public/html/nsIDOMHTMLDocument.h @@ -32,8 +32,8 @@ class nsIDOMHTMLCollection; class nsIDOMNodeList; #define NS_IDOMHTMLDOCUMENT_IID \ -{ 0x6f7652fe, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9084, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLDocument : public nsIDOMDocument { public: @@ -43,14 +43,6 @@ public: NS_IMETHOD GetReferrer(nsString& aReferrer)=0; - NS_IMETHOD GetFileSize(nsString& aFileSize)=0; - - NS_IMETHOD GetFileCreatedDate(nsString& aFileCreatedDate)=0; - - NS_IMETHOD GetFileModifiedDate(nsString& aFileModifiedDate)=0; - - NS_IMETHOD GetFileUpdatedDate(nsString& aFileUpdatedDate)=0; - NS_IMETHOD GetDomain(nsString& aDomain)=0; NS_IMETHOD GetURL(nsString& aURL)=0; @@ -89,10 +81,6 @@ public: NS_IMETHOD GetTitle(nsString& aTitle); \ NS_IMETHOD SetTitle(const nsString& aTitle); \ NS_IMETHOD GetReferrer(nsString& aReferrer); \ - NS_IMETHOD GetFileSize(nsString& aFileSize); \ - NS_IMETHOD GetFileCreatedDate(nsString& aFileCreatedDate); \ - NS_IMETHOD GetFileModifiedDate(nsString& aFileModifiedDate); \ - NS_IMETHOD GetFileUpdatedDate(nsString& aFileUpdatedDate); \ NS_IMETHOD GetDomain(nsString& aDomain); \ NS_IMETHOD GetURL(nsString& aURL); \ NS_IMETHOD GetBody(nsIDOMHTMLElement** aBody); \ @@ -117,10 +105,6 @@ public: NS_IMETHOD GetTitle(nsString& aTitle) { return _to##GetTitle(aTitle); } \ NS_IMETHOD SetTitle(const nsString& aTitle) { return _to##SetTitle(aTitle); } \ NS_IMETHOD GetReferrer(nsString& aReferrer) { return _to##GetReferrer(aReferrer); } \ - NS_IMETHOD GetFileSize(nsString& aFileSize) { return _to##GetFileSize(aFileSize); } \ - NS_IMETHOD GetFileCreatedDate(nsString& aFileCreatedDate) { return _to##GetFileCreatedDate(aFileCreatedDate); } \ - NS_IMETHOD GetFileModifiedDate(nsString& aFileModifiedDate) { return _to##GetFileModifiedDate(aFileModifiedDate); } \ - NS_IMETHOD GetFileUpdatedDate(nsString& aFileUpdatedDate) { return _to##GetFileUpdatedDate(aFileUpdatedDate); } \ NS_IMETHOD GetDomain(nsString& aDomain) { return _to##GetDomain(aDomain); } \ NS_IMETHOD GetURL(nsString& aURL) { return _to##GetURL(aURL); } \ NS_IMETHOD GetBody(nsIDOMHTMLElement** aBody) { return _to##GetBody(aBody); } \ diff --git a/mozilla/dom/public/html/nsIDOMHTMLElement.h b/mozilla/dom/public/html/nsIDOMHTMLElement.h index c7daaafdbc2..9aef3101d1a 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLElement.h @@ -28,8 +28,8 @@ class nsIDOMCSSStyleDeclaration; #define NS_IDOMHTMLELEMENT_IID \ -{ 0x6f7652ff, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9085, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLElement : public nsIDOMElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLFieldSetElement.h b/mozilla/dom/public/html/nsIDOMHTMLFieldSetElement.h index a4a9d399552..776a4777ee1 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLFieldSetElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLFieldSetElement.h @@ -28,8 +28,8 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLFIELDSETELEMENT_IID \ -{ 0x6f765300, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9097, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLFieldSetElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLFontElement.h b/mozilla/dom/public/html/nsIDOMHTMLFontElement.h index 00a9d8cf49d..30f6da799a6 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLFontElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLFontElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLFONTELEMENT_IID \ -{ 0x6f765301, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90a7, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLFontElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLFormElement.h b/mozilla/dom/public/html/nsIDOMHTMLFormElement.h index 253a3f094a1..acc379ba44b 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLFormElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLFormElement.h @@ -28,15 +28,18 @@ class nsIDOMHTMLCollection; #define NS_IDOMHTMLFORMELEMENT_IID \ -{ 0x6f765302, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf908f, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLFormElement : public nsIDOMHTMLElement { public: NS_IMETHOD GetElements(nsIDOMHTMLCollection** aElements)=0; + NS_IMETHOD GetLength(PRUint32* aLength)=0; + NS_IMETHOD GetName(nsString& aName)=0; + NS_IMETHOD SetName(const nsString& aName)=0; NS_IMETHOD GetAcceptCharset(nsString& aAcceptCharset)=0; NS_IMETHOD SetAcceptCharset(const nsString& aAcceptCharset)=0; @@ -53,15 +56,17 @@ public: NS_IMETHOD GetTarget(nsString& aTarget)=0; NS_IMETHOD SetTarget(const nsString& aTarget)=0; - NS_IMETHOD Reset()=0; - NS_IMETHOD Submit()=0; + + NS_IMETHOD Reset()=0; }; #define NS_DECL_IDOMHTMLFORMELEMENT \ NS_IMETHOD GetElements(nsIDOMHTMLCollection** aElements); \ + NS_IMETHOD GetLength(PRUint32* aLength); \ NS_IMETHOD GetName(nsString& aName); \ + NS_IMETHOD SetName(const nsString& aName); \ NS_IMETHOD GetAcceptCharset(nsString& aAcceptCharset); \ NS_IMETHOD SetAcceptCharset(const nsString& aAcceptCharset); \ NS_IMETHOD GetAction(nsString& aAction); \ @@ -72,14 +77,16 @@ public: NS_IMETHOD SetMethod(const nsString& aMethod); \ NS_IMETHOD GetTarget(nsString& aTarget); \ NS_IMETHOD SetTarget(const nsString& aTarget); \ - NS_IMETHOD Reset(); \ NS_IMETHOD Submit(); \ + NS_IMETHOD Reset(); \ #define NS_FORWARD_IDOMHTMLFORMELEMENT(_to) \ NS_IMETHOD GetElements(nsIDOMHTMLCollection** aElements) { return _to##GetElements(aElements); } \ + NS_IMETHOD GetLength(PRUint32* aLength) { return _to##GetLength(aLength); } \ NS_IMETHOD GetName(nsString& aName) { return _to##GetName(aName); } \ + NS_IMETHOD SetName(const nsString& aName) { return _to##SetName(aName); } \ NS_IMETHOD GetAcceptCharset(nsString& aAcceptCharset) { return _to##GetAcceptCharset(aAcceptCharset); } \ NS_IMETHOD SetAcceptCharset(const nsString& aAcceptCharset) { return _to##SetAcceptCharset(aAcceptCharset); } \ NS_IMETHOD GetAction(nsString& aAction) { return _to##GetAction(aAction); } \ @@ -90,8 +97,8 @@ public: NS_IMETHOD SetMethod(const nsString& aMethod) { return _to##SetMethod(aMethod); } \ NS_IMETHOD GetTarget(nsString& aTarget) { return _to##GetTarget(aTarget); } \ NS_IMETHOD SetTarget(const nsString& aTarget) { return _to##SetTarget(aTarget); } \ - NS_IMETHOD Reset() { return _to##Reset(); } \ NS_IMETHOD Submit() { return _to##Submit(); } \ + NS_IMETHOD Reset() { return _to##Reset(); } \ extern nsresult NS_InitHTMLFormElementClass(nsIScriptContext *aContext, void **aPrototype); diff --git a/mozilla/dom/public/html/nsIDOMHTMLFrameElement.h b/mozilla/dom/public/html/nsIDOMHTMLFrameElement.h index 357ca7b90b3..da66070bbd0 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLFrameElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLFrameElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLFRAMEELEMENT_IID \ -{ 0x6f765303, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90b9, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLFrameElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLFrameSetElement.h b/mozilla/dom/public/html/nsIDOMHTMLFrameSetElement.h index cc64a071619..edd556da0fa 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLFrameSetElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLFrameSetElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLFRAMESETELEMENT_IID \ -{ 0x6f765304, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90b8, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLFrameSetElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLHRElement.h b/mozilla/dom/public/html/nsIDOMHTMLHRElement.h index 1c4e1c4f7c9..2d1b81f97b5 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLHRElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLHRElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLHRELEMENT_IID \ -{ 0x6f765307, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90a8, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLHRElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLHeadElement.h b/mozilla/dom/public/html/nsIDOMHTMLHeadElement.h index ed04f14d1f6..743da108bcf 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLHeadElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLHeadElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLHEADELEMENT_IID \ -{ 0x6f765305, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9087, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLHeadElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLHeadingElement.h b/mozilla/dom/public/html/nsIDOMHTMLHeadingElement.h index 51d46b0ca7e..6a8d8c6e85f 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLHeadingElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLHeadingElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLHEADINGELEMENT_IID \ -{ 0x6f765306, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90a2, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLHeadingElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLHtmlElement.h b/mozilla/dom/public/html/nsIDOMHTMLHtmlElement.h index 0bcb3700808..312a51483e0 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLHtmlElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLHtmlElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLHTMLELEMENT_IID \ -{ 0x6f765308, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9086, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLHtmlElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLIFrameElement.h b/mozilla/dom/public/html/nsIDOMHTMLIFrameElement.h index 0b27bd13198..f879fc7d89c 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLIFrameElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLIFrameElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLIFRAMEELEMENT_IID \ -{ 0x6f765309, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90ba, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLIFrameElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLImageElement.h b/mozilla/dom/public/html/nsIDOMHTMLImageElement.h index e77bb45f057..027149a6275 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLImageElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLImageElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLIMAGEELEMENT_IID \ -{ 0x6f76530a, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90ab, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLImageElement : public nsIDOMHTMLElement { public: @@ -134,8 +134,8 @@ public: #define NS_IDOMHTMLIMAGEELEMENTFACTORY_IID \ -{ 0x6f76530b, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90c8, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLImageElementFactory : public nsISupports { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLInputElement.h b/mozilla/dom/public/html/nsIDOMHTMLInputElement.h index 5007f12fd83..d9f07b7f8cd 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLInputElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLInputElement.h @@ -28,8 +28,8 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLINPUTELEMENT_IID \ -{ 0x6f76530c, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9093, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLInputElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLIsIndexElement.h b/mozilla/dom/public/html/nsIDOMHTMLIsIndexElement.h index 5bc764a4c8f..5f2226bf338 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLIsIndexElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLIsIndexElement.h @@ -28,14 +28,13 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLISINDEXELEMENT_IID \ -{ 0x6f76530e, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf908c, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLIsIndexElement : public nsIDOMHTMLElement { public: NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm)=0; - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm)=0; NS_IMETHOD GetPrompt(nsString& aPrompt)=0; NS_IMETHOD SetPrompt(const nsString& aPrompt)=0; @@ -44,7 +43,6 @@ public: #define NS_DECL_IDOMHTMLISINDEXELEMENT \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); \ NS_IMETHOD GetPrompt(nsString& aPrompt); \ NS_IMETHOD SetPrompt(const nsString& aPrompt); \ @@ -52,7 +50,6 @@ public: #define NS_FORWARD_IDOMHTMLISINDEXELEMENT(_to) \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm) { return _to##GetForm(aForm); } \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm) { return _to##SetForm(aForm); } \ NS_IMETHOD GetPrompt(nsString& aPrompt) { return _to##GetPrompt(aPrompt); } \ NS_IMETHOD SetPrompt(const nsString& aPrompt) { return _to##SetPrompt(aPrompt); } \ diff --git a/mozilla/dom/public/html/nsIDOMHTMLLIElement.h b/mozilla/dom/public/html/nsIDOMHTMLLIElement.h index a7072ce6e88..f91001a1b9a 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLLIElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLLIElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLLIELEMENT_IID \ -{ 0x6f765311, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf909e, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLLIElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLLabelElement.h b/mozilla/dom/public/html/nsIDOMHTMLLabelElement.h index 3a7abe24605..57d1c8ccefd 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLLabelElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLLabelElement.h @@ -28,14 +28,13 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLLABELELEMENT_IID \ -{ 0x6f76530f, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9096, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLLabelElement : public nsIDOMHTMLElement { public: NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm)=0; - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm)=0; NS_IMETHOD GetAccessKey(nsString& aAccessKey)=0; NS_IMETHOD SetAccessKey(const nsString& aAccessKey)=0; @@ -47,7 +46,6 @@ public: #define NS_DECL_IDOMHTMLLABELELEMENT \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); \ NS_IMETHOD GetAccessKey(nsString& aAccessKey); \ NS_IMETHOD SetAccessKey(const nsString& aAccessKey); \ NS_IMETHOD GetHtmlFor(nsString& aHtmlFor); \ @@ -57,7 +55,6 @@ public: #define NS_FORWARD_IDOMHTMLLABELELEMENT(_to) \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm) { return _to##GetForm(aForm); } \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm) { return _to##SetForm(aForm); } \ NS_IMETHOD GetAccessKey(nsString& aAccessKey) { return _to##GetAccessKey(aAccessKey); } \ NS_IMETHOD SetAccessKey(const nsString& aAccessKey) { return _to##SetAccessKey(aAccessKey); } \ NS_IMETHOD GetHtmlFor(nsString& aHtmlFor) { return _to##GetHtmlFor(aHtmlFor); } \ diff --git a/mozilla/dom/public/html/nsIDOMHTMLLegendElement.h b/mozilla/dom/public/html/nsIDOMHTMLLegendElement.h index e04e98f1044..c366717bc97 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLLegendElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLLegendElement.h @@ -28,14 +28,13 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLLEGENDELEMENT_IID \ -{ 0x6f765310, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9098, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLLegendElement : public nsIDOMHTMLElement { public: NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm)=0; - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm)=0; NS_IMETHOD GetAccessKey(nsString& aAccessKey)=0; NS_IMETHOD SetAccessKey(const nsString& aAccessKey)=0; @@ -47,7 +46,6 @@ public: #define NS_DECL_IDOMHTMLLEGENDELEMENT \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); \ NS_IMETHOD GetAccessKey(nsString& aAccessKey); \ NS_IMETHOD SetAccessKey(const nsString& aAccessKey); \ NS_IMETHOD GetAlign(nsString& aAlign); \ @@ -57,7 +55,6 @@ public: #define NS_FORWARD_IDOMHTMLLEGENDELEMENT(_to) \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm) { return _to##GetForm(aForm); } \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm) { return _to##SetForm(aForm); } \ NS_IMETHOD GetAccessKey(nsString& aAccessKey) { return _to##GetAccessKey(aAccessKey); } \ NS_IMETHOD SetAccessKey(const nsString& aAccessKey) { return _to##SetAccessKey(aAccessKey); } \ NS_IMETHOD GetAlign(nsString& aAlign) { return _to##GetAlign(aAlign); } \ diff --git a/mozilla/dom/public/html/nsIDOMHTMLLinkElement.h b/mozilla/dom/public/html/nsIDOMHTMLLinkElement.h index 9437b12c2f0..03e3bd580f5 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLLinkElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLLinkElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLLINKELEMENT_IID \ -{ 0x6f765312, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9088, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLLinkElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLMapElement.h b/mozilla/dom/public/html/nsIDOMHTMLMapElement.h index 1cf38654aee..6c5cd0136a1 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLMapElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLMapElement.h @@ -28,14 +28,13 @@ class nsIDOMHTMLCollection; #define NS_IDOMHTMLMAPELEMENT_IID \ -{ 0x6f765313, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90af, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLMapElement : public nsIDOMHTMLElement { public: NS_IMETHOD GetAreas(nsIDOMHTMLCollection** aAreas)=0; - NS_IMETHOD SetAreas(nsIDOMHTMLCollection* aAreas)=0; NS_IMETHOD GetName(nsString& aName)=0; NS_IMETHOD SetName(const nsString& aName)=0; @@ -44,7 +43,6 @@ public: #define NS_DECL_IDOMHTMLMAPELEMENT \ NS_IMETHOD GetAreas(nsIDOMHTMLCollection** aAreas); \ - NS_IMETHOD SetAreas(nsIDOMHTMLCollection* aAreas); \ NS_IMETHOD GetName(nsString& aName); \ NS_IMETHOD SetName(const nsString& aName); \ @@ -52,7 +50,6 @@ public: #define NS_FORWARD_IDOMHTMLMAPELEMENT(_to) \ NS_IMETHOD GetAreas(nsIDOMHTMLCollection** aAreas) { return _to##GetAreas(aAreas); } \ - NS_IMETHOD SetAreas(nsIDOMHTMLCollection* aAreas) { return _to##SetAreas(aAreas); } \ NS_IMETHOD GetName(nsString& aName) { return _to##GetName(aName); } \ NS_IMETHOD SetName(const nsString& aName) { return _to##SetName(aName); } \ diff --git a/mozilla/dom/public/html/nsIDOMHTMLMenuElement.h b/mozilla/dom/public/html/nsIDOMHTMLMenuElement.h index f9f22a00ee8..8fd0963c66a 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLMenuElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLMenuElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLMENUELEMENT_IID \ -{ 0x6f765314, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf909d, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLMenuElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLMetaElement.h b/mozilla/dom/public/html/nsIDOMHTMLMetaElement.h index 7a425e13135..78e205be0a9 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLMetaElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLMetaElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLMETAELEMENT_IID \ -{ 0x6f765315, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf908a, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLMetaElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLModElement.h b/mozilla/dom/public/html/nsIDOMHTMLModElement.h index 010d6688c3a..0ed8dc81785 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLModElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLModElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLMODELEMENT_IID \ -{ 0x6f765316, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90a9, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLModElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLOListElement.h b/mozilla/dom/public/html/nsIDOMHTMLOListElement.h index e67b9609292..90b61d57780 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLOListElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLOListElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLOLISTELEMENT_IID \ -{ 0x6f765318, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf909a, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLOListElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLObjectElement.h b/mozilla/dom/public/html/nsIDOMHTMLObjectElement.h index 52e85392b1a..e30f212facc 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLObjectElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLObjectElement.h @@ -28,14 +28,13 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLOBJECTELEMENT_IID \ -{ 0x6f765317, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90ac, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLObjectElement : public nsIDOMHTMLElement { public: NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm)=0; - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm)=0; NS_IMETHOD GetCode(nsString& aCode)=0; NS_IMETHOD SetCode(const nsString& aCode)=0; @@ -92,7 +91,6 @@ public: #define NS_DECL_IDOMHTMLOBJECTELEMENT \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); \ NS_IMETHOD GetCode(nsString& aCode); \ NS_IMETHOD SetCode(const nsString& aCode); \ NS_IMETHOD GetAlign(nsString& aAlign); \ @@ -132,7 +130,6 @@ public: #define NS_FORWARD_IDOMHTMLOBJECTELEMENT(_to) \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm) { return _to##GetForm(aForm); } \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm) { return _to##SetForm(aForm); } \ NS_IMETHOD GetCode(nsString& aCode) { return _to##GetCode(aCode); } \ NS_IMETHOD SetCode(const nsString& aCode) { return _to##SetCode(aCode); } \ NS_IMETHOD GetAlign(nsString& aAlign) { return _to##GetAlign(aAlign); } \ diff --git a/mozilla/dom/public/html/nsIDOMHTMLOptGroupElement.h b/mozilla/dom/public/html/nsIDOMHTMLOptGroupElement.h index 3cff39c0be6..95f22831c1f 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLOptGroupElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLOptGroupElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLOPTGROUPELEMENT_IID \ -{ 0x6f765319, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9091, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLOptGroupElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLOptionElement.h b/mozilla/dom/public/html/nsIDOMHTMLOptionElement.h index 027085e8774..8c3d20256b1 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLOptionElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLOptionElement.h @@ -28,20 +28,18 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLOPTIONELEMENT_IID \ -{ 0x6f76531a, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9092, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLOptionElement : public nsIDOMHTMLElement { public: NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm)=0; - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm)=0; NS_IMETHOD GetDefaultSelected(PRBool* aDefaultSelected)=0; NS_IMETHOD SetDefaultSelected(PRBool aDefaultSelected)=0; NS_IMETHOD GetText(nsString& aText)=0; - NS_IMETHOD SetText(const nsString& aText)=0; NS_IMETHOD GetIndex(PRInt32* aIndex)=0; NS_IMETHOD SetIndex(PRInt32 aIndex)=0; @@ -53,7 +51,6 @@ public: NS_IMETHOD SetLabel(const nsString& aLabel)=0; NS_IMETHOD GetSelected(PRBool* aSelected)=0; - NS_IMETHOD SetSelected(PRBool aSelected)=0; NS_IMETHOD GetValue(nsString& aValue)=0; NS_IMETHOD SetValue(const nsString& aValue)=0; @@ -62,11 +59,9 @@ public: #define NS_DECL_IDOMHTMLOPTIONELEMENT \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); \ NS_IMETHOD GetDefaultSelected(PRBool* aDefaultSelected); \ NS_IMETHOD SetDefaultSelected(PRBool aDefaultSelected); \ NS_IMETHOD GetText(nsString& aText); \ - NS_IMETHOD SetText(const nsString& aText); \ NS_IMETHOD GetIndex(PRInt32* aIndex); \ NS_IMETHOD SetIndex(PRInt32 aIndex); \ NS_IMETHOD GetDisabled(PRBool* aDisabled); \ @@ -74,7 +69,6 @@ public: NS_IMETHOD GetLabel(nsString& aLabel); \ NS_IMETHOD SetLabel(const nsString& aLabel); \ NS_IMETHOD GetSelected(PRBool* aSelected); \ - NS_IMETHOD SetSelected(PRBool aSelected); \ NS_IMETHOD GetValue(nsString& aValue); \ NS_IMETHOD SetValue(const nsString& aValue); \ @@ -82,11 +76,9 @@ public: #define NS_FORWARD_IDOMHTMLOPTIONELEMENT(_to) \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm) { return _to##GetForm(aForm); } \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm) { return _to##SetForm(aForm); } \ NS_IMETHOD GetDefaultSelected(PRBool* aDefaultSelected) { return _to##GetDefaultSelected(aDefaultSelected); } \ NS_IMETHOD SetDefaultSelected(PRBool aDefaultSelected) { return _to##SetDefaultSelected(aDefaultSelected); } \ NS_IMETHOD GetText(nsString& aText) { return _to##GetText(aText); } \ - NS_IMETHOD SetText(const nsString& aText) { return _to##SetText(aText); } \ NS_IMETHOD GetIndex(PRInt32* aIndex) { return _to##GetIndex(aIndex); } \ NS_IMETHOD SetIndex(PRInt32 aIndex) { return _to##SetIndex(aIndex); } \ NS_IMETHOD GetDisabled(PRBool* aDisabled) { return _to##GetDisabled(aDisabled); } \ @@ -94,7 +86,6 @@ public: NS_IMETHOD GetLabel(nsString& aLabel) { return _to##GetLabel(aLabel); } \ NS_IMETHOD SetLabel(const nsString& aLabel) { return _to##SetLabel(aLabel); } \ NS_IMETHOD GetSelected(PRBool* aSelected) { return _to##GetSelected(aSelected); } \ - NS_IMETHOD SetSelected(PRBool aSelected) { return _to##SetSelected(aSelected); } \ NS_IMETHOD GetValue(nsString& aValue) { return _to##GetValue(aValue); } \ NS_IMETHOD SetValue(const nsString& aValue) { return _to##SetValue(aValue); } \ diff --git a/mozilla/dom/public/html/nsIDOMHTMLParagraphElement.h b/mozilla/dom/public/html/nsIDOMHTMLParagraphElement.h index e5e2b75c0e8..5a3356e1fbd 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLParagraphElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLParagraphElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLPARAGRAPHELEMENT_IID \ -{ 0x6f76531b, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90a1, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLParagraphElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLParamElement.h b/mozilla/dom/public/html/nsIDOMHTMLParamElement.h index 18de9d168b9..1b420d9c836 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLParamElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLParamElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLPARAMELEMENT_IID \ -{ 0x6f76531c, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90ad, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLParamElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLPreElement.h b/mozilla/dom/public/html/nsIDOMHTMLPreElement.h index e9833bd9ad6..bcc0170de36 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLPreElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLPreElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLPREELEMENT_IID \ -{ 0x6f76531d, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90a4, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLPreElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLQuoteElement.h b/mozilla/dom/public/html/nsIDOMHTMLQuoteElement.h index f9dcf414315..8f8880c06ea 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLQuoteElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLQuoteElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLQUOTEELEMENT_IID \ -{ 0x6f76531e, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90a3, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLQuoteElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLScriptElement.h b/mozilla/dom/public/html/nsIDOMHTMLScriptElement.h index e770ed8236c..97ee11a34e5 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLScriptElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLScriptElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLSCRIPTELEMENT_IID \ -{ 0x6f76531f, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90b1, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLScriptElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLSelectElement.h b/mozilla/dom/public/html/nsIDOMHTMLSelectElement.h index 34a35a32c42..de4b6eb6ae2 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLSelectElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLSelectElement.h @@ -30,14 +30,13 @@ class nsIDOMHTMLFormElement; class nsIDOMHTMLCollection; #define NS_IDOMHTMLSELECTELEMENT_IID \ -{ 0x6f765320, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9090, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLSelectElement : public nsIDOMHTMLElement { public: NS_IMETHOD GetType(nsString& aType)=0; - NS_IMETHOD SetType(const nsString& aType)=0; NS_IMETHOD GetSelectedIndex(PRInt32* aSelectedIndex)=0; NS_IMETHOD SetSelectedIndex(PRInt32 aSelectedIndex)=0; @@ -45,14 +44,11 @@ public: NS_IMETHOD GetValue(nsString& aValue)=0; NS_IMETHOD SetValue(const nsString& aValue)=0; - NS_IMETHOD GetLength(PRInt32* aLength)=0; - NS_IMETHOD SetLength(PRInt32 aLength)=0; + NS_IMETHOD GetLength(PRUint32* aLength)=0; NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm)=0; - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm)=0; NS_IMETHOD GetOptions(nsIDOMHTMLCollection** aOptions)=0; - NS_IMETHOD SetOptions(nsIDOMHTMLCollection* aOptions)=0; NS_IMETHOD GetDisabled(PRBool* aDisabled)=0; NS_IMETHOD SetDisabled(PRBool aDisabled)=0; @@ -81,17 +77,13 @@ public: #define NS_DECL_IDOMHTMLSELECTELEMENT \ NS_IMETHOD GetType(nsString& aType); \ - NS_IMETHOD SetType(const nsString& aType); \ NS_IMETHOD GetSelectedIndex(PRInt32* aSelectedIndex); \ NS_IMETHOD SetSelectedIndex(PRInt32 aSelectedIndex); \ NS_IMETHOD GetValue(nsString& aValue); \ NS_IMETHOD SetValue(const nsString& aValue); \ - NS_IMETHOD GetLength(PRInt32* aLength); \ - NS_IMETHOD SetLength(PRInt32 aLength); \ + NS_IMETHOD GetLength(PRUint32* aLength); \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); \ NS_IMETHOD GetOptions(nsIDOMHTMLCollection** aOptions); \ - NS_IMETHOD SetOptions(nsIDOMHTMLCollection* aOptions); \ NS_IMETHOD GetDisabled(PRBool* aDisabled); \ NS_IMETHOD SetDisabled(PRBool aDisabled); \ NS_IMETHOD GetMultiple(PRBool* aMultiple); \ @@ -111,17 +103,13 @@ public: #define NS_FORWARD_IDOMHTMLSELECTELEMENT(_to) \ NS_IMETHOD GetType(nsString& aType) { return _to##GetType(aType); } \ - NS_IMETHOD SetType(const nsString& aType) { return _to##SetType(aType); } \ NS_IMETHOD GetSelectedIndex(PRInt32* aSelectedIndex) { return _to##GetSelectedIndex(aSelectedIndex); } \ NS_IMETHOD SetSelectedIndex(PRInt32 aSelectedIndex) { return _to##SetSelectedIndex(aSelectedIndex); } \ NS_IMETHOD GetValue(nsString& aValue) { return _to##GetValue(aValue); } \ NS_IMETHOD SetValue(const nsString& aValue) { return _to##SetValue(aValue); } \ - NS_IMETHOD GetLength(PRInt32* aLength) { return _to##GetLength(aLength); } \ - NS_IMETHOD SetLength(PRInt32 aLength) { return _to##SetLength(aLength); } \ + NS_IMETHOD GetLength(PRUint32* aLength) { return _to##GetLength(aLength); } \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm) { return _to##GetForm(aForm); } \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm) { return _to##SetForm(aForm); } \ NS_IMETHOD GetOptions(nsIDOMHTMLCollection** aOptions) { return _to##GetOptions(aOptions); } \ - NS_IMETHOD SetOptions(nsIDOMHTMLCollection* aOptions) { return _to##SetOptions(aOptions); } \ NS_IMETHOD GetDisabled(PRBool* aDisabled) { return _to##GetDisabled(aDisabled); } \ NS_IMETHOD SetDisabled(PRBool aDisabled) { return _to##SetDisabled(aDisabled); } \ NS_IMETHOD GetMultiple(PRBool* aMultiple) { return _to##GetMultiple(aMultiple); } \ diff --git a/mozilla/dom/public/html/nsIDOMHTMLStyleElement.h b/mozilla/dom/public/html/nsIDOMHTMLStyleElement.h index 5fea3674ae5..6ea73960b62 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLStyleElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLStyleElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLSTYLEELEMENT_IID \ -{ 0x6f765321, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf908d, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLStyleElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLTableCaptionElement.h b/mozilla/dom/public/html/nsIDOMHTMLTableCaptionElement.h index 2b6b2563483..ab4a6bb9827 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTableCaptionElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTableCaptionElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLTABLECAPTIONELEMENT_IID \ -{ 0x6f765322, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90b3, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLTableCaptionElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLTableCellElement.h b/mozilla/dom/public/html/nsIDOMHTMLTableCellElement.h index e2f55e596b4..a030b220dba 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTableCellElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTableCellElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLTABLECELLELEMENT_IID \ -{ 0x6f765323, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90b7, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLTableCellElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLTableColElement.h b/mozilla/dom/public/html/nsIDOMHTMLTableColElement.h index df90f6f3630..7931649de43 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTableColElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTableColElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLTABLECOLELEMENT_IID \ -{ 0x6f765324, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90b4, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLTableColElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLTableElement.h b/mozilla/dom/public/html/nsIDOMHTMLTableElement.h index 32972b09a47..84dc9dc98dc 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTableElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTableElement.h @@ -31,8 +31,8 @@ class nsIDOMHTMLTableSectionElement; class nsIDOMHTMLCollection; #define NS_IDOMHTMLTABLEELEMENT_IID \ -{ 0x6f765325, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90b2, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLTableElement : public nsIDOMHTMLElement { public: @@ -47,10 +47,8 @@ public: NS_IMETHOD SetTFoot(nsIDOMHTMLTableSectionElement* aTFoot)=0; NS_IMETHOD GetRows(nsIDOMHTMLCollection** aRows)=0; - NS_IMETHOD SetRows(nsIDOMHTMLCollection* aRows)=0; NS_IMETHOD GetTBodies(nsIDOMHTMLCollection** aTBodies)=0; - NS_IMETHOD SetTBodies(nsIDOMHTMLCollection* aTBodies)=0; NS_IMETHOD GetAlign(nsString& aAlign)=0; NS_IMETHOD SetAlign(const nsString& aAlign)=0; @@ -105,9 +103,7 @@ public: NS_IMETHOD GetTFoot(nsIDOMHTMLTableSectionElement** aTFoot); \ NS_IMETHOD SetTFoot(nsIDOMHTMLTableSectionElement* aTFoot); \ NS_IMETHOD GetRows(nsIDOMHTMLCollection** aRows); \ - NS_IMETHOD SetRows(nsIDOMHTMLCollection* aRows); \ NS_IMETHOD GetTBodies(nsIDOMHTMLCollection** aTBodies); \ - NS_IMETHOD SetTBodies(nsIDOMHTMLCollection* aTBodies); \ NS_IMETHOD GetAlign(nsString& aAlign); \ NS_IMETHOD SetAlign(const nsString& aAlign); \ NS_IMETHOD GetBgColor(nsString& aBgColor); \ @@ -145,9 +141,7 @@ public: NS_IMETHOD GetTFoot(nsIDOMHTMLTableSectionElement** aTFoot) { return _to##GetTFoot(aTFoot); } \ NS_IMETHOD SetTFoot(nsIDOMHTMLTableSectionElement* aTFoot) { return _to##SetTFoot(aTFoot); } \ NS_IMETHOD GetRows(nsIDOMHTMLCollection** aRows) { return _to##GetRows(aRows); } \ - NS_IMETHOD SetRows(nsIDOMHTMLCollection* aRows) { return _to##SetRows(aRows); } \ NS_IMETHOD GetTBodies(nsIDOMHTMLCollection** aTBodies) { return _to##GetTBodies(aTBodies); } \ - NS_IMETHOD SetTBodies(nsIDOMHTMLCollection* aTBodies) { return _to##SetTBodies(aTBodies); } \ NS_IMETHOD GetAlign(nsString& aAlign) { return _to##GetAlign(aAlign); } \ NS_IMETHOD SetAlign(const nsString& aAlign) { return _to##SetAlign(aAlign); } \ NS_IMETHOD GetBgColor(nsString& aBgColor) { return _to##GetBgColor(aBgColor); } \ diff --git a/mozilla/dom/public/html/nsIDOMHTMLTableRowElement.h b/mozilla/dom/public/html/nsIDOMHTMLTableRowElement.h index 11e024b2740..bfc3dadbd9a 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTableRowElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTableRowElement.h @@ -29,8 +29,8 @@ class nsIDOMHTMLElement; class nsIDOMHTMLCollection; #define NS_IDOMHTMLTABLEROWELEMENT_IID \ -{ 0x6f765326, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90b6, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLTableRowElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLTableSectionElement.h b/mozilla/dom/public/html/nsIDOMHTMLTableSectionElement.h index 17f24113a3f..e980993602d 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTableSectionElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTableSectionElement.h @@ -29,8 +29,8 @@ class nsIDOMHTMLElement; class nsIDOMHTMLCollection; #define NS_IDOMHTMLTABLESECTIONELEMENT_IID \ -{ 0x6f765327, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90b5, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLTableSectionElement : public nsIDOMHTMLElement { public: @@ -38,11 +38,16 @@ public: NS_IMETHOD GetAlign(nsString& aAlign)=0; NS_IMETHOD SetAlign(const nsString& aAlign)=0; + NS_IMETHOD GetCh(nsString& aCh)=0; + NS_IMETHOD SetCh(const nsString& aCh)=0; + + NS_IMETHOD GetChOff(nsString& aChOff)=0; + NS_IMETHOD SetChOff(const nsString& aChOff)=0; + NS_IMETHOD GetVAlign(nsString& aVAlign)=0; NS_IMETHOD SetVAlign(const nsString& aVAlign)=0; NS_IMETHOD GetRows(nsIDOMHTMLCollection** aRows)=0; - NS_IMETHOD SetRows(nsIDOMHTMLCollection* aRows)=0; NS_IMETHOD InsertRow(PRInt32 aIndex, nsIDOMHTMLElement** aReturn)=0; @@ -53,10 +58,13 @@ public: #define NS_DECL_IDOMHTMLTABLESECTIONELEMENT \ NS_IMETHOD GetAlign(nsString& aAlign); \ NS_IMETHOD SetAlign(const nsString& aAlign); \ + NS_IMETHOD GetCh(nsString& aCh); \ + NS_IMETHOD SetCh(const nsString& aCh); \ + NS_IMETHOD GetChOff(nsString& aChOff); \ + NS_IMETHOD SetChOff(const nsString& aChOff); \ NS_IMETHOD GetVAlign(nsString& aVAlign); \ NS_IMETHOD SetVAlign(const nsString& aVAlign); \ NS_IMETHOD GetRows(nsIDOMHTMLCollection** aRows); \ - NS_IMETHOD SetRows(nsIDOMHTMLCollection* aRows); \ NS_IMETHOD InsertRow(PRInt32 aIndex, nsIDOMHTMLElement** aReturn); \ NS_IMETHOD DeleteRow(PRInt32 aIndex); \ @@ -65,10 +73,13 @@ public: #define NS_FORWARD_IDOMHTMLTABLESECTIONELEMENT(_to) \ NS_IMETHOD GetAlign(nsString& aAlign) { return _to##GetAlign(aAlign); } \ NS_IMETHOD SetAlign(const nsString& aAlign) { return _to##SetAlign(aAlign); } \ + NS_IMETHOD GetCh(nsString& aCh) { return _to##GetCh(aCh); } \ + NS_IMETHOD SetCh(const nsString& aCh) { return _to##SetCh(aCh); } \ + NS_IMETHOD GetChOff(nsString& aChOff) { return _to##GetChOff(aChOff); } \ + NS_IMETHOD SetChOff(const nsString& aChOff) { return _to##SetChOff(aChOff); } \ NS_IMETHOD GetVAlign(nsString& aVAlign) { return _to##GetVAlign(aVAlign); } \ NS_IMETHOD SetVAlign(const nsString& aVAlign) { return _to##SetVAlign(aVAlign); } \ NS_IMETHOD GetRows(nsIDOMHTMLCollection** aRows) { return _to##GetRows(aRows); } \ - NS_IMETHOD SetRows(nsIDOMHTMLCollection* aRows) { return _to##SetRows(aRows); } \ NS_IMETHOD InsertRow(PRInt32 aIndex, nsIDOMHTMLElement** aReturn) { return _to##InsertRow(aIndex, aReturn); } \ NS_IMETHOD DeleteRow(PRInt32 aIndex) { return _to##DeleteRow(aIndex); } \ diff --git a/mozilla/dom/public/html/nsIDOMHTMLTbodyElement.h b/mozilla/dom/public/html/nsIDOMHTMLTbodyElement.h deleted file mode 100644 index f28455a90cf..00000000000 --- a/mozilla/dom/public/html/nsIDOMHTMLTbodyElement.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- 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 nsIDOMHTMLTbodyElement_h__ -#define nsIDOMHTMLTbodyElement_h__ - -#include "nsISupports.h" -#include "nsString.h" -#include "nsIScriptContext.h" -#include "nsIDOMHTMLElement.h" - - -#define NS_IDOMHTMLTBODYELEMENT_IID \ -{ 0x6f765328, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } - -class nsIDOMHTMLTbodyElement : public nsIDOMHTMLElement { -public: - - NS_IMETHOD GetAlign(nsString& aAlign)=0; - NS_IMETHOD SetAlign(const nsString& aAlign)=0; - - NS_IMETHOD GetCh(nsString& aCh)=0; - NS_IMETHOD SetCh(const nsString& aCh)=0; - - NS_IMETHOD GetChOff(nsString& aChOff)=0; - NS_IMETHOD SetChOff(const nsString& aChOff)=0; - - NS_IMETHOD GetVAlign(nsString& aVAlign)=0; - NS_IMETHOD SetVAlign(const nsString& aVAlign)=0; -}; - - -#define NS_DECL_IDOMHTMLTBODYELEMENT \ - NS_IMETHOD GetAlign(nsString& aAlign); \ - NS_IMETHOD SetAlign(const nsString& aAlign); \ - NS_IMETHOD GetCh(nsString& aCh); \ - NS_IMETHOD SetCh(const nsString& aCh); \ - NS_IMETHOD GetChOff(nsString& aChOff); \ - NS_IMETHOD SetChOff(const nsString& aChOff); \ - NS_IMETHOD GetVAlign(nsString& aVAlign); \ - NS_IMETHOD SetVAlign(const nsString& aVAlign); \ - - - -#define NS_FORWARD_IDOMHTMLTBODYELEMENT(_to) \ - NS_IMETHOD GetAlign(nsString& aAlign) { return _to##GetAlign(aAlign); } \ - NS_IMETHOD SetAlign(const nsString& aAlign) { return _to##SetAlign(aAlign); } \ - NS_IMETHOD GetCh(nsString& aCh) { return _to##GetCh(aCh); } \ - NS_IMETHOD SetCh(const nsString& aCh) { return _to##SetCh(aCh); } \ - NS_IMETHOD GetChOff(nsString& aChOff) { return _to##GetChOff(aChOff); } \ - NS_IMETHOD SetChOff(const nsString& aChOff) { return _to##SetChOff(aChOff); } \ - NS_IMETHOD GetVAlign(nsString& aVAlign) { return _to##GetVAlign(aVAlign); } \ - NS_IMETHOD SetVAlign(const nsString& aVAlign) { return _to##SetVAlign(aVAlign); } \ - - -extern nsresult NS_InitHTMLTbodyElementClass(nsIScriptContext *aContext, void **aPrototype); - -extern "C" NS_DOM nsresult NS_NewScriptHTMLTbodyElement(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); - -#endif // nsIDOMHTMLTbodyElement_h__ diff --git a/mozilla/dom/public/html/nsIDOMHTMLTextAreaElement.h b/mozilla/dom/public/html/nsIDOMHTMLTextAreaElement.h index ba9182bc8db..710e98dfdcf 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTextAreaElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTextAreaElement.h @@ -28,8 +28,8 @@ class nsIDOMHTMLFormElement; #define NS_IDOMHTMLTEXTAREAELEMENT_IID \ -{ 0x6f765329, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9094, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLTextAreaElement : public nsIDOMHTMLElement { public: @@ -38,7 +38,6 @@ public: NS_IMETHOD SetDefaultValue(const nsString& aDefaultValue)=0; NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm)=0; - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm)=0; NS_IMETHOD GetAccessKey(nsString& aAccessKey)=0; NS_IMETHOD SetAccessKey(const nsString& aAccessKey)=0; @@ -61,6 +60,11 @@ public: NS_IMETHOD GetTabIndex(PRInt32* aTabIndex)=0; NS_IMETHOD SetTabIndex(PRInt32 aTabIndex)=0; + NS_IMETHOD GetType(nsString& aType)=0; + + NS_IMETHOD GetValue(nsString& aValue)=0; + NS_IMETHOD SetValue(const nsString& aValue)=0; + NS_IMETHOD Blur()=0; NS_IMETHOD Focus()=0; @@ -73,7 +77,6 @@ public: NS_IMETHOD GetDefaultValue(nsString& aDefaultValue); \ NS_IMETHOD SetDefaultValue(const nsString& aDefaultValue); \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); \ NS_IMETHOD GetAccessKey(nsString& aAccessKey); \ NS_IMETHOD SetAccessKey(const nsString& aAccessKey); \ NS_IMETHOD GetCols(PRInt32* aCols); \ @@ -88,6 +91,9 @@ public: NS_IMETHOD SetRows(PRInt32 aRows); \ NS_IMETHOD GetTabIndex(PRInt32* aTabIndex); \ NS_IMETHOD SetTabIndex(PRInt32 aTabIndex); \ + NS_IMETHOD GetType(nsString& aType); \ + NS_IMETHOD GetValue(nsString& aValue); \ + NS_IMETHOD SetValue(const nsString& aValue); \ NS_IMETHOD Blur(); \ NS_IMETHOD Focus(); \ NS_IMETHOD Select(); \ @@ -98,7 +104,6 @@ public: NS_IMETHOD GetDefaultValue(nsString& aDefaultValue) { return _to##GetDefaultValue(aDefaultValue); } \ NS_IMETHOD SetDefaultValue(const nsString& aDefaultValue) { return _to##SetDefaultValue(aDefaultValue); } \ NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm) { return _to##GetForm(aForm); } \ - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm) { return _to##SetForm(aForm); } \ NS_IMETHOD GetAccessKey(nsString& aAccessKey) { return _to##GetAccessKey(aAccessKey); } \ NS_IMETHOD SetAccessKey(const nsString& aAccessKey) { return _to##SetAccessKey(aAccessKey); } \ NS_IMETHOD GetCols(PRInt32* aCols) { return _to##GetCols(aCols); } \ @@ -113,6 +118,9 @@ public: NS_IMETHOD SetRows(PRInt32 aRows) { return _to##SetRows(aRows); } \ NS_IMETHOD GetTabIndex(PRInt32* aTabIndex) { return _to##GetTabIndex(aTabIndex); } \ NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) { return _to##SetTabIndex(aTabIndex); } \ + NS_IMETHOD GetType(nsString& aType) { return _to##GetType(aType); } \ + NS_IMETHOD GetValue(nsString& aValue) { return _to##GetValue(aValue); } \ + NS_IMETHOD SetValue(const nsString& aValue) { return _to##SetValue(aValue); } \ NS_IMETHOD Blur() { return _to##Blur(); } \ NS_IMETHOD Focus() { return _to##Focus(); } \ NS_IMETHOD Select() { return _to##Select(); } \ diff --git a/mozilla/dom/public/html/nsIDOMHTMLTfootElement.h b/mozilla/dom/public/html/nsIDOMHTMLTfootElement.h deleted file mode 100644 index 430639191bc..00000000000 --- a/mozilla/dom/public/html/nsIDOMHTMLTfootElement.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- 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 nsIDOMHTMLTfootElement_h__ -#define nsIDOMHTMLTfootElement_h__ - -#include "nsISupports.h" -#include "nsString.h" -#include "nsIScriptContext.h" -#include "nsIDOMHTMLElement.h" - - -#define NS_IDOMHTMLTFOOTELEMENT_IID \ -{ 0x6f76532a, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } - -class nsIDOMHTMLTfootElement : public nsIDOMHTMLElement { -public: - - NS_IMETHOD GetAlign(nsString& aAlign)=0; - NS_IMETHOD SetAlign(const nsString& aAlign)=0; - - NS_IMETHOD GetCh(nsString& aCh)=0; - NS_IMETHOD SetCh(const nsString& aCh)=0; - - NS_IMETHOD GetChOff(nsString& aChOff)=0; - NS_IMETHOD SetChOff(const nsString& aChOff)=0; - - NS_IMETHOD GetVAlign(nsString& aVAlign)=0; - NS_IMETHOD SetVAlign(const nsString& aVAlign)=0; -}; - - -#define NS_DECL_IDOMHTMLTFOOTELEMENT \ - NS_IMETHOD GetAlign(nsString& aAlign); \ - NS_IMETHOD SetAlign(const nsString& aAlign); \ - NS_IMETHOD GetCh(nsString& aCh); \ - NS_IMETHOD SetCh(const nsString& aCh); \ - NS_IMETHOD GetChOff(nsString& aChOff); \ - NS_IMETHOD SetChOff(const nsString& aChOff); \ - NS_IMETHOD GetVAlign(nsString& aVAlign); \ - NS_IMETHOD SetVAlign(const nsString& aVAlign); \ - - - -#define NS_FORWARD_IDOMHTMLTFOOTELEMENT(_to) \ - NS_IMETHOD GetAlign(nsString& aAlign) { return _to##GetAlign(aAlign); } \ - NS_IMETHOD SetAlign(const nsString& aAlign) { return _to##SetAlign(aAlign); } \ - NS_IMETHOD GetCh(nsString& aCh) { return _to##GetCh(aCh); } \ - NS_IMETHOD SetCh(const nsString& aCh) { return _to##SetCh(aCh); } \ - NS_IMETHOD GetChOff(nsString& aChOff) { return _to##GetChOff(aChOff); } \ - NS_IMETHOD SetChOff(const nsString& aChOff) { return _to##SetChOff(aChOff); } \ - NS_IMETHOD GetVAlign(nsString& aVAlign) { return _to##GetVAlign(aVAlign); } \ - NS_IMETHOD SetVAlign(const nsString& aVAlign) { return _to##SetVAlign(aVAlign); } \ - - -extern nsresult NS_InitHTMLTfootElementClass(nsIScriptContext *aContext, void **aPrototype); - -extern "C" NS_DOM nsresult NS_NewScriptHTMLTfootElement(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); - -#endif // nsIDOMHTMLTfootElement_h__ diff --git a/mozilla/dom/public/html/nsIDOMHTMLTheadElement.h b/mozilla/dom/public/html/nsIDOMHTMLTheadElement.h deleted file mode 100644 index 93db6cf0996..00000000000 --- a/mozilla/dom/public/html/nsIDOMHTMLTheadElement.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- 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 nsIDOMHTMLTheadElement_h__ -#define nsIDOMHTMLTheadElement_h__ - -#include "nsISupports.h" -#include "nsString.h" -#include "nsIScriptContext.h" -#include "nsIDOMHTMLElement.h" - - -#define NS_IDOMHTMLTHEADELEMENT_IID \ -{ 0x6f76532b, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } - -class nsIDOMHTMLTheadElement : public nsIDOMHTMLElement { -public: - - NS_IMETHOD GetAlign(nsString& aAlign)=0; - NS_IMETHOD SetAlign(const nsString& aAlign)=0; - - NS_IMETHOD GetCh(nsString& aCh)=0; - NS_IMETHOD SetCh(const nsString& aCh)=0; - - NS_IMETHOD GetChOff(nsString& aChOff)=0; - NS_IMETHOD SetChOff(const nsString& aChOff)=0; - - NS_IMETHOD GetVAlign(nsString& aVAlign)=0; - NS_IMETHOD SetVAlign(const nsString& aVAlign)=0; -}; - - -#define NS_DECL_IDOMHTMLTHEADELEMENT \ - NS_IMETHOD GetAlign(nsString& aAlign); \ - NS_IMETHOD SetAlign(const nsString& aAlign); \ - NS_IMETHOD GetCh(nsString& aCh); \ - NS_IMETHOD SetCh(const nsString& aCh); \ - NS_IMETHOD GetChOff(nsString& aChOff); \ - NS_IMETHOD SetChOff(const nsString& aChOff); \ - NS_IMETHOD GetVAlign(nsString& aVAlign); \ - NS_IMETHOD SetVAlign(const nsString& aVAlign); \ - - - -#define NS_FORWARD_IDOMHTMLTHEADELEMENT(_to) \ - NS_IMETHOD GetAlign(nsString& aAlign) { return _to##GetAlign(aAlign); } \ - NS_IMETHOD SetAlign(const nsString& aAlign) { return _to##SetAlign(aAlign); } \ - NS_IMETHOD GetCh(nsString& aCh) { return _to##GetCh(aCh); } \ - NS_IMETHOD SetCh(const nsString& aCh) { return _to##SetCh(aCh); } \ - NS_IMETHOD GetChOff(nsString& aChOff) { return _to##GetChOff(aChOff); } \ - NS_IMETHOD SetChOff(const nsString& aChOff) { return _to##SetChOff(aChOff); } \ - NS_IMETHOD GetVAlign(nsString& aVAlign) { return _to##GetVAlign(aVAlign); } \ - NS_IMETHOD SetVAlign(const nsString& aVAlign) { return _to##SetVAlign(aVAlign); } \ - - -extern nsresult NS_InitHTMLTheadElementClass(nsIScriptContext *aContext, void **aPrototype); - -extern "C" NS_DOM nsresult NS_NewScriptHTMLTheadElement(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); - -#endif // nsIDOMHTMLTheadElement_h__ diff --git a/mozilla/dom/public/html/nsIDOMHTMLTitleElement.h b/mozilla/dom/public/html/nsIDOMHTMLTitleElement.h index 46f6262232a..860828f5c35 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLTitleElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLTitleElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLTITLEELEMENT_IID \ -{ 0x6f76532c, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9089, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLTitleElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMHTMLUListElement.h b/mozilla/dom/public/html/nsIDOMHTMLUListElement.h index b3ad7d3ee89..90599c999a6 100644 --- a/mozilla/dom/public/html/nsIDOMHTMLUListElement.h +++ b/mozilla/dom/public/html/nsIDOMHTMLUListElement.h @@ -27,8 +27,8 @@ #define NS_IDOMHTMLULISTELEMENT_IID \ -{ 0x6f76532d, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf9099, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMHTMLUListElement : public nsIDOMHTMLElement { public: diff --git a/mozilla/dom/public/html/nsIDOMImage.h b/mozilla/dom/public/html/nsIDOMImage.h index b5155d3522a..e28dc5db0f3 100644 --- a/mozilla/dom/public/html/nsIDOMImage.h +++ b/mozilla/dom/public/html/nsIDOMImage.h @@ -26,8 +26,8 @@ #define NS_IDOMIMAGE_IID \ -{ 0x6f76532e, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90c7, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMImage : public nsISupports { public: diff --git a/mozilla/dom/public/html/nsIDOMNSHTMLDocument.h b/mozilla/dom/public/html/nsIDOMNSHTMLDocument.h index d730c72ecb9..0c330c2eda8 100644 --- a/mozilla/dom/public/html/nsIDOMNSHTMLDocument.h +++ b/mozilla/dom/public/html/nsIDOMNSHTMLDocument.h @@ -29,8 +29,8 @@ class nsIDOMStyleSheetCollection; class nsIDOMHTMLCollection; #define NS_IDOMNSHTMLDOCUMENT_IID \ -{ 0x6f76532f, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90c5, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMNSHTMLDocument : public nsISupports { public: diff --git a/mozilla/dom/public/html/nsIDOMNSHTMLFormElement.h b/mozilla/dom/public/html/nsIDOMNSHTMLFormElement.h index ca4707e48e7..8ec3fc851b4 100644 --- a/mozilla/dom/public/html/nsIDOMNSHTMLFormElement.h +++ b/mozilla/dom/public/html/nsIDOMNSHTMLFormElement.h @@ -27,30 +27,26 @@ class nsIDOMElement; #define NS_IDOMNSHTMLFORMELEMENT_IID \ -{ 0x6f765330, 0xee43, 0x11d1, \ - { 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } } + { 0xa6cf90c6, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } class nsIDOMNSHTMLFormElement : public nsISupports { public: NS_IMETHOD GetEncoding(nsString& aEncoding)=0; - NS_IMETHOD GetLength(PRUint32* aLength)=0; - NS_IMETHOD NamedItem(const nsString& aName, nsIDOMElement** aReturn)=0; }; #define NS_DECL_IDOMNSHTMLFORMELEMENT \ NS_IMETHOD GetEncoding(nsString& aEncoding); \ - NS_IMETHOD GetLength(PRUint32* aLength); \ NS_IMETHOD NamedItem(const nsString& aName, nsIDOMElement** aReturn); \ #define NS_FORWARD_IDOMNSHTMLFORMELEMENT(_to) \ NS_IMETHOD GetEncoding(nsString& aEncoding) { return _to##GetEncoding(aEncoding); } \ - NS_IMETHOD GetLength(PRUint32* aLength) { return _to##GetLength(aLength); } \ NS_IMETHOD NamedItem(const nsString& aName, nsIDOMElement** aReturn) { return _to##NamedItem(aName, aReturn); } \ diff --git a/mozilla/dom/public/idl/Window.idl b/mozilla/dom/public/idl/Window.idl deleted file mode 100644 index 90289500782..00000000000 --- a/mozilla/dom/public/idl/Window.idl +++ /dev/null @@ -1,51 +0,0 @@ - interface Window { - readonly attribute Window window; - readonly attribute Window self; - readonly attribute Document document; - readonly attribute Navigator navigator; - readonly attribute Window parent; - readonly attribute Window top; - readonly attribute boolean closed; - readonly attribute WindowCollection frames; - attribute Window opener; - attribute wstring status; - attribute wstring defaultStatus; - attribute wstring name; - attribute long innerWidth; - attribute long innerHeight; - attribute long outerWidth; - attribute long outerHeight; - attribute long screenX; - attribute long screenY; - attribute long pageXOffset; - attribute long pageYOffset; - - void dump(in wstring str); - void alert(in wstring str); - void focus(); - void blur(); - void close(); - void back(); - void forward(); - void home(); - void stop(); - - - void moveTo(in long xPos, in long yPos); - void moveBy(in long xDif, in long yDif); - void resizeTo(in long width, in long height); - void resizeBy(in long widthDif, in long heightDif); - void scrollTo(in long xScroll, in long yScroll); - void scrollBy(in long xScrollDif, in long yScrollDif); - - void clearTimeout(in long timerID); - void clearInterval(in long timerID); - long setTimeout(/* ... */); - long setInterval(/* ... */); - Window open(/* ... */); - }; - - interface EventCapturer : EventReceiver { - void captureEvent(in wstring type); - void releaseEvent(in wstring type); - }; \ No newline at end of file diff --git a/mozilla/dom/public/idl/Location.idl b/mozilla/dom/public/idl/base/Location.idl similarity index 78% rename from mozilla/dom/public/idl/Location.idl rename to mozilla/dom/public/idl/base/Location.idl index aefba688ac4..7f6988ad994 100644 --- a/mozilla/dom/public/idl/Location.idl +++ b/mozilla/dom/public/idl/base/Location.idl @@ -1,4 +1,7 @@ interface Location { +/* IID: { 0xa6cf906d, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + attribute wstring hash; attribute wstring host; attribute wstring hostname; diff --git a/mozilla/dom/public/idl/Navigator.idl b/mozilla/dom/public/idl/base/Navigator.idl similarity index 79% rename from mozilla/dom/public/idl/Navigator.idl rename to mozilla/dom/public/idl/base/Navigator.idl index 9a06a5da214..20688ba5036 100644 --- a/mozilla/dom/public/idl/Navigator.idl +++ b/mozilla/dom/public/idl/base/Navigator.idl @@ -1,4 +1,7 @@ interface Navigator { +/* IID: { 0xa6cf906e, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + readonly attribute wstring userAgent; readonly attribute wstring appCodeName; readonly attribute wstring appVersion; diff --git a/mozilla/dom/public/idl/base/Window.idl b/mozilla/dom/public/idl/base/Window.idl new file mode 100644 index 00000000000..9c6d506c1c0 --- /dev/null +++ b/mozilla/dom/public/idl/base/Window.idl @@ -0,0 +1,56 @@ + interface Window { +/* IID: { 0xa6cf906b, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute Window window; + readonly attribute Window self; + readonly attribute Document document; + readonly attribute Navigator navigator; + readonly attribute Window parent; + readonly attribute Window top; + readonly attribute boolean closed; + readonly attribute WindowCollection frames; + attribute Window opener; + attribute wstring status; + attribute wstring defaultStatus; + attribute wstring name; + attribute long innerWidth; + attribute long innerHeight; + attribute long outerWidth; + attribute long outerHeight; + attribute long screenX; + attribute long screenY; + attribute long pageXOffset; + attribute long pageYOffset; + + void dump(in wstring str); + void alert(in wstring str); + void focus(); + void blur(); + void close(); + void back(); + void forward(); + void home(); + void stop(); + + void moveTo(in long xPos, in long yPos); + void moveBy(in long xDif, in long yDif); + void resizeTo(in long width, in long height); + void resizeBy(in long widthDif, in long heightDif); + void scrollTo(in long xScroll, in long yScroll); + void scrollBy(in long xScrollDif, in long yScrollDif); + + void clearTimeout(in long timerID); + void clearInterval(in long timerID); + long setTimeout(/* ... */); + long setInterval(/* ... */); + Window open(/* ... */); + }; + + interface EventCapturer : EventReceiver { +/* IID: { 0xa6cf906c, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + void captureEvent(in wstring type); + void releaseEvent(in wstring type); + }; \ No newline at end of file diff --git a/mozilla/dom/public/idl/WindowCollection.idl b/mozilla/dom/public/idl/base/WindowCollection.idl similarity index 67% rename from mozilla/dom/public/idl/WindowCollection.idl rename to mozilla/dom/public/idl/base/WindowCollection.idl index 58dab4957bb..264d347d640 100644 --- a/mozilla/dom/public/idl/WindowCollection.idl +++ b/mozilla/dom/public/idl/base/WindowCollection.idl @@ -1,4 +1,7 @@ interface WindowCollection { +/* IID: { 0xa6cf906f, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + readonly attribute unsigned long length; Window item(in unsigned long index); Window namedItem(in wstring name); diff --git a/mozilla/dom/public/idl/base/makefile.win b/mozilla/dom/public/idl/base/makefile.win new file mode 100644 index 00000000000..de0b81d3ee1 --- /dev/null +++ b/mozilla/dom/public/idl/base/makefile.win @@ -0,0 +1,58 @@ +#!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 + +MODULE=raptor + +IDLSRCS= Navigator.idl Location.idl WindowCollection.idl + +GLOBAL_IDLSRC= Window.idl + +XPCOM_DESTDIR=$(DEPTH)\dom\public\base +JSSTUB_DESTDIR=$(DEPTH)\dom\src\base +GENXDIR=genx +GENJSDIR=genjs + +!include <$(DEPTH)\config\rules.mak> + +$(GENXDIR): + -mkdir $(GENXDIR) + +$(GENJSDIR): + -mkdir $(GENJSDIR) + +IDLC=$(DIST)\bin\idlc.exe + +export:: $(GENXDIR) $(GENJSDIR) + @echo $(XPCOM_HEADERS) + @echo +++ make: generating xpcom headers + $(IDLC) -d $(GENXDIR) -x $(IDLSRCS) + $(IDLC) -d $(GENXDIR) -g -x $(GLOBAL_IDLSRC) + @echo +++ make: generating JavaScript stubs + $(IDLC) -d $(GENJSDIR) -j $(IDLSRCS) + $(IDLC) -d $(GENJSDIR) -g -j $(GLOBAL_IDLSRC) + +install:: + $(MAKE_INSTALL:/=\) $(GENXDIR)\nsIDOMEventCapturer.h $(XPCOM_DESTDIR)\..\coreEvents + $(RM) $(GENXDIR)\nsIDOMEventCapturer.h + $(MAKE_INSTALL:/=\) $(GENXDIR)\nsIDOM*.h $(XPCOM_DESTDIR) + $(MAKE_INSTALL:/=\) $(GENXDIR)\nsIDOM$(GLOBAL_IDLSRC:.idl=.h) $(XPCOM_DESTDIR) + $(MAKE_INSTALL:/=\) $(GENJSDIR)\nsJS*.cpp $(JSSTUB_DESTDIR) + $(MAKE_INSTALL:/=\) $(GENJSDIR)\nsJS$(GLOBAL_IDLSRC:.idl=.cpp) $(JSSTUB_DESTDIR) + diff --git a/mozilla/dom/public/idl/coreDom/Attr.idl b/mozilla/dom/public/idl/coreDom/Attr.idl new file mode 100644 index 00000000000..b14a05180a8 --- /dev/null +++ b/mozilla/dom/public/idl/coreDom/Attr.idl @@ -0,0 +1,8 @@ + interface Attr : Node { +/* IID: { 0xa6cf9070, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute DOMString name; + readonly attribute boolean specified; + attribute DOMString value; + }; diff --git a/mozilla/dom/public/idl/coreDom/Attribute.idl b/mozilla/dom/public/idl/coreDom/Attribute.idl deleted file mode 100644 index 4db6c216db4..00000000000 --- a/mozilla/dom/public/idl/coreDom/Attribute.idl +++ /dev/null @@ -1,5 +0,0 @@ - interface Attribute : Node { - readonly attribute wstring name; - attribute boolean specified; - readonly attribute wstring value; - }; diff --git a/mozilla/dom/public/idl/coreDom/CDATASection.idl b/mozilla/dom/public/idl/coreDom/CDATASection.idl index 2a079e61e1c..c4b8dcee18e 100644 --- a/mozilla/dom/public/idl/coreDom/CDATASection.idl +++ b/mozilla/dom/public/idl/coreDom/CDATASection.idl @@ -1,2 +1,4 @@ - interface CDATASection : Text { - }; + interface CDATASection : Text { +/* IID: { 0xa6cf9071, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + }; diff --git a/mozilla/dom/public/idl/coreDom/CharacterData.idl b/mozilla/dom/public/idl/coreDom/CharacterData.idl new file mode 100644 index 00000000000..f30b3cca315 --- /dev/null +++ b/mozilla/dom/public/idl/coreDom/CharacterData.idl @@ -0,0 +1,25 @@ + interface CharacterData : Node { +/* IID: { 0xa6cf9072, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString data; + // raises(DOMException) on setting + // raises(DOMException) on retrieval + readonly attribute unsigned long length; + DOMString substringData(in unsigned long offset, + in unsigned long count) + raises(DOMException); + void appendData(in DOMString arg) + raises(DOMException); + void insertData(in unsigned long offset, + in DOMString arg) + raises(DOMException); + void deleteData(in unsigned long offset, + in unsigned long count) + raises(DOMException); + void replaceData(in unsigned long offset, + in unsigned long count, + in DOMString arg) + raises(DOMException); + }; + diff --git a/mozilla/dom/public/idl/coreDom/Comment.idl b/mozilla/dom/public/idl/coreDom/Comment.idl index 2970764110f..8d9951263ad 100644 --- a/mozilla/dom/public/idl/coreDom/Comment.idl +++ b/mozilla/dom/public/idl/coreDom/Comment.idl @@ -1,3 +1,6 @@ - interface Comment : Data { - }; + interface Comment : CharacterData { + /* IID: { 0xa6cf9073, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + }; diff --git a/mozilla/dom/public/idl/coreDom/DOM.idl b/mozilla/dom/public/idl/coreDom/DOM.idl deleted file mode 100644 index 81467db9a0d..00000000000 --- a/mozilla/dom/public/idl/coreDom/DOM.idl +++ /dev/null @@ -1,5 +0,0 @@ - interface DOM { - Document createDocument(in wstring type) - raises DOMException; - boolean hasFeature(in wstring feature); - }; \ No newline at end of file diff --git a/mozilla/dom/public/idl/coreDom/DOMImplementation.idl b/mozilla/dom/public/idl/coreDom/DOMImplementation.idl new file mode 100644 index 00000000000..beb74d6f0a3 --- /dev/null +++ b/mozilla/dom/public/idl/coreDom/DOMImplementation.idl @@ -0,0 +1,7 @@ + interface DOMImplementation { + /* IID: { 0xa6cf9074, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + boolean hasFeature(in DOMString feature, + in DOMString version); + }; diff --git a/mozilla/dom/public/idl/coreDom/Data.idl b/mozilla/dom/public/idl/coreDom/Data.idl deleted file mode 100644 index 8c88109ec3f..00000000000 --- a/mozilla/dom/public/idl/coreDom/Data.idl +++ /dev/null @@ -1,18 +0,0 @@ - interface Data : Node { - attribute wstring data; - readonly attribute unsigned long size; - wstring substring(in unsigned long start, - in unsigned long end) - raises DOMException; - void append(in wstring data); - void insert(in unsigned long offset, - in wstring data) - raises DOMException; - void remove(in unsigned long offset, - in unsigned long count) - raises DOMException; - void replace(in unsigned long offset, - in unsigned long count, - in wstring data) - raises DOMException; - }; diff --git a/mozilla/dom/public/idl/coreDom/Document.idl b/mozilla/dom/public/idl/coreDom/Document.idl index 5abe83fa928..b62f3c88f17 100644 --- a/mozilla/dom/public/idl/coreDom/Document.idl +++ b/mozilla/dom/public/idl/coreDom/Document.idl @@ -1,21 +1,31 @@ - interface Document : DocumentFragment { - readonly attribute DocumentType documentType; - readonly attribute NodeList prolog; - readonly attribute NodeList epilog; - readonly attribute Element documentElement; - Element createElement(in wstring tagName, - in NamedNodeMap attributes); + interface Document : Node { + /* IID: { 0xa6cf9075, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute DocumentType doctype; + readonly attribute DOMImplementation implementation; + readonly attribute Element documentElement; + Element createElement(in DOMString tagName) + raises(DOMException); DocumentFragment createDocumentFragment(); - Text createTextNode(in wstring data); - Comment createComment(in wstring data); - ProcessingInstruction createProcessingInstruction(in wstring target, - in wstring data); - Attribute createAttribute(in wstring name, - in Node value); - NodeList getElementsByTagName(in wstring tagname); + Text createTextNode(in DOMString data); + Comment createComment(in DOMString data); + CDATASection createCDATASection(in DOMString data) + raises(DOMException); + ProcessingInstruction createProcessingInstruction(in DOMString target, + in DOMString data) + raises(DOMException); + Attr createAttribute(in DOMString name) + raises(DOMException); + EntityReference createEntityReference(in DOMString name) + raises(DOMException); + NodeList getElementsByTagName(in DOMString tagname); }; interface EventCapturer : EventReceiver { +/* IID: { 0xa6cf906c, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + void captureEvent(in wstring type); void releaseEvent(in wstring type); }; \ No newline at end of file diff --git a/mozilla/dom/public/idl/coreDom/DocumentFragment.idl b/mozilla/dom/public/idl/coreDom/DocumentFragment.idl index daee1e342d1..86ca598abce 100644 --- a/mozilla/dom/public/idl/coreDom/DocumentFragment.idl +++ b/mozilla/dom/public/idl/coreDom/DocumentFragment.idl @@ -1,3 +1,5 @@ interface DocumentFragment : Node { - readonly attribute Document masterDoc; + /* IID: { 0xa6cf9076, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + }; diff --git a/mozilla/dom/public/idl/coreDom/DocumentType.idl b/mozilla/dom/public/idl/coreDom/DocumentType.idl index dfdbc872fe0..fe4d8a6c4da 100644 --- a/mozilla/dom/public/idl/coreDom/DocumentType.idl +++ b/mozilla/dom/public/idl/coreDom/DocumentType.idl @@ -1,4 +1,8 @@ - interface DocumentType { - attribute wstring name; - attribute NamedNodeMap entities; - }; + interface DocumentType : Node { + /* IID: { 0xa6cf9077, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute DOMString name; + readonly attribute NamedNodeMap entities; + readonly attribute NamedNodeMap notations; + }; diff --git a/mozilla/dom/public/idl/coreDom/Element.idl b/mozilla/dom/public/idl/coreDom/Element.idl index ee6395efbba..62b5e9808dd 100644 --- a/mozilla/dom/public/idl/coreDom/Element.idl +++ b/mozilla/dom/public/idl/coreDom/Element.idl @@ -1,12 +1,19 @@ - interface Element : Node { - readonly attribute wstring tagName; - wstring getDOMAttribute(in wstring name); - void setDOMAttribute(in string name, - in string value); - void removeAttribute(in wstring name); - Attribute getAttributeNode(in wstring name); - void setAttributeNode(in Attribute newAttr); - void removeAttributeNode(in Attribute oldAttr); - NodeList getElementsByTagName(in wstring tagname); - void normalize(); - }; + interface Element : Node { + /* IID: { 0xa6cf9078, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute DOMString tagName; + DOMString getDOMAttribute(in DOMString name); + void setDOMAttribute(in DOMString name, + in DOMString value) + raises(DOMException); + void removeAttribute(in DOMString name) + raises(DOMException); + Attr getAttributeNode(in DOMString name); + Attr setAttributeNode(in Attr newAttr) + raises(DOMException); + Attr removeAttributeNode(in Attr oldAttr) + raises(DOMException); + NodeList getElementsByTagName(in DOMString name); + void normalize(); + }; diff --git a/mozilla/dom/public/idl/coreDom/Entity.idl b/mozilla/dom/public/idl/coreDom/Entity.idl new file mode 100644 index 00000000000..820284e359b --- /dev/null +++ b/mozilla/dom/public/idl/coreDom/Entity.idl @@ -0,0 +1,8 @@ + interface Entity : Node { + /* IID: { 0xa6cf9079, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute DOMString publicId; + readonly attribute DOMString systemId; + readonly attribute DOMString notationName; + }; diff --git a/mozilla/dom/public/idl/coreDom/EntityReference.idl b/mozilla/dom/public/idl/coreDom/EntityReference.idl new file mode 100644 index 00000000000..78367139d1a --- /dev/null +++ b/mozilla/dom/public/idl/coreDom/EntityReference.idl @@ -0,0 +1,5 @@ + interface EntityReference : Node { + /* IID: { 0xa6cf907a, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + }; diff --git a/mozilla/dom/public/idl/coreDom/NamedNodeMap.idl b/mozilla/dom/public/idl/coreDom/NamedNodeMap.idl index ca53c3b937a..8480bb32ed3 100644 --- a/mozilla/dom/public/idl/coreDom/NamedNodeMap.idl +++ b/mozilla/dom/public/idl/coreDom/NamedNodeMap.idl @@ -1,7 +1,13 @@ - interface NamedNodeMap { - Node getNamedItem(in wstring name); - void setNamedItem(in Node node); - Node removeNamedItem(in wstring name); - Node item(in unsigned long index); - readonly attribute unsigned long length; - }; + interface NamedNodeMap { + /* IID: { 0xa6cf907b, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + Node getNamedItem(in DOMString name); + Node setNamedItem(in Node arg) + raises(DOMException); + Node removeNamedItem(in DOMString name) + raises(DOMException); + Node item(in unsigned long index); + readonly attribute unsigned long length; + }; + diff --git a/mozilla/dom/public/idl/coreDom/Node.idl b/mozilla/dom/public/idl/coreDom/Node.idl index 02b2bac2274..39c5a3b1b06 100644 --- a/mozilla/dom/public/idl/coreDom/Node.idl +++ b/mozilla/dom/public/idl/coreDom/Node.idl @@ -1,40 +1,45 @@ - interface Node { - // NodeType - const int DOCUMENT = 1; - const int ELEMENT = 2; - const int ATTRIBUTE = 3; - const int PROCESSING_INSTRUCTION = 4; - const int COMMENT = 5; - const int TEXT = 6; - const int CDATA_SECTION = 7; - const int DOCUMENT_FRAGMENT = 8; - const int ENTITY_DECLARATION = 9; - const int ENTITY_REFERENCE = 10; + interface Node { + /* IID: { 0xa6cf907c, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ - readonly attribute wstring nodeName; - attribute wstring nodeValue; - readonly attribute int nodeType; - readonly attribute Node parentNode; - readonly attribute NodeList childNodes; - readonly attribute boolean hasChildNodes; - readonly attribute Node firstChild; - readonly attribute Node lastChild; - readonly attribute Node previousSibling; - readonly attribute Node nextSibling; - readonly attribute NamedNodeMap attributes; - Node insertBefore(in Node newChild, - in Node refChild) - raises DOMException; - Node replaceChild(in Node newChild, - in Node oldChild) - raises DOMException; - Node removeChild(in Node oldChild) - raises DOMException; - Node appendChild(in Node newChild) - raises DOMException; - Node cloneNode(); - boolean equals(in Node node, - in boolean deep); - }; + const unsigned short ELEMENT_NODE = 1; + const unsigned short ATTRIBUTE_NODE = 2; + const unsigned short TEXT_NODE = 3; + const unsigned short CDATA_SECTION_NODE = 4; + const unsigned short ENTITY_REFERENCE_NODE = 5; + const unsigned short ENTITY_NODE = 6; + const unsigned short PROCESSING_INSTRUCTION_NODE = 7; + const unsigned short COMMENT_NODE = 8; + const unsigned short DOCUMENT_NODE = 9; + const unsigned short DOCUMENT_TYPE_NODE = 10; + const unsigned short DOCUMENT_FRAGMENT_NODE = 11; + const unsigned short NOTATION_NODE = 12; + + readonly attribute DOMString nodeName; + attribute DOMString nodeValue; + // raises(DOMException) on setting + // raises(DOMException) on retrieval + readonly attribute unsigned short nodeType; + readonly attribute Node parentNode; + readonly attribute NodeList childNodes; + readonly attribute Node firstChild; + readonly attribute Node lastChild; + readonly attribute Node previousSibling; + readonly attribute Node nextSibling; + readonly attribute NamedNodeMap attributes; + readonly attribute Document ownerDocument; + Node insertBefore(in Node newChild, + in Node refChild) + raises(DOMException); + Node replaceChild(in Node newChild, + in Node oldChild) + raises(DOMException); + Node removeChild(in Node oldChild) + raises(DOMException); + Node appendChild(in Node newChild) + raises(DOMException); + boolean hasChildNodes(); + Node cloneNode(in boolean deep); + }; diff --git a/mozilla/dom/public/idl/coreDom/NodeList.idl b/mozilla/dom/public/idl/coreDom/NodeList.idl index 70e480a51ce..5d112dfe3dd 100644 --- a/mozilla/dom/public/idl/coreDom/NodeList.idl +++ b/mozilla/dom/public/idl/coreDom/NodeList.idl @@ -1,5 +1,8 @@ - interface NodeList { - Node item(in unsigned long index); - readonly attribute unsigned long length; - }; + interface NodeList { + /* IID: { 0xa6cf907d, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + Node item(in unsigned long index); + readonly attribute unsigned long length; + }; diff --git a/mozilla/dom/public/idl/coreDom/Notation.idl b/mozilla/dom/public/idl/coreDom/Notation.idl new file mode 100644 index 00000000000..584b4e610c7 --- /dev/null +++ b/mozilla/dom/public/idl/coreDom/Notation.idl @@ -0,0 +1,7 @@ + interface Notation : Node { + /* IID: { 0xa6cf907e, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute DOMString publicId; + readonly attribute DOMString systemId; + }; diff --git a/mozilla/dom/public/idl/coreDom/ProcessingInstruction.idl b/mozilla/dom/public/idl/coreDom/ProcessingInstruction.idl index eb3612f7248..3831284ff71 100644 --- a/mozilla/dom/public/idl/coreDom/ProcessingInstruction.idl +++ b/mozilla/dom/public/idl/coreDom/ProcessingInstruction.idl @@ -1,4 +1,8 @@ - interface ProcessingInstruction : Node { - attribute wstring target; - attribute wstring data; - }; + interface ProcessingInstruction : Node { + /* IID: { 0xa6cf907f, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute DOMString target; + attribute DOMString data; + // raises(DOMException) on setting + }; diff --git a/mozilla/dom/public/idl/coreDom/StyleSheet.idl b/mozilla/dom/public/idl/coreDom/StyleSheet.idl index b6b51a70530..5ea1252c887 100644 --- a/mozilla/dom/public/idl/coreDom/StyleSheet.idl +++ b/mozilla/dom/public/idl/coreDom/StyleSheet.idl @@ -1,5 +1,8 @@ interface StyleSheet { + /* IID: { 0xa6cf9080, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + attribute boolean disabled; readonly attribute boolean readOnly; }; \ No newline at end of file diff --git a/mozilla/dom/public/idl/coreDom/StyleSheetCollection.idl b/mozilla/dom/public/idl/coreDom/StyleSheetCollection.idl index d4c69d6a572..534e99cfc28 100644 --- a/mozilla/dom/public/idl/coreDom/StyleSheetCollection.idl +++ b/mozilla/dom/public/idl/coreDom/StyleSheetCollection.idl @@ -1,5 +1,8 @@ interface StyleSheetCollection { + /* IID: { 0xa6cf9081, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + readonly attribute unsigned long length; StyleSheet item(in unsigned long index); }; diff --git a/mozilla/dom/public/idl/coreDom/Text.idl b/mozilla/dom/public/idl/coreDom/Text.idl index 51db1394f09..ffd85be1601 100644 --- a/mozilla/dom/public/idl/coreDom/Text.idl +++ b/mozilla/dom/public/idl/coreDom/Text.idl @@ -1,5 +1,7 @@ - interface Text : Data { - Text splitText(in unsigned long offset); - Text joinText(in Text node1, - in Text node2); - }; + interface Text : CharacterData { + /* IID: { 0xa6cf9082, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + Text splitText(in unsigned long offset) + raises(DOMException); + }; diff --git a/mozilla/dom/public/idl/coreDom/makefile.win b/mozilla/dom/public/idl/coreDom/makefile.win index 0342e173ce4..4b995b7f869 100644 --- a/mozilla/dom/public/idl/coreDom/makefile.win +++ b/mozilla/dom/public/idl/coreDom/makefile.win @@ -21,18 +21,21 @@ IGNORE_MANIFEST=1 MODULE=raptor IDLSRCS = \ - Attribute.idl \ + Attr.idl \ CDATASection.idl \ + CharacterData.idl \ Comment.idl \ - Data.idl \ - DOM.idl \ + DOMImplementation.idl \ Document.idl \ DocumentFragment.idl \ DocumentType.idl \ + Entity.idl \ + EntityReference.idl \ Element.idl \ NamedNodeMap.idl \ Node.idl \ NodeList.idl \ + Notation.idl \ ProcessingInstruction.idl \ Text.idl \ StyleSheet.idl \ diff --git a/mozilla/dom/public/idl/css/CSSFontFaceRule.idl b/mozilla/dom/public/idl/css/CSSFontFaceRule.idl index 8d7c67702cd..2fd10cc6fbe 100644 --- a/mozilla/dom/public/idl/css/CSSFontFaceRule.idl +++ b/mozilla/dom/public/idl/css/CSSFontFaceRule.idl @@ -1,4 +1,7 @@ interface CSSFontFaceRule : CSSStyleRule { + /* IID: { 0xa6cf90bb, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + attribute CSSStyleDeclaration style; }; diff --git a/mozilla/dom/public/idl/css/CSSMediaRule.idl b/mozilla/dom/public/idl/css/CSSMediaRule.idl index 22c139edd0e..c6dc66b86c0 100644 --- a/mozilla/dom/public/idl/css/CSSMediaRule.idl +++ b/mozilla/dom/public/idl/css/CSSMediaRule.idl @@ -1,5 +1,8 @@ interface CSSMediaRule : CSSStyleRule { + /* IID: { 0xa6cf90bc, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + attribute wstring mediaTypes; readonly attribute CSSStyleRuleCollection rules; diff --git a/mozilla/dom/public/idl/css/CSSPageRule.idl b/mozilla/dom/public/idl/css/CSSPageRule.idl index 986bbbd8a5a..f0f7af1563c 100644 --- a/mozilla/dom/public/idl/css/CSSPageRule.idl +++ b/mozilla/dom/public/idl/css/CSSPageRule.idl @@ -1,5 +1,8 @@ interface CSSPageRule : CSSStyleRule { + /* IID: { 0xa6cf90bd, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + attribute wstring selectorText; attribute CSSStyleDeclaration style; }; diff --git a/mozilla/dom/public/idl/css/CSSStyleDeclaration.idl b/mozilla/dom/public/idl/css/CSSStyleDeclaration.idl index d2adbcbd9a9..c17a302cad4 100644 --- a/mozilla/dom/public/idl/css/CSSStyleDeclaration.idl +++ b/mozilla/dom/public/idl/css/CSSStyleDeclaration.idl @@ -1,5 +1,8 @@ interface CSSStyleDeclaration { + /* IID: { 0xa6cf90be, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + wstring getPropertyValue(in wstring propertyName); wstring getPropertyPriority(in wstring propertyName); void setProperty(in wstring propertyName, in wstring value, in wstring priority); diff --git a/mozilla/dom/public/idl/css/CSSStyleRule.idl b/mozilla/dom/public/idl/css/CSSStyleRule.idl index ea77ca95b44..24c8c3451c9 100644 --- a/mozilla/dom/public/idl/css/CSSStyleRule.idl +++ b/mozilla/dom/public/idl/css/CSSStyleRule.idl @@ -1,4 +1,7 @@ interface CSSStyleRule { + /* IID: { 0xa6cf90bf, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + readonly attribute wstring type; }; diff --git a/mozilla/dom/public/idl/css/CSSStyleRuleCollection.idl b/mozilla/dom/public/idl/css/CSSStyleRuleCollection.idl index c033ed180c0..89d0f6a6327 100644 --- a/mozilla/dom/public/idl/css/CSSStyleRuleCollection.idl +++ b/mozilla/dom/public/idl/css/CSSStyleRuleCollection.idl @@ -1,5 +1,8 @@ interface CSSStyleRuleCollection { + /* IID: { 0xa6cf90c0, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + readonly attribute unsigned long length; CSSStyleRule item(in unsigned long index); }; diff --git a/mozilla/dom/public/idl/css/CSSStyleRuleSimple.idl b/mozilla/dom/public/idl/css/CSSStyleRuleSimple.idl index 0182633582f..6f86b70f67d 100644 --- a/mozilla/dom/public/idl/css/CSSStyleRuleSimple.idl +++ b/mozilla/dom/public/idl/css/CSSStyleRuleSimple.idl @@ -1,5 +1,8 @@ interface CSSStyleRuleSimple : CSSStyleRule { + /* IID: { 0xa6cf90c1, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + attribute wstring selectorText; readonly attribute CSSStyleDeclaration style; }; diff --git a/mozilla/dom/public/idl/css/CSSStyleSheet.idl b/mozilla/dom/public/idl/css/CSSStyleSheet.idl index d01d7428efe..30b74888f38 100644 --- a/mozilla/dom/public/idl/css/CSSStyleSheet.idl +++ b/mozilla/dom/public/idl/css/CSSStyleSheet.idl @@ -1,5 +1,8 @@ interface CSSStyleSheet : StyleSheet { + /* IID: { 0xa6cf90c2, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + readonly attribute HTMLElement owningElement; readonly attribute CSSStyleSheet parentStyleSheet; readonly attribute wstring href; diff --git a/mozilla/dom/public/idl/events/Event.idl b/mozilla/dom/public/idl/events/Event.idl index b2908912085..c6664f04daa 100644 --- a/mozilla/dom/public/idl/events/Event.idl +++ b/mozilla/dom/public/idl/events/Event.idl @@ -1,4 +1,7 @@ interface Event { + /* IID: { 0xa6cf90c3, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + const int VK_CANCEL = 0x03; const int VK_BACK = 0x08; const int VK_TAB = 0x09; @@ -141,6 +144,9 @@ }; interface NSEvent { + /* IID: { 0xa6cf90c4, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + const int EVENT_MOUSEDOWN = 0x00000001; const int EVENT_MOUSEUP = 0x00000002; const int EVENT_MOUSEOVER = 0x00000004; diff --git a/mozilla/dom/public/idl/html/HTMLAnchorElement.idl b/mozilla/dom/public/idl/html/HTMLAnchorElement.idl index 4ca2892bc3d..eeafb5855d4 100644 --- a/mozilla/dom/public/idl/html/HTMLAnchorElement.idl +++ b/mozilla/dom/public/idl/html/HTMLAnchorElement.idl @@ -1,16 +1,19 @@ - interface HTMLAnchorElement : HTMLElement { - attribute wstring accessKey; - attribute wstring charset; - attribute wstring coords; - attribute wstring href; - attribute wstring hreflang; - attribute wstring name; - attribute wstring rel; - attribute wstring rev; - attribute wstring shape; - attribute long tabIndex; - attribute wstring target; - attribute wstring type; - void blur(); - void focus(); - }; + interface HTMLAnchorElement : HTMLElement { + /* IID: { 0xa6cf90aa, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString accessKey; + attribute DOMString charset; + attribute DOMString coords; + attribute DOMString href; + attribute DOMString hreflang; + attribute DOMString name; + attribute DOMString rel; + attribute DOMString rev; + attribute DOMString shape; + attribute long tabIndex; + attribute DOMString target; + attribute DOMString type; + void blur(); + void focus(); + }; diff --git a/mozilla/dom/public/idl/html/HTMLAppletElement.idl b/mozilla/dom/public/idl/html/HTMLAppletElement.idl index 16519cc9fd6..c9b8c223231 100644 --- a/mozilla/dom/public/idl/html/HTMLAppletElement.idl +++ b/mozilla/dom/public/idl/html/HTMLAppletElement.idl @@ -1,13 +1,16 @@ - interface HTMLAppletElement : HTMLElement { - attribute wstring align; - attribute wstring alt; - attribute wstring archive; - attribute wstring code; - attribute wstring codeBase; - attribute wstring height; - attribute wstring hspace; - attribute wstring name; - attribute wstring object; - attribute wstring vspace; - attribute wstring width; - }; + interface HTMLAppletElement : HTMLElement { + /* IID: { 0xa6cf90ae, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString align; + attribute DOMString alt; + attribute DOMString archive; + attribute DOMString code; + attribute DOMString codeBase; + attribute DOMString height; + attribute DOMString hspace; + attribute DOMString name; + attribute DOMString object; + attribute DOMString vspace; + attribute DOMString width; + }; diff --git a/mozilla/dom/public/idl/html/HTMLAreaElement.idl b/mozilla/dom/public/idl/html/HTMLAreaElement.idl index 4849b8d197c..060496659eb 100644 --- a/mozilla/dom/public/idl/html/HTMLAreaElement.idl +++ b/mozilla/dom/public/idl/html/HTMLAreaElement.idl @@ -1,10 +1,13 @@ - interface HTMLAreaElement : HTMLElement { - attribute wstring accessKey; - attribute wstring alt; - attribute wstring coords; - attribute wstring href; - attribute boolean noHref; - attribute wstring shape; - attribute long tabIndex; - attribute wstring target; - }; + interface HTMLAreaElement : HTMLElement { + /* IID: { 0xa6cf90b0, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString accessKey; + attribute DOMString alt; + attribute DOMString coords; + attribute DOMString href; + attribute boolean noHref; + attribute DOMString shape; + attribute long tabIndex; + attribute DOMString target; + }; diff --git a/mozilla/dom/public/idl/html/HTMLBRElement.idl b/mozilla/dom/public/idl/html/HTMLBRElement.idl index d54d1fe0d73..304f4a74cee 100644 --- a/mozilla/dom/public/idl/html/HTMLBRElement.idl +++ b/mozilla/dom/public/idl/html/HTMLBRElement.idl @@ -1,3 +1,6 @@ - interface HTMLBRElement : HTMLElement { - attribute wstring clear; - }; + interface HTMLBRElement : HTMLElement { + /* IID: { 0xa6cf90a5, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString clear; + }; diff --git a/mozilla/dom/public/idl/html/HTMLBaseElement.idl b/mozilla/dom/public/idl/html/HTMLBaseElement.idl index dd239bed677..a0eddd0b822 100644 --- a/mozilla/dom/public/idl/html/HTMLBaseElement.idl +++ b/mozilla/dom/public/idl/html/HTMLBaseElement.idl @@ -1,4 +1,7 @@ - interface HTMLBaseElement : HTMLElement { - attribute wstring href; - attribute wstring target; - }; + interface HTMLBaseElement : HTMLElement { + /* IID: { 0xa6cf908b, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString href; + attribute DOMString target; + }; diff --git a/mozilla/dom/public/idl/html/HTMLBaseFontElement.idl b/mozilla/dom/public/idl/html/HTMLBaseFontElement.idl index 7b00205da03..695835360df 100644 --- a/mozilla/dom/public/idl/html/HTMLBaseFontElement.idl +++ b/mozilla/dom/public/idl/html/HTMLBaseFontElement.idl @@ -1,5 +1,8 @@ - interface HTMLBaseFontElement : HTMLElement { - attribute wstring color; - attribute wstring face; - attribute wstring size; - }; + interface HTMLBaseFontElement : HTMLElement { + /* IID: { 0xa6cf90a6, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString color; + attribute DOMString face; + attribute DOMString size; + }; diff --git a/mozilla/dom/public/idl/html/HTMLBlockquoteElement.idl b/mozilla/dom/public/idl/html/HTMLBlockquoteElement.idl new file mode 100644 index 00000000000..6dc1e58d5ad --- /dev/null +++ b/mozilla/dom/public/idl/html/HTMLBlockquoteElement.idl @@ -0,0 +1,8 @@ + + interface HTMLBlockquoteElement : HTMLElement { + /* IID: { 0xa6cf909f, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString cite; + }; + diff --git a/mozilla/dom/public/idl/html/HTMLBodyElement.idl b/mozilla/dom/public/idl/html/HTMLBodyElement.idl index 19dd301ccbe..0ccccd0e5b1 100644 --- a/mozilla/dom/public/idl/html/HTMLBodyElement.idl +++ b/mozilla/dom/public/idl/html/HTMLBodyElement.idl @@ -1,8 +1,11 @@ - interface HTMLBodyElement : HTMLElement { - attribute wstring aLink; - attribute wstring background; - attribute wstring bgColor; - attribute wstring link; - attribute wstring text; - attribute wstring vLink; - }; + interface HTMLBodyElement : HTMLElement { + /* IID: { 0xa6cf908e, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString aLink; + attribute DOMString background; + attribute DOMString bgColor; + attribute DOMString link; + attribute DOMString text; + attribute DOMString vLink; + }; diff --git a/mozilla/dom/public/idl/html/HTMLButtonElement.idl b/mozilla/dom/public/idl/html/HTMLButtonElement.idl index a07e6d89101..aa345a7c634 100644 --- a/mozilla/dom/public/idl/html/HTMLButtonElement.idl +++ b/mozilla/dom/public/idl/html/HTMLButtonElement.idl @@ -1,9 +1,12 @@ - interface HTMLButtonElement : HTMLElement { - attribute HTMLFormElement form; - attribute wstring accessKey; - attribute boolean disabled; - attribute wstring name; - attribute long tabIndex; - attribute wstring type; - attribute wstring value; - }; + interface HTMLButtonElement : HTMLElement { + /* IID: { 0xa6cf9095, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute HTMLFormElement form; + attribute DOMString accessKey; + attribute boolean disabled; + attribute DOMString name; + attribute long tabIndex; + readonly attribute DOMString type; + attribute DOMString value; + }; diff --git a/mozilla/dom/public/idl/html/HTMLCollection.idl b/mozilla/dom/public/idl/html/HTMLCollection.idl index 64ce113c226..22ee3619a58 100644 --- a/mozilla/dom/public/idl/html/HTMLCollection.idl +++ b/mozilla/dom/public/idl/html/HTMLCollection.idl @@ -1,5 +1,8 @@ - interface HTMLCollection { - readonly attribute unsigned long length; - Node item(in unsigned long index); - Node namedItem(in wstring name); - }; +interface HTMLCollection { + /* IID: { 0xa6cf9083, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute unsigned long length; + Node item(in unsigned long index); + Node namedItem(in DOMString name); + }; diff --git a/mozilla/dom/public/idl/html/HTMLDListElement.idl b/mozilla/dom/public/idl/html/HTMLDListElement.idl index 93ab54eae15..ebe1fefe6e1 100644 --- a/mozilla/dom/public/idl/html/HTMLDListElement.idl +++ b/mozilla/dom/public/idl/html/HTMLDListElement.idl @@ -1,3 +1,6 @@ - interface HTMLDListElement : HTMLElement { - attribute boolean compact; - }; + interface HTMLDListElement : HTMLElement { + /* IID: { 0xa6cf909b, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute boolean compact; + }; diff --git a/mozilla/dom/public/idl/html/HTMLDelElement.idl b/mozilla/dom/public/idl/html/HTMLDelElement.idl deleted file mode 100644 index 58c9aaa29a3..00000000000 --- a/mozilla/dom/public/idl/html/HTMLDelElement.idl +++ /dev/null @@ -1,4 +0,0 @@ - interface HTMLDelElement : HTMLElement { - attribute wstring cite; - attribute wstring dateTime; - }; diff --git a/mozilla/dom/public/idl/html/HTMLDirectoryElement.idl b/mozilla/dom/public/idl/html/HTMLDirectoryElement.idl index 7dd72d53823..de9687f155d 100644 --- a/mozilla/dom/public/idl/html/HTMLDirectoryElement.idl +++ b/mozilla/dom/public/idl/html/HTMLDirectoryElement.idl @@ -1,3 +1,6 @@ - interface HTMLDirectoryElement : HTMLElement { - attribute boolean compact; - }; + interface HTMLDirectoryElement : HTMLElement { + /* IID: { 0xa6cf909c, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute boolean compact; + }; diff --git a/mozilla/dom/public/idl/html/HTMLDivElement.idl b/mozilla/dom/public/idl/html/HTMLDivElement.idl index 454803f0a94..b8403a817b0 100644 --- a/mozilla/dom/public/idl/html/HTMLDivElement.idl +++ b/mozilla/dom/public/idl/html/HTMLDivElement.idl @@ -1,3 +1,6 @@ - interface HTMLDivElement : HTMLElement { - attribute wstring align; - }; + interface HTMLDivElement : HTMLElement { + /* IID: { 0xa6cf90a0, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString align; + }; diff --git a/mozilla/dom/public/idl/html/HTMLDocument.idl b/mozilla/dom/public/idl/html/HTMLDocument.idl index deff175c755..9807372f655 100644 --- a/mozilla/dom/public/idl/html/HTMLDocument.idl +++ b/mozilla/dom/public/idl/html/HTMLDocument.idl @@ -1,28 +1,30 @@ - interface HTMLDocument : Document { - attribute wstring title; - readonly attribute wstring referrer; - readonly attribute wstring fileSize; - readonly attribute wstring fileCreatedDate; - readonly attribute wstring fileModifiedDate; - readonly attribute wstring fileUpdatedDate; - readonly attribute wstring domain; - readonly attribute wstring URL; - attribute HTMLElement body; - readonly attribute HTMLCollection images; - readonly attribute HTMLCollection applets; - readonly attribute HTMLCollection links; - readonly attribute HTMLCollection forms; - readonly attribute HTMLCollection anchors; - attribute wstring cookie; - void open(/* ... */); - void close(); - void write(/* ... */); - void writeln(/* ... */); - Element getElementById(in wstring elementId); - NodeList getElementsByName(in wstring elementName); - }; + interface HTMLDocument : Document { + /* IID: { 0xa6cf9084, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString title; + readonly attribute DOMString referrer; + readonly attribute DOMString domain; + readonly attribute DOMString URL; + attribute HTMLElement body; + readonly attribute HTMLCollection images; + readonly attribute HTMLCollection applets; + readonly attribute HTMLCollection links; + readonly attribute HTMLCollection forms; + readonly attribute HTMLCollection anchors; + attribute DOMString cookie; + void open(/* ... */); + void close(); + void write(/* ... */); + void writeln(/* ... */); + Element getElementById(in DOMString elementId); + NodeList getElementsByName(in DOMString elementName); + }; interface NSHTMLDocument { + /* IID: { 0xa6cf90c5, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + attribute wstring alinkColor; attribute wstring linkColor; attribute wstring vlinkColor; diff --git a/mozilla/dom/public/idl/html/HTMLElement.idl b/mozilla/dom/public/idl/html/HTMLElement.idl index b759f983f47..2a9c83c666d 100644 --- a/mozilla/dom/public/idl/html/HTMLElement.idl +++ b/mozilla/dom/public/idl/html/HTMLElement.idl @@ -1,8 +1,11 @@ - interface HTMLElement : Element { - attribute wstring id; - attribute wstring title; - attribute wstring lang; - attribute wstring dir; - attribute wstring className; - readonly attribute CSSStyleDeclaration style; - }; + interface HTMLElement : Element { + /* IID: { 0xa6cf9085, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString id; + attribute DOMString title; + attribute DOMString lang; + attribute DOMString dir; + attribute DOMString className; + readonly attribute CSSStyleDeclaration style; + }; diff --git a/mozilla/dom/public/idl/html/HTMLFieldsetElement.idl b/mozilla/dom/public/idl/html/HTMLFieldsetElement.idl index a25786265e0..3908522d5b4 100644 --- a/mozilla/dom/public/idl/html/HTMLFieldsetElement.idl +++ b/mozilla/dom/public/idl/html/HTMLFieldsetElement.idl @@ -1,5 +1,8 @@ - interface HTMLFieldSetElement : HTMLElement { - readonly attribute HTMLFormElement form; - }; + interface HTMLFieldSetElement : HTMLElement { + /* IID: { 0xa6cf9097, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute HTMLFormElement form; + }; diff --git a/mozilla/dom/public/idl/html/HTMLFontElement.idl b/mozilla/dom/public/idl/html/HTMLFontElement.idl index 41e337d8c6e..301aeec9595 100644 --- a/mozilla/dom/public/idl/html/HTMLFontElement.idl +++ b/mozilla/dom/public/idl/html/HTMLFontElement.idl @@ -1,5 +1,8 @@ - interface HTMLFontElement : HTMLElement { - attribute wstring color; - attribute wstring face; - attribute wstring size; - }; + interface HTMLFontElement : HTMLElement { + /* IID: { 0xa6cf90a7, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString color; + attribute DOMString face; + attribute DOMString size; + }; diff --git a/mozilla/dom/public/idl/html/HTMLFormElement.idl b/mozilla/dom/public/idl/html/HTMLFormElement.idl index 55c8d03bcb0..cfab0b1e244 100644 --- a/mozilla/dom/public/idl/html/HTMLFormElement.idl +++ b/mozilla/dom/public/idl/html/HTMLFormElement.idl @@ -1,19 +1,24 @@ - interface HTMLFormElement : HTMLElement { - readonly attribute HTMLCollection elements; - readonly attribute wstring name; - attribute wstring acceptCharset; - attribute wstring action; - attribute wstring enctype; - attribute wstring method; - attribute wstring target; + interface HTMLFormElement : HTMLElement { + /* IID: { 0xa6cf908f, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ - void reset(); - void submit(); - }; + readonly attribute HTMLCollection elements; + readonly attribute unsigned long length; + attribute DOMString name; + attribute DOMString acceptCharset; + attribute DOMString action; + attribute DOMString enctype; + attribute DOMString method; + attribute DOMString target; + void submit(); + void reset(); + }; interface NSHTMLFormElement { + /* IID: { 0xa6cf90c6, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + readonly attribute wstring encoding; - readonly attribute unsigned long length; Element namedItem(in wstring name); }; \ No newline at end of file diff --git a/mozilla/dom/public/idl/html/HTMLFrameElement.idl b/mozilla/dom/public/idl/html/HTMLFrameElement.idl index d1a62fe9701..3c749673e0b 100644 --- a/mozilla/dom/public/idl/html/HTMLFrameElement.idl +++ b/mozilla/dom/public/idl/html/HTMLFrameElement.idl @@ -1,10 +1,13 @@ - interface HTMLFrameElement : HTMLElement { - attribute wstring frameBorder; - attribute wstring longDesc; - attribute wstring marginHeight; - attribute wstring marginWidth; - attribute wstring name; - attribute boolean noResize; - attribute wstring scrolling; - attribute wstring src; - }; + interface HTMLFrameElement : HTMLElement { + /* IID: { 0xa6cf90b9, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString frameBorder; + attribute DOMString longDesc; + attribute DOMString marginHeight; + attribute DOMString marginWidth; + attribute DOMString name; + attribute boolean noResize; + attribute DOMString scrolling; + attribute DOMString src; + }; diff --git a/mozilla/dom/public/idl/html/HTMLFrameSetElement.idl b/mozilla/dom/public/idl/html/HTMLFrameSetElement.idl index a9062384a4b..d6c5a36b8a6 100644 --- a/mozilla/dom/public/idl/html/HTMLFrameSetElement.idl +++ b/mozilla/dom/public/idl/html/HTMLFrameSetElement.idl @@ -1,4 +1,7 @@ - interface HTMLFrameSetElement : HTMLElement { - attribute wstring cols; - attribute wstring rows; - }; + interface HTMLFrameSetElement : HTMLElement { + /* IID: { 0xa6cf90b8, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString cols; + attribute DOMString rows; + }; diff --git a/mozilla/dom/public/idl/html/HTMLHRElement.idl b/mozilla/dom/public/idl/html/HTMLHRElement.idl index 086899fc8c2..f98fb2f2bb0 100644 --- a/mozilla/dom/public/idl/html/HTMLHRElement.idl +++ b/mozilla/dom/public/idl/html/HTMLHRElement.idl @@ -1,6 +1,9 @@ - interface HTMLHRElement : HTMLElement { - attribute wstring align; - attribute boolean noShade; - attribute wstring size; - attribute wstring width; - }; + interface HTMLHRElement : HTMLElement { + /* IID: { 0xa6cf90a8, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString align; + attribute boolean noShade; + attribute DOMString size; + attribute DOMString width; + }; diff --git a/mozilla/dom/public/idl/html/HTMLHeadElement.idl b/mozilla/dom/public/idl/html/HTMLHeadElement.idl index f5dfb25126a..50712c21936 100644 --- a/mozilla/dom/public/idl/html/HTMLHeadElement.idl +++ b/mozilla/dom/public/idl/html/HTMLHeadElement.idl @@ -1,3 +1,6 @@ - interface HTMLHeadElement : HTMLElement { - attribute wstring profile; - }; + interface HTMLHeadElement : HTMLElement { + /* IID: { 0xa6cf9087, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString profile; + }; diff --git a/mozilla/dom/public/idl/html/HTMLHeadingElement.idl b/mozilla/dom/public/idl/html/HTMLHeadingElement.idl index 8dc7d322b10..e2a01cce7a8 100644 --- a/mozilla/dom/public/idl/html/HTMLHeadingElement.idl +++ b/mozilla/dom/public/idl/html/HTMLHeadingElement.idl @@ -1,3 +1,6 @@ - interface HTMLHeadingElement : HTMLElement { - attribute wstring align; - }; + interface HTMLHeadingElement : HTMLElement { + /* IID: { 0xa6cf90a2, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString align; + }; diff --git a/mozilla/dom/public/idl/html/HTMLHtmlElement.idl b/mozilla/dom/public/idl/html/HTMLHtmlElement.idl index 2c93410b919..3b0246ceb01 100644 --- a/mozilla/dom/public/idl/html/HTMLHtmlElement.idl +++ b/mozilla/dom/public/idl/html/HTMLHtmlElement.idl @@ -1,3 +1,6 @@ - interface HTMLHtmlElement : HTMLElement { - attribute wstring version; - }; + interface HTMLHtmlElement : HTMLElement { + /* IID: { 0xa6cf9086, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString version; + }; diff --git a/mozilla/dom/public/idl/html/HTMLIFrameElement.idl b/mozilla/dom/public/idl/html/HTMLIFrameElement.idl index d2e3b16ab7d..45d8f1af374 100644 --- a/mozilla/dom/public/idl/html/HTMLIFrameElement.idl +++ b/mozilla/dom/public/idl/html/HTMLIFrameElement.idl @@ -1,12 +1,15 @@ - interface HTMLIFrameElement : HTMLElement { - attribute wstring align; - attribute wstring frameBorder; - attribute wstring height; - attribute wstring longDesc; - attribute wstring marginHeight; - attribute wstring marginWidth; - attribute wstring name; - attribute wstring scrolling; - attribute wstring src; - attribute wstring width; - }; \ No newline at end of file + interface HTMLIFrameElement : HTMLElement { + /* IID: { 0xa6cf90ba, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString align; + attribute DOMString frameBorder; + attribute DOMString height; + attribute DOMString longDesc; + attribute DOMString marginHeight; + attribute DOMString marginWidth; + attribute DOMString name; + attribute DOMString scrolling; + attribute DOMString src; + attribute DOMString width; + }; diff --git a/mozilla/dom/public/idl/html/HTMLImageElement.idl b/mozilla/dom/public/idl/html/HTMLImageElement.idl index 4c64aae010e..648f7444dfa 100644 --- a/mozilla/dom/public/idl/html/HTMLImageElement.idl +++ b/mozilla/dom/public/idl/html/HTMLImageElement.idl @@ -1,21 +1,30 @@ - interface HTMLImageElement : HTMLElement { - void HTMLImageElement(); + interface HTMLImageElement : HTMLElement { + /* IID: { 0xa6cf90ab, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ - attribute wstring lowSrc; - attribute wstring name; - attribute wstring align; - attribute wstring alt; - attribute wstring border; - attribute wstring height; - attribute wstring hspace; - attribute boolean isMap; - attribute wstring longDesc; - attribute wstring src; - attribute wstring useMap; - attribute wstring vspace; - attribute wstring width; - }; + /* IID: { 0xa6cf90c8, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + void HTMLImageElement(); + + attribute DOMString lowSrc; + attribute DOMString name; + attribute DOMString align; + attribute DOMString alt; + attribute DOMString border; + attribute DOMString height; + attribute DOMString hspace; + attribute boolean isMap; + attribute DOMString longDesc; + attribute DOMString src; + attribute DOMString useMap; + attribute DOMString vspace; + attribute DOMString width; + }; interface Image { + /* IID: { 0xa6cf90c7, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + void Image(); }; \ No newline at end of file diff --git a/mozilla/dom/public/idl/html/HTMLInputElement.idl b/mozilla/dom/public/idl/html/HTMLInputElement.idl index cc2bea3401e..4576d43340f 100644 --- a/mozilla/dom/public/idl/html/HTMLInputElement.idl +++ b/mozilla/dom/public/idl/html/HTMLInputElement.idl @@ -1,24 +1,27 @@ - interface HTMLInputElement : HTMLElement { - attribute wstring defaultValue; - attribute boolean defaultChecked; - readonly attribute HTMLFormElement form; - attribute wstring accept; - attribute wstring accessKey; - attribute wstring align; - attribute wstring alt; - attribute boolean checked; - attribute boolean disabled; - attribute long maxLength; - attribute wstring name; - attribute boolean readOnly; - attribute wstring size; - attribute wstring src; - attribute long tabIndex; - readonly attribute wstring type; - attribute wstring useMap; - attribute wstring value; - void blur(); - void focus(); - void select(); - void click(); - }; + interface HTMLInputElement : HTMLElement { + /* IID: { 0xa6cf9093, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString defaultValue; + attribute boolean defaultChecked; + readonly attribute HTMLFormElement form; + attribute DOMString accept; + attribute DOMString accessKey; + attribute DOMString align; + attribute DOMString alt; + attribute boolean checked; + attribute boolean disabled; + attribute long maxLength; + attribute DOMString name; + attribute boolean readOnly; + attribute DOMString size; + attribute DOMString src; + attribute long tabIndex; + readonly attribute DOMString type; + attribute DOMString useMap; + attribute DOMString value; + void blur(); + void focus(); + void select(); + void click(); + }; diff --git a/mozilla/dom/public/idl/html/HTMLInsElement.idl b/mozilla/dom/public/idl/html/HTMLInsElement.idl deleted file mode 100644 index 8ddb3522fac..00000000000 --- a/mozilla/dom/public/idl/html/HTMLInsElement.idl +++ /dev/null @@ -1,4 +0,0 @@ - interface HTMLInsElement : HTMLElement { - attribute wstring cite; - attribute wstring dateTime; - }; diff --git a/mozilla/dom/public/idl/html/HTMLIsIndexElement.idl b/mozilla/dom/public/idl/html/HTMLIsIndexElement.idl index ee2e170dc37..1fa5e53f49c 100644 --- a/mozilla/dom/public/idl/html/HTMLIsIndexElement.idl +++ b/mozilla/dom/public/idl/html/HTMLIsIndexElement.idl @@ -1,4 +1,7 @@ - interface HTMLIsIndexElement : HTMLElement { - attribute HTMLFormElement form; - attribute wstring prompt; - }; + interface HTMLIsIndexElement : HTMLElement { + /* IID: { 0xa6cf908c, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute HTMLFormElement form; + attribute DOMString prompt; + }; diff --git a/mozilla/dom/public/idl/html/HTMLLIElement.idl b/mozilla/dom/public/idl/html/HTMLLIElement.idl index 73cef8d3bcc..05dde300fa2 100644 --- a/mozilla/dom/public/idl/html/HTMLLIElement.idl +++ b/mozilla/dom/public/idl/html/HTMLLIElement.idl @@ -1,4 +1,7 @@ - interface HTMLLIElement : HTMLElement { - attribute wstring type; - attribute long value; - }; + interface HTMLLIElement : HTMLElement { + /* IID: { 0xa6cf909e, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString type; + attribute long value; + }; diff --git a/mozilla/dom/public/idl/html/HTMLLabelElement.idl b/mozilla/dom/public/idl/html/HTMLLabelElement.idl index 6257ccca8b2..82146b868b1 100644 --- a/mozilla/dom/public/idl/html/HTMLLabelElement.idl +++ b/mozilla/dom/public/idl/html/HTMLLabelElement.idl @@ -1,5 +1,8 @@ - interface HTMLLabelElement : HTMLElement { - attribute HTMLFormElement form; - attribute wstring accessKey; - attribute wstring htmlFor; - }; + interface HTMLLabelElement : HTMLElement { + /* IID: { 0xa6cf9096, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute HTMLFormElement form; + attribute DOMString accessKey; + attribute DOMString htmlFor; + }; diff --git a/mozilla/dom/public/idl/html/HTMLLegendElement.idl b/mozilla/dom/public/idl/html/HTMLLegendElement.idl index dd372665e88..111d6a88aaf 100644 --- a/mozilla/dom/public/idl/html/HTMLLegendElement.idl +++ b/mozilla/dom/public/idl/html/HTMLLegendElement.idl @@ -1,5 +1,8 @@ - interface HTMLLegendElement : HTMLElement { - attribute HTMLFormElement form; - attribute wstring accessKey; - attribute wstring align; - }; + interface HTMLLegendElement : HTMLElement { + /* IID: { 0xa6cf9098, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute HTMLFormElement form; + attribute DOMString accessKey; + attribute DOMString align; + }; diff --git a/mozilla/dom/public/idl/html/HTMLLinkElement.idl b/mozilla/dom/public/idl/html/HTMLLinkElement.idl index b2801c6bace..2a11fce0044 100644 --- a/mozilla/dom/public/idl/html/HTMLLinkElement.idl +++ b/mozilla/dom/public/idl/html/HTMLLinkElement.idl @@ -1,11 +1,14 @@ - interface HTMLLinkElement : HTMLElement { - attribute boolean disabled; - attribute wstring charset; - attribute wstring href; - attribute wstring hreflang; - attribute wstring media; - attribute wstring rel; - attribute wstring rev; - attribute wstring target; - attribute wstring type; - }; + interface HTMLLinkElement : HTMLElement { + /* IID: { 0xa6cf9088, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute boolean disabled; + attribute DOMString charset; + attribute DOMString href; + attribute DOMString hreflang; + attribute DOMString media; + attribute DOMString rel; + attribute DOMString rev; + attribute DOMString target; + attribute DOMString type; + }; diff --git a/mozilla/dom/public/idl/html/HTMLMapElement.idl b/mozilla/dom/public/idl/html/HTMLMapElement.idl index 5a34e5d8744..82cc1369b15 100644 --- a/mozilla/dom/public/idl/html/HTMLMapElement.idl +++ b/mozilla/dom/public/idl/html/HTMLMapElement.idl @@ -1,4 +1,7 @@ - interface HTMLMapElement : HTMLElement { - attribute HTMLCollection areas; - attribute wstring name; - }; + interface HTMLMapElement : HTMLElement { + /* IID: { 0xa6cf90af, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute HTMLCollection areas; + attribute DOMString name; + }; diff --git a/mozilla/dom/public/idl/html/HTMLMenuElement.idl b/mozilla/dom/public/idl/html/HTMLMenuElement.idl index 456a7034197..cfdc7f8ce5b 100644 --- a/mozilla/dom/public/idl/html/HTMLMenuElement.idl +++ b/mozilla/dom/public/idl/html/HTMLMenuElement.idl @@ -1,3 +1,6 @@ - interface HTMLMenuElement : HTMLElement { - attribute boolean compact; - }; + interface HTMLMenuElement : HTMLElement { + /* IID: { 0xa6cf909d, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute boolean compact; + }; diff --git a/mozilla/dom/public/idl/html/HTMLMetaElement.idl b/mozilla/dom/public/idl/html/HTMLMetaElement.idl index 8b626926466..d2b3378bf75 100644 --- a/mozilla/dom/public/idl/html/HTMLMetaElement.idl +++ b/mozilla/dom/public/idl/html/HTMLMetaElement.idl @@ -1,6 +1,9 @@ - interface HTMLMetaElement : HTMLElement { - attribute wstring content; - attribute wstring httpEquiv; - attribute wstring name; - attribute wstring scheme; - }; + interface HTMLMetaElement : HTMLElement { + /* IID: { 0xa6cf908a, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString content; + attribute DOMString httpEquiv; + attribute DOMString name; + attribute DOMString scheme; + }; diff --git a/mozilla/dom/public/idl/html/HTMLModElement.idl b/mozilla/dom/public/idl/html/HTMLModElement.idl index 0bd33b9d526..3e6aa51cff0 100644 --- a/mozilla/dom/public/idl/html/HTMLModElement.idl +++ b/mozilla/dom/public/idl/html/HTMLModElement.idl @@ -1,4 +1,7 @@ - interface HTMLModElement : HTMLElement { - attribute wstring cite; - attribute wstring dateTime; - }; + interface HTMLModElement : HTMLElement { + /* IID: { 0xa6cf90a9, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString cite; + attribute DOMString dateTime; + }; diff --git a/mozilla/dom/public/idl/html/HTMLOListElement.idl b/mozilla/dom/public/idl/html/HTMLOListElement.idl index b6b0a13be39..e3f244c3e5b 100644 --- a/mozilla/dom/public/idl/html/HTMLOListElement.idl +++ b/mozilla/dom/public/idl/html/HTMLOListElement.idl @@ -1,5 +1,8 @@ - interface HTMLOListElement : HTMLElement { - attribute boolean compact; - attribute long start; - attribute wstring type; - }; + interface HTMLOListElement : HTMLElement { + /* IID: { 0xa6cf909a, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute boolean compact; + attribute long start; + attribute DOMString type; + }; diff --git a/mozilla/dom/public/idl/html/HTMLObjectElement.idl b/mozilla/dom/public/idl/html/HTMLObjectElement.idl index 9479df1995a..261a3dfce0c 100644 --- a/mozilla/dom/public/idl/html/HTMLObjectElement.idl +++ b/mozilla/dom/public/idl/html/HTMLObjectElement.idl @@ -1,20 +1,23 @@ - interface HTMLObjectElement : HTMLElement { - attribute HTMLFormElement form; - attribute wstring code; - attribute wstring align; - attribute wstring archive; - attribute wstring border; - attribute wstring codeBase; - attribute wstring codeType; - attribute wstring data; - attribute boolean declare; - attribute wstring height; - attribute wstring hspace; - attribute wstring name; - attribute wstring standby; - attribute long tabIndex; - attribute wstring type; - attribute wstring useMap; - attribute wstring vspace; - attribute wstring width; - }; + interface HTMLObjectElement : HTMLElement { + /* IID: { 0xa6cf90ac, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute HTMLFormElement form; + attribute DOMString code; + attribute DOMString align; + attribute DOMString archive; + attribute DOMString border; + attribute DOMString codeBase; + attribute DOMString codeType; + attribute DOMString data; + attribute boolean declare; + attribute DOMString height; + attribute DOMString hspace; + attribute DOMString name; + attribute DOMString standby; + attribute long tabIndex; + attribute DOMString type; + attribute DOMString useMap; + attribute DOMString vspace; + attribute DOMString width; + }; diff --git a/mozilla/dom/public/idl/html/HTMLOptGroupElement.idl b/mozilla/dom/public/idl/html/HTMLOptGroupElement.idl index 5924a72ce53..8917aae2c08 100644 --- a/mozilla/dom/public/idl/html/HTMLOptGroupElement.idl +++ b/mozilla/dom/public/idl/html/HTMLOptGroupElement.idl @@ -1,4 +1,7 @@ - interface HTMLOptGroupElement : HTMLElement { - attribute boolean disabled; - attribute wstring label; - }; + interface HTMLOptGroupElement : HTMLElement { + /* IID: { 0xa6cf9091, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute boolean disabled; + attribute DOMString label; + }; diff --git a/mozilla/dom/public/idl/html/HTMLOptionElement.idl b/mozilla/dom/public/idl/html/HTMLOptionElement.idl index f577823c4e9..26b1a16e6a0 100644 --- a/mozilla/dom/public/idl/html/HTMLOptionElement.idl +++ b/mozilla/dom/public/idl/html/HTMLOptionElement.idl @@ -1,10 +1,13 @@ - interface HTMLOptionElement : HTMLElement { - attribute HTMLFormElement form; - attribute boolean defaultSelected; - attribute wstring text; - attribute long index; - attribute boolean disabled; - attribute wstring label; - attribute boolean selected; - attribute wstring value; - }; + interface HTMLOptionElement : HTMLElement { + /* IID: { 0xa6cf9092, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute HTMLFormElement form; + attribute boolean defaultSelected; + readonly attribute DOMString text; + attribute long index; + attribute boolean disabled; + attribute DOMString label; + readonly attribute boolean selected; + attribute DOMString value; + }; diff --git a/mozilla/dom/public/idl/html/HTMLParagraphElement.idl b/mozilla/dom/public/idl/html/HTMLParagraphElement.idl index 76cfce76678..77547c99963 100644 --- a/mozilla/dom/public/idl/html/HTMLParagraphElement.idl +++ b/mozilla/dom/public/idl/html/HTMLParagraphElement.idl @@ -1,3 +1,6 @@ - interface HTMLParagraphElement : HTMLElement { - attribute wstring align; - }; + interface HTMLParagraphElement : HTMLElement { + /* IID: { 0xa6cf90a1, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString align; + }; diff --git a/mozilla/dom/public/idl/html/HTMLParamElement.idl b/mozilla/dom/public/idl/html/HTMLParamElement.idl index 23a85102719..173f0c15bbf 100644 --- a/mozilla/dom/public/idl/html/HTMLParamElement.idl +++ b/mozilla/dom/public/idl/html/HTMLParamElement.idl @@ -1,6 +1,9 @@ - interface HTMLParamElement : HTMLElement { - attribute wstring name; - attribute wstring type; - attribute wstring value; - attribute wstring valueType; - }; + interface HTMLParamElement : HTMLElement { + /* IID: { 0xa6cf90ad, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString name; + attribute DOMString type; + attribute DOMString value; + attribute DOMString valueType; + }; diff --git a/mozilla/dom/public/idl/html/HTMLPreElement.idl b/mozilla/dom/public/idl/html/HTMLPreElement.idl index f581e0efa87..f2f15fb0105 100644 --- a/mozilla/dom/public/idl/html/HTMLPreElement.idl +++ b/mozilla/dom/public/idl/html/HTMLPreElement.idl @@ -1,3 +1,6 @@ - interface HTMLPreElement : HTMLElement { - attribute long width; - }; + interface HTMLPreElement : HTMLElement { + /* IID: { 0xa6cf90a4, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute long width; + }; diff --git a/mozilla/dom/public/idl/html/HTMLQuoteElement.idl b/mozilla/dom/public/idl/html/HTMLQuoteElement.idl index 62923fd2aa8..5943d268691 100644 --- a/mozilla/dom/public/idl/html/HTMLQuoteElement.idl +++ b/mozilla/dom/public/idl/html/HTMLQuoteElement.idl @@ -1,3 +1,6 @@ - interface HTMLQuoteElement : HTMLElement { - attribute wstring cite; - }; + interface HTMLQuoteElement : HTMLElement { + /* IID: { 0xa6cf90a3, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString cite; + }; diff --git a/mozilla/dom/public/idl/html/HTMLScriptElement.idl b/mozilla/dom/public/idl/html/HTMLScriptElement.idl index 556bbc9618e..4ce47df204a 100644 --- a/mozilla/dom/public/idl/html/HTMLScriptElement.idl +++ b/mozilla/dom/public/idl/html/HTMLScriptElement.idl @@ -1,9 +1,12 @@ - interface HTMLScriptElement : HTMLElement { - attribute wstring text; - attribute wstring htmlFor; - attribute wstring event; - attribute wstring charset; - attribute boolean defer; - attribute wstring src; - attribute wstring type; - }; + interface HTMLScriptElement : HTMLElement { + /* IID: { 0xa6cf90b1, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString text; + attribute DOMString htmlFor; + attribute DOMString event; + attribute DOMString charset; + attribute boolean defer; + attribute DOMString src; + attribute DOMString type; + }; diff --git a/mozilla/dom/public/idl/html/HTMLSelectElement.idl b/mozilla/dom/public/idl/html/HTMLSelectElement.idl index 5e937b0d2e0..a524c586573 100644 --- a/mozilla/dom/public/idl/html/HTMLSelectElement.idl +++ b/mozilla/dom/public/idl/html/HTMLSelectElement.idl @@ -1,18 +1,21 @@ - interface HTMLSelectElement : HTMLElement { - attribute wstring type; - attribute long selectedIndex; - attribute wstring value; - attribute long length; - attribute HTMLFormElement form; - attribute HTMLCollection options; - attribute boolean disabled; - attribute boolean multiple; - attribute wstring name; - attribute long size; - attribute long tabIndex; - void add(in HTMLElement element, - in HTMLElement before); - void remove(in long index); - void blur(); - void focus(); - }; + interface HTMLSelectElement : HTMLElement { + /* IID: { 0xa6cf9090, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + readonly attribute DOMString type; + attribute long selectedIndex; + attribute DOMString value; + readonly attribute unsigned long length; + readonly attribute HTMLFormElement form; + readonly attribute HTMLCollection options; + attribute boolean disabled; + attribute boolean multiple; + attribute DOMString name; + attribute long size; + attribute long tabIndex; + void add(in HTMLElement element, + in HTMLElement before); + void remove(in long index); + void blur(); + void focus(); + }; diff --git a/mozilla/dom/public/idl/html/HTMLStyleElement.idl b/mozilla/dom/public/idl/html/HTMLStyleElement.idl index 10c5a0e7e96..53938904c7a 100644 --- a/mozilla/dom/public/idl/html/HTMLStyleElement.idl +++ b/mozilla/dom/public/idl/html/HTMLStyleElement.idl @@ -1,5 +1,8 @@ - interface HTMLStyleElement : HTMLElement { - attribute boolean disabled; - attribute wstring media; - attribute wstring type; - }; + interface HTMLStyleElement : HTMLElement { + /* IID: { 0xa6cf908d, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute boolean disabled; + attribute DOMString media; + attribute DOMString type; + }; diff --git a/mozilla/dom/public/idl/html/HTMLTableCaptionElement.idl b/mozilla/dom/public/idl/html/HTMLTableCaptionElement.idl index 419ea865ecb..af722109d2e 100644 --- a/mozilla/dom/public/idl/html/HTMLTableCaptionElement.idl +++ b/mozilla/dom/public/idl/html/HTMLTableCaptionElement.idl @@ -1,3 +1,6 @@ - interface HTMLTableCaptionElement : HTMLElement { - attribute wstring align; - }; + interface HTMLTableCaptionElement : HTMLElement { + /* IID: { 0xa6cf90b3, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString align; + }; diff --git a/mozilla/dom/public/idl/html/HTMLTableCellElement.idl b/mozilla/dom/public/idl/html/HTMLTableCellElement.idl index d745cf39c6f..3afb5f8ad26 100644 --- a/mozilla/dom/public/idl/html/HTMLTableCellElement.idl +++ b/mozilla/dom/public/idl/html/HTMLTableCellElement.idl @@ -1,17 +1,20 @@ - interface HTMLTableCellElement : HTMLElement { - attribute long cellIndex; - attribute wstring abbr; - attribute wstring align; - attribute wstring axis; - attribute wstring bgColor; - attribute wstring ch; - attribute wstring chOff; - attribute long colSpan; - attribute wstring headers; - attribute wstring height; - attribute boolean noWrap; - attribute long rowSpan; - attribute wstring scope; - attribute wstring vAlign; - attribute wstring width; - }; + interface HTMLTableCellElement : HTMLElement { + /* IID: { 0xa6cf90b7, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute long cellIndex; + attribute DOMString abbr; + attribute DOMString align; + attribute DOMString axis; + attribute DOMString bgColor; + attribute DOMString ch; + attribute DOMString chOff; + attribute long colSpan; + attribute DOMString headers; + attribute DOMString height; + attribute boolean noWrap; + attribute long rowSpan; + attribute DOMString scope; + attribute DOMString vAlign; + attribute DOMString width; + }; diff --git a/mozilla/dom/public/idl/html/HTMLTableColElement.idl b/mozilla/dom/public/idl/html/HTMLTableColElement.idl index 00fc5e5dcae..3f10b79f24d 100644 --- a/mozilla/dom/public/idl/html/HTMLTableColElement.idl +++ b/mozilla/dom/public/idl/html/HTMLTableColElement.idl @@ -1,8 +1,11 @@ - interface HTMLTableColElement : HTMLElement { - attribute wstring align; - attribute wstring ch; - attribute wstring chOff; - attribute long span; - attribute wstring vAlign; - attribute wstring width; - }; + interface HTMLTableColElement : HTMLElement { + /* IID: { 0xa6cf90b4, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString align; + attribute DOMString ch; + attribute DOMString chOff; + attribute long span; + attribute DOMString vAlign; + attribute DOMString width; + }; diff --git a/mozilla/dom/public/idl/html/HTMLTableElement.idl b/mozilla/dom/public/idl/html/HTMLTableElement.idl index f5b3a77b954..77203013951 100644 --- a/mozilla/dom/public/idl/html/HTMLTableElement.idl +++ b/mozilla/dom/public/idl/html/HTMLTableElement.idl @@ -1,24 +1,27 @@ - interface HTMLTableElement : HTMLElement { - attribute HTMLTableCaptionElement caption; - attribute HTMLTableSectionElement tHead; - attribute HTMLTableSectionElement tFoot; - attribute HTMLCollection rows; - attribute HTMLCollection tBodies; - attribute wstring align; - attribute wstring bgColor; - attribute wstring border; - attribute wstring cellPadding; - attribute wstring cellSpacing; - attribute wstring frame; - attribute wstring rules; - attribute wstring summary; - attribute wstring width; - HTMLElement createTHead(); - void deleteTHead(); - HTMLElement createTFoot(); - void deleteTFoot(); - HTMLElement createCaption(); - void deleteCaption(); - HTMLElement insertRow(in long index); - void deleteRow(in long index); - }; + interface HTMLTableElement : HTMLElement { + /* IID: { 0xa6cf90b2, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute HTMLTableCaptionElement caption; + attribute HTMLTableSectionElement tHead; + attribute HTMLTableSectionElement tFoot; + readonly attribute HTMLCollection rows; + readonly attribute HTMLCollection tBodies; + attribute DOMString align; + attribute DOMString bgColor; + attribute DOMString border; + attribute DOMString cellPadding; + attribute DOMString cellSpacing; + attribute DOMString frame; + attribute DOMString rules; + attribute DOMString summary; + attribute DOMString width; + HTMLElement createTHead(); + void deleteTHead(); + HTMLElement createTFoot(); + void deleteTFoot(); + HTMLElement createCaption(); + void deleteCaption(); + HTMLElement insertRow(in long index); + void deleteRow(in long index); + }; diff --git a/mozilla/dom/public/idl/html/HTMLTableRowElement.idl b/mozilla/dom/public/idl/html/HTMLTableRowElement.idl index 86c2d505f1b..888ac66bdfd 100644 --- a/mozilla/dom/public/idl/html/HTMLTableRowElement.idl +++ b/mozilla/dom/public/idl/html/HTMLTableRowElement.idl @@ -1,12 +1,15 @@ - interface HTMLTableRowElement : HTMLElement { - attribute long rowIndex; - attribute long sectionRowIndex; - attribute HTMLCollection cells; - attribute wstring align; - attribute wstring bgColor; - attribute wstring ch; - attribute wstring chOff; - attribute wstring vAlign; - HTMLElement insertCell(in long index); - void deleteCell(in long index); - }; + interface HTMLTableRowElement : HTMLElement { + /* IID: { 0xa6cf90b6, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute long rowIndex; + attribute long sectionRowIndex; + attribute HTMLCollection cells; + attribute DOMString align; + attribute DOMString bgColor; + attribute DOMString ch; + attribute DOMString chOff; + attribute DOMString vAlign; + HTMLElement insertCell(in long index); + void deleteCell(in long index); + }; diff --git a/mozilla/dom/public/idl/html/HTMLTableSectionElement.idl b/mozilla/dom/public/idl/html/HTMLTableSectionElement.idl index 3b217918151..175b8a37069 100644 --- a/mozilla/dom/public/idl/html/HTMLTableSectionElement.idl +++ b/mozilla/dom/public/idl/html/HTMLTableSectionElement.idl @@ -1,7 +1,12 @@ - interface HTMLTableSectionElement : HTMLElement { - attribute wstring align; - attribute wstring vAlign; - attribute HTMLCollection rows; - HTMLElement insertRow(in long index); - void deleteRow(in long index); - }; + interface HTMLTableSectionElement : HTMLElement { + /* IID: { 0xa6cf90b5, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString align; + attribute DOMString ch; + attribute DOMString chOff; + attribute DOMString vAlign; + readonly attribute HTMLCollection rows; + HTMLElement insertRow(in long index); + void deleteRow(in long index); + }; diff --git a/mozilla/dom/public/idl/html/HTMLTbodyElement.idl b/mozilla/dom/public/idl/html/HTMLTbodyElement.idl deleted file mode 100644 index cd1b7efd1b4..00000000000 --- a/mozilla/dom/public/idl/html/HTMLTbodyElement.idl +++ /dev/null @@ -1,6 +0,0 @@ - interface HTMLTbodyElement : HTMLElement { - attribute wstring align; - attribute wstring ch; - attribute wstring chOff; - attribute wstring vAlign; - }; diff --git a/mozilla/dom/public/idl/html/HTMLTextAreaElement.idl b/mozilla/dom/public/idl/html/HTMLTextAreaElement.idl index 330d20267f4..4648d459e3d 100644 --- a/mozilla/dom/public/idl/html/HTMLTextAreaElement.idl +++ b/mozilla/dom/public/idl/html/HTMLTextAreaElement.idl @@ -1,14 +1,19 @@ - interface HTMLTextAreaElement : HTMLElement { - attribute wstring defaultValue; - attribute HTMLFormElement form; - attribute wstring accessKey; - attribute long cols; - attribute boolean disabled; - attribute wstring name; - attribute boolean readOnly; - attribute long rows; - attribute long tabIndex; - void blur(); - void focus(); - void select(); - }; + interface HTMLTextAreaElement : HTMLElement { + /* IID: { 0xa6cf9094, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString defaultValue; + readonly attribute HTMLFormElement form; + attribute DOMString accessKey; + attribute long cols; + attribute boolean disabled; + attribute DOMString name; + attribute boolean readOnly; + attribute long rows; + attribute long tabIndex; + readonly attribute DOMString type; + attribute DOMString value; + void blur(); + void focus(); + void select(); + }; diff --git a/mozilla/dom/public/idl/html/HTMLTfootElement.idl b/mozilla/dom/public/idl/html/HTMLTfootElement.idl deleted file mode 100644 index 111fbc0c5cb..00000000000 --- a/mozilla/dom/public/idl/html/HTMLTfootElement.idl +++ /dev/null @@ -1,6 +0,0 @@ - interface HTMLTfootElement : HTMLElement { - attribute wstring align; - attribute wstring ch; - attribute wstring chOff; - attribute wstring vAlign; - }; diff --git a/mozilla/dom/public/idl/html/HTMLTheadElement.idl b/mozilla/dom/public/idl/html/HTMLTheadElement.idl deleted file mode 100644 index c40ea7cd8cd..00000000000 --- a/mozilla/dom/public/idl/html/HTMLTheadElement.idl +++ /dev/null @@ -1,6 +0,0 @@ - interface HTMLTheadElement : HTMLElement { - attribute wstring align; - attribute wstring ch; - attribute wstring chOff; - attribute wstring vAlign; - }; diff --git a/mozilla/dom/public/idl/html/HTMLTitleElement.idl b/mozilla/dom/public/idl/html/HTMLTitleElement.idl index 03be6c10f03..f04055f346f 100644 --- a/mozilla/dom/public/idl/html/HTMLTitleElement.idl +++ b/mozilla/dom/public/idl/html/HTMLTitleElement.idl @@ -1,3 +1,6 @@ - interface HTMLTitleElement : HTMLElement { - attribute wstring text; - }; + interface HTMLTitleElement : HTMLElement { + /* IID: { 0xa6cf9089, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute DOMString text; + }; diff --git a/mozilla/dom/public/idl/html/HTMLUListElement.idl b/mozilla/dom/public/idl/html/HTMLUListElement.idl index abde6a0a093..9f29f78f2ed 100644 --- a/mozilla/dom/public/idl/html/HTMLUListElement.idl +++ b/mozilla/dom/public/idl/html/HTMLUListElement.idl @@ -1,4 +1,7 @@ - interface HTMLUListElement : HTMLElement { - attribute boolean compact; - attribute wstring type; - }; + interface HTMLUListElement : HTMLElement { + /* IID: { 0xa6cf9099, 0x15b3, 0x11d2, \ + { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */ + + attribute boolean compact; + attribute DOMString type; + }; diff --git a/mozilla/dom/public/idl/html/makefile.win b/mozilla/dom/public/idl/html/makefile.win index 2bf314dfa49..1ab3b6bacb1 100644 --- a/mozilla/dom/public/idl/html/makefile.win +++ b/mozilla/dom/public/idl/html/makefile.win @@ -28,11 +28,11 @@ IDLSRCS = \ HTMLBRElement.idl \ HTMLBaseElement.idl \ HTMLBaseFontElement.idl \ + HTMLBlockquoteElement.idl \ HTMLBodyElement.idl \ HTMLButtonElement.idl \ HTMLCollection.idl \ HTMLDListElement.idl \ - HTMLDelElement.idl \ HTMLDirectoryElement.idl \ HTMLDivElement.idl \ HTMLDocument.idl \ @@ -48,7 +48,6 @@ IDLSRCS = \ HTMLHtmlElement.idl \ HTMLImageElement.idl \ HTMLInputElement.idl \ - HTMLInsElement.idl \ HTMLIsIndexElement.idl \ HTMLLIElement.idl \ HTMLLabelElement.idl \ @@ -75,10 +74,7 @@ IDLSRCS = \ HTMLTableElement.idl \ HTMLTableRowElement.idl \ HTMLTableSectionElement.idl \ - HTMLTbodyElement.idl \ HTMLTextAreaElement.idl \ - HTMLTfootElement.idl \ - HTMLTheadElement.idl \ HTMLTitleElement.idl \ HTMLUListElement.idl diff --git a/mozilla/dom/public/idl/makefile.win b/mozilla/dom/public/idl/makefile.win index 4791550b8a4..9d204119948 100644 --- a/mozilla/dom/public/idl/makefile.win +++ b/mozilla/dom/public/idl/makefile.win @@ -18,50 +18,7 @@ DEPTH=..\..\.. IGNORE_MANIFEST=1 -DIRS=coreDom html events css -MODULE=raptor +DIRS=coreDom html events css base -IDLSRCS = \ - Navigator.idl \ - Location.idl \ - WindowCollection.idl - -GLOBAL_IDLSRC = Window.idl - -XPCOM_DESTDIR=$(DEPTH)\dom\public -JSSTUB_DESTDIR=$(DEPTH)\dom\src\base -GENXDIR=genx -GENJSDIR=genjs - -IIDDIRS=$(DIRS: =/genx )/$(GENXDIR) $(GENXDIR) - -!include <$(DEPTH)\config\rules.mak> - -$(GENXDIR): - -mkdir $(GENXDIR) - -$(GENJSDIR): - -mkdir $(GENJSDIR) - -IDLC=$(DIST)\bin\idlc.exe -GENIID=$(DIST)\bin\geniid.pl - -export:: $(GENXDIR) $(GENJSDIR) $(IDLSRCS) - @echo +++ make: generating xpcom headers - $(IDLC) -d $(GENXDIR) -x $(IDLSRCS) - $(IDLC) -d $(GENXDIR) -g -x $(GLOBAL_IDLSRC) - @echo +++ make: generating JavaScript stubs - $(IDLC) -d $(GENJSDIR) -j $(IDLSRCS) - $(IDLC) -d $(GENJSDIR) -g -j $(GLOBAL_IDLSRC) - @echo +++ make: generating interface ids - @echo +++ make: directories $(IIDDIRS) - $(PERL) $(GENIID) $(IIDDIRS) - -install:: - $(MAKE_INSTALL:/=\) $(GENXDIR)\nsIDOMEventCapturer.h $(XPCOM_DESTDIR)\coreEvents - $(RM) $(GENXDIR)\nsIDOMEventCapturer.h - $(MAKE_INSTALL:/=\) $(GENXDIR)\nsIDOM*.h $(XPCOM_DESTDIR) - $(MAKE_INSTALL:/=\) $(GENXDIR)\nsIDOM$(GLOBAL_IDLSRC:.idl=.h) $(XPCOM_DESTDIR) - $(MAKE_INSTALL:/=\) $(GENJSDIR)\nsJS*.cpp $(JSSTUB_DESTDIR) - $(MAKE_INSTALL:/=\) $(GENJSDIR)\nsJS$(GLOBAL_IDLSRC:.idl=.cpp) $(JSSTUB_DESTDIR) +include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/dom/public/makefile.win b/mozilla/dom/public/makefile.win index dc6c7ae7884..e21d2cdc49a 100644 --- a/mozilla/dom/public/makefile.win +++ b/mozilla/dom/public/makefile.win @@ -18,12 +18,11 @@ DEPTH=..\.. IGNORE_MANIFEST=1 -DIRS=coreDom coreEvents events html css +DIRS=base coreDom coreEvents events html css DEFINES=-D_IMPL_NS_DOM EXPORTS=nsIScriptContext.h nsIJSScriptObject.h nsIScriptObjectOwner.h \ - nsIScriptGlobalObject.h nsIDOMWindow.h nsIScriptContextOwner.h \ - nsIDOMNavigator.h nsIScriptEventListener.h nsIDOMLocation.h \ - nsIDOMWindowCollection.h nsIDOMScriptObjectFactory.h \ + nsIScriptGlobalObject.h nsIScriptContextOwner.h \ + nsIScriptEventListener.h nsIDOMScriptObjectFactory.h \ nsIDOMNativeObjectRegistry.h nsDOMCID.h MODULE=dom diff --git a/mozilla/dom/public/nsIDOMScriptObjectFactory.h b/mozilla/dom/public/nsIDOMScriptObjectFactory.h index f7aa763092c..08a40cc06a5 100644 --- a/mozilla/dom/public/nsIDOMScriptObjectFactory.h +++ b/mozilla/dom/public/nsIDOMScriptObjectFactory.h @@ -30,10 +30,10 @@ class nsIScriptContext; class nsIDOMScriptObjectFactory : public nsISupports { public: - NS_IMETHOD NewScriptAttribute(nsIScriptContext *aContext, - nsISupports *aAttribute, - nsISupports *aParent, - void** aReturn)=0; + NS_IMETHOD NewScriptAttr(nsIScriptContext *aContext, + nsISupports *aAttribute, + nsISupports *aParent, + void** aReturn)=0; NS_IMETHOD NewScriptComment(nsIScriptContext *aContext, nsISupports *aComment, @@ -56,17 +56,17 @@ public: nsISupports *aParent, void** aReturn)=0; - NS_IMETHOD NewScriptDOM(nsIScriptContext *aContext, - nsISupports *aDOM, - nsISupports *aParent, - void** aReturn)=0; - - NS_IMETHOD NewScriptData(const int aNodeType, - nsIScriptContext *aContext, - nsISupports *aData, - nsISupports *aParent, - void** aReturn)=0; + NS_IMETHOD NewScriptDOMImplementation(nsIScriptContext *aContext, + nsISupports *aDOM, + nsISupports *aParent, + void** aReturn)=0; + NS_IMETHOD NewScriptCharacterData(const int aNodeType, + nsIScriptContext *aContext, + nsISupports *aData, + nsISupports *aParent, + void** aReturn)=0; + NS_IMETHOD NewScriptElement(const nsString &aTagName, nsIScriptContext *aContext, nsISupports *aElement, diff --git a/mozilla/dom/src/base/nsJSEnvironment.cpp b/mozilla/dom/src/base/nsJSEnvironment.cpp index 5d188622596..a7e0ea64c4b 100644 --- a/mozilla/dom/src/base/nsJSEnvironment.cpp +++ b/mozilla/dom/src/base/nsJSEnvironment.cpp @@ -24,7 +24,7 @@ #include "nsIDOMElement.h" #include "nsIDOMDocument.h" #include "nsIDOMText.h" -#include "nsIDOMAttribute.h" +#include "nsIDOMAttr.h" #include "nsIDOMNamedNodeMap.h" #include "nsIDOMNodeList.h" #include "nsIDOMHTMLImageElement.h" @@ -136,7 +136,7 @@ nsresult nsJSContext::InitClasses() NS_OK == NS_InitElementClass(this, nsnull) && NS_OK == NS_InitDocumentClass(this, nsnull) && NS_OK == NS_InitTextClass(this, nsnull) && - NS_OK == NS_InitAttributeClass(this, nsnull) && + NS_OK == NS_InitAttrClass(this, nsnull) && NS_OK == NS_InitNamedNodeMapClass(this, nsnull) && NS_OK == NS_InitNodeListClass(this, nsnull) && // XXX Temporarily here. This shouldn't be hardcoded. diff --git a/mozilla/dom/src/base/nsJSWindow.cpp b/mozilla/dom/src/base/nsJSWindow.cpp index 78a0bfdac8c..73d67188a47 100644 --- a/mozilla/dom/src/base/nsJSWindow.cpp +++ b/mozilla/dom/src/base/nsJSWindow.cpp @@ -1542,7 +1542,7 @@ PR_STATIC_CALLBACK(JSBool) EventCapturerCaptureEvent(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { nsIDOMWindow *privateThis = (nsIDOMWindow*)JS_GetPrivate(cx, obj); - nsIDOMEventCapturer *nativeThis; + nsIDOMEventCapturer *nativeThis = nsnull; if (NS_OK != privateThis->QueryInterface(kIEventCapturerIID, (void **)nativeThis)) { JS_ReportError(cx, "Object must be of type EventCapturer"); return JS_FALSE; @@ -1590,7 +1590,7 @@ PR_STATIC_CALLBACK(JSBool) EventCapturerReleaseEvent(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { nsIDOMWindow *privateThis = (nsIDOMWindow*)JS_GetPrivate(cx, obj); - nsIDOMEventCapturer *nativeThis; + nsIDOMEventCapturer *nativeThis = nsnull; if (NS_OK != privateThis->QueryInterface(kIEventCapturerIID, (void **)nativeThis)) { JS_ReportError(cx, "Object must be of type EventCapturer"); return JS_FALSE; diff --git a/mozilla/dom/src/build/nsDOMFactory.cpp b/mozilla/dom/src/build/nsDOMFactory.cpp index 43b0e656f82..4685e0551e6 100644 --- a/mozilla/dom/src/build/nsDOMFactory.cpp +++ b/mozilla/dom/src/build/nsDOMFactory.cpp @@ -28,11 +28,11 @@ #include "jsurl.h" #include "nsIScriptContext.h" #include "nsHTMLTagsEnums.h" -#include "nsIDOMAttribute.h" +#include "nsIDOMAttr.h" #include "nsIDOMCDATASection.h" #include "nsIDOMComment.h" -#include "nsIDOMDOM.h" -#include "nsIDOMData.h" +#include "nsIDOMDOMImplementation.h" +#include "nsIDOMCharacterData.h" #include "nsIDOMDocument.h" #include "nsIDOMDocumentFragment.h" #include "nsIDOMDocumentType.h" @@ -52,7 +52,6 @@ #include "nsIDOMHTMLButtonElement.h" #include "nsIDOMHTMLCollection.h" #include "nsIDOMHTMLDListElement.h" -#include "nsIDOMHTMLDelElement.h" #include "nsIDOMHTMLDirectoryElement.h" #include "nsIDOMHTMLDivElement.h" #include "nsIDOMHTMLDocument.h" @@ -68,7 +67,6 @@ #include "nsIDOMHTMLIFrameElement.h" #include "nsIDOMHTMLImageElement.h" #include "nsIDOMHTMLInputElement.h" -#include "nsIDOMHTMLInsElement.h" #include "nsIDOMHTMLIsIndexElement.h" #include "nsIDOMHTMLLIElement.h" #include "nsIDOMHTMLLabelElement.h" @@ -95,10 +93,7 @@ #include "nsIDOMHTMLTableElement.h" #include "nsIDOMHTMLTableRowElement.h" #include "nsIDOMHTMLTableSectionElement.h" -#include "nsIDOMHTMLTbodyElement.h" #include "nsIDOMHTMLTextAreaElement.h" -#include "nsIDOMHTMLTfootElement.h" -#include "nsIDOMHTMLTheadElement.h" #include "nsIDOMHTMLTitleElement.h" #include "nsIDOMHTMLUListElement.h" #include "nsIDOMNSHTMLDocument.h" @@ -200,10 +195,10 @@ public: NS_DECL_ISUPPORTS - NS_IMETHOD NewScriptAttribute(nsIScriptContext *aContext, - nsISupports *aAttribute, - nsISupports *aParent, - void** aReturn); + NS_IMETHOD NewScriptAttr(nsIScriptContext *aContext, + nsISupports *aAttribute, + nsISupports *aParent, + void** aReturn); NS_IMETHOD NewScriptComment(nsIScriptContext *aContext, nsISupports *aComment, @@ -226,17 +221,17 @@ public: nsISupports *aParent, void** aReturn); - NS_IMETHOD NewScriptDOM(nsIScriptContext *aContext, - nsISupports *aDOM, - nsISupports *aParent, - void** aReturn); + NS_IMETHOD NewScriptDOMImplementation(nsIScriptContext *aContext, + nsISupports *aDOM, + nsISupports *aParent, + void** aReturn); + + NS_IMETHOD NewScriptCharacterData(const int aNodeType, + nsIScriptContext *aContext, + nsISupports *aData, + nsISupports *aParent, + void** aReturn); - NS_IMETHOD NewScriptData(const int aNodeType, - nsIScriptContext *aContext, - nsISupports *aData, - nsISupports *aParent, - void** aReturn); - NS_IMETHOD NewScriptElement(const nsString &aTagName, nsIScriptContext *aContext, nsISupports *aElement, @@ -277,12 +272,12 @@ nsDOMScriptObjectFactory::~nsDOMScriptObjectFactory() NS_IMPL_ISUPPORTS(nsDOMScriptObjectFactory, kIDOMScriptObjectFactory); NS_IMETHODIMP -nsDOMScriptObjectFactory::NewScriptAttribute(nsIScriptContext *aContext, - nsISupports *aAttribute, - nsISupports *aParent, - void** aReturn) +nsDOMScriptObjectFactory::NewScriptAttr(nsIScriptContext *aContext, + nsISupports *aAttribute, + nsISupports *aParent, + void** aReturn) { - return NS_NewScriptAttribute(aContext, aAttribute, aParent, aReturn); + return NS_NewScriptAttr(aContext, aAttribute, aParent, aReturn); } NS_IMETHODIMP @@ -323,22 +318,22 @@ nsDOMScriptObjectFactory::NewScriptDocumentType(nsIScriptContext *aContext, } NS_IMETHODIMP -nsDOMScriptObjectFactory::NewScriptDOM(nsIScriptContext *aContext, - nsISupports *aDOM, - nsISupports *aParent, - void** aReturn) +nsDOMScriptObjectFactory::NewScriptDOMImplementation(nsIScriptContext *aContext, + nsISupports *aDOM, + nsISupports *aParent, + void** aReturn) { - return NS_NewScriptDOM(aContext, aDOM, aParent, aReturn); + return NS_NewScriptDOMImplementation(aContext, aDOM, aParent, aReturn); } NS_IMETHODIMP -nsDOMScriptObjectFactory::NewScriptData(const int aNodeType, - nsIScriptContext *aContext, - nsISupports *aData, - nsISupports *aParent, - void** aReturn) +nsDOMScriptObjectFactory::NewScriptCharacterData(const int aNodeType, + nsIScriptContext *aContext, + nsISupports *aData, + nsISupports *aParent, + void** aReturn) { - if (aNodeType == nsIDOMNode::CDATA_SECTION) { + if (aNodeType == nsIDOMNode::CDATA_SECTION_NODE) { return NS_NewScriptCDATASection(aContext, aData, aParent, aReturn); } else { diff --git a/mozilla/dom/src/coreDOM/Makefile b/mozilla/dom/src/coreDOM/Makefile index 6d016621d67..4a75cfb2d99 100644 --- a/mozilla/dom/src/coreDOM/Makefile +++ b/mozilla/dom/src/coreDOM/Makefile @@ -20,15 +20,17 @@ DEPTH=../../.. LIBRARY_NAME = jsdomcore_s CPPSRCS = \ - nsJSAttribute.cpp \ + nsJSAttr.cpp \ nsJSCDATASection.cpp \ nsJSComment.cpp \ - nsJSDOM.cpp \ - nsJSData.cpp \ + nsJSDOMImplementation.cpp \ + nsJSCharacterData.cpp \ nsJSDocument.cpp \ nsJSDocumentFragment.cpp \ nsJSDocumentType.cpp \ nsJSElement.cpp \ + nsJSEntity.cpp \ + nsJSEntityReference.cpp \ nsJSNamedNodeMap.cpp \ nsJSNode.cpp \ nsJSNodeList.cpp \ diff --git a/mozilla/dom/src/coreDOM/makefile.win b/mozilla/dom/src/coreDOM/makefile.win index d9a7dffa594..151076b9b30 100644 --- a/mozilla/dom/src/coreDOM/makefile.win +++ b/mozilla/dom/src/coreDOM/makefile.win @@ -24,15 +24,17 @@ REQUIRES=xpcom raptor js netlib DEFINES=-D_IMPL_NS_DOM -DWIN32_LEAN_AND_MEAN CPPSRCS = \ - nsJSAttribute.cpp \ + nsJSAttr.cpp \ nsJSCDATASection.cpp \ nsJSComment.cpp \ - nsJSDOM.cpp \ - nsJSData.cpp \ + nsJSDOMImplementation.cpp \ + nsJSCharacterData.cpp \ nsJSDocument.cpp \ nsJSDocumentFragment.cpp \ nsJSDocumentType.cpp \ nsJSElement.cpp \ + nsJSEntity.cpp \ + nsJSEntityReference.cpp \ nsJSNamedNodeMap.cpp \ nsJSNode.cpp \ nsJSNodeList.cpp \ @@ -43,15 +45,17 @@ CPPSRCS = \ $(NULL) CPP_OBJS= \ - .\$(OBJDIR)\nsJSAttribute.obj \ + .\$(OBJDIR)\nsJSAttr.obj \ .\$(OBJDIR)\nsJSCDATASection.obj \ .\$(OBJDIR)\nsJSComment.obj \ - .\$(OBJDIR)\nsJSDOM.obj \ - .\$(OBJDIR)\nsJSData.obj \ + .\$(OBJDIR)\nsJSDOMImplementation.obj \ + .\$(OBJDIR)\nsJSCharacterData.obj \ .\$(OBJDIR)\nsJSDocument.obj \ .\$(OBJDIR)\nsJSDocumentFragment.obj \ .\$(OBJDIR)\nsJSDocumentType.obj \ .\$(OBJDIR)\nsJSElement.obj \ + .\$(OBJDIR)\nsJSEntity.obj \ + .\$(OBJDIR)\nsJSEntityReference.obj \ .\$(OBJDIR)\nsJSNamedNodeMap.obj \ .\$(OBJDIR)\nsJSNode.obj \ .\$(OBJDIR)\nsJSNodeList.obj \ diff --git a/mozilla/dom/src/coreDOM/nsJSAttribute.cpp b/mozilla/dom/src/coreDOM/nsJSAttr.cpp similarity index 69% rename from mozilla/dom/src/coreDOM/nsJSAttribute.cpp rename to mozilla/dom/src/coreDOM/nsJSAttr.cpp index ff979309663..ed8281357c5 100644 --- a/mozilla/dom/src/coreDOM/nsJSAttribute.cpp +++ b/mozilla/dom/src/coreDOM/nsJSAttr.cpp @@ -25,33 +25,33 @@ #include "nsIScriptGlobalObject.h" #include "nsIPtr.h" #include "nsString.h" -#include "nsIDOMAttribute.h" +#include "nsIDOMAttr.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(kIAttributeIID, NS_IDOMATTRIBUTE_IID); +static NS_DEFINE_IID(kIAttrIID, NS_IDOMATTR_IID); -NS_DEF_PTR(nsIDOMAttribute); +NS_DEF_PTR(nsIDOMAttr); // -// Attribute property ids +// Attr property ids // -enum Attribute_slots { - ATTRIBUTE_NAME = -1, - ATTRIBUTE_SPECIFIED = -2, - ATTRIBUTE_VALUE = -3 +enum Attr_slots { + ATTR_NAME = -1, + ATTR_SPECIFIED = -2, + ATTR_VALUE = -3 }; /***********************************************************************/ // -// Attribute Properties Getter +// Attr Properties Getter // PR_STATIC_CALLBACK(JSBool) -GetAttributeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +GetAttrProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) { - nsIDOMAttribute *a = (nsIDOMAttribute*)JS_GetPrivate(cx, obj); + nsIDOMAttr *a = (nsIDOMAttr*)JS_GetPrivate(cx, obj); // If there's no private data, this must be the prototype, so ignore if (nsnull == a) { @@ -60,7 +60,7 @@ GetAttributeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case ATTRIBUTE_NAME: + case ATTR_NAME: { nsAutoString prop; if (NS_OK == a->GetName(prop)) { @@ -73,7 +73,7 @@ GetAttributeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } break; } - case ATTRIBUTE_SPECIFIED: + case ATTR_SPECIFIED: { PRBool prop; if (NS_OK == a->GetSpecified(&prop)) { @@ -84,7 +84,7 @@ GetAttributeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } break; } - case ATTRIBUTE_VALUE: + case ATTR_VALUE: { nsAutoString prop; if (NS_OK == a->GetValue(prop)) { @@ -124,12 +124,12 @@ GetAttributeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) /***********************************************************************/ // -// Attribute Properties Setter +// Attr Properties Setter // PR_STATIC_CALLBACK(JSBool) -SetAttributeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +SetAttrProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) { - nsIDOMAttribute *a = (nsIDOMAttribute*)JS_GetPrivate(cx, obj); + nsIDOMAttr *a = (nsIDOMAttr*)JS_GetPrivate(cx, obj); // If there's no private data, this must be the prototype, so ignore if (nsnull == a) { @@ -138,19 +138,18 @@ SetAttributeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case ATTRIBUTE_SPECIFIED: + case ATTR_VALUE: { - PRBool prop; - JSBool temp; - if (JSVAL_IS_BOOLEAN(*vp) && JS_ValueToBoolean(cx, *vp, &temp)) { - prop = (PRBool)temp; + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); } else { - JS_ReportError(cx, "Parameter must be a boolean"); - return JS_FALSE; + prop.SetString((const char *)nsnull); } - a->SetSpecified(prop); + a->SetValue(prop); break; } @@ -181,12 +180,12 @@ SetAttributeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) // -// Attribute finalizer +// Attr finalizer // PR_STATIC_CALLBACK(void) -FinalizeAttribute(JSContext *cx, JSObject *obj) +FinalizeAttr(JSContext *cx, JSObject *obj) { - nsIDOMAttribute *a = (nsIDOMAttribute*)JS_GetPrivate(cx, obj); + nsIDOMAttr *a = (nsIDOMAttr*)JS_GetPrivate(cx, obj); if (nsnull != a) { // get the js object @@ -202,12 +201,12 @@ FinalizeAttribute(JSContext *cx, JSObject *obj) // -// Attribute enumerate +// Attr enumerate // PR_STATIC_CALLBACK(JSBool) -EnumerateAttribute(JSContext *cx, JSObject *obj) +EnumerateAttr(JSContext *cx, JSObject *obj) { - nsIDOMAttribute *a = (nsIDOMAttribute*)JS_GetPrivate(cx, obj); + nsIDOMAttr *a = (nsIDOMAttr*)JS_GetPrivate(cx, obj); if (nsnull != a) { // get the js object @@ -222,12 +221,12 @@ EnumerateAttribute(JSContext *cx, JSObject *obj) // -// Attribute resolve +// Attr resolve // PR_STATIC_CALLBACK(JSBool) -ResolveAttribute(JSContext *cx, JSObject *obj, jsval id) +ResolveAttr(JSContext *cx, JSObject *obj, jsval id) { - nsIDOMAttribute *a = (nsIDOMAttribute*)JS_GetPrivate(cx, obj); + nsIDOMAttr *a = (nsIDOMAttr*)JS_GetPrivate(cx, obj); if (nsnull != a) { // get the js object @@ -243,57 +242,57 @@ ResolveAttribute(JSContext *cx, JSObject *obj, jsval id) /***********************************************************************/ // -// class for Attribute +// class for Attr // -JSClass AttributeClass = { - "Attribute", +JSClass AttrClass = { + "Attr", JSCLASS_HAS_PRIVATE, JS_PropertyStub, JS_PropertyStub, - GetAttributeProperty, - SetAttributeProperty, - EnumerateAttribute, - ResolveAttribute, + GetAttrProperty, + SetAttrProperty, + EnumerateAttr, + ResolveAttr, JS_ConvertStub, - FinalizeAttribute + FinalizeAttr }; // -// Attribute class properties +// Attr class properties // -static JSPropertySpec AttributeProperties[] = +static JSPropertySpec AttrProperties[] = { - {"name", ATTRIBUTE_NAME, JSPROP_ENUMERATE | JSPROP_READONLY}, - {"specified", ATTRIBUTE_SPECIFIED, JSPROP_ENUMERATE}, - {"value", ATTRIBUTE_VALUE, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"name", ATTR_NAME, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"specified", ATTR_SPECIFIED, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"value", ATTR_VALUE, JSPROP_ENUMERATE}, {0} }; // -// Attribute class methods +// Attr class methods // -static JSFunctionSpec AttributeMethods[] = +static JSFunctionSpec AttrMethods[] = { {0} }; // -// Attribute constructor +// Attr constructor // PR_STATIC_CALLBACK(JSBool) -Attribute(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +Attr(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { return JS_FALSE; } // -// Attribute class initialization +// Attr class initialization // -nsresult NS_InitAttributeClass(nsIScriptContext *aContext, void **aPrototype) +nsresult NS_InitAttrClass(nsIScriptContext *aContext, void **aPrototype) { JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); JSObject *proto = nsnull; @@ -302,7 +301,7 @@ nsresult NS_InitAttributeClass(nsIScriptContext *aContext, void **aPrototype) JSObject *global = JS_GetGlobalObject(jscontext); jsval vp; - if ((PR_TRUE != JS_LookupProperty(jscontext, global, "Attribute", &vp)) || + if ((PR_TRUE != JS_LookupProperty(jscontext, global, "Attr", &vp)) || !JSVAL_IS_OBJECT(vp) || ((constructor = JSVAL_TO_OBJECT(vp)) == nsnull) || (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || @@ -314,11 +313,11 @@ nsresult NS_InitAttributeClass(nsIScriptContext *aContext, void **aPrototype) proto = JS_InitClass(jscontext, // context global, // global object parent_proto, // parent proto - &AttributeClass, // JSClass - Attribute, // JSNative ctor + &AttrClass, // JSClass + Attr, // JSNative ctor 0, // ctor args - AttributeProperties, // proto props - AttributeMethods, // proto funcs + AttrProperties, // proto props + AttrMethods, // proto funcs nsnull, // ctor props (static) nsnull); // ctor funcs (static) if (nsnull == proto) { @@ -341,17 +340,17 @@ nsresult NS_InitAttributeClass(nsIScriptContext *aContext, void **aPrototype) // -// Method for creating a new Attribute JavaScript object +// Method for creating a new Attr JavaScript object // -extern "C" NS_DOM nsresult NS_NewScriptAttribute(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +extern "C" NS_DOM nsresult NS_NewScriptAttr(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) { - NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptAttribute"); + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptAttr"); JSObject *proto; JSObject *parent; nsIScriptObjectOwner *owner; JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); nsresult result = NS_OK; - nsIDOMAttribute *aAttribute; + nsIDOMAttr *aAttr; if (nsnull == aParent) { parent = nsnull; @@ -367,23 +366,23 @@ extern "C" NS_DOM nsresult NS_NewScriptAttribute(nsIScriptContext *aContext, nsI return NS_ERROR_FAILURE; } - if (NS_OK != NS_InitAttributeClass(aContext, (void **)&proto)) { + if (NS_OK != NS_InitAttrClass(aContext, (void **)&proto)) { return NS_ERROR_FAILURE; } - result = aSupports->QueryInterface(kIAttributeIID, (void **)&aAttribute); + result = aSupports->QueryInterface(kIAttrIID, (void **)&aAttr); if (NS_OK != result) { return result; } // create a js object for this class - *aReturn = JS_NewObject(jscontext, &AttributeClass, proto, parent); + *aReturn = JS_NewObject(jscontext, &AttrClass, proto, parent); if (nsnull != *aReturn) { // connect the native object to the js object - JS_SetPrivate(jscontext, (JSObject *)*aReturn, aAttribute); + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aAttr); } else { - NS_RELEASE(aAttribute); + NS_RELEASE(aAttr); return NS_ERROR_FAILURE; } diff --git a/mozilla/dom/src/coreDOM/nsJSData.cpp b/mozilla/dom/src/coreDOM/nsJSCharacterData.cpp similarity index 68% rename from mozilla/dom/src/coreDOM/nsJSData.cpp rename to mozilla/dom/src/coreDOM/nsJSCharacterData.cpp index 362d855a972..de052cc49c7 100644 --- a/mozilla/dom/src/coreDOM/nsJSData.cpp +++ b/mozilla/dom/src/coreDOM/nsJSCharacterData.cpp @@ -25,32 +25,32 @@ #include "nsIScriptGlobalObject.h" #include "nsIPtr.h" #include "nsString.h" -#include "nsIDOMData.h" +#include "nsIDOMCharacterData.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(kIDataIID, NS_IDOMDATA_IID); +static NS_DEFINE_IID(kICharacterDataIID, NS_IDOMCHARACTERDATA_IID); -NS_DEF_PTR(nsIDOMData); +NS_DEF_PTR(nsIDOMCharacterData); // -// Data property ids +// CharacterData property ids // -enum Data_slots { - DATA_DATA = -1, - DATA_SIZE = -2 +enum CharacterData_slots { + CHARACTERDATA_DATA = -1, + CHARACTERDATA_LENGTH = -2 }; /***********************************************************************/ // -// Data Properties Getter +// CharacterData Properties Getter // PR_STATIC_CALLBACK(JSBool) -GetDataProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +GetCharacterDataProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) { - nsIDOMData *a = (nsIDOMData*)JS_GetPrivate(cx, obj); + nsIDOMCharacterData *a = (nsIDOMCharacterData*)JS_GetPrivate(cx, obj); // If there's no private data, this must be the prototype, so ignore if (nsnull == a) { @@ -59,7 +59,7 @@ GetDataProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case DATA_DATA: + case CHARACTERDATA_DATA: { nsAutoString prop; if (NS_OK == a->GetData(prop)) { @@ -72,10 +72,10 @@ GetDataProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } break; } - case DATA_SIZE: + case CHARACTERDATA_LENGTH: { PRUint32 prop; - if (NS_OK == a->GetSize(&prop)) { + if (NS_OK == a->GetLength(&prop)) { *vp = INT_TO_JSVAL(prop); } else { @@ -110,12 +110,12 @@ GetDataProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) /***********************************************************************/ // -// Data Properties Setter +// CharacterData Properties Setter // PR_STATIC_CALLBACK(JSBool) -SetDataProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +SetCharacterDataProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) { - nsIDOMData *a = (nsIDOMData*)JS_GetPrivate(cx, obj); + nsIDOMCharacterData *a = (nsIDOMCharacterData*)JS_GetPrivate(cx, obj); // If there's no private data, this must be the prototype, so ignore if (nsnull == a) { @@ -124,7 +124,7 @@ SetDataProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case DATA_DATA: + case CHARACTERDATA_DATA: { nsAutoString prop; JSString *jsstring; @@ -166,12 +166,12 @@ SetDataProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) // -// Data finalizer +// CharacterData finalizer // PR_STATIC_CALLBACK(void) -FinalizeData(JSContext *cx, JSObject *obj) +FinalizeCharacterData(JSContext *cx, JSObject *obj) { - nsIDOMData *a = (nsIDOMData*)JS_GetPrivate(cx, obj); + nsIDOMCharacterData *a = (nsIDOMCharacterData*)JS_GetPrivate(cx, obj); if (nsnull != a) { // get the js object @@ -187,12 +187,12 @@ FinalizeData(JSContext *cx, JSObject *obj) // -// Data enumerate +// CharacterData enumerate // PR_STATIC_CALLBACK(JSBool) -EnumerateData(JSContext *cx, JSObject *obj) +EnumerateCharacterData(JSContext *cx, JSObject *obj) { - nsIDOMData *a = (nsIDOMData*)JS_GetPrivate(cx, obj); + nsIDOMCharacterData *a = (nsIDOMCharacterData*)JS_GetPrivate(cx, obj); if (nsnull != a) { // get the js object @@ -207,12 +207,12 @@ EnumerateData(JSContext *cx, JSObject *obj) // -// Data resolve +// CharacterData resolve // PR_STATIC_CALLBACK(JSBool) -ResolveData(JSContext *cx, JSObject *obj, jsval id) +ResolveCharacterData(JSContext *cx, JSObject *obj, jsval id) { - nsIDOMData *a = (nsIDOMData*)JS_GetPrivate(cx, obj); + nsIDOMCharacterData *a = (nsIDOMCharacterData*)JS_GetPrivate(cx, obj); if (nsnull != a) { // get the js object @@ -227,12 +227,12 @@ ResolveData(JSContext *cx, JSObject *obj, jsval id) // -// Native method Substring +// Native method SubstringData // PR_STATIC_CALLBACK(JSBool) -DataSubstring(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +CharacterDataSubstringData(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { - nsIDOMData *nativeThis = (nsIDOMData*)JS_GetPrivate(cx, obj); + nsIDOMCharacterData *nativeThis = (nsIDOMCharacterData*)JS_GetPrivate(cx, obj); JSBool rBool = JS_FALSE; nsAutoString nativeRet; PRUint32 b0; @@ -257,7 +257,7 @@ DataSubstring(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval return JS_FALSE; } - if (NS_OK != nativeThis->Substring(b0, b1, nativeRet)) { + if (NS_OK != nativeThis->SubstringData(b0, b1, nativeRet)) { return JS_FALSE; } @@ -266,7 +266,7 @@ DataSubstring(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval *rval = STRING_TO_JSVAL(jsstring); } else { - JS_ReportError(cx, "Function substring requires 2 parameters"); + JS_ReportError(cx, "Function substringData requires 2 parameters"); return JS_FALSE; } @@ -275,12 +275,12 @@ DataSubstring(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval // -// Native method Append +// Native method AppendData // PR_STATIC_CALLBACK(JSBool) -DataAppend(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +CharacterDataAppendData(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { - nsIDOMData *nativeThis = (nsIDOMData*)JS_GetPrivate(cx, obj); + nsIDOMCharacterData *nativeThis = (nsIDOMCharacterData*)JS_GetPrivate(cx, obj); JSBool rBool = JS_FALSE; nsAutoString b0; @@ -301,14 +301,14 @@ DataAppend(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) b0.SetString(""); // Should this really be null?? } - if (NS_OK != nativeThis->Append(b0)) { + if (NS_OK != nativeThis->AppendData(b0)) { return JS_FALSE; } *rval = JSVAL_VOID; } else { - JS_ReportError(cx, "Function append requires 1 parameters"); + JS_ReportError(cx, "Function appendData requires 1 parameters"); return JS_FALSE; } @@ -317,12 +317,12 @@ DataAppend(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) // -// Native method Insert +// Native method InsertData // PR_STATIC_CALLBACK(JSBool) -DataInsert(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +CharacterDataInsertData(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { - nsIDOMData *nativeThis = (nsIDOMData*)JS_GetPrivate(cx, obj); + nsIDOMCharacterData *nativeThis = (nsIDOMCharacterData*)JS_GetPrivate(cx, obj); JSBool rBool = JS_FALSE; PRUint32 b0; nsAutoString b1; @@ -349,14 +349,14 @@ DataInsert(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) b1.SetString(""); // Should this really be null?? } - if (NS_OK != nativeThis->Insert(b0, b1)) { + if (NS_OK != nativeThis->InsertData(b0, b1)) { return JS_FALSE; } *rval = JSVAL_VOID; } else { - JS_ReportError(cx, "Function insert requires 2 parameters"); + JS_ReportError(cx, "Function insertData requires 2 parameters"); return JS_FALSE; } @@ -365,12 +365,12 @@ DataInsert(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) // -// Native method Remove +// Native method DeleteData // PR_STATIC_CALLBACK(JSBool) -DataRemove(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +CharacterDataDeleteData(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { - nsIDOMData *nativeThis = (nsIDOMData*)JS_GetPrivate(cx, obj); + nsIDOMCharacterData *nativeThis = (nsIDOMCharacterData*)JS_GetPrivate(cx, obj); JSBool rBool = JS_FALSE; PRUint32 b0; PRUint32 b1; @@ -394,14 +394,14 @@ DataRemove(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) return JS_FALSE; } - if (NS_OK != nativeThis->Remove(b0, b1)) { + if (NS_OK != nativeThis->DeleteData(b0, b1)) { return JS_FALSE; } *rval = JSVAL_VOID; } else { - JS_ReportError(cx, "Function remove requires 2 parameters"); + JS_ReportError(cx, "Function deleteData requires 2 parameters"); return JS_FALSE; } @@ -410,12 +410,12 @@ DataRemove(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) // -// Native method Replace +// Native method ReplaceData // PR_STATIC_CALLBACK(JSBool) -DataReplace(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +CharacterDataReplaceData(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { - nsIDOMData *nativeThis = (nsIDOMData*)JS_GetPrivate(cx, obj); + nsIDOMCharacterData *nativeThis = (nsIDOMCharacterData*)JS_GetPrivate(cx, obj); JSBool rBool = JS_FALSE; PRUint32 b0; PRUint32 b1; @@ -448,14 +448,14 @@ DataReplace(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) b2.SetString(""); // Should this really be null?? } - if (NS_OK != nativeThis->Replace(b0, b1, b2)) { + if (NS_OK != nativeThis->ReplaceData(b0, b1, b2)) { return JS_FALSE; } *rval = JSVAL_VOID; } else { - JS_ReportError(cx, "Function replace requires 3 parameters"); + JS_ReportError(cx, "Function replaceData requires 3 parameters"); return JS_FALSE; } @@ -465,61 +465,61 @@ DataReplace(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) /***********************************************************************/ // -// class for Data +// class for CharacterData // -JSClass DataClass = { - "Data", +JSClass CharacterDataClass = { + "CharacterData", JSCLASS_HAS_PRIVATE, JS_PropertyStub, JS_PropertyStub, - GetDataProperty, - SetDataProperty, - EnumerateData, - ResolveData, + GetCharacterDataProperty, + SetCharacterDataProperty, + EnumerateCharacterData, + ResolveCharacterData, JS_ConvertStub, - FinalizeData + FinalizeCharacterData }; // -// Data class properties +// CharacterData class properties // -static JSPropertySpec DataProperties[] = +static JSPropertySpec CharacterDataProperties[] = { - {"data", DATA_DATA, JSPROP_ENUMERATE}, - {"size", DATA_SIZE, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"data", CHARACTERDATA_DATA, JSPROP_ENUMERATE}, + {"length", CHARACTERDATA_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY}, {0} }; // -// Data class methods +// CharacterData class methods // -static JSFunctionSpec DataMethods[] = +static JSFunctionSpec CharacterDataMethods[] = { - {"substring", DataSubstring, 2}, - {"append", DataAppend, 1}, - {"insert", DataInsert, 2}, - {"remove", DataRemove, 2}, - {"replace", DataReplace, 3}, + {"substringData", CharacterDataSubstringData, 2}, + {"appendData", CharacterDataAppendData, 1}, + {"insertData", CharacterDataInsertData, 2}, + {"deleteData", CharacterDataDeleteData, 2}, + {"replaceData", CharacterDataReplaceData, 3}, {0} }; // -// Data constructor +// CharacterData constructor // PR_STATIC_CALLBACK(JSBool) -Data(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +CharacterData(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { return JS_FALSE; } // -// Data class initialization +// CharacterData class initialization // -nsresult NS_InitDataClass(nsIScriptContext *aContext, void **aPrototype) +nsresult NS_InitCharacterDataClass(nsIScriptContext *aContext, void **aPrototype) { JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); JSObject *proto = nsnull; @@ -528,7 +528,7 @@ nsresult NS_InitDataClass(nsIScriptContext *aContext, void **aPrototype) JSObject *global = JS_GetGlobalObject(jscontext); jsval vp; - if ((PR_TRUE != JS_LookupProperty(jscontext, global, "Data", &vp)) || + if ((PR_TRUE != JS_LookupProperty(jscontext, global, "CharacterData", &vp)) || !JSVAL_IS_OBJECT(vp) || ((constructor = JSVAL_TO_OBJECT(vp)) == nsnull) || (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || @@ -540,11 +540,11 @@ nsresult NS_InitDataClass(nsIScriptContext *aContext, void **aPrototype) proto = JS_InitClass(jscontext, // context global, // global object parent_proto, // parent proto - &DataClass, // JSClass - Data, // JSNative ctor + &CharacterDataClass, // JSClass + CharacterData, // JSNative ctor 0, // ctor args - DataProperties, // proto props - DataMethods, // proto funcs + CharacterDataProperties, // proto props + CharacterDataMethods, // proto funcs nsnull, // ctor props (static) nsnull); // ctor funcs (static) if (nsnull == proto) { @@ -567,17 +567,17 @@ nsresult NS_InitDataClass(nsIScriptContext *aContext, void **aPrototype) // -// Method for creating a new Data JavaScript object +// Method for creating a new CharacterData JavaScript object // -extern "C" NS_DOM nsresult NS_NewScriptData(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +extern "C" NS_DOM nsresult NS_NewScriptCharacterData(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) { - NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptData"); + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptCharacterData"); JSObject *proto; JSObject *parent; nsIScriptObjectOwner *owner; JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); nsresult result = NS_OK; - nsIDOMData *aData; + nsIDOMCharacterData *aCharacterData; if (nsnull == aParent) { parent = nsnull; @@ -593,23 +593,23 @@ extern "C" NS_DOM nsresult NS_NewScriptData(nsIScriptContext *aContext, nsISuppo return NS_ERROR_FAILURE; } - if (NS_OK != NS_InitDataClass(aContext, (void **)&proto)) { + if (NS_OK != NS_InitCharacterDataClass(aContext, (void **)&proto)) { return NS_ERROR_FAILURE; } - result = aSupports->QueryInterface(kIDataIID, (void **)&aData); + result = aSupports->QueryInterface(kICharacterDataIID, (void **)&aCharacterData); if (NS_OK != result) { return result; } // create a js object for this class - *aReturn = JS_NewObject(jscontext, &DataClass, proto, parent); + *aReturn = JS_NewObject(jscontext, &CharacterDataClass, proto, parent); if (nsnull != *aReturn) { // connect the native object to the js object - JS_SetPrivate(jscontext, (JSObject *)*aReturn, aData); + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aCharacterData); } else { - NS_RELEASE(aData); + NS_RELEASE(aCharacterData); return NS_ERROR_FAILURE; } diff --git a/mozilla/dom/src/coreDOM/nsJSComment.cpp b/mozilla/dom/src/coreDOM/nsJSComment.cpp index 8cc10aada8e..5e51a64200b 100644 --- a/mozilla/dom/src/coreDOM/nsJSComment.cpp +++ b/mozilla/dom/src/coreDOM/nsJSComment.cpp @@ -246,7 +246,7 @@ nsresult NS_InitCommentClass(nsIScriptContext *aContext, void **aPrototype) (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || !JSVAL_IS_OBJECT(vp)) { - if (NS_OK != NS_InitDataClass(aContext, (void **)&parent_proto)) { + if (NS_OK != NS_InitCharacterDataClass(aContext, (void **)&parent_proto)) { return NS_ERROR_FAILURE; } proto = JS_InitClass(jscontext, // context diff --git a/mozilla/dom/src/coreDOM/nsJSDOM.cpp b/mozilla/dom/src/coreDOM/nsJSDOMImplementation.cpp similarity index 62% rename from mozilla/dom/src/coreDOM/nsJSDOM.cpp rename to mozilla/dom/src/coreDOM/nsJSDOMImplementation.cpp index c8ac4d4b45d..12f886d62f5 100644 --- a/mozilla/dom/src/coreDOM/nsJSDOM.cpp +++ b/mozilla/dom/src/coreDOM/nsJSDOMImplementation.cpp @@ -25,28 +25,25 @@ #include "nsIScriptGlobalObject.h" #include "nsIPtr.h" #include "nsString.h" -#include "nsIDOMDocument.h" -#include "nsIDOMDOM.h" +#include "nsIDOMDOMImplementation.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(kIDocumentIID, NS_IDOMDOCUMENT_IID); -static NS_DEFINE_IID(kIDOMIID, NS_IDOMDOM_IID); +static NS_DEFINE_IID(kIDOMImplementationIID, NS_IDOMDOMIMPLEMENTATION_IID); -NS_DEF_PTR(nsIDOMDocument); -NS_DEF_PTR(nsIDOMDOM); +NS_DEF_PTR(nsIDOMDOMImplementation); /***********************************************************************/ // -// DOM Properties Getter +// DOMImplementation Properties Getter // PR_STATIC_CALLBACK(JSBool) -GetDOMProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +GetDOMImplementationProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) { - nsIDOMDOM *a = (nsIDOMDOM*)JS_GetPrivate(cx, obj); + nsIDOMDOMImplementation *a = (nsIDOMDOMImplementation*)JS_GetPrivate(cx, obj); // If there's no private data, this must be the prototype, so ignore if (nsnull == a) { @@ -83,12 +80,12 @@ GetDOMProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) /***********************************************************************/ // -// DOM Properties Setter +// DOMImplementation Properties Setter // PR_STATIC_CALLBACK(JSBool) -SetDOMProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +SetDOMImplementationProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) { - nsIDOMDOM *a = (nsIDOMDOM*)JS_GetPrivate(cx, obj); + nsIDOMDOMImplementation *a = (nsIDOMDOMImplementation*)JS_GetPrivate(cx, obj); // If there's no private data, this must be the prototype, so ignore if (nsnull == a) { @@ -125,12 +122,12 @@ SetDOMProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) // -// DOM finalizer +// DOMImplementation finalizer // PR_STATIC_CALLBACK(void) -FinalizeDOM(JSContext *cx, JSObject *obj) +FinalizeDOMImplementation(JSContext *cx, JSObject *obj) { - nsIDOMDOM *a = (nsIDOMDOM*)JS_GetPrivate(cx, obj); + nsIDOMDOMImplementation *a = (nsIDOMDOMImplementation*)JS_GetPrivate(cx, obj); if (nsnull != a) { // get the js object @@ -146,12 +143,12 @@ FinalizeDOM(JSContext *cx, JSObject *obj) // -// DOM enumerate +// DOMImplementation enumerate // PR_STATIC_CALLBACK(JSBool) -EnumerateDOM(JSContext *cx, JSObject *obj) +EnumerateDOMImplementation(JSContext *cx, JSObject *obj) { - nsIDOMDOM *a = (nsIDOMDOM*)JS_GetPrivate(cx, obj); + nsIDOMDOMImplementation *a = (nsIDOMDOMImplementation*)JS_GetPrivate(cx, obj); if (nsnull != a) { // get the js object @@ -166,12 +163,12 @@ EnumerateDOM(JSContext *cx, JSObject *obj) // -// DOM resolve +// DOMImplementation resolve // PR_STATIC_CALLBACK(JSBool) -ResolveDOM(JSContext *cx, JSObject *obj, jsval id) +ResolveDOMImplementation(JSContext *cx, JSObject *obj, jsval id) { - nsIDOMDOM *a = (nsIDOMDOM*)JS_GetPrivate(cx, obj); + nsIDOMDOMImplementation *a = (nsIDOMDOMImplementation*)JS_GetPrivate(cx, obj); if (nsnull != a) { // get the js object @@ -185,74 +182,17 @@ ResolveDOM(JSContext *cx, JSObject *obj, jsval id) } -// -// Native method CreateDocument -// -PR_STATIC_CALLBACK(JSBool) -DOMCreateDocument(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) -{ - nsIDOMDOM *nativeThis = (nsIDOMDOM*)JS_GetPrivate(cx, obj); - JSBool rBool = JS_FALSE; - nsIDOMDocument* 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->CreateDocument(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 createDocument requires 1 parameters"); - return JS_FALSE; - } - - return JS_TRUE; -} - - // // Native method HasFeature // PR_STATIC_CALLBACK(JSBool) -DOMHasFeature(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +DOMImplementationHasFeature(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { - nsIDOMDOM *nativeThis = (nsIDOMDOM*)JS_GetPrivate(cx, obj); + nsIDOMDOMImplementation *nativeThis = (nsIDOMDOMImplementation*)JS_GetPrivate(cx, obj); JSBool rBool = JS_FALSE; PRBool nativeRet; nsAutoString b0; + nsAutoString b1; *rval = JSVAL_NULL; @@ -261,7 +201,7 @@ DOMHasFeature(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval return JS_TRUE; } - if (argc >= 1) { + if (argc >= 2) { JSString *jsstring0 = JS_ValueToString(cx, argv[0]); if (nsnull != jsstring0) { @@ -271,14 +211,22 @@ DOMHasFeature(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval b0.SetString(""); // Should this really be null?? } - if (NS_OK != nativeThis->HasFeature(b0, &nativeRet)) { + JSString *jsstring1 = JS_ValueToString(cx, argv[1]); + if (nsnull != jsstring1) { + b1.SetString(JS_GetStringChars(jsstring1)); + } + else { + b1.SetString(""); // Should this really be null?? + } + + if (NS_OK != nativeThis->HasFeature(b0, b1, &nativeRet)) { return JS_FALSE; } *rval = BOOLEAN_TO_JSVAL(nativeRet); } else { - JS_ReportError(cx, "Function hasFeature requires 1 parameters"); + JS_ReportError(cx, "Function hasFeature requires 2 parameters"); return JS_FALSE; } @@ -288,56 +236,55 @@ DOMHasFeature(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval /***********************************************************************/ // -// class for DOM +// class for DOMImplementation // -JSClass DOMClass = { - "DOM", +JSClass DOMImplementationClass = { + "DOMImplementation", JSCLASS_HAS_PRIVATE, JS_PropertyStub, JS_PropertyStub, - GetDOMProperty, - SetDOMProperty, - EnumerateDOM, - ResolveDOM, + GetDOMImplementationProperty, + SetDOMImplementationProperty, + EnumerateDOMImplementation, + ResolveDOMImplementation, JS_ConvertStub, - FinalizeDOM + FinalizeDOMImplementation }; // -// DOM class properties +// DOMImplementation class properties // -static JSPropertySpec DOMProperties[] = +static JSPropertySpec DOMImplementationProperties[] = { {0} }; // -// DOM class methods +// DOMImplementation class methods // -static JSFunctionSpec DOMMethods[] = +static JSFunctionSpec DOMImplementationMethods[] = { - {"createDocument", DOMCreateDocument, 1}, - {"hasFeature", DOMHasFeature, 1}, + {"hasFeature", DOMImplementationHasFeature, 2}, {0} }; // -// DOM constructor +// DOMImplementation constructor // PR_STATIC_CALLBACK(JSBool) -DOM(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +DOMImplementation(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { return JS_FALSE; } // -// DOM class initialization +// DOMImplementation class initialization // -nsresult NS_InitDOMClass(nsIScriptContext *aContext, void **aPrototype) +nsresult NS_InitDOMImplementationClass(nsIScriptContext *aContext, void **aPrototype) { JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); JSObject *proto = nsnull; @@ -346,7 +293,7 @@ nsresult NS_InitDOMClass(nsIScriptContext *aContext, void **aPrototype) JSObject *global = JS_GetGlobalObject(jscontext); jsval vp; - if ((PR_TRUE != JS_LookupProperty(jscontext, global, "DOM", &vp)) || + if ((PR_TRUE != JS_LookupProperty(jscontext, global, "DOMImplementation", &vp)) || !JSVAL_IS_OBJECT(vp) || ((constructor = JSVAL_TO_OBJECT(vp)) == nsnull) || (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || @@ -355,11 +302,11 @@ nsresult NS_InitDOMClass(nsIScriptContext *aContext, void **aPrototype) proto = JS_InitClass(jscontext, // context global, // global object parent_proto, // parent proto - &DOMClass, // JSClass - DOM, // JSNative ctor + &DOMImplementationClass, // JSClass + DOMImplementation, // JSNative ctor 0, // ctor args - DOMProperties, // proto props - DOMMethods, // proto funcs + DOMImplementationProperties, // proto props + DOMImplementationMethods, // proto funcs nsnull, // ctor props (static) nsnull); // ctor funcs (static) if (nsnull == proto) { @@ -382,17 +329,17 @@ nsresult NS_InitDOMClass(nsIScriptContext *aContext, void **aPrototype) // -// Method for creating a new DOM JavaScript object +// Method for creating a new DOMImplementation JavaScript object // -extern "C" NS_DOM nsresult NS_NewScriptDOM(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +extern "C" NS_DOM nsresult NS_NewScriptDOMImplementation(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) { - NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptDOM"); + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptDOMImplementation"); JSObject *proto; JSObject *parent; nsIScriptObjectOwner *owner; JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); nsresult result = NS_OK; - nsIDOMDOM *aDOM; + nsIDOMDOMImplementation *aDOMImplementation; if (nsnull == aParent) { parent = nsnull; @@ -408,23 +355,23 @@ extern "C" NS_DOM nsresult NS_NewScriptDOM(nsIScriptContext *aContext, nsISuppor return NS_ERROR_FAILURE; } - if (NS_OK != NS_InitDOMClass(aContext, (void **)&proto)) { + if (NS_OK != NS_InitDOMImplementationClass(aContext, (void **)&proto)) { return NS_ERROR_FAILURE; } - result = aSupports->QueryInterface(kIDOMIID, (void **)&aDOM); + result = aSupports->QueryInterface(kIDOMImplementationIID, (void **)&aDOMImplementation); if (NS_OK != result) { return result; } // create a js object for this class - *aReturn = JS_NewObject(jscontext, &DOMClass, proto, parent); + *aReturn = JS_NewObject(jscontext, &DOMImplementationClass, proto, parent); if (nsnull != *aReturn) { // connect the native object to the js object - JS_SetPrivate(jscontext, (JSObject *)*aReturn, aDOM); + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aDOMImplementation); } else { - NS_RELEASE(aDOM); + NS_RELEASE(aDOMImplementation); return NS_ERROR_FAILURE; } diff --git a/mozilla/dom/src/coreDOM/nsJSDocument.cpp b/mozilla/dom/src/coreDOM/nsJSDocument.cpp index 4712a50a3c8..b709244f22d 100644 --- a/mozilla/dom/src/coreDOM/nsJSDocument.cpp +++ b/mozilla/dom/src/coreDOM/nsJSDocument.cpp @@ -28,11 +28,12 @@ #include "nsIDOMElement.h" #include "nsIDOMDocument.h" #include "nsIDOMProcessingInstruction.h" -#include "nsIDOMNamedNodeMap.h" -#include "nsIDOMAttribute.h" -#include "nsIDOMNode.h" +#include "nsIDOMAttr.h" +#include "nsIDOMCDATASection.h" #include "nsIDOMText.h" +#include "nsIDOMDOMImplementation.h" #include "nsIDOMDocumentType.h" +#include "nsIDOMEntityReference.h" #include "nsIDOMDocumentFragment.h" #include "nsIDOMComment.h" #include "nsIDOMEventCapturer.h" @@ -45,11 +46,12 @@ static NS_DEFINE_IID(kIScriptGlobalObjectIID, NS_ISCRIPTGLOBALOBJECT_IID); static NS_DEFINE_IID(kIElementIID, NS_IDOMELEMENT_IID); static NS_DEFINE_IID(kIDocumentIID, NS_IDOMDOCUMENT_IID); static NS_DEFINE_IID(kIProcessingInstructionIID, NS_IDOMPROCESSINGINSTRUCTION_IID); -static NS_DEFINE_IID(kINamedNodeMapIID, NS_IDOMNAMEDNODEMAP_IID); -static NS_DEFINE_IID(kIAttributeIID, NS_IDOMATTRIBUTE_IID); -static NS_DEFINE_IID(kINodeIID, NS_IDOMNODE_IID); +static NS_DEFINE_IID(kIAttrIID, NS_IDOMATTR_IID); +static NS_DEFINE_IID(kICDATASectionIID, NS_IDOMCDATASECTION_IID); static NS_DEFINE_IID(kITextIID, NS_IDOMTEXT_IID); +static NS_DEFINE_IID(kIDOMImplementationIID, NS_IDOMDOMIMPLEMENTATION_IID); static NS_DEFINE_IID(kIDocumentTypeIID, NS_IDOMDOCUMENTTYPE_IID); +static NS_DEFINE_IID(kIEntityReferenceIID, NS_IDOMENTITYREFERENCE_IID); static NS_DEFINE_IID(kIDocumentFragmentIID, NS_IDOMDOCUMENTFRAGMENT_IID); static NS_DEFINE_IID(kICommentIID, NS_IDOMCOMMENT_IID); static NS_DEFINE_IID(kIEventCapturerIID, NS_IDOMEVENTCAPTURER_IID); @@ -58,11 +60,12 @@ static NS_DEFINE_IID(kINodeListIID, NS_IDOMNODELIST_IID); NS_DEF_PTR(nsIDOMElement); NS_DEF_PTR(nsIDOMDocument); NS_DEF_PTR(nsIDOMProcessingInstruction); -NS_DEF_PTR(nsIDOMNamedNodeMap); -NS_DEF_PTR(nsIDOMAttribute); -NS_DEF_PTR(nsIDOMNode); +NS_DEF_PTR(nsIDOMAttr); +NS_DEF_PTR(nsIDOMCDATASection); NS_DEF_PTR(nsIDOMText); +NS_DEF_PTR(nsIDOMDOMImplementation); NS_DEF_PTR(nsIDOMDocumentType); +NS_DEF_PTR(nsIDOMEntityReference); NS_DEF_PTR(nsIDOMDocumentFragment); NS_DEF_PTR(nsIDOMComment); NS_DEF_PTR(nsIDOMEventCapturer); @@ -72,10 +75,9 @@ NS_DEF_PTR(nsIDOMNodeList); // Document property ids // enum Document_slots { - DOCUMENT_DOCUMENTTYPE = -1, - DOCUMENT_PROLOG = -2, - DOCUMENT_EPILOG = -3, - DOCUMENT_DOCUMENTELEMENT = -4 + DOCUMENT_DOCTYPE = -1, + DOCUMENT_IMPLEMENTATION = -2, + DOCUMENT_DOCUMENTELEMENT = -3 }; /***********************************************************************/ @@ -94,10 +96,10 @@ GetDocumentProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case DOCUMENT_DOCUMENTTYPE: + case DOCUMENT_DOCTYPE: { nsIDOMDocumentType* prop; - if (NS_OK == a->GetDocumentType(&prop)) { + if (NS_OK == a->GetDoctype(&prop)) { // get the js object if (prop != nsnull) { nsIScriptObjectOwner *owner = nsnull; @@ -121,37 +123,10 @@ GetDocumentProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } break; } - case DOCUMENT_PROLOG: + case DOCUMENT_IMPLEMENTATION: { - nsIDOMNodeList* prop; - if (NS_OK == a->GetProlog(&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 DOCUMENT_EPILOG: - { - nsIDOMNodeList* prop; - if (NS_OK == a->GetEpilog(&prop)) { + nsIDOMDOMImplementation* prop; + if (NS_OK == a->GetImplementation(&prop)) { // get the js object if (prop != nsnull) { nsIScriptObjectOwner *owner = nsnull; @@ -341,7 +316,6 @@ DocumentCreateElement(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsv JSBool rBool = JS_FALSE; nsIDOMElement* nativeRet; nsAutoString b0; - nsIDOMNamedNodeMapPtr b1; *rval = JSVAL_NULL; @@ -350,7 +324,7 @@ DocumentCreateElement(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsv return JS_TRUE; } - if (argc >= 2) { + if (argc >= 1) { JSString *jsstring0 = JS_ValueToString(cx, argv[0]); if (nsnull != jsstring0) { @@ -360,25 +334,7 @@ DocumentCreateElement(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsv b0.SetString(""); // Should this really be null?? } - if (JSVAL_IS_NULL(argv[1])){ - b1 = nsnull; - } - else if (JSVAL_IS_OBJECT(argv[1])) { - nsISupports *supports1 = (nsISupports *)JS_GetPrivate(cx, JSVAL_TO_OBJECT(argv[1])); - NS_ASSERTION(nsnull != supports1, "null pointer"); - - if ((nsnull == supports1) || - (NS_OK != supports1->QueryInterface(kINamedNodeMapIID, (void **)(b1.Query())))) { - JS_ReportError(cx, "Parameter must be of type NamedNodeMap"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - if (NS_OK != nativeThis->CreateElement(b0, b1, &nativeRet)) { + if (NS_OK != nativeThis->CreateElement(b0, &nativeRet)) { return JS_FALSE; } @@ -400,7 +356,7 @@ DocumentCreateElement(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsv } } else { - JS_ReportError(cx, "Function createElement requires 2 parameters"); + JS_ReportError(cx, "Function createElement requires 1 parameters"); return JS_FALSE; } @@ -573,6 +529,64 @@ DocumentCreateComment(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsv } +// +// Native method CreateCDATASection +// +PR_STATIC_CALLBACK(JSBool) +DocumentCreateCDATASection(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMDocument *nativeThis = (nsIDOMDocument*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + nsIDOMCDATASection* 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->CreateCDATASection(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 createCDATASection requires 1 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + // // Native method CreateProcessingInstruction // @@ -648,9 +662,8 @@ DocumentCreateAttribute(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, j { nsIDOMDocument *nativeThis = (nsIDOMDocument*)JS_GetPrivate(cx, obj); JSBool rBool = JS_FALSE; - nsIDOMAttribute* nativeRet; + nsIDOMAttr* nativeRet; nsAutoString b0; - nsIDOMNodePtr b1; *rval = JSVAL_NULL; @@ -659,7 +672,7 @@ DocumentCreateAttribute(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, j return JS_TRUE; } - if (argc >= 2) { + if (argc >= 1) { JSString *jsstring0 = JS_ValueToString(cx, argv[0]); if (nsnull != jsstring0) { @@ -669,25 +682,7 @@ DocumentCreateAttribute(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, j b0.SetString(""); // Should this really be null?? } - if (JSVAL_IS_NULL(argv[1])){ - b1 = nsnull; - } - else if (JSVAL_IS_OBJECT(argv[1])) { - nsISupports *supports1 = (nsISupports *)JS_GetPrivate(cx, JSVAL_TO_OBJECT(argv[1])); - NS_ASSERTION(nsnull != supports1, "null pointer"); - - if ((nsnull == supports1) || - (NS_OK != supports1->QueryInterface(kINodeIID, (void **)(b1.Query())))) { - JS_ReportError(cx, "Parameter must be of type Node"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - if (NS_OK != nativeThis->CreateAttribute(b0, b1, &nativeRet)) { + if (NS_OK != nativeThis->CreateAttribute(b0, &nativeRet)) { return JS_FALSE; } @@ -709,7 +704,65 @@ DocumentCreateAttribute(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, j } } else { - JS_ReportError(cx, "Function createAttribute requires 2 parameters"); + JS_ReportError(cx, "Function createAttribute requires 1 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +// +// Native method CreateEntityReference +// +PR_STATIC_CALLBACK(JSBool) +DocumentCreateEntityReference(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMDocument *nativeThis = (nsIDOMDocument*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + nsIDOMEntityReference* 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->CreateEntityReference(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 createEntityReference requires 1 parameters"); return JS_FALSE; } @@ -782,7 +835,7 @@ PR_STATIC_CALLBACK(JSBool) EventCapturerCaptureEvent(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { nsIDOMDocument *privateThis = (nsIDOMDocument*)JS_GetPrivate(cx, obj); - nsIDOMEventCapturer *nativeThis; + nsIDOMEventCapturer *nativeThis = nsnull; if (NS_OK != privateThis->QueryInterface(kIEventCapturerIID, (void **)nativeThis)) { JS_ReportError(cx, "Object must be of type EventCapturer"); return JS_FALSE; @@ -830,7 +883,7 @@ PR_STATIC_CALLBACK(JSBool) EventCapturerReleaseEvent(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { nsIDOMDocument *privateThis = (nsIDOMDocument*)JS_GetPrivate(cx, obj); - nsIDOMEventCapturer *nativeThis; + nsIDOMEventCapturer *nativeThis = nsnull; if (NS_OK != privateThis->QueryInterface(kIEventCapturerIID, (void **)nativeThis)) { JS_ReportError(cx, "Object must be of type EventCapturer"); return JS_FALSE; @@ -894,9 +947,8 @@ JSClass DocumentClass = { // static JSPropertySpec DocumentProperties[] = { - {"documentType", DOCUMENT_DOCUMENTTYPE, JSPROP_ENUMERATE | JSPROP_READONLY}, - {"prolog", DOCUMENT_PROLOG, JSPROP_ENUMERATE | JSPROP_READONLY}, - {"epilog", DOCUMENT_EPILOG, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"doctype", DOCUMENT_DOCTYPE, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"implementation", DOCUMENT_IMPLEMENTATION, JSPROP_ENUMERATE | JSPROP_READONLY}, {"documentElement", DOCUMENT_DOCUMENTELEMENT, JSPROP_ENUMERATE | JSPROP_READONLY}, {0} }; @@ -907,12 +959,14 @@ static JSPropertySpec DocumentProperties[] = // static JSFunctionSpec DocumentMethods[] = { - {"createElement", DocumentCreateElement, 2}, + {"createElement", DocumentCreateElement, 1}, {"createDocumentFragment", DocumentCreateDocumentFragment, 0}, {"createTextNode", DocumentCreateTextNode, 1}, {"createComment", DocumentCreateComment, 1}, + {"createCDATASection", DocumentCreateCDATASection, 1}, {"createProcessingInstruction", DocumentCreateProcessingInstruction, 2}, - {"createAttribute", DocumentCreateAttribute, 2}, + {"createAttribute", DocumentCreateAttribute, 1}, + {"createEntityReference", DocumentCreateEntityReference, 1}, {"getElementsByTagName", DocumentGetElementsByTagName, 1}, {"captureEvent", EventCapturerCaptureEvent, 1}, {"releaseEvent", EventCapturerReleaseEvent, 1}, @@ -948,7 +1002,7 @@ nsresult NS_InitDocumentClass(nsIScriptContext *aContext, void **aPrototype) (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || !JSVAL_IS_OBJECT(vp)) { - if (NS_OK != NS_InitDocumentFragmentClass(aContext, (void **)&parent_proto)) { + if (NS_OK != NS_InitNodeClass(aContext, (void **)&parent_proto)) { return NS_ERROR_FAILURE; } proto = JS_InitClass(jscontext, // context diff --git a/mozilla/dom/src/coreDOM/nsJSDocumentFragment.cpp b/mozilla/dom/src/coreDOM/nsJSDocumentFragment.cpp index 05dcacfccc4..c1b3e0afef8 100644 --- a/mozilla/dom/src/coreDOM/nsJSDocumentFragment.cpp +++ b/mozilla/dom/src/coreDOM/nsJSDocumentFragment.cpp @@ -25,25 +25,16 @@ #include "nsIScriptGlobalObject.h" #include "nsIPtr.h" #include "nsString.h" -#include "nsIDOMDocument.h" #include "nsIDOMDocumentFragment.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(kIDocumentIID, NS_IDOMDOCUMENT_IID); static NS_DEFINE_IID(kIDocumentFragmentIID, NS_IDOMDOCUMENTFRAGMENT_IID); -NS_DEF_PTR(nsIDOMDocument); NS_DEF_PTR(nsIDOMDocumentFragment); -// -// DocumentFragment property ids -// -enum DocumentFragment_slots { - DOCUMENTFRAGMENT_MASTERDOC = -1 -}; /***********************************************************************/ // @@ -61,33 +52,7 @@ GetDocumentFragmentProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case DOCUMENTFRAGMENT_MASTERDOC: - { - nsIDOMDocument* prop; - if (NS_OK == a->GetMasterDoc(&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 0: default: { nsIJSScriptObject *object; @@ -240,7 +205,6 @@ JSClass DocumentFragmentClass = { // static JSPropertySpec DocumentFragmentProperties[] = { - {"masterDoc", DOCUMENTFRAGMENT_MASTERDOC, JSPROP_ENUMERATE | JSPROP_READONLY}, {0} }; diff --git a/mozilla/dom/src/coreDOM/nsJSDocumentType.cpp b/mozilla/dom/src/coreDOM/nsJSDocumentType.cpp index 0ea55be366a..0b369f9d431 100644 --- a/mozilla/dom/src/coreDOM/nsJSDocumentType.cpp +++ b/mozilla/dom/src/coreDOM/nsJSDocumentType.cpp @@ -43,7 +43,8 @@ NS_DEF_PTR(nsIDOMDocumentType); // enum DocumentType_slots { DOCUMENTTYPE_NAME = -1, - DOCUMENTTYPE_ENTITIES = -2 + DOCUMENTTYPE_ENTITIES = -2, + DOCUMENTTYPE_NOTATIONS = -3 }; /***********************************************************************/ @@ -102,6 +103,33 @@ GetDocumentTypeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } break; } + case DOCUMENTTYPE_NOTATIONS: + { + nsIDOMNamedNodeMap* prop; + if (NS_OK == a->GetNotations(&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; @@ -143,44 +171,7 @@ SetDocumentTypeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case DOCUMENTTYPE_NAME: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetName(prop); - - break; - } - case DOCUMENTTYPE_ENTITIES: - { - nsIDOMNamedNodeMap* 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(kINamedNodeMapIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type NamedNodeMap"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetEntities(prop); - if (prop) NS_RELEASE(prop); - break; - } + case 0: default: { nsIJSScriptObject *object; @@ -291,8 +282,9 @@ JSClass DocumentTypeClass = { // static JSPropertySpec DocumentTypeProperties[] = { - {"name", DOCUMENTTYPE_NAME, JSPROP_ENUMERATE}, - {"entities", DOCUMENTTYPE_ENTITIES, JSPROP_ENUMERATE}, + {"name", DOCUMENTTYPE_NAME, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"entities", DOCUMENTTYPE_ENTITIES, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"notations", DOCUMENTTYPE_NOTATIONS, JSPROP_ENUMERATE | JSPROP_READONLY}, {0} }; @@ -334,6 +326,9 @@ nsresult NS_InitDocumentTypeClass(nsIScriptContext *aContext, void **aPrototype) (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || !JSVAL_IS_OBJECT(vp)) { + if (NS_OK != NS_InitNodeClass(aContext, (void **)&parent_proto)) { + return NS_ERROR_FAILURE; + } proto = JS_InitClass(jscontext, // context global, // global object parent_proto, // parent proto diff --git a/mozilla/dom/src/coreDOM/nsJSElement.cpp b/mozilla/dom/src/coreDOM/nsJSElement.cpp index 9a3738b4b4c..950fb9c8096 100644 --- a/mozilla/dom/src/coreDOM/nsJSElement.cpp +++ b/mozilla/dom/src/coreDOM/nsJSElement.cpp @@ -26,7 +26,7 @@ #include "nsIPtr.h" #include "nsString.h" #include "nsIDOMElement.h" -#include "nsIDOMAttribute.h" +#include "nsIDOMAttr.h" #include "nsIDOMNodeList.h" @@ -34,11 +34,11 @@ 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(kIElementIID, NS_IDOMELEMENT_IID); -static NS_DEFINE_IID(kIAttributeIID, NS_IDOMATTRIBUTE_IID); +static NS_DEFINE_IID(kIAttrIID, NS_IDOMATTR_IID); static NS_DEFINE_IID(kINodeListIID, NS_IDOMNODELIST_IID); NS_DEF_PTR(nsIDOMElement); -NS_DEF_PTR(nsIDOMAttribute); +NS_DEF_PTR(nsIDOMAttr); NS_DEF_PTR(nsIDOMNodeList); // @@ -352,7 +352,7 @@ ElementGetAttributeNode(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, j { nsIDOMElement *nativeThis = (nsIDOMElement*)JS_GetPrivate(cx, obj); JSBool rBool = JS_FALSE; - nsIDOMAttribute* nativeRet; + nsIDOMAttr* nativeRet; nsAutoString b0; *rval = JSVAL_NULL; @@ -410,7 +410,8 @@ ElementSetAttributeNode(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, j { nsIDOMElement *nativeThis = (nsIDOMElement*)JS_GetPrivate(cx, obj); JSBool rBool = JS_FALSE; - nsIDOMAttributePtr b0; + nsIDOMAttr* nativeRet; + nsIDOMAttrPtr b0; *rval = JSVAL_NULL; @@ -429,8 +430,8 @@ ElementSetAttributeNode(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, j NS_ASSERTION(nsnull != supports0, "null pointer"); if ((nsnull == supports0) || - (NS_OK != supports0->QueryInterface(kIAttributeIID, (void **)(b0.Query())))) { - JS_ReportError(cx, "Parameter must be of type Attribute"); + (NS_OK != supports0->QueryInterface(kIAttrIID, (void **)(b0.Query())))) { + JS_ReportError(cx, "Parameter must be of type Attr"); return JS_FALSE; } } @@ -439,11 +440,26 @@ ElementSetAttributeNode(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, j return JS_FALSE; } - if (NS_OK != nativeThis->SetAttributeNode(b0)) { + if (NS_OK != nativeThis->SetAttributeNode(b0, &nativeRet)) { return JS_FALSE; } - *rval = JSVAL_VOID; + 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 setAttributeNode requires 1 parameters"); @@ -462,7 +478,8 @@ ElementRemoveAttributeNode(JSContext *cx, JSObject *obj, uintN argc, jsval *argv { nsIDOMElement *nativeThis = (nsIDOMElement*)JS_GetPrivate(cx, obj); JSBool rBool = JS_FALSE; - nsIDOMAttributePtr b0; + nsIDOMAttr* nativeRet; + nsIDOMAttrPtr b0; *rval = JSVAL_NULL; @@ -481,8 +498,8 @@ ElementRemoveAttributeNode(JSContext *cx, JSObject *obj, uintN argc, jsval *argv NS_ASSERTION(nsnull != supports0, "null pointer"); if ((nsnull == supports0) || - (NS_OK != supports0->QueryInterface(kIAttributeIID, (void **)(b0.Query())))) { - JS_ReportError(cx, "Parameter must be of type Attribute"); + (NS_OK != supports0->QueryInterface(kIAttrIID, (void **)(b0.Query())))) { + JS_ReportError(cx, "Parameter must be of type Attr"); return JS_FALSE; } } @@ -491,11 +508,26 @@ ElementRemoveAttributeNode(JSContext *cx, JSObject *obj, uintN argc, jsval *argv return JS_FALSE; } - if (NS_OK != nativeThis->RemoveAttributeNode(b0)) { + if (NS_OK != nativeThis->RemoveAttributeNode(b0, &nativeRet)) { return JS_FALSE; } - *rval = JSVAL_VOID; + 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 removeAttributeNode requires 1 parameters"); diff --git a/mozilla/dom/src/html/nsJSHTMLDelElement.cpp b/mozilla/dom/src/coreDOM/nsJSEntity.cpp similarity index 64% rename from mozilla/dom/src/html/nsJSHTMLDelElement.cpp rename to mozilla/dom/src/coreDOM/nsJSEntity.cpp index 06303ffce31..58b143d2121 100644 --- a/mozilla/dom/src/html/nsJSHTMLDelElement.cpp +++ b/mozilla/dom/src/coreDOM/nsJSEntity.cpp @@ -25,32 +25,33 @@ #include "nsIScriptGlobalObject.h" #include "nsIPtr.h" #include "nsString.h" -#include "nsIDOMHTMLDelElement.h" +#include "nsIDOMEntity.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(kIHTMLDelElementIID, NS_IDOMHTMLDELELEMENT_IID); +static NS_DEFINE_IID(kIEntityIID, NS_IDOMENTITY_IID); -NS_DEF_PTR(nsIDOMHTMLDelElement); +NS_DEF_PTR(nsIDOMEntity); // -// HTMLDelElement property ids +// Entity property ids // -enum HTMLDelElement_slots { - HTMLDELELEMENT_CITE = -1, - HTMLDELELEMENT_DATETIME = -2 +enum Entity_slots { + ENTITY_PUBLICID = -1, + ENTITY_SYSTEMID = -2, + ENTITY_NOTATIONNAME = -3 }; /***********************************************************************/ // -// HTMLDelElement Properties Getter +// Entity Properties Getter // PR_STATIC_CALLBACK(JSBool) -GetHTMLDelElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +GetEntityProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) { - nsIDOMHTMLDelElement *a = (nsIDOMHTMLDelElement*)JS_GetPrivate(cx, obj); + nsIDOMEntity *a = (nsIDOMEntity*)JS_GetPrivate(cx, obj); // If there's no private data, this must be the prototype, so ignore if (nsnull == a) { @@ -59,10 +60,10 @@ GetHTMLDelElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case HTMLDELELEMENT_CITE: + case ENTITY_PUBLICID: { nsAutoString prop; - if (NS_OK == a->GetCite(prop)) { + if (NS_OK == a->GetPublicId(prop)) { JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); // set the return value *vp = STRING_TO_JSVAL(jsstring); @@ -72,10 +73,23 @@ GetHTMLDelElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } break; } - case HTMLDELELEMENT_DATETIME: + case ENTITY_SYSTEMID: { nsAutoString prop; - if (NS_OK == a->GetDateTime(prop)) { + if (NS_OK == a->GetSystemId(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case ENTITY_NOTATIONNAME: + { + nsAutoString prop; + if (NS_OK == a->GetNotationName(prop)) { JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); // set the return value *vp = STRING_TO_JSVAL(jsstring); @@ -112,12 +126,12 @@ GetHTMLDelElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) /***********************************************************************/ // -// HTMLDelElement Properties Setter +// Entity Properties Setter // PR_STATIC_CALLBACK(JSBool) -SetHTMLDelElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +SetEntityProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) { - nsIDOMHTMLDelElement *a = (nsIDOMHTMLDelElement*)JS_GetPrivate(cx, obj); + nsIDOMEntity *a = (nsIDOMEntity*)JS_GetPrivate(cx, obj); // If there's no private data, this must be the prototype, so ignore if (nsnull == a) { @@ -126,36 +140,7 @@ SetHTMLDelElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case HTMLDELELEMENT_CITE: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetCite(prop); - - break; - } - case HTMLDELELEMENT_DATETIME: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetDateTime(prop); - - break; - } + case 0: default: { nsIJSScriptObject *object; @@ -183,12 +168,12 @@ SetHTMLDelElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) // -// HTMLDelElement finalizer +// Entity finalizer // PR_STATIC_CALLBACK(void) -FinalizeHTMLDelElement(JSContext *cx, JSObject *obj) +FinalizeEntity(JSContext *cx, JSObject *obj) { - nsIDOMHTMLDelElement *a = (nsIDOMHTMLDelElement*)JS_GetPrivate(cx, obj); + nsIDOMEntity *a = (nsIDOMEntity*)JS_GetPrivate(cx, obj); if (nsnull != a) { // get the js object @@ -204,12 +189,12 @@ FinalizeHTMLDelElement(JSContext *cx, JSObject *obj) // -// HTMLDelElement enumerate +// Entity enumerate // PR_STATIC_CALLBACK(JSBool) -EnumerateHTMLDelElement(JSContext *cx, JSObject *obj) +EnumerateEntity(JSContext *cx, JSObject *obj) { - nsIDOMHTMLDelElement *a = (nsIDOMHTMLDelElement*)JS_GetPrivate(cx, obj); + nsIDOMEntity *a = (nsIDOMEntity*)JS_GetPrivate(cx, obj); if (nsnull != a) { // get the js object @@ -224,12 +209,12 @@ EnumerateHTMLDelElement(JSContext *cx, JSObject *obj) // -// HTMLDelElement resolve +// Entity resolve // PR_STATIC_CALLBACK(JSBool) -ResolveHTMLDelElement(JSContext *cx, JSObject *obj, jsval id) +ResolveEntity(JSContext *cx, JSObject *obj, jsval id) { - nsIDOMHTMLDelElement *a = (nsIDOMHTMLDelElement*)JS_GetPrivate(cx, obj); + nsIDOMEntity *a = (nsIDOMEntity*)JS_GetPrivate(cx, obj); if (nsnull != a) { // get the js object @@ -245,56 +230,57 @@ ResolveHTMLDelElement(JSContext *cx, JSObject *obj, jsval id) /***********************************************************************/ // -// class for HTMLDelElement +// class for Entity // -JSClass HTMLDelElementClass = { - "HTMLDelElement", +JSClass EntityClass = { + "Entity", JSCLASS_HAS_PRIVATE, JS_PropertyStub, JS_PropertyStub, - GetHTMLDelElementProperty, - SetHTMLDelElementProperty, - EnumerateHTMLDelElement, - ResolveHTMLDelElement, + GetEntityProperty, + SetEntityProperty, + EnumerateEntity, + ResolveEntity, JS_ConvertStub, - FinalizeHTMLDelElement + FinalizeEntity }; // -// HTMLDelElement class properties +// Entity class properties // -static JSPropertySpec HTMLDelElementProperties[] = +static JSPropertySpec EntityProperties[] = { - {"cite", HTMLDELELEMENT_CITE, JSPROP_ENUMERATE}, - {"dateTime", HTMLDELELEMENT_DATETIME, JSPROP_ENUMERATE}, + {"publicId", ENTITY_PUBLICID, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"systemId", ENTITY_SYSTEMID, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"notationName", ENTITY_NOTATIONNAME, JSPROP_ENUMERATE | JSPROP_READONLY}, {0} }; // -// HTMLDelElement class methods +// Entity class methods // -static JSFunctionSpec HTMLDelElementMethods[] = +static JSFunctionSpec EntityMethods[] = { {0} }; // -// HTMLDelElement constructor +// Entity constructor // PR_STATIC_CALLBACK(JSBool) -HTMLDelElement(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +Entity(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { return JS_FALSE; } // -// HTMLDelElement class initialization +// Entity class initialization // -nsresult NS_InitHTMLDelElementClass(nsIScriptContext *aContext, void **aPrototype) +nsresult NS_InitEntityClass(nsIScriptContext *aContext, void **aPrototype) { JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); JSObject *proto = nsnull; @@ -303,23 +289,23 @@ nsresult NS_InitHTMLDelElementClass(nsIScriptContext *aContext, void **aPrototyp JSObject *global = JS_GetGlobalObject(jscontext); jsval vp; - if ((PR_TRUE != JS_LookupProperty(jscontext, global, "HTMLDelElement", &vp)) || + if ((PR_TRUE != JS_LookupProperty(jscontext, global, "Entity", &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_InitHTMLElementClass(aContext, (void **)&parent_proto)) { + if (NS_OK != NS_InitNodeClass(aContext, (void **)&parent_proto)) { return NS_ERROR_FAILURE; } proto = JS_InitClass(jscontext, // context global, // global object parent_proto, // parent proto - &HTMLDelElementClass, // JSClass - HTMLDelElement, // JSNative ctor + &EntityClass, // JSClass + Entity, // JSNative ctor 0, // ctor args - HTMLDelElementProperties, // proto props - HTMLDelElementMethods, // proto funcs + EntityProperties, // proto props + EntityMethods, // proto funcs nsnull, // ctor props (static) nsnull); // ctor funcs (static) if (nsnull == proto) { @@ -342,17 +328,17 @@ nsresult NS_InitHTMLDelElementClass(nsIScriptContext *aContext, void **aPrototyp // -// Method for creating a new HTMLDelElement JavaScript object +// Method for creating a new Entity JavaScript object // -extern "C" NS_DOM nsresult NS_NewScriptHTMLDelElement(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +extern "C" NS_DOM nsresult NS_NewScriptEntity(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) { - NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptHTMLDelElement"); + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptEntity"); JSObject *proto; JSObject *parent; nsIScriptObjectOwner *owner; JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); nsresult result = NS_OK; - nsIDOMHTMLDelElement *aHTMLDelElement; + nsIDOMEntity *aEntity; if (nsnull == aParent) { parent = nsnull; @@ -368,23 +354,23 @@ extern "C" NS_DOM nsresult NS_NewScriptHTMLDelElement(nsIScriptContext *aContext return NS_ERROR_FAILURE; } - if (NS_OK != NS_InitHTMLDelElementClass(aContext, (void **)&proto)) { + if (NS_OK != NS_InitEntityClass(aContext, (void **)&proto)) { return NS_ERROR_FAILURE; } - result = aSupports->QueryInterface(kIHTMLDelElementIID, (void **)&aHTMLDelElement); + result = aSupports->QueryInterface(kIEntityIID, (void **)&aEntity); if (NS_OK != result) { return result; } // create a js object for this class - *aReturn = JS_NewObject(jscontext, &HTMLDelElementClass, proto, parent); + *aReturn = JS_NewObject(jscontext, &EntityClass, proto, parent); if (nsnull != *aReturn) { // connect the native object to the js object - JS_SetPrivate(jscontext, (JSObject *)*aReturn, aHTMLDelElement); + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aEntity); } else { - NS_RELEASE(aHTMLDelElement); + NS_RELEASE(aEntity); return NS_ERROR_FAILURE; } diff --git a/mozilla/dom/src/coreDOM/nsJSEntityReference.cpp b/mozilla/dom/src/coreDOM/nsJSEntityReference.cpp new file mode 100644 index 00000000000..0f301a857a3 --- /dev/null +++ b/mozilla/dom/src/coreDOM/nsJSEntityReference.cpp @@ -0,0 +1,329 @@ +/* -*- 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 "nsIDOMEntityReference.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(kIEntityReferenceIID, NS_IDOMENTITYREFERENCE_IID); + +NS_DEF_PTR(nsIDOMEntityReference); + + +/***********************************************************************/ +// +// EntityReference Properties Getter +// +PR_STATIC_CALLBACK(JSBool) +GetEntityReferenceProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMEntityReference *a = (nsIDOMEntityReference*)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->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; +} + +/***********************************************************************/ +// +// EntityReference Properties Setter +// +PR_STATIC_CALLBACK(JSBool) +SetEntityReferenceProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMEntityReference *a = (nsIDOMEntityReference*)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; +} + + +// +// EntityReference finalizer +// +PR_STATIC_CALLBACK(void) +FinalizeEntityReference(JSContext *cx, JSObject *obj) +{ + nsIDOMEntityReference *a = (nsIDOMEntityReference*)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); + } +} + + +// +// EntityReference enumerate +// +PR_STATIC_CALLBACK(JSBool) +EnumerateEntityReference(JSContext *cx, JSObject *obj) +{ + nsIDOMEntityReference *a = (nsIDOMEntityReference*)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; +} + + +// +// EntityReference resolve +// +PR_STATIC_CALLBACK(JSBool) +ResolveEntityReference(JSContext *cx, JSObject *obj, jsval id) +{ + nsIDOMEntityReference *a = (nsIDOMEntityReference*)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 EntityReference +// +JSClass EntityReferenceClass = { + "EntityReference", + JSCLASS_HAS_PRIVATE, + JS_PropertyStub, + JS_PropertyStub, + GetEntityReferenceProperty, + SetEntityReferenceProperty, + EnumerateEntityReference, + ResolveEntityReference, + JS_ConvertStub, + FinalizeEntityReference +}; + + +// +// EntityReference class properties +// +static JSPropertySpec EntityReferenceProperties[] = +{ + {0} +}; + + +// +// EntityReference class methods +// +static JSFunctionSpec EntityReferenceMethods[] = +{ + {0} +}; + + +// +// EntityReference constructor +// +PR_STATIC_CALLBACK(JSBool) +EntityReference(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + return JS_FALSE; +} + + +// +// EntityReference class initialization +// +nsresult NS_InitEntityReferenceClass(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, "EntityReference", &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_InitNodeClass(aContext, (void **)&parent_proto)) { + return NS_ERROR_FAILURE; + } + proto = JS_InitClass(jscontext, // context + global, // global object + parent_proto, // parent proto + &EntityReferenceClass, // JSClass + EntityReference, // JSNative ctor + 0, // ctor args + EntityReferenceProperties, // proto props + EntityReferenceMethods, // 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 EntityReference JavaScript object +// +extern "C" NS_DOM nsresult NS_NewScriptEntityReference(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +{ + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptEntityReference"); + JSObject *proto; + JSObject *parent; + nsIScriptObjectOwner *owner; + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + nsresult result = NS_OK; + nsIDOMEntityReference *aEntityReference; + + 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_InitEntityReferenceClass(aContext, (void **)&proto)) { + return NS_ERROR_FAILURE; + } + + result = aSupports->QueryInterface(kIEntityReferenceIID, (void **)&aEntityReference); + if (NS_OK != result) { + return result; + } + + // create a js object for this class + *aReturn = JS_NewObject(jscontext, &EntityReferenceClass, proto, parent); + if (nsnull != *aReturn) { + // connect the native object to the js object + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aEntityReference); + } + else { + NS_RELEASE(aEntityReference); + return NS_ERROR_FAILURE; + } + + return NS_OK; +} diff --git a/mozilla/dom/src/coreDOM/nsJSNamedNodeMap.cpp b/mozilla/dom/src/coreDOM/nsJSNamedNodeMap.cpp index a177eb96e28..2d318fd970a 100644 --- a/mozilla/dom/src/coreDOM/nsJSNamedNodeMap.cpp +++ b/mozilla/dom/src/coreDOM/nsJSNamedNodeMap.cpp @@ -283,6 +283,7 @@ NamedNodeMapSetNamedItem(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, { nsIDOMNamedNodeMap *nativeThis = (nsIDOMNamedNodeMap*)JS_GetPrivate(cx, obj); JSBool rBool = JS_FALSE; + nsIDOMNode* nativeRet; nsIDOMNodePtr b0; *rval = JSVAL_NULL; @@ -312,11 +313,26 @@ NamedNodeMapSetNamedItem(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, return JS_FALSE; } - if (NS_OK != nativeThis->SetNamedItem(b0)) { + if (NS_OK != nativeThis->SetNamedItem(b0, &nativeRet)) { return JS_FALSE; } - *rval = JSVAL_VOID; + 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 setNamedItem requires 1 parameters"); diff --git a/mozilla/dom/src/coreDOM/nsJSNode.cpp b/mozilla/dom/src/coreDOM/nsJSNode.cpp index 7aac1f579c6..74731f374dd 100644 --- a/mozilla/dom/src/coreDOM/nsJSNode.cpp +++ b/mozilla/dom/src/coreDOM/nsJSNode.cpp @@ -25,6 +25,7 @@ #include "nsIScriptGlobalObject.h" #include "nsIPtr.h" #include "nsString.h" +#include "nsIDOMDocument.h" #include "nsIDOMNamedNodeMap.h" #include "nsIDOMNode.h" #include "nsIDOMNodeList.h" @@ -33,10 +34,12 @@ 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(kIDocumentIID, NS_IDOMDOCUMENT_IID); static NS_DEFINE_IID(kINamedNodeMapIID, NS_IDOMNAMEDNODEMAP_IID); static NS_DEFINE_IID(kINodeIID, NS_IDOMNODE_IID); static NS_DEFINE_IID(kINodeListIID, NS_IDOMNODELIST_IID); +NS_DEF_PTR(nsIDOMDocument); NS_DEF_PTR(nsIDOMNamedNodeMap); NS_DEF_PTR(nsIDOMNode); NS_DEF_PTR(nsIDOMNodeList); @@ -50,12 +53,12 @@ enum Node_slots { 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 + NODE_FIRSTCHILD = -6, + NODE_LASTCHILD = -7, + NODE_PREVIOUSSIBLING = -8, + NODE_NEXTSIBLING = -9, + NODE_ATTRIBUTES = -10, + NODE_OWNERDOCUMENT = -11 }; /***********************************************************************/ @@ -102,7 +105,7 @@ GetNodeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } case NODE_NODETYPE: { - PRInt32 prop; + PRUint16 prop; if (NS_OK == a->GetNodeType(&prop)) { *vp = INT_TO_JSVAL(prop); } @@ -165,17 +168,6 @@ GetNodeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } break; } - case NODE_HASCHILDNODES: - { - PRBool prop; - if (NS_OK == a->GetHasChildNodes(&prop)) { - *vp = BOOLEAN_TO_JSVAL(prop); - } - else { - return JS_FALSE; - } - break; - } case NODE_FIRSTCHILD: { nsIDOMNode* prop; @@ -311,6 +303,33 @@ GetNodeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } break; } + case NODE_OWNERDOCUMENT: + { + nsIDOMDocument* prop; + if (NS_OK == a->GetOwnerDocument(&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; @@ -765,14 +784,14 @@ NodeAppendChild(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rv // -// Native method CloneNode +// Native method HasChildNodes // PR_STATIC_CALLBACK(JSBool) -NodeCloneNode(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +NodeHasChildNodes(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { nsIDOMNode *nativeThis = (nsIDOMNode*)JS_GetPrivate(cx, obj); JSBool rBool = JS_FALSE; - nsIDOMNode* nativeRet; + PRBool nativeRet; *rval = JSVAL_NULL; @@ -783,7 +802,47 @@ NodeCloneNode(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval if (argc >= 0) { - if (NS_OK != nativeThis->CloneNode(&nativeRet)) { + if (NS_OK != nativeThis->HasChildNodes(&nativeRet)) { + return JS_FALSE; + } + + *rval = BOOLEAN_TO_JSVAL(nativeRet); + } + else { + JS_ReportError(cx, "Function hasChildNodes requires 0 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + +// +// Native method CloneNode +// +PR_STATIC_CALLBACK(JSBool) +NodeCloneNode(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMNode *nativeThis = (nsIDOMNode*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + nsIDOMNode* nativeRet; + PRBool 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_ValueToBoolean(cx, argv[0], &b0)) { + JS_ReportError(cx, "Parameter must be a boolean"); + return JS_FALSE; + } + + if (NS_OK != nativeThis->CloneNode(b0, &nativeRet)) { return JS_FALSE; } @@ -805,66 +864,7 @@ NodeCloneNode(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval } } else { - JS_ReportError(cx, "Function cloneNode requires 0 parameters"); - return JS_FALSE; - } - - return JS_TRUE; -} - - -// -// Native method Equals -// -PR_STATIC_CALLBACK(JSBool) -NodeEquals(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) -{ - nsIDOMNode *nativeThis = (nsIDOMNode*)JS_GetPrivate(cx, obj); - JSBool rBool = JS_FALSE; - PRBool nativeRet; - nsIDOMNodePtr b0; - PRBool 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) { - - if (JSVAL_IS_NULL(argv[0])){ - b0 = nsnull; - } - else if (JSVAL_IS_OBJECT(argv[0])) { - nsISupports *supports0 = (nsISupports *)JS_GetPrivate(cx, JSVAL_TO_OBJECT(argv[0])); - NS_ASSERTION(nsnull != supports0, "null pointer"); - - if ((nsnull == supports0) || - (NS_OK != supports0->QueryInterface(kINodeIID, (void **)(b0.Query())))) { - JS_ReportError(cx, "Parameter must be of type Node"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - if (!JS_ValueToBoolean(cx, argv[1], &b1)) { - JS_ReportError(cx, "Parameter must be a boolean"); - return JS_FALSE; - } - - if (NS_OK != nativeThis->Equals(b0, b1, &nativeRet)) { - return JS_FALSE; - } - - *rval = BOOLEAN_TO_JSVAL(nativeRet); - } - else { - JS_ReportError(cx, "Function equals requires 2 parameters"); + JS_ReportError(cx, "Function cloneNode requires 1 parameters"); return JS_FALSE; } @@ -900,12 +900,12 @@ static JSPropertySpec NodeProperties[] = {"nodeType", NODE_NODETYPE, JSPROP_ENUMERATE | JSPROP_READONLY}, {"parentNode", NODE_PARENTNODE, JSPROP_ENUMERATE | JSPROP_READONLY}, {"childNodes", NODE_CHILDNODES, JSPROP_ENUMERATE | JSPROP_READONLY}, - {"hasChildNodes", NODE_HASCHILDNODES, JSPROP_ENUMERATE | JSPROP_READONLY}, {"firstChild", NODE_FIRSTCHILD, JSPROP_ENUMERATE | JSPROP_READONLY}, {"lastChild", NODE_LASTCHILD, JSPROP_ENUMERATE | JSPROP_READONLY}, {"previousSibling", NODE_PREVIOUSSIBLING, JSPROP_ENUMERATE | JSPROP_READONLY}, {"nextSibling", NODE_NEXTSIBLING, JSPROP_ENUMERATE | JSPROP_READONLY}, {"attributes", NODE_ATTRIBUTES, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"ownerDocument", NODE_OWNERDOCUMENT, JSPROP_ENUMERATE | JSPROP_READONLY}, {0} }; @@ -919,8 +919,8 @@ static JSFunctionSpec NodeMethods[] = {"replaceChild", NodeReplaceChild, 2}, {"removeChild", NodeRemoveChild, 1}, {"appendChild", NodeAppendChild, 1}, - {"cloneNode", NodeCloneNode, 0}, - {"equals", NodeEquals, 2}, + {"hasChildNodes", NodeHasChildNodes, 0}, + {"cloneNode", NodeCloneNode, 1}, {0} }; @@ -970,35 +970,41 @@ nsresult NS_InitNodeClass(nsIScriptContext *aContext, void **aPrototype) if ((PR_TRUE == JS_LookupProperty(jscontext, global, "Node", &vp)) && JSVAL_IS_OBJECT(vp) && ((constructor = JSVAL_TO_OBJECT(vp)) != nsnull)) { - vp = INT_TO_JSVAL(nsIDOMNode::DOCUMENT); - JS_SetProperty(jscontext, constructor, "DOCUMENT", &vp); + vp = INT_TO_JSVAL(nsIDOMNode::ELEMENT_NODE); + JS_SetProperty(jscontext, constructor, "ELEMENT_NODE", &vp); - vp = INT_TO_JSVAL(nsIDOMNode::ELEMENT); - JS_SetProperty(jscontext, constructor, "ELEMENT", &vp); + vp = INT_TO_JSVAL(nsIDOMNode::ATTRIBUTE_NODE); + JS_SetProperty(jscontext, constructor, "ATTRIBUTE_NODE", &vp); - vp = INT_TO_JSVAL(nsIDOMNode::ATTRIBUTE); - JS_SetProperty(jscontext, constructor, "ATTRIBUTE", &vp); + vp = INT_TO_JSVAL(nsIDOMNode::TEXT_NODE); + JS_SetProperty(jscontext, constructor, "TEXT_NODE", &vp); - vp = INT_TO_JSVAL(nsIDOMNode::PROCESSING_INSTRUCTION); - JS_SetProperty(jscontext, constructor, "PROCESSING_INSTRUCTION", &vp); + vp = INT_TO_JSVAL(nsIDOMNode::CDATA_SECTION_NODE); + JS_SetProperty(jscontext, constructor, "CDATA_SECTION_NODE", &vp); - vp = INT_TO_JSVAL(nsIDOMNode::COMMENT); - JS_SetProperty(jscontext, constructor, "COMMENT", &vp); + vp = INT_TO_JSVAL(nsIDOMNode::ENTITY_REFERENCE_NODE); + JS_SetProperty(jscontext, constructor, "ENTITY_REFERENCE_NODE", &vp); - vp = INT_TO_JSVAL(nsIDOMNode::TEXT); - JS_SetProperty(jscontext, constructor, "TEXT", &vp); + vp = INT_TO_JSVAL(nsIDOMNode::ENTITY_NODE); + JS_SetProperty(jscontext, constructor, "ENTITY_NODE", &vp); - vp = INT_TO_JSVAL(nsIDOMNode::CDATA_SECTION); - JS_SetProperty(jscontext, constructor, "CDATA_SECTION", &vp); + vp = INT_TO_JSVAL(nsIDOMNode::PROCESSING_INSTRUCTION_NODE); + JS_SetProperty(jscontext, constructor, "PROCESSING_INSTRUCTION_NODE", &vp); - vp = INT_TO_JSVAL(nsIDOMNode::DOCUMENT_FRAGMENT); - JS_SetProperty(jscontext, constructor, "DOCUMENT_FRAGMENT", &vp); + vp = INT_TO_JSVAL(nsIDOMNode::COMMENT_NODE); + JS_SetProperty(jscontext, constructor, "COMMENT_NODE", &vp); - vp = INT_TO_JSVAL(nsIDOMNode::ENTITY_DECLARATION); - JS_SetProperty(jscontext, constructor, "ENTITY_DECLARATION", &vp); + vp = INT_TO_JSVAL(nsIDOMNode::DOCUMENT_NODE); + JS_SetProperty(jscontext, constructor, "DOCUMENT_NODE", &vp); - vp = INT_TO_JSVAL(nsIDOMNode::ENTITY_REFERENCE); - JS_SetProperty(jscontext, constructor, "ENTITY_REFERENCE", &vp); + vp = INT_TO_JSVAL(nsIDOMNode::DOCUMENT_TYPE_NODE); + JS_SetProperty(jscontext, constructor, "DOCUMENT_TYPE_NODE", &vp); + + vp = INT_TO_JSVAL(nsIDOMNode::DOCUMENT_FRAGMENT_NODE); + JS_SetProperty(jscontext, constructor, "DOCUMENT_FRAGMENT_NODE", &vp); + + vp = INT_TO_JSVAL(nsIDOMNode::NOTATION_NODE); + JS_SetProperty(jscontext, constructor, "NOTATION_NODE", &vp); } diff --git a/mozilla/dom/src/coreDOM/nsJSNotation.cpp b/mozilla/dom/src/coreDOM/nsJSNotation.cpp new file mode 100644 index 00000000000..737c46d6819 --- /dev/null +++ b/mozilla/dom/src/coreDOM/nsJSNotation.cpp @@ -0,0 +1,363 @@ +/* -*- 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 "nsIDOMNotation.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(kINotationIID, NS_IDOMNOTATION_IID); + +NS_DEF_PTR(nsIDOMNotation); + +// +// Notation property ids +// +enum Notation_slots { + NOTATION_PUBLICID = -1, + NOTATION_SYSTEMID = -2 +}; + +/***********************************************************************/ +// +// Notation Properties Getter +// +PR_STATIC_CALLBACK(JSBool) +GetNotationProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMNotation *a = (nsIDOMNotation*)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 NOTATION_PUBLICID: + { + nsAutoString prop; + if (NS_OK == a->GetPublicId(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case NOTATION_SYSTEMID: + { + nsAutoString prop; + if (NS_OK == a->GetSystemId(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; +} + +/***********************************************************************/ +// +// Notation Properties Setter +// +PR_STATIC_CALLBACK(JSBool) +SetNotationProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + nsIDOMNotation *a = (nsIDOMNotation*)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; +} + + +// +// Notation finalizer +// +PR_STATIC_CALLBACK(void) +FinalizeNotation(JSContext *cx, JSObject *obj) +{ + nsIDOMNotation *a = (nsIDOMNotation*)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); + } +} + + +// +// Notation enumerate +// +PR_STATIC_CALLBACK(JSBool) +EnumerateNotation(JSContext *cx, JSObject *obj) +{ + nsIDOMNotation *a = (nsIDOMNotation*)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; +} + + +// +// Notation resolve +// +PR_STATIC_CALLBACK(JSBool) +ResolveNotation(JSContext *cx, JSObject *obj, jsval id) +{ + nsIDOMNotation *a = (nsIDOMNotation*)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 Notation +// +JSClass NotationClass = { + "Notation", + JSCLASS_HAS_PRIVATE, + JS_PropertyStub, + JS_PropertyStub, + GetNotationProperty, + SetNotationProperty, + EnumerateNotation, + ResolveNotation, + JS_ConvertStub, + FinalizeNotation +}; + + +// +// Notation class properties +// +static JSPropertySpec NotationProperties[] = +{ + {"publicId", NOTATION_PUBLICID, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"systemId", NOTATION_SYSTEMID, JSPROP_ENUMERATE | JSPROP_READONLY}, + {0} +}; + + +// +// Notation class methods +// +static JSFunctionSpec NotationMethods[] = +{ + {0} +}; + + +// +// Notation constructor +// +PR_STATIC_CALLBACK(JSBool) +Notation(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + return JS_FALSE; +} + + +// +// Notation class initialization +// +nsresult NS_InitNotationClass(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, "Notation", &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_InitNodeClass(aContext, (void **)&parent_proto)) { + return NS_ERROR_FAILURE; + } + proto = JS_InitClass(jscontext, // context + global, // global object + parent_proto, // parent proto + &NotationClass, // JSClass + Notation, // JSNative ctor + 0, // ctor args + NotationProperties, // proto props + NotationMethods, // 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 Notation JavaScript object +// +extern "C" NS_DOM nsresult NS_NewScriptNotation(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +{ + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptNotation"); + JSObject *proto; + JSObject *parent; + nsIScriptObjectOwner *owner; + JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); + nsresult result = NS_OK; + nsIDOMNotation *aNotation; + + 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_InitNotationClass(aContext, (void **)&proto)) { + return NS_ERROR_FAILURE; + } + + result = aSupports->QueryInterface(kINotationIID, (void **)&aNotation); + if (NS_OK != result) { + return result; + } + + // create a js object for this class + *aReturn = JS_NewObject(jscontext, &NotationClass, proto, parent); + if (nsnull != *aReturn) { + // connect the native object to the js object + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aNotation); + } + else { + NS_RELEASE(aNotation); + return NS_ERROR_FAILURE; + } + + return NS_OK; +} diff --git a/mozilla/dom/src/coreDOM/nsJSProcessingInstruction.cpp b/mozilla/dom/src/coreDOM/nsJSProcessingInstruction.cpp index 9a37d66bdb8..61430b85590 100644 --- a/mozilla/dom/src/coreDOM/nsJSProcessingInstruction.cpp +++ b/mozilla/dom/src/coreDOM/nsJSProcessingInstruction.cpp @@ -126,21 +126,6 @@ SetProcessingInstructionProperty(JSContext *cx, JSObject *obj, jsval id, jsval * if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case PROCESSINGINSTRUCTION_TARGET: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetTarget(prop); - - break; - } case PROCESSINGINSTRUCTION_DATA: { nsAutoString prop; @@ -266,7 +251,7 @@ JSClass ProcessingInstructionClass = { // static JSPropertySpec ProcessingInstructionProperties[] = { - {"target", PROCESSINGINSTRUCTION_TARGET, JSPROP_ENUMERATE}, + {"target", PROCESSINGINSTRUCTION_TARGET, JSPROP_ENUMERATE | JSPROP_READONLY}, {"data", PROCESSINGINSTRUCTION_DATA, JSPROP_ENUMERATE}, {0} }; diff --git a/mozilla/dom/src/coreDOM/nsJSText.cpp b/mozilla/dom/src/coreDOM/nsJSText.cpp index d8af6aac887..74165e87d08 100644 --- a/mozilla/dom/src/coreDOM/nsJSText.cpp +++ b/mozilla/dom/src/coreDOM/nsJSText.cpp @@ -237,93 +237,6 @@ TextSplitText(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval } -// -// Native method JoinText -// -PR_STATIC_CALLBACK(JSBool) -TextJoinText(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) -{ - nsIDOMText *nativeThis = (nsIDOMText*)JS_GetPrivate(cx, obj); - JSBool rBool = JS_FALSE; - nsIDOMText* nativeRet; - nsIDOMTextPtr b0; - nsIDOMTextPtr 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) { - - if (JSVAL_IS_NULL(argv[0])){ - b0 = nsnull; - } - else if (JSVAL_IS_OBJECT(argv[0])) { - nsISupports *supports0 = (nsISupports *)JS_GetPrivate(cx, JSVAL_TO_OBJECT(argv[0])); - NS_ASSERTION(nsnull != supports0, "null pointer"); - - if ((nsnull == supports0) || - (NS_OK != supports0->QueryInterface(kITextIID, (void **)(b0.Query())))) { - JS_ReportError(cx, "Parameter must be of type Text"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - if (JSVAL_IS_NULL(argv[1])){ - b1 = nsnull; - } - else if (JSVAL_IS_OBJECT(argv[1])) { - nsISupports *supports1 = (nsISupports *)JS_GetPrivate(cx, JSVAL_TO_OBJECT(argv[1])); - NS_ASSERTION(nsnull != supports1, "null pointer"); - - if ((nsnull == supports1) || - (NS_OK != supports1->QueryInterface(kITextIID, (void **)(b1.Query())))) { - JS_ReportError(cx, "Parameter must be of type Text"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - if (NS_OK != nativeThis->JoinText(b0, b1, &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 joinText requires 2 parameters"); - return JS_FALSE; - } - - return JS_TRUE; -} - - /***********************************************************************/ // // class for Text @@ -357,7 +270,6 @@ static JSPropertySpec TextProperties[] = static JSFunctionSpec TextMethods[] = { {"splitText", TextSplitText, 1}, - {"joinText", TextJoinText, 2}, {0} }; @@ -390,7 +302,7 @@ nsresult NS_InitTextClass(nsIScriptContext *aContext, void **aPrototype) (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || !JSVAL_IS_OBJECT(vp)) { - if (NS_OK != NS_InitDataClass(aContext, (void **)&parent_proto)) { + if (NS_OK != NS_InitCharacterDataClass(aContext, (void **)&parent_proto)) { return NS_ERROR_FAILURE; } proto = JS_InitClass(jscontext, // context diff --git a/mozilla/dom/src/html/Makefile b/mozilla/dom/src/html/Makefile index 625de6fad70..77fe5d1cf67 100644 --- a/mozilla/dom/src/html/Makefile +++ b/mozilla/dom/src/html/Makefile @@ -27,11 +27,11 @@ CPPSRCS = \ nsJSHTMLBRElement.cpp \ nsJSHTMLBaseElement.cpp \ nsJSHTMLBaseFontElement.cpp \ + nsJSHTMLBlockquoteElement.cpp \ nsJSHTMLBodyElement.cpp \ nsJSHTMLButtonElement.cpp \ nsJSHTMLCollection.cpp \ nsJSHTMLDListElement.cpp \ - nsJSHTMLDelElement.cpp \ nsJSHTMLDirectoryElement.cpp \ nsJSHTMLDivElement.cpp \ nsJSHTMLDocument.cpp \ @@ -47,7 +47,6 @@ CPPSRCS = \ nsJSHTMLHtmlElement.cpp \ nsJSHTMLImageElement.cpp \ nsJSHTMLInputElement.cpp \ - nsJSHTMLInsElement.cpp \ nsJSHTMLIsIndexElement.cpp \ nsJSHTMLLIElement.cpp \ nsJSHTMLLabelElement.cpp \ @@ -74,10 +73,7 @@ CPPSRCS = \ nsJSHTMLTableElement.cpp \ nsJSHTMLTableRowElement.cpp \ nsJSHTMLTableSectionElement.cpp \ - nsJSHTMLTbodyElement.cpp \ nsJSHTMLTextAreaElement.cpp \ - nsJSHTMLTfootElement.cpp \ - nsJSHTMLTheadElement.cpp \ nsJSHTMLTitleElement.cpp \ nsJSHTMLUListElement.cpp \ $(NULL) diff --git a/mozilla/dom/src/html/makefile.win b/mozilla/dom/src/html/makefile.win index 02bf8204c45..33abcb7ef05 100644 --- a/mozilla/dom/src/html/makefile.win +++ b/mozilla/dom/src/html/makefile.win @@ -31,11 +31,11 @@ CPPSRCS = \ nsJSHTMLBRElement.cpp \ nsJSHTMLBaseElement.cpp \ nsJSHTMLBaseFontElement.cpp \ + nsJSHTMLBlockquoteElement.cpp \ nsJSHTMLBodyElement.cpp \ nsJSHTMLButtonElement.cpp \ nsJSHTMLCollection.cpp \ nsJSHTMLDListElement.cpp \ - nsJSHTMLDelElement.cpp \ nsJSHTMLDirectoryElement.cpp \ nsJSHTMLDivElement.cpp \ nsJSHTMLDocument.cpp \ @@ -51,7 +51,6 @@ CPPSRCS = \ nsJSHTMLHtmlElement.cpp \ nsJSHTMLImageElement.cpp \ nsJSHTMLInputElement.cpp \ - nsJSHTMLInsElement.cpp \ nsJSHTMLIsIndexElement.cpp \ nsJSHTMLLIElement.cpp \ nsJSHTMLLabelElement.cpp \ @@ -78,10 +77,7 @@ CPPSRCS = \ nsJSHTMLTableElement.cpp \ nsJSHTMLTableRowElement.cpp \ nsJSHTMLTableSectionElement.cpp \ - nsJSHTMLTbodyElement.cpp \ nsJSHTMLTextAreaElement.cpp \ - nsJSHTMLTfootElement.cpp \ - nsJSHTMLTheadElement.cpp \ nsJSHTMLTitleElement.cpp \ nsJSHTMLUListElement.cpp \ $(NULL) @@ -94,11 +90,11 @@ CPP_OBJS= \ .\$(OBJDIR)\nsJSHTMLBRElement.obj \ .\$(OBJDIR)\nsJSHTMLBaseElement.obj \ .\$(OBJDIR)\nsJSHTMLBaseFontElement.obj \ + .\$(OBJDIR)\nsJSHTMLBlockquoteElement.obj \ .\$(OBJDIR)\nsJSHTMLBodyElement.obj \ .\$(OBJDIR)\nsJSHTMLButtonElement.obj \ .\$(OBJDIR)\nsJSHTMLCollection.obj \ .\$(OBJDIR)\nsJSHTMLDListElement.obj \ - .\$(OBJDIR)\nsJSHTMLDelElement.obj \ .\$(OBJDIR)\nsJSHTMLDirectoryElement.obj \ .\$(OBJDIR)\nsJSHTMLDivElement.obj \ .\$(OBJDIR)\nsJSHTMLDocument.obj \ @@ -114,7 +110,6 @@ CPP_OBJS= \ .\$(OBJDIR)\nsJSHTMLHtmlElement.obj \ .\$(OBJDIR)\nsJSHTMLImageElement.obj \ .\$(OBJDIR)\nsJSHTMLInputElement.obj \ - .\$(OBJDIR)\nsJSHTMLInsElement.obj \ .\$(OBJDIR)\nsJSHTMLIsIndexElement.obj \ .\$(OBJDIR)\nsJSHTMLLIElement.obj \ .\$(OBJDIR)\nsJSHTMLLabelElement.obj \ @@ -141,10 +136,7 @@ CPP_OBJS= \ .\$(OBJDIR)\nsJSHTMLTableElement.obj \ .\$(OBJDIR)\nsJSHTMLTableRowElement.obj \ .\$(OBJDIR)\nsJSHTMLTableSectionElement.obj \ - .\$(OBJDIR)\nsJSHTMLTbodyElement.obj \ .\$(OBJDIR)\nsJSHTMLTextAreaElement.obj \ - .\$(OBJDIR)\nsJSHTMLTfootElement.obj \ - .\$(OBJDIR)\nsJSHTMLTheadElement.obj \ .\$(OBJDIR)\nsJSHTMLTitleElement.obj \ .\$(OBJDIR)\nsJSHTMLUListElement.obj diff --git a/mozilla/dom/src/html/nsJSHTMLInsElement.cpp b/mozilla/dom/src/html/nsJSHTMLBlockquoteElement.cpp similarity index 64% rename from mozilla/dom/src/html/nsJSHTMLInsElement.cpp rename to mozilla/dom/src/html/nsJSHTMLBlockquoteElement.cpp index e004bc074ee..424d8a0f106 100644 --- a/mozilla/dom/src/html/nsJSHTMLInsElement.cpp +++ b/mozilla/dom/src/html/nsJSHTMLBlockquoteElement.cpp @@ -25,32 +25,31 @@ #include "nsIScriptGlobalObject.h" #include "nsIPtr.h" #include "nsString.h" -#include "nsIDOMHTMLInsElement.h" +#include "nsIDOMHTMLBlockquoteElement.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(kIHTMLInsElementIID, NS_IDOMHTMLINSELEMENT_IID); +static NS_DEFINE_IID(kIHTMLBlockquoteElementIID, NS_IDOMHTMLBLOCKQUOTEELEMENT_IID); -NS_DEF_PTR(nsIDOMHTMLInsElement); +NS_DEF_PTR(nsIDOMHTMLBlockquoteElement); // -// HTMLInsElement property ids +// HTMLBlockquoteElement property ids // -enum HTMLInsElement_slots { - HTMLINSELEMENT_CITE = -1, - HTMLINSELEMENT_DATETIME = -2 +enum HTMLBlockquoteElement_slots { + HTMLBLOCKQUOTEELEMENT_CITE = -1 }; /***********************************************************************/ // -// HTMLInsElement Properties Getter +// HTMLBlockquoteElement Properties Getter // PR_STATIC_CALLBACK(JSBool) -GetHTMLInsElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +GetHTMLBlockquoteElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) { - nsIDOMHTMLInsElement *a = (nsIDOMHTMLInsElement*)JS_GetPrivate(cx, obj); + nsIDOMHTMLBlockquoteElement *a = (nsIDOMHTMLBlockquoteElement*)JS_GetPrivate(cx, obj); // If there's no private data, this must be the prototype, so ignore if (nsnull == a) { @@ -59,7 +58,7 @@ GetHTMLInsElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case HTMLINSELEMENT_CITE: + case HTMLBLOCKQUOTEELEMENT_CITE: { nsAutoString prop; if (NS_OK == a->GetCite(prop)) { @@ -72,19 +71,6 @@ GetHTMLInsElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } break; } - case HTMLINSELEMENT_DATETIME: - { - nsAutoString prop; - if (NS_OK == a->GetDateTime(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; @@ -112,12 +98,12 @@ GetHTMLInsElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) /***********************************************************************/ // -// HTMLInsElement Properties Setter +// HTMLBlockquoteElement Properties Setter // PR_STATIC_CALLBACK(JSBool) -SetHTMLInsElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) +SetHTMLBlockquoteElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) { - nsIDOMHTMLInsElement *a = (nsIDOMHTMLInsElement*)JS_GetPrivate(cx, obj); + nsIDOMHTMLBlockquoteElement *a = (nsIDOMHTMLBlockquoteElement*)JS_GetPrivate(cx, obj); // If there's no private data, this must be the prototype, so ignore if (nsnull == a) { @@ -126,7 +112,7 @@ SetHTMLInsElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case HTMLINSELEMENT_CITE: + case HTMLBLOCKQUOTEELEMENT_CITE: { nsAutoString prop; JSString *jsstring; @@ -141,21 +127,6 @@ SetHTMLInsElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) break; } - case HTMLINSELEMENT_DATETIME: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetDateTime(prop); - - break; - } default: { nsIJSScriptObject *object; @@ -183,12 +154,12 @@ SetHTMLInsElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) // -// HTMLInsElement finalizer +// HTMLBlockquoteElement finalizer // PR_STATIC_CALLBACK(void) -FinalizeHTMLInsElement(JSContext *cx, JSObject *obj) +FinalizeHTMLBlockquoteElement(JSContext *cx, JSObject *obj) { - nsIDOMHTMLInsElement *a = (nsIDOMHTMLInsElement*)JS_GetPrivate(cx, obj); + nsIDOMHTMLBlockquoteElement *a = (nsIDOMHTMLBlockquoteElement*)JS_GetPrivate(cx, obj); if (nsnull != a) { // get the js object @@ -204,12 +175,12 @@ FinalizeHTMLInsElement(JSContext *cx, JSObject *obj) // -// HTMLInsElement enumerate +// HTMLBlockquoteElement enumerate // PR_STATIC_CALLBACK(JSBool) -EnumerateHTMLInsElement(JSContext *cx, JSObject *obj) +EnumerateHTMLBlockquoteElement(JSContext *cx, JSObject *obj) { - nsIDOMHTMLInsElement *a = (nsIDOMHTMLInsElement*)JS_GetPrivate(cx, obj); + nsIDOMHTMLBlockquoteElement *a = (nsIDOMHTMLBlockquoteElement*)JS_GetPrivate(cx, obj); if (nsnull != a) { // get the js object @@ -224,12 +195,12 @@ EnumerateHTMLInsElement(JSContext *cx, JSObject *obj) // -// HTMLInsElement resolve +// HTMLBlockquoteElement resolve // PR_STATIC_CALLBACK(JSBool) -ResolveHTMLInsElement(JSContext *cx, JSObject *obj, jsval id) +ResolveHTMLBlockquoteElement(JSContext *cx, JSObject *obj, jsval id) { - nsIDOMHTMLInsElement *a = (nsIDOMHTMLInsElement*)JS_GetPrivate(cx, obj); + nsIDOMHTMLBlockquoteElement *a = (nsIDOMHTMLBlockquoteElement*)JS_GetPrivate(cx, obj); if (nsnull != a) { // get the js object @@ -245,56 +216,55 @@ ResolveHTMLInsElement(JSContext *cx, JSObject *obj, jsval id) /***********************************************************************/ // -// class for HTMLInsElement +// class for HTMLBlockquoteElement // -JSClass HTMLInsElementClass = { - "HTMLInsElement", +JSClass HTMLBlockquoteElementClass = { + "HTMLBlockquoteElement", JSCLASS_HAS_PRIVATE, JS_PropertyStub, JS_PropertyStub, - GetHTMLInsElementProperty, - SetHTMLInsElementProperty, - EnumerateHTMLInsElement, - ResolveHTMLInsElement, + GetHTMLBlockquoteElementProperty, + SetHTMLBlockquoteElementProperty, + EnumerateHTMLBlockquoteElement, + ResolveHTMLBlockquoteElement, JS_ConvertStub, - FinalizeHTMLInsElement + FinalizeHTMLBlockquoteElement }; // -// HTMLInsElement class properties +// HTMLBlockquoteElement class properties // -static JSPropertySpec HTMLInsElementProperties[] = +static JSPropertySpec HTMLBlockquoteElementProperties[] = { - {"cite", HTMLINSELEMENT_CITE, JSPROP_ENUMERATE}, - {"dateTime", HTMLINSELEMENT_DATETIME, JSPROP_ENUMERATE}, + {"cite", HTMLBLOCKQUOTEELEMENT_CITE, JSPROP_ENUMERATE}, {0} }; // -// HTMLInsElement class methods +// HTMLBlockquoteElement class methods // -static JSFunctionSpec HTMLInsElementMethods[] = +static JSFunctionSpec HTMLBlockquoteElementMethods[] = { {0} }; // -// HTMLInsElement constructor +// HTMLBlockquoteElement constructor // PR_STATIC_CALLBACK(JSBool) -HTMLInsElement(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +HTMLBlockquoteElement(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { return JS_FALSE; } // -// HTMLInsElement class initialization +// HTMLBlockquoteElement class initialization // -nsresult NS_InitHTMLInsElementClass(nsIScriptContext *aContext, void **aPrototype) +nsresult NS_InitHTMLBlockquoteElementClass(nsIScriptContext *aContext, void **aPrototype) { JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); JSObject *proto = nsnull; @@ -303,7 +273,7 @@ nsresult NS_InitHTMLInsElementClass(nsIScriptContext *aContext, void **aPrototyp JSObject *global = JS_GetGlobalObject(jscontext); jsval vp; - if ((PR_TRUE != JS_LookupProperty(jscontext, global, "HTMLInsElement", &vp)) || + if ((PR_TRUE != JS_LookupProperty(jscontext, global, "HTMLBlockquoteElement", &vp)) || !JSVAL_IS_OBJECT(vp) || ((constructor = JSVAL_TO_OBJECT(vp)) == nsnull) || (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || @@ -315,11 +285,11 @@ nsresult NS_InitHTMLInsElementClass(nsIScriptContext *aContext, void **aPrototyp proto = JS_InitClass(jscontext, // context global, // global object parent_proto, // parent proto - &HTMLInsElementClass, // JSClass - HTMLInsElement, // JSNative ctor + &HTMLBlockquoteElementClass, // JSClass + HTMLBlockquoteElement, // JSNative ctor 0, // ctor args - HTMLInsElementProperties, // proto props - HTMLInsElementMethods, // proto funcs + HTMLBlockquoteElementProperties, // proto props + HTMLBlockquoteElementMethods, // proto funcs nsnull, // ctor props (static) nsnull); // ctor funcs (static) if (nsnull == proto) { @@ -342,17 +312,17 @@ nsresult NS_InitHTMLInsElementClass(nsIScriptContext *aContext, void **aPrototyp // -// Method for creating a new HTMLInsElement JavaScript object +// Method for creating a new HTMLBlockquoteElement JavaScript object // -extern "C" NS_DOM nsresult NS_NewScriptHTMLInsElement(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) +extern "C" NS_DOM nsresult NS_NewScriptHTMLBlockquoteElement(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) { - NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptHTMLInsElement"); + NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptHTMLBlockquoteElement"); JSObject *proto; JSObject *parent; nsIScriptObjectOwner *owner; JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); nsresult result = NS_OK; - nsIDOMHTMLInsElement *aHTMLInsElement; + nsIDOMHTMLBlockquoteElement *aHTMLBlockquoteElement; if (nsnull == aParent) { parent = nsnull; @@ -368,23 +338,23 @@ extern "C" NS_DOM nsresult NS_NewScriptHTMLInsElement(nsIScriptContext *aContext return NS_ERROR_FAILURE; } - if (NS_OK != NS_InitHTMLInsElementClass(aContext, (void **)&proto)) { + if (NS_OK != NS_InitHTMLBlockquoteElementClass(aContext, (void **)&proto)) { return NS_ERROR_FAILURE; } - result = aSupports->QueryInterface(kIHTMLInsElementIID, (void **)&aHTMLInsElement); + result = aSupports->QueryInterface(kIHTMLBlockquoteElementIID, (void **)&aHTMLBlockquoteElement); if (NS_OK != result) { return result; } // create a js object for this class - *aReturn = JS_NewObject(jscontext, &HTMLInsElementClass, proto, parent); + *aReturn = JS_NewObject(jscontext, &HTMLBlockquoteElementClass, proto, parent); if (nsnull != *aReturn) { // connect the native object to the js object - JS_SetPrivate(jscontext, (JSObject *)*aReturn, aHTMLInsElement); + JS_SetPrivate(jscontext, (JSObject *)*aReturn, aHTMLBlockquoteElement); } else { - NS_RELEASE(aHTMLInsElement); + NS_RELEASE(aHTMLBlockquoteElement); return NS_ERROR_FAILURE; } diff --git a/mozilla/dom/src/html/nsJSHTMLButtonElement.cpp b/mozilla/dom/src/html/nsJSHTMLButtonElement.cpp index f9e32c578fb..ae35a6b7bb2 100644 --- a/mozilla/dom/src/html/nsJSHTMLButtonElement.cpp +++ b/mozilla/dom/src/html/nsJSHTMLButtonElement.cpp @@ -209,29 +209,6 @@ SetHTMLButtonElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case HTMLBUTTONELEMENT_FORM: - { - nsIDOMHTMLFormElement* 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(kIHTMLFormElementIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLFormElement"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetForm(prop); - if (prop) NS_RELEASE(prop); - break; - } case HTMLBUTTONELEMENT_ACCESSKEY: { nsAutoString prop; @@ -294,21 +271,6 @@ SetHTMLButtonElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) break; } - case HTMLBUTTONELEMENT_TYPE: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetType(prop); - - break; - } case HTMLBUTTONELEMENT_VALUE: { nsAutoString prop; @@ -434,12 +396,12 @@ JSClass HTMLButtonElementClass = { // static JSPropertySpec HTMLButtonElementProperties[] = { - {"form", HTMLBUTTONELEMENT_FORM, JSPROP_ENUMERATE}, + {"form", HTMLBUTTONELEMENT_FORM, JSPROP_ENUMERATE | JSPROP_READONLY}, {"accessKey", HTMLBUTTONELEMENT_ACCESSKEY, JSPROP_ENUMERATE}, {"disabled", HTMLBUTTONELEMENT_DISABLED, JSPROP_ENUMERATE}, {"name", HTMLBUTTONELEMENT_NAME, JSPROP_ENUMERATE}, {"tabIndex", HTMLBUTTONELEMENT_TABINDEX, JSPROP_ENUMERATE}, - {"type", HTMLBUTTONELEMENT_TYPE, JSPROP_ENUMERATE}, + {"type", HTMLBUTTONELEMENT_TYPE, JSPROP_ENUMERATE | JSPROP_READONLY}, {"value", HTMLBUTTONELEMENT_VALUE, JSPROP_ENUMERATE}, {0} }; diff --git a/mozilla/dom/src/html/nsJSHTMLDocument.cpp b/mozilla/dom/src/html/nsJSHTMLDocument.cpp index c1a99005ece..045decb2f52 100644 --- a/mozilla/dom/src/html/nsJSHTMLDocument.cpp +++ b/mozilla/dom/src/html/nsJSHTMLDocument.cpp @@ -59,29 +59,25 @@ NS_DEF_PTR(nsIDOMNodeList); enum HTMLDocument_slots { 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_STYLESHEETS = -21, - NSHTMLDOCUMENT_LASTMODIFIED = -22, - NSHTMLDOCUMENT_EMBEDS = -23, - NSHTMLDOCUMENT_LAYERS = -24, - NSHTMLDOCUMENT_PLUGINS = -25 + HTMLDOCUMENT_DOMAIN = -3, + HTMLDOCUMENT_URL = -4, + HTMLDOCUMENT_BODY = -5, + HTMLDOCUMENT_IMAGES = -6, + HTMLDOCUMENT_APPLETS = -7, + HTMLDOCUMENT_LINKS = -8, + HTMLDOCUMENT_FORMS = -9, + HTMLDOCUMENT_ANCHORS = -10, + HTMLDOCUMENT_COOKIE = -11, + NSHTMLDOCUMENT_ALINKCOLOR = -12, + NSHTMLDOCUMENT_LINKCOLOR = -13, + NSHTMLDOCUMENT_VLINKCOLOR = -14, + NSHTMLDOCUMENT_BGCOLOR = -15, + NSHTMLDOCUMENT_FGCOLOR = -16, + NSHTMLDOCUMENT_STYLESHEETS = -17, + NSHTMLDOCUMENT_LASTMODIFIED = -18, + NSHTMLDOCUMENT_EMBEDS = -19, + NSHTMLDOCUMENT_LAYERS = -20, + NSHTMLDOCUMENT_PLUGINS = -21 }; /***********************************************************************/ @@ -126,58 +122,6 @@ GetHTMLDocumentProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } break; } - case HTMLDOCUMENT_FILESIZE: - { - nsAutoString prop; - if (NS_OK == a->GetFileSize(prop)) { - JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); - // set the return value - *vp = STRING_TO_JSVAL(jsstring); - } - else { - return JS_FALSE; - } - break; - } - case HTMLDOCUMENT_FILECREATEDDATE: - { - nsAutoString prop; - if (NS_OK == a->GetFileCreatedDate(prop)) { - JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); - // set the return value - *vp = STRING_TO_JSVAL(jsstring); - } - else { - return JS_FALSE; - } - break; - } - case HTMLDOCUMENT_FILEMODIFIEDDATE: - { - nsAutoString prop; - if (NS_OK == a->GetFileModifiedDate(prop)) { - JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); - // set the return value - *vp = STRING_TO_JSVAL(jsstring); - } - else { - return JS_FALSE; - } - break; - } - case HTMLDOCUMENT_FILEUPDATEDDATE: - { - nsAutoString prop; - if (NS_OK == a->GetFileUpdatedDate(prop)) { - JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); - // set the return value - *vp = STRING_TO_JSVAL(jsstring); - } - else { - return JS_FALSE; - } - break; - } case HTMLDOCUMENT_DOMAIN: { nsAutoString prop; @@ -1266,7 +1210,7 @@ PR_STATIC_CALLBACK(JSBool) NSHTMLDocumentGetSelection(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { nsIDOMHTMLDocument *privateThis = (nsIDOMHTMLDocument*)JS_GetPrivate(cx, obj); - nsIDOMNSHTMLDocument *nativeThis; + nsIDOMNSHTMLDocument *nativeThis = nsnull; if (NS_OK != privateThis->QueryInterface(kINSHTMLDocumentIID, (void **)nativeThis)) { JS_ReportError(cx, "Object must be of type NSHTMLDocument"); return JS_FALSE; @@ -1308,7 +1252,7 @@ PR_STATIC_CALLBACK(JSBool) NSHTMLDocumentNamedItem(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { nsIDOMHTMLDocument *privateThis = (nsIDOMHTMLDocument*)JS_GetPrivate(cx, obj); - nsIDOMNSHTMLDocument *nativeThis; + nsIDOMNSHTMLDocument *nativeThis = nsnull; if (NS_OK != privateThis->QueryInterface(kINSHTMLDocumentIID, (void **)nativeThis)) { JS_ReportError(cx, "Object must be of type NSHTMLDocument"); return JS_FALSE; @@ -1390,10 +1334,6 @@ static JSPropertySpec HTMLDocumentProperties[] = { {"title", HTMLDOCUMENT_TITLE, JSPROP_ENUMERATE}, {"referrer", HTMLDOCUMENT_REFERRER, JSPROP_ENUMERATE | JSPROP_READONLY}, - {"fileSize", HTMLDOCUMENT_FILESIZE, JSPROP_ENUMERATE | JSPROP_READONLY}, - {"fileCreatedDate", HTMLDOCUMENT_FILECREATEDDATE, JSPROP_ENUMERATE | JSPROP_READONLY}, - {"fileModifiedDate", HTMLDOCUMENT_FILEMODIFIEDDATE, JSPROP_ENUMERATE | JSPROP_READONLY}, - {"fileUpdatedDate", HTMLDOCUMENT_FILEUPDATEDDATE, JSPROP_ENUMERATE | JSPROP_READONLY}, {"domain", HTMLDOCUMENT_DOMAIN, JSPROP_ENUMERATE | JSPROP_READONLY}, {"URL", HTMLDOCUMENT_URL, JSPROP_ENUMERATE | JSPROP_READONLY}, {"body", HTMLDOCUMENT_BODY, JSPROP_ENUMERATE}, diff --git a/mozilla/dom/src/html/nsJSHTMLFormElement.cpp b/mozilla/dom/src/html/nsJSHTMLFormElement.cpp index aa3c007606b..5b9e24c3519 100644 --- a/mozilla/dom/src/html/nsJSHTMLFormElement.cpp +++ b/mozilla/dom/src/html/nsJSHTMLFormElement.cpp @@ -49,14 +49,14 @@ NS_DEF_PTR(nsIDOMHTMLCollection); // enum HTMLFormElement_slots { 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 + HTMLFORMELEMENT_LENGTH = -2, + HTMLFORMELEMENT_NAME = -3, + HTMLFORMELEMENT_ACCEPTCHARSET = -4, + HTMLFORMELEMENT_ACTION = -5, + HTMLFORMELEMENT_ENCTYPE = -6, + HTMLFORMELEMENT_METHOD = -7, + HTMLFORMELEMENT_TARGET = -8, + NSHTMLFORMELEMENT_ENCODING = -9 }; /***********************************************************************/ @@ -102,6 +102,17 @@ GetHTMLFormElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } break; } + case HTMLFORMELEMENT_LENGTH: + { + PRUint32 prop; + if (NS_OK == a->GetLength(&prop)) { + *vp = INT_TO_JSVAL(prop); + } + else { + return JS_FALSE; + } + break; + } case HTMLFORMELEMENT_NAME: { nsAutoString prop; @@ -202,26 +213,6 @@ GetHTMLFormElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } break; } - case NSHTMLFORMELEMENT_LENGTH: - { - PRUint32 prop; - nsIDOMNSHTMLFormElement* b; - if (NS_OK == a->QueryInterface(kINSHTMLFormElementIID, (void **)&b)) { - if(NS_OK == b->GetLength(&prop)) { - *vp = INT_TO_JSVAL(prop); - NS_RELEASE(b); - } - else { - NS_RELEASE(b); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Object must be of type NSHTMLFormElement"); - return JS_FALSE; - } - break; - } default: { nsIJSScriptObject *object; @@ -318,6 +309,21 @@ SetHTMLFormElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { + case HTMLFORMELEMENT_NAME: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetName(prop); + + break; + } case HTMLFORMELEMENT_ACCEPTCHARSET: { nsAutoString prop; @@ -480,39 +486,6 @@ ResolveHTMLFormElement(JSContext *cx, JSObject *obj, jsval id) } -// -// Native method Reset -// -PR_STATIC_CALLBACK(JSBool) -HTMLFormElementReset(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) -{ - nsIDOMHTMLFormElement *nativeThis = (nsIDOMHTMLFormElement*)JS_GetPrivate(cx, obj); - JSBool rBool = JS_FALSE; - - *rval = JSVAL_NULL; - - // If there's no private data, this must be the prototype, so ignore - if (nsnull == nativeThis) { - return JS_TRUE; - } - - if (argc >= 0) { - - if (NS_OK != nativeThis->Reset()) { - return JS_FALSE; - } - - *rval = JSVAL_VOID; - } - else { - JS_ReportError(cx, "Function reset requires 0 parameters"); - return JS_FALSE; - } - - return JS_TRUE; -} - - // // Native method Submit // @@ -546,6 +519,39 @@ HTMLFormElementSubmit(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsv } +// +// Native method Reset +// +PR_STATIC_CALLBACK(JSBool) +HTMLFormElementReset(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + nsIDOMHTMLFormElement *nativeThis = (nsIDOMHTMLFormElement*)JS_GetPrivate(cx, obj); + JSBool rBool = JS_FALSE; + + *rval = JSVAL_NULL; + + // If there's no private data, this must be the prototype, so ignore + if (nsnull == nativeThis) { + return JS_TRUE; + } + + if (argc >= 0) { + + if (NS_OK != nativeThis->Reset()) { + return JS_FALSE; + } + + *rval = JSVAL_VOID; + } + else { + JS_ReportError(cx, "Function reset requires 0 parameters"); + return JS_FALSE; + } + + return JS_TRUE; +} + + // // Native method NamedItem // @@ -553,7 +559,7 @@ PR_STATIC_CALLBACK(JSBool) NSHTMLFormElementNamedItem(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { nsIDOMHTMLFormElement *privateThis = (nsIDOMHTMLFormElement*)JS_GetPrivate(cx, obj); - nsIDOMNSHTMLFormElement *nativeThis; + nsIDOMNSHTMLFormElement *nativeThis = nsnull; if (NS_OK != privateThis->QueryInterface(kINSHTMLFormElementIID, (void **)nativeThis)) { JS_ReportError(cx, "Object must be of type NSHTMLFormElement"); return JS_FALSE; @@ -634,14 +640,14 @@ JSClass HTMLFormElementClass = { static JSPropertySpec HTMLFormElementProperties[] = { {"elements", HTMLFORMELEMENT_ELEMENTS, JSPROP_ENUMERATE | JSPROP_READONLY}, - {"name", HTMLFORMELEMENT_NAME, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"length", HTMLFORMELEMENT_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"name", HTMLFORMELEMENT_NAME, JSPROP_ENUMERATE}, {"acceptCharset", HTMLFORMELEMENT_ACCEPTCHARSET, JSPROP_ENUMERATE}, {"action", HTMLFORMELEMENT_ACTION, JSPROP_ENUMERATE}, {"enctype", HTMLFORMELEMENT_ENCTYPE, JSPROP_ENUMERATE}, {"method", HTMLFORMELEMENT_METHOD, JSPROP_ENUMERATE}, {"target", HTMLFORMELEMENT_TARGET, JSPROP_ENUMERATE}, {"encoding", NSHTMLFORMELEMENT_ENCODING, JSPROP_ENUMERATE | JSPROP_READONLY}, - {"length", NSHTMLFORMELEMENT_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY}, {0} }; @@ -651,8 +657,8 @@ static JSPropertySpec HTMLFormElementProperties[] = // static JSFunctionSpec HTMLFormElementMethods[] = { - {"reset", HTMLFormElementReset, 0}, {"submit", HTMLFormElementSubmit, 0}, + {"reset", HTMLFormElementReset, 0}, {"namedItem", NSHTMLFormElementNamedItem, 1}, {0} }; diff --git a/mozilla/dom/src/html/nsJSHTMLIsIndexElement.cpp b/mozilla/dom/src/html/nsJSHTMLIsIndexElement.cpp index 9d3e1d666e4..9636516f7a1 100644 --- a/mozilla/dom/src/html/nsJSHTMLIsIndexElement.cpp +++ b/mozilla/dom/src/html/nsJSHTMLIsIndexElement.cpp @@ -143,29 +143,6 @@ SetHTMLIsIndexElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case HTMLISINDEXELEMENT_FORM: - { - nsIDOMHTMLFormElement* 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(kIHTMLFormElementIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLFormElement"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetForm(prop); - if (prop) NS_RELEASE(prop); - break; - } case HTMLISINDEXELEMENT_PROMPT: { nsAutoString prop; @@ -291,7 +268,7 @@ JSClass HTMLIsIndexElementClass = { // static JSPropertySpec HTMLIsIndexElementProperties[] = { - {"form", HTMLISINDEXELEMENT_FORM, JSPROP_ENUMERATE}, + {"form", HTMLISINDEXELEMENT_FORM, JSPROP_ENUMERATE | JSPROP_READONLY}, {"prompt", HTMLISINDEXELEMENT_PROMPT, JSPROP_ENUMERATE}, {0} }; diff --git a/mozilla/dom/src/html/nsJSHTMLLabelElement.cpp b/mozilla/dom/src/html/nsJSHTMLLabelElement.cpp index e8199b3ed3d..32479b86f9e 100644 --- a/mozilla/dom/src/html/nsJSHTMLLabelElement.cpp +++ b/mozilla/dom/src/html/nsJSHTMLLabelElement.cpp @@ -157,29 +157,6 @@ SetHTMLLabelElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case HTMLLABELELEMENT_FORM: - { - nsIDOMHTMLFormElement* 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(kIHTMLFormElementIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLFormElement"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetForm(prop); - if (prop) NS_RELEASE(prop); - break; - } case HTMLLABELELEMENT_ACCESSKEY: { nsAutoString prop; @@ -320,7 +297,7 @@ JSClass HTMLLabelElementClass = { // static JSPropertySpec HTMLLabelElementProperties[] = { - {"form", HTMLLABELELEMENT_FORM, JSPROP_ENUMERATE}, + {"form", HTMLLABELELEMENT_FORM, JSPROP_ENUMERATE | JSPROP_READONLY}, {"accessKey", HTMLLABELELEMENT_ACCESSKEY, JSPROP_ENUMERATE}, {"htmlFor", HTMLLABELELEMENT_HTMLFOR, JSPROP_ENUMERATE}, {0} diff --git a/mozilla/dom/src/html/nsJSHTMLLegendElement.cpp b/mozilla/dom/src/html/nsJSHTMLLegendElement.cpp index b1c27fad4dd..97a1acad04c 100644 --- a/mozilla/dom/src/html/nsJSHTMLLegendElement.cpp +++ b/mozilla/dom/src/html/nsJSHTMLLegendElement.cpp @@ -157,29 +157,6 @@ SetHTMLLegendElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case HTMLLEGENDELEMENT_FORM: - { - nsIDOMHTMLFormElement* 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(kIHTMLFormElementIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLFormElement"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetForm(prop); - if (prop) NS_RELEASE(prop); - break; - } case HTMLLEGENDELEMENT_ACCESSKEY: { nsAutoString prop; @@ -320,7 +297,7 @@ JSClass HTMLLegendElementClass = { // static JSPropertySpec HTMLLegendElementProperties[] = { - {"form", HTMLLEGENDELEMENT_FORM, JSPROP_ENUMERATE}, + {"form", HTMLLEGENDELEMENT_FORM, JSPROP_ENUMERATE | JSPROP_READONLY}, {"accessKey", HTMLLEGENDELEMENT_ACCESSKEY, JSPROP_ENUMERATE}, {"align", HTMLLEGENDELEMENT_ALIGN, JSPROP_ENUMERATE}, {0} diff --git a/mozilla/dom/src/html/nsJSHTMLMapElement.cpp b/mozilla/dom/src/html/nsJSHTMLMapElement.cpp index 6b078fb78ab..6fad4ed63e1 100644 --- a/mozilla/dom/src/html/nsJSHTMLMapElement.cpp +++ b/mozilla/dom/src/html/nsJSHTMLMapElement.cpp @@ -143,29 +143,6 @@ SetHTMLMapElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case HTMLMAPELEMENT_AREAS: - { - nsIDOMHTMLCollection* 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(kIHTMLCollectionIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLCollection"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetAreas(prop); - if (prop) NS_RELEASE(prop); - break; - } case HTMLMAPELEMENT_NAME: { nsAutoString prop; @@ -291,7 +268,7 @@ JSClass HTMLMapElementClass = { // static JSPropertySpec HTMLMapElementProperties[] = { - {"areas", HTMLMAPELEMENT_AREAS, JSPROP_ENUMERATE}, + {"areas", HTMLMAPELEMENT_AREAS, JSPROP_ENUMERATE | JSPROP_READONLY}, {"name", HTMLMAPELEMENT_NAME, JSPROP_ENUMERATE}, {0} }; diff --git a/mozilla/dom/src/html/nsJSHTMLObjectElement.cpp b/mozilla/dom/src/html/nsJSHTMLObjectElement.cpp index 4f43b70afee..c2128d34369 100644 --- a/mozilla/dom/src/html/nsJSHTMLObjectElement.cpp +++ b/mozilla/dom/src/html/nsJSHTMLObjectElement.cpp @@ -363,29 +363,6 @@ SetHTMLObjectElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case HTMLOBJECTELEMENT_FORM: - { - nsIDOMHTMLFormElement* 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(kIHTMLFormElementIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLFormElement"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetForm(prop); - if (prop) NS_RELEASE(prop); - break; - } case HTMLOBJECTELEMENT_CODE: { nsAutoString prop; @@ -753,7 +730,7 @@ JSClass HTMLObjectElementClass = { // static JSPropertySpec HTMLObjectElementProperties[] = { - {"form", HTMLOBJECTELEMENT_FORM, JSPROP_ENUMERATE}, + {"form", HTMLOBJECTELEMENT_FORM, JSPROP_ENUMERATE | JSPROP_READONLY}, {"code", HTMLOBJECTELEMENT_CODE, JSPROP_ENUMERATE}, {"align", HTMLOBJECTELEMENT_ALIGN, JSPROP_ENUMERATE}, {"archive", HTMLOBJECTELEMENT_ARCHIVE, JSPROP_ENUMERATE}, diff --git a/mozilla/dom/src/html/nsJSHTMLOptionElement.cpp b/mozilla/dom/src/html/nsJSHTMLOptionElement.cpp index f7d99764c14..8736d5c1f7b 100644 --- a/mozilla/dom/src/html/nsJSHTMLOptionElement.cpp +++ b/mozilla/dom/src/html/nsJSHTMLOptionElement.cpp @@ -219,29 +219,6 @@ SetHTMLOptionElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case HTMLOPTIONELEMENT_FORM: - { - nsIDOMHTMLFormElement* 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(kIHTMLFormElementIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLFormElement"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetForm(prop); - if (prop) NS_RELEASE(prop); - break; - } case HTMLOPTIONELEMENT_DEFAULTSELECTED: { PRBool prop; @@ -258,21 +235,6 @@ SetHTMLOptionElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) break; } - case HTMLOPTIONELEMENT_TEXT: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetText(prop); - - break; - } case HTMLOPTIONELEMENT_INDEX: { PRInt32 prop; @@ -320,22 +282,6 @@ SetHTMLOptionElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) break; } - case HTMLOPTIONELEMENT_SELECTED: - { - 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->SetSelected(prop); - - break; - } case HTMLOPTIONELEMENT_VALUE: { nsAutoString prop; @@ -461,13 +407,13 @@ JSClass HTMLOptionElementClass = { // static JSPropertySpec HTMLOptionElementProperties[] = { - {"form", HTMLOPTIONELEMENT_FORM, JSPROP_ENUMERATE}, + {"form", HTMLOPTIONELEMENT_FORM, JSPROP_ENUMERATE | JSPROP_READONLY}, {"defaultSelected", HTMLOPTIONELEMENT_DEFAULTSELECTED, JSPROP_ENUMERATE}, - {"text", HTMLOPTIONELEMENT_TEXT, JSPROP_ENUMERATE}, + {"text", HTMLOPTIONELEMENT_TEXT, JSPROP_ENUMERATE | JSPROP_READONLY}, {"index", HTMLOPTIONELEMENT_INDEX, JSPROP_ENUMERATE}, {"disabled", HTMLOPTIONELEMENT_DISABLED, JSPROP_ENUMERATE}, {"label", HTMLOPTIONELEMENT_LABEL, JSPROP_ENUMERATE}, - {"selected", HTMLOPTIONELEMENT_SELECTED, JSPROP_ENUMERATE}, + {"selected", HTMLOPTIONELEMENT_SELECTED, JSPROP_ENUMERATE | JSPROP_READONLY}, {"value", HTMLOPTIONELEMENT_VALUE, JSPROP_ENUMERATE}, {0} }; diff --git a/mozilla/dom/src/html/nsJSHTMLSelectElement.cpp b/mozilla/dom/src/html/nsJSHTMLSelectElement.cpp index 35bc1dfa2c3..9b9714838a0 100644 --- a/mozilla/dom/src/html/nsJSHTMLSelectElement.cpp +++ b/mozilla/dom/src/html/nsJSHTMLSelectElement.cpp @@ -116,7 +116,7 @@ GetHTMLSelectElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } case HTMLSELECTELEMENT_LENGTH: { - PRInt32 prop; + PRUint32 prop; if (NS_OK == a->GetLength(&prop)) { *vp = INT_TO_JSVAL(prop); } @@ -277,21 +277,6 @@ SetHTMLSelectElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (JSVAL_IS_INT(id)) { switch(JSVAL_TO_INT(id)) { - case HTMLSELECTELEMENT_TYPE: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetType(prop); - - break; - } case HTMLSELECTELEMENT_SELECTEDINDEX: { PRInt32 prop; @@ -323,68 +308,6 @@ SetHTMLSelectElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) break; } - case HTMLSELECTELEMENT_LENGTH: - { - PRInt32 prop; - int32 temp; - if (JSVAL_IS_NUMBER(*vp) && JS_ValueToInt32(cx, *vp, &temp)) { - prop = (PRInt32)temp; - } - else { - JS_ReportError(cx, "Parameter must be a number"); - return JS_FALSE; - } - - a->SetLength(prop); - - break; - } - case HTMLSELECTELEMENT_FORM: - { - nsIDOMHTMLFormElement* 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(kIHTMLFormElementIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLFormElement"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetForm(prop); - if (prop) NS_RELEASE(prop); - break; - } - case HTMLSELECTELEMENT_OPTIONS: - { - nsIDOMHTMLCollection* 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(kIHTMLCollectionIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLCollection"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetOptions(prop); - if (prop) NS_RELEASE(prop); - break; - } case HTMLSELECTELEMENT_DISABLED: { PRBool prop; @@ -750,12 +673,12 @@ JSClass HTMLSelectElementClass = { // static JSPropertySpec HTMLSelectElementProperties[] = { - {"type", HTMLSELECTELEMENT_TYPE, JSPROP_ENUMERATE}, + {"type", HTMLSELECTELEMENT_TYPE, JSPROP_ENUMERATE | JSPROP_READONLY}, {"selectedIndex", HTMLSELECTELEMENT_SELECTEDINDEX, JSPROP_ENUMERATE}, {"value", HTMLSELECTELEMENT_VALUE, JSPROP_ENUMERATE}, - {"length", HTMLSELECTELEMENT_LENGTH, JSPROP_ENUMERATE}, - {"form", HTMLSELECTELEMENT_FORM, JSPROP_ENUMERATE}, - {"options", HTMLSELECTELEMENT_OPTIONS, JSPROP_ENUMERATE}, + {"length", HTMLSELECTELEMENT_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"form", HTMLSELECTELEMENT_FORM, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"options", HTMLSELECTELEMENT_OPTIONS, JSPROP_ENUMERATE | JSPROP_READONLY}, {"disabled", HTMLSELECTELEMENT_DISABLED, JSPROP_ENUMERATE}, {"multiple", HTMLSELECTELEMENT_MULTIPLE, JSPROP_ENUMERATE}, {"name", HTMLSELECTELEMENT_NAME, JSPROP_ENUMERATE}, diff --git a/mozilla/dom/src/html/nsJSHTMLTableElement.cpp b/mozilla/dom/src/html/nsJSHTMLTableElement.cpp index be29f1e4ecd..127203d7bb8 100644 --- a/mozilla/dom/src/html/nsJSHTMLTableElement.cpp +++ b/mozilla/dom/src/html/nsJSHTMLTableElement.cpp @@ -445,52 +445,6 @@ SetHTMLTableElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) if (prop) NS_RELEASE(prop); break; } - case HTMLTABLEELEMENT_ROWS: - { - nsIDOMHTMLCollection* 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(kIHTMLCollectionIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLCollection"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetRows(prop); - if (prop) NS_RELEASE(prop); - break; - } - case HTMLTABLEELEMENT_TBODIES: - { - nsIDOMHTMLCollection* 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(kIHTMLCollectionIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLCollection"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetTBodies(prop); - if (prop) NS_RELEASE(prop); - break; - } case HTMLTABLEELEMENT_ALIGN: { nsAutoString prop; @@ -1079,8 +1033,8 @@ static JSPropertySpec HTMLTableElementProperties[] = {"caption", HTMLTABLEELEMENT_CAPTION, JSPROP_ENUMERATE}, {"tHead", HTMLTABLEELEMENT_THEAD, JSPROP_ENUMERATE}, {"tFoot", HTMLTABLEELEMENT_TFOOT, JSPROP_ENUMERATE}, - {"rows", HTMLTABLEELEMENT_ROWS, JSPROP_ENUMERATE}, - {"tBodies", HTMLTABLEELEMENT_TBODIES, JSPROP_ENUMERATE}, + {"rows", HTMLTABLEELEMENT_ROWS, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"tBodies", HTMLTABLEELEMENT_TBODIES, JSPROP_ENUMERATE | JSPROP_READONLY}, {"align", HTMLTABLEELEMENT_ALIGN, JSPROP_ENUMERATE}, {"bgColor", HTMLTABLEELEMENT_BGCOLOR, JSPROP_ENUMERATE}, {"border", HTMLTABLEELEMENT_BORDER, JSPROP_ENUMERATE}, diff --git a/mozilla/dom/src/html/nsJSHTMLTableSectionElement.cpp b/mozilla/dom/src/html/nsJSHTMLTableSectionElement.cpp index 7fd5162d894..477ebac05bc 100644 --- a/mozilla/dom/src/html/nsJSHTMLTableSectionElement.cpp +++ b/mozilla/dom/src/html/nsJSHTMLTableSectionElement.cpp @@ -46,8 +46,10 @@ NS_DEF_PTR(nsIDOMHTMLCollection); // enum HTMLTableSectionElement_slots { HTMLTABLESECTIONELEMENT_ALIGN = -1, - HTMLTABLESECTIONELEMENT_VALIGN = -2, - HTMLTABLESECTIONELEMENT_ROWS = -3 + HTMLTABLESECTIONELEMENT_CH = -2, + HTMLTABLESECTIONELEMENT_CHOFF = -3, + HTMLTABLESECTIONELEMENT_VALIGN = -4, + HTMLTABLESECTIONELEMENT_ROWS = -5 }; /***********************************************************************/ @@ -79,6 +81,32 @@ GetHTMLTableSectionElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval } break; } + case HTMLTABLESECTIONELEMENT_CH: + { + nsAutoString prop; + if (NS_OK == a->GetCh(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } + case HTMLTABLESECTIONELEMENT_CHOFF: + { + nsAutoString prop; + if (NS_OK == a->GetChOff(prop)) { + JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); + // set the return value + *vp = STRING_TO_JSVAL(jsstring); + } + else { + return JS_FALSE; + } + break; + } case HTMLTABLESECTIONELEMENT_VALIGN: { nsAutoString prop; @@ -175,6 +203,36 @@ SetHTMLTableSectionElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval break; } + case HTMLTABLESECTIONELEMENT_CH: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetCh(prop); + + break; + } + case HTMLTABLESECTIONELEMENT_CHOFF: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetChOff(prop); + + break; + } case HTMLTABLESECTIONELEMENT_VALIGN: { nsAutoString prop; @@ -190,29 +248,6 @@ SetHTMLTableSectionElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval break; } - case HTMLTABLESECTIONELEMENT_ROWS: - { - nsIDOMHTMLCollection* 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(kIHTMLCollectionIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLCollection"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetRows(prop); - if (prop) NS_RELEASE(prop); - break; - } default: { nsIJSScriptObject *object; @@ -418,8 +453,10 @@ JSClass HTMLTableSectionElementClass = { static JSPropertySpec HTMLTableSectionElementProperties[] = { {"align", HTMLTABLESECTIONELEMENT_ALIGN, JSPROP_ENUMERATE}, + {"ch", HTMLTABLESECTIONELEMENT_CH, JSPROP_ENUMERATE}, + {"chOff", HTMLTABLESECTIONELEMENT_CHOFF, JSPROP_ENUMERATE}, {"vAlign", HTMLTABLESECTIONELEMENT_VALIGN, JSPROP_ENUMERATE}, - {"rows", HTMLTABLESECTIONELEMENT_ROWS, JSPROP_ENUMERATE}, + {"rows", HTMLTABLESECTIONELEMENT_ROWS, JSPROP_ENUMERATE | JSPROP_READONLY}, {0} }; diff --git a/mozilla/dom/src/html/nsJSHTMLTbodyElement.cpp b/mozilla/dom/src/html/nsJSHTMLTbodyElement.cpp deleted file mode 100644 index c64504a0d0b..00000000000 --- a/mozilla/dom/src/html/nsJSHTMLTbodyElement.cpp +++ /dev/null @@ -1,452 +0,0 @@ -/* -*- 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 "nsIDOMHTMLTbodyElement.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(kIHTMLTbodyElementIID, NS_IDOMHTMLTBODYELEMENT_IID); - -NS_DEF_PTR(nsIDOMHTMLTbodyElement); - -// -// HTMLTbodyElement property ids -// -enum HTMLTbodyElement_slots { - HTMLTBODYELEMENT_ALIGN = -1, - HTMLTBODYELEMENT_CH = -2, - HTMLTBODYELEMENT_CHOFF = -3, - HTMLTBODYELEMENT_VALIGN = -4 -}; - -/***********************************************************************/ -// -// HTMLTbodyElement Properties Getter -// -PR_STATIC_CALLBACK(JSBool) -GetHTMLTbodyElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) -{ - nsIDOMHTMLTbodyElement *a = (nsIDOMHTMLTbodyElement*)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 HTMLTBODYELEMENT_ALIGN: - { - nsAutoString prop; - if (NS_OK == a->GetAlign(prop)) { - JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); - // set the return value - *vp = STRING_TO_JSVAL(jsstring); - } - else { - return JS_FALSE; - } - break; - } - case HTMLTBODYELEMENT_CH: - { - nsAutoString prop; - if (NS_OK == a->GetCh(prop)) { - JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); - // set the return value - *vp = STRING_TO_JSVAL(jsstring); - } - else { - return JS_FALSE; - } - break; - } - case HTMLTBODYELEMENT_CHOFF: - { - nsAutoString prop; - if (NS_OK == a->GetChOff(prop)) { - JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); - // set the return value - *vp = STRING_TO_JSVAL(jsstring); - } - else { - return JS_FALSE; - } - break; - } - case HTMLTBODYELEMENT_VALIGN: - { - nsAutoString prop; - if (NS_OK == a->GetVAlign(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; -} - -/***********************************************************************/ -// -// HTMLTbodyElement Properties Setter -// -PR_STATIC_CALLBACK(JSBool) -SetHTMLTbodyElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) -{ - nsIDOMHTMLTbodyElement *a = (nsIDOMHTMLTbodyElement*)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 HTMLTBODYELEMENT_ALIGN: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetAlign(prop); - - break; - } - case HTMLTBODYELEMENT_CH: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetCh(prop); - - break; - } - case HTMLTBODYELEMENT_CHOFF: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetChOff(prop); - - break; - } - case HTMLTBODYELEMENT_VALIGN: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetVAlign(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; -} - - -// -// HTMLTbodyElement finalizer -// -PR_STATIC_CALLBACK(void) -FinalizeHTMLTbodyElement(JSContext *cx, JSObject *obj) -{ - nsIDOMHTMLTbodyElement *a = (nsIDOMHTMLTbodyElement*)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); - } -} - - -// -// HTMLTbodyElement enumerate -// -PR_STATIC_CALLBACK(JSBool) -EnumerateHTMLTbodyElement(JSContext *cx, JSObject *obj) -{ - nsIDOMHTMLTbodyElement *a = (nsIDOMHTMLTbodyElement*)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; -} - - -// -// HTMLTbodyElement resolve -// -PR_STATIC_CALLBACK(JSBool) -ResolveHTMLTbodyElement(JSContext *cx, JSObject *obj, jsval id) -{ - nsIDOMHTMLTbodyElement *a = (nsIDOMHTMLTbodyElement*)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 HTMLTbodyElement -// -JSClass HTMLTbodyElementClass = { - "HTMLTbodyElement", - JSCLASS_HAS_PRIVATE, - JS_PropertyStub, - JS_PropertyStub, - GetHTMLTbodyElementProperty, - SetHTMLTbodyElementProperty, - EnumerateHTMLTbodyElement, - ResolveHTMLTbodyElement, - JS_ConvertStub, - FinalizeHTMLTbodyElement -}; - - -// -// HTMLTbodyElement class properties -// -static JSPropertySpec HTMLTbodyElementProperties[] = -{ - {"align", HTMLTBODYELEMENT_ALIGN, JSPROP_ENUMERATE}, - {"ch", HTMLTBODYELEMENT_CH, JSPROP_ENUMERATE}, - {"chOff", HTMLTBODYELEMENT_CHOFF, JSPROP_ENUMERATE}, - {"vAlign", HTMLTBODYELEMENT_VALIGN, JSPROP_ENUMERATE}, - {0} -}; - - -// -// HTMLTbodyElement class methods -// -static JSFunctionSpec HTMLTbodyElementMethods[] = -{ - {0} -}; - - -// -// HTMLTbodyElement constructor -// -PR_STATIC_CALLBACK(JSBool) -HTMLTbodyElement(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) -{ - return JS_FALSE; -} - - -// -// HTMLTbodyElement class initialization -// -nsresult NS_InitHTMLTbodyElementClass(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, "HTMLTbodyElement", &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_InitHTMLElementClass(aContext, (void **)&parent_proto)) { - return NS_ERROR_FAILURE; - } - proto = JS_InitClass(jscontext, // context - global, // global object - parent_proto, // parent proto - &HTMLTbodyElementClass, // JSClass - HTMLTbodyElement, // JSNative ctor - 0, // ctor args - HTMLTbodyElementProperties, // proto props - HTMLTbodyElementMethods, // 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 HTMLTbodyElement JavaScript object -// -extern "C" NS_DOM nsresult NS_NewScriptHTMLTbodyElement(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) -{ - NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptHTMLTbodyElement"); - JSObject *proto; - JSObject *parent; - nsIScriptObjectOwner *owner; - JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); - nsresult result = NS_OK; - nsIDOMHTMLTbodyElement *aHTMLTbodyElement; - - 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_InitHTMLTbodyElementClass(aContext, (void **)&proto)) { - return NS_ERROR_FAILURE; - } - - result = aSupports->QueryInterface(kIHTMLTbodyElementIID, (void **)&aHTMLTbodyElement); - if (NS_OK != result) { - return result; - } - - // create a js object for this class - *aReturn = JS_NewObject(jscontext, &HTMLTbodyElementClass, proto, parent); - if (nsnull != *aReturn) { - // connect the native object to the js object - JS_SetPrivate(jscontext, (JSObject *)*aReturn, aHTMLTbodyElement); - } - else { - NS_RELEASE(aHTMLTbodyElement); - return NS_ERROR_FAILURE; - } - - return NS_OK; -} diff --git a/mozilla/dom/src/html/nsJSHTMLTextAreaElement.cpp b/mozilla/dom/src/html/nsJSHTMLTextAreaElement.cpp index a9fc2e42b96..36562db8f5d 100644 --- a/mozilla/dom/src/html/nsJSHTMLTextAreaElement.cpp +++ b/mozilla/dom/src/html/nsJSHTMLTextAreaElement.cpp @@ -50,7 +50,9 @@ enum HTMLTextAreaElement_slots { HTMLTEXTAREAELEMENT_NAME = -6, HTMLTEXTAREAELEMENT_READONLY = -7, HTMLTEXTAREAELEMENT_ROWS = -8, - HTMLTEXTAREAELEMENT_TABINDEX = -9 + HTMLTEXTAREAELEMENT_TABINDEX = -9, + HTMLTEXTAREAELEMENT_TYPE = -10, + HTMLTEXTAREAELEMENT_VALUE = -11 }; /***********************************************************************/ @@ -190,6 +192,32 @@ GetHTMLTextAreaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp } break; } + case HTMLTEXTAREAELEMENT_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; + } + case HTMLTEXTAREAELEMENT_VALUE: + { + nsAutoString prop; + if (NS_OK == a->GetValue(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; @@ -246,29 +274,6 @@ SetHTMLTextAreaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp break; } - case HTMLTEXTAREAELEMENT_FORM: - { - nsIDOMHTMLFormElement* 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(kIHTMLFormElementIID, (void **)&prop)) { - JS_ReportError(cx, "Parameter must be of type HTMLFormElement"); - return JS_FALSE; - } - } - else { - JS_ReportError(cx, "Parameter must be an object"); - return JS_FALSE; - } - - a->SetForm(prop); - if (prop) NS_RELEASE(prop); - break; - } case HTMLTEXTAREAELEMENT_ACCESSKEY: { nsAutoString prop; @@ -379,6 +384,21 @@ SetHTMLTextAreaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp break; } + case HTMLTEXTAREAELEMENT_VALUE: + { + nsAutoString prop; + JSString *jsstring; + if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { + prop.SetString(JS_GetStringChars(jsstring)); + } + else { + prop.SetString((const char *)nsnull); + } + + a->SetValue(prop); + + break; + } default: { nsIJSScriptObject *object; @@ -589,7 +609,7 @@ JSClass HTMLTextAreaElementClass = { static JSPropertySpec HTMLTextAreaElementProperties[] = { {"defaultValue", HTMLTEXTAREAELEMENT_DEFAULTVALUE, JSPROP_ENUMERATE}, - {"form", HTMLTEXTAREAELEMENT_FORM, JSPROP_ENUMERATE}, + {"form", HTMLTEXTAREAELEMENT_FORM, JSPROP_ENUMERATE | JSPROP_READONLY}, {"accessKey", HTMLTEXTAREAELEMENT_ACCESSKEY, JSPROP_ENUMERATE}, {"cols", HTMLTEXTAREAELEMENT_COLS, JSPROP_ENUMERATE}, {"disabled", HTMLTEXTAREAELEMENT_DISABLED, JSPROP_ENUMERATE}, @@ -597,6 +617,8 @@ static JSPropertySpec HTMLTextAreaElementProperties[] = {"readOnly", HTMLTEXTAREAELEMENT_READONLY, JSPROP_ENUMERATE}, {"rows", HTMLTEXTAREAELEMENT_ROWS, JSPROP_ENUMERATE}, {"tabIndex", HTMLTEXTAREAELEMENT_TABINDEX, JSPROP_ENUMERATE}, + {"type", HTMLTEXTAREAELEMENT_TYPE, JSPROP_ENUMERATE | JSPROP_READONLY}, + {"value", HTMLTEXTAREAELEMENT_VALUE, JSPROP_ENUMERATE}, {0} }; diff --git a/mozilla/dom/src/html/nsJSHTMLTfootElement.cpp b/mozilla/dom/src/html/nsJSHTMLTfootElement.cpp deleted file mode 100644 index 6780cff6b58..00000000000 --- a/mozilla/dom/src/html/nsJSHTMLTfootElement.cpp +++ /dev/null @@ -1,452 +0,0 @@ -/* -*- 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 "nsIDOMHTMLTfootElement.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(kIHTMLTfootElementIID, NS_IDOMHTMLTFOOTELEMENT_IID); - -NS_DEF_PTR(nsIDOMHTMLTfootElement); - -// -// HTMLTfootElement property ids -// -enum HTMLTfootElement_slots { - HTMLTFOOTELEMENT_ALIGN = -1, - HTMLTFOOTELEMENT_CH = -2, - HTMLTFOOTELEMENT_CHOFF = -3, - HTMLTFOOTELEMENT_VALIGN = -4 -}; - -/***********************************************************************/ -// -// HTMLTfootElement Properties Getter -// -PR_STATIC_CALLBACK(JSBool) -GetHTMLTfootElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) -{ - nsIDOMHTMLTfootElement *a = (nsIDOMHTMLTfootElement*)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 HTMLTFOOTELEMENT_ALIGN: - { - nsAutoString prop; - if (NS_OK == a->GetAlign(prop)) { - JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); - // set the return value - *vp = STRING_TO_JSVAL(jsstring); - } - else { - return JS_FALSE; - } - break; - } - case HTMLTFOOTELEMENT_CH: - { - nsAutoString prop; - if (NS_OK == a->GetCh(prop)) { - JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); - // set the return value - *vp = STRING_TO_JSVAL(jsstring); - } - else { - return JS_FALSE; - } - break; - } - case HTMLTFOOTELEMENT_CHOFF: - { - nsAutoString prop; - if (NS_OK == a->GetChOff(prop)) { - JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); - // set the return value - *vp = STRING_TO_JSVAL(jsstring); - } - else { - return JS_FALSE; - } - break; - } - case HTMLTFOOTELEMENT_VALIGN: - { - nsAutoString prop; - if (NS_OK == a->GetVAlign(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; -} - -/***********************************************************************/ -// -// HTMLTfootElement Properties Setter -// -PR_STATIC_CALLBACK(JSBool) -SetHTMLTfootElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) -{ - nsIDOMHTMLTfootElement *a = (nsIDOMHTMLTfootElement*)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 HTMLTFOOTELEMENT_ALIGN: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetAlign(prop); - - break; - } - case HTMLTFOOTELEMENT_CH: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetCh(prop); - - break; - } - case HTMLTFOOTELEMENT_CHOFF: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetChOff(prop); - - break; - } - case HTMLTFOOTELEMENT_VALIGN: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetVAlign(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; -} - - -// -// HTMLTfootElement finalizer -// -PR_STATIC_CALLBACK(void) -FinalizeHTMLTfootElement(JSContext *cx, JSObject *obj) -{ - nsIDOMHTMLTfootElement *a = (nsIDOMHTMLTfootElement*)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); - } -} - - -// -// HTMLTfootElement enumerate -// -PR_STATIC_CALLBACK(JSBool) -EnumerateHTMLTfootElement(JSContext *cx, JSObject *obj) -{ - nsIDOMHTMLTfootElement *a = (nsIDOMHTMLTfootElement*)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; -} - - -// -// HTMLTfootElement resolve -// -PR_STATIC_CALLBACK(JSBool) -ResolveHTMLTfootElement(JSContext *cx, JSObject *obj, jsval id) -{ - nsIDOMHTMLTfootElement *a = (nsIDOMHTMLTfootElement*)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 HTMLTfootElement -// -JSClass HTMLTfootElementClass = { - "HTMLTfootElement", - JSCLASS_HAS_PRIVATE, - JS_PropertyStub, - JS_PropertyStub, - GetHTMLTfootElementProperty, - SetHTMLTfootElementProperty, - EnumerateHTMLTfootElement, - ResolveHTMLTfootElement, - JS_ConvertStub, - FinalizeHTMLTfootElement -}; - - -// -// HTMLTfootElement class properties -// -static JSPropertySpec HTMLTfootElementProperties[] = -{ - {"align", HTMLTFOOTELEMENT_ALIGN, JSPROP_ENUMERATE}, - {"ch", HTMLTFOOTELEMENT_CH, JSPROP_ENUMERATE}, - {"chOff", HTMLTFOOTELEMENT_CHOFF, JSPROP_ENUMERATE}, - {"vAlign", HTMLTFOOTELEMENT_VALIGN, JSPROP_ENUMERATE}, - {0} -}; - - -// -// HTMLTfootElement class methods -// -static JSFunctionSpec HTMLTfootElementMethods[] = -{ - {0} -}; - - -// -// HTMLTfootElement constructor -// -PR_STATIC_CALLBACK(JSBool) -HTMLTfootElement(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) -{ - return JS_FALSE; -} - - -// -// HTMLTfootElement class initialization -// -nsresult NS_InitHTMLTfootElementClass(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, "HTMLTfootElement", &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_InitHTMLElementClass(aContext, (void **)&parent_proto)) { - return NS_ERROR_FAILURE; - } - proto = JS_InitClass(jscontext, // context - global, // global object - parent_proto, // parent proto - &HTMLTfootElementClass, // JSClass - HTMLTfootElement, // JSNative ctor - 0, // ctor args - HTMLTfootElementProperties, // proto props - HTMLTfootElementMethods, // 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 HTMLTfootElement JavaScript object -// -extern "C" NS_DOM nsresult NS_NewScriptHTMLTfootElement(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) -{ - NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptHTMLTfootElement"); - JSObject *proto; - JSObject *parent; - nsIScriptObjectOwner *owner; - JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); - nsresult result = NS_OK; - nsIDOMHTMLTfootElement *aHTMLTfootElement; - - 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_InitHTMLTfootElementClass(aContext, (void **)&proto)) { - return NS_ERROR_FAILURE; - } - - result = aSupports->QueryInterface(kIHTMLTfootElementIID, (void **)&aHTMLTfootElement); - if (NS_OK != result) { - return result; - } - - // create a js object for this class - *aReturn = JS_NewObject(jscontext, &HTMLTfootElementClass, proto, parent); - if (nsnull != *aReturn) { - // connect the native object to the js object - JS_SetPrivate(jscontext, (JSObject *)*aReturn, aHTMLTfootElement); - } - else { - NS_RELEASE(aHTMLTfootElement); - return NS_ERROR_FAILURE; - } - - return NS_OK; -} diff --git a/mozilla/dom/src/html/nsJSHTMLTheadElement.cpp b/mozilla/dom/src/html/nsJSHTMLTheadElement.cpp deleted file mode 100644 index b6412a42f1f..00000000000 --- a/mozilla/dom/src/html/nsJSHTMLTheadElement.cpp +++ /dev/null @@ -1,452 +0,0 @@ -/* -*- 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 "nsIDOMHTMLTheadElement.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(kIHTMLTheadElementIID, NS_IDOMHTMLTHEADELEMENT_IID); - -NS_DEF_PTR(nsIDOMHTMLTheadElement); - -// -// HTMLTheadElement property ids -// -enum HTMLTheadElement_slots { - HTMLTHEADELEMENT_ALIGN = -1, - HTMLTHEADELEMENT_CH = -2, - HTMLTHEADELEMENT_CHOFF = -3, - HTMLTHEADELEMENT_VALIGN = -4 -}; - -/***********************************************************************/ -// -// HTMLTheadElement Properties Getter -// -PR_STATIC_CALLBACK(JSBool) -GetHTMLTheadElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) -{ - nsIDOMHTMLTheadElement *a = (nsIDOMHTMLTheadElement*)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 HTMLTHEADELEMENT_ALIGN: - { - nsAutoString prop; - if (NS_OK == a->GetAlign(prop)) { - JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); - // set the return value - *vp = STRING_TO_JSVAL(jsstring); - } - else { - return JS_FALSE; - } - break; - } - case HTMLTHEADELEMENT_CH: - { - nsAutoString prop; - if (NS_OK == a->GetCh(prop)) { - JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); - // set the return value - *vp = STRING_TO_JSVAL(jsstring); - } - else { - return JS_FALSE; - } - break; - } - case HTMLTHEADELEMENT_CHOFF: - { - nsAutoString prop; - if (NS_OK == a->GetChOff(prop)) { - JSString *jsstring = JS_NewUCStringCopyN(cx, prop, prop.Length()); - // set the return value - *vp = STRING_TO_JSVAL(jsstring); - } - else { - return JS_FALSE; - } - break; - } - case HTMLTHEADELEMENT_VALIGN: - { - nsAutoString prop; - if (NS_OK == a->GetVAlign(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; -} - -/***********************************************************************/ -// -// HTMLTheadElement Properties Setter -// -PR_STATIC_CALLBACK(JSBool) -SetHTMLTheadElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) -{ - nsIDOMHTMLTheadElement *a = (nsIDOMHTMLTheadElement*)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 HTMLTHEADELEMENT_ALIGN: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetAlign(prop); - - break; - } - case HTMLTHEADELEMENT_CH: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetCh(prop); - - break; - } - case HTMLTHEADELEMENT_CHOFF: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetChOff(prop); - - break; - } - case HTMLTHEADELEMENT_VALIGN: - { - nsAutoString prop; - JSString *jsstring; - if ((jsstring = JS_ValueToString(cx, *vp)) != nsnull) { - prop.SetString(JS_GetStringChars(jsstring)); - } - else { - prop.SetString((const char *)nsnull); - } - - a->SetVAlign(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; -} - - -// -// HTMLTheadElement finalizer -// -PR_STATIC_CALLBACK(void) -FinalizeHTMLTheadElement(JSContext *cx, JSObject *obj) -{ - nsIDOMHTMLTheadElement *a = (nsIDOMHTMLTheadElement*)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); - } -} - - -// -// HTMLTheadElement enumerate -// -PR_STATIC_CALLBACK(JSBool) -EnumerateHTMLTheadElement(JSContext *cx, JSObject *obj) -{ - nsIDOMHTMLTheadElement *a = (nsIDOMHTMLTheadElement*)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; -} - - -// -// HTMLTheadElement resolve -// -PR_STATIC_CALLBACK(JSBool) -ResolveHTMLTheadElement(JSContext *cx, JSObject *obj, jsval id) -{ - nsIDOMHTMLTheadElement *a = (nsIDOMHTMLTheadElement*)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 HTMLTheadElement -// -JSClass HTMLTheadElementClass = { - "HTMLTheadElement", - JSCLASS_HAS_PRIVATE, - JS_PropertyStub, - JS_PropertyStub, - GetHTMLTheadElementProperty, - SetHTMLTheadElementProperty, - EnumerateHTMLTheadElement, - ResolveHTMLTheadElement, - JS_ConvertStub, - FinalizeHTMLTheadElement -}; - - -// -// HTMLTheadElement class properties -// -static JSPropertySpec HTMLTheadElementProperties[] = -{ - {"align", HTMLTHEADELEMENT_ALIGN, JSPROP_ENUMERATE}, - {"ch", HTMLTHEADELEMENT_CH, JSPROP_ENUMERATE}, - {"chOff", HTMLTHEADELEMENT_CHOFF, JSPROP_ENUMERATE}, - {"vAlign", HTMLTHEADELEMENT_VALIGN, JSPROP_ENUMERATE}, - {0} -}; - - -// -// HTMLTheadElement class methods -// -static JSFunctionSpec HTMLTheadElementMethods[] = -{ - {0} -}; - - -// -// HTMLTheadElement constructor -// -PR_STATIC_CALLBACK(JSBool) -HTMLTheadElement(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) -{ - return JS_FALSE; -} - - -// -// HTMLTheadElement class initialization -// -nsresult NS_InitHTMLTheadElementClass(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, "HTMLTheadElement", &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_InitHTMLElementClass(aContext, (void **)&parent_proto)) { - return NS_ERROR_FAILURE; - } - proto = JS_InitClass(jscontext, // context - global, // global object - parent_proto, // parent proto - &HTMLTheadElementClass, // JSClass - HTMLTheadElement, // JSNative ctor - 0, // ctor args - HTMLTheadElementProperties, // proto props - HTMLTheadElementMethods, // 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 HTMLTheadElement JavaScript object -// -extern "C" NS_DOM nsresult NS_NewScriptHTMLTheadElement(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn) -{ - NS_PRECONDITION(nsnull != aContext && nsnull != aSupports && nsnull != aReturn, "null argument to NS_NewScriptHTMLTheadElement"); - JSObject *proto; - JSObject *parent; - nsIScriptObjectOwner *owner; - JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); - nsresult result = NS_OK; - nsIDOMHTMLTheadElement *aHTMLTheadElement; - - 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_InitHTMLTheadElementClass(aContext, (void **)&proto)) { - return NS_ERROR_FAILURE; - } - - result = aSupports->QueryInterface(kIHTMLTheadElementIID, (void **)&aHTMLTheadElement); - if (NS_OK != result) { - return result; - } - - // create a js object for this class - *aReturn = JS_NewObject(jscontext, &HTMLTheadElementClass, proto, parent); - if (nsnull != *aReturn) { - // connect the native object to the js object - JS_SetPrivate(jscontext, (JSObject *)*aReturn, aHTMLTheadElement); - } - else { - NS_RELEASE(aHTMLTheadElement); - return NS_ERROR_FAILURE; - } - - return NS_OK; -} diff --git a/mozilla/dom/tests/js/DumpHTML.js b/mozilla/dom/tests/js/DumpHTML.js index a8c5fc2890a..5a9dfa8880b 100644 --- a/mozilla/dom/tests/js/DumpHTML.js +++ b/mozilla/dom/tests/js/DumpHTML.js @@ -23,7 +23,7 @@ function html(node) { var type = node.nodeType; - if (type == Node.ELEMENT) { + if (type == Node.ELEMENT_NODE) { // open tag dump("<" + node.tagName) @@ -34,7 +34,7 @@ function html(node) var countAttrs = attributes.length; var index = 0 while(index < countAttrs) { - att = attributes.item(index); + att = attributes[index]; if (null != att) { dump(" " + att.value) } @@ -46,13 +46,13 @@ function html(node) dump(">") // recursively dump the children - if (node.hasChildNodes) { + if (node.hasChildNodes()) { // get the children var children = node.childNodes; var length = children.length; var count = 0; while(count < length) { - child = children.item(count) + child = children[count] html(child) count++ } @@ -62,7 +62,7 @@ function html(node) } // if it's a piece of text just dump the text - else if (type == Node.TEXT) { + else if (type == Node.TEXT_NODE) { dump(node.data) } } diff --git a/mozilla/dom/tests/js/DumpTree.js b/mozilla/dom/tests/js/DumpTree.js index a34b6d6b567..ad9d8bd7224 100644 --- a/mozilla/dom/tests/js/DumpTree.js +++ b/mozilla/dom/tests/js/DumpTree.js @@ -27,24 +27,24 @@ function traverse(node, indent) var type = node.nodeType; // if it's an element dump the tag and recurse the children - if (type == Node.ELEMENT) { + if (type == Node.ELEMENT_NODE) { dump(indent + node.tagName) // go through the children - if (node.hasChildNodes) { + if (node.hasChildNodes()) { var children = node.childNodes; var length = children.length; var count = 0; while(count < length) { - child = children.item(count) + child = children[count] traverse(child, indent) count++ } } } // it's just text, no tag, dump "Text" - else if (type == Node.TEXT) { + else if (type == Node.TEXT_NODE) { dump(indent + "Text") } } diff --git a/mozilla/dom/tests/js/tables/changeCaption.js b/mozilla/dom/tests/js/tables/changeCaption.js index ea753126789..adbc903c6ad 100644 --- a/mozilla/dom/tests/js/tables/changeCaption.js +++ b/mozilla/dom/tests/js/tables/changeCaption.js @@ -19,7 +19,7 @@ function findBody(node) { - if (node.nodeType != Node.ELEMENT) { + if (node.nodeType != Node.ELEMENT_NODE) { return null; } var children = node.childNodes; @@ -30,7 +30,7 @@ function findBody(node) var child = null; var count = 0; while (count < length) { - child = children.item(count); + child = children[count]; if (child.tagName == "BODY") { dump("BODY found"); return child; @@ -57,8 +57,8 @@ function findTable(body) var child = null; var count = 0; while (count < length) { - child = children.item(count); - if (child.nodeType == Node.ELEMENT) { + child = children[count]; + if (child.nodeType == Node.ELEMENT_NODE) { if (child.tagName == "TABLE") { dump("TABLE found"); break; diff --git a/mozilla/dom/tests/js/tables/changeCell.js b/mozilla/dom/tests/js/tables/changeCell.js index 930432b54b3..447de8e3028 100644 --- a/mozilla/dom/tests/js/tables/changeCell.js +++ b/mozilla/dom/tests/js/tables/changeCell.js @@ -19,7 +19,7 @@ function findBody(node) { - if (node.nodeType != Node.ELEMENT) { + if (node.nodeType != Node.ELEMENT_NODE) { return null; } var children = node.childNodes; @@ -30,7 +30,7 @@ function findBody(node) var child = null; var count = 0; while (count < length) { - child = children.item(count); + child = children[count]; if (child.tagName == "BODY") { dump("BODY found"); return child; @@ -57,8 +57,8 @@ function findTable(body) var child = null; var count = 0; while (count < length) { - child = children.item(count); - if (child.nodeType == Node.ELEMENT) { + child = children[count]; + if (child.nodeType == Node.ELEMENT_NODE) { if (child.tagName == "TABLE") { dump("TABLE found"); break; @@ -83,8 +83,8 @@ function findTableBody(table) var child = null; var count = 0; while (count < length) { - child = children.item(count); - if (child.nodeType == Node.ELEMENT) { + child = children[count]; + if (child.nodeType == Node.ELEMENT_NODE) { if (child.tagName == "TBODY") { break; } diff --git a/mozilla/dom/tools/IdlInterface.cpp b/mozilla/dom/tools/IdlInterface.cpp index f7aa20a5a86..ad8357afcdd 100644 --- a/mozilla/dom/tools/IdlInterface.cpp +++ b/mozilla/dom/tools/IdlInterface.cpp @@ -82,6 +82,7 @@ ostream& operator<<(ostream &s, IdlInterface &aInterface) IdlInterface::IdlInterface() { + mIIDs = (nsVoidArray *)0; mBaseClasses = (nsVoidArray*)0; mAttributes = (nsVoidArray*)0; mFunctions = (nsVoidArray*)0; @@ -95,6 +96,12 @@ IdlInterface::IdlInterface() IdlInterface::~IdlInterface() { + if (mIIDs) { + for (int i = 0; i < mIIDs->Count(); i++) { + char *iid = (char*)mIIDs->ElementAt(i); + delete [] iid; + } + } if (mBaseClasses) { for (int i = 0; i < mBaseClasses->Count(); i++) { char *baseClass = (char*)mBaseClasses->ElementAt(i); @@ -151,6 +158,37 @@ IdlInterface::~IdlInterface() } } +void IdlInterface::AddIID(char *aIID) +{ + if (aIID) { + char *iid = new char[strlen(aIID) + 1]; + strcpy(iid, aIID); + if (!mIIDs) { + mIIDs = new nsVoidArray(); + } + mIIDs->AppendElement((void*)iid); + } +} + +long IdlInterface::IIDCount() +{ + if (mIIDs) { + return mIIDs->Count(); + } + return 0; +} + +char* IdlInterface::GetIIDAt(long aIndex) +{ + char *iid = (char*)0; + + if (mIIDs) { + iid = (char*)mIIDs->ElementAt(aIndex); + } + + return iid; +} + void IdlInterface::InheritsFrom(char *aBase) { if (aBase) { diff --git a/mozilla/dom/tools/IdlInterface.h b/mozilla/dom/tools/IdlInterface.h index 73e988c45a2..bcdc43a47db 100644 --- a/mozilla/dom/tools/IdlInterface.h +++ b/mozilla/dom/tools/IdlInterface.h @@ -33,6 +33,7 @@ class IdlException; class IdlInterface : public IdlObject { private: + nsVoidArray *mIIDs; nsVoidArray *mBaseClasses; nsVoidArray *mAttributes; nsVoidArray *mFunctions; @@ -46,7 +47,10 @@ private: public: IdlInterface(); ~IdlInterface(); - + + char* GetIIDAt(long aIndex); + long IIDCount(); + void AddIID(char *aIID); void InheritsFrom(char *aBase); long BaseClassCount(); char* GetBaseClassAt(long aIndex); diff --git a/mozilla/dom/tools/IdlParser.cpp b/mozilla/dom/tools/IdlParser.cpp index 745915834d6..07906b213fe 100644 --- a/mozilla/dom/tools/IdlParser.cpp +++ b/mozilla/dom/tools/IdlParser.cpp @@ -266,6 +266,9 @@ void IdlParser::ParseInterfaceBody(IdlSpecification &aSpecification, IdlInterfac // parse the proper valid type switch (token->id) { + case IID_TOKEN: + aInterface.AddIID(token->stringID); + break; case TYPEDEF_TOKEN: aInterface.AddTypedef(ParseTypedef(aSpecification)); break; @@ -297,11 +300,13 @@ void IdlParser::ParseInterfaceBody(IdlSpecification &aSpecification, IdlInterfac TrimComments(); // read the final ";" - token = mScanner->NextToken(); - if (TERMINATOR_TOKEN != token->id) { - throw InterfaceParsingException("Missing ';'."); + if (IID_TOKEN != token->id) { + token = mScanner->NextToken(); + if (TERMINATOR_TOKEN != token->id) { + throw InterfaceParsingException("Missing ';'."); + } + TrimComments(); } - TrimComments(); } // eat "}" diff --git a/mozilla/dom/tools/IdlScanner.cpp b/mozilla/dom/tools/IdlScanner.cpp index 50dbf492cf4..671b934d5fb 100644 --- a/mozilla/dom/tools/IdlScanner.cpp +++ b/mozilla/dom/tools/IdlScanner.cpp @@ -157,6 +157,7 @@ Token* IdlScanner::NextToken() CKeywords(mTokenName + 1, mCurrentToken); break; case 'd': + case 'D': DKeywords(mTokenName + 1, mCurrentToken); break; case 'e': @@ -391,7 +392,7 @@ void IdlScanner::CKeywords(char *aCurrentPos, Token *aToken) } // -// 'double' is the only keyword starting with 'd'. +// 'double' and 'DOMString' are the only keyword starting with 'd'. // If that is not it, it must be an identifier // void IdlScanner::DKeywords(char *aCurrentPos, Token *aToken) @@ -420,6 +421,32 @@ void IdlScanner::DKeywords(char *aCurrentPos, Token *aToken) aToken->SetToken(DOUBLE_TOKEN); } } + else if (c != EOF && c == 'O' && (*aCurrentPos++ = c) && (c = mInputFile->get()) && + c != EOF && c == 'M' && (*aCurrentPos++ = c) && (c = mInputFile->get()) && + c != EOF && c == 'S' && (*aCurrentPos++ = c) && (c = mInputFile->get()) && + c != EOF && c == 't' && (*aCurrentPos++ = c) && (c = mInputFile->get()) && + c != EOF && c == 'r' && (*aCurrentPos++ = c) && (c = mInputFile->get()) && + c != EOF && c == 'i' && (*aCurrentPos++ = c) && (c = mInputFile->get()) && + c != EOF && c == 'n' && (*aCurrentPos++ = c) && (c = mInputFile->get()) && + c != EOF && c == 'g' && (*aCurrentPos++ = c)) { + // if terminated is a keyword + c = mInputFile->get(); + if (c != EOF) { + if (isalpha(c) || isdigit(c) || c == '_') { + // more characters, it must be an identifier + *aCurrentPos++ = c; + Identifier(aCurrentPos, aToken); + } + else { + // it is a keyword + aToken->SetToken(STRING_TOKEN); + mInputFile->putback(c); + } + } + else { + aToken->SetToken(STRING_TOKEN); + } + } else { // it must be an identifier KeywordMismatch(c, aCurrentPos, aToken); @@ -1164,6 +1191,7 @@ void IdlScanner::Char(int aStartChar, Token *aToken) #define DEFAULT_COMMENT_SIZE 512 static char *kOptionalStr = "/* optional "; static char *kEllipsisStr = "/* ... "; +static char *kIIDStr = "/* IID:"; void IdlScanner::Comment(char *aCurrentPos, Token *aToken) { @@ -1228,6 +1256,9 @@ void IdlScanner::Comment(char *aCurrentPos, Token *aToken) else if (strcmp(aCommentBuffer, kEllipsisStr) == 0) { aToken->SetToken(ELLIPSIS_TOKEN, aCommentBuffer); } + else if (strncmp(aCommentBuffer, kIIDStr, strlen(kIIDStr)) == 0) { + aToken->SetToken(IID_TOKEN, aCommentBuffer + strlen(kIIDStr)); + } else { aToken->SetToken(COMMENT_TOKEN, aCommentBuffer); } diff --git a/mozilla/dom/tools/IdlScanner.h b/mozilla/dom/tools/IdlScanner.h index 3a6aa311b16..0e7aa71cde7 100644 --- a/mozilla/dom/tools/IdlScanner.h +++ b/mozilla/dom/tools/IdlScanner.h @@ -39,6 +39,7 @@ enum TokenType { READONLY_TOKEN, OPTIONAL_TOKEN, ELLIPSIS_TOKEN, + IID_TOKEN, ATTRIBUTE_TOKEN, IDENTIFIER_TOKEN, BOOLEAN_TOKEN, diff --git a/mozilla/dom/tools/JSStubGen.cpp b/mozilla/dom/tools/JSStubGen.cpp index eaa3328454a..0772f04d869 100644 --- a/mozilla/dom/tools/JSStubGen.cpp +++ b/mozilla/dom/tools/JSStubGen.cpp @@ -907,7 +907,7 @@ static const char *kMethodBeginNonPrimaryStr = "\n\n" "%s%s(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)\n" "{\n" " nsIDOM%s *privateThis = (nsIDOM%s*)JS_GetPrivate(cx, obj);\n" -" nsIDOM%s *nativeThis;\n" +" nsIDOM%s *nativeThis = nsnull;\n" " if (NS_OK != privateThis->QueryInterface(kI%sIID, (void **)nativeThis)) {\n" " JS_ReportError(cx, \"Object must be of type %s\");\n" " return JS_FALSE;\n" diff --git a/mozilla/dom/tools/XPCOMGen.cpp b/mozilla/dom/tools/XPCOMGen.cpp index 9896fb84de8..4aea96ccd46 100644 --- a/mozilla/dom/tools/XPCOMGen.cpp +++ b/mozilla/dom/tools/XPCOMGen.cpp @@ -45,6 +45,8 @@ static const char *kIncludeJSStr = "#include \"jsapi.h\"\n"; static const char *kForwardClassStr = "class nsIDOM%s;\n"; static const char *kUuidStr = "#define %s \\\n" +"%s\n\n"; +static const char *kNoUuidStr = "--- IID GOES HERE ---\n\n"; static const char *kClassDeclStr = "class nsIDOM%s : "; static const char *kBaseClassStr = "public nsIDOM%s"; @@ -200,9 +202,16 @@ XPCOMGen::GenerateGuid(IdlInterface &aInterface) char buf[512]; char uuid_buf[256]; ofstream *file = GetFile(); - + char *uuid; + + uuid = aInterface.GetIIDAt(0); GetInterfaceIID(uuid_buf, aInterface); - sprintf(buf, kUuidStr, uuid_buf); + if (NULL != uuid) { + sprintf(buf, kUuidStr, uuid_buf, uuid); + } + else { + sprintf(buf, kUuidStr, uuid_buf, kNoUuidStr); + } *file << buf; } @@ -555,8 +564,14 @@ XPCOMGen::GenerateFactory(IdlInterface &aInterface) if (HasConstructor(aInterface, &constructor)) { strcpy(name_buf, iface_name); strcat(name_buf, "Factory"); + char *iid = aInterface.GetIIDAt(1); GetInterfaceIID(uuid_buf, name_buf); - sprintf(buf, kUuidStr, uuid_buf); + if (NULL != iid) { + sprintf(buf, kUuidStr, uuid_buf, iid); + } + else { + sprintf(buf, kUuidStr, uuid_buf, kNoUuidStr); + } *file << buf; sprintf(buf, kFactoryClassDeclBeginStr, iface_name); diff --git a/mozilla/layout/base/src/nsDocument.cpp b/mozilla/layout/base/src/nsDocument.cpp index 8fb9b430851..4282c91699e 100644 --- a/mozilla/layout/base/src/nsDocument.cpp +++ b/mozilla/layout/base/src/nsDocument.cpp @@ -620,38 +620,27 @@ nsresult nsDocument::SetScriptObject(void *aScriptObject) // // nsIDOMDocument interface // -NS_IMETHODIMP -nsDocument::GetMasterDoc(nsIDOMDocument **aDocument) -{ - NS_ADDREF_THIS(); - *aDocument = (nsIDOMDocument*)this; - return NS_OK; -} - NS_IMETHODIMP -nsDocument::GetDocumentType(nsIDOMDocumentType** aDocumentType) +nsDocument::GetDoctype(nsIDOMDocumentType** aDoctype) { - //XXX TBI + // Should be implemented by subclass return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP -nsDocument::GetProlog(nsIDOMNodeList** aProlog) +nsDocument::GetImplementation(nsIDOMDOMImplementation** aImplementation) { - *aProlog = nsnull; - return NS_OK; -} - -NS_IMETHODIMP -nsDocument::GetEpilog(nsIDOMNodeList** aEpilog) -{ - *aEpilog = nsnull; - return NS_OK; + // XXX To be implemented + return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP nsDocument::GetDocumentElement(nsIDOMElement** aDocumentElement) { + if (nsnull == aDocumentElement) { + return NS_ERROR_NULL_POINTER; + } + nsresult res = NS_ERROR_FAILURE; if (nsnull != mRootContent) { @@ -662,51 +651,39 @@ nsDocument::GetDocumentElement(nsIDOMElement** aDocumentElement) return res; } -#if 0 -NS_IMETHODIMP -nsDocument::SetDocumentElement(nsIDOMElement *aElement) -{ - NS_PRECONDITION(nsnull != aElement, "null arg"); - nsIContent* content; - - nsresult res = aElement->QueryInterface(kIContentIID, (void**)&content); - if (NS_OK == res) { - SetRootContent(content); - NS_RELEASE(content); - } - else NS_ASSERTION(0, "Must be an nsIContent"); // nsIContent not supported. Who are you? - - return res; -} -#endif - NS_IMETHODIMP nsDocument::CreateElement(const nsString& aTagName, - nsIDOMNamedNodeMap* aAttributes, - nsIDOMElement** aReturn) + nsIDOMElement** aReturn) { - //XXX TBI + // Should be implemented by subclass return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP nsDocument::CreateTextNode(const nsString& aData, nsIDOMText** aReturn) { - //XXX TBI + // Should be implemented by subclass return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP nsDocument::CreateDocumentFragment(nsIDOMDocumentFragment** aReturn) { - //XXX TBI + // Should be implemented by subclass return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP nsDocument::CreateComment(const nsString& aData, nsIDOMComment** aReturn) { - //XXX TBI + // Should be implemented by subclass + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsDocument::CreateCDATASection(const nsString& aData, nsIDOMCDATASection** aReturn) +{ + // Should be implemented by subclass return NS_ERROR_NOT_IMPLEMENTED; } @@ -715,16 +692,23 @@ nsDocument::CreateProcessingInstruction(const nsString& aTarget, const nsString& aData, nsIDOMProcessingInstruction** aReturn) { - //XXX TBI + // Should be implemented by subclass return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP nsDocument::CreateAttribute(const nsString& aName, - nsIDOMNode* aValue, - nsIDOMAttribute** aReturn) + nsIDOMAttr** aReturn) { - //XXX TBI + // Should be implemented by subclass + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsDocument::CreateEntityReference(const nsString& aName, + nsIDOMEntityReference** aReturn) +{ + // Should be implemented by subclass return NS_ERROR_NOT_IMPLEMENTED; } @@ -767,10 +751,10 @@ nsDocument::SetNodeValue(const nsString& aNodeValue) } NS_IMETHODIMP -nsDocument::GetNodeType(PRInt32* aNodeType) +nsDocument::GetNodeType(PRUint16* aNodeType) { - // XXX TBI - return NS_ERROR_NOT_IMPLEMENTED; + *aNodeType = nsIDOMNode::DOCUMENT_NODE; + return NS_OK; } NS_IMETHODIMP @@ -788,7 +772,7 @@ nsDocument::GetChildNodes(nsIDOMNodeList** aChildNodes) } NS_IMETHODIMP -nsDocument::GetHasChildNodes(PRBool* aHasChildNodes) +nsDocument::HasChildNodes(PRBool* aHasChildNodes) { // XXX TBI return NS_ERROR_NOT_IMPLEMENTED; @@ -858,17 +842,17 @@ nsDocument::AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn) } NS_IMETHODIMP -nsDocument::CloneNode(nsIDOMNode** aReturn) +nsDocument::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { // XXX TBI return NS_ERROR_NOT_IMPLEMENTED; } + NS_IMETHODIMP -nsDocument::Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn) +nsDocument::GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { - // XXX TBI - return NS_ERROR_NOT_IMPLEMENTED; + return QueryInterface(kIDOMDocumentIID, (void **)aOwnerDocument); } nsresult nsDocument::GetListenerManager(nsIEventListenerManager **aInstancePtrResult) diff --git a/mozilla/layout/base/src/nsDocument.h b/mozilla/layout/base/src/nsDocument.h index 89bf58dcdf1..e817cd84b6e 100644 --- a/mozilla/layout/base/src/nsDocument.h +++ b/mozilla/layout/base/src/nsDocument.h @@ -196,40 +196,39 @@ public: NS_IMETHOD SetScriptObject(void *aScriptObject); // nsIDOMDocument interface - NS_IMETHOD GetMasterDoc(nsIDOMDocument **aDocument); - NS_IMETHOD GetDocumentType(nsIDOMDocumentType** aDocumentType); - NS_IMETHOD GetProlog(nsIDOMNodeList** aProlog); - NS_IMETHOD GetEpilog(nsIDOMNodeList** aEpilog); + NS_IMETHOD GetDoctype(nsIDOMDocumentType** aDoctype); + NS_IMETHOD GetImplementation(nsIDOMDOMImplementation** aImplementation); NS_IMETHOD GetDocumentElement(nsIDOMElement** aDocumentElement); + + NS_IMETHOD CreateElement(const nsString& aTagName, nsIDOMElement** aReturn); NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment** aReturn); - NS_IMETHOD CreateComment(const nsString& aData, nsIDOMComment** aReturn); - NS_IMETHOD CreateProcessingInstruction(const nsString& aTarget, const nsString& aData, nsIDOMProcessingInstruction** aReturn); - NS_IMETHOD CreateAttribute(const nsString& aName, nsIDOMNode* aValue, nsIDOMAttribute** aReturn); - NS_IMETHOD CreateElement(const nsString& aTagName, - nsIDOMNamedNodeMap* aAttributes, - nsIDOMElement** aReturn); NS_IMETHOD CreateTextNode(const nsString& aData, nsIDOMText** aReturn); + NS_IMETHOD CreateComment(const nsString& aData, nsIDOMComment** aReturn); + NS_IMETHOD CreateCDATASection(const nsString& aData, nsIDOMCDATASection** aReturn); + NS_IMETHOD CreateProcessingInstruction(const nsString& aTarget, const nsString& aData, nsIDOMProcessingInstruction** aReturn); + NS_IMETHOD CreateAttribute(const nsString& aName, nsIDOMAttr** aReturn); + NS_IMETHOD CreateEntityReference(const nsString& aName, nsIDOMEntityReference** aReturn); NS_IMETHOD GetElementsByTagName(const nsString& aTagname, nsIDOMNodeList** aReturn); // nsIDOMNode interface NS_IMETHOD GetNodeName(nsString& aNodeName); NS_IMETHOD GetNodeValue(nsString& aNodeValue); NS_IMETHOD SetNodeValue(const nsString& aNodeValue); - NS_IMETHOD GetNodeType(PRInt32* aNodeType); + NS_IMETHOD GetNodeType(PRUint16* aNodeType); NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode); NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes); - NS_IMETHOD GetHasChildNodes(PRBool* aHasChildNodes); + NS_IMETHOD HasChildNodes(PRBool* aHasChildNodes); NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild); NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild); NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling); NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling); NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes); + NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument); NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn); NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aReturn); NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn); NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn); - NS_IMETHOD CloneNode(nsIDOMNode** aReturn); - NS_IMETHOD Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn); + NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn); // nsIDOMEventCapturer interface NS_IMETHOD CaptureEvent(const nsString& aType); diff --git a/mozilla/layout/html/content/src/nsCommentNode.cpp b/mozilla/layout/html/content/src/nsCommentNode.cpp index 82305e16a29..efcfafd85d2 100644 --- a/mozilla/layout/html/content/src/nsCommentNode.cpp +++ b/mozilla/layout/html/content/src/nsCommentNode.cpp @@ -38,8 +38,8 @@ public: // nsIDOMNode NS_IMPL_IDOMNODE_USING_GENERIC_DOM_DATA(mInner) - // nsIDOMData - NS_IMPL_IDOMDATA_USING_GENERIC_DOM_DATA(mInner) + // nsIDOMCharacterData + NS_IMPL_IDOMCHARACTERDATA_USING_GENERIC_DOM_DATA(mInner) // nsIDOMComment @@ -95,22 +95,14 @@ nsCommentNode::QueryInterface(REFNSIID aIID, void** aInstancePtr) } NS_IMETHODIMP -nsCommentNode::GetNodeType(PRInt32* aNodeType) +nsCommentNode::GetNodeType(PRUint16* aNodeType) { - *aNodeType = (PRInt32)nsIDOMNode::TEXT; + *aNodeType = (PRUint16)nsIDOMNode::COMMENT_NODE; return NS_OK; } NS_IMETHODIMP -nsCommentNode::Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn) -{ - // XXX not yet implemented - *aReturn = PR_FALSE; - return NS_OK; -} - -NS_IMETHODIMP -nsCommentNode::CloneNode(nsIDOMNode** aReturn) +nsCommentNode::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsCommentNode* it = new nsCommentNode(); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsGenericDOMDataNode.cpp b/mozilla/layout/html/content/src/nsGenericDOMDataNode.cpp index faaa4c16445..5e29266c89a 100644 --- a/mozilla/layout/html/content/src/nsGenericDOMDataNode.cpp +++ b/mozilla/layout/html/content/src/nsGenericDOMDataNode.cpp @@ -33,10 +33,11 @@ // XXX share all id's in this dir -NS_DEFINE_IID(kIDOMDataIID, NS_IDOMDATA_IID); +NS_DEFINE_IID(kIDOMCharacterDataIID, NS_IDOMCHARACTERDATA_IID); extern void NS_QuoteForHTML(const nsString& aValue, nsString& aResult); static NS_DEFINE_IID(kIPrivateDOMEventIID, NS_IPRIVATEDOMEVENT_IID); +static NS_DEFINE_IID(kIDOMDocumentIID, NS_IDOMNODE_IID); //---------------------------------------------------------------------- @@ -140,6 +141,21 @@ nsGenericDOMDataNode::GetNextSibling(nsIDOMNode** aNextSibling) return NS_OK; } +nsresult +nsGenericDOMDataNode::GetOwnerDocument(nsIDOMDocument** aOwnerDocument) +{ + // XXX Actually the owner document is the document in whose context + // the node has been created. We should be able to get at it + // whether or not we are attached to the document. + if (nsnull != mDocument) { + return mDocument->QueryInterface(kIDOMDocumentIID, (void **)aOwnerDocument); + } + else { + *aOwnerDocument = nsnull; + return NS_OK; + } +} + #if 0 nsresult nsGenericDOMDataNode::Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn) @@ -157,7 +173,7 @@ nsGenericDOMDataNode::Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn) //---------------------------------------------------------------------- -// Implementation of nsIDOMData +// Implementation of nsIDOMCharacterData nsresult nsGenericDOMDataNode::GetData(nsString& aData) @@ -184,9 +200,9 @@ nsGenericDOMDataNode::SetData(const nsString& aData) } nsresult -nsGenericDOMDataNode::GetSize(PRUint32* aSize) +nsGenericDOMDataNode::GetLength(PRUint32* aLength) { - *aSize = mText.GetLength(); + *aLength = mText.GetLength(); return NS_OK; } @@ -195,9 +211,9 @@ nsGenericDOMDataNode::GetSize(PRUint32* aSize) #define NS_DOM_INDEX_SIZE_ERR NS_ERROR_FAILURE nsresult -nsGenericDOMDataNode::Substring(PRUint32 aStart, - PRUint32 aCount, - nsString& aReturn) +nsGenericDOMDataNode::SubstringData(PRUint32 aStart, + PRUint32 aCount, + nsString& aReturn) { aReturn.Truncate(); @@ -222,27 +238,27 @@ nsGenericDOMDataNode::Substring(PRUint32 aStart, } nsresult -nsGenericDOMDataNode::Append(const nsString& aData) +nsGenericDOMDataNode::AppendData(const nsString& aData) { - return Replace(mText.GetLength(), 0, aData); + return ReplaceData(mText.GetLength(), 0, aData); } nsresult -nsGenericDOMDataNode::Insert(PRUint32 aOffset, const nsString& aData) +nsGenericDOMDataNode::InsertData(PRUint32 aOffset, const nsString& aData) { - return Replace(aOffset, 0, aData); + return ReplaceData(aOffset, 0, aData); } nsresult -nsGenericDOMDataNode::Remove(PRUint32 aOffset, PRUint32 aCount) +nsGenericDOMDataNode::DeleteData(PRUint32 aOffset, PRUint32 aCount) { nsAutoString empty; - return Replace(aOffset, aCount, empty); + return ReplaceData(aOffset, aCount, empty); } nsresult -nsGenericDOMDataNode::Replace(PRUint32 aOffset, PRUint32 aCount, - const nsString& aData) +nsGenericDOMDataNode::ReplaceData(PRUint32 aOffset, PRUint32 aCount, + const nsString& aData) { // sanitize arguments PRUint32 textLength = mText.GetLength(); @@ -303,8 +319,9 @@ nsGenericDOMDataNode::GetScriptObject(nsIScriptContext* aContext, return res; } - res = factory->NewScriptData(nsIDOMNode::TEXT, aContext, mContent, - mParent, (void**)&mScriptObject); + res = factory->NewScriptCharacterData(nsIDOMNode::TEXT_NODE, + aContext, mContent, + mParent, (void**)&mScriptObject); NS_RELEASE(factory); } *aScriptObject = mScriptObject; diff --git a/mozilla/layout/html/content/src/nsGenericDOMDataNode.h b/mozilla/layout/html/content/src/nsGenericDOMDataNode.h index b67ad9c79d2..d3adb5d29cf 100644 --- a/mozilla/layout/html/content/src/nsGenericDOMDataNode.h +++ b/mozilla/layout/html/content/src/nsGenericDOMDataNode.h @@ -19,7 +19,7 @@ #ifndef nsGenericDOMDataNode_h___ #define nsGenericDOMDataNode_h___ -#include "nsIDOMData.h" +#include "nsIDOMCharacterData.h" #include "nsIScriptObjectOwner.h" #include "nsIDOMEventReceiver.h" #include "nsIHTMLContent.h" @@ -27,7 +27,7 @@ #include "nsHTMLValue.h" #include "nsVoidArray.h" -extern const nsIID kIDOMDataIID; +extern const nsIID kIDOMCharacterDataIID; extern const nsIID kIDOMNodeIID; extern const nsIID kIDOMEventReceiverIID; extern const nsIID kIScriptObjectOwnerIID; @@ -35,7 +35,7 @@ extern const nsIID kISupportsIID; extern const nsIID kIContentIID; extern const nsIID kIHTMLContentIID; -class nsIDOMAttribute; +class nsIDOMAttr; class nsIDOMEventListener; class nsIDOMNodeList; class nsIEventListenerManager; @@ -70,7 +70,7 @@ struct nsGenericDOMDataNode { *aChildNodes = nsnull; return NS_OK; } - nsresult GetHasChildNodes(PRBool* aHasChildNodes) { + nsresult HasChildNodes(PRBool* aHasChildNodes) { *aHasChildNodes = PR_FALSE; return NS_OK; } @@ -96,16 +96,17 @@ struct nsGenericDOMDataNode { nsresult AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn) { return NS_ERROR_FAILURE; } + nsresult GetOwnerDocument(nsIDOMDocument** aOwnerDocument); - // Implementation for nsIDOMData - nsresult GetData(nsString& aData); - nsresult SetData(const nsString& aData); - nsresult GetSize(PRUint32* aSize); - nsresult Substring(PRUint32 aStart, PRUint32 aEnd, nsString& aReturn); - nsresult Append(const nsString& aData); - nsresult Insert(PRUint32 aOffset, const nsString& aData); - nsresult Remove(PRUint32 aOffset, PRUint32 aCount); - nsresult Replace(PRUint32 aOffset, PRUint32 aCount, const nsString& aData); + // Implementation for nsIDOMCharacterData + nsresult GetData(nsString& aData); + nsresult SetData(const nsString& aData); + nsresult GetLength(PRUint32* aLength); + nsresult SubstringData(PRUint32 aOffset, PRUint32 aCount, nsString& aReturn); + nsresult AppendData(const nsString& aArg); + nsresult InsertData(PRUint32 aOffset, const nsString& aArg); + nsresult DeleteData(PRUint32 aOffset, PRUint32 aCount); + nsresult ReplaceData(PRUint32 aOffset, PRUint32 aCount, const nsString& aArg); // nsIDOMEventReceiver interface nsresult AddEventListener(nsIDOMEventListener *aListener, const nsIID& aIID); @@ -258,8 +259,8 @@ struct nsGenericDOMDataNode { * nsGenericHTMLContainerContent) * * Note that classes using this macro will need to implement: - * NS_IMETHOD GetNodeType(PRInt32* aNodeType); - * NS_IMETHOD CloneNode(nsIDOMNode** aReturn); + * NS_IMETHOD GetNodeType(PRUint16* aNodeType); + * NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn); */ #define NS_IMPL_IDOMNODE_USING_GENERIC_DOM_DATA(_g) \ NS_IMETHOD GetNodeName(nsString& aNodeName) { \ @@ -271,15 +272,15 @@ struct nsGenericDOMDataNode { NS_IMETHOD SetNodeValue(const nsString& aNodeValue) { \ return _g.SetNodeValue(aNodeValue); \ } \ - NS_IMETHOD GetNodeType(PRInt32* aNodeType); \ + NS_IMETHOD GetNodeType(PRUint16* aNodeType); \ NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode) { \ return _g.GetParentNode(aParentNode); \ } \ NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes) { \ return _g.GetChildNodes(aChildNodes); \ } \ - NS_IMETHOD GetHasChildNodes(PRBool* aHasChildNodes) { \ - return _g.GetHasChildNodes(aHasChildNodes); \ + NS_IMETHOD HasChildNodes(PRBool* aHasChildNodes) { \ + return _g.HasChildNodes(aHasChildNodes); \ } \ NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild) { \ return _g.GetFirstChild(aFirstChild); \ @@ -310,34 +311,36 @@ struct nsGenericDOMDataNode { NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn) { \ return _g.RemoveChild(aOldChild, aReturn); \ } \ - NS_IMETHOD Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn); \ - NS_IMETHOD CloneNode(nsIDOMNode** aReturn); + NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { \ + return _g.GetOwnerDocument(aOwnerDocument); \ + } \ + NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn); -#define NS_IMPL_IDOMDATA_USING_GENERIC_DOM_DATA(_g) \ +#define NS_IMPL_IDOMCHARACTERDATA_USING_GENERIC_DOM_DATA(_g) \ NS_IMETHOD GetData(nsString& aData) { \ return _g.GetData(aData); \ } \ NS_IMETHOD SetData(const nsString& aData) { \ return _g.SetData(aData); \ } \ - NS_IMETHOD GetSize(PRUint32* aSize) { \ - return _g.GetSize(aSize); \ + NS_IMETHOD GetLength(PRUint32* aLength) { \ + return _g.GetLength(aLength); \ } \ - NS_IMETHOD Substring(PRUint32 aStart, PRUint32 aEnd, nsString& aReturn) { \ - return _g.Substring(aStart, aEnd, aReturn); \ + NS_IMETHOD SubstringData(PRUint32 aStart, PRUint32 aEnd, nsString& aReturn) { \ + return _g.SubstringData(aStart, aEnd, aReturn); \ } \ - NS_IMETHOD Append(const nsString& aData) { \ - return _g.Append(aData); \ + NS_IMETHOD AppendData(const nsString& aData) { \ + return _g.AppendData(aData); \ } \ - NS_IMETHOD Insert(PRUint32 aOffset, const nsString& aData) { \ - return _g.Insert(aOffset, aData); \ + NS_IMETHOD InsertData(PRUint32 aOffset, const nsString& aData) { \ + return _g.InsertData(aOffset, aData); \ } \ - NS_IMETHOD Remove(PRUint32 aOffset, PRUint32 aCount) { \ - return _g.Remove(aOffset, aCount); \ + NS_IMETHOD DeleteData(PRUint32 aOffset, PRUint32 aCount) { \ + return _g.DeleteData(aOffset, aCount); \ } \ - NS_IMETHOD Replace(PRUint32 aOffset, PRUint32 aCount, \ + NS_IMETHOD ReplaceData(PRUint32 aOffset, PRUint32 aCount, \ const nsString& aData) { \ - return _g.Replace(aOffset, aCount, aData); \ + return _g.ReplaceData(aOffset, aCount, aData); \ } @@ -529,8 +532,8 @@ struct nsGenericDOMDataNode { NS_ADDREF_THIS(); \ return NS_OK; \ } \ - if (_id.Equals(kIDOMDataIID)) { \ - nsIDOMData* tmp = _this; \ + if (_id.Equals(kIDOMCharacterDataIID)) { \ + nsIDOMCharacterData* tmp = _this; \ *_iptr = (void*) tmp; \ NS_ADDREF_THIS(); \ return NS_OK; \ diff --git a/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp b/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp index 41eb8e99d63..bd248d62957 100644 --- a/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp +++ b/mozilla/layout/html/content/src/nsGenericHTMLElement.cpp @@ -23,7 +23,7 @@ #include "nsICSSStyleRule.h" #include "nsICSSDeclaration.h" #include "nsIDocument.h" -#include "nsIDOMAttribute.h" +#include "nsIDOMAttr.h" #include "nsIDOMEventReceiver.h" #include "nsIDOMNamedNodeMap.h" #include "nsIDOMNodeList.h" @@ -75,7 +75,7 @@ NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); NS_DEFINE_IID(kIContentIID, NS_ICONTENT_IID); //NS_DEFINE_IID(kIHTMLContentIID, NS_IHTMLCONTENT_IID); -static NS_DEFINE_IID(kIDOMAttributeIID, NS_IDOMATTRIBUTE_IID); +static NS_DEFINE_IID(kIDOMAttrIID, NS_IDOMATTR_IID); static NS_DEFINE_IID(kIDOMNamedNodeMapIID, NS_IDOMNAMEDNODEMAP_IID); static NS_DEFINE_IID(kIPrivateDOMEventIID, NS_IPRIVATEDOMEVENT_IID); static NS_DEFINE_IID(kIStyleRuleIID, NS_ISTYLE_RULE_IID); @@ -83,11 +83,12 @@ static NS_DEFINE_IID(kIHTMLDocumentIID, NS_IHTMLDOCUMENT_IID); static NS_DEFINE_IID(kICSSStyleRuleIID, NS_ICSS_STYLE_RULE_IID); static NS_DEFINE_IID(kIDOMNodeListIID, NS_IDOMNODELIST_IID); static NS_DEFINE_IID(kIDOMCSSStyleDeclarationIID, NS_IDOMCSSSTYLEDECLARATION_IID); +static NS_DEFINE_IID(kIDOMDocumentIID, NS_IDOMNODE_IID); // Attribute helper class used to wrap up an attribute with a dom -// object that implements nsIDOMAttribute and nsIDOMNode and +// object that implements nsIDOMAttr and nsIDOMNode and // nsIScriptObjectOwner -class DOMAttribute : public nsIDOMAttribute, public nsIScriptObjectOwner { +class DOMAttribute : public nsIDOMAttr, public nsIScriptObjectOwner { public: DOMAttribute(const nsString &aName, const nsString &aValue); ~DOMAttribute(); @@ -97,20 +98,20 @@ public: NS_IMETHOD GetScriptObject(nsIScriptContext* aContext, void** aScriptObject); NS_IMETHOD SetScriptObject(void *aScriptObject); - // nsIDOMAttribute interface + // nsIDOMAttr interface NS_IMETHOD GetSpecified(PRBool* aSpecified); - NS_IMETHOD SetSpecified(PRBool aSpecified); NS_IMETHOD GetName(nsString& aReturn); NS_IMETHOD GetValue(nsString& aReturn); - + NS_IMETHOD SetValue(const nsString& aValue); + // nsIDOMNode interface NS_IMETHOD GetNodeName(nsString& aNodeName); NS_IMETHOD GetNodeValue(nsString& aNodeValue); NS_IMETHOD SetNodeValue(const nsString& aNodeValue); - NS_IMETHOD GetNodeType(PRInt32* aNodeType); + NS_IMETHOD GetNodeType(PRUint16* aNodeType); NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode); NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes); - NS_IMETHOD GetHasChildNodes(PRBool* aHasChildNodes); + NS_IMETHOD HasChildNodes(PRBool* aHasChildNodes); NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild); NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild); NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling); @@ -122,8 +123,8 @@ public: nsIDOMNode** aReturn); NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn); NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn); - NS_IMETHOD CloneNode(nsIDOMNode** aReturn); - NS_IMETHOD Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn); + NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn); + NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument); private: nsString mName; @@ -147,7 +148,7 @@ public: // nsIDOMNamedNodeMap interface NS_IMETHOD GetLength(PRUint32* aSize); NS_IMETHOD GetNamedItem(const nsString& aName, nsIDOMNode** aReturn); - NS_IMETHOD SetNamedItem(nsIDOMNode* aNode); + NS_IMETHOD SetNamedItem(nsIDOMNode* aNode, nsIDOMNode** aReturn); NS_IMETHOD RemoveNamedItem(const nsString& aName, nsIDOMNode** aReturn); NS_IMETHOD Item(PRUint32 aIndex, nsIDOMNode** aReturn); @@ -200,8 +201,8 @@ DOMAttribute::QueryInterface(REFNSIID aIID, void** aInstancePtr) if (NULL == aInstancePtr) { return NS_ERROR_NULL_POINTER; } - if (aIID.Equals(kIDOMAttributeIID)) { - nsIDOMAttribute* tmp = this; + if (aIID.Equals(kIDOMAttrIID)) { + nsIDOMAttr* tmp = this; *aInstancePtr = (void*)tmp; NS_ADDREF_THIS(); return NS_OK; @@ -213,7 +214,7 @@ DOMAttribute::QueryInterface(REFNSIID aIID, void** aInstancePtr) return NS_OK; } if (aIID.Equals(kISupportsIID)) { - nsIDOMAttribute* tmp1 = this; + nsIDOMAttr* tmp1 = this; nsISupports* tmp2 = tmp1; *aInstancePtr = (void*)tmp2; NS_ADDREF_THIS(); @@ -232,10 +233,10 @@ DOMAttribute::GetScriptObject(nsIScriptContext *aContext, { nsresult res = NS_OK; if (nsnull == mScriptObject) { - res = NS_NewScriptAttribute(aContext, - (nsISupports *)(nsIDOMAttribute *)this, - nsnull, - (void **)&mScriptObject); + res = NS_NewScriptAttr(aContext, + (nsISupports *)(nsIDOMAttr *)this, + nsnull, + (void **)&mScriptObject); } *aScriptObject = mScriptObject; return res; @@ -263,13 +264,14 @@ DOMAttribute::GetValue(nsString& aValue) } nsresult -DOMAttribute::GetSpecified(PRBool* aSpecified) +DOMAttribute::SetValue(const nsString& aValue) { - return NS_ERROR_NOT_IMPLEMENTED; + mValue = aValue; + return NS_OK; } nsresult -DOMAttribute::SetSpecified(PRBool specified) +DOMAttribute::GetSpecified(PRBool* aSpecified) { return NS_ERROR_NOT_IMPLEMENTED; } @@ -294,9 +296,9 @@ DOMAttribute::SetNodeValue(const nsString& aNodeValue) } NS_IMETHODIMP -DOMAttribute::GetNodeType(PRInt32* aNodeType) +DOMAttribute::GetNodeType(PRUint16* aNodeType) { - *aNodeType = (PRInt32)nsIDOMNode::ATTRIBUTE; + *aNodeType = (PRUint16)nsIDOMNode::ATTRIBUTE_NODE; return NS_OK; } @@ -315,7 +317,7 @@ DOMAttribute::GetChildNodes(nsIDOMNodeList** aChildNodes) } NS_IMETHODIMP -DOMAttribute::GetHasChildNodes(PRBool* aHasChildNodes) +DOMAttribute::HasChildNodes(PRBool* aHasChildNodes) { *aHasChildNodes = PR_FALSE; return NS_OK; @@ -381,7 +383,7 @@ DOMAttribute::AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn) } NS_IMETHODIMP -DOMAttribute::CloneNode(nsIDOMNode** aReturn) +DOMAttribute::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { DOMAttribute* newAttr = new DOMAttribute(mName, mValue); if (nsnull == newAttr) { @@ -392,8 +394,8 @@ DOMAttribute::CloneNode(nsIDOMNode** aReturn) return NS_OK; } -NS_IMETHODIMP -DOMAttribute::Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn) +NS_IMETHODIMP +DOMAttribute::GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { // XXX TBI return NS_OK; @@ -479,13 +481,13 @@ DOMAttributeMap::GetNamedItem(const nsString &aAttrName, } nsresult -DOMAttributeMap::SetNamedItem(nsIDOMNode *aNode) +DOMAttributeMap::SetNamedItem(nsIDOMNode *aNode, nsIDOMNode **aReturn) { - nsIDOMAttribute *attribute; + nsIDOMAttr *attribute; nsAutoString name, value; nsresult err; - if (NS_OK != (err = aNode->QueryInterface(kIDOMAttributeIID, + if (NS_OK != (err = aNode->QueryInterface(kIDOMAttrIID, (void **)&attribute))) { return err; } @@ -803,9 +805,9 @@ nsGenericHTMLElement::SetNodeValue(const nsString& aNodeValue) } nsresult -nsGenericHTMLElement::GetNodeType(PRInt32* aNodeType) +nsGenericHTMLElement::GetNodeType(PRUint16* aNodeType) { - *aNodeType = nsIDOMNode::ELEMENT; + *aNodeType = (PRUint16)nsIDOMNode::ELEMENT_NODE; return NS_OK; } @@ -865,6 +867,21 @@ nsGenericHTMLElement::GetNextSibling(nsIDOMNode** aNextSibling) return NS_OK; } +nsresult +nsGenericHTMLElement::GetOwnerDocument(nsIDOMDocument** aOwnerDocument) +{ + // XXX Actually the owner document is the document in whose context + // the element has been created. We should be able to get at it + // whether or not we are attached to the document. + if (nsnull != mDocument) { + return mDocument->QueryInterface(kIDOMDocumentIID, (void **)aOwnerDocument); + } + else { + *aOwnerDocument = nsnull; + return NS_OK; + } +} + nsresult nsGenericHTMLElement::GetAttributes(nsIDOMNamedNodeMap** aAttributes) { @@ -920,7 +937,7 @@ nsGenericHTMLElement::RemoveAttribute(const nsString& aName) nsresult nsGenericHTMLElement::GetAttributeNode(const nsString& aName, - nsIDOMAttribute** aReturn) + nsIDOMAttr** aReturn) { nsAutoString value; if (NS_CONTENT_ATTR_NOT_THERE != GetAttribute(aName, value)) { @@ -930,7 +947,8 @@ nsGenericHTMLElement::GetAttributeNode(const nsString& aName, } nsresult -nsGenericHTMLElement::SetAttributeNode(nsIDOMAttribute* aAttribute) +nsGenericHTMLElement::SetAttributeNode(nsIDOMAttr* aAttribute, + nsIDOMAttr** aReturn) { NS_PRECONDITION(nsnull != aAttribute, "null attribute"); @@ -950,7 +968,8 @@ nsGenericHTMLElement::SetAttributeNode(nsIDOMAttribute* aAttribute) } nsresult -nsGenericHTMLElement::RemoveAttributeNode(nsIDOMAttribute* aAttribute) +nsGenericHTMLElement::RemoveAttributeNode(nsIDOMAttr* aAttribute, + nsIDOMAttr** aReturn) { NS_PRECONDITION(nsnull != aAttribute, "null attribute"); @@ -2845,15 +2864,6 @@ nsGenericHTMLLeafElement::CopyInnerTo(nsIHTMLContent* aSrcContent, return NS_OK; } -nsresult -nsGenericHTMLLeafElement::Equals(nsIDOMNode* aNode, PRBool aDeep, - PRBool* aReturn) -{ - // XXX not yet implemented - *aReturn = PR_FALSE; - return NS_OK; -} - nsresult nsGenericHTMLLeafElement::GetChildNodes(nsIDOMNodeList** aChildNodes) { @@ -3060,15 +3070,6 @@ nsGenericHTMLContainerElement::CopyInnerTo(nsIHTMLContent* aSrcContent, return NS_OK; } -nsresult -nsGenericHTMLContainerElement::Equals(nsIDOMNode* aNode, PRBool aDeep, - PRBool* aReturn) -{ - // XXX not yet implemented - *aReturn = PR_FALSE; - return NS_OK; -} - nsresult nsGenericHTMLContainerElement::GetChildNodes(nsIDOMNodeList** aChildNodes) { @@ -3083,7 +3084,7 @@ nsGenericHTMLContainerElement::GetChildNodes(nsIDOMNodeList** aChildNodes) } nsresult -nsGenericHTMLContainerElement::GetHasChildNodes(PRBool* aReturn) +nsGenericHTMLContainerElement::HasChildNodes(PRBool* aReturn) { if (0 != mChildren.Count()) { *aReturn = PR_TRUE; diff --git a/mozilla/layout/html/content/src/nsGenericHTMLElement.h b/mozilla/layout/html/content/src/nsGenericHTMLElement.h index 25ff051aef0..ca3c3701f57 100644 --- a/mozilla/layout/html/content/src/nsGenericHTMLElement.h +++ b/mozilla/layout/html/content/src/nsGenericHTMLElement.h @@ -35,7 +35,7 @@ extern const nsIID kISupportsIID; extern const nsIID kIContentIID; extern const nsIID kIHTMLContentIID; -class nsIDOMAttribute; +class nsIDOMAttr; class nsIDOMEventListener; class nsIDOMNodeList; class nsIEventListenerManager; @@ -48,7 +48,7 @@ class nsISupportsArray; class nsIDOMScriptObjectFactory; class nsChildContentList; class nsDOMCSSDeclaration; - +class nsIDOMCSSStyleDeclaration; // There are a set of DOM- and scripting-specific instance variables // that may only be instantiated when a content object is accessed @@ -73,11 +73,12 @@ public: nsresult GetNodeName(nsString& aNodeName); nsresult GetNodeValue(nsString& aNodeValue); nsresult SetNodeValue(const nsString& aNodeValue); - nsresult GetNodeType(PRInt32* aNodeType); + nsresult GetNodeType(PRUint16* aNodeType); nsresult GetParentNode(nsIDOMNode** aParentNode); nsresult GetAttributes(nsIDOMNamedNodeMap** aAttributes); nsresult GetPreviousSibling(nsIDOMNode** aPreviousSibling); nsresult GetNextSibling(nsIDOMNode** aNextSibling); + nsresult GetOwnerDocument(nsIDOMDocument** aOwnerDocument); // Implementation for nsIDOMElement nsresult GetTagName(nsString& aTagName); @@ -85,9 +86,9 @@ public: nsresult SetDOMAttribute(const nsString& aName, const nsString& aValue); nsresult RemoveAttribute(const nsString& aName); nsresult GetAttributeNode(const nsString& aName, - nsIDOMAttribute** aReturn); - nsresult SetAttributeNode(nsIDOMAttribute* aNewAttr); - nsresult RemoveAttributeNode(nsIDOMAttribute* aOldAttr); + nsIDOMAttr** aReturn); + nsresult SetAttributeNode(nsIDOMAttr* aNewAttr, nsIDOMAttr** aReturn); + nsresult RemoveAttributeNode(nsIDOMAttr* aOldAttr, nsIDOMAttr** aReturn); nsresult GetElementsByTagName(const nsString& aTagname, nsIDOMNodeList** aReturn); nsresult Normalize(); @@ -338,9 +339,8 @@ public: nsGenericHTMLLeafElement* aDest); // Remainder of nsIDOMHTMLElement (and nsIDOMNode) - nsresult Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn); nsresult GetChildNodes(nsIDOMNodeList** aChildNodes); - nsresult GetHasChildNodes(PRBool* aHasChildNodes) { + nsresult HasChildNodes(PRBool* aHasChildNodes) { *aHasChildNodes = PR_FALSE; return NS_OK; } @@ -416,9 +416,8 @@ public: nsGenericHTMLContainerElement* aDest); // Remainder of nsIDOMHTMLElement (and nsIDOMNode) - nsresult Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn); nsresult GetChildNodes(nsIDOMNodeList** aChildNodes); - nsresult GetHasChildNodes(PRBool* aHasChildNodes); + nsresult HasChildNodes(PRBool* aHasChildNodes); nsresult GetFirstChild(nsIDOMNode** aFirstChild); nsresult GetLastChild(nsIDOMNode** aLastChild); nsresult InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, @@ -454,7 +453,7 @@ public: * nsGenericHTMLContainerContent) * * Note that classes using this macro will need to implement: - * NS_IMETHOD CloneNode(nsIDOMNode** aReturn); + * NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn); */ #define NS_IMPL_IDOMNODE_USING_GENERIC(_g) \ NS_IMETHOD GetNodeName(nsString& aNodeName) { \ @@ -466,7 +465,7 @@ public: NS_IMETHOD SetNodeValue(const nsString& aNodeValue) { \ return _g.SetNodeValue(aNodeValue); \ } \ - NS_IMETHOD GetNodeType(PRInt32* aNodeType) { \ + NS_IMETHOD GetNodeType(PRUint16* aNodeType) { \ return _g.GetNodeType(aNodeType); \ } \ NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode) { \ @@ -475,8 +474,8 @@ public: NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes) { \ return _g.GetChildNodes(aChildNodes); \ } \ - NS_IMETHOD GetHasChildNodes(PRBool* aHasChildNodes) { \ - return _g.GetHasChildNodes(aHasChildNodes); \ + NS_IMETHOD HasChildNodes(PRBool* aHasChildNodes) { \ + return _g.HasChildNodes(aHasChildNodes); \ } \ NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild) { \ return _g.GetFirstChild(aFirstChild); \ @@ -507,10 +506,10 @@ public: NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn) { \ return _g.RemoveChild(aOldChild, aReturn); \ } \ - NS_IMETHOD Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn) { \ - return _g.Equals(aNode, aDeep, aReturn); \ + NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { \ + return _g.GetOwnerDocument(aOwnerDocument); \ } \ - NS_IMETHOD CloneNode(nsIDOMNode** aReturn); + NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn); /** * Implement the nsIDOMElement API by forwarding the methods to a @@ -531,14 +530,14 @@ public: return _g.RemoveAttribute(aName); \ } \ NS_IMETHOD GetAttributeNode(const nsString& aName, \ - nsIDOMAttribute** aReturn) { \ + nsIDOMAttr** aReturn) { \ return _g.GetAttributeNode(aName, aReturn); \ } \ - NS_IMETHOD SetAttributeNode(nsIDOMAttribute* aNewAttr) { \ - return _g.SetAttributeNode(aNewAttr); \ + NS_IMETHOD SetAttributeNode(nsIDOMAttr* aNewAttr, nsIDOMAttr** aReturn) { \ + return _g.SetAttributeNode(aNewAttr, aReturn); \ } \ - NS_IMETHOD RemoveAttributeNode(nsIDOMAttribute* aOldAttr) { \ - return _g.RemoveAttributeNode(aOldAttr); \ + NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* aOldAttr, nsIDOMAttr** aReturn) {\ + return _g.RemoveAttributeNode(aOldAttr, aReturn); \ } \ NS_IMETHOD GetElementsByTagName(const nsString& aTagname, \ nsIDOMNodeList** aReturn) { \ diff --git a/mozilla/layout/html/content/src/nsHTMLAnchorElement.cpp b/mozilla/layout/html/content/src/nsHTMLAnchorElement.cpp index 37d1530d36d..046fe5aa86f 100644 --- a/mozilla/layout/html/content/src/nsHTMLAnchorElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLAnchorElement.cpp @@ -144,7 +144,7 @@ nsHTMLAnchorElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLAnchorElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLAnchorElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLAnchorElement* it = new nsHTMLAnchorElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLAppletElement.cpp b/mozilla/layout/html/content/src/nsHTMLAppletElement.cpp index f0d7a78b653..cb68c258f9e 100644 --- a/mozilla/layout/html/content/src/nsHTMLAppletElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLAppletElement.cpp @@ -132,7 +132,7 @@ nsHTMLAppletElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLAppletElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLAppletElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLAppletElement* it = new nsHTMLAppletElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLAreaElement.cpp b/mozilla/layout/html/content/src/nsHTMLAreaElement.cpp index 38aac68dff2..da011020b78 100644 --- a/mozilla/layout/html/content/src/nsHTMLAreaElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLAreaElement.cpp @@ -126,7 +126,7 @@ nsHTMLAreaElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLAreaElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLAreaElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLAreaElement* it = new nsHTMLAreaElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLBRElement.cpp b/mozilla/layout/html/content/src/nsHTMLBRElement.cpp index 5ef3df38fd5..25da1f70d24 100644 --- a/mozilla/layout/html/content/src/nsHTMLBRElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLBRElement.cpp @@ -113,7 +113,7 @@ nsHTMLBRElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLBRElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLBRElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLBRElement* it = new nsHTMLBRElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLBaseElement.cpp b/mozilla/layout/html/content/src/nsHTMLBaseElement.cpp index fa0b9686e69..4d4e86d125e 100644 --- a/mozilla/layout/html/content/src/nsHTMLBaseElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLBaseElement.cpp @@ -114,7 +114,7 @@ nsHTMLBaseElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLBaseElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLBaseElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLBaseElement* it = new nsHTMLBaseElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLBaseFontElement.cpp b/mozilla/layout/html/content/src/nsHTMLBaseFontElement.cpp index 6dccb6523f6..fb7dc37f918 100644 --- a/mozilla/layout/html/content/src/nsHTMLBaseFontElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLBaseFontElement.cpp @@ -116,7 +116,7 @@ nsHTMLBaseFontElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLBaseFontElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLBaseFontElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLBaseFontElement* it = new nsHTMLBaseFontElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLBodyElement.cpp b/mozilla/layout/html/content/src/nsHTMLBodyElement.cpp index 5ba9fa96614..54839c4527e 100644 --- a/mozilla/layout/html/content/src/nsHTMLBodyElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLBodyElement.cpp @@ -274,7 +274,7 @@ nsHTMLBodyElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLBodyElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLBodyElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLBodyElement* it = new nsHTMLBodyElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLButtonElement.cpp b/mozilla/layout/html/content/src/nsHTMLButtonElement.cpp index 1b52ac7531c..d5822c7f2c9 100644 --- a/mozilla/layout/html/content/src/nsHTMLButtonElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLButtonElement.cpp @@ -59,7 +59,6 @@ public: // nsIDOMHTMLButtonElement NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetAccessKey(nsString& aAccessKey); NS_IMETHOD SetAccessKey(const nsString& aAccessKey); NS_IMETHOD GetDisabled(PRBool* aDisabled); @@ -69,7 +68,6 @@ public: NS_IMETHOD GetTabIndex(PRInt32* aTabIndex); NS_IMETHOD SetTabIndex(PRInt32 aTabIndex); NS_IMETHOD GetType(nsString& aType); - NS_IMETHOD SetType(const nsString& aType); NS_IMETHOD GetValue(nsString& aValue); NS_IMETHOD SetValue(const nsString& aValue); @@ -86,6 +84,7 @@ public: NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner) // nsIFormControl + NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetType(PRInt32* aType); NS_IMETHOD SetWidget(nsIWidget* aWidget) { return NS_OK; }; NS_IMETHOD Init() { return NS_OK; } @@ -179,7 +178,7 @@ nsHTMLButtonElement::Release() // nsIDOMHTMLButtonElement nsresult -nsHTMLButtonElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLButtonElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLButtonElement* it = new nsHTMLButtonElement(mInner.mTag); if (nsnull == it) { @@ -189,30 +188,6 @@ nsHTMLButtonElement::CloneNode(nsIDOMNode** aReturn) return it->QueryInterface(kIDOMNodeIID, (void**) aReturn); } -// An important assumption is that if aForm is null, the previous mForm will not be released -// This allows nsHTMLFormElement to deal with circular references. -NS_IMETHODIMP -nsHTMLButtonElement::SetForm(nsIDOMHTMLFormElement* aForm) -{ - nsresult result = NS_OK; - if (nsnull == aForm) { - mForm = nsnull; - return NS_OK; - } else { - NS_IF_RELEASE(mForm); - nsIFormControl* formControl = nsnull; - result = QueryInterface(kIFormControlIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - result = aForm->QueryInterface(kIFormIID, (void**)&mForm); // keep the ref - if ((NS_OK == result) && mForm) { - mForm->AddElement(formControl); - } - NS_RELEASE(formControl); - } - } - return result; -} - NS_IMETHODIMP nsHTMLButtonElement::GetForm(nsIDOMHTMLFormElement** aForm) { @@ -227,11 +202,16 @@ nsHTMLButtonElement::GetForm(nsIDOMHTMLFormElement** aForm) } return result; } +NS_IMETHODIMP +nsHTMLButtonElement::GetType(nsString& aType) +{ + aType.SetString("button"); + return NS_OK; +} NS_IMPL_STRING_ATTR(nsHTMLButtonElement, AccessKey, accesskey, eSetAttrNotify_None) NS_IMPL_BOOL_ATTR(nsHTMLButtonElement, Disabled, disabled, eSetAttrNotify_Render) NS_IMPL_STRING_ATTR(nsHTMLButtonElement, Name, name, eSetAttrNotify_Restart) -NS_IMPL_STRING_ATTR(nsHTMLButtonElement, Type, type, eSetAttrNotify_Restart) NS_IMPL_INT_ATTR(nsHTMLButtonElement, TabIndex, tabindex, eSetAttrNotify_None) NS_IMPL_STRING_ATTR(nsHTMLButtonElement, Value, value, eSetAttrNotify_Render) @@ -399,3 +379,27 @@ nsHTMLButtonElement::GetType(PRInt32* aType) return NS_FORM_NOTOK; } } + +// An important assumption is that if aForm is null, the previous mForm will not be released +// This allows nsHTMLFormElement to deal with circular references. +NS_IMETHODIMP +nsHTMLButtonElement::SetForm(nsIDOMHTMLFormElement* aForm) +{ + nsresult result = NS_OK; + if (nsnull == aForm) { + mForm = nsnull; + return NS_OK; + } else { + NS_IF_RELEASE(mForm); + nsIFormControl* formControl = nsnull; + result = QueryInterface(kIFormControlIID, (void**)&formControl); + if ((NS_OK == result) && formControl) { + result = aForm->QueryInterface(kIFormIID, (void**)&mForm); // keep the ref + if ((NS_OK == result) && mForm) { + mForm->AddElement(formControl); + } + NS_RELEASE(formControl); + } + } + return result; +} diff --git a/mozilla/layout/html/content/src/nsHTMLDListElement.cpp b/mozilla/layout/html/content/src/nsHTMLDListElement.cpp index f92025a20c3..f742474109e 100644 --- a/mozilla/layout/html/content/src/nsHTMLDListElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLDListElement.cpp @@ -113,7 +113,7 @@ nsHTMLDListElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLDListElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLDListElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLDListElement* it = new nsHTMLDListElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLDelElement.cpp b/mozilla/layout/html/content/src/nsHTMLDelElement.cpp index e220083bdff..8e8566b4002 100644 --- a/mozilla/layout/html/content/src/nsHTMLDelElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLDelElement.cpp @@ -16,7 +16,7 @@ * Corporation. Portions created by Netscape are Copyright (C) 1998 * Netscape Communications Corporation. All Rights Reserved. */ -#include "nsIDOMHTMLDelElement.h" +#include "nsIDOMHTMLModElement.h" #include "nsIScriptObjectOwner.h" #include "nsIDOMEventReceiver.h" #include "nsIHTMLContent.h" @@ -27,9 +27,9 @@ #include "nsStyleConsts.h" #include "nsIPresContext.h" -static NS_DEFINE_IID(kIDOMHTMLDelElementIID, NS_IDOMHTMLDELELEMENT_IID); +static NS_DEFINE_IID(kIDOMHTMLModElementIID, NS_IDOMHTMLMODELEMENT_IID); -class nsHTMLDelElement : public nsIDOMHTMLDelElement, +class nsHTMLDelElement : public nsIDOMHTMLModElement, public nsIScriptObjectOwner, public nsIDOMEventReceiver, public nsIHTMLContent @@ -50,7 +50,7 @@ public: // nsIDOMHTMLElement NS_IMPL_IDOMHTMLELEMENT_USING_GENERIC(mInner) - // nsIDOMHTMLDelElement + // nsIDOMHTMLModElement NS_IMETHOD GetCite(nsString& aCite); NS_IMETHOD SetCite(const nsString& aCite); NS_IMETHOD GetDateTime(nsString& aDateTime); @@ -104,8 +104,8 @@ nsresult nsHTMLDelElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) { NS_IMPL_HTML_CONTENT_QUERY_INTERFACE(aIID, aInstancePtr, this) - if (aIID.Equals(kIDOMHTMLDelElementIID)) { - nsIDOMHTMLDelElement* tmp = this; + if (aIID.Equals(kIDOMHTMLModElementIID)) { + nsIDOMHTMLModElement* tmp = this; *aInstancePtr = (void*) tmp; mRefCnt++; return NS_OK; @@ -114,7 +114,7 @@ nsHTMLDelElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLDelElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLDelElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLDelElement* it = new nsHTMLDelElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLDirectoryElement.cpp b/mozilla/layout/html/content/src/nsHTMLDirectoryElement.cpp index 96b9bb94731..36d64cbbe45 100644 --- a/mozilla/layout/html/content/src/nsHTMLDirectoryElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLDirectoryElement.cpp @@ -117,7 +117,7 @@ nsHTMLDirectoryElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLDirectoryElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLDirectoryElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLDirectoryElement* it = new nsHTMLDirectoryElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLDivElement.cpp b/mozilla/layout/html/content/src/nsHTMLDivElement.cpp index 8c5f3c2114d..2f468078d83 100644 --- a/mozilla/layout/html/content/src/nsHTMLDivElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLDivElement.cpp @@ -115,7 +115,7 @@ nsHTMLDivElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLDivElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLDivElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLDivElement* it = new nsHTMLDivElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLEmbedElement.cpp b/mozilla/layout/html/content/src/nsHTMLEmbedElement.cpp index 8c7d2fbbe0f..3ad2f3319e9 100644 --- a/mozilla/layout/html/content/src/nsHTMLEmbedElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLEmbedElement.cpp @@ -114,7 +114,7 @@ nsHTMLEmbedElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLEmbedElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLEmbedElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLEmbedElement* it = new nsHTMLEmbedElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLFieldSetElement.cpp b/mozilla/layout/html/content/src/nsHTMLFieldSetElement.cpp index 4961456550f..b7ba9507699 100644 --- a/mozilla/layout/html/content/src/nsHTMLFieldSetElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLFieldSetElement.cpp @@ -155,7 +155,7 @@ nsHTMLFieldSetElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) // nsIDOMHTMLFieldSetElement nsresult -nsHTMLFieldSetElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLFieldSetElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLFieldSetElement* it = new nsHTMLFieldSetElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLFontElement.cpp b/mozilla/layout/html/content/src/nsHTMLFontElement.cpp index 9bbbdbd519e..b03104efc6d 100644 --- a/mozilla/layout/html/content/src/nsHTMLFontElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLFontElement.cpp @@ -119,7 +119,7 @@ nsHTMLFontElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLFontElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLFontElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLFontElement* it = new nsHTMLFontElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLFormElement.cpp b/mozilla/layout/html/content/src/nsHTMLFormElement.cpp index 565a0de3b04..9c8b9a0e0e6 100644 --- a/mozilla/layout/html/content/src/nsHTMLFormElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLFormElement.cpp @@ -71,6 +71,7 @@ public: // nsIDOMHTMLFormElement NS_IMETHOD GetElements(nsIDOMHTMLCollection** aElements); NS_IMETHOD GetName(nsString& aName); + NS_IMETHOD SetName(const nsString& aName); NS_IMETHOD GetAcceptCharset(nsString& aAcceptCharset); NS_IMETHOD SetAcceptCharset(const nsString& aAcceptCharset); NS_IMETHOD GetAction(nsString& aAction); @@ -81,12 +82,12 @@ public: NS_IMETHOD SetMethod(const nsString& aMethod); NS_IMETHOD GetTarget(nsString& aTarget); NS_IMETHOD SetTarget(const nsString& aTarget); + NS_IMETHOD GetLength(PRUint32* aLength); NS_IMETHOD Reset(); NS_IMETHOD Submit(); // nsIDOMNSHTMLFormElement NS_IMETHOD GetEncoding(nsString& aEncoding); - NS_IMETHOD GetLength(PRUint32* aLength); NS_IMETHOD NamedItem(const nsString& aName, nsIDOMElement** aReturn); // nsIScriptObjectOwner @@ -233,7 +234,7 @@ nsTraceRefcnt::Release((nsIForm*)this, mRefCnt-1, __FILE__, __LINE__); // nsIDOMHTMLFormElement nsresult -nsHTMLFormElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLFormElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLFormElement* it = new nsHTMLFormElement(mInner.mTag); if (nsnull == it) { @@ -257,6 +258,12 @@ nsHTMLFormElement::GetName(nsString& aValue) return mInner.GetAttribute(nsHTMLAtoms::name, aValue); } +NS_IMETHODIMP +nsHTMLFormElement::SetName(const nsString& aValue) +{ + return mInner.SetAttribute(nsHTMLAtoms::name, aValue, PR_TRUE); +} + NS_IMPL_STRING_ATTR(nsHTMLFormElement, AcceptCharset, acceptcharset, eSetAttrNotify_None) NS_IMPL_STRING_ATTR(nsHTMLFormElement, Action, action, eSetAttrNotify_None) NS_IMPL_STRING_ATTR(nsHTMLFormElement, Enctype, enctype, eSetAttrNotify_None) diff --git a/mozilla/layout/html/content/src/nsHTMLFrameElement.cpp b/mozilla/layout/html/content/src/nsHTMLFrameElement.cpp index 4c4204a34c1..61c25b9acc4 100644 --- a/mozilla/layout/html/content/src/nsHTMLFrameElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLFrameElement.cpp @@ -126,7 +126,7 @@ nsHTMLFrameElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLFrameElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLFrameElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLFrameElement* it = new nsHTMLFrameElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLFrameSetElement.cpp b/mozilla/layout/html/content/src/nsHTMLFrameSetElement.cpp index d5c65ee5a86..2716332470e 100644 --- a/mozilla/layout/html/content/src/nsHTMLFrameSetElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLFrameSetElement.cpp @@ -114,7 +114,7 @@ nsHTMLFrameSetElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLFrameSetElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLFrameSetElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLFrameSetElement* it = new nsHTMLFrameSetElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLHRElement.cpp b/mozilla/layout/html/content/src/nsHTMLHRElement.cpp index 54fa2ba0616..e5d413f5e5f 100644 --- a/mozilla/layout/html/content/src/nsHTMLHRElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLHRElement.cpp @@ -119,7 +119,7 @@ nsHTMLHRElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLHRElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLHRElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLHRElement* it = new nsHTMLHRElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLHeadElement.cpp b/mozilla/layout/html/content/src/nsHTMLHeadElement.cpp index a037a38f546..e959c35f940 100644 --- a/mozilla/layout/html/content/src/nsHTMLHeadElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLHeadElement.cpp @@ -112,7 +112,7 @@ nsHTMLHeadElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLHeadElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLHeadElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLHeadElement* it = new nsHTMLHeadElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLHeadingElement.cpp b/mozilla/layout/html/content/src/nsHTMLHeadingElement.cpp index 5b8ba7c43c0..3bc105bd8de 100644 --- a/mozilla/layout/html/content/src/nsHTMLHeadingElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLHeadingElement.cpp @@ -113,7 +113,7 @@ nsHTMLHeadingElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLHeadingElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLHeadingElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLHeadingElement* it = new nsHTMLHeadingElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLHtmlElement.cpp b/mozilla/layout/html/content/src/nsHTMLHtmlElement.cpp index 2991431cf68..169f1bd18fe 100644 --- a/mozilla/layout/html/content/src/nsHTMLHtmlElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLHtmlElement.cpp @@ -116,7 +116,7 @@ nsHTMLHtmlElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLHtmlElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLHtmlElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLHtmlElement* it; NS_NEWXPCOM(it, nsHTMLHtmlElement); diff --git a/mozilla/layout/html/content/src/nsHTMLIFrameElement.cpp b/mozilla/layout/html/content/src/nsHTMLIFrameElement.cpp index b06b3874608..ae6fa214282 100644 --- a/mozilla/layout/html/content/src/nsHTMLIFrameElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLIFrameElement.cpp @@ -138,7 +138,7 @@ nsHTMLIFrameElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLIFrameElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLIFrameElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLIFrameElement* it = new nsHTMLIFrameElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLImageElement.cpp b/mozilla/layout/html/content/src/nsHTMLImageElement.cpp index 7279e11edcc..c3f82650034 100644 --- a/mozilla/layout/html/content/src/nsHTMLImageElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLImageElement.cpp @@ -157,7 +157,7 @@ nsHTMLImageElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLImageElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLImageElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLImageElement* it = new nsHTMLImageElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLInputElement.cpp b/mozilla/layout/html/content/src/nsHTMLInputElement.cpp index 861b9ac089d..f0d6b6cb78e 100644 --- a/mozilla/layout/html/content/src/nsHTMLInputElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLInputElement.cpp @@ -213,7 +213,7 @@ nsHTMLInputElement::Release() // nsIDOMHTMLInputElement nsresult -nsHTMLInputElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLInputElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLInputElement* it = new nsHTMLInputElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLInsElement.cpp b/mozilla/layout/html/content/src/nsHTMLInsElement.cpp index d5146328430..72fe0333c89 100644 --- a/mozilla/layout/html/content/src/nsHTMLInsElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLInsElement.cpp @@ -16,7 +16,7 @@ * Corporation. Portions created by Netscape are Copyright (C) 1998 * Netscape Communications Corporation. All Rights Reserved. */ -#include "nsIDOMHTMLInsElement.h" +#include "nsIDOMHTMLModElement.h" #include "nsIScriptObjectOwner.h" #include "nsIDOMEventReceiver.h" #include "nsIHTMLContent.h" @@ -27,9 +27,9 @@ #include "nsStyleConsts.h" #include "nsIPresContext.h" -static NS_DEFINE_IID(kIDOMHTMLInsElementIID, NS_IDOMHTMLINSELEMENT_IID); +static NS_DEFINE_IID(kIDOMHTMLModElementIID, NS_IDOMHTMLMODELEMENT_IID); -class nsHTMLInsElement : public nsIDOMHTMLInsElement, +class nsHTMLInsElement : public nsIDOMHTMLModElement, public nsIScriptObjectOwner, public nsIDOMEventReceiver, public nsIHTMLContent @@ -50,7 +50,7 @@ public: // nsIDOMHTMLElement NS_IMPL_IDOMHTMLELEMENT_USING_GENERIC(mInner) - // nsIDOMHTMLInsElement + // nsIDOMHTMLModElement NS_IMETHOD GetCite(nsString& aCite); NS_IMETHOD SetCite(const nsString& aCite); NS_IMETHOD GetDateTime(nsString& aDateTime); @@ -104,8 +104,8 @@ nsresult nsHTMLInsElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) { NS_IMPL_HTML_CONTENT_QUERY_INTERFACE(aIID, aInstancePtr, this) - if (aIID.Equals(kIDOMHTMLInsElementIID)) { - nsIDOMHTMLInsElement* tmp = this; + if (aIID.Equals(kIDOMHTMLModElementIID)) { + nsIDOMHTMLModElement* tmp = this; *aInstancePtr = (void*) tmp; mRefCnt++; return NS_OK; @@ -114,7 +114,7 @@ nsHTMLInsElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLInsElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLInsElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLInsElement* it = new nsHTMLInsElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLIsIndexElement.cpp b/mozilla/layout/html/content/src/nsHTMLIsIndexElement.cpp index 60f60e2934a..06e424dbf7d 100644 --- a/mozilla/layout/html/content/src/nsHTMLIsIndexElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLIsIndexElement.cpp @@ -52,7 +52,6 @@ public: // nsIDOMHTMLIsIndexElement NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetPrompt(nsString& aPrompt); NS_IMETHOD SetPrompt(const nsString& aPrompt); @@ -114,7 +113,7 @@ nsHTMLIsIndexElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLIsIndexElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLIsIndexElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLIsIndexElement* it = new nsHTMLIsIndexElement(mInner.mTag); if (nsnull == it) { @@ -131,11 +130,6 @@ nsHTMLIsIndexElement::GetForm(nsIDOMHTMLFormElement** aForm) return NS_OK; } -NS_IMETHODIMP -nsHTMLIsIndexElement::SetForm(nsIDOMHTMLFormElement* aForm) -{ - return NS_OK; -} NS_IMPL_STRING_ATTR(nsHTMLIsIndexElement, Prompt, prompt, eSetAttrNotify_Restart) diff --git a/mozilla/layout/html/content/src/nsHTMLLIElement.cpp b/mozilla/layout/html/content/src/nsHTMLLIElement.cpp index dbb9cc98f50..16c5555cb89 100644 --- a/mozilla/layout/html/content/src/nsHTMLLIElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLLIElement.cpp @@ -115,7 +115,7 @@ nsHTMLLIElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLLIElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLLIElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLLIElement* it = new nsHTMLLIElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLLabelElement.cpp b/mozilla/layout/html/content/src/nsHTMLLabelElement.cpp index bee260dd58d..ac8a11f181f 100644 --- a/mozilla/layout/html/content/src/nsHTMLLabelElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLLabelElement.cpp @@ -52,7 +52,6 @@ public: // nsIDOMHTMLLabelElement NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetAccessKey(nsString& aAccessKey); NS_IMETHOD SetAccessKey(const nsString& aAccessKey); NS_IMETHOD GetHtmlFor(nsString& aHtmlFor); @@ -116,7 +115,7 @@ nsHTMLLabelElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLLabelElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLLabelElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLLabelElement* it = new nsHTMLLabelElement(mInner.mTag); if (nsnull == it) { @@ -133,12 +132,6 @@ nsHTMLLabelElement::GetForm(nsIDOMHTMLFormElement** aForm) return NS_OK; } -NS_IMETHODIMP -nsHTMLLabelElement::SetForm(nsIDOMHTMLFormElement* aForm) -{ - return NS_OK; -} - NS_IMPL_STRING_ATTR(nsHTMLLabelElement, AccessKey, accesskey, eSetAttrNotify_None) NS_IMPL_STRING_ATTR(nsHTMLLabelElement, HtmlFor, _for, eSetAttrNotify_None) diff --git a/mozilla/layout/html/content/src/nsHTMLLayerElement.cpp b/mozilla/layout/html/content/src/nsHTMLLayerElement.cpp index 9db107a28db..d949532f25c 100644 --- a/mozilla/layout/html/content/src/nsHTMLLayerElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLLayerElement.cpp @@ -115,7 +115,7 @@ nsHTMLLayerElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLLayerElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLLayerElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLLayerElement* it = new nsHTMLLayerElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLLegendElement.cpp b/mozilla/layout/html/content/src/nsHTMLLegendElement.cpp index 214782368f1..bcb6ef88b22 100644 --- a/mozilla/layout/html/content/src/nsHTMLLegendElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLLegendElement.cpp @@ -56,7 +56,6 @@ public: // nsIDOMHTMLLegendElement NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetAccessKey(nsString& aAccessKey); NS_IMETHOD SetAccessKey(const nsString& aAccessKey); NS_IMETHOD GetAlign(nsString& aAlign); @@ -125,7 +124,7 @@ nsHTMLLegendElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLLegendElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLLegendElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLLegendElement* it = new nsHTMLLegendElement(mInner.mTag); if (nsnull == it) { @@ -150,18 +149,6 @@ nsHTMLLegendElement::GetForm(nsIDOMHTMLFormElement** aForm) return result; } -NS_IMETHODIMP -nsHTMLLegendElement::SetForm(nsIDOMHTMLFormElement* aForm) -{ - if (nsnull == aForm) { - mForm = nsnull; - return NS_OK; - } else { - NS_IF_RELEASE(mForm); - return aForm->QueryInterface(kIFormIID, (void**)&mForm); - } -} - NS_IMPL_STRING_ATTR(nsHTMLLegendElement, AccessKey, accesskey, eSetAttrNotify_None) NS_IMPL_STRING_ATTR(nsHTMLLegendElement, Align, align, eSetAttrNotify_Reflow) diff --git a/mozilla/layout/html/content/src/nsHTMLLinkElement.cpp b/mozilla/layout/html/content/src/nsHTMLLinkElement.cpp index f375035dca2..c5c30fe55d6 100644 --- a/mozilla/layout/html/content/src/nsHTMLLinkElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLLinkElement.cpp @@ -128,7 +128,7 @@ nsHTMLLinkElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLLinkElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLLinkElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLLinkElement* it = new nsHTMLLinkElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLMapElement.cpp b/mozilla/layout/html/content/src/nsHTMLMapElement.cpp index 8368a571dba..29f6cc641ca 100644 --- a/mozilla/layout/html/content/src/nsHTMLMapElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLMapElement.cpp @@ -52,7 +52,6 @@ public: // nsIDOMHTMLMapElement NS_IMETHOD GetAreas(nsIDOMHTMLCollection** aAreas); - NS_IMETHOD SetAreas(nsIDOMHTMLCollection* aAreas); NS_IMETHOD GetName(nsString& aName); NS_IMETHOD SetName(const nsString& aName); @@ -114,7 +113,7 @@ nsHTMLMapElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLMapElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLMapElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLMapElement* it = new nsHTMLMapElement(mInner.mTag); if (nsnull == it) { @@ -131,12 +130,6 @@ nsHTMLMapElement::GetAreas(nsIDOMHTMLCollection** aAreas) return NS_ERROR_OUT_OF_MEMORY;/* XXX */ } -NS_IMETHODIMP -nsHTMLMapElement::SetAreas(nsIDOMHTMLCollection* aAreas) -{ - // XXX write me - return NS_OK; -} NS_IMPL_STRING_ATTR(nsHTMLMapElement, Name, name, eSetAttrNotify_Restart) diff --git a/mozilla/layout/html/content/src/nsHTMLMenuElement.cpp b/mozilla/layout/html/content/src/nsHTMLMenuElement.cpp index 176296ea26e..95c0589049a 100644 --- a/mozilla/layout/html/content/src/nsHTMLMenuElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLMenuElement.cpp @@ -117,7 +117,7 @@ nsHTMLMenuElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLMenuElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLMenuElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLMenuElement* it = new nsHTMLMenuElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLMetaElement.cpp b/mozilla/layout/html/content/src/nsHTMLMetaElement.cpp index faad4dd533e..7ee2ceb0907 100644 --- a/mozilla/layout/html/content/src/nsHTMLMetaElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLMetaElement.cpp @@ -118,7 +118,7 @@ nsHTMLMetaElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLMetaElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLMetaElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLMetaElement* it = new nsHTMLMetaElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLModElement.cpp b/mozilla/layout/html/content/src/nsHTMLModElement.cpp index f044ae1bf7b..22bb0f9815c 100644 --- a/mozilla/layout/html/content/src/nsHTMLModElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLModElement.cpp @@ -114,7 +114,7 @@ nsHTMLModElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLModElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLModElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLModElement* it = new nsHTMLModElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLOListElement.cpp b/mozilla/layout/html/content/src/nsHTMLOListElement.cpp index 8e9a656072a..722999e0597 100644 --- a/mozilla/layout/html/content/src/nsHTMLOListElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLOListElement.cpp @@ -117,7 +117,7 @@ nsHTMLOListElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLOListElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLOListElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLOListElement* it = new nsHTMLOListElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLObjectElement.cpp b/mozilla/layout/html/content/src/nsHTMLObjectElement.cpp index 813345d747b..c7c0b65e475 100644 --- a/mozilla/layout/html/content/src/nsHTMLObjectElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLObjectElement.cpp @@ -52,7 +52,6 @@ public: // nsIDOMHTMLObjectElement NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetCode(nsString& aCode); NS_IMETHOD SetCode(const nsString& aCode); NS_IMETHOD GetAlign(nsString& aAlign); @@ -146,7 +145,7 @@ nsHTMLObjectElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLObjectElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLObjectElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLObjectElement* it = new nsHTMLObjectElement(mInner.mTag); if (nsnull == it) { @@ -163,12 +162,6 @@ nsHTMLObjectElement::GetForm(nsIDOMHTMLFormElement** aForm) return NS_OK; } -NS_IMETHODIMP -nsHTMLObjectElement::SetForm(nsIDOMHTMLFormElement* aForm) -{ - return NS_OK; -} - NS_IMPL_STRING_ATTR(nsHTMLObjectElement, Code, code, eSetAttrNotify_Restart) NS_IMPL_STRING_ATTR(nsHTMLObjectElement, Align, align, eSetAttrNotify_Reflow) NS_IMPL_STRING_ATTR(nsHTMLObjectElement, Archive, archive, eSetAttrNotify_Restart) diff --git a/mozilla/layout/html/content/src/nsHTMLOptGroupElement.cpp b/mozilla/layout/html/content/src/nsHTMLOptGroupElement.cpp index bd59dd73eaa..7f6476b6224 100644 --- a/mozilla/layout/html/content/src/nsHTMLOptGroupElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLOptGroupElement.cpp @@ -114,7 +114,7 @@ nsHTMLOptGroupElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLOptGroupElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLOptGroupElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLOptGroupElement* it = new nsHTMLOptGroupElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLOptionElement.cpp b/mozilla/layout/html/content/src/nsHTMLOptionElement.cpp index f22eca07a04..4b3c38efe50 100644 --- a/mozilla/layout/html/content/src/nsHTMLOptionElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLOptionElement.cpp @@ -61,11 +61,9 @@ public: // nsIDOMHTMLOptionElement NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetDefaultSelected(PRBool* aDefaultSelected); NS_IMETHOD SetDefaultSelected(PRBool aDefaultSelected); NS_IMETHOD GetText(nsString& aText); - NS_IMETHOD SetText(const nsString& aText); NS_IMETHOD GetIndex(PRInt32* aIndex); NS_IMETHOD SetIndex(PRInt32 aIndex); NS_IMETHOD GetDisabled(PRBool* aDisabled); @@ -73,7 +71,6 @@ public: NS_IMETHOD GetLabel(nsString& aLabel); NS_IMETHOD SetLabel(const nsString& aLabel); NS_IMETHOD GetSelected(PRBool* aSelected); - NS_IMETHOD SetSelected(PRBool aSelected); NS_IMETHOD GetValue(nsString& aValue); NS_IMETHOD SetValue(const nsString& aValue); @@ -158,7 +155,7 @@ nsHTMLOptionElement::Release() } nsresult -nsHTMLOptionElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLOptionElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLOptionElement* it = new nsHTMLOptionElement(mInner.mTag); if (nsnull == it) { @@ -184,22 +181,18 @@ nsHTMLOptionElement::GetForm(nsIDOMHTMLFormElement** aForm) } NS_IMETHODIMP -nsHTMLOptionElement::SetForm(nsIDOMHTMLFormElement* aForm) +nsHTMLOptionElement::GetSelected(PRBool *aSelected) { - if (nsnull == aForm) { - mForm = nsnull; - return NS_OK; - } else { - NS_IF_RELEASE(mForm); - return aForm->QueryInterface(kIFormIID, (void**)&mForm); - } + nsHTMLValue val; + nsresult rv = mInner.GetAttribute(nsHTMLAtoms::selected, val); + *aSelected = NS_CONTENT_ATTR_NOT_THERE != rv; + return NS_OK; } NS_IMPL_BOOL_ATTR(nsHTMLOptionElement, DefaultSelected, defaultselected, eSetAttrNotify_None) NS_IMPL_INT_ATTR(nsHTMLOptionElement, Index, index, eSetAttrNotify_None) NS_IMPL_BOOL_ATTR(nsHTMLOptionElement, Disabled, disabled, eSetAttrNotify_Render) NS_IMPL_STRING_ATTR(nsHTMLOptionElement, Label, label, eSetAttrNotify_Render) -NS_IMPL_BOOL_ATTR(nsHTMLOptionElement, Selected, selected, eSetAttrNotify_Render) NS_IMPL_STRING_ATTR(nsHTMLOptionElement, Value, value, eSetAttrNotify_Render) NS_IMETHODIMP @@ -272,9 +265,3 @@ nsHTMLOptionElement::GetText(nsString& aText) return result; } -NS_IMETHODIMP -nsHTMLOptionElement::SetText(const nsString& aText) -{ - // XXX write me - return NS_OK; -} diff --git a/mozilla/layout/html/content/src/nsHTMLParagraphElement.cpp b/mozilla/layout/html/content/src/nsHTMLParagraphElement.cpp index f3acc6293ee..fdb768963d5 100644 --- a/mozilla/layout/html/content/src/nsHTMLParagraphElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLParagraphElement.cpp @@ -118,7 +118,7 @@ nsHTMLParagraphElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLParagraphElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLParagraphElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLParagraphElement* it; NS_NEWXPCOM(it, nsHTMLParagraphElement); diff --git a/mozilla/layout/html/content/src/nsHTMLParamElement.cpp b/mozilla/layout/html/content/src/nsHTMLParamElement.cpp index c09e7f28a73..2aa1d56b120 100644 --- a/mozilla/layout/html/content/src/nsHTMLParamElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLParamElement.cpp @@ -118,7 +118,7 @@ nsHTMLParamElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLParamElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLParamElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLParamElement* it = new nsHTMLParamElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLPreElement.cpp b/mozilla/layout/html/content/src/nsHTMLPreElement.cpp index 7a3e590469c..c1513e98720 100644 --- a/mozilla/layout/html/content/src/nsHTMLPreElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLPreElement.cpp @@ -115,7 +115,7 @@ nsHTMLPreElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLPreElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLPreElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLPreElement* it = new nsHTMLPreElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLQuoteElement.cpp b/mozilla/layout/html/content/src/nsHTMLQuoteElement.cpp index 265f77b28cb..d2249f00659 100644 --- a/mozilla/layout/html/content/src/nsHTMLQuoteElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLQuoteElement.cpp @@ -112,7 +112,7 @@ nsHTMLQuoteElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLQuoteElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLQuoteElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLQuoteElement* it = new nsHTMLQuoteElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLScriptElement.cpp b/mozilla/layout/html/content/src/nsHTMLScriptElement.cpp index 5846410ec60..2c521aa5d64 100644 --- a/mozilla/layout/html/content/src/nsHTMLScriptElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLScriptElement.cpp @@ -125,7 +125,7 @@ nsHTMLScriptElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLScriptElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLScriptElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLScriptElement* it = new nsHTMLScriptElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLSelectElement.cpp b/mozilla/layout/html/content/src/nsHTMLSelectElement.cpp index e496bdf5bbc..a32f5a88d7c 100644 --- a/mozilla/layout/html/content/src/nsHTMLSelectElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLSelectElement.cpp @@ -91,17 +91,13 @@ public: // nsIDOMHTMLSelectElement NS_IMETHOD GetType(nsString& aType); - NS_IMETHOD SetType(const nsString& aType); NS_IMETHOD GetSelectedIndex(PRInt32* aSelectedIndex); NS_IMETHOD SetSelectedIndex(PRInt32 aSelectedIndex); NS_IMETHOD GetValue(nsString& aValue); NS_IMETHOD SetValue(const nsString& aValue); - NS_IMETHOD GetLength(PRInt32* aLength); - NS_IMETHOD SetLength(PRInt32 aLength); + NS_IMETHOD GetLength(PRUint32* aLength); NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetOptions(nsIDOMHTMLCollection** aOptions); - NS_IMETHOD SetOptions(nsIDOMHTMLCollection* aOptions); NS_IMETHOD GetDisabled(PRBool* aDisabled); NS_IMETHOD SetDisabled(PRBool aDisabled); NS_IMETHOD GetMultiple(PRBool* aMultiple); @@ -130,6 +126,7 @@ public: NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner) // nsIFormControl + NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetType(PRInt32* aType); NS_IMETHOD SetWidget(nsIWidget* aWidget); NS_IMETHOD Init(); @@ -226,7 +223,7 @@ nsHTMLSelectElement::Release() // nsIDOMHTMLSelectElement nsresult -nsHTMLSelectElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLSelectElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLSelectElement* it = new nsHTMLSelectElement(mInner.mTag); if (nsnull == it) { @@ -265,30 +262,6 @@ nsHTMLSelectElement::GetForm(nsIDOMHTMLFormElement** aForm) return result; } -// An important assumption is that if aForm is null, the previous mForm will not be released -// This allows nsHTMLFormElement to deal with circular references. -NS_IMETHODIMP -nsHTMLSelectElement::SetForm(nsIDOMHTMLFormElement* aForm) -{ - nsresult result = NS_OK; - if (nsnull == aForm) { - mForm = nsnull; - return NS_OK; - } else { - NS_IF_RELEASE(mForm); - nsIFormControl* formControl = nsnull; - result = QueryInterface(kIFormControlIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - result = aForm->QueryInterface(kIFormIID, (void**)&mForm); // keep the ref - if ((NS_OK == result) && mForm) { - mForm->AddElement(formControl); - } - NS_RELEASE(formControl); - } - } - return result; -} - NS_IMETHODIMP nsHTMLSelectElement::GetOptions(nsIDOMHTMLCollection** aValue) { @@ -301,21 +274,38 @@ nsHTMLSelectElement::GetOptions(nsIDOMHTMLCollection** aValue) } NS_IMETHODIMP -nsHTMLSelectElement::SetOptions(nsIDOMHTMLCollection* aValue) +nsHTMLSelectElement::GetType(nsString& aType) { - if (mOptions) { - mOptions->Clear(); - NS_RELEASE(mOptions); + PRBool isMultiple; + nsresult result = NS_OK; + + result = GetMultiple(&isMultiple); + if (NS_OK == result) { + if (isMultiple) { + aType.SetString("select-multiple"); + } + else { + aType.SetString("select-one"); + } + } + + return NS_OK; +} + +NS_IMETHODIMP +nsHTMLSelectElement::GetLength(PRUint32* aLength) +{ + if (nsnull != mOptions) { + return mOptions->GetLength(aLength); + } + else { + *aLength = 0; + return NS_OK; } - mOptions = new nsOptionList(aValue); - NS_ADDREF(mOptions); - return NS_OK; } -NS_IMPL_STRING_ATTR(nsHTMLSelectElement, Type, type, eSetAttrNotify_Restart) NS_IMPL_INT_ATTR(nsHTMLSelectElement, SelectedIndex, selectedindex, eSetAttrNotify_None) NS_IMPL_STRING_ATTR(nsHTMLSelectElement, Value, value, eSetAttrNotify_Render) -NS_IMPL_INT_ATTR(nsHTMLSelectElement, Length, length, eSetAttrNotify_Restart) NS_IMPL_BOOL_ATTR(nsHTMLSelectElement, Disabled, disabled, eSetAttrNotify_Render) NS_IMPL_BOOL_ATTR(nsHTMLSelectElement, Multiple, multiple, eSetAttrNotify_Restart) NS_IMPL_STRING_ATTR(nsHTMLSelectElement, Name, name, eSetAttrNotify_Restart) @@ -459,6 +449,30 @@ nsHTMLSelectElement::SetWidget(nsIWidget* aWidget) return NS_OK; } +// An important assumption is that if aForm is null, the previous mForm will not be released +// This allows nsHTMLFormElement to deal with circular references. +NS_IMETHODIMP +nsHTMLSelectElement::SetForm(nsIDOMHTMLFormElement* aForm) +{ + nsresult result = NS_OK; + if (nsnull == aForm) { + mForm = nsnull; + return NS_OK; + } else { + NS_IF_RELEASE(mForm); + nsIFormControl* formControl = nsnull; + result = QueryInterface(kIFormControlIID, (void**)&formControl); + if ((NS_OK == result) && formControl) { + result = aForm->QueryInterface(kIFormIID, (void**)&mForm); // keep the ref + if ((NS_OK == result) && mForm) { + mForm->AddElement(formControl); + } + NS_RELEASE(formControl); + } + } + return result; +} + void GetOptionsRecurse(nsIContent* aContent, nsVoidArray& aOptions) { PRInt32 numChildren; diff --git a/mozilla/layout/html/content/src/nsHTMLSpacerElement.cpp b/mozilla/layout/html/content/src/nsHTMLSpacerElement.cpp index a4cd287b9a3..095eecdfcc4 100644 --- a/mozilla/layout/html/content/src/nsHTMLSpacerElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLSpacerElement.cpp @@ -113,7 +113,7 @@ nsHTMLSpacerElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLSpacerElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLSpacerElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLSpacerElement* it = new nsHTMLSpacerElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLSpanElement.cpp b/mozilla/layout/html/content/src/nsHTMLSpanElement.cpp index 0ecbf3e5922..a1a62dce89e 100644 --- a/mozilla/layout/html/content/src/nsHTMLSpanElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLSpanElement.cpp @@ -100,7 +100,7 @@ nsHTMLSpanElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLSpanElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLSpanElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLSpanElement* it = new nsHTMLSpanElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLStyleElement.cpp b/mozilla/layout/html/content/src/nsHTMLStyleElement.cpp index 007437b3d06..efd63f9d4dc 100644 --- a/mozilla/layout/html/content/src/nsHTMLStyleElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLStyleElement.cpp @@ -118,7 +118,7 @@ nsHTMLStyleElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLStyleElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLStyleElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLStyleElement* it = new nsHTMLStyleElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLTableCaptionElement.cpp b/mozilla/layout/html/content/src/nsHTMLTableCaptionElement.cpp index 2964d130261..58cfd38fa3f 100644 --- a/mozilla/layout/html/content/src/nsHTMLTableCaptionElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLTableCaptionElement.cpp @@ -113,7 +113,7 @@ nsHTMLTableCaptionElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTableCaptionElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTableCaptionElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTableCaptionElement* it = new nsHTMLTableCaptionElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLTableCellElement.cpp b/mozilla/layout/html/content/src/nsHTMLTableCellElement.cpp index 5da498cdfa2..e19ccdb8474 100644 --- a/mozilla/layout/html/content/src/nsHTMLTableCellElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLTableCellElement.cpp @@ -161,7 +161,7 @@ nsHTMLTableCellElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTableCellElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTableCellElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTableCellElement* it = new nsHTMLTableCellElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLTableColElement.cpp b/mozilla/layout/html/content/src/nsHTMLTableColElement.cpp index fdb7cd535d1..cdc47409caa 100644 --- a/mozilla/layout/html/content/src/nsHTMLTableColElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLTableColElement.cpp @@ -135,7 +135,7 @@ nsHTMLTableColElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTableColElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTableColElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTableColElement* it = new nsHTMLTableColElement(mInner.mTag); if (nsnull == it) { @@ -295,4 +295,4 @@ NS_METHOD nsHTMLTableColElement::GetSpanValue(PRInt32* aSpan) *aSpan = span; } return NS_OK; -} \ No newline at end of file +} diff --git a/mozilla/layout/html/content/src/nsHTMLTableColGroupElement.cpp b/mozilla/layout/html/content/src/nsHTMLTableColGroupElement.cpp index 58f3fdda7d2..58be3e543bd 100644 --- a/mozilla/layout/html/content/src/nsHTMLTableColGroupElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLTableColGroupElement.cpp @@ -124,7 +124,7 @@ nsHTMLTableColGroupElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTableColGroupElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTableColGroupElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTableColGroupElement* it = new nsHTMLTableColGroupElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLTableElement.cpp b/mozilla/layout/html/content/src/nsHTMLTableElement.cpp index b0ddf797442..2a0083d2536 100644 --- a/mozilla/layout/html/content/src/nsHTMLTableElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLTableElement.cpp @@ -60,9 +60,7 @@ public: NS_IMETHOD GetTFoot(nsIDOMHTMLTableSectionElement** aTFoot); NS_IMETHOD SetTFoot(nsIDOMHTMLTableSectionElement* aTFoot); NS_IMETHOD GetRows(nsIDOMHTMLCollection** aRows); - NS_IMETHOD SetRows(nsIDOMHTMLCollection* aRows); NS_IMETHOD GetTBodies(nsIDOMHTMLCollection** aTBodies); - NS_IMETHOD SetTBodies(nsIDOMHTMLCollection* aTBodies); NS_IMETHOD GetAlign(nsString& aAlign); NS_IMETHOD SetAlign(const nsString& aAlign); NS_IMETHOD GetBgColor(nsString& aBgColor); @@ -148,7 +146,7 @@ nsHTMLTableElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTableElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTableElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTableElement* it = new nsHTMLTableElement(mInner.mTag); if (nsnull == it) { @@ -217,12 +215,6 @@ nsHTMLTableElement::GetRows(nsIDOMHTMLCollection** aValue) return NS_OK; // XXX write me } -NS_IMETHODIMP -nsHTMLTableElement::SetRows(nsIDOMHTMLCollection* aValue) -{ - return NS_OK; // XXX write me -} - NS_IMETHODIMP nsHTMLTableElement::GetTBodies(nsIDOMHTMLCollection** aValue) { @@ -230,12 +222,6 @@ nsHTMLTableElement::GetTBodies(nsIDOMHTMLCollection** aValue) return NS_OK; // XXX write me } -NS_IMETHODIMP -nsHTMLTableElement::SetTBodies(nsIDOMHTMLCollection* aValue) -{ - return NS_OK; // XXX write me -} - NS_IMETHODIMP nsHTMLTableElement::CreateTHead(nsIDOMHTMLElement** aValue) { diff --git a/mozilla/layout/html/content/src/nsHTMLTableRowElement.cpp b/mozilla/layout/html/content/src/nsHTMLTableRowElement.cpp index 54e5b5b7505..7f7a7787121 100644 --- a/mozilla/layout/html/content/src/nsHTMLTableRowElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLTableRowElement.cpp @@ -129,7 +129,7 @@ nsHTMLTableRowElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTableRowElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTableRowElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTableRowElement* it = new nsHTMLTableRowElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLTableSectionElement.cpp b/mozilla/layout/html/content/src/nsHTMLTableSectionElement.cpp index f1ffad73d03..02c9c7d4a98 100644 --- a/mozilla/layout/html/content/src/nsHTMLTableSectionElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLTableSectionElement.cpp @@ -54,12 +54,15 @@ public: NS_IMPL_IDOMHTMLELEMENT_USING_GENERIC(mInner) // nsIDOMHTMLTableSectionElement + NS_IMETHOD GetCh(nsString& aCh); + NS_IMETHOD SetCh(const nsString& aCh); + NS_IMETHOD GetChOff(nsString& aChOff); + NS_IMETHOD SetChOff(const nsString& aChOff); NS_IMETHOD GetAlign(nsString& aAlign); NS_IMETHOD SetAlign(const nsString& aAlign); NS_IMETHOD GetVAlign(nsString& aVAlign); NS_IMETHOD SetVAlign(const nsString& aVAlign); NS_IMETHOD GetRows(nsIDOMHTMLCollection** aRows); - NS_IMETHOD SetRows(nsIDOMHTMLCollection* aRows); NS_IMETHOD InsertRow(PRInt32 aIndex, nsIDOMHTMLElement** aReturn); NS_IMETHOD DeleteRow(PRInt32 aIndex); @@ -121,7 +124,7 @@ nsHTMLTableSectionElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTableSectionElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTableSectionElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTableSectionElement* it = new nsHTMLTableSectionElement(mInner.mTag); if (nsnull == it) { @@ -133,6 +136,8 @@ nsHTMLTableSectionElement::CloneNode(nsIDOMNode** aReturn) NS_IMPL_STRING_ATTR(nsHTMLTableSectionElement, Align, align, eSetAttrNotify_Reflow) NS_IMPL_STRING_ATTR(nsHTMLTableSectionElement, VAlign, valign, eSetAttrNotify_Reflow) +NS_IMPL_STRING_ATTR(nsHTMLTableSectionElement, Ch, ch, eSetAttrNotify_Reflow) +NS_IMPL_STRING_ATTR(nsHTMLTableSectionElement, ChOff, choff, eSetAttrNotify_Reflow) NS_IMETHODIMP nsHTMLTableSectionElement::GetRows(nsIDOMHTMLCollection** aValue) @@ -142,13 +147,6 @@ nsHTMLTableSectionElement::GetRows(nsIDOMHTMLCollection** aValue) return NS_OK; } -NS_IMETHODIMP -nsHTMLTableSectionElement::SetRows(nsIDOMHTMLCollection* aValue) -{ - // XXX write me - return NS_OK; -} - NS_IMETHODIMP nsHTMLTableSectionElement::InsertRow(PRInt32 aIndex, nsIDOMHTMLElement** aValue) { diff --git a/mozilla/layout/html/content/src/nsHTMLTextAreaElement.cpp b/mozilla/layout/html/content/src/nsHTMLTextAreaElement.cpp index ba1b9289c69..70300bf8a1a 100644 --- a/mozilla/layout/html/content/src/nsHTMLTextAreaElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLTextAreaElement.cpp @@ -65,7 +65,6 @@ public: NS_IMETHOD GetDefaultValue(nsString& aDefaultValue); NS_IMETHOD SetDefaultValue(const nsString& aDefaultValue); NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm); - NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetAccessKey(nsString& aAccessKey); NS_IMETHOD SetAccessKey(const nsString& aAccessKey); NS_IMETHOD GetCols(PRInt32* aCols); @@ -80,6 +79,9 @@ public: NS_IMETHOD SetRows(PRInt32 aRows); NS_IMETHOD GetTabIndex(PRInt32* aTabIndex); NS_IMETHOD SetTabIndex(PRInt32 aTabIndex); + NS_IMETHOD GetType(nsString& aType); + NS_IMETHOD GetValue(nsString& aValue); + NS_IMETHOD SetValue(const nsString& aValue); NS_IMETHOD Blur(); NS_IMETHOD Focus(); NS_IMETHOD Select(); @@ -97,6 +99,7 @@ public: NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner) // nsIFormControl + NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm); NS_IMETHOD GetType(PRInt32* aType); NS_IMETHOD SetWidget(nsIWidget* aWidget); NS_IMETHOD Init() { return NS_OK; } @@ -182,7 +185,7 @@ nsHTMLTextAreaElement::Release() // nsIDOMHTMLTextAreaElement nsresult -nsHTMLTextAreaElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTextAreaElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTextAreaElement* it = new nsHTMLTextAreaElement(mInner.mTag); if (nsnull == it) { @@ -207,29 +210,6 @@ nsHTMLTextAreaElement::GetForm(nsIDOMHTMLFormElement** aForm) return result; } -// An important assumption is that if aForm is null, the previous mForm will not be released -// This allows nsHTMLFormElement to deal with circular references. -NS_IMETHODIMP -nsHTMLTextAreaElement::SetForm(nsIDOMHTMLFormElement* aForm) -{ - nsresult result = NS_OK; - if (nsnull == aForm) { - mForm = nsnull; - return NS_OK; - } else { - NS_IF_RELEASE(mForm); - nsIFormControl* formControl = nsnull; - result = QueryInterface(kIFormControlIID, (void**)&formControl); - if ((NS_OK == result) && formControl) { - result = aForm->QueryInterface(kIFormIID, (void**)&mForm); // keep the ref - if ((NS_OK == result) && mForm) { - mForm->AddElement(formControl); - } - NS_RELEASE(formControl); - } - } - return result; -} NS_IMETHODIMP nsHTMLTextAreaElement::Blur() // XXX not tested @@ -266,7 +246,6 @@ nsHTMLTextAreaElement::Select() // XXX not tested return NS_OK; } -//NS_IMPL_STRING_ATTR(nsHTMLTextAreaElement, DefaultValue, defaultvalue, eSetAttrNotify_None) NS_IMPL_STRING_ATTR(nsHTMLTextAreaElement, AccessKey, accesskey, eSetAttrNotify_None) NS_IMPL_INT_ATTR(nsHTMLTextAreaElement, Cols, cols, eSetAttrNotify_Reflow) NS_IMPL_BOOL_ATTR(nsHTMLTextAreaElement, Disabled, disabled, eSetAttrNotify_Render) @@ -274,6 +253,28 @@ NS_IMPL_STRING_ATTR(nsHTMLTextAreaElement, Name, name, eSetAttrNotify_Restart) NS_IMPL_BOOL_ATTR(nsHTMLTextAreaElement, ReadOnly, readonly, eSetAttrNotify_Render) NS_IMPL_INT_ATTR(nsHTMLTextAreaElement, Rows, rows, eSetAttrNotify_Reflow) NS_IMPL_INT_ATTR(nsHTMLTextAreaElement, TabIndex, tabindex, eSetAttrNotify_None) + + +NS_IMETHODIMP +nsHTMLTextAreaElement::GetType(nsString& aType) +{ + aType.SetString("textarea"); + return NS_OK; +} + +NS_IMETHODIMP +nsHTMLTextAreaElement::GetValue(nsString& aValue) +{ + // XXX TBI + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsHTMLTextAreaElement::SetValue(const nsString& aValue) +{ + // XXX TBI + return NS_ERROR_NOT_IMPLEMENTED; +} NS_IMETHODIMP nsHTMLTextAreaElement::GetDefaultValue(nsString& aDefaultValue) @@ -410,4 +411,27 @@ nsHTMLTextAreaElement::SetWidget(nsIWidget* aWidget) return NS_OK; } +// An important assumption is that if aForm is null, the previous mForm will not be released +// This allows nsHTMLFormElement to deal with circular references. +NS_IMETHODIMP +nsHTMLTextAreaElement::SetForm(nsIDOMHTMLFormElement* aForm) +{ + nsresult result = NS_OK; + if (nsnull == aForm) { + mForm = nsnull; + return NS_OK; + } else { + NS_IF_RELEASE(mForm); + nsIFormControl* formControl = nsnull; + result = QueryInterface(kIFormControlIID, (void**)&formControl); + if ((NS_OK == result) && formControl) { + result = aForm->QueryInterface(kIFormIID, (void**)&mForm); // keep the ref + if ((NS_OK == result) && mForm) { + mForm->AddElement(formControl); + } + NS_RELEASE(formControl); + } + } + return result; +} diff --git a/mozilla/layout/html/content/src/nsHTMLTitleElement.cpp b/mozilla/layout/html/content/src/nsHTMLTitleElement.cpp index 98b68ddaaf9..0afd8d23275 100644 --- a/mozilla/layout/html/content/src/nsHTMLTitleElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLTitleElement.cpp @@ -113,7 +113,7 @@ nsHTMLTitleElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLTitleElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLTitleElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLTitleElement* it = new nsHTMLTitleElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLUListElement.cpp b/mozilla/layout/html/content/src/nsHTMLUListElement.cpp index 1c7da2b00e6..df6d7bc6f0f 100644 --- a/mozilla/layout/html/content/src/nsHTMLUListElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLUListElement.cpp @@ -118,7 +118,7 @@ nsHTMLUListElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLUListElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLUListElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLUListElement* it = new nsHTMLUListElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsHTMLWBRElement.cpp b/mozilla/layout/html/content/src/nsHTMLWBRElement.cpp index 01884378f92..15cb407f6a0 100644 --- a/mozilla/layout/html/content/src/nsHTMLWBRElement.cpp +++ b/mozilla/layout/html/content/src/nsHTMLWBRElement.cpp @@ -112,7 +112,7 @@ nsHTMLWBRElement::QueryInterface(REFNSIID aIID, void** aInstancePtr) } nsresult -nsHTMLWBRElement::CloneNode(nsIDOMNode** aReturn) +nsHTMLWBRElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsHTMLWBRElement* it = new nsHTMLWBRElement(mInner.mTag); if (nsnull == it) { diff --git a/mozilla/layout/html/content/src/nsTextNode.cpp b/mozilla/layout/html/content/src/nsTextNode.cpp index ec84a9fc0a1..4b5a30de0c2 100644 --- a/mozilla/layout/html/content/src/nsTextNode.cpp +++ b/mozilla/layout/html/content/src/nsTextNode.cpp @@ -47,13 +47,11 @@ public: // nsIDOMNode NS_IMPL_IDOMNODE_USING_GENERIC_DOM_DATA(mInner) - // nsIDOMData - NS_IMPL_IDOMDATA_USING_GENERIC_DOM_DATA(mInner) + // nsIDOMCharacterData + NS_IMPL_IDOMCHARACTERDATA_USING_GENERIC_DOM_DATA(mInner) // nsIDOMText NS_IMETHOD SplitText(PRUint32 aOffset, nsIDOMText** aReturn); - NS_IMETHOD JoinText(nsIDOMText* aNode1, nsIDOMText* aNode2, - nsIDOMText** aReturn); // nsIScriptObjectOwner NS_IMPL_ISCRIPTOBJECTOWNER_USING_GENERIC_DOM_DATA(mInner) @@ -129,22 +127,14 @@ nsTextNode::QueryInterface(REFNSIID aIID, void** aInstancePtr) } NS_IMETHODIMP -nsTextNode::GetNodeType(PRInt32* aNodeType) +nsTextNode::GetNodeType(PRUint16* aNodeType) { - *aNodeType = (PRInt32)nsIDOMNode::TEXT; + *aNodeType = (PRUint16)nsIDOMNode::TEXT_NODE; return NS_OK; } NS_IMETHODIMP -nsTextNode::Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn) -{ - // XXX not yet implemented - *aReturn = PR_FALSE; - return NS_OK; -} - -NS_IMETHODIMP -nsTextNode::CloneNode(nsIDOMNode** aReturn) +nsTextNode::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { nsTextNode* it; NS_NEWXPCOM(it, nsTextNode); @@ -208,13 +198,7 @@ nsTextNode::HandleDOMEvent(nsIPresContext& aPresContext, NS_IMETHODIMP nsTextNode::SplitText(PRUint32 aOffset, nsIDOMText** aReturn) { - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsTextNode::JoinText(nsIDOMText* aNode1, nsIDOMText* aNode2, - nsIDOMText** aReturn) -{ + // XXX To be implemented return NS_ERROR_NOT_IMPLEMENTED; } diff --git a/mozilla/layout/html/document/src/nsHTMLDocument.cpp b/mozilla/layout/html/document/src/nsHTMLDocument.cpp index 39a9926f2b6..53adbc127e7 100644 --- a/mozilla/layout/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/layout/html/document/src/nsHTMLDocument.cpp @@ -32,6 +32,7 @@ #include "nsIDOMNode.h" // for Find #include "nsIDOMElement.h" #include "nsIDOMText.h" +#include "nsIDOMComment.h" #include "nsIDOMHTMLFormElement.h" #include "nsIPostToServer.h" #include "nsIStreamListener.h" @@ -70,6 +71,7 @@ static NS_DEFINE_IID(kIDocumentIID, NS_IDOCUMENT_IID); static NS_DEFINE_IID(kIContentIID, NS_ICONTENT_IID); static NS_DEFINE_IID(kIDOMElementIID, NS_IDOMELEMENT_IID); static NS_DEFINE_IID(kIDOMTextIID, NS_IDOMTEXT_IID); +static NS_DEFINE_IID(kIDOMCommentIID, NS_IDOMCOMMENT_IID); static NS_DEFINE_IID(kIDOMNodeIID, NS_IDOMNODE_IID); static NS_DEFINE_IID(kIHTMLDocumentIID, NS_IHTMLDOCUMENT_IID); static NS_DEFINE_IID(kIDOMHTMLDocumentIID, NS_IDOMHTMLDOCUMENT_IID); @@ -623,7 +625,6 @@ nsHTMLDocument::SetDTDMode(nsDTDMode aMode) // NS_IMETHODIMP nsHTMLDocument::CreateElement(const nsString& aTagName, - nsIDOMNamedNodeMap* aAttributes, nsIDOMElement** aReturn) { nsIHTMLContent* content; @@ -643,14 +644,74 @@ nsHTMLDocument::CreateTextNode(const nsString& aData, nsIDOMText** aTextNode) if (NS_OK == rv) { rv = text->QueryInterface(kIDOMTextIID, (void**)aTextNode); - (*aTextNode)->Append(aData); + (*aTextNode)->AppendData(aData); } return rv; } NS_IMETHODIMP -nsHTMLDocument::GetDocumentType(nsIDOMDocumentType** aDocumentType) +nsHTMLDocument::CreateDocumentFragment(nsIDOMDocumentFragment** aReturn) +{ + // XXX To be implemented + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsHTMLDocument::CreateComment(const nsString& aData, nsIDOMComment** aReturn) +{ + nsIHTMLContent* comment = nsnull; + nsresult rv = NS_NewCommentNode(&comment); + + if (NS_OK == rv) { + rv = comment->QueryInterface(kIDOMCommentIID, (void**)aReturn); + (*aReturn)->AppendData(aData); + } + + return rv; +} + +NS_IMETHODIMP +nsHTMLDocument::CreateProcessingInstruction(const nsString& aTarget, + const nsString& aData, + nsIDOMProcessingInstruction** aReturn) +{ + // There are no PIs for HTML + *aReturn = nsnull; + + return NS_OK; +} + +NS_IMETHODIMP +nsHTMLDocument::CreateCDATASection(const nsString& aData, + nsIDOMCDATASection** aReturn) +{ + // There are no CDATASections in HTML + *aReturn = nsnull; + + return NS_OK; +} + +NS_IMETHODIMP +nsHTMLDocument::CreateEntityReference(const nsString& aName, + nsIDOMEntityReference** aReturn) +{ + // There are no EntityReferences in HTML + *aReturn = nsnull; + + return NS_OK; +} + +NS_IMETHODIMP +nsHTMLDocument::CreateAttribute(const nsString& aName, + nsIDOMAttr** aReturn) +{ + // XXX To be implemented + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsHTMLDocument::GetDoctype(nsIDOMDocumentType** aDocumentType) { // There's no document type for a HTML document *aDocumentType = nsnull; @@ -676,34 +737,6 @@ nsHTMLDocument::GetReferrer(nsString& aReferrer) return NS_ERROR_NOT_IMPLEMENTED; } -NS_IMETHODIMP -nsHTMLDocument::GetFileSize(nsString& aFileSize) -{ - //XXX TBI - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsHTMLDocument::GetFileCreatedDate(nsString& aFileCreatedDate) -{ - //XXX TBI - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsHTMLDocument::GetFileModifiedDate(nsString& aFileModifiedDate) -{ - //XXX TBI - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsHTMLDocument::GetFileUpdatedDate(nsString& aFileUpdatedDate) -{ - //XXX TBI - return NS_ERROR_NOT_IMPLEMENTED; -} - NS_IMETHODIMP nsHTMLDocument::GetDomain(nsString& aDomain) { @@ -1666,7 +1699,7 @@ PRBool nsHTMLDocument::BuildBlockTraversing(nsIDOMNode * aParent, NS_RELEASE(textContent); } else { PRBool hasChildNode; - aParent->GetHasChildNodes(&hasChildNode); + aParent->HasChildNodes(&hasChildNode); if (hasChildNode) { nsIDOMNode * child; if (mSearchDirection == kForward) { @@ -1706,7 +1739,7 @@ PRBool nsHTMLDocument::BuildBlockFromStack(nsIDOMNode * aParent, nsIDOMNode * stackChild = mChildStack[aStackInx]; PRBool hasChildNode; - aParent->GetHasChildNodes(&hasChildNode); + aParent->HasChildNodes(&hasChildNode); if (hasChildNode) { nsIDOMNode * child = stackChild; NS_ADDREF(child); @@ -1798,7 +1831,7 @@ void printDOMRefs(nsIDOMNode * aNode, PRInt32 aLevel) delete[] cStr; PRBool hasChildren; - aNode->GetHasChildNodes(&hasChildren); + aNode->HasChildNodes(&hasChildren); if (hasChildren) { nsIDOMNode * childNode; aNode->GetFirstChild(&childNode); @@ -1825,7 +1858,7 @@ nsIDOMNode * FindDOMNode(nsIDOMNode * aNode, nsIContent * aContent) } PRBool hasChildren; - aNode->GetHasChildNodes(&hasChildren); + aNode->HasChildNodes(&hasChildren); if (hasChildren) { nsIDOMNode * childNode; aNode->GetFirstChild(&childNode); diff --git a/mozilla/layout/html/document/src/nsHTMLDocument.h b/mozilla/layout/html/document/src/nsHTMLDocument.h index 09197293870..ff9cb8a9db1 100644 --- a/mozilla/layout/html/document/src/nsHTMLDocument.h +++ b/mozilla/layout/html/document/src/nsHTMLDocument.h @@ -60,25 +60,18 @@ public: NS_IMETHOD SetDTDMode(nsDTDMode aMode); // nsIDOMDocument interface - NS_IMETHOD GetMasterDoc(nsIDOMDocument **aDocument) - { return nsDocument::GetMasterDoc(aDocument); } - NS_IMETHOD GetDocumentType(nsIDOMDocumentType** aDocumentType); - NS_IMETHOD GetProlog(nsIDOMNodeList** aProlog) - { return nsDocument::GetProlog(aProlog); } - NS_IMETHOD GetEpilog(nsIDOMNodeList** aEpilog) - { return nsDocument::GetEpilog(aEpilog); } + NS_IMETHOD GetDoctype(nsIDOMDocumentType** aDocumentType); + NS_IMETHOD GetImplementation(nsIDOMDOMImplementation** aImplementation) + { return nsDocument::GetImplementation(aImplementation); } NS_IMETHOD GetDocumentElement(nsIDOMElement** aDocumentElement) { return nsDocument::GetDocumentElement(aDocumentElement); } - NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment** aReturn) - { return nsDocument::CreateDocumentFragment(aReturn); } - NS_IMETHOD CreateComment(const nsString& aData, nsIDOMComment** aReturn) - { return nsDocument::CreateComment(aData, aReturn); } - NS_IMETHOD CreateProcessingInstruction(const nsString& aTarget, const nsString& aData, nsIDOMProcessingInstruction** aReturn) - { return nsDocument::CreateProcessingInstruction(aTarget, aData, aReturn); } - NS_IMETHOD CreateAttribute(const nsString& aName, nsIDOMNode* aValue, nsIDOMAttribute** aReturn) - { return nsDocument::CreateAttribute(aName, aValue, aReturn); } + NS_IMETHOD CreateCDATASection(const nsString& aData, nsIDOMCDATASection** aReturn); + NS_IMETHOD CreateEntityReference(const nsString& aName, nsIDOMEntityReference** aReturn); + NS_IMETHOD CreateDocumentFragment(nsIDOMDocumentFragment** aReturn); + NS_IMETHOD CreateComment(const nsString& aData, nsIDOMComment** aReturn); + NS_IMETHOD CreateProcessingInstruction(const nsString& aTarget, const nsString& aData, nsIDOMProcessingInstruction** aReturn); + NS_IMETHOD CreateAttribute(const nsString& aName, nsIDOMAttr** aReturn); NS_IMETHOD CreateElement(const nsString& aTagName, - nsIDOMNamedNodeMap* aAttributes, nsIDOMElement** aReturn); NS_IMETHOD CreateTextNode(const nsString& aData, nsIDOMText** aReturn); NS_IMETHOD GetElementsByTagName(const nsString& aTagname, nsIDOMNodeList** aReturn) diff --git a/mozilla/layout/html/tests/TestAppend.js b/mozilla/layout/html/tests/TestAppend.js index 49386a36372..33578c4ffd1 100644 --- a/mozilla/layout/html/tests/TestAppend.js +++ b/mozilla/layout/html/tests/TestAppend.js @@ -30,7 +30,7 @@ function findBody(node) var child = null; var count = 0; while (count < length) { - child = children.item(count); + child = children[count]; if (child.tagName == "BODY") { return child; } @@ -46,12 +46,12 @@ function findBody(node) function AppendTest(parent, kidTag, grandKidTag, empty, asWeGo) { trace("enter [" + kidTag + "," + (grandKidTag?grandKidTag:"") + "]"); - var kid = document.createElement(kidTag, null); + var kid = document.createElement(kidTag); if (asWeGo) { parent.insertBefore(kid, null); } if (null != grandKidTag) { - var grandKid = document.createElement(grandKidTag, null); + var grandKid = document.createElement(grandKidTag); if (empty) { kid.insertBefore(grandKid, null); } @@ -96,7 +96,7 @@ var body = findBody(document.documentElement); RunTests(body, false); RunTests(body, true); -var inline = document.createElement("SPAN", null); +var inline = document.createElement("SPAN"); body.insertBefore(inline, null); RunTests(inline, false); RunTests(inline, true); diff --git a/mozilla/layout/html/tests/TestAttributes.cpp b/mozilla/layout/html/tests/TestAttributes.cpp index 2d52239b7ba..1fea3e97591 100644 --- a/mozilla/layout/html/tests/TestAttributes.cpp +++ b/mozilla/layout/html/tests/TestAttributes.cpp @@ -233,7 +233,7 @@ int main(int argc, char** argv) static NS_DEFINE_IID(kIDOMTextIID, NS_IDOMTEXT_IID); text->QueryInterface(kIDOMTextIID, (void**) &txt); nsAutoString tmp(destStr, destLen); - txt->Append(tmp); + txt->AppendData(tmp); NS_RELEASE(txt); PRBool canHaveKids; diff --git a/mozilla/layout/html/tests/TestDelete.js b/mozilla/layout/html/tests/TestDelete.js index 546579cd5c2..21c39858c71 100644 --- a/mozilla/layout/html/tests/TestDelete.js +++ b/mozilla/layout/html/tests/TestDelete.js @@ -29,7 +29,7 @@ function dump2(msg, parent, child) dump(" parent="); dump(parent.tagName); dump(" child="); - dump((child.nodeType != Node.TEXT) ? child.tagName : "(text)"); + dump((child.nodeType != Node.TEXT_NODE) ? child.tagName : "(text)"); dump(" kids: "); var children = parent.childNodes; @@ -38,7 +38,7 @@ function dump2(msg, parent, child) var count = 0; while (count < length) { child = children.item(count); - dump((child.nodeType != Node.TEXT) ? child.tagName : "(text)"); + dump((child.nodeType != Node.TEXT_NODE) ? child.tagName : "(text)"); dump(","); count++; } @@ -73,7 +73,7 @@ function findContainer(node, name) var count = 0; while (count < length) { child = children.item(count); - if (child.nodeType != Node.TEXT) { + if (child.nodeType != Node.TEXT_NODE) { if (child.tagName == name) { return child; } @@ -108,10 +108,10 @@ function makeTestDocument(node) spanTag[5] = "TT"; for (b = 0; b < 6; b++) { - var block = document.createElement(blockTag[b], null); + var block = document.createElement(blockTag[b]); block.insertBefore(document.createTextNode("Opening text ["), null); for (s = 0; s < 6; s++) { - var span = document.createElement(spanTag[s], null); + var span = document.createElement(spanTag[s]); block.insertBefore(span, null); span.insertBefore(document.createTextNode("More text, "), null); span.insertBefore(document.createTextNode("And more text, "), null); diff --git a/mozilla/layout/html/tests/TestInsert.js b/mozilla/layout/html/tests/TestInsert.js index 2d24bfd2ada..ba09e70e008 100644 --- a/mozilla/layout/html/tests/TestInsert.js +++ b/mozilla/layout/html/tests/TestInsert.js @@ -46,7 +46,7 @@ function findBody(node) function TestInsert(parent, child) { var childTag = "(text)"; - if (child.nodeType != Node.TEXT) { + if (child.nodeType != Node.TEXT_NODE) { childTag = child.tagName; } @@ -67,8 +67,8 @@ function TestInsert(parent, child) var body = findBody(document.documentElement); // Create a block child with a span in it -var block = document.createElement("P", null); -var span = document.createElement("SPAN", null); +var block = document.createElement("P"); +var span = document.createElement("SPAN"); var spanText = document.createTextNode("Some text"); span.insertBefore(spanText, null); block.insertBefore(span, null); diff --git a/mozilla/layout/html/tests/TestTextDOM.js b/mozilla/layout/html/tests/TestTextDOM.js index 499ebb3c380..42c5eeb43be 100644 --- a/mozilla/layout/html/tests/TestTextDOM.js +++ b/mozilla/layout/html/tests/TestTextDOM.js @@ -18,32 +18,32 @@ function testInsert(text) { - text.remove(0, 99999); + text.deleteData(0, 99999); // test insert into empty string - text.insert(0, "word"); + text.insertData(0, "word"); if (text.data != "word") { dump("testInsert Error(0): '" + text.data + "' != word\n"); } // test insert into middle of string - text.insert(1, "Z"); + text.insertData(1, "Z"); if (text.data != "wZord") { dump("testInsert Error(1): '" + text.data + "' != wZord\n"); } - text.insert(4, "Z"); + text.insertData(4, "Z"); if (text.data != "wZorZd") { dump("testInsert Error(2): '" + text.data + "' != wZorZd\n"); } // test insert at end of string (== append) - text.insert(99, "Z"); + text.insertData(99, "Z"); if (text.data != "wZorZdZ") { dump("testInsert Error(3): '" + text.data + "' != wZorZdZ\n"); } // test insert at start with illegal offset - text.insert(-9000, "first"); + text.insertData(-9000, "first"); if (text.data != "firstwZorZdZ") { dump("testInsert Error(4): '" + text.data + "' != firstwZorZdZ\n"); } @@ -51,16 +51,16 @@ function testInsert(text) function testAppend(text) { - text.remove(0, 99999); + text.deleteData(0, 99999); // test append into empty string - text.append("word"); + text.appendData("word"); if (text.data != "word") { dump("testAppend Error(0): '" + text.data + "' != word\n"); } // test append onto a non-empty string - text.append("word"); + text.appendData("word"); if (text.data != "wordword") { dump("testAppend Error(1): '" + text.data + "' != wordword\n"); } @@ -68,48 +68,48 @@ function testAppend(text) function testDelete(text) { - text.remove(0, 99999); - text.append("wordwo3rd"); + text.deleteData(0, 99999); + text.appendData("wordwo3rd"); // test delete at start of word - text.remove(0, 4); + text.deleteData(0, 4); if (text.data != "wo3rd") { dump("testDelete Error(0): '" + text.data + "' != wo3rd\n"); } // test delete in middle of word - text.remove(2, 1); + text.deleteData(2, 1); if (text.data != "word") { dump("testDelete Error(1): '" + text.data + "' != word\n"); } // test delete at end of word - text.remove(2, 2); + text.deleteData(2, 2); if (text.data != "wo") { dump("testDelete Error(2): '" + text.data + "' != wo\n"); } // test delete of remaining data - text.remove(0, 2); + text.deleteData(0, 2); if (text.data != "") { dump("testDelete Error(3): '" + text.data + "' != ''\n"); } // test invalid delete's - text.append("word"); - text.remove(-100, -10); + text.appendData("word"); + text.deleteData(-100, -10); if (text.data != "word") { dump("testDelete Error(4): '" + text.data + "' != word\n"); } - text.remove(-100, 0); + text.deleteData(-100, 0); if (text.data != "word") { dump("testDelete Error(5): '" + text.data + "' != word\n"); } - text.remove(0, -10); + text.deleteData(0, -10); if (text.data != "word") { dump("testDelete Error(6): '" + text.data + "' != word\n"); } - text.remove(0, 0); + text.deleteData(0, 0); if (text.data != "word") { dump("testDelete Error(7): '" + text.data + "' != word\n"); } @@ -117,50 +117,50 @@ function testDelete(text) function testReplace(text) { - text.remove(0, 99999); - text.append("word"); + text.deleteData(0, 99999); + text.appendData("word"); // replace nothing with something - text.replace(0, 0, "fish"); + text.replaceData(0, 0, "fish"); if (text.data != "fishword") { dump("testReplace Error(0): '" + text.data + "' != fisword\n"); } // replace something with nothing - text.replace(0, 4, ""); + text.replaceData(0, 4, ""); if (text.data != "word") { dump("testReplace Error(1): '" + text.data + "' != word\n"); } // replace nothing with something - text.replace(1, 1, "fish"); + text.replaceData(1, 1, "fish"); if (text.data != "wfishrd") { dump("testReplace Error(2): '" + text.data + "' != wfishrd\n"); } // replace something with nothing - text.replace(1, 4, ""); + text.replaceData(1, 4, ""); if (text.data != "wrd") { dump("testReplace Error(3): '" + text.data + "' != wrd\n"); } // replace something with something - text.replace(0, 1, "W"); - text.replace(1, 1, "O"); - text.replace(2, 1, "R"); - text.replace(3, 1, "D"); + text.replaceData(0, 1, "W"); + text.replaceData(1, 1, "O"); + text.replaceData(2, 1, "R"); + text.replaceData(3, 1, "D"); if (text.data != "WORD") { dump("testReplace Error(4): '" + text.data + "' != WORD\n"); } // replace nothing with something - text.replace(4, 97, "FISH"); + text.replaceData(4, 97, "FISH"); if (text.data != "WORDFISH") { dump("testReplace Error(5): '" + text.data + "' != WORDFISH\n"); } // test illegal count's/offset for replace - text.replace(-99, 4, "SWORD"); + text.replaceData(-99, 4, "SWORD"); if (text.data != "SWORDFISH") { dump("testReplace Error(6): '" + text.data + "' != SWORDFISH\n"); } @@ -176,7 +176,7 @@ function testText(text) function findText(container) { - if (container.hasChildNodes) { + if (container.hasChildNodes()) { // Find the first piece of text in the container or one of it's // children and return it var children = container.childNodes; @@ -184,8 +184,8 @@ function findText(container) var child = null; var count = 0; while (count < length) { - child = children.item(count); - if (child.nodeType == Node.TEXT) { + child = children[count]; + if (child.nodeType == Node.TEXT_NODE) { return child; } var text = findText(child); @@ -200,7 +200,7 @@ function findText(container) function findBody(node) { - if (node.nodeType != Node.ELEMENT) { + if (node.nodeType != Node.ELEMENT_NODE) { return null; } var children = node.childNodes; @@ -211,7 +211,7 @@ function findBody(node) var child = null; var count = 0; while (count < length) { - child = children.item(count); + child = children[count]; if (child.tagName == "BODY") { dump("BODY found"); return child; diff --git a/mozilla/webshell/tests/viewer/nsEditorMode.cpp b/mozilla/webshell/tests/viewer/nsEditorMode.cpp index 317534a65b2..eb92d19c278 100644 --- a/mozilla/webshell/tests/viewer/nsEditorMode.cpp +++ b/mozilla/webshell/tests/viewer/nsEditorMode.cpp @@ -80,7 +80,7 @@ nsresult nsDeleteLast() mText->GetData(mStr); mLength = mStr.Length(); if (mLength > 0) { - mText->Remove(mLength-1, 1); + mText->DeleteData(mLength-1, 1); } NS_RELEASE(mText); } @@ -92,15 +92,15 @@ nsresult nsDeleteLast() nsresult GetFirstTextNode(nsIDOMNode *aNode, nsIDOMNode **aRetNode) { - PRInt32 mType; + PRUint16 mType; PRBool mCNodes; *aRetNode = nsnull; aNode->GetNodeType(&mType); - if (aNode->ELEMENT == mType) { - if (NS_OK == aNode->GetHasChildNodes(&mCNodes) && PR_TRUE == mCNodes) { + if (nsIDOMNode::ELEMENT_NODE == mType) { + if (NS_OK == aNode->HasChildNodes(&mCNodes) && PR_TRUE == mCNodes) { nsIDOMNode *mNode, *mSibNode; aNode->GetFirstChild(&mNode); @@ -113,7 +113,7 @@ nsresult GetFirstTextNode(nsIDOMNode *aNode, nsIDOMNode **aRetNode) NS_IF_RELEASE(mNode); } } - else if (aNode->TEXT == mType) { + else if (nsIDOMNode::TEXT_NODE == mType) { *aRetNode = aNode; NS_ADDREF(aNode); } @@ -161,7 +161,7 @@ nsresult nsAppendText(nsString *aStr) if (NS_OK == nsGetCurrentNode(&mNode) && NS_OK == mNode->QueryInterface(kIDOMTextIID, (void**)&mText)) { - mText->Append(*aStr); + mText->AppendData(*aStr); NS_RELEASE(mText); } diff --git a/mozilla/xpcom/base/IIDS.h b/mozilla/xpcom/base/IIDS.h index 4dbf5e31ea8..36414ee7dd3 100644 --- a/mozilla/xpcom/base/IIDS.h +++ b/mozilla/xpcom/base/IIDS.h @@ -185,565 +185,565 @@ nsIDOMPaintListener = { /* a6cf906a-15b3-11d2-932e-00805f8add32 */ 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf906b-15b3-11d2-932e-00805f8add32 */ +nsIDOMWindow = { /* a6cf906b-15b3-11d2-932e-00805f8add32 */ 0xa6cf906b, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf906c-15b3-11d2-932e-00805f8add32 */ +nsIDOMEventCapturer = { /* a6cf906c-15b3-11d2-932e-00805f8add32 */ 0xa6cf906c, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf906d-15b3-11d2-932e-00805f8add32 */ +nsIDOMLocation = { /* a6cf906d-15b3-11d2-932e-00805f8add32 */ 0xa6cf906d, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf906e-15b3-11d2-932e-00805f8add32 */ +nsIDOMNavigator = { /* a6cf906e-15b3-11d2-932e-00805f8add32 */ 0xa6cf906e, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf906f-15b3-11d2-932e-00805f8add32 */ +nsIDOMWindowCollection = { /* a6cf906f-15b3-11d2-932e-00805f8add32 */ 0xa6cf906f, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9070-15b3-11d2-932e-00805f8add32 */ +nsIDOMAttr = { /* a6cf9070-15b3-11d2-932e-00805f8add32 */ 0xa6cf9070, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9071-15b3-11d2-932e-00805f8add32 */ +nsIDOMCDATASection = { /* a6cf9071-15b3-11d2-932e-00805f8add32 */ 0xa6cf9071, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9072-15b3-11d2-932e-00805f8add32 */ +nsIDOMCharacterData = { /* a6cf9072-15b3-11d2-932e-00805f8add32 */ 0xa6cf9072, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9073-15b3-11d2-932e-00805f8add32 */ +nsIDOMComment = { /* a6cf9073-15b3-11d2-932e-00805f8add32 */ 0xa6cf9073, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9074-15b3-11d2-932e-00805f8add32 */ +nsIDOMDOMImplementation = { /* a6cf9074-15b3-11d2-932e-00805f8add32 */ 0xa6cf9074, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9075-15b3-11d2-932e-00805f8add32 */ +nsIDOMDocument = { /* a6cf9075-15b3-11d2-932e-00805f8add32 */ 0xa6cf9075, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9076-15b3-11d2-932e-00805f8add32 */ +nsIDOMDocumentFragment = { /* a6cf9076-15b3-11d2-932e-00805f8add32 */ 0xa6cf9076, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9077-15b3-11d2-932e-00805f8add32 */ +nsIDOMDocumentType = { /* a6cf9077-15b3-11d2-932e-00805f8add32 */ 0xa6cf9077, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9078-15b3-11d2-932e-00805f8add32 */ +nsIDOMElement = { /* a6cf9078-15b3-11d2-932e-00805f8add32 */ 0xa6cf9078, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9079-15b3-11d2-932e-00805f8add32 */ +nsIDOMEntity = { /* a6cf9079-15b3-11d2-932e-00805f8add32 */ 0xa6cf9079, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf907a-15b3-11d2-932e-00805f8add32 */ +nsIDOMEntityReference = { /* a6cf907a-15b3-11d2-932e-00805f8add32 */ 0xa6cf907a, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf907b-15b3-11d2-932e-00805f8add32 */ +nsIDOMNamedNodeMap = { /* a6cf907b-15b3-11d2-932e-00805f8add32 */ 0xa6cf907b, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf907c-15b3-11d2-932e-00805f8add32 */ +nsIDOMNode = { /* a6cf907c-15b3-11d2-932e-00805f8add32 */ 0xa6cf907c, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf907d-15b3-11d2-932e-00805f8add32 */ +nsIDOMNodeList = { /* a6cf907d-15b3-11d2-932e-00805f8add32 */ 0xa6cf907d, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf907e-15b3-11d2-932e-00805f8add32 */ +nsIDOMNotation = { /* a6cf907e-15b3-11d2-932e-00805f8add32 */ 0xa6cf907e, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf907f-15b3-11d2-932e-00805f8add32 */ +nsIDOMProcessingInstruction = { /* a6cf907f-15b3-11d2-932e-00805f8add32 */ 0xa6cf907f, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9080-15b3-11d2-932e-00805f8add32 */ +nsIDOMStyleSheet = { /* a6cf9080-15b3-11d2-932e-00805f8add32 */ 0xa6cf9080, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9081-15b3-11d2-932e-00805f8add32 */ +nsIDOMStyleSheetCollection = { /* a6cf9081-15b3-11d2-932e-00805f8add32 */ 0xa6cf9081, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9082-15b3-11d2-932e-00805f8add32 */ +nsIDOMText = { /* a6cf9082-15b3-11d2-932e-00805f8add32 */ 0xa6cf9082, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9083-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLCollection = { /* a6cf9083-15b3-11d2-932e-00805f8add32 */ 0xa6cf9083, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9084-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLDocument = { /* a6cf9084-15b3-11d2-932e-00805f8add32 */ 0xa6cf9084, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9085-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLElement = { /* a6cf9085-15b3-11d2-932e-00805f8add32 */ 0xa6cf9085, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9086-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLHtmlElement = { /* a6cf9086-15b3-11d2-932e-00805f8add32 */ 0xa6cf9086, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9087-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLHeadElement = { /* a6cf9087-15b3-11d2-932e-00805f8add32 */ 0xa6cf9087, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9088-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLLinkElement = { /* a6cf9088-15b3-11d2-932e-00805f8add32 */ 0xa6cf9088, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9089-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTitleElement = { /* a6cf9089-15b3-11d2-932e-00805f8add32 */ 0xa6cf9089, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf908a-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLMetaElement = { /* a6cf908a-15b3-11d2-932e-00805f8add32 */ 0xa6cf908a, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf908b-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLBaseElement = { /* a6cf908b-15b3-11d2-932e-00805f8add32 */ 0xa6cf908b, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf908c-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLIsIndexElement = { /* a6cf908c-15b3-11d2-932e-00805f8add32 */ 0xa6cf908c, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf908d-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLStyleElement = { /* a6cf908d-15b3-11d2-932e-00805f8add32 */ 0xa6cf908d, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf908e-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLBodyElement = { /* a6cf908e-15b3-11d2-932e-00805f8add32 */ 0xa6cf908e, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf908f-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLFormElement = { /* a6cf908f-15b3-11d2-932e-00805f8add32 */ 0xa6cf908f, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9090-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLSelectElement = { /* a6cf9090-15b3-11d2-932e-00805f8add32 */ 0xa6cf9090, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9091-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLOptGroupElement = { /* a6cf9091-15b3-11d2-932e-00805f8add32 */ 0xa6cf9091, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9092-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLOptionElement = { /* a6cf9092-15b3-11d2-932e-00805f8add32 */ 0xa6cf9092, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9093-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLInputElement = { /* a6cf9093-15b3-11d2-932e-00805f8add32 */ 0xa6cf9093, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9094-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTextAreaElement = { /* a6cf9094-15b3-11d2-932e-00805f8add32 */ 0xa6cf9094, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9095-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLButtonElement = { /* a6cf9095-15b3-11d2-932e-00805f8add32 */ 0xa6cf9095, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9096-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLLabelElement = { /* a6cf9096-15b3-11d2-932e-00805f8add32 */ 0xa6cf9096, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9097-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLFieldSetElement = { /* a6cf9097-15b3-11d2-932e-00805f8add32 */ 0xa6cf9097, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9098-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLLegendElement = { /* a6cf9098-15b3-11d2-932e-00805f8add32 */ 0xa6cf9098, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9099-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLUListElement = { /* a6cf9099-15b3-11d2-932e-00805f8add32 */ 0xa6cf9099, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf909a-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLOListElement = { /* a6cf909a-15b3-11d2-932e-00805f8add32 */ 0xa6cf909a, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf909b-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLDListElement = { /* a6cf909b-15b3-11d2-932e-00805f8add32 */ 0xa6cf909b, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf909c-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLDirectoryElement = { /* a6cf909c-15b3-11d2-932e-00805f8add32 */ 0xa6cf909c, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf909d-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLMenuElement = { /* a6cf909d-15b3-11d2-932e-00805f8add32 */ 0xa6cf909d, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf909e-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLLIElement = { /* a6cf909e-15b3-11d2-932e-00805f8add32 */ 0xa6cf909e, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf909f-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLBlockquoteElement = { /* a6cf909f-15b3-11d2-932e-00805f8add32 */ 0xa6cf909f, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a0-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLDivElement = { /* a6cf90a0-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a0, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a1-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLParagraphElement = { /* a6cf90a1-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a1, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a2-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLHeadingElement = { /* a6cf90a2-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a2, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a3-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLQuoteElement = { /* a6cf90a3-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a3, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a4-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLPreElement = { /* a6cf90a4-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a4, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a5-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLBRElement = { /* a6cf90a5-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a5, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a6-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLBaseFontElement = { /* a6cf90a6-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a6, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a7-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLFontElement = { /* a6cf90a7-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a7, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a8-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLHRElement = { /* a6cf90a8-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a8, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a9-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLModElement = { /* a6cf90a9-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a9, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90aa-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLAnchorElement = { /* a6cf90aa-15b3-11d2-932e-00805f8add32 */ 0xa6cf90aa, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90ab-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLImageElement = { /* a6cf90ab-15b3-11d2-932e-00805f8add32 */ 0xa6cf90ab, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90ac-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLObjectElement = { /* a6cf90ac-15b3-11d2-932e-00805f8add32 */ 0xa6cf90ac, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90ad-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLParamElement = { /* a6cf90ad-15b3-11d2-932e-00805f8add32 */ 0xa6cf90ad, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90ae-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLAppletElement = { /* a6cf90ae-15b3-11d2-932e-00805f8add32 */ 0xa6cf90ae, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90af-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLMapElement = { /* a6cf90af-15b3-11d2-932e-00805f8add32 */ 0xa6cf90af, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b0-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLAreaElement = { /* a6cf90b0-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b0, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b1-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLScriptElement = { /* a6cf90b1-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b1, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b2-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTableElement = { /* a6cf90b2-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b2, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b3-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTableCaptionElement = { /* a6cf90b3-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b3, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b4-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTableColElement = { /* a6cf90b4-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b4, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b5-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTableSectionElement = { /* a6cf90b5-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b5, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b6-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTableRowElement = { /* a6cf90b6-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b6, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b7-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTableCellElement = { /* a6cf90b7-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b7, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b8-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLFrameSetElement = { /* a6cf90b8-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b8, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b9-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLFrameElement = { /* a6cf90b9-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b9, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90ba-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLIFrameElement = { /* a6cf90ba-15b3-11d2-932e-00805f8add32 */ 0xa6cf90ba, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90bb-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSFontFaceRule = { /* a6cf90bb-15b3-11d2-932e-00805f8add32 */ 0xa6cf90bb, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90bc-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSMediaRule = { /* a6cf90bc-15b3-11d2-932e-00805f8add32 */ 0xa6cf90bc, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90bd-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSPageRule = { /* a6cf90bd-15b3-11d2-932e-00805f8add32 */ 0xa6cf90bd, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90be-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSStyleDeclaration = { /* a6cf90be-15b3-11d2-932e-00805f8add32 */ 0xa6cf90be, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90bf-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSStyleRule = { /* a6cf90bf-15b3-11d2-932e-00805f8add32 */ 0xa6cf90bf, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c0-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSStyleRuleCollection = { /* a6cf90c0-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c0, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c1-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSStyleRuleSimple = { /* a6cf90c1-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c1, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c2-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSStyleSheet = { /* a6cf90c2-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c2, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c3-15b3-11d2-932e-00805f8add32 */ +nsIDOMEvent = { /* a6cf90c3-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c3, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c4-15b3-11d2-932e-00805f8add32 */ +nsIDOMNSEvent = { /* a6cf90c4-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c4, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c5-15b3-11d2-932e-00805f8add32 */ +nsIDOMNSHTMLDocument = { /* a6cf90c5-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c5, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c6-15b3-11d2-932e-00805f8add32 */ +nsIDOMNSHTMLFormElement = { /* a6cf90c6-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c6, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c7-15b3-11d2-932e-00805f8add32 */ +nsIDOMImage = { /* a6cf90c7-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c7, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c8-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLImageElementFactory = { /* a6cf90c8-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c8, 0x15b3, 0x11d2, @@ -6023,3 +6023,5 @@ INTERFACENAME = { /* a6cf9437-15b3-11d2-932e-00805f8add32 */ 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; + + diff --git a/mozilla/xpcom/src/IIDS.h b/mozilla/xpcom/src/IIDS.h index 4dbf5e31ea8..36414ee7dd3 100644 --- a/mozilla/xpcom/src/IIDS.h +++ b/mozilla/xpcom/src/IIDS.h @@ -185,565 +185,565 @@ nsIDOMPaintListener = { /* a6cf906a-15b3-11d2-932e-00805f8add32 */ 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf906b-15b3-11d2-932e-00805f8add32 */ +nsIDOMWindow = { /* a6cf906b-15b3-11d2-932e-00805f8add32 */ 0xa6cf906b, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf906c-15b3-11d2-932e-00805f8add32 */ +nsIDOMEventCapturer = { /* a6cf906c-15b3-11d2-932e-00805f8add32 */ 0xa6cf906c, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf906d-15b3-11d2-932e-00805f8add32 */ +nsIDOMLocation = { /* a6cf906d-15b3-11d2-932e-00805f8add32 */ 0xa6cf906d, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf906e-15b3-11d2-932e-00805f8add32 */ +nsIDOMNavigator = { /* a6cf906e-15b3-11d2-932e-00805f8add32 */ 0xa6cf906e, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf906f-15b3-11d2-932e-00805f8add32 */ +nsIDOMWindowCollection = { /* a6cf906f-15b3-11d2-932e-00805f8add32 */ 0xa6cf906f, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9070-15b3-11d2-932e-00805f8add32 */ +nsIDOMAttr = { /* a6cf9070-15b3-11d2-932e-00805f8add32 */ 0xa6cf9070, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9071-15b3-11d2-932e-00805f8add32 */ +nsIDOMCDATASection = { /* a6cf9071-15b3-11d2-932e-00805f8add32 */ 0xa6cf9071, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9072-15b3-11d2-932e-00805f8add32 */ +nsIDOMCharacterData = { /* a6cf9072-15b3-11d2-932e-00805f8add32 */ 0xa6cf9072, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9073-15b3-11d2-932e-00805f8add32 */ +nsIDOMComment = { /* a6cf9073-15b3-11d2-932e-00805f8add32 */ 0xa6cf9073, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9074-15b3-11d2-932e-00805f8add32 */ +nsIDOMDOMImplementation = { /* a6cf9074-15b3-11d2-932e-00805f8add32 */ 0xa6cf9074, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9075-15b3-11d2-932e-00805f8add32 */ +nsIDOMDocument = { /* a6cf9075-15b3-11d2-932e-00805f8add32 */ 0xa6cf9075, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9076-15b3-11d2-932e-00805f8add32 */ +nsIDOMDocumentFragment = { /* a6cf9076-15b3-11d2-932e-00805f8add32 */ 0xa6cf9076, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9077-15b3-11d2-932e-00805f8add32 */ +nsIDOMDocumentType = { /* a6cf9077-15b3-11d2-932e-00805f8add32 */ 0xa6cf9077, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9078-15b3-11d2-932e-00805f8add32 */ +nsIDOMElement = { /* a6cf9078-15b3-11d2-932e-00805f8add32 */ 0xa6cf9078, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9079-15b3-11d2-932e-00805f8add32 */ +nsIDOMEntity = { /* a6cf9079-15b3-11d2-932e-00805f8add32 */ 0xa6cf9079, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf907a-15b3-11d2-932e-00805f8add32 */ +nsIDOMEntityReference = { /* a6cf907a-15b3-11d2-932e-00805f8add32 */ 0xa6cf907a, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf907b-15b3-11d2-932e-00805f8add32 */ +nsIDOMNamedNodeMap = { /* a6cf907b-15b3-11d2-932e-00805f8add32 */ 0xa6cf907b, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf907c-15b3-11d2-932e-00805f8add32 */ +nsIDOMNode = { /* a6cf907c-15b3-11d2-932e-00805f8add32 */ 0xa6cf907c, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf907d-15b3-11d2-932e-00805f8add32 */ +nsIDOMNodeList = { /* a6cf907d-15b3-11d2-932e-00805f8add32 */ 0xa6cf907d, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf907e-15b3-11d2-932e-00805f8add32 */ +nsIDOMNotation = { /* a6cf907e-15b3-11d2-932e-00805f8add32 */ 0xa6cf907e, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf907f-15b3-11d2-932e-00805f8add32 */ +nsIDOMProcessingInstruction = { /* a6cf907f-15b3-11d2-932e-00805f8add32 */ 0xa6cf907f, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9080-15b3-11d2-932e-00805f8add32 */ +nsIDOMStyleSheet = { /* a6cf9080-15b3-11d2-932e-00805f8add32 */ 0xa6cf9080, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9081-15b3-11d2-932e-00805f8add32 */ +nsIDOMStyleSheetCollection = { /* a6cf9081-15b3-11d2-932e-00805f8add32 */ 0xa6cf9081, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9082-15b3-11d2-932e-00805f8add32 */ +nsIDOMText = { /* a6cf9082-15b3-11d2-932e-00805f8add32 */ 0xa6cf9082, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9083-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLCollection = { /* a6cf9083-15b3-11d2-932e-00805f8add32 */ 0xa6cf9083, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9084-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLDocument = { /* a6cf9084-15b3-11d2-932e-00805f8add32 */ 0xa6cf9084, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9085-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLElement = { /* a6cf9085-15b3-11d2-932e-00805f8add32 */ 0xa6cf9085, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9086-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLHtmlElement = { /* a6cf9086-15b3-11d2-932e-00805f8add32 */ 0xa6cf9086, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9087-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLHeadElement = { /* a6cf9087-15b3-11d2-932e-00805f8add32 */ 0xa6cf9087, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9088-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLLinkElement = { /* a6cf9088-15b3-11d2-932e-00805f8add32 */ 0xa6cf9088, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9089-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTitleElement = { /* a6cf9089-15b3-11d2-932e-00805f8add32 */ 0xa6cf9089, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf908a-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLMetaElement = { /* a6cf908a-15b3-11d2-932e-00805f8add32 */ 0xa6cf908a, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf908b-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLBaseElement = { /* a6cf908b-15b3-11d2-932e-00805f8add32 */ 0xa6cf908b, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf908c-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLIsIndexElement = { /* a6cf908c-15b3-11d2-932e-00805f8add32 */ 0xa6cf908c, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf908d-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLStyleElement = { /* a6cf908d-15b3-11d2-932e-00805f8add32 */ 0xa6cf908d, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf908e-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLBodyElement = { /* a6cf908e-15b3-11d2-932e-00805f8add32 */ 0xa6cf908e, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf908f-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLFormElement = { /* a6cf908f-15b3-11d2-932e-00805f8add32 */ 0xa6cf908f, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9090-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLSelectElement = { /* a6cf9090-15b3-11d2-932e-00805f8add32 */ 0xa6cf9090, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9091-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLOptGroupElement = { /* a6cf9091-15b3-11d2-932e-00805f8add32 */ 0xa6cf9091, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9092-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLOptionElement = { /* a6cf9092-15b3-11d2-932e-00805f8add32 */ 0xa6cf9092, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9093-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLInputElement = { /* a6cf9093-15b3-11d2-932e-00805f8add32 */ 0xa6cf9093, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9094-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTextAreaElement = { /* a6cf9094-15b3-11d2-932e-00805f8add32 */ 0xa6cf9094, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9095-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLButtonElement = { /* a6cf9095-15b3-11d2-932e-00805f8add32 */ 0xa6cf9095, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9096-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLLabelElement = { /* a6cf9096-15b3-11d2-932e-00805f8add32 */ 0xa6cf9096, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9097-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLFieldSetElement = { /* a6cf9097-15b3-11d2-932e-00805f8add32 */ 0xa6cf9097, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9098-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLLegendElement = { /* a6cf9098-15b3-11d2-932e-00805f8add32 */ 0xa6cf9098, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf9099-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLUListElement = { /* a6cf9099-15b3-11d2-932e-00805f8add32 */ 0xa6cf9099, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf909a-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLOListElement = { /* a6cf909a-15b3-11d2-932e-00805f8add32 */ 0xa6cf909a, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf909b-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLDListElement = { /* a6cf909b-15b3-11d2-932e-00805f8add32 */ 0xa6cf909b, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf909c-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLDirectoryElement = { /* a6cf909c-15b3-11d2-932e-00805f8add32 */ 0xa6cf909c, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf909d-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLMenuElement = { /* a6cf909d-15b3-11d2-932e-00805f8add32 */ 0xa6cf909d, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf909e-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLLIElement = { /* a6cf909e-15b3-11d2-932e-00805f8add32 */ 0xa6cf909e, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf909f-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLBlockquoteElement = { /* a6cf909f-15b3-11d2-932e-00805f8add32 */ 0xa6cf909f, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a0-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLDivElement = { /* a6cf90a0-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a0, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a1-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLParagraphElement = { /* a6cf90a1-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a1, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a2-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLHeadingElement = { /* a6cf90a2-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a2, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a3-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLQuoteElement = { /* a6cf90a3-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a3, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a4-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLPreElement = { /* a6cf90a4-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a4, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a5-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLBRElement = { /* a6cf90a5-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a5, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a6-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLBaseFontElement = { /* a6cf90a6-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a6, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a7-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLFontElement = { /* a6cf90a7-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a7, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a8-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLHRElement = { /* a6cf90a8-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a8, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90a9-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLModElement = { /* a6cf90a9-15b3-11d2-932e-00805f8add32 */ 0xa6cf90a9, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90aa-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLAnchorElement = { /* a6cf90aa-15b3-11d2-932e-00805f8add32 */ 0xa6cf90aa, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90ab-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLImageElement = { /* a6cf90ab-15b3-11d2-932e-00805f8add32 */ 0xa6cf90ab, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90ac-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLObjectElement = { /* a6cf90ac-15b3-11d2-932e-00805f8add32 */ 0xa6cf90ac, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90ad-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLParamElement = { /* a6cf90ad-15b3-11d2-932e-00805f8add32 */ 0xa6cf90ad, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90ae-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLAppletElement = { /* a6cf90ae-15b3-11d2-932e-00805f8add32 */ 0xa6cf90ae, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90af-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLMapElement = { /* a6cf90af-15b3-11d2-932e-00805f8add32 */ 0xa6cf90af, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b0-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLAreaElement = { /* a6cf90b0-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b0, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b1-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLScriptElement = { /* a6cf90b1-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b1, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b2-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTableElement = { /* a6cf90b2-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b2, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b3-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTableCaptionElement = { /* a6cf90b3-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b3, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b4-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTableColElement = { /* a6cf90b4-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b4, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b5-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTableSectionElement = { /* a6cf90b5-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b5, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b6-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTableRowElement = { /* a6cf90b6-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b6, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b7-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLTableCellElement = { /* a6cf90b7-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b7, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b8-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLFrameSetElement = { /* a6cf90b8-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b8, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90b9-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLFrameElement = { /* a6cf90b9-15b3-11d2-932e-00805f8add32 */ 0xa6cf90b9, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90ba-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLIFrameElement = { /* a6cf90ba-15b3-11d2-932e-00805f8add32 */ 0xa6cf90ba, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90bb-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSFontFaceRule = { /* a6cf90bb-15b3-11d2-932e-00805f8add32 */ 0xa6cf90bb, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90bc-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSMediaRule = { /* a6cf90bc-15b3-11d2-932e-00805f8add32 */ 0xa6cf90bc, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90bd-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSPageRule = { /* a6cf90bd-15b3-11d2-932e-00805f8add32 */ 0xa6cf90bd, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90be-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSStyleDeclaration = { /* a6cf90be-15b3-11d2-932e-00805f8add32 */ 0xa6cf90be, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90bf-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSStyleRule = { /* a6cf90bf-15b3-11d2-932e-00805f8add32 */ 0xa6cf90bf, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c0-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSStyleRuleCollection = { /* a6cf90c0-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c0, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c1-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSStyleRuleSimple = { /* a6cf90c1-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c1, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c2-15b3-11d2-932e-00805f8add32 */ +nsIDOMCSSStyleSheet = { /* a6cf90c2-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c2, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c3-15b3-11d2-932e-00805f8add32 */ +nsIDOMEvent = { /* a6cf90c3-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c3, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c4-15b3-11d2-932e-00805f8add32 */ +nsIDOMNSEvent = { /* a6cf90c4-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c4, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c5-15b3-11d2-932e-00805f8add32 */ +nsIDOMNSHTMLDocument = { /* a6cf90c5-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c5, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c6-15b3-11d2-932e-00805f8add32 */ +nsIDOMNSHTMLFormElement = { /* a6cf90c6-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c6, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c7-15b3-11d2-932e-00805f8add32 */ +nsIDOMImage = { /* a6cf90c7-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c7, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; -INTERFACENAME = { /* a6cf90c8-15b3-11d2-932e-00805f8add32 */ +nsIDOMHTMLImageElementFactory = { /* a6cf90c8-15b3-11d2-932e-00805f8add32 */ 0xa6cf90c8, 0x15b3, 0x11d2, @@ -6023,3 +6023,5 @@ INTERFACENAME = { /* a6cf9437-15b3-11d2-932e-00805f8add32 */ 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }; + +