Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mshtml/htmlscript.c | 10 ++++++++-- dlls/mshtml/tests/dom.c | 5 +++++ 2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlscript.c b/dlls/mshtml/htmlscript.c index 18a652e0df..60fd94e3d4 100644 --- a/dlls/mshtml/htmlscript.c +++ b/dlls/mshtml/htmlscript.c @@ -157,8 +157,14 @@ static HRESULT WINAPI HTMLScriptElement_put_htmlFor(IHTMLScriptElement *iface, B static HRESULT WINAPI HTMLScriptElement_get_htmlFor(IHTMLScriptElement *iface, BSTR *p) { HTMLScriptElement *This = impl_from_IHTMLScriptElement(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString html_str; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&html_str, NULL); + nsres = nsIDOMHTMLScriptElement_GetHtmlFor(This->nsscript, &html_str); + return return_nsstr(nsres, &html_str, p); }
static HRESULT WINAPI HTMLScriptElement_put_event(IHTMLScriptElement *iface, BSTR v) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 13de60ff4d..23b3a57282 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -8834,6 +8834,11 @@ static void test_elems(IHTMLDocument2 *doc) hres = IHTMLScriptElement_get_src(script, &str); ok(hres == S_OK, "get_src failed: %08x\n", hres); ok(!str, "src = %s\n", wine_dbgstr_w(str)); + + str = (BSTR)0xdeadbeef; + hres = IHTMLScriptElement_get_htmlFor(script, &str); + ok(hres == S_OK, "get_htmlFor failed: %08x\n", hres); + ok(!str, "htmlFor = %s\n", wine_dbgstr_w(str)); }
IHTMLScriptElement_Release(script);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mshtml/htmlwindow.c | 30 ++++++++++++++++++++++++++---- dlls/mshtml/tests/dom.c | 13 +++++++++++-- 2 files changed, 37 insertions(+), 6 deletions(-)
diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index ace727246f..c6ec26de55 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -2444,15 +2444,37 @@ static HRESULT WINAPI HTMLWindow7_get_innerHeight(IHTMLWindow7 *iface, LONG *p) static HRESULT WINAPI HTMLWindow7_get_pageXOffset(IHTMLWindow7 *iface, LONG *p) { HTMLWindow *This = impl_from_IHTMLWindow7(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsresult nsres; + INT32 ret; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMWindow_GetPageXOffset(This->outer_window->nswindow, &ret); + if(NS_FAILED(nsres)) { + ERR("GetPageXOffset failed: %08x\n", nsres); + return E_FAIL; + } + + *p = ret; + return S_OK; }
static HRESULT WINAPI HTMLWindow7_get_pageYOffset(IHTMLWindow7 *iface, LONG *p) { HTMLWindow *This = impl_from_IHTMLWindow7(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsresult nsres; + INT32 ret; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMWindow_GetPageYOffset(This->outer_window->nswindow, &ret); + if(NS_FAILED(nsres)) { + ERR("GetPageYOffset failed: %08x\n", nsres); + return E_FAIL; + } + + *p = ret; + return S_OK; }
static HRESULT WINAPI HTMLWindow7_get_screenX(IHTMLWindow7 *iface, LONG *p) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 23b3a57282..f77a1ddf80 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -6974,6 +6974,7 @@ static void test_window(IHTMLDocument2 *doc) IHTMLPerformance *performance; IHTMLDOMNode *node; IHTMLElement *elem; + LONG offset;
ok(window7 != NULL, "window7 == NULL\n");
@@ -6998,10 +6999,16 @@ static void test_window(IHTMLDocument2 *doc) ok(hres == S_OK, "get_performance failed: %08x\n", hres); ok(V_VT(&v) == VT_I2, "V_VT(performance) = %u\n", V_VT(&v)); ok(V_I2(&v) == 2, "V_I2(performance) = %d\n", V_I2(&v)); - - IHTMLWindow7_Release(window7); }
+ hres = IHTMLWindow7_get_pageXOffset(window7, &offset); + ok(hres == S_OK, "get_pageXOffset failed: %08x\n", hres); + ok(!offset, "Unexpected offset %d.\n", offset); + + hres = IHTMLWindow7_get_pageYOffset(window7, &offset); + ok(hres == S_OK, "get_pageYOffset failed: %08x\n", hres); + ok(!offset, "Unexpected offset %d.\n", offset); + hres = IHTMLDocument2_get_body(doc, &elem); ok(hres == S_OK, "get_body failed: %08x\n", hres);
@@ -7020,6 +7027,8 @@ static void test_window(IHTMLDocument2 *doc)
IHTMLDOMNode_Release(node); IHTMLElement_Release(elem); + + IHTMLWindow7_Release(window7); }else { win_skip("IHTMLWindow7 not supported\n"); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=63500
Your paranoid android.
=== debian10 (32 bit report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debian10 (32 bit Chinese:China report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debian10 (32 bit WoW report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debian10 (64 bit WoW report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
Signed-off-by: Jacek Caban jacek@codeweavers.com
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=63499
Your paranoid android.
=== debian10 (32 bit report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debian10 (32 bit Chinese:China report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debian10 (32 bit WoW report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005
=== debian10 (64 bit WoW report) ===
mshtml: htmllocation.c:346: Test failed: FILE: IPersistMoniker_Load failed: 0x800c0005