mshtml: Export IElementSelector for all elements in compatibility mode >= IE8.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c20c47b85e
commit
d72d640308
|
@ -807,7 +807,8 @@ static const tid_t HTMLAnchorElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLAnchorElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLAnchorElement_tid,
|
||||
HTMLAnchorElement_iface_tids
|
||||
HTMLAnchorElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLAnchorElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -451,7 +451,8 @@ static const tid_t HTMLAreaElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLAreaElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLAreaElement_tid,
|
||||
HTMLAreaElement_iface_tids
|
||||
HTMLAreaElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLAreaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -889,7 +889,8 @@ static const tid_t HTMLBodyElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLBodyElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLBody_tid,
|
||||
HTMLBodyElement_iface_tids
|
||||
HTMLBodyElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLBodyElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -200,7 +200,8 @@ static const tid_t HTMLCommentElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLCommentElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLCommentElement_tid,
|
||||
HTMLCommentElement_iface_tids
|
||||
HTMLCommentElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLCommentElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, HTMLElement **elem)
|
||||
|
|
|
@ -5097,6 +5097,12 @@ static void HTMLElement_bind_event(DispatchEx *dispex, int eid)
|
|||
}
|
||||
}
|
||||
|
||||
void HTMLElement_init_dispex_info(dispex_data_t *info, compat_mode_t mode)
|
||||
{
|
||||
if(mode >= COMPAT_MODE_IE8)
|
||||
dispex_info_add_interface(info, IElementSelector_tid);
|
||||
}
|
||||
|
||||
static const tid_t HTMLElement_iface_tids[] = {
|
||||
HTMLELEMENT_TIDS,
|
||||
0
|
||||
|
@ -5114,7 +5120,8 @@ static dispex_static_data_vtbl_t HTMLElement_dispex_vtbl = {
|
|||
static dispex_static_data_t HTMLElement_dispex = {
|
||||
&HTMLElement_dispex_vtbl,
|
||||
DispHTMLUnknownElement_tid,
|
||||
HTMLElement_iface_tids
|
||||
HTMLElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, dispex_static_data_t *dispex_data)
|
||||
|
@ -5129,8 +5136,8 @@ void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElemen
|
|||
|
||||
if(dispex_data && !dispex_data->vtbl)
|
||||
dispex_data->vtbl = &HTMLElement_dispex_vtbl;
|
||||
init_dispex(&This->node.event_target.dispex, (IUnknown*)&This->IHTMLElement_iface,
|
||||
dispex_data ? dispex_data : &HTMLElement_dispex);
|
||||
init_dispex_with_compat_mode(&This->node.event_target.dispex, (IUnknown*)&This->IHTMLElement_iface,
|
||||
dispex_data ? dispex_data : &HTMLElement_dispex, doc->document_mode);
|
||||
|
||||
if(nselem) {
|
||||
HTMLDOMNode_Init(doc, &This->node, (nsIDOMNode*)nselem);
|
||||
|
|
|
@ -267,7 +267,8 @@ static const tid_t HTMLEmbedElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLEmbedElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLEmbed_tid,
|
||||
HTMLEmbedElement_iface_tids
|
||||
HTMLEmbedElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLEmbedElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -794,7 +794,8 @@ static const tid_t HTMLFormElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLFormElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLFormElement_tid,
|
||||
HTMLFormElement_iface_tids
|
||||
HTMLFormElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLFormElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -317,7 +317,8 @@ static const tid_t HTMLFrameElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLFrameElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLFrameElement_tid,
|
||||
HTMLFrameElement_iface_tids
|
||||
HTMLFrameElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLFrameElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -169,7 +169,8 @@ static const tid_t HTMLGenericElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLGenericElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLGenericElement_tid,
|
||||
HTMLGenericElement_iface_tids
|
||||
HTMLGenericElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLGenericElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -170,7 +170,8 @@ static const tid_t HTMLTitleElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLTitleElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLTitleElement_tid,
|
||||
HTMLTitleElement_iface_tids
|
||||
HTMLTitleElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLTitleElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
@ -352,7 +353,8 @@ static const tid_t HTMLHtmlElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLHtmlElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLHtmlElement_tid,
|
||||
HTMLHtmlElement_iface_tids
|
||||
HTMLHtmlElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLHtmlElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
@ -511,7 +513,8 @@ static const tid_t HTMLHeadElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLHeadElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLHeadElement_tid,
|
||||
HTMLHeadElement_iface_tids
|
||||
HTMLHeadElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLHeadElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -592,7 +592,8 @@ static const tid_t HTMLIFrame_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLIFrame_dispex = {
|
||||
NULL,
|
||||
DispHTMLIFrame_tid,
|
||||
HTMLIFrame_iface_tids
|
||||
HTMLIFrame_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLIFrame_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -734,7 +734,8 @@ static const tid_t HTMLImgElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLImgElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLImg_tid,
|
||||
HTMLImgElement_iface_tids
|
||||
HTMLImgElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLImgElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -1345,7 +1345,8 @@ static const tid_t HTMLInputElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLInputElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLInputElement_tid,
|
||||
HTMLInputElement_iface_tids
|
||||
HTMLInputElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLInputElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
@ -1538,7 +1539,8 @@ static const tid_t HTMLLabelElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLLabelElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLLabelElement_tid,
|
||||
HTMLLabelElement_iface_tids
|
||||
HTMLLabelElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLLabelElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
@ -1888,7 +1890,8 @@ static const tid_t HTMLButtonElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLButtonElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLButtonElement_tid,
|
||||
HTMLButtonElement_iface_tids
|
||||
HTMLButtonElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLButtonElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -449,7 +449,8 @@ static const tid_t HTMLLinkElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLLinkElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLLinkElement_tid,
|
||||
HTMLLinkElement_iface_tids
|
||||
HTMLLinkElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLLinkElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -250,7 +250,8 @@ static const tid_t HTMLMetaElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLMetaElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLMetaElement_tid,
|
||||
HTMLMetaElement_iface_tids
|
||||
HTMLMetaElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLMetaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -773,7 +773,8 @@ static const tid_t HTMLObjectElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLObjectElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLObjectElement_tid,
|
||||
HTMLObjectElement_iface_tids
|
||||
HTMLObjectElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLObjectElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -444,7 +444,8 @@ static const tid_t HTMLOptionElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLOptionElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLOptionElement_tid,
|
||||
HTMLOptionElement_iface_tids
|
||||
HTMLOptionElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLOptionElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
@ -624,7 +625,8 @@ static const tid_t HTMLOptionElementFactory_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLOptionElementFactory_dispex = {
|
||||
NULL,
|
||||
IHTMLOptionElementFactory_tid,
|
||||
HTMLOptionElementFactory_iface_tids
|
||||
HTMLOptionElementFactory_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLOptionElementFactory_Create(HTMLInnerWindow *window, HTMLOptionElementFactory **ret_ptr)
|
||||
|
|
|
@ -467,7 +467,8 @@ static const tid_t HTMLScriptElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLScriptElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLScriptElement_tid,
|
||||
HTMLScriptElement_iface_tids
|
||||
HTMLScriptElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLScriptElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -717,7 +717,8 @@ static const tid_t HTMLSelectElement_tids[] = {
|
|||
static dispex_static_data_t HTMLSelectElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLSelectElement_tid,
|
||||
HTMLSelectElement_tids
|
||||
HTMLSelectElement_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLSelectElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -367,7 +367,8 @@ static const tid_t HTMLStyleElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLStyleElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLStyleElement_tid,
|
||||
HTMLStyleElement_iface_tids
|
||||
HTMLStyleElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLStyleElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -1072,7 +1072,8 @@ static const tid_t HTMLTable_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLTable_dispex = {
|
||||
NULL,
|
||||
DispHTMLTable_tid,
|
||||
HTMLTable_iface_tids
|
||||
HTMLTable_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLTable_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -447,7 +447,8 @@ static const tid_t HTMLTableCell_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLTableCell_dispex = {
|
||||
NULL,
|
||||
DispHTMLTableCell_tid,
|
||||
HTMLTableCell_iface_tids
|
||||
HTMLTableCell_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLTableCell_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -451,7 +451,8 @@ static const tid_t HTMLTableRow_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLTableRow_dispex = {
|
||||
NULL,
|
||||
DispHTMLTableRow_tid,
|
||||
HTMLTableRow_iface_tids
|
||||
HTMLTableRow_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLTableRow_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -505,7 +505,8 @@ static const tid_t HTMLTextAreaElement_iface_tids[] = {
|
|||
static dispex_static_data_t HTMLTextAreaElement_dispex = {
|
||||
NULL,
|
||||
DispHTMLTextAreaElement_tid,
|
||||
HTMLTextAreaElement_iface_tids
|
||||
HTMLTextAreaElement_iface_tids,
|
||||
HTMLElement_init_dispex_info
|
||||
};
|
||||
|
||||
HRESULT HTMLTextAreaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||
|
|
|
@ -757,8 +757,7 @@ typedef struct {
|
|||
IHTMLElement2_tid, \
|
||||
IHTMLElement3_tid, \
|
||||
IHTMLElement4_tid, \
|
||||
IHTMLUniqueName_tid, \
|
||||
IElementSelector_tid
|
||||
IHTMLUniqueName_tid
|
||||
|
||||
extern cp_static_data_t HTMLElementEvents2_data DECLSPEC_HIDDEN;
|
||||
#define HTMLELEMENT_CPC {&DIID_HTMLElementEvents2, &HTMLElementEvents2_data}
|
||||
|
@ -1031,6 +1030,7 @@ void HTMLElement_destructor(HTMLDOMNode*) DECLSPEC_HIDDEN;
|
|||
HRESULT HTMLElement_clone(HTMLDOMNode*,nsIDOMNode*,HTMLDOMNode**) DECLSPEC_HIDDEN;
|
||||
HRESULT HTMLElement_get_attr_col(HTMLDOMNode*,HTMLAttributeCollection**) DECLSPEC_HIDDEN;
|
||||
HRESULT HTMLElement_handle_event(HTMLDOMNode*,DWORD,nsIDOMEvent*,BOOL*) DECLSPEC_HIDDEN;
|
||||
void HTMLElement_init_dispex_info(dispex_data_t*,compat_mode_t) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT HTMLFrameBase_QI(HTMLFrameBase*,REFIID,void**) DECLSPEC_HIDDEN;
|
||||
void HTMLFrameBase_destructor(HTMLFrameBase*) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -16,6 +16,23 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
function test_elem_props() {
|
||||
var elem = document.documentElement;
|
||||
|
||||
function test_exposed(prop, expect) {
|
||||
if(expect)
|
||||
ok(prop in elem, prop + " not found in element.");
|
||||
else
|
||||
ok(!(prop in elem), prop + " found in element.");
|
||||
}
|
||||
|
||||
var v = document.documentMode;
|
||||
|
||||
test_exposed("querySelectorAll", v >= 8);
|
||||
|
||||
next_test();
|
||||
}
|
||||
|
||||
function test_doc_mode() {
|
||||
var opt = parseInt(document.location.search.substring(1));
|
||||
|
||||
|
@ -38,5 +55,6 @@ function test_doc_mode() {
|
|||
}
|
||||
|
||||
var tests = [
|
||||
test_doc_mode
|
||||
test_doc_mode,
|
||||
test_elem_props
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue