Hi all,
It's a bit sooner for another Gecko update than usually. This is caused
by the fact, that many existing bugs in our MSHTML are blocked by
another bugs, which require Gecko changes for proper fix. These changes
enable using Gecko's cycle collector to understand our objects. This
solves quite a few problems. The update also contains merged Firefox 14
beta changes. To test it, download Wine Gecko [1] and install it as
usually [2]. You will also need the attached patch. The patch contains
not only Gecko API changes, but also partial (but substantial enough for
test to be meaningful) support for cycle collector in MSHTML. You may
find some bugs already fixed by this patch.
Any help with testing will be appreciated.
Thanks,
Jacek
[1] http://sourceforge.net/projects/wine/files/Wine%20Gecko/1.7-beta1/
[2] http://wiki.winehq.org/Gecko
diff --git a/dlls/appwiz.cpl/addons.c b/dlls/appwiz.cpl/addons.c
index 8e93dee..f820250 100644
--- a/dlls/appwiz.cpl/addons.c
+++ b/dlls/appwiz.cpl/addons.c
@@ -51,7 +51,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(appwizcpl);
-#define GECKO_VERSION "1.6"
+#define GECKO_VERSION "1.7-beta1"
#ifdef __i386__
#define ARCH_STRING "x86"
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c
index 66dad69..6b9c1d3 100644
--- a/dlls/mshtml/dispex.c
+++ b/dlls/mshtml/dispex.c
@@ -1350,6 +1350,38 @@ BOOL dispex_query_interface(DispatchEx *This, REFIID
riid, void **ppv)
return TRUE;
}
+void dispex_traverse(DispatchEx *This, nsCycleCollectionTraversalCallback *cb)
+{
+ dynamic_prop_t *prop;
+
+ if(!This->dynamic_data)
+ return;
+
+ for(prop = This->dynamic_data->props; prop < This->dynamic_data->props +
This->dynamic_data->prop_cnt; prop++) {
+ if(V_VT(&prop->var) == VT_DISPATCH)
+ note_cc_edge((nsISupports*)V_DISPATCH(&prop->var), "dispex_data",
cb);
+ }
+
+ /* FIXME: Traverse func_disps */
+}
+
+void dispex_unlink(DispatchEx *This)
+{
+ dynamic_prop_t *prop;
+
+ if(!This->dynamic_data)
+ return;
+
+ for(prop = This->dynamic_data->props; prop < This->dynamic_data->props +
This->dynamic_data->prop_cnt; prop++) {
+ if(V_VT(&prop->var) == VT_DISPATCH) {
+ V_VT(&prop->var) = VT_EMPTY;
+ IDispatch_Release(V_DISPATCH(&prop->var));
+ }else {
+ VariantClear(&prop->var);
+ }
+ }
+}
+
void release_dispex(DispatchEx *This)
{
dynamic_prop_t *prop;
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index 53e98c7..32d0567 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -2080,13 +2080,14 @@ static void HTMLDocumentNode_destructor(HTMLDOMNode
*iface)
detach_selection(This);
detach_ranges(This);
- release_nodes(This);
while(!list_empty(&This->plugin_hosts))
detach_plugin_host(LIST_ENTRY(list_head(&This->plugin_hosts),
PluginHost, entry));
- if(This->nsdoc)
+ if(This->nsdoc) {
release_document_mutation(This);
+ nsIDOMHTMLDocument_Release(This->nsdoc);
+ }
heap_free(This->event_vector);
destroy_htmldoc(&This->basedoc);
@@ -2099,10 +2100,44 @@ static HRESULT HTMLDocumentNode_clone(HTMLDOMNode
*iface, nsIDOMNode *nsnode, HT
return E_NOTIMPL;
}
+static void HTMLDocumentNode_traverse(HTMLDOMNode *iface,
nsCycleCollectionTraversalCallback *cb)
+{
+ HTMLDocumentNode *This = impl_from_HTMLDOMNode(iface);
+
+ if(This->nsdoc)
+ note_cc_edge((nsISupports*)This->nsdoc, "This->nsdoc", cb);
+}
+
+static void HTMLDocumentNode_unlink(HTMLDOMNode *iface)
+{
+ HTMLDocumentNode *This = impl_from_HTMLDOMNode(iface);
+
+ if(This->nsdoc) {
+ nsIDOMHTMLDocument *nsdoc = This->nsdoc;
+
+ release_document_mutation(This);
+ This->nsdoc = NULL;
+ nsIDOMHTMLDocument_Release(nsdoc);
+ }
+}
+
static const NodeImplVtbl HTMLDocumentNodeImplVtbl = {
HTMLDocumentNode_QI,
HTMLDocumentNode_destructor,
- HTMLDocumentNode_clone
+ HTMLDocumentNode_clone,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ HTMLDocumentNode_traverse,
+ HTMLDocumentNode_unlink
};
static HRESULT HTMLDocumentFragment_clone(HTMLDOMNode *iface, nsIDOMNode
*nsnode, HTMLDOMNode **ret)
@@ -2237,8 +2272,7 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc,
HTMLDocumentObj *doc_ob
HTMLDOMNode_Init(doc, &doc->node, (nsIDOMNode*)nsdoc);
- /* No AddRef, share the reference with nsnode */
- assert((nsIDOMNode*)nsdoc == doc->node.nsnode);
+ nsIDOMHTMLDocument_AddRef(nsdoc);
doc->nsdoc = nsdoc;
init_document_mutation(doc);
diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c
index 3951494..6bdddce 100644
--- a/dlls/mshtml/htmlnode.c
+++ b/dlls/mshtml/htmlnode.c
@@ -17,6 +17,7 @@
*/
#include <stdarg.h>
+#include <assert.h>
#define COBJMACROS
@@ -312,7 +313,7 @@ static HRESULT WINAPI
HTMLDOMNode_QueryInterface(IHTMLDOMNode *iface,
static ULONG WINAPI HTMLDOMNode_AddRef(IHTMLDOMNode *iface)
{
HTMLDOMNode *This = impl_from_IHTMLDOMNode(iface);
- LONG ref = InterlockedIncrement(&This->ref);
+ LONG ref = ccref_incr(&This->ccref,
(nsISupports*)&This->IHTMLDOMNode_iface);
TRACE("(%p) ref=%d\n", This, ref);
@@ -322,7 +323,7 @@ static ULONG WINAPI HTMLDOMNode_AddRef(IHTMLDOMNode *iface)
static ULONG WINAPI HTMLDOMNode_Release(IHTMLDOMNode *iface)
{
HTMLDOMNode *This = impl_from_IHTMLDOMNode(iface);
- LONG ref = InterlockedDecrement(&This->ref);
+ LONG ref = ccref_decr(&This->ccref,
(nsISupports*)&This->IHTMLDOMNode_iface);
TRACE("(%p) ref=%d\n", This, ref);
@@ -977,6 +978,8 @@ static const IHTMLDOMNode2Vtbl HTMLDOMNode2Vtbl = {
HTMLDOMNode2_get_ownerDocument
};
+static nsXPCOMCycleCollectionParticipant node_ccp;
+
HRESULT HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid, void **ppv)
{
*ppv = NULL;
@@ -1001,6 +1004,14 @@ HRESULT HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid,
void **ppv)
}else if(IsEqualGUID(&IID_IHTMLDOMNode2, riid)) {
TRACE("(%p)->(IID_IHTMLDOMNode2 %p)\n", This, ppv);
*ppv = &This->IHTMLDOMNode2_iface;
+ }else if(IsEqualGUID(&IID_nsXPCOMCycleCollectionParticipant, riid)) {
+ TRACE("(%p)->(IID_nsXPCOMCycleCollectionParticipant %p)\n", This, ppv);
+ *ppv = &node_ccp;
+ return NS_OK;
+ }else if(IsEqualGUID(&IID_nsCycleCollectionISupports, riid)) {
+ TRACE("(%p)->(IID_nsCycleCollectionISupports %p)\n", This, ppv);
+ *ppv = &This->IHTMLDOMNode_iface;
+ return NS_OK;
}else if(dispex_query_interface(&This->dispex, riid, ppv)) {
return *ppv ? S_OK : E_NOINTERFACE;
}
@@ -1018,6 +1029,8 @@ void HTMLDOMNode_destructor(HTMLDOMNode *This)
{
if(This->nsnode)
nsIDOMNode_Release(This->nsnode);
+ if(This->doc && &This->doc->node != This)
+ htmldoc_release(&This->doc->basedoc);
if(This->event_target)
release_event_target(This->event_target);
}
@@ -1035,20 +1048,23 @@ static const NodeImplVtbl HTMLDOMNodeImplVtbl = {
void HTMLDOMNode_Init(HTMLDocumentNode *doc, HTMLDOMNode *node, nsIDOMNode
*nsnode)
{
+ nsresult nsres;
+
node->IHTMLDOMNode_iface.lpVtbl = &HTMLDOMNodeVtbl;
node->IHTMLDOMNode2_iface.lpVtbl = &HTMLDOMNode2Vtbl;
- node->ref = 2;
- node->doc = doc;
if(&doc->node != node)
- node->ref++; /* one extra for list entry reference */
+ htmldoc_addref(&doc->basedoc);
+ node->doc = doc;
+
+ ccref_init(&node->ccref, 1);
if(nsnode)
nsIDOMNode_AddRef(nsnode);
node->nsnode = nsnode;
- node->next = doc->nodes;
- doc->nodes = node;
+ nsres = nsIDOMNode_SetMshtmlNode(nsnode,
(nsISupports*)&node->IHTMLDOMNode_iface);
+ assert(nsres == NS_OK);
}
static HRESULT create_node(HTMLDocumentNode *doc, nsIDOMNode *nsnode,
HTMLDOMNode **ret)
@@ -1100,43 +1116,83 @@ static HRESULT create_node(HTMLDocumentNode *doc,
nsIDOMNode *nsnode, HTMLDOMNod
return S_OK;
}
-/*
- * FIXME
- * List looks really ugly here. We should use a better data structure or
- * (better) find a way to store HTMLDOMelement pointer in nsIDOMNode.
- */
+static void NSAPI HTMLDOMNode_unmark_if_purple(void *p)
+{
+ HTMLDOMNode *This = impl_from_IHTMLDOMNode(p);
+ TRACE("%p\n", This);
+ ccref_unmark_if_purple(&This->ccref);
+}
-HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create,
HTMLDOMNode **ret)
+static nsresult NSAPI HTMLDOMNode_traverse(void *ccp, void *p,
nsCycleCollectionTraversalCallback *cb)
{
- HTMLDOMNode *iter = This->nodes;
+ HTMLDOMNode *This = impl_from_IHTMLDOMNode(p);
- while(iter) {
- if(iter->nsnode == nsnode)
- break;
- iter = iter->next;
+ TRACE("%p\n", This);
+
+ describe_cc_node(&This->ccref, sizeof(*This), "HTMLDOMNode", cb);
+
+ if(This->nsnode)
+ note_cc_edge((nsISupports*)This->nsnode, "This->nsnode", cb);
+ if(This->doc && &This->doc->node != This)
+ note_cc_edge((nsISupports*)&This->doc->node.IHTMLDOMNode_iface,
"This->doc", cb);
+ dispex_traverse(&This->dispex, cb);
+
+ return S_OK;
+}
+
+static nsresult NSAPI HTMLDOMNode_unlink(void *p)
+{
+ HTMLDOMNode *This = impl_from_IHTMLDOMNode(p);
+
+ TRACE("%p\n", This);
+
+ dispex_unlink(&This->dispex);
+
+ if(This->nsnode) {
+ nsIDOMNode *nsnode = This->nsnode;
+ This->nsnode = NULL;
+ nsIDOMNode_Release(nsnode);
}
- if(iter || !create) {
- if(iter)
- IHTMLDOMNode_AddRef(&iter->IHTMLDOMNode_iface);
- *ret = iter;
- return S_OK;
+ if(This->doc && &This->doc->node != This) {
+ HTMLDocument *doc = &This->doc->basedoc;
+ This->doc = NULL;
+ htmldoc_release(doc);
+ }else {
+ This->doc = NULL;
}
- return create_node(This, nsnode, ret);
+ return NS_OK;
+}
+
+void init_node_cc(void)
+{
+ static const CCObjCallback node_ccp_callback = {
+ HTMLDOMNode_unmark_if_purple,
+ HTMLDOMNode_traverse,
+ HTMLDOMNode_unlink
+ };
+
+ ccp_init(&node_ccp, &node_ccp_callback);
}
-void release_nodes(HTMLDocumentNode *This)
+HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create,
HTMLDOMNode **ret)
{
- HTMLDOMNode *iter, *next;
+ nsISupports *unk = NULL;
+ nsresult nsres;
- if(!This->nodes)
- return;
+ nsres = nsIDOMNode_GetMshtmlNode(nsnode, &unk);
+ assert(nsres == NS_OK);
- for(iter = This->nodes; iter; iter = next) {
- next = iter->next;
- iter->doc = NULL;
- if(&This->node != iter)
- IHTMLDOMNode_Release(&iter->IHTMLDOMNode_iface);
+ if(unk) {
+ *ret = get_node_obj(This, (IUnknown*)unk);
+ return NS_OK;
}
+
+ if(!create) {
+ *ret = NULL;
+ return S_OK;
+ }
+
+ return create_node(This, nsnode, ret);
}
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index f050411..cdc4c94 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -225,6 +225,32 @@ struct DispatchEx {
dispex_dynamic_data_t *dynamic_data;
};
+typedef struct {
+ void *x;
+} nsCycleCollectingAutoRefCnt;
+
+typedef struct {
+ void *x[3];
+} nsXPCOMCycleCollectionParticipant;
+
+typedef struct nsCycleCollectionTraversalCallback
nsCycleCollectionTraversalCallback;
+
+typedef struct {
+ void (NSAPI *unmark_if_purple)(void*);
+ nsresult (NSAPI
*traverse)(void*,void*,nsCycleCollectionTraversalCallback*);
+ nsresult (NSAPI *unlink)(void*);
+} CCObjCallback;
+
+DEFINE_GUID(IID_nsXPCOMCycleCollectionParticipant,
0x9674489b,0x1f6f,0x4550,0xa7,0x30, 0xcc,0xae,0xdd,0x10,0x4c,0xf9);
+
+nsrefcnt (__cdecl *ccref_incr)(nsCycleCollectingAutoRefCnt*,nsISupports*);
+nsrefcnt (__cdecl *ccref_decr)(nsCycleCollectingAutoRefCnt*,nsISupports*);
+void (__cdecl *ccref_init)(nsCycleCollectingAutoRefCnt*,nsrefcnt);
+void (__cdecl *ccref_unmark_if_purple)(nsCycleCollectingAutoRefCnt*);
+void (__cdecl *ccp_init)(nsXPCOMCycleCollectionParticipant*,const
CCObjCallback*);
+void (__cdecl *describe_cc_node)(nsCycleCollectingAutoRefCnt*,size_t,const
char*,nsCycleCollectionTraversalCallback*);
+void (__cdecl *note_cc_edge)(nsISupports*,const
char*,nsCycleCollectionTraversalCallback*);
+
void init_dispex(DispatchEx*,IUnknown*,dispex_static_data_t*) DECLSPEC_HIDDEN;
void release_dispex(DispatchEx*) DECLSPEC_HIDDEN;
BOOL dispex_query_interface(DispatchEx*,REFIID,void**) DECLSPEC_HIDDEN;
@@ -232,6 +258,8 @@ HRESULT dispex_get_dprop_ref(DispatchEx*,const
WCHAR*,BOOL,VARIANT**) DECLSPEC_H
HRESULT get_dispids(tid_t,DWORD*,DISPID**) DECLSPEC_HIDDEN;
HRESULT remove_prop(DispatchEx*,BSTR,VARIANT_BOOL*) DECLSPEC_HIDDEN;
HRESULT dispex_get_dynid(DispatchEx*,const WCHAR*,DISPID*) DECLSPEC_HIDDEN;
+void dispex_traverse(DispatchEx*,nsCycleCollectionTraversalCallback*)
DECLSPEC_HIDDEN;
+void dispex_unlink(DispatchEx*) DECLSPEC_HIDDEN;
void release_typelib(void) DECLSPEC_HIDDEN;
HRESULT get_htmldoc_classinfo(ITypeInfo **typeinfo) DECLSPEC_HIDDEN;
@@ -554,6 +582,8 @@ typedef struct {
HRESULT (*get_dispid)(HTMLDOMNode*,BSTR,DWORD,DISPID*);
HRESULT
(*invoke)(HTMLDOMNode*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
HRESULT (*bind_to_tree)(HTMLDOMNode*);
+ void (*traverse)(HTMLDOMNode*,nsCycleCollectionTraversalCallback*);
+ void (*unlink)(HTMLDOMNode*);
} NodeImplVtbl;
struct HTMLDOMNode {
@@ -562,14 +592,12 @@ struct HTMLDOMNode {
IHTMLDOMNode2 IHTMLDOMNode2_iface;
const NodeImplVtbl *vtbl;
- LONG ref;
+ nsCycleCollectingAutoRefCnt ccref;
nsIDOMNode *nsnode;
HTMLDocumentNode *doc;
event_target_t *event_target;
ConnectionPointContainer *cp_container;
-
- HTMLDOMNode *next;
};
static inline void node_addref(HTMLDOMNode *node)
@@ -638,7 +666,6 @@ struct HTMLDocumentNode {
LONG ref;
nsIDOMHTMLDocument *nsdoc;
- HTMLDOMNode *nodes;
BOOL content_ready;
event_target_t *body_event_target;
@@ -719,6 +746,8 @@ void init_nsio(nsIComponentManager*,nsIComponentRegistrar*)
DECLSPEC_HIDDEN;
void release_nsio(void) DECLSPEC_HIDDEN;
BOOL is_gecko_path(const char*) DECLSPEC_HIDDEN;
+void init_node_cc(void);
+
HRESULT nsuri_to_url(LPCWSTR,BOOL,BSTR*) DECLSPEC_HIDDEN;
BOOL compare_ignoring_frag(IUri*,IUri*) DECLSPEC_HIDDEN;
@@ -845,7 +874,6 @@ HRESULT HTMLFrameBase_QI(HTMLFrameBase*,REFIID,void**)
DECLSPEC_HIDDEN;
void HTMLFrameBase_destructor(HTMLFrameBase*) DECLSPEC_HIDDEN;
HRESULT get_node(HTMLDocumentNode*,nsIDOMNode*,BOOL,HTMLDOMNode**)
DECLSPEC_HIDDEN;
-void release_nodes(HTMLDocumentNode*) DECLSPEC_HIDDEN;
HTMLElement *unsafe_impl_from_IHTMLElement(IHTMLElement*) DECLSPEC_HIDDEN;
diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c
index 70bdfa7..8ff7ad2 100644
--- a/dlls/mshtml/nsembed.c
+++ b/dlls/mshtml/nsembed.c
@@ -347,6 +347,21 @@ static BOOL load_xul(const PRUnichar *gre_path)
#undef NS_DLSYM
+#define NS_DLSYM(func) \
+ func = (void *)GetProcAddress(xul_handle, #func); \
+ if(!func) \
+ ERR("Could not GetProcAddress(" #func ") failed\n")
+
+ NS_DLSYM(ccref_incr);
+ NS_DLSYM(ccref_decr);
+ NS_DLSYM(ccref_init);
+ NS_DLSYM(ccref_unmark_if_purple);
+ NS_DLSYM(ccp_init);
+ NS_DLSYM(describe_cc_node);
+ NS_DLSYM(note_cc_edge);
+
+#undef NS_DLSYM
+
return TRUE;
}
@@ -561,6 +576,8 @@ static BOOL init_xpcom(const PRUnichar *gre_path)
nsIComponentRegistrar_Release(registrar);
}
+ init_node_cc();
+
return TRUE;
}
diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl
index 006a1cc..4711b02 100644
--- a/dlls/mshtml/nsiface.idl
+++ b/dlls/mshtml/nsiface.idl
@@ -23,7 +23,7 @@
* compatible with XPCOM, usable in C code.
*/
-cpp_quote("#define GECKO_VERSION \"1.6\"")
+cpp_quote("#define GECKO_VERSION \"1.7-beta1\"")
cpp_quote("#define GECKO_VERSION_STRING \"Wine Gecko \" GECKO_VERSION")
import "wtypes.idl";
@@ -873,6 +873,9 @@ interface nsIDOMNode : nsISupports
nsresult SetUserData(const nsAString *key, nsIVariant *data,
nsIDOMUserDataHandler *handler, nsIVariant **_retval);
nsresult GetUserData(const nsAString *key, nsIVariant **_retval);
nsresult Contains(nsIDOMNode *aOther, bool *_retval);
+
+ nsresult GetMshtmlNode(nsISupports **aMshtmlNode);
+ nsresult SetMshtmlNode(nsISupports *aMshtmlNode);
}
[
@@ -907,7 +910,7 @@ interface nsIDOMClientRect : nsISupports
[
object,
- uuid(f561753a-1d4f-40c1-b147-ea955fc6fd94),
+ uuid(69d44ce2-b544-49a8-bb5f-87804b971ee4),
local
]
interface nsIDOMElement : nsIDOMNode
@@ -955,6 +958,8 @@ interface nsIDOMElement : nsIDOMNode
nsresult MozMatchesSelector(const nsAString *selector, bool *_retval);
nsresult SetCapture(bool retargetToElement);
nsresult ReleaseCapture();
+ nsresult MozRequestFullScreen();
+ nsresult MozRequestPointerLock();
}
[
@@ -971,7 +976,7 @@ cpp_quote("#undef GetClassName")
[
object,
- uuid(3de9f8c1-5d76-4d2e-b6b9-334c6eb0c113),
+ uuid(5c8b21bc-ef6e-4599-a26f-facc05b4adbe),
local
]
interface nsIDOMHTMLElement : nsIDOMElement
@@ -1016,7 +1021,6 @@ interface nsIDOMHTMLElement : nsIDOMElement
nsresult GetOffsetLeft(PRInt32 *aOffsetLeft);
nsresult GetOffsetWidth(PRInt32 *aOffsetWidth);
nsresult GetOffsetHeight(PRInt32 *aOffsetHeight);
- nsresult MozRequestFullScreen();
}
[
@@ -1080,7 +1084,7 @@ interface nsIDOMDocumentFragment : nsIDOMNode
[
object,
- uuid(d7cdd08e-1bfd-4bc3-9742-d66586781ee2),
+ uuid(fdb92f4f-c6b4-4509-a29d-a309981e28ac),
local
]
interface nsIDOMDocument : nsIDOMNode
@@ -1137,10 +1141,12 @@ interface nsIDOMDocument : nsIDOMNode
nsresult GetCurrentScript(nsIDOMElement **aCurrentScript);
nsresult ReleaseCapture();
nsresult MozSetImageElement(const nsAString *aImageElementId,
nsIDOMElement *aImageElement);
- nsresult GetMozFullScreenElement(nsIDOMHTMLElement
**aMozFullScreenElement);
+ nsresult GetMozFullScreenElement(nsIDOMElement **aMozFullScreenElement);
nsresult MozCancelFullScreen();
nsresult GetMozFullScreen(bool *aMozFullScreen);
nsresult GetMozFullScreenEnabled(bool *aMozFullScreenEnabled);
+ nsresult GetMozPointerLockElement(nsIDOMElement **aMozPointerLockElement);
+ nsresult MozExitPointerLock();
nsresult GetOnreadystatechange(JSContext* cx, jsval aOnreadystatechange);
nsresult SetOnreadystatechange(JSContext* cx, const jsval
*aOnreadystatechange);
nsresult GetOnmouseenter(JSContext* cx, jsval *aOnmouseenter);
@@ -1153,7 +1159,7 @@ interface nsIDOMDocument : nsIDOMNode
[
object,
- uuid(cc1af020-6543-429c-82d7-840cda3be0b9),
+ uuid(1b93973f-28cc-4f33-8e7b-b89c63aa9200),
local
]
interface nsIDOMHTMLDocument : nsIDOMDocument
@@ -1182,12 +1188,10 @@ interface nsIDOMHTMLDocument : nsIDOMDocument
nsresult GetDesignMode(nsAString *aDesignMode);
nsresult SetDesignMode(const nsAString *aDesignMode);
nsresult ExecCommand(const nsAString *commandID, bool doShowUI, const
nsAString *value, bool *_retval);
- nsresult ExecCommandShowHelp(const nsAString *commandID, bool *_retval);
nsresult QueryCommandEnabled(const nsAString *commandID, bool *_retval);
nsresult QueryCommandIndeterm(const nsAString *commandID, bool *_retval);
nsresult QueryCommandState(const nsAString *commandID, bool *_retval);
nsresult QueryCommandSupported(const nsAString *commandID, bool *_retval);
- nsresult QueryCommandText(const nsAString *commandID, nsAString *_retval);
nsresult QueryCommandValue(const nsAString *commandID, nsAString *_retval);
nsresult GetFgColor(nsAString *aFgColor);
nsresult SetFgColor(const nsAString *aFgColor);
@@ -1297,7 +1301,7 @@ interface nsIDOMWindowCollection : nsISupports
[
object,
- uuid(17400e2b-f78b-4e69-b500-c2a3135a40fd),
+ uuid(f6e3b10d-d5f4-4fcd-aa4c-5f98626d428a),
local
]
interface nsIDOMWindow : nsISupports
@@ -1322,14 +1326,11 @@ interface nsIDOMWindow : nsISupports
nsresult Focus();
nsresult Blur();
nsresult GetLength(PRUint32 *aLength);
- nsresult GetScriptableTop(nsIDOMWindow **aTop);
- nsresult GetRealTop(nsIDOMWindow **aRealTop);
+ nsresult GetTop(nsIDOMWindow **aTop);
nsresult GetOpener(nsIDOMWindow **aOpener);
nsresult SetOpener(nsIDOMWindow *aOpener);
- nsresult GetScriptableParent(nsIDOMWindow **aParent);
- nsresult GetRealParent(nsIDOMWindow **aParent);
- nsresult GetScriptableFrameElement(nsIDOMElement **aFrameElement);
- nsresult GetRealFrameElement(nsIDOMElement **aFrameElement);
+ nsresult GetParent(nsIDOMWindow **aParent);
+ nsresult GetFrameElement(nsIDOMElement **aFrameElement);
nsresult GetNavigator(nsIDOMNavigator **aNavigator);
nsresult GetApplicationCache(nsIDOMOfflineResourceList
**aApplicationCache);
nsresult Alert(const nsAString *text);
@@ -1441,7 +1442,7 @@ interface nsIDOMWindow : nsISupports
[
object,
- uuid(fbc08701-776e-47d8-8b14-12b27aadc180),
+ uuid(d8f00c8b-d317-4df2-a9bf-4a1e6f19f945),
local
]
interface nsIDOMHTMLBodyElement : nsIDOMHTMLElement
@@ -1486,7 +1487,7 @@ interface nsIDOMHTMLBodyElement : nsIDOMHTMLElement
[
object,
- uuid(b0fa651a-134c-4b20-ba4d-35b956a4fc50),
+ uuid(59c0dc07-d784-410b-8b5e-c26baf7cb8a6),
local
]
interface nsIDOMHTMLFormElement : nsIDOMHTMLElement
@@ -1518,7 +1519,7 @@ interface nsIDOMHTMLFormElement : nsIDOMHTMLElement
[
object,
- uuid(6b1175a5-70dd-4c26-be99-9e780c32550d),
+ uuid(05fedf7e-3050-4143-ab97-b994f3cc9329),
local
]
interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
@@ -1602,7 +1603,7 @@ interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
[
object,
- uuid(ec3cfb59-a945-4821-8ea6-2448970e7639),
+ uuid(68a5d794-39bf-4b00-aefe-754b9e8f7ec6),
local
]
interface nsIDOMHTMLOptionElement : nsIDOMHTMLElement
@@ -1647,7 +1648,7 @@ interface nsIDOMHTMLOptionsCollection : nsISupports
[
object,
- uuid(6f0a4fee-3aea-4bb7-85cb-d4881a55ca43),
+ uuid(2a50d295-8db8-4223-ae0d-070c6eb6c76e),
local
]
interface nsIDOMHTMLSelectElement : nsIDOMHTMLElement
@@ -1686,7 +1687,7 @@ interface nsIDOMHTMLSelectElement : nsIDOMHTMLElement
[
object,
- uuid(0ad0571c-f8ba-44e2-b5aa-5e1c93fae7c0),
+ uuid(2a395065-2d92-48c1-ac00-643de9ca681b),
local
]
interface nsIDOMHTMLTextAreaElement : nsIDOMHTMLElement
@@ -1736,7 +1737,7 @@ interface nsIDOMHTMLTextAreaElement : nsIDOMHTMLElement
[
object,
- uuid(8b79bf24-d127-4b63-a798-f44bee76204d),
+ uuid(e2f548f6-9955-4820-a9e6-3a9fd43c7111),
local
]
interface nsIDOMHTMLScriptElement : nsIDOMHTMLElement
@@ -1757,11 +1758,13 @@ interface nsIDOMHTMLScriptElement : nsIDOMHTMLElement
nsresult SetHtmlFor(const nsAString *aHtmlFor);
nsresult GetEvent(nsAString *aEvent);
nsresult SetEvent(const nsAString *aEvent);
+ nsresult GetCrossOrigin(nsAString *aCrossOrigin);
+ nsresult SetCrossOrigin(const nsAString *aCrossOrigin);
}
[
object,
- uuid(3ed7023f-24be-4cd6-984c-c182a6b67bf9),
+ uuid(c4ef8a40-dd56-4b95-a007-630a0ac04341),
local
]
interface nsIDOMHTMLImageElement : nsIDOMHTMLElement
@@ -1797,11 +1800,13 @@ interface nsIDOMHTMLImageElement : nsIDOMHTMLElement
nsresult SetVspace(PRInt32 aVspace);
nsresult GetLowsrc(nsAString *aLowsrc);
nsresult SetLowsrc(const nsAString *aLowsrc);
+ nsresult GetX(PRInt32 *aX);
+ nsresult GetY(PRInt32 *aY);
}
[
object,
- uuid(44a9c8e1-2c95-41e4-86f1-96033a452a4d),
+ uuid(68f49f8f-5ffd-44eb-a59f-d2b3f4817299),
local
]
interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement
@@ -1849,7 +1854,7 @@ interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement
[
object,
- uuid(7b9d43a6-7e9e-4618-970b-29eb3547d506),
+ uuid(ae50de74-bc26-402e-85dc-a980f506b655),
local
]
interface nsIDOMHTMLTableElement : nsIDOMHTMLElement
@@ -1892,7 +1897,7 @@ interface nsIDOMHTMLTableElement : nsIDOMHTMLElement
[
object,
- uuid(f76a1d42-25b9-41b9-a58e-7d934e1be0a2),
+ uuid(0ac4a382-4f97-4143-a3b3-de0a54978c67),
local
]
interface nsIDOMHTMLTableRowElement : nsIDOMHTMLElement
@@ -1916,7 +1921,7 @@ interface nsIDOMHTMLTableRowElement : nsIDOMHTMLElement
[
object,
- uuid(d4e870bd-452c-4860-b93c-f4ee00ba33f6),
+ uuid(97e4f0e1-bd27-40ec-9287-5634daf15b73),
local
]
interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement
@@ -1949,7 +1954,7 @@ interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement
[
object,
- uuid(4b529afd-ada8-4a2c-a70b-a4e2ead2329d),
+ uuid(2aa7855a-0667-47c3-af1e-9101002816c1),
local
]
interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement
@@ -1976,7 +1981,7 @@ interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement
[
object,
- uuid(dbb14d7b-05ce-4abd-a980-9aedede612af),
+ uuid(a70595dd-68a5-41f5-ab52-73a47d98bd78),
local
]
interface nsIDOMHTMLObjectElement : nsIDOMHTMLElement
@@ -2024,7 +2029,7 @@ interface nsIDOMHTMLObjectElement : nsIDOMHTMLElement
[
object,
- uuid(1f0685fb-bf49-4c39-b08d-7d75b1e5e493),
+ uuid(1fbec0f8-c7cF-4dc8-84be-247985a65e07),
local
]
interface nsIDOMHTMLParamElement : nsIDOMHTMLElement
@@ -2041,7 +2046,7 @@ interface nsIDOMHTMLParamElement : nsIDOMHTMLElement
[
object,
- uuid(04c29aaa-2239-42a9-ade0-0ba3134c1a8e),
+ uuid(830d9170-f8eb-4749-b721-16d60d6b0f1b),
local
]
interface nsIDOMHTMLStyleElement : nsIDOMHTMLElement
@@ -2384,11 +2389,17 @@ interface nsIScrollable : nsISupports
[
object,
- uuid(c8c0a080-0868-11d3-915f-d9d889d48e3c),
+ uuid(272a5020-64f5-485c-a8c4-44b2882ae0a2),
local
]
interface nsIFile : nsISupports
{
+ typedef struct {
+ /* Currently not needed */
+ char dummy;
+ } PRFileDesc, PRLibrary, widl_FILE;
+#define FILE widl_FILE
+
nsresult Append(const nsAString *node);
nsresult AppendNative(const nsAString *node);
nsresult Normalize();
@@ -2434,6 +2445,23 @@ interface nsIFile : nsISupports
nsresult Contains(nsIFile *inFile, bool recir, bool *_retval);
nsresult GetParent(nsIFile **aParent);
nsresult GetDirectoryEntries(nsISimpleEnumerator **aDirectoryEntries);
+ nsresult InitWithPath(const nsAString *filePath);
+ nsresult InitWithNativePath(const nsACString *filePath);
+ nsresult InitWithFile(nsIFile *aFile);
+ nsresult GetFollowLinks(bool *aFollowLinks);
+ nsresult SetFollowLinks(bool aFollowLinks);
+ nsresult OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc
**_retval);
+ nsresult OpenANSIFileDesc(const char *mode, FILE **_retval);
+ nsresult Load(PRLibrary **_retval);
+ nsresult GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable);
+ nsresult AppendRelativePath(const nsAString *relativeFilePath);
+ nsresult AppendRelativeNativePath(const nsACString *relativeFilePath);
+ nsresult GetPersistentDescriptor(nsACString *aPersistentDescriptor);
+ nsresult SetPersistentDescriptor(const nsACString *aPersistentDescriptor);
+ nsresult Reveal();
+ nsresult Launch();
+ nsresult GetRelativeDescriptor(nsIFile *fromFile, nsACString *_retval);
+ nsresult SetRelativeDescriptor(nsIFile *fromFile, const nsACString
*relativeDesc);
}
[
@@ -2627,7 +2655,7 @@ interface nsIDOMEvent : nsISupports
[
object,
- uuid(73b48170-55d5-11e1-b86c-0800200c9a66),
+ uuid(2b3ac53c-2a88-421f-af09-f10665c88acf),
local
]
interface nsIDOMWindowUtils : nsISupports
@@ -2641,6 +2669,8 @@ interface nsIDOMWindowUtils : nsISupports
nsresult SetCSSViewport(float aWidthPx, float aHeightPx);
nsresult SetDisplayPortForElement(float aXPx, float aYPx, float aWidthPx,
float aHeightPx, nsIDOMElement *aElement);
nsresult SetResolution(float aXResolution, float aYResolution);
+ nsresult GetIsFirstPaint(bool *aIsFirstPaint);
+ nsresult SetIsFirstPaint(bool aIsFirstPaint);
nsresult SendMouseEvent(const nsAString *aType, float aX, float aY,
PRInt32 aButton,
PRInt32 aClickCount, PRInt32 aModifiers, bool
aIgnoreRootScrollFrame);
nsresult SendTouchEvent(const nsAString *aType, PRUint32 *aIdentifiers,
PRInt32 *aXs, PRInt32 *aYs,
@@ -2654,8 +2684,10 @@ interface nsIDOMWindowUtils : nsISupports
bool aPreventDefault, bool *_retval);
nsresult SendNativeKeyEvent(PRInt32 aNativeKeyboardLayout, PRInt32
aNativeKeyCode, PRInt32 aModifierFlags,
const nsAString *aCharacters, const nsAString
*aUnmodifiedCharacters);
- nsresult SendNativeMouseEvent(PRInt32 aScreenX, PRInt32 aScreenY, PRInt32
aNativeMessage, PRInt32 aModifierFlags,
+ nsresult SendNativeMouseEvent(PRInt32 aScreenX, PRInt32 aScreenY, PRInt32
aNativeMessage, PRInt32 aModifierFlags,
nsIDOMElement *aElement);
+ nsresult SendNativeMouseScrollEvent(PRInt32 aScreenX, PRInt32 aScreenY,
PRUint32 aNativeMessage, double aDeltaX,
+ double aDeltaY, double aDeltaZ, PRUint32 aModifierFlags, PRUint32
aAdditionalFlags, nsIDOMElement *aElement);
nsresult ActivateNativeMenuItemAt(const nsAString *indexString);
nsresult ForceUpdateNativeMenuAt(const nsAString *indexString);
nsresult Focus(nsIDOMElement *aElement);
@@ -2673,11 +2705,12 @@ interface nsIDOMWindowUtils : nsISupports
nsresult ClearMozAfterPaintEvents();
nsresult DisableNonTestMouseEvents(bool aDisable);
nsresult GetScrollXY(bool aFlushLayout, PRInt32 *aScrollX, PRInt32
*aScrollY);
+ nsresult GetRootBounds(nsIDOMClientRect **_retval);
nsresult GetIMEIsOpen(bool *aIMEIsOpen);
nsresult GetIMEStatus(PRUint32 *aIMEStatus);
nsresult GetScreenPixelsPerCSSPixel(float *aScreenPixelsPerCSSPixel);
nsresult DispatchDOMEventViaPresShell(nsIDOMNode *aTarget, nsIDOMEvent
*aEvent, bool aTrusted, bool *_retval);
- nsresult GetClassName(const /*JS::Value*/ void *aObject, JSContext* cx,
char **_retval);
+ nsresult GetClassName(const /*JS::Value*/ void *aObject, JSContext *cx,
char **_retval);
nsresult SendContentCommandEvent(const nsAString *aType, nsITransferable
*aTransferable);
nsresult SendCompositionEvent(const nsAString *aType, const nsAString
*aData, const nsAString *aLocale);
nsresult SendTextEvent(const nsAString *aCompositionString, PRInt32
aFirstClauseLength, PRUint32 aFirstClauseAttr,
@@ -2727,6 +2760,8 @@ interface nsIDOMWindowUtils : nsISupports
nsresult GetPCCountScriptSummary(PRInt32 script, JSContext *cx, nsAString
*_retval);
nsresult GetPCCountScriptContents(PRInt32 script, JSContext *cx, nsAString
*_retval);
nsresult GetPaintingSuppressed(bool *aPaintingSuppressed);
+ nsresult GetPlugins(JSContext *cx, /*JS::Value*/ void *aPlugins);
+ nsresult SetScrollPositionClampingScrollPortSize(float aWidth, float
aHeight);
}
cpp_quote("#define CONTEXT_NONE 0x00")
@@ -2772,13 +2807,15 @@ interface nsIDOMUIEvent : nsIDOMEvent
[
object,
- uuid(7f57aa45-6792-4d8b-ba5b-201533cf0b2f),
+ uuid(53E29996-F851-4032-B896-8AAFBD0BDF25),
local
]
interface nsIDOMMouseEvent : nsIDOMUIEvent
{
nsresult GetScreenX(PRInt32 *aScreenX);
nsresult GetScreenY(PRInt32 *aScreenY);
+ nsresult GetMozMovementX(PRInt32 *aMozMovementX);
+ nsresult GetMozMovementY(PRInt32 *aMozMovementY);
nsresult GetClientX(PRInt32 *aClientX);
nsresult GetClientY(PRInt32 *aClientY);
nsresult GetCtrlKey(bool *aCtrlKey);
@@ -3017,7 +3054,7 @@ interface nsIController : nsISupports
[
object,
- uuid(94671671-9e1b-447a-adb7-c32e056a96c9),
+ uuid(a887c108-c25e-42ab-87ef-ad4bee502828),
local
]
interface nsIContent : nsISupports
@@ -3027,7 +3064,7 @@ interface nsIContent : nsISupports
[
object,
- uuid(283ec27d-5b23-49b2-94d9-09b5db453073),
+ uuid(8e51e6d9-914d-46ba-b311-2f273de60d19),
local
]
interface nsIDocument : nsISupports
@@ -3061,7 +3098,7 @@ interface nsIContentSerializer : nsISupports
[
object,
- uuid(656005d2-d900-4839-81bf-6274a3c38537),
+ uuid(2e14b183-29d4-4282-9475-589277a70654),
local
]
interface nsIEditor : nsISupports
@@ -3146,11 +3183,12 @@ interface nsIEditor : nsISupports
nsresult DebugUnitTests([out] PRInt32 *outNumTests, [out] PRInt32
*outNumTestsFailed);
bool IsModifiableNode(nsIDOMNode *aNode);
nsresult GetLastKeypressEventTrusted(bool *aLastKeypressEventTrusted);
+ nsresult SetSuppressDispatchingInputEvent(bool
aSuppressDispatchingInputEvent);
}
[
object,
- uuid(ff67ad39-ed58-4cd1-a1a3-dcd988390a97),
+ uuid(833f30de-94c7-4630-a852-2300ef329d7b),
local
]
interface nsIHTMLEditor : nsISupports
@@ -3158,7 +3196,6 @@ interface nsIHTMLEditor : nsISupports
nsresult AddDefaultProperty([in] nsIAtom *aProperty, [in] nsAString
*aAttribute, [in] nsAString *aValue);
nsresult RemoveDefaultProperty([in] nsIAtom *aProperty, [in] nsAString
*aAttribute, [in] nsAString *aValue);
nsresult RemoveAllDefaultProperties();
- nsresult SetCSSInlineProperty([in] nsIAtom *aProperty, [in] nsAString
*aAttribute, [in] nsAString *aValue);
nsresult SetInlineProperty([in] nsIAtom *aProperty, [in] nsAString
*aAttribute, [in] nsAString *aValue);
nsresult GetInlineProperty([in] nsIAtom *aProperty, [in] nsAString
*aAttribute, [in] nsAString *aValue, [out] bool *aFirst, [out] bool *aAny,
[out] bool *aAll);
nsresult GetInlinePropertyWithAttrValue([in] nsIAtom *aProperty, [in]
nsAString *aAttribute, [in] nsAString *aValue, [out] bool *aFirst, [out] bool
*aAny, [out] bool *aAll, [out] nsAString *_retval);
@@ -3215,7 +3252,7 @@ interface nsIHTMLEditor : nsISupports
[
object,
- uuid(dbd39c21-5788-4c68-9d97-0fcee289bce1),
+ uuid(c7325422-817e-4321-957a-c0bdd764941d),
local
]
interface nsIDocShell : nsISupports
@@ -3341,7 +3378,7 @@ interface nsIMutationObserver : nsISupports
[
object,
- uuid(d064f0d6-44e3-4366-a705-cf7a912614b6),
+ uuid(2c4ad90a-740e-4212-ba3f-feacda4b929e),
local
]
interface nsIParser : nsISupports
@@ -3368,7 +3405,6 @@ interface nsIParser : nsISupports
void ContinueInterruptedParsingAsync();
bool IsComplete();
nsresult Parse(nsIURI *aURL, nsIRequestObserver *aListener, void *aKey,
nsDTDMode aMode);
- nsresult Parse2(const nsAString *aSourceBuffer, void *aKey, const
nsACString *aMimeType, bool aLastCall, nsDTDMode aMode);
nsresult Terminate();
nsresult ParseFragment(const nsAString *aSourceBuffer, void
/*nsTArray<nsString>*/ *aTagStack);
nsresult BuildModel();
@@ -3414,6 +3450,13 @@ interface nsIDocumentObserver : nsIMutationObserver
[
object,
+ uuid(c61eac14-5f7a-4481-965e-7eaa6effa85f),
+ local
+]
+interface nsCycleCollectionISupports {}
+
+[
+ object,
uuid(3682dd99-8560-44f4-9b8f-ccce9d7b96fb),
local
]