Commit f5e3281a authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Wine Gecko 2.34 release.

parent 8db1df50
......@@ -52,14 +52,14 @@
WINE_DEFAULT_DEBUG_CHANNEL(appwizcpl);
#define GECKO_VERSION "2.24"
#define GECKO_VERSION "2.34"
#ifdef __i386__
#define ARCH_STRING "x86"
#define GECKO_SHA "b4923c0565e6cbd20075a0d4119ce3b48424f962"
#define GECKO_SHA "e9646cf9d683a6f4e254bcff3864a863fe8287e9"
#elif defined(__x86_64__)
#define ARCH_STRING "x86_64"
#define GECKO_SHA "da65fb99a53d87c831030ec8787e31d797f60e60"
#define GECKO_SHA "2b4274f7c3b22b74c35ebc0423bb943597af3945"
#else
#define ARCH_STRING ""
#define GECKO_SHA "???"
......
......@@ -44,6 +44,7 @@ typedef struct {
nsILoadGroup *load_group;
nsIInterfaceRequestor *notif_callback;
nsISupports *owner;
nsILoadInfo *load_info;
nsLoadFlags load_flags;
nsIURI *original_uri;
nsIURI *referrer;
......
......@@ -724,7 +724,7 @@ static HRESULT HTMLAnchorElement_handle_event(HTMLDOMNode *iface, eventid_t eid,
if(eid == EVENTID_CLICK) {
nsIDOMMouseEvent *mouse_event;
UINT16 button;
INT16 button;
nsresult nsres;
TRACE("CLICK\n");
......
......@@ -2211,7 +2211,7 @@ static HRESULT WINAPI HTMLDocument3_getElementsByName(IHTMLDocument3 *iface, BST
* types and search should be case insensitive. Those are currently not supported properly.
*/
nsAString_InitDepend(&selector_str, selector);
nsres = nsIDOMNodeSelector_QuerySelectorAll(This->doc_node->nsnode_selector, &selector_str, &node_list);
nsres = nsIDOMHTMLDocument_QuerySelectorAll(This->doc_node->nsdoc, &selector_str, &node_list);
nsAString_Finish(&selector_str);
heap_free(selector);
if(NS_FAILED(nsres)) {
......@@ -4340,11 +4340,6 @@ static void HTMLDocumentNode_destructor(HTMLDOMNode *iface)
while(!list_empty(&This->plugin_hosts))
detach_plugin_host(LIST_ENTRY(list_head(&This->plugin_hosts), PluginHost, entry));
if(This->nsnode_selector) {
nsIDOMNodeSelector_Release(This->nsnode_selector);
This->nsnode_selector = NULL;
}
if(!This->nsdoc && This->window) {
/* document fragments own reference to inner window */
IHTMLWindow2_Release(&This->window->base.IHTMLWindow2_iface);
......@@ -4366,8 +4361,6 @@ static void HTMLDocumentNode_traverse(HTMLDOMNode *iface, nsCycleCollectionTrave
{
HTMLDocumentNode *This = impl_from_HTMLDOMNode(iface);
if(This->nsnode_selector)
note_cc_edge((nsISupports*)This->nsnode_selector, "This->nsnode_selector", cb);
if(This->nsdoc)
note_cc_edge((nsISupports*)This->nsdoc, "This->nsdoc", cb);
}
......@@ -4376,11 +4369,6 @@ static void HTMLDocumentNode_unlink(HTMLDOMNode *iface)
{
HTMLDocumentNode *This = impl_from_HTMLDOMNode(iface);
if(This->nsnode_selector) {
nsIDOMNodeSelector_Release(This->nsnode_selector);
This->nsnode_selector = NULL;
}
if(This->nsdoc) {
nsIDOMHTMLDocument *nsdoc = This->nsdoc;
......@@ -4534,7 +4522,6 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo
HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_obj, HTMLInnerWindow *window, HTMLDocumentNode **ret)
{
HTMLDocumentNode *doc;
nsresult nsres;
doc = alloc_doc_node(doc_obj, window);
if(!doc)
......@@ -4548,9 +4535,6 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_ob
nsIDOMHTMLDocument_AddRef(nsdoc);
doc->nsdoc = nsdoc;
nsres = nsIDOMHTMLDocument_QueryInterface(nsdoc, &IID_nsIDOMNodeSelector, (void**)&doc->nsnode_selector);
assert(nsres == NS_OK);
init_document_mutation(doc);
doc_init_events(doc);
......
......@@ -551,7 +551,7 @@ static HRESULT WINAPI HTMLEventObj_get_keyCode(IHTMLEventObj *iface, LONG *p)
static HRESULT WINAPI HTMLEventObj_get_button(IHTMLEventObj *iface, LONG *p)
{
HTMLEventObj *This = impl_from_IHTMLEventObj(iface);
UINT16 button = 0;
INT16 button = 0;
TRACE("(%p)->(%p)\n", This, p);
......
......@@ -36,6 +36,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
static HTMLDOMNode *get_node_obj(IHTMLDOMNode*);
static HRESULT create_node(HTMLDocumentNode*,nsIDOMNode*,HTMLDOMNode**);
static ExternalCycleCollectionParticipant node_ccp;
typedef struct {
DispatchEx dispex;
IHTMLDOMChildrenCollection IHTMLDOMChildrenCollection_iface;
......@@ -477,7 +479,9 @@ static HRESULT WINAPI HTMLDOMNode_QueryInterface(IHTMLDOMNode *iface,
static ULONG WINAPI HTMLDOMNode_AddRef(IHTMLDOMNode *iface)
{
HTMLDOMNode *This = impl_from_IHTMLDOMNode(iface);
LONG ref = ccref_incr(&This->ccref, (nsISupports*)&This->IHTMLDOMNode_iface);
LONG ref;
ref = ccref_incr(&This->ccref, (nsISupports*)&This->IHTMLDOMNode_iface);
TRACE("(%p) ref=%d\n", This, ref);
......@@ -487,18 +491,10 @@ static ULONG WINAPI HTMLDOMNode_AddRef(IHTMLDOMNode *iface)
static ULONG WINAPI HTMLDOMNode_Release(IHTMLDOMNode *iface)
{
HTMLDOMNode *This = impl_from_IHTMLDOMNode(iface);
LONG ref = ccref_decr(&This->ccref, (nsISupports*)&This->IHTMLDOMNode_iface);
LONG ref = ccref_decr(&This->ccref, (nsISupports*)&This->IHTMLDOMNode_iface, /*&node_ccp*/ NULL);
TRACE("(%p) ref=%d\n", This, ref);
if(!ref) {
if(This->vtbl->unlink)
This->vtbl->unlink(This);
This->vtbl->destructor(This);
release_dispex(&This->dispex);
heap_free(This);
}
return ref;
}
......@@ -1158,8 +1154,6 @@ static const IHTMLDOMNode2Vtbl HTMLDOMNode2Vtbl = {
HTMLDOMNode2_get_ownerDocument
};
static nsXPCOMCycleCollectionParticipant node_ccp;
HRESULT HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid, void **ppv)
{
TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
......@@ -1287,12 +1281,6 @@ static HRESULT create_node(HTMLDocumentNode *doc, nsIDOMNode *nsnode, HTMLDOMNod
return S_OK;
}
static void NSAPI HTMLDOMNode_unmark_if_purple(void *p)
{
HTMLDOMNode *This = impl_from_IHTMLDOMNode(p);
ccref_unmark_if_purple(&This->ccref);
}
static nsresult NSAPI HTMLDOMNode_traverse(void *ccp, void *p, nsCycleCollectionTraversalCallback *cb)
{
HTMLDOMNode *This = impl_from_IHTMLDOMNode(p);
......@@ -1341,12 +1329,25 @@ static nsresult NSAPI HTMLDOMNode_unlink(void *p)
return NS_OK;
}
static void NSAPI HTMLDOMNode_delete_cycle_collectable(void *p)
{
HTMLDOMNode *This = impl_from_IHTMLDOMNode(p);
TRACE("(%p)\n", This);
if(This->vtbl->unlink)
This->vtbl->unlink(This);
This->vtbl->destructor(This);
release_dispex(&This->dispex);
heap_free(This);
}
void init_node_cc(void)
{
static const CCObjCallback node_ccp_callback = {
HTMLDOMNode_unmark_if_purple,
HTMLDOMNode_traverse,
HTMLDOMNode_unlink
HTMLDOMNode_unlink,
HTMLDOMNode_delete_cycle_collectable
};
ccp_init(&node_ccp, &node_ccp_callback);
......
......@@ -244,28 +244,29 @@ struct DispatchEx {
};
typedef struct {
void *x;
UINT_PTR x;
} nsCycleCollectingAutoRefCnt;
typedef struct {
void *x[9];
} nsXPCOMCycleCollectionParticipant;
void *vtbl;
int ref_flags;
void *callbacks;
} ExternalCycleCollectionParticipant;
typedef struct nsCycleCollectionTraversalCallback nsCycleCollectionTraversalCallback;
typedef struct {
void (NSAPI *unmark_if_purple)(void*);
nsresult (NSAPI *traverse)(void*,void*,nsCycleCollectionTraversalCallback*);
nsresult (NSAPI *unlink)(void*);
void (NSAPI *delete_cycle_collectable)(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*);
nsrefcnt (__cdecl *ccref_decr)(nsCycleCollectingAutoRefCnt*,nsISupports*,ExternalCycleCollectionParticipant*);
void (__cdecl *ccref_init)(nsCycleCollectingAutoRefCnt*,nsrefcnt);
void (__cdecl *ccref_unmark_if_purple)(nsCycleCollectingAutoRefCnt*);
void (__cdecl *ccp_init)(nsXPCOMCycleCollectionParticipant*,const CCObjCallback*);
void (__cdecl *ccp_init)(ExternalCycleCollectionParticipant*,const CCObjCallback*);
void (__cdecl *describe_cc_node)(nsCycleCollectingAutoRefCnt*,const char*,nsCycleCollectionTraversalCallback*);
void (__cdecl *note_cc_edge)(nsISupports*,const char*,nsCycleCollectionTraversalCallback*);
......@@ -729,7 +730,6 @@ struct HTMLDocumentNode {
HTMLInnerWindow *window;
nsIDOMHTMLDocument *nsdoc;
nsIDOMNodeSelector *nsnode_selector;
BOOL content_ready;
event_target_t *body_event_target;
......
......@@ -592,12 +592,12 @@ static void NSAPI nsDocumentObserver_EndLoad(nsIDocumentObserver *iface, nsIDocu
}
static void NSAPI nsDocumentObserver_ContentStatesChanged(nsIDocumentObserver *iface, nsIDocument *aDocument,
nsIContent *aContent, nsEventStates *aStateMask)
nsIContent *aContent, EventStates aStateMask)
{
}
static void NSAPI nsDocumentObserver_DocumentStatesChanged(nsIDocumentObserver *iface, nsIDocument *aDocument,
nsEventStates *aStateMask)
EventStates aStateMask)
{
}
......
......@@ -1964,7 +1964,7 @@ static HRESULT navigate_fragment(HTMLOuterWindow *window, IUri *uri)
sprintfW(selector, selector_formatW, frag);
nsAString_InitDepend(&selector_str, selector);
/* NOTE: Gecko doesn't set result to NULL if there is no match, so nselem must be initialized */
nsres = nsIDOMNodeSelector_QuerySelector(window->base.inner_window->doc->nsnode_selector, &selector_str, &nselem);
nsres = nsIDOMHTMLDocument_QuerySelector(window->base.inner_window->doc->nsdoc, &selector_str, &nselem);
nsAString_Finish(&selector_str);
heap_free(selector);
if(NS_SUCCEEDED(nsres) && nselem) {
......
......@@ -527,7 +527,6 @@ static BOOL load_xul(const PRUnichar *gre_path)
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);
......
......@@ -1179,6 +1179,32 @@ static nsresult NSAPI nsChannel_GetContentDispositionHeader(nsIHttpChannel *ifac
return NS_ERROR_NOT_IMPLEMENTED;
}
static nsresult NSAPI nsChannel_GetLoadInfo(nsIHttpChannel *iface, nsILoadInfo **aLoadInfo)
{
nsChannel *This = impl_from_nsIHttpChannel(iface);
TRACE("(%p)->(%p)\n", This, aLoadInfo);
if(This->load_info)
nsISupports_AddRef(This->load_info);
*aLoadInfo = This->load_info;
return NS_OK;
}
static nsresult NSAPI nsChannel_SetLoadInfo(nsIHttpChannel *iface, nsILoadInfo *aLoadInfo)
{
nsChannel *This = impl_from_nsIHttpChannel(iface);
TRACE("(%p)->(%p)\n", This, aLoadInfo);
if(This->load_info)
nsISupports_Release(This->load_info);
This->load_info = aLoadInfo;
if(This->load_info)
nsISupports_AddRef(This->load_info);
return NS_OK;
}
static nsresult NSAPI nsChannel_GetRequestMethod(nsIHttpChannel *iface, nsACString *aRequestMethod)
{
nsChannel *This = impl_from_nsIHttpChannel(iface);
......@@ -1287,6 +1313,20 @@ static nsresult NSAPI nsChannel_SetAllowPipelining(nsIHttpChannel *iface, cpp_bo
return NS_ERROR_NOT_IMPLEMENTED;
}
static nsresult NSAPI nsChannel_GetAllowTLS(nsIHttpChannel *iface, cpp_bool *aAllowTLS)
{
nsChannel *This = impl_from_nsIHttpChannel(iface);
FIXME("(%p)->(%p)\n", This, aAllowTLS);
return NS_ERROR_NOT_IMPLEMENTED;
}
static nsresult NSAPI nsChannel_SetAllowTLS(nsIHttpChannel *iface, cpp_bool aAllowTLS)
{
nsChannel *This = impl_from_nsIHttpChannel(iface);
FIXME("(%p)->(%x)\n", This, aAllowTLS);
return NS_ERROR_NOT_IMPLEMENTED;
}
static nsresult NSAPI nsChannel_GetRedirectionLimit(nsIHttpChannel *iface, UINT32 *aRedirectionLimit)
{
nsChannel *This = impl_from_nsIHttpChannel(iface);
......@@ -1443,6 +1483,8 @@ static const nsIHttpChannelVtbl nsChannelVtbl = {
nsChannel_GetContentDispositionFilename,
nsChannel_SetContentDispositionFilename,
nsChannel_GetContentDispositionHeader,
nsChannel_GetLoadInfo,
nsChannel_SetLoadInfo,
nsChannel_GetRequestMethod,
nsChannel_SetRequestMethod,
nsChannel_GetReferrer,
......@@ -1452,6 +1494,8 @@ static const nsIHttpChannelVtbl nsChannelVtbl = {
nsChannel_VisitRequestHeaders,
nsChannel_GetAllowPipelining,
nsChannel_SetAllowPipelining,
nsChannel_GetAllowTLS,
nsChannel_SetAllowTLS,
nsChannel_GetRedirectionLimit,
nsChannel_SetRedirectionLimit,
nsChannel_GetResponseStatus,
......@@ -1613,6 +1657,15 @@ static nsresult NSAPI nsHttpChannelInternal_GetResponseVersion(nsIHttpChannelInt
return NS_ERROR_NOT_IMPLEMENTED;
}
static nsresult NSAPI nsHttpChannelInternal_TakeAllSecurityMessages(nsIHttpChannelInternal *iface, void *aMessages)
{
nsChannel *This = impl_from_nsIHttpChannelInternal(iface);
FIXME("(%p)->()\n", This);
return NS_ERROR_NOT_IMPLEMENTED;
}
static nsresult NSAPI nsHttpChannelInternal_SetCookie(nsIHttpChannelInternal *iface, const char *aCookieHeader)
{
nsChannel *This = impl_from_nsIHttpChannelInternal(iface);
......@@ -1779,6 +1832,7 @@ static const nsIHttpChannelInternalVtbl nsHttpChannelInternalVtbl = {
nsHttpChannelInternal_SetDocumentURI,
nsHttpChannelInternal_GetRequestVersion,
nsHttpChannelInternal_GetResponseVersion,
nsHttpChannelInternal_TakeAllSecurityMessages,
nsHttpChannelInternal_SetCookie,
nsHttpChannelInternal_SetupFallbackChannel,
nsHttpChannelInternal_GetForceAllowThirdPartyCookie,
......
......@@ -229,7 +229,6 @@ void set_document_navigation(HTMLDocumentObj *doc, BOOL doc_can_navigate)
static void load_settings(HTMLDocumentObj *doc)
{
nsIMarkupDocumentViewer *markup_document_viewer;
nsIContentViewer *content_viewer;
nsIDocShell *doc_shell;
HKEY settings_key;
......@@ -261,16 +260,13 @@ static void load_settings(HTMLDocumentObj *doc)
nsres = nsIDocShell_GetContentViewer(doc_shell, &content_viewer);
assert(nsres == NS_OK && content_viewer);
nsIDocShell_Release(doc_shell);
nsres = nsISupports_QueryInterface(content_viewer, &IID_nsIMarkupDocumentViewer, (void**)&markup_document_viewer);
nsISupports_Release(content_viewer);
assert(nsres == NS_OK);
nsres = nsIMarkupDocumentViewer_SetFullZoom(markup_document_viewer, (float)val/100000);
nsres = nsIContentViewer_SetFullZoom(content_viewer, (float)val/100000);
if(NS_FAILED(nsres))
ERR("SetFullZoom failed: %08x\n", nsres);
nsIDocShell_Release(doc_shell);
nsIContentViewer_Release(content_viewer);
}
static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite *pClientSite)
......
......@@ -1416,7 +1416,7 @@ void bind_event_scripts(HTMLDocumentNode *doc)
return;
nsAString_InitDepend(&selector_str, selectorW);
nsres = nsIDOMNodeSelector_QuerySelectorAll(doc->nsnode_selector, &selector_str, &node_list);
nsres = nsIDOMHTMLDocument_QuerySelectorAll(doc->nsdoc, &selector_str, &node_list);
nsAString_Finish(&selector_str);
if(NS_FAILED(nsres)) {
ERR("QuerySelectorAll failed: %08x\n", nsres);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment