Nikolay Sivov : mshtml: Implement HTMLStyleSheet_get_href().
Alexandre Julliard
julliard at winehq.org
Mon Feb 10 13:06:55 CST 2014
Module: wine
Branch: master
Commit: 688cc96ee7d1f87a42c53937d6ea32be1a66c702
URL: http://source.winehq.org/git/wine.git/?a=commit;h=688cc96ee7d1f87a42c53937d6ea32be1a66c702
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sun Feb 9 17:55:16 2014 +0400
mshtml: Implement HTMLStyleSheet_get_href().
---
dlls/mshtml/htmlstylesheet.c | 10 ++++++++--
dlls/mshtml/tests/dom.c | 9 ++++++++-
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/dlls/mshtml/htmlstylesheet.c b/dlls/mshtml/htmlstylesheet.c
index 4b43082..a1669c1 100644
--- a/dlls/mshtml/htmlstylesheet.c
+++ b/dlls/mshtml/htmlstylesheet.c
@@ -552,8 +552,14 @@ static HRESULT WINAPI HTMLStyleSheet_put_href(IHTMLStyleSheet *iface, BSTR v)
static HRESULT WINAPI HTMLStyleSheet_get_href(IHTMLStyleSheet *iface, BSTR *p)
{
HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ nsAString href_str;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsAString_Init(&href_str, NULL);
+ nsres = nsIDOMCSSStyleSheet_GetHref(This->nsstylesheet, &href_str);
+ return return_nsstr(nsres, &href_str, p);
}
static HRESULT WINAPI HTMLStyleSheet_get_type(IHTMLStyleSheet *iface, BSTR *p)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index 2b2eea5..892e812 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -5958,6 +5958,7 @@ static void test_stylesheet(IDispatch *disp)
IHTMLStyleSheetRulesCollection *col = NULL;
IHTMLStyleSheet *stylesheet;
HRESULT hres;
+ BSTR href;
test_disp2((IUnknown*)disp, &DIID_DispHTMLStyleSheet, &IID_IHTMLStyleSheet, "[object]");
@@ -5967,8 +5968,14 @@ static void test_stylesheet(IDispatch *disp)
hres = IHTMLStyleSheet_get_rules(stylesheet, &col);
ok(hres == S_OK, "get_rules failed: %08x\n", hres);
ok(col != NULL, "col == NULL\n");
-
IHTMLStyleSheetRulesCollection_Release(col);
+
+ href = (void*)0xdeadbeef;
+ hres = IHTMLStyleSheet_get_href(stylesheet, &href);
+ ok(hres == S_OK, "get_href failed: %08x\n", hres);
+ ok(href == NULL, "got href != NULL\n");
+ SysFreeString(href);
+
IHTMLStyleSheet_Release(stylesheet);
}
More information about the wine-cvs
mailing list