Commit 0ba543ac authored by Evan Tang's avatar Evan Tang Committed by Alexandre Julliard

mshtml: Hide things that were removed in IE11.

parent b45eca88
...@@ -6149,6 +6149,19 @@ static void HTMLDocumentNode_init_dispex_info(dispex_data_t *info, compat_mode_t ...@@ -6149,6 +6149,19 @@ static void HTMLDocumentNode_init_dispex_info(dispex_data_t *info, compat_mode_t
{DISPID_IHTMLDOCUMENT2_LOCATION, HTMLDocumentNode_location_hook}, {DISPID_IHTMLDOCUMENT2_LOCATION, HTMLDocumentNode_location_hook},
{DISPID_UNKNOWN} {DISPID_UNKNOWN}
}; };
static const dispex_hook_t document2_ie11_hooks[] = {
{DISPID_IHTMLDOCUMENT2_URL, NULL, L"URL"},
{DISPID_IHTMLDOCUMENT2_LOCATION, HTMLDocumentNode_location_hook},
{DISPID_IHTMLDOCUMENT2_CREATESTYLESHEET, NULL},
{DISPID_IHTMLDOCUMENT2_FILESIZE, NULL},
{DISPID_IHTMLDOCUMENT2_SELECTION, NULL},
{DISPID_UNKNOWN}
};
static const dispex_hook_t document3_ie11_hooks[] = {
{DISPID_IHTMLDOCUMENT3_ATTACHEVENT, NULL},
{DISPID_IHTMLDOCUMENT3_DETACHEVENT, NULL},
{DISPID_UNKNOWN}
};
static const dispex_hook_t document6_ie9_hooks[] = { static const dispex_hook_t document6_ie9_hooks[] = {
{DISPID_IHTMLDOCUMENT6_ONSTORAGE}, {DISPID_IHTMLDOCUMENT6_ONSTORAGE},
{DISPID_UNKNOWN} {DISPID_UNKNOWN}
...@@ -6168,9 +6181,9 @@ static void HTMLDocumentNode_init_dispex_info(dispex_data_t *info, compat_mode_t ...@@ -6168,9 +6181,9 @@ static void HTMLDocumentNode_init_dispex_info(dispex_data_t *info, compat_mode_t
dispex_info_add_interface(info, IHTMLDocument6_tid, NULL); dispex_info_add_interface(info, IHTMLDocument6_tid, NULL);
}else { }else {
dispex_info_add_interface(info, IHTMLDocument6_tid, mode >= COMPAT_MODE_IE9 ? document6_ie9_hooks : NULL); dispex_info_add_interface(info, IHTMLDocument6_tid, mode >= COMPAT_MODE_IE9 ? document6_ie9_hooks : NULL);
dispex_info_add_interface(info, IHTMLDocument3_tid, NULL); dispex_info_add_interface(info, IHTMLDocument3_tid, mode >= COMPAT_MODE_IE11 ? document3_ie11_hooks : NULL);
} }
dispex_info_add_interface(info, IHTMLDocument2_tid, document2_hooks); dispex_info_add_interface(info, IHTMLDocument2_tid, mode >= COMPAT_MODE_IE11 ? document2_ie11_hooks : document2_hooks);
} }
static dispex_static_data_t HTMLDocumentNode_dispex = { static dispex_static_data_t HTMLDocumentNode_dispex = {
......
...@@ -7185,8 +7185,10 @@ void HTMLElement_init_dispex_info(dispex_data_t *info, compat_mode_t mode) ...@@ -7185,8 +7185,10 @@ void HTMLElement_init_dispex_info(dispex_data_t *info, compat_mode_t mode)
{DISPID_UNKNOWN} {DISPID_UNKNOWN}
}; };
static const dispex_hook_t elem2_ie11_hooks[] = { static const dispex_hook_t elem2_ie11_hooks[] = {
{DISPID_IHTMLELEMENT2_DOSCROLL, NULL}, {DISPID_IHTMLELEMENT2_ATTACHEVENT, NULL},
{DISPID_IHTMLELEMENT2_READYSTATE, NULL}, {DISPID_IHTMLELEMENT2_DETACHEVENT, NULL},
{DISPID_IHTMLELEMENT2_DOSCROLL, NULL},
{DISPID_IHTMLELEMENT2_READYSTATE, NULL},
{DISPID_UNKNOWN} {DISPID_UNKNOWN}
}; };
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "winbase.h" #include "winbase.h"
#include "winuser.h" #include "winuser.h"
#include "ole2.h" #include "ole2.h"
#include "mshtmdid.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -727,15 +728,27 @@ static const NodeImplVtbl HTMLImgElementImplVtbl = { ...@@ -727,15 +728,27 @@ static const NodeImplVtbl HTMLImgElementImplVtbl = {
static const tid_t HTMLImgElement_iface_tids[] = { static const tid_t HTMLImgElement_iface_tids[] = {
HTMLELEMENT_TIDS, HTMLELEMENT_TIDS,
IHTMLImgElement_tid,
0 0
}; };
static void HTMLImgElement_init_dispex_info(dispex_data_t *info, compat_mode_t mode)
{
static const dispex_hook_t img_ie11_hooks[] = {
{DISPID_IHTMLIMGELEMENT_FILESIZE, NULL},
{DISPID_UNKNOWN}
};
HTMLElement_init_dispex_info(info, mode);
dispex_info_add_interface(info, IHTMLImgElement_tid, mode >= COMPAT_MODE_IE11 ? img_ie11_hooks : NULL);
}
static dispex_static_data_t HTMLImgElement_dispex = { static dispex_static_data_t HTMLImgElement_dispex = {
L"HTMLImageElement", L"HTMLImageElement",
NULL, NULL,
DispHTMLImg_tid, DispHTMLImg_tid,
HTMLImgElement_iface_tids, HTMLImgElement_iface_tids,
HTMLElement_init_dispex_info HTMLImgElement_init_dispex_info
}; };
HRESULT HTMLImgElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem) HRESULT HTMLImgElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem)
......
...@@ -3952,10 +3952,25 @@ static void HTMLWindow_init_dispex_info(dispex_data_t *info, compat_mode_t compa ...@@ -3952,10 +3952,25 @@ static void HTMLWindow_init_dispex_info(dispex_data_t *info, compat_mode_t compa
{DISPID_IHTMLWINDOW2_LOCATION, IHTMLWindow2_location_hook}, {DISPID_IHTMLWINDOW2_LOCATION, IHTMLWindow2_location_hook},
{DISPID_UNKNOWN} {DISPID_UNKNOWN}
}; };
static const dispex_hook_t window2_ie11_hooks[] = {
{DISPID_IHTMLWINDOW2_LOCATION, IHTMLWindow2_location_hook},
{DISPID_IHTMLWINDOW2_EXECSCRIPT, NULL},
{DISPID_UNKNOWN}
};
static const dispex_hook_t window3_hooks[] = { static const dispex_hook_t window3_hooks[] = {
{DISPID_IHTMLWINDOW3_SETTIMEOUT, IHTMLWindow3_setTimeout_hook}, {DISPID_IHTMLWINDOW3_SETTIMEOUT, IHTMLWindow3_setTimeout_hook},
{DISPID_UNKNOWN} {DISPID_UNKNOWN}
}; };
static const dispex_hook_t window3_ie11_hooks[] = {
{DISPID_IHTMLWINDOW3_SETTIMEOUT, IHTMLWindow3_setTimeout_hook},
{DISPID_IHTMLWINDOW3_ATTACHEVENT, NULL},
{DISPID_IHTMLWINDOW3_DETACHEVENT, NULL},
{DISPID_UNKNOWN}
};
static const dispex_hook_t window4_ie11_hooks[] = {
{DISPID_IHTMLWINDOW4_CREATEPOPUP, NULL},
{DISPID_UNKNOWN}
};
if(compat_mode >= COMPAT_MODE_IE9) if(compat_mode >= COMPAT_MODE_IE9)
dispex_info_add_interface(info, IHTMLWindow7_tid, NULL); dispex_info_add_interface(info, IHTMLWindow7_tid, NULL);
...@@ -3965,8 +3980,9 @@ static void HTMLWindow_init_dispex_info(dispex_data_t *info, compat_mode_t compa ...@@ -3965,8 +3980,9 @@ static void HTMLWindow_init_dispex_info(dispex_data_t *info, compat_mode_t compa
dispex_info_add_interface(info, IWineHTMLWindowPrivate_tid, NULL); dispex_info_add_interface(info, IWineHTMLWindowPrivate_tid, NULL);
dispex_info_add_interface(info, IHTMLWindow5_tid, NULL); dispex_info_add_interface(info, IHTMLWindow5_tid, NULL);
dispex_info_add_interface(info, IHTMLWindow3_tid, window3_hooks); dispex_info_add_interface(info, IHTMLWindow4_tid, compat_mode >= COMPAT_MODE_IE11 ? window4_ie11_hooks : NULL);
dispex_info_add_interface(info, IHTMLWindow2_tid, window2_hooks); dispex_info_add_interface(info, IHTMLWindow3_tid, compat_mode >= COMPAT_MODE_IE11 ? window3_ie11_hooks : window3_hooks);
dispex_info_add_interface(info, IHTMLWindow2_tid, compat_mode >= COMPAT_MODE_IE11 ? window2_ie11_hooks : window2_hooks);
EventTarget_init_dispex_info(info, compat_mode); EventTarget_init_dispex_info(info, compat_mode);
} }
...@@ -3996,7 +4012,6 @@ static const event_target_vtbl_t HTMLWindow_event_target_vtbl = { ...@@ -3996,7 +4012,6 @@ static const event_target_vtbl_t HTMLWindow_event_target_vtbl = {
}; };
static const tid_t HTMLWindow_iface_tids[] = { static const tid_t HTMLWindow_iface_tids[] = {
IHTMLWindow4_tid,
IHTMLWindow6_tid, IHTMLWindow6_tid,
0 0
}; };
......
...@@ -274,8 +274,8 @@ sync_test("elem_props", function() { ...@@ -274,8 +274,8 @@ sync_test("elem_props", function() {
var v = document.documentMode; var v = document.documentMode;
test_exposed("attachEvent", v < 11, v >= 11); test_exposed("attachEvent", v < 11);
test_exposed("detachEvent", v < 11, v >= 11); test_exposed("detachEvent", v < 11);
test_exposed("doScroll", v < 11); test_exposed("doScroll", v < 11);
test_exposed("readyState", v < 11); test_exposed("readyState", v < 11);
test_exposed("clientTop", true); test_exposed("clientTop", true);
...@@ -305,7 +305,7 @@ sync_test("elem_props", function() { ...@@ -305,7 +305,7 @@ sync_test("elem_props", function() {
test_exposed("classList", v >= 10); test_exposed("classList", v >= 10);
elem = document.createElement("img"); elem = document.createElement("img");
test_exposed("fileSize", v < 11, v >= 11); test_exposed("fileSize", v < 11);
}); });
sync_test("doc_props", function() { sync_test("doc_props", function() {
...@@ -320,11 +320,11 @@ sync_test("doc_props", function() { ...@@ -320,11 +320,11 @@ sync_test("doc_props", function() {
var v = document.documentMode; var v = document.documentMode;
ok(document.mimeType === external.getExpectedMimeType("text/html"), "mimeType = " + document.mimeType); ok(document.mimeType === external.getExpectedMimeType("text/html"), "mimeType = " + document.mimeType);
test_exposed("attachEvent", v < 11, v >= 11); test_exposed("attachEvent", v < 11);
test_exposed("detachEvent", v < 11, v >= 11); test_exposed("detachEvent", v < 11);
test_exposed("createStyleSheet",v < 11, v >= 11); test_exposed("createStyleSheet",v < 11);
test_exposed("fileSize", v < 11, v >= 11); test_exposed("fileSize", v < 11);
test_exposed("selection", v < 11, v >= 11); test_exposed("selection", v < 11);
test_exposed("onstorage", v < 9); test_exposed("onstorage", v < 9);
test_exposed("textContent", v >= 9); test_exposed("textContent", v >= 9);
test_exposed("prefix", v >= 9); test_exposed("prefix", v >= 9);
...@@ -365,10 +365,10 @@ sync_test("window_props", function() { ...@@ -365,10 +365,10 @@ sync_test("window_props", function() {
var v = document.documentMode; var v = document.documentMode;
test_exposed("attachEvent", v < 11, v >= 11); test_exposed("attachEvent", v < 11);
test_exposed("detachEvent", v < 11, v >= 11); test_exposed("detachEvent", v < 11);
test_exposed("execScript", v < 11, v >= 11); test_exposed("execScript", v < 11);
test_exposed("createPopup", v < 11, v >= 11); test_exposed("createPopup", v < 11);
test_exposed("postMessage", true); test_exposed("postMessage", true);
test_exposed("sessionStorage", true); test_exposed("sessionStorage", true);
test_exposed("localStorage", true); test_exposed("localStorage", true);
......
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