Commit 2e5f73e4 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Wine Gecko 1.4 release.

parent 8a6a1570
...@@ -51,14 +51,14 @@ ...@@ -51,14 +51,14 @@
WINE_DEFAULT_DEBUG_CHANNEL(appwizcpl); WINE_DEFAULT_DEBUG_CHANNEL(appwizcpl);
#define GECKO_VERSION "1.3" #define GECKO_VERSION "1.4"
#ifdef __i386__ #ifdef __i386__
#define ARCH_STRING "x86" #define ARCH_STRING "x86"
#define GECKO_SHA "acc6a5bc15ebb3574e00f8ef4f23912239658b41" #define GECKO_SHA "c30aa99621e98336eb4b7e2074118b8af8ea2ad5"
#elif defined(__x86_64__) #elif defined(__x86_64__)
#define ARCH_STRING "x86_64" #define ARCH_STRING "x86_64"
#define GECKO_SHA "5bcf29c48677dffa7a9112d481f7f5474cd255d4" #define GECKO_SHA "bf0aaf56a8cf9abd75be02b56b05e5c4e9a4df93"
#else #else
#define ARCH_STRING "" #define ARCH_STRING ""
#define GECKO_SHA "???" #define GECKO_SHA "???"
......
...@@ -182,7 +182,6 @@ static void set_ns_align(HTMLDocument *This, const char *align_str) ...@@ -182,7 +182,6 @@ static void set_ns_align(HTMLDocument *This, const char *align_str)
static DWORD query_align_status(HTMLDocument *This, const WCHAR *align) static DWORD query_align_status(HTMLDocument *This, const WCHAR *align)
{ {
DWORD ret = OLECMDF_SUPPORTED | OLECMDF_ENABLED; DWORD ret = OLECMDF_SUPPORTED | OLECMDF_ENABLED;
nsIDOMNSHTMLDocument *nsdoc;
nsAString justify_str; nsAString justify_str;
PRBool b; PRBool b;
nsresult nsres; nsresult nsres;
...@@ -190,21 +189,12 @@ static DWORD query_align_status(HTMLDocument *This, const WCHAR *align) ...@@ -190,21 +189,12 @@ static DWORD query_align_status(HTMLDocument *This, const WCHAR *align)
if(This->doc_obj->usermode != EDITMODE || This->window->readystate < READYSTATE_INTERACTIVE) if(This->doc_obj->usermode != EDITMODE || This->window->readystate < READYSTATE_INTERACTIVE)
return OLECMDF_SUPPORTED; return OLECMDF_SUPPORTED;
nsres = nsIDOMHTMLDocument_QueryInterface(This->doc_node->nsdoc, &IID_nsIDOMNSHTMLDocument,
(void**)&nsdoc);
if(NS_FAILED(nsres)) {
ERR("Could not get nsIDOMNSHTMLDocument iface: %08x\n", nsres);
return 0;
}
nsAString_Init(&justify_str, align); nsAString_Init(&justify_str, align);
nsres = nsIDOMNSHTMLDocument_QueryCommandState(nsdoc, &justify_str, &b); nsres = nsIDOMHTMLDocument_QueryCommandState(This->doc_node->nsdoc, &justify_str, &b);
nsAString_Finish(&justify_str); nsAString_Finish(&justify_str);
if(NS_SUCCEEDED(nsres) && b) if(NS_SUCCEEDED(nsres) && b)
ret |= OLECMDF_LATCHED; ret |= OLECMDF_LATCHED;
nsIDOMNSHTMLDocument_Release(nsdoc);
return ret; return ret;
} }
......
...@@ -813,9 +813,9 @@ static HRESULT document_write(HTMLDocument *This, SAFEARRAY *psarray, BOOL ln) ...@@ -813,9 +813,9 @@ static HRESULT document_write(HTMLDocument *This, SAFEARRAY *psarray, BOOL ln)
if(V_VT(var+i) == VT_BSTR) { if(V_VT(var+i) == VT_BSTR) {
nsAString_SetData(&nsstr, V_BSTR(var+i)); nsAString_SetData(&nsstr, V_BSTR(var+i));
if(!ln || i != argc-1) if(!ln || i != argc-1)
nsres = nsIDOMHTMLDocument_Write(This->doc_node->nsdoc, &nsstr); nsres = nsIDOMHTMLDocument_Write(This->doc_node->nsdoc, &nsstr, NULL /* FIXME! */);
else else
nsres = nsIDOMHTMLDocument_Writeln(This->doc_node->nsdoc, &nsstr); nsres = nsIDOMHTMLDocument_Writeln(This->doc_node->nsdoc, &nsstr, NULL /* FIXME! */);
if(NS_FAILED(nsres)) if(NS_FAILED(nsres))
ERR("Write failed: %08x\n", nsres); ERR("Write failed: %08x\n", nsres);
}else { }else {
...@@ -851,6 +851,7 @@ static HRESULT WINAPI HTMLDocument_open(IHTMLDocument2 *iface, BSTR url, VARIANT ...@@ -851,6 +851,7 @@ static HRESULT WINAPI HTMLDocument_open(IHTMLDocument2 *iface, BSTR url, VARIANT
VARIANT features, VARIANT replace, IDispatch **pomWindowResult) VARIANT features, VARIANT replace, IDispatch **pomWindowResult)
{ {
HTMLDocument *This = impl_from_IHTMLDocument2(iface); HTMLDocument *This = impl_from_IHTMLDocument2(iface);
nsISupports *tmp;
nsresult nsres; nsresult nsres;
static const WCHAR text_htmlW[] = {'t','e','x','t','/','h','t','m','l',0}; static const WCHAR text_htmlW[] = {'t','e','x','t','/','h','t','m','l',0};
...@@ -867,12 +868,15 @@ static HRESULT WINAPI HTMLDocument_open(IHTMLDocument2 *iface, BSTR url, VARIANT ...@@ -867,12 +868,15 @@ static HRESULT WINAPI HTMLDocument_open(IHTMLDocument2 *iface, BSTR url, VARIANT
|| V_VT(&features) != VT_ERROR || V_VT(&replace) != VT_ERROR) || V_VT(&features) != VT_ERROR || V_VT(&replace) != VT_ERROR)
FIXME("unsupported args\n"); FIXME("unsupported args\n");
nsres = nsIDOMHTMLDocument_Open(This->doc_node->nsdoc); nsres = nsIDOMHTMLDocument_Open(This->doc_node->nsdoc, NULL, NULL, NULL, NULL, 0, &tmp);
if(NS_FAILED(nsres)) { if(NS_FAILED(nsres)) {
ERR("Open failed: %08x\n", nsres); ERR("Open failed: %08x\n", nsres);
return E_FAIL; return E_FAIL;
} }
if(tmp)
nsISupports_Release(tmp);
*pomWindowResult = (IDispatch*)&This->window->IHTMLWindow2_iface; *pomWindowResult = (IDispatch*)&This->window->IHTMLWindow2_iface;
IHTMLWindow2_AddRef(&This->window->IHTMLWindow2_iface); IHTMLWindow2_AddRef(&This->window->IHTMLWindow2_iface);
return S_OK; return S_OK;
...@@ -902,19 +906,11 @@ static HRESULT WINAPI HTMLDocument_close(IHTMLDocument2 *iface) ...@@ -902,19 +906,11 @@ static HRESULT WINAPI HTMLDocument_close(IHTMLDocument2 *iface)
static HRESULT WINAPI HTMLDocument_clear(IHTMLDocument2 *iface) static HRESULT WINAPI HTMLDocument_clear(IHTMLDocument2 *iface)
{ {
HTMLDocument *This = impl_from_IHTMLDocument2(iface); HTMLDocument *This = impl_from_IHTMLDocument2(iface);
nsIDOMNSHTMLDocument *nsdoc;
nsresult nsres; nsresult nsres;
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
nsres = nsIDOMHTMLDocument_QueryInterface(This->doc_node->nsdoc, &IID_nsIDOMNSHTMLDocument, (void**)&nsdoc); nsres = nsIDOMHTMLDocument_Clear(This->doc_node->nsdoc);
if(NS_FAILED(nsres)) {
ERR("Could not get nsIDOMNSHTMLDocument iface: %08x\n", nsres);
return E_FAIL;
}
nsres = nsIDOMNSHTMLDocument_Clear(nsdoc);
nsIDOMNSHTMLDocument_Release(nsdoc);
if(NS_FAILED(nsres)) { if(NS_FAILED(nsres)) {
ERR("Clear failed: %08x\n", nsres); ERR("Clear failed: %08x\n", nsres);
return E_FAIL; return E_FAIL;
...@@ -1297,7 +1293,6 @@ static HRESULT WINAPI HTMLDocument_elementFromPoint(IHTMLDocument2 *iface, LONG ...@@ -1297,7 +1293,6 @@ static HRESULT WINAPI HTMLDocument_elementFromPoint(IHTMLDocument2 *iface, LONG
IHTMLElement **elementHit) IHTMLElement **elementHit)
{ {
HTMLDocument *This = impl_from_IHTMLDocument2(iface); HTMLDocument *This = impl_from_IHTMLDocument2(iface);
nsIDOMNSDocument *nsdoc;
nsIDOMElement *nselem; nsIDOMElement *nselem;
HTMLDOMNode *node; HTMLDOMNode *node;
nsresult nsres; nsresult nsres;
...@@ -1305,14 +1300,7 @@ static HRESULT WINAPI HTMLDocument_elementFromPoint(IHTMLDocument2 *iface, LONG ...@@ -1305,14 +1300,7 @@ static HRESULT WINAPI HTMLDocument_elementFromPoint(IHTMLDocument2 *iface, LONG
TRACE("(%p)->(%d %d %p)\n", This, x, y, elementHit); TRACE("(%p)->(%d %d %p)\n", This, x, y, elementHit);
nsres = nsIDOMHTMLDocument_QueryInterface(This->doc_node->nsdoc, &IID_nsIDOMNSDocument, (void**)&nsdoc); nsres = nsIDOMHTMLDocument_ElementFromPoint(This->doc_node->nsdoc, x, y, &nselem);
if(NS_FAILED(nsres)) {
ERR("Could not get nsIDOMNSDocument iface: %08x\n", nsres);
return E_FAIL;
}
nsres = nsIDOMNSDocument_ElementFromPoint(nsdoc, x, y, &nselem);
nsIDOMNSDocument_Release(nsdoc);
if(NS_FAILED(nsres)) { if(NS_FAILED(nsres)) {
ERR("ElementFromPoint failed: %08x\n", nsres); ERR("ElementFromPoint failed: %08x\n", nsres);
return E_FAIL; return E_FAIL;
...@@ -1347,7 +1335,6 @@ static HRESULT WINAPI HTMLDocument_get_styleSheets(IHTMLDocument2 *iface, ...@@ -1347,7 +1335,6 @@ static HRESULT WINAPI HTMLDocument_get_styleSheets(IHTMLDocument2 *iface,
{ {
HTMLDocument *This = impl_from_IHTMLDocument2(iface); HTMLDocument *This = impl_from_IHTMLDocument2(iface);
nsIDOMStyleSheetList *nsstylelist; nsIDOMStyleSheetList *nsstylelist;
nsIDOMDocumentStyle *nsdocstyle;
nsresult nsres; nsresult nsres;
TRACE("(%p)->(%p)\n", This, p); TRACE("(%p)->(%p)\n", This, p);
...@@ -1359,16 +1346,14 @@ static HRESULT WINAPI HTMLDocument_get_styleSheets(IHTMLDocument2 *iface, ...@@ -1359,16 +1346,14 @@ static HRESULT WINAPI HTMLDocument_get_styleSheets(IHTMLDocument2 *iface,
return E_UNEXPECTED; return E_UNEXPECTED;
} }
nsIDOMHTMLDocument_QueryInterface(This->doc_node->nsdoc, &IID_nsIDOMDocumentStyle, (void**)&nsdocstyle); nsres = nsIDOMHTMLDocument_GetStyleSheets(This->doc_node->nsdoc, &nsstylelist);
nsres = nsIDOMDocumentStyle_GetStyleSheets(nsdocstyle, &nsstylelist);
nsIDOMDocumentStyle_Release(nsdocstyle);
if(NS_FAILED(nsres)) { if(NS_FAILED(nsres)) {
ERR("GetStyleSheets failed: %08x\n", nsres); ERR("GetStyleSheets failed: %08x\n", nsres);
return E_FAIL; return E_FAIL;
} }
*p = HTMLStyleSheetsCollection_Create(nsstylelist); *p = HTMLStyleSheetsCollection_Create(nsstylelist);
nsIDOMDocumentStyle_Release(nsstylelist); nsIDOMStyleSheetList_Release(nsstylelist);
return S_OK; return S_OK;
} }
......
...@@ -507,28 +507,18 @@ static HRESULT WINAPI HTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v ...@@ -507,28 +507,18 @@ static HRESULT WINAPI HTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v
if(nsnode_by_name && nsnode_by_id) { if(nsnode_by_name && nsnode_by_id) {
nsIDOM3Node *node3;
PRUint16 pos; PRUint16 pos;
nsres = nsIDOMNode_QueryInterface(nsnode_by_name, &IID_nsIDOM3Node, (void**)&node3); nsres = nsIDOMNode_CompareDocumentPosition(nsnode_by_name, nsnode_by_id, &pos);
if(NS_FAILED(nsres)) { if(NS_FAILED(nsres)) {
FIXME("failed to get nsIDOM3Node interface: 0x%08x\n", nsres); FIXME("CompareDocumentPosition failed: 0x%08x\n", nsres);
nsIDOMNode_Release(nsnode_by_name);
nsIDOMNode_Release(nsnode_by_id);
return E_FAIL;
}
nsres = nsIDOM3Node_CompareDocumentPosition(node3, nsnode_by_id, &pos);
nsIDOM3Node_Release(node3);
if(NS_FAILED(nsres)) {
FIXME("nsIDOM3Node_CompareDocumentPosition failed: 0x%08x\n", nsres);
nsIDOMNode_Release(nsnode_by_name); nsIDOMNode_Release(nsnode_by_name);
nsIDOMNode_Release(nsnode_by_id); nsIDOMNode_Release(nsnode_by_id);
return E_FAIL; return E_FAIL;
} }
TRACE("CompareDocumentPosition gave: 0x%x\n", pos); TRACE("CompareDocumentPosition gave: 0x%x\n", pos);
if(pos & PRECEDING || pos & CONTAINS) { if(pos & (DOCUMENT_POSITION_PRECEDING | DOCUMENT_POSITION_CONTAINS)) {
nsnode = nsnode_by_id; nsnode = nsnode_by_id;
nsIDOMNode_Release(nsnode_by_name); nsIDOMNode_Release(nsnode_by_name);
}else { }else {
......
...@@ -246,10 +246,8 @@ static HRESULT WINAPI HTMLDocument5_get_onbeforedeactivate(IHTMLDocument5 *iface ...@@ -246,10 +246,8 @@ static HRESULT WINAPI HTMLDocument5_get_onbeforedeactivate(IHTMLDocument5 *iface
static HRESULT WINAPI HTMLDocument5_get_compatMode(IHTMLDocument5 *iface, BSTR *p) static HRESULT WINAPI HTMLDocument5_get_compatMode(IHTMLDocument5 *iface, BSTR *p)
{ {
HTMLDocument *This = impl_from_IHTMLDocument5(iface); HTMLDocument *This = impl_from_IHTMLDocument5(iface);
nsIDOMNSHTMLDocument *nshtmldoc;
nsAString mode_str; nsAString mode_str;
const PRUnichar *mode; const PRUnichar *mode;
nsresult nsres;
TRACE("(%p)->(%p)\n", This, p); TRACE("(%p)->(%p)\n", This, p);
...@@ -258,15 +256,8 @@ static HRESULT WINAPI HTMLDocument5_get_compatMode(IHTMLDocument5 *iface, BSTR * ...@@ -258,15 +256,8 @@ static HRESULT WINAPI HTMLDocument5_get_compatMode(IHTMLDocument5 *iface, BSTR *
return E_UNEXPECTED; return E_UNEXPECTED;
} }
nsres = nsIDOMHTMLDocument_QueryInterface(This->doc_node->nsdoc, &IID_nsIDOMNSHTMLDocument, (void**)&nshtmldoc);
if(NS_FAILED(nsres)) {
ERR("Could not get nsIDOMNSHTMLDocument: %08x\n", nsres);
return S_OK;
}
nsAString_Init(&mode_str, NULL); nsAString_Init(&mode_str, NULL);
nsIDOMNSHTMLDocument_GetCompatMode(nshtmldoc, &mode_str); nsIDOMHTMLDocument_GetCompatMode(This->doc_node->nsdoc, &mode_str);
nsIDOMNSHTMLDocument_Release(nshtmldoc);
nsAString_GetData(&mode_str, &mode); nsAString_GetData(&mode_str, &mode);
*p = SysAllocString(mode); *p = SysAllocString(mode);
......
...@@ -494,7 +494,7 @@ static HRESULT WINAPI HTMLImgElement_put_width(IHTMLImgElement *iface, LONG v) ...@@ -494,7 +494,7 @@ static HRESULT WINAPI HTMLImgElement_put_width(IHTMLImgElement *iface, LONG v)
static HRESULT WINAPI HTMLImgElement_get_width(IHTMLImgElement *iface, LONG *p) static HRESULT WINAPI HTMLImgElement_get_width(IHTMLImgElement *iface, LONG *p)
{ {
HTMLImgElement *This = impl_from_IHTMLImgElement(iface); HTMLImgElement *This = impl_from_IHTMLImgElement(iface);
PRInt32 width; PRUint32 width;
nsresult nsres; nsresult nsres;
TRACE("(%p)->(%p)\n", This, p); TRACE("(%p)->(%p)\n", This, p);
...@@ -528,7 +528,7 @@ static HRESULT WINAPI HTMLImgElement_put_height(IHTMLImgElement *iface, LONG v) ...@@ -528,7 +528,7 @@ static HRESULT WINAPI HTMLImgElement_put_height(IHTMLImgElement *iface, LONG v)
static HRESULT WINAPI HTMLImgElement_get_height(IHTMLImgElement *iface, LONG *p) static HRESULT WINAPI HTMLImgElement_get_height(IHTMLImgElement *iface, LONG *p)
{ {
HTMLImgElement *This = impl_from_IHTMLImgElement(iface); HTMLImgElement *This = impl_from_IHTMLImgElement(iface);
PRInt32 height; PRUint32 height;
nsresult nsres; nsresult nsres;
TRACE("(%p)->(%p)\n", This, p); TRACE("(%p)->(%p)\n", This, p);
......
...@@ -63,23 +63,16 @@ static void window_set_docnode(HTMLWindow *window, HTMLDocumentNode *doc_node) ...@@ -63,23 +63,16 @@ static void window_set_docnode(HTMLWindow *window, HTMLDocumentNode *doc_node)
} }
if(doc_node && window->doc_obj && window->doc_obj->usermode == EDITMODE) { if(doc_node && window->doc_obj && window->doc_obj->usermode == EDITMODE) {
nsIDOMNSHTMLDocument *nshtmldoc;
nsAString mode_str; nsAString mode_str;
nsresult nsres; nsresult nsres;
static const PRUnichar onW[] = {'o','n',0}; static const PRUnichar onW[] = {'o','n',0};
nsres = nsIDOMHTMLDocument_QueryInterface(doc_node->nsdoc, &IID_nsIDOMNSHTMLDocument, (void**)&nshtmldoc); nsAString_Init(&mode_str, onW);
if(NS_SUCCEEDED(nsres)) { nsres = nsIDOMHTMLDocument_SetDesignMode(doc_node->nsdoc, &mode_str);
nsAString_Init(&mode_str, onW); nsAString_Finish(&mode_str);
nsres = nsIDOMNSHTMLDocument_SetDesignMode(nshtmldoc, &mode_str); if(NS_FAILED(nsres))
nsAString_Finish(&mode_str); ERR("SetDesignMode failed: %08x\n", nsres);
nsIDOMNSHTMLDocument_Release(nshtmldoc);
if(NS_FAILED(nsres))
ERR("SetDesignMode failed: %08x\n", nsres);
}else {
ERR("Could not get nsIDOMNSHTMLDocument interface: %08x\n", nsres);
}
} }
} }
......
...@@ -330,7 +330,7 @@ static void init_event(nsIDOMEventTarget *target, const PRUnichar *type, ...@@ -330,7 +330,7 @@ static void init_event(nsIDOMEventTarget *target, const PRUnichar *type,
nsresult nsres; nsresult nsres;
nsAString_InitDepend(&type_str, type); nsAString_InitDepend(&type_str, type);
nsres = nsIDOMEventTarget_AddEventListener(target, &type_str, listener, capture); nsres = nsIDOMEventTarget_AddEventListener(target, &type_str, listener, capture, FALSE, 1);
nsAString_Finish(&type_str); nsAString_Finish(&type_str);
if(NS_FAILED(nsres)) if(NS_FAILED(nsres))
ERR("AddEventTarget failed: %08x\n", nsres); ERR("AddEventTarget failed: %08x\n", nsres);
......
...@@ -2307,6 +2307,22 @@ static nsresult NSAPI nsURI_GetOriginCharset(nsIURL *iface, nsACString *aOriginC ...@@ -2307,6 +2307,22 @@ static nsresult NSAPI nsURI_GetOriginCharset(nsIURL *iface, nsACString *aOriginC
return NS_ERROR_NOT_IMPLEMENTED; return NS_ERROR_NOT_IMPLEMENTED;
} }
static nsresult NSAPI nsURI_GetSpecIgnoringRef(nsIURL *iface, nsACString *aSpecIgnoringRef)
{
nsWineURI *This = impl_from_nsIURL(iface);
FIXME("(%p)->(%p)\n", This, aSpecIgnoringRef);
return nsIURL_GetSpec(&This->nsIURL_iface, aSpecIgnoringRef);
}
static nsresult NSAPI nsURI_GetHasRef(nsIURL *iface, PRBool *aHasRef)
{
nsWineURI *This = impl_from_nsIURL(iface);
FIXME("(%p)->(%p)\n", This, aHasRef);
return NS_ERROR_NOT_IMPLEMENTED;
}
static nsresult NSAPI nsURL_GetFilePath(nsIURL *iface, nsACString *aFilePath) static nsresult NSAPI nsURL_GetFilePath(nsIURL *iface, nsACString *aFilePath)
{ {
nsWineURI *This = impl_from_nsIURL(iface); nsWineURI *This = impl_from_nsIURL(iface);
...@@ -2553,17 +2569,19 @@ static const nsIURLVtbl nsURLVtbl = { ...@@ -2553,17 +2569,19 @@ static const nsIURLVtbl nsURLVtbl = {
nsURI_SetPort, nsURI_SetPort,
nsURI_GetPath, nsURI_GetPath,
nsURI_SetPath, nsURI_SetPath,
nsURL_GetRef,
nsURL_SetRef,
nsURI_Equals, nsURI_Equals,
nsURI_EqualsExceptRef,
nsURI_SchemeIs, nsURI_SchemeIs,
nsURI_Clone, nsURI_Clone,
nsURI_CloneIgnoreRef,
nsURI_Resolve, nsURI_Resolve,
nsURI_GetAsciiSpec, nsURI_GetAsciiSpec,
nsURI_GetAsciiHost, nsURI_GetAsciiHost,
nsURI_GetOriginCharset, nsURI_GetOriginCharset,
nsURL_GetRef,
nsURL_SetRef,
nsURI_EqualsExceptRef,
nsURI_CloneIgnoreRef,
nsURI_GetSpecIgnoringRef,
nsURI_GetHasRef,
nsURL_GetFilePath, nsURL_GetFilePath,
nsURL_SetFilePath, nsURL_SetFilePath,
nsURL_GetParam, nsURL_GetParam,
......
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