From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlattr.c | 13 +++++++------ dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/mshtml/htmlattr.c b/dlls/mshtml/htmlattr.c index 31837f06284..9b306eff406 100644 --- a/dlls/mshtml/htmlattr.c +++ b/dlls/mshtml/htmlattr.c @@ -405,11 +405,12 @@ static const tid_t HTMLDOMAttribute_iface_tids[] = { IHTMLDOMAttribute2_tid, 0 }; -static dispex_static_data_t HTMLDOMAttribute_dispex = { - "Attr", - &HTMLDOMAttribute_dispex_vtbl, - DispHTMLDOMAttribute_tid, - HTMLDOMAttribute_iface_tids +dispex_static_data_t Attr_dispex = { + .id = PROT_Attr, + .prototype_id = PROT_Node, + .vtbl = &HTMLDOMAttribute_dispex_vtbl, + .disp_tid = DispHTMLDOMAttribute_tid, + .iface_tids = HTMLDOMAttribute_iface_tids, };
HTMLDOMAttribute *unsafe_impl_from_IHTMLDOMAttribute(IHTMLDOMAttribute *iface) @@ -433,7 +434,7 @@ HRESULT HTMLDOMAttribute_Create(const WCHAR *name, HTMLElement *elem, DISPID dis ret->dispid = dispid; ret->elem = elem;
- init_dispatch(&ret->dispex, &HTMLDOMAttribute_dispex, doc->script_global, + init_dispatch(&ret->dispex, &Attr_dispex, doc->script_global, dispex_compat_mode(&doc->script_global->event_target.dispex));
/* For attributes attached to an element, (elem,dispid) pair should be valid used for its operation. */ diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index ddedf8a4035..463e486366c 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -407,6 +407,7 @@ typedef struct { } dispex_static_data_vtbl_t;
#define ALL_PROTOTYPES \ + X(Attr) \ X(CSSRule) \ X(CSSStyleDeclaration) \ X(CSSStyleRule) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 612bfe02d75..fe82105ea8c 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3325,4 +3325,6 @@ sync_test("prototypes", function() { } check(document.createComment(""), Comment.prototype, "comment"); check(Comment.prototype, CharacterData.prototype, "comment prototype"); + check(document.createAttribute("test"), Attr.prototype, "attr"); + check(Attr.prototype, Node.prototype, "attr prototype"); });