mshtml: Implement HTMLStyleSheet_get_href().
This commit is contained in:
parent
1f1d404832
commit
688cc96ee7
|
@ -552,8 +552,14 @@ static HRESULT WINAPI HTMLStyleSheet_put_href(IHTMLStyleSheet *iface, BSTR v)
|
||||||
static HRESULT WINAPI HTMLStyleSheet_get_href(IHTMLStyleSheet *iface, BSTR *p)
|
static HRESULT WINAPI HTMLStyleSheet_get_href(IHTMLStyleSheet *iface, BSTR *p)
|
||||||
{
|
{
|
||||||
HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface);
|
HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, p);
|
nsAString href_str;
|
||||||
return E_NOTIMPL;
|
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)
|
static HRESULT WINAPI HTMLStyleSheet_get_type(IHTMLStyleSheet *iface, BSTR *p)
|
||||||
|
|
|
@ -5958,6 +5958,7 @@ static void test_stylesheet(IDispatch *disp)
|
||||||
IHTMLStyleSheetRulesCollection *col = NULL;
|
IHTMLStyleSheetRulesCollection *col = NULL;
|
||||||
IHTMLStyleSheet *stylesheet;
|
IHTMLStyleSheet *stylesheet;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
BSTR href;
|
||||||
|
|
||||||
test_disp2((IUnknown*)disp, &DIID_DispHTMLStyleSheet, &IID_IHTMLStyleSheet, "[object]");
|
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);
|
hres = IHTMLStyleSheet_get_rules(stylesheet, &col);
|
||||||
ok(hres == S_OK, "get_rules failed: %08x\n", hres);
|
ok(hres == S_OK, "get_rules failed: %08x\n", hres);
|
||||||
ok(col != NULL, "col == NULL\n");
|
ok(col != NULL, "col == NULL\n");
|
||||||
|
|
||||||
IHTMLStyleSheetRulesCollection_Release(col);
|
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);
|
IHTMLStyleSheet_Release(stylesheet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue