Commit 196f13c1 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Handle S_FALSE from IUri methods in Anchor Elements.

parent 1e6c1851
......@@ -517,6 +517,10 @@ static HRESULT WINAPI HTMLAnchorElement_get_port(IHTMLAnchorElement *iface, BSTR
IUri_Release(uri);
if(FAILED(hres))
return hres;
if(hres != S_OK) {
*p = NULL;
return S_OK;
}
len = swprintf(buf, ARRAY_SIZE(buf), L"%u", port);
str = SysAllocStringLen(buf, len);
......@@ -556,6 +560,11 @@ static HRESULT WINAPI HTMLAnchorElement_get_protocol(IHTMLAnchorElement *iface,
IUri_Release(uri);
if(FAILED(hres))
return hres;
if(hres != S_OK) {
SysFreeString(scheme);
*p = NULL;
return S_OK;
}
len = SysStringLen(scheme);
if(len) {
......
......@@ -9479,6 +9479,12 @@ static void test_elems(IHTMLDocument2 *doc)
test_anchor_hostname((IUnknown*)elem, L"test1");
test_anchor_port((IUnknown*)elem, L"8080");
/* about:blank */
test_anchor_put_href((IUnknown*)elem, L"about:blank");
test_anchor_href((IUnknown*)elem, L"about:blank");
test_anchor_hostname((IUnknown*)elem, NULL);
test_anchor_port((IUnknown*)elem, NULL);
/* Restore the href */
test_anchor_put_href((IUnknown*)elem, L"http://test/");
test_anchor_href((IUnknown*)elem, L"http://test/");
......
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