Bug 363230 – Adding a library definition (with a new UUID) around the ISimpleDomNode interface in ISimpleDomNode.idl and then compiling with midl to make a tlb causes a compile error with get_domNode, r=aaronlev
authorAlexander Surkov <surkov.alexander@gmail.com>
Wed, 23 Jul 2008 23:11:21 +0800
changeset 16142 328bf22c060517956ab9ce8928919a41ed862579
parent 16141 e5f605503a8983cda69107f7c6a21478609995bb
child 16143 b9032fa50289d5b16663b9b61ec12fd55b51694c
push idunknown
push userunknown
push dateunknown
reviewersaaronlev
bugs363230
milestone1.9.1a2pre
Bug 363230 – Adding a library definition (with a new UUID) around the ISimpleDomNode interface in ISimpleDomNode.idl and then compiling with midl to make a tlb causes a compile error with get_domNode, r=aaronlev
accessible/public/msaa/ISimpleDOMDocument.idl
accessible/public/msaa/ISimpleDOMNode.idl
accessible/public/msaa/Makefile.in
--- a/accessible/public/msaa/ISimpleDOMDocument.idl
+++ b/accessible/public/msaa/ISimpleDOMDocument.idl
@@ -87,40 +87,32 @@ cpp_quote("// * See latest W3C CSS specs
 cpp_quote("//")
 cpp_quote("//")
 cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
 cpp_quote("")
 cpp_quote("")
 
 import "objidl.idl";
 import "oaidl.idl";
-        
-        
-const long DISPID_DOC_URL         = -5904;
-const long DISPID_DOC_TITLE       = -5905;
-const long DISPID_DOC_MIMETYPE    = -5906;
-const long DISPID_DOC_DOCTYPE     = -5907;
-const long DISPID_DOC_NAMESPACE   = -5908;
-const long DISPID_DOC_MEDIATYPES  = -5909;
 
 [object, uuid(0D68D6D0-D93D-4d08-A30D-F00DD1F45B24)]
 interface ISimpleDOMDocument : IUnknown
 {
-  [propget, id(DISPID_DOC_URL)] HRESULT URL(
+  [propget] HRESULT URL(
     [out, retval] BSTR * url
   );
-  [propget, id(DISPID_DOC_TITLE)] HRESULT title(
+  [propget] HRESULT title(
     [out, retval] BSTR * title
   );
-  [propget, id(DISPID_DOC_MIMETYPE)] HRESULT mimeType(
+  [propget] HRESULT mimeType(
     [out, retval] BSTR * mimeType
   );
-  [propget, id(DISPID_DOC_DOCTYPE)] HRESULT docType(
+  [propget] HRESULT docType(
     [out, retval] BSTR * docType
   );
-  [propget, id(DISPID_DOC_NAMESPACE)] HRESULT nameSpaceURIForID(
+  [propget] HRESULT nameSpaceURIForID(
     [in]  short nameSpaceID,
     [out, retval] BSTR * nameSpaceURI
   );
-  [propput, id(DISPID_DOC_MEDIATYPES)] HRESULT alternateViewMediaTypes(
+  [propput] HRESULT alternateViewMediaTypes(
     [in] BSTR * commaSeparatedMediaTypes
 	);
 }
--- a/accessible/public/msaa/ISimpleDOMNode.idl
+++ b/accessible/public/msaa/ISimpleDOMNode.idl
@@ -128,23 +128,19 @@ cpp_quote("// Returns the computed langu
 cpp_quote("//")
 cpp_quote("//")
 cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
 cpp_quote("")
 cpp_quote("")
 
 import "objidl.idl";
 import "oaidl.idl";
-        
-const long DISPID_NODE_NODEINFO   = -5900;
-const long DISPID_NODE_ATTRIBUTES = -5901;
-const long DISPID_NODE_ATTRIBUTESFORNAMES = -5902;
-const long DISPID_NODE_COMPSTYLE  = -5903;
-const long DISPID_NODE_COMPSTYLEFORPROPS = -5904;
-const long DISPID_NODE_LANGUAGE = -5905;
+
+import "ISimpleDOMText.idl";
+import "ISimpleDOMDocument.idl";
 
 [object, uuid(1814ceeb-49e2-407f-af99-fa755a7d2607)]
 interface ISimpleDOMNode : IUnknown
 {
   const unsigned short NODETYPE_ELEMENT = 1;
   const unsigned short NODETYPE_ATTRIBUTE = 2;
   const unsigned short NODETYPE_TEXT = 3;
   const unsigned short NODETYPE_CDATA_SECTION = 4;
@@ -152,49 +148,49 @@ interface ISimpleDOMNode : IUnknown
   const unsigned short NODETYPE_ENTITY = 6;
   const unsigned short NODETYPE_PROCESSING_INSTRUCTION = 7;
   const unsigned short NODETYPE_COMMENT = 8;
   const unsigned short NODETYPE_DOCUMENT = 9;
   const unsigned short NODETYPE_DOCUMENT_TYPE = 10;
   const unsigned short NODETYPE_DOCUMENT_FRAGMENT = 11;
   const unsigned short NODETYPE_NOTATION = 12;
 
-  [propget, id(DISPID_NODE_NODEINFO)] HRESULT nodeInfo(
+  [propget] HRESULT nodeInfo(
     [out] BSTR *nodeName,   // for performance returns NULL for text nodes (true nodeName would be "#text")
     [out] short *nameSpaceID,
     [out] BSTR *nodeValue,
     [out] unsigned int *numChildren,
     [out] unsigned int *uniqueID, // In Win32 accessible events we generate, the target's childID matches to this
     [out, retval] unsigned short *nodeType
   );
 
-  [propget, id(DISPID_NODE_ATTRIBUTES)] HRESULT attributes(  
+  [propget] HRESULT attributes(  
     [in] unsigned short maxAttribs,
     [out, size_is(maxAttribs), length_is(*numAttribs)] BSTR *attribNames, 
     [out, size_is(maxAttribs), length_is(*numAttribs)] short *nameSpaceID,  
     [out, size_is(maxAttribs), length_is(*numAttribs)] BSTR *attribValues,
     [out, retval] unsigned short *numAttribs
   );
 
-  [propget, id(DISPID_NODE_ATTRIBUTESFORNAMES)] HRESULT attributesForNames(  
+  [propget] HRESULT attributesForNames(  
     [in] unsigned short numAttribs,
     [in, size_is(numAttribs), length_is(numAttribs)] BSTR *attribNames, 
     [in, size_is(numAttribs), length_is(numAttribs)] short *nameSpaceID,  
     [out, retval, size_is(numAttribs), length_is(numAttribs)] BSTR *attribValues
   );
 
-  [propget, id(DISPID_NODE_COMPSTYLE)] HRESULT computedStyle(  
+  [propget] HRESULT computedStyle(  
     [in] unsigned short maxStyleProperties,
     [in] boolean useAlternateView,  // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes
     [out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR *styleProperties, 
     [out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR *styleValues,
     [out, retval] unsigned short *numStyleProperties
   );
 
-  [propget, id(DISPID_NODE_COMPSTYLEFORPROPS)] HRESULT computedStyleForProperties(  
+  [propget] HRESULT computedStyleForProperties(  
     [in] unsigned short numStyleProperties, 
     [in] boolean useAlternateView,  // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes
     [in, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR *styleProperties, 
     [out, retval, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR *styleValues
   );
 
   HRESULT scrollTo([in] boolean placeTopLeft);
 
@@ -205,12 +201,23 @@ interface ISimpleDOMNode : IUnknown
   [propget] HRESULT nextSibling([out, retval] ISimpleDOMNode **node);
   [propget] HRESULT childAt([in] unsigned childIndex, 
                             [out, retval] ISimpleDOMNode **node);
 
   [propget] HRESULT innerHTML([out, retval] BSTR *innerHTML);
 
   [propget, local] HRESULT localInterface([out][retval] void **localInterface);
 
-  [propget, id(DISPID_NODE_LANGUAGE)] HRESULT language([out, retval] BSTR *language);
+  [propget] HRESULT language([out, retval] BSTR *language);
 }
 
 
+[
+    uuid(a6245497-9c0b-4449-85a5-bd6ad07df8ea), 
+    helpstring("ISimpleDOM Type Library")
+] 
+library ISimpleDOM 
+{
+  interface ISimpleDOMNode;
+  interface ISimpleDOMText;
+  interface ISimpleDOMDocument;
+};
+
--- a/accessible/public/msaa/Makefile.in
+++ b/accessible/public/msaa/Makefile.in
@@ -93,17 +93,17 @@ OS_LIBS = \
 	$(NULL)
 
 $(MIDL_GENERATED_FILES): done_gen
 
 done_gen: ISimpleDOMNode.idl \
           ISimpleDOMDocument.idl \
           ISimpleDOMText.idl
 
-	$(MIDL) $(MIDL_FLAGS) -Oicf $(srcdir)/ISimpleDOMNode.idl
+	$(MIDL) $(MIDL_FLAGS) -I $(srcdir) -Oicf $(srcdir)/ISimpleDOMNode.idl
 	$(MIDL) $(MIDL_FLAGS) -Oicf $(srcdir)/ISimpleDOMDocument.idl
 	$(MIDL) $(MIDL_FLAGS) -Oicf $(srcdir)/ISimpleDOMText.idl
 	touch $@
 
 EXPORTS = \
 	ISimpleDOMNode.h \
 	ISimpleDOMNode_i.c \
 	ISimpleDOMDocument.h \