Esempio n. 1
0
static HRESULT navigate_anchor_window(HTMLAnchorElement *This, const WCHAR *target)
{
    nsAString href_str;
    IUri *uri;
    nsresult nsres;
    HRESULT hres;

    nsAString_Init(&href_str, NULL);
    nsres = nsIDOMHTMLAnchorElement_GetHref(This->nsanchor, &href_str);
    if(NS_SUCCEEDED(nsres)) {
        const PRUnichar *href;

        nsAString_GetData(&href_str, &href);
        hres = create_relative_uri(This->element.node.doc->basedoc.window, href, &uri);
    }else {
        ERR("Could not get anchor href: %08x\n", nsres);
        hres = E_FAIL;
    }
    nsAString_Finish(&href_str);
    if(FAILED(hres))
        return hres;

    hres = navigate_new_window(This->element.node.doc->basedoc.window, uri, target, NULL);
    IUri_Release(uri);
    return hres;
}
Esempio n. 2
0
static HRESULT navigate_href_new_window(HTMLElement *element, nsAString *href_str, const WCHAR *target)
{
    const PRUnichar *href;
    IUri *uri;
    HRESULT hres;

    nsAString_GetData(href_str, &href);
    hres = create_relative_uri(element->node.doc->basedoc.window, href, &uri);
    if(FAILED(hres))
        return hres;

    hres = navigate_new_window(element->node.doc->basedoc.window, uri, target, NULL, NULL);
    IUri_Release(uri);
    return hres;
}
Esempio n. 3
0
static HRESULT WINAPI HlinkTarget_Navigate(IHlinkTarget *iface, DWORD grfHLNF, LPCWSTR pwzJumpLocation)
{
    HTMLDocument *This = impl_from_IHlinkTarget(iface);

    TRACE("(%p)->(%08x %s)\n", This, grfHLNF, debugstr_w(pwzJumpLocation));

    if(grfHLNF)
        FIXME("Unsupported grfHLNF=%08x\n", grfHLNF);
    if(pwzJumpLocation)
        FIXME("JumpLocation not supported\n");

    if(!This->doc_obj->client)
        return navigate_new_window(This->window, This->window->uri, NULL, NULL, NULL);

    return IOleObject_DoVerb(&This->IOleObject_iface, OLEIVERB_SHOW, NULL, NULL, -1, NULL, NULL);
}