From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlhead.c | 56 ++++++++++++++++++------------- dlls/mshtml/mshtml_private.h | 4 +++ dlls/mshtml/tests/documentmode.js | 8 +++++ 3 files changed, 44 insertions(+), 24 deletions(-)
diff --git a/dlls/mshtml/htmlhead.c b/dlls/mshtml/htmlhead.c index 89c45b668a1..8fa64522a5d 100644 --- a/dlls/mshtml/htmlhead.c +++ b/dlls/mshtml/htmlhead.c @@ -126,12 +126,14 @@ static const tid_t HTMLTitleElement_iface_tids[] = { IHTMLTitleElement_tid, 0 }; -static dispex_static_data_t HTMLTitleElement_dispex = { - "HTMLTitleElement", - &HTMLTitleElement_event_target_vtbl.dispex_vtbl, - DispHTMLTitleElement_tid, - HTMLTitleElement_iface_tids, - HTMLElement_init_dispex_info +dispex_static_data_t HTMLTitleElement_dispex = { + .name = "HTMLTitleElement", + .id = PROT_HTMLTitleElement, + .prototype_id = PROT_HTMLElement, + .vtbl = &HTMLTitleElement_event_target_vtbl.dispex_vtbl, + .disp_tid = DispHTMLTitleElement_tid, + .iface_tids = HTMLTitleElement_iface_tids, + .init_info = HTMLElement_init_dispex_info, };
HRESULT HTMLTitleElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem) @@ -241,12 +243,14 @@ static const tid_t HTMLHtmlElement_iface_tids[] = { IHTMLHtmlElement_tid, 0 }; -static dispex_static_data_t HTMLHtmlElement_dispex = { - "HTMLHtmlElement", - &HTMLHtmlElement_event_target_vtbl.dispex_vtbl, - DispHTMLHtmlElement_tid, - HTMLHtmlElement_iface_tids, - HTMLElement_init_dispex_info +dispex_static_data_t HTMLHtmlElement_dispex = { + .name = "HTMLHtmlElement", + .id = PROT_HTMLHtmlElement, + .prototype_id = PROT_HTMLElement, + .vtbl = &HTMLHtmlElement_event_target_vtbl.dispex_vtbl, + .disp_tid = DispHTMLHtmlElement_tid, + .iface_tids = HTMLHtmlElement_iface_tids, + .init_info = HTMLElement_init_dispex_info, };
HRESULT HTMLHtmlElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem) @@ -420,12 +424,14 @@ static const tid_t HTMLMetaElement_iface_tids[] = { 0 };
-static dispex_static_data_t HTMLMetaElement_dispex = { - "HTMLMetaElement", - &HTMLMetaElement_event_target_vtbl.dispex_vtbl, - DispHTMLMetaElement_tid, - HTMLMetaElement_iface_tids, - HTMLElement_init_dispex_info +dispex_static_data_t HTMLMetaElement_dispex = { + .name = "HTMLMetaElement", + .id = PROT_HTMLMetaElement, + .prototype_id = PROT_HTMLElement, + .vtbl = &HTMLMetaElement_event_target_vtbl.dispex_vtbl, + .disp_tid = DispHTMLMetaElement_tid, + .iface_tids = HTMLMetaElement_iface_tids, + .init_info = HTMLElement_init_dispex_info, };
HRESULT HTMLMetaElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem) @@ -526,12 +532,14 @@ static const tid_t HTMLHeadElement_iface_tids[] = { IHTMLHeadElement_tid, 0 }; -static dispex_static_data_t HTMLHeadElement_dispex = { - "HTMLHeadElement", - &HTMLHeadElement_event_target_vtbl.dispex_vtbl, - DispHTMLHeadElement_tid, - HTMLHeadElement_iface_tids, - HTMLElement_init_dispex_info +dispex_static_data_t HTMLHeadElement_dispex = { + .name = "HTMLHeadElement", + .id = PROT_HTMLHeadElement, + .prototype_id = PROT_HTMLElement, + .vtbl = &HTMLHeadElement_event_target_vtbl.dispex_vtbl, + .disp_tid = DispHTMLHeadElement_tid, + .iface_tids = HTMLHeadElement_iface_tids, + .init_info = HTMLElement_init_dispex_info, };
HRESULT HTMLHeadElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index c61dc96d22f..adec8e49021 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -417,9 +417,13 @@ typedef struct { X(HTMLElement) \ X(HTMLFormElement) \ X(HTMLFrameElement) \ + X(HTMLHeadElement) \ + X(HTMLHtmlElement) \ X(HTMLIFrameElement) \ X(HTMLImageElement) \ + X(HTMLMetaElement) \ X(HTMLOptionElement) \ + X(HTMLTitleElement) \ X(MutationObserver) \ X(Navigator) \ X(Node) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 31f291332b4..6ac15046532 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3160,4 +3160,12 @@ sync_test("prototypes", function() { check(HTMLFrameElement.prototype, HTMLElement.prototype, "frame element prototype"); check(document.createElement("iframe"), HTMLIFrameElement.prototype, "iframe element"); check(HTMLIFrameElement.prototype, HTMLElement.prototype, "iframe element prototype"); + check(document.createElement("title"), HTMLTitleElement.prototype, "title element"); + check(HTMLTitleElement.prototype, HTMLElement.prototype, "title element prototype"); + check(document.documentElement, HTMLHtmlElement.prototype, "html element"); + check(HTMLHtmlElement.prototype, HTMLElement.prototype, "html element prototype"); + check(document.head, HTMLHeadElement.prototype, "head element"); + check(HTMLHeadElement.prototype, HTMLElement.prototype, "head element prototype"); + check(document.createElement("meta"), HTMLMetaElement.prototype, "meta element"); + check(HTMLMetaElement.prototype, HTMLElement.prototype, "meta element prototype"); });