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

mshtml: Skip navigation handling on anchor/area elements for detached documents.

parent dffb5e05
...@@ -48,12 +48,15 @@ static HRESULT navigate_href_new_window(HTMLElement *element, nsAString *href_st ...@@ -48,12 +48,15 @@ static HRESULT navigate_href_new_window(HTMLElement *element, nsAString *href_st
IUri *uri; IUri *uri;
HRESULT hres; HRESULT hres;
if(!element->node.doc->window->base.outer_window)
return S_OK;
nsAString_GetData(href_str, &href); nsAString_GetData(href_str, &href);
hres = create_relative_uri(element->node.doc->outer_window, href, &uri); hres = create_relative_uri(element->node.doc->window->base.outer_window, href, &uri);
if(FAILED(hres)) if(FAILED(hres))
return hres; return hres;
hres = navigate_new_window(element->node.doc->outer_window, uri, target, NULL, NULL); hres = navigate_new_window(element->node.doc->window->base.outer_window, uri, target, NULL, NULL);
IUri_Release(uri); IUri_Release(uri);
return hres; return hres;
} }
...@@ -110,7 +113,10 @@ static HRESULT navigate_href(HTMLElement *element, nsAString *href_str, nsAStrin ...@@ -110,7 +113,10 @@ static HRESULT navigate_href(HTMLElement *element, nsAString *href_str, nsAStrin
const PRUnichar *href; const PRUnichar *href;
HRESULT hres; HRESULT hres;
window = get_target_window(element->node.doc->outer_window, target_str, &use_new_window); if(!element->node.doc->window->base.outer_window)
return S_OK;
window = get_target_window(element->node.doc->window->base.outer_window, target_str, &use_new_window);
if(!window) { if(!window) {
if(use_new_window) { if(use_new_window) {
const PRUnichar *target; const PRUnichar *target;
......
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