From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlbody.c | 13 +++++++------ dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 1 + dlls/mshtml/tests/es5.js | 1 + 4 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c index 135712afcd2..576c0d1fd0f 100644 --- a/dlls/mshtml/htmlbody.c +++ b/dlls/mshtml/htmlbody.c @@ -893,12 +893,13 @@ static const tid_t HTMLBodyElement_iface_tids[] = { 0 };
-static dispex_static_data_t HTMLBodyElement_dispex = { - "HTMLBodyElement", - &HTMLBodyElement_event_target_vtbl.dispex_vtbl, - DispHTMLBody_tid, - HTMLBodyElement_iface_tids, - HTMLElement_init_dispex_info +dispex_static_data_t HTMLBodyElement_dispex = { + .name = "HTMLBodyElement", + .id = PROT_HTMLBodyElement, + .vtbl = &HTMLBodyElement_event_target_vtbl.dispex_vtbl, + .disp_tid = DispHTMLBody_tid, + .iface_tids = HTMLBodyElement_iface_tids, + .init_info = HTMLElement_init_dispex_info, };
HRESULT HTMLBodyElement_Create(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **elem) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index daf7f825aa1..c2f8d508e5c 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -408,6 +408,7 @@ typedef struct {
#define ALL_PROTOTYPES \ X(DOMImplementation) \ + X(HTMLBodyElement) \ X(Navigator)
typedef enum { diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 5d9cf4a19ed..e8905374dcd 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3122,4 +3122,5 @@ sync_test("prototypes", function() { check(DOMImplementation.prototype, Object.prototype, "implementation prototype"); check(window.navigator, Navigator.prototype, "navigator"); check(Navigator.prototype, Object.prototype, "navigator prototype"); + check(document.body, HTMLBodyElement.prototype, "body element"); }); diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js index f2d81be9c7d..98d5ec37cb4 100644 --- a/dlls/mshtml/tests/es5.js +++ b/dlls/mshtml/tests/es5.js @@ -2756,4 +2756,5 @@ sync_test("prototypes", function() { ok(document.implementation instanceof DOMImplementation, "document.implementation is not an instance of DOMImplementation"); ok(navigator instanceof Navigator, "navigator is not an instance of Navigator"); ok(!(navigator instanceof DOMImplementation), "navigator is an instance of DOMImplementation"); + ok(document.body instanceof HTMLBodyElement, "body is not an instance of HTMLBodyElement"); });