mshtml: Properly expose IHTMLDocument6 interface to scripts.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f84d1f0aac
commit
d631268fa1
|
@ -4887,19 +4887,32 @@ static const tid_t HTMLDocumentNode_iface_tids[] = {
|
|||
IHTMLDOMNode_tid,
|
||||
IHTMLDOMNode2_tid,
|
||||
IHTMLDocument2_tid,
|
||||
IHTMLDocument3_tid,
|
||||
IHTMLDocument4_tid,
|
||||
IHTMLDocument5_tid,
|
||||
IHTMLDocument6_tid,
|
||||
IDocumentSelector_tid,
|
||||
0
|
||||
};
|
||||
|
||||
void HTMLDocumentNode_init_dispex_info(dispex_data_t *info, compat_mode_t mode)
|
||||
{
|
||||
HTMLDOMNode_init_dispex_info(info, mode);
|
||||
|
||||
/* Depending on compatibility version, we add interfaces in different order
|
||||
* so that the right getElementById implementation is used. */
|
||||
if(mode < COMPAT_MODE_IE8) {
|
||||
dispex_info_add_interface(info, IHTMLDocument3_tid, NULL);
|
||||
dispex_info_add_interface(info, IHTMLDocument6_tid, NULL);
|
||||
}else {
|
||||
dispex_info_add_interface(info, IHTMLDocument6_tid, NULL);
|
||||
dispex_info_add_interface(info, IHTMLDocument3_tid, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static dispex_static_data_t HTMLDocumentNode_dispex = {
|
||||
&HTMLDocumentNode_dispex_vtbl,
|
||||
DispHTMLDocument_tid,
|
||||
HTMLDocumentNode_iface_tids,
|
||||
HTMLDOMNode_init_dispex_info
|
||||
HTMLDocumentNode_init_dispex_info
|
||||
};
|
||||
|
||||
static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindow *window)
|
||||
|
|
|
@ -55,6 +55,21 @@ function test_doc_props() {
|
|||
next_test();
|
||||
}
|
||||
|
||||
function test_elem_by_id() {
|
||||
document.body.innerHTML = '<form id="testid" name="testname"></form>';
|
||||
|
||||
var id_elem = document.getElementById("testid");
|
||||
ok(id_elem.tagName === "FORM", "id_elem.tagName = " + id_elem.tagName);
|
||||
|
||||
var name_elem = document.getElementById("testname");
|
||||
if(document.documentMode < 8)
|
||||
ok(id_elem === name_elem, "id_elem != id_elem");
|
||||
else
|
||||
ok(name_elem === null, "name_elem != null");
|
||||
|
||||
next_test();
|
||||
}
|
||||
|
||||
function test_doc_mode() {
|
||||
compat_version = parseInt(document.location.search.substring(1));
|
||||
|
||||
|
@ -116,5 +131,6 @@ var tests = [
|
|||
test_doc_mode,
|
||||
test_elem_props,
|
||||
test_doc_props,
|
||||
test_elem_by_id,
|
||||
test_conditional_comments
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue