mshtml: Inherit document mode from parent document.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
af07789cdc
commit
e6778fe023
|
@ -5044,6 +5044,15 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_ob
|
|||
if(!doc)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
if(window->base.outer_window->parent) {
|
||||
compat_mode_t parent_mode = window->base.outer_window->parent->base.inner_window->doc->document_mode;
|
||||
TRACE("parent mode %u\n", parent_mode);
|
||||
if(parent_mode >= COMPAT_MODE_IE9) {
|
||||
doc->document_mode_locked = TRUE;
|
||||
doc->document_mode = parent_mode;
|
||||
}
|
||||
}
|
||||
|
||||
if(!doc_obj->basedoc.window || window->base.outer_window == doc_obj->basedoc.window)
|
||||
doc->basedoc.cp_container.forward_container = &doc_obj->basedoc.cp_container;
|
||||
|
||||
|
|
|
@ -99,6 +99,22 @@ function test_doc_mode() {
|
|||
next_test();
|
||||
}
|
||||
|
||||
function test_iframe_doc_mode() {
|
||||
var iframe = document.createElement("iframe");
|
||||
|
||||
iframe.onload = function() {
|
||||
var iframe_mode = iframe.contentWindow.document.documentMode;
|
||||
if(document.documentMode < 9)
|
||||
ok(iframe_mode === 5, "iframe_mode = " + iframe_mode);
|
||||
else
|
||||
ok(iframe_mode === document.documentMode, "iframe_mode = " + iframe_mode);
|
||||
next_test();
|
||||
}
|
||||
|
||||
iframe.src = "about:blank";
|
||||
document.body.appendChild(iframe);
|
||||
}
|
||||
|
||||
function test_conditional_comments() {
|
||||
var div = document.createElement("div");
|
||||
document.body.appendChild(div);
|
||||
|
@ -137,6 +153,7 @@ function test_conditional_comments() {
|
|||
|
||||
var tests = [
|
||||
test_doc_mode,
|
||||
test_iframe_doc_mode,
|
||||
test_elem_props,
|
||||
test_doc_props,
|
||||
test_elem_by_id,
|
||||
|
|
Loading…
Reference in New Issue