From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlframe.c | 34 +++++++++++++++++-------------- dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/documentmode.js | 4 ++++ 3 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/dlls/mshtml/htmlframe.c b/dlls/mshtml/htmlframe.c index 8082af43be5..347861d2c10 100644 --- a/dlls/mshtml/htmlframe.c +++ b/dlls/mshtml/htmlframe.c @@ -928,12 +928,14 @@ static const tid_t HTMLFrameElement_iface_tids[] = { 0 };
-static dispex_static_data_t HTMLFrameElement_dispex = { - "HTMLFrameElement", - &HTMLFrameElement_event_target_vtbl.dispex_vtbl, - DispHTMLFrameElement_tid, - HTMLFrameElement_iface_tids, - HTMLElement_init_dispex_info +dispex_static_data_t HTMLFrameElement_dispex = { + .name = "HTMLFrameElement", + .id = PROT_HTMLFrameElement, + .prototype_id = PROT_HTMLElement, + .vtbl = &HTMLFrameElement_event_target_vtbl.dispex_vtbl, + .disp_tid = DispHTMLFrameElement_tid, + .iface_tids = HTMLFrameElement_iface_tids, + .init_info = HTMLElement_init_dispex_info, };
HRESULT HTMLFrameElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem) @@ -1340,7 +1342,7 @@ static const NodeImplVtbl HTMLIFrameImplVtbl = { .bind_to_tree = HTMLIFrame_bind_to_tree, };
-static const event_target_vtbl_t HTMLIFrame_event_target_vtbl = { +static const event_target_vtbl_t HTMLIFrameElement_event_target_vtbl = { { HTMLELEMENT_DISPEX_VTBL_ENTRIES, .query_interface= HTMLIFrame_query_interface, @@ -1355,7 +1357,7 @@ static const event_target_vtbl_t HTMLIFrame_event_target_vtbl = { .handle_event = HTMLElement_handle_event };
-static const tid_t HTMLIFrame_iface_tids[] = { +static const tid_t HTMLIFrameElement_iface_tids[] = { HTMLELEMENT_TIDS, IHTMLFrameBase_tid, IHTMLFrameBase2_tid, @@ -1365,12 +1367,14 @@ static const tid_t HTMLIFrame_iface_tids[] = { 0 };
-static dispex_static_data_t HTMLIFrame_dispex = { - "HTMLIFrameElement", - &HTMLIFrame_event_target_vtbl.dispex_vtbl, - DispHTMLIFrame_tid, - HTMLIFrame_iface_tids, - HTMLElement_init_dispex_info +dispex_static_data_t HTMLIFrameElement_dispex = { + .name = "HTMLIFrameElement", + .id = PROT_HTMLIFrameElement, + .prototype_id = PROT_HTMLElement, + .vtbl = &HTMLIFrameElement_event_target_vtbl.dispex_vtbl, + .disp_tid = DispHTMLIFrame_tid, + .iface_tids = HTMLIFrameElement_iface_tids, + .init_info = HTMLElement_init_dispex_info, };
HRESULT HTMLIFrame_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem) @@ -1386,7 +1390,7 @@ HRESULT HTMLIFrame_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElem ret->IHTMLIFrameElement3_iface.lpVtbl = &HTMLIFrameElement3Vtbl; ret->framebase.element.node.vtbl = &HTMLIFrameImplVtbl;
- HTMLFrameBase_Init(&ret->framebase, doc, nselem, &HTMLIFrame_dispex); + HTMLFrameBase_Init(&ret->framebase, doc, nselem, &HTMLIFrameElement_dispex);
*elem = &ret->framebase.element; return S_OK; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index a493c3e6557..c61dc96d22f 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -416,6 +416,8 @@ typedef struct { X(HTMLDocument) \ X(HTMLElement) \ X(HTMLFormElement) \ + X(HTMLFrameElement) \ + X(HTMLIFrameElement) \ X(HTMLImageElement) \ X(HTMLOptionElement) \ X(MutationObserver) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index e2916d7f5dd..31f291332b4 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3156,4 +3156,8 @@ sync_test("prototypes", function() { check(HTMLAreaElement.prototype, HTMLElement.prototype, "area element prototype"); check(document.createElement("form"), HTMLFormElement.prototype, "form element"); check(HTMLFormElement.prototype, HTMLElement.prototype, "form element prototype"); + check(document.createElement("frame"), HTMLFrameElement.prototype, "frame element"); + check(HTMLFrameElement.prototype, HTMLElement.prototype, "frame element prototype"); + check(document.createElement("iframe"), HTMLIFrameElement.prototype, "iframe element"); + check(HTMLIFrameElement.prototype, HTMLElement.prototype, "iframe element prototype"); });