From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/dispex.c | 9 +++++++++ dlls/mshtml/htmlanchor.c | 1 - dlls/mshtml/htmlarea.c | 1 - dlls/mshtml/htmlbody.c | 1 - dlls/mshtml/htmldoc.c | 3 --- dlls/mshtml/htmlelem.c | 2 -- dlls/mshtml/htmlform.c | 1 - dlls/mshtml/htmlframe.c | 2 -- dlls/mshtml/htmlhead.c | 4 ---- dlls/mshtml/htmlimg.c | 1 - dlls/mshtml/htmlinput.c | 3 --- dlls/mshtml/htmllink.c | 1 - dlls/mshtml/htmlnode.c | 1 - dlls/mshtml/htmlobject.c | 2 -- dlls/mshtml/htmlscript.c | 1 - dlls/mshtml/htmlselect.c | 2 -- dlls/mshtml/htmlstorage.c | 1 - dlls/mshtml/htmlstyleelem.c | 1 - dlls/mshtml/htmltable.c | 4 ---- dlls/mshtml/htmltextarea.c | 1 - dlls/mshtml/htmltextnode.c | 2 -- dlls/mshtml/htmlwindow.c | 1 - dlls/mshtml/mutation.c | 1 - dlls/mshtml/omnavigator.c | 2 -- dlls/mshtml/svg.c | 6 ------ dlls/mshtml/xmlhttprequest.c | 1 - 26 files changed, 9 insertions(+), 46 deletions(-)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 65139c88b77..0e8d27773cc 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -520,6 +520,12 @@ static BOOL find_prototype_member(const dispex_data_t *info, DISPID id) return FALSE; }
+static const char *object_names[] = { +#define X(name) #name, + ALL_PROTOTYPES +#undef X +}; + static dispex_data_t *preprocess_dispex_data(dispex_static_data_t *desc, compat_mode_t compat_mode, BOOL is_prototype) { const tid_t *tid; @@ -528,6 +534,9 @@ static dispex_data_t *preprocess_dispex_data(dispex_static_data_t *desc, compat_ ITypeInfo *dti; HRESULT hres;
+ if(!desc->name && desc->id) + desc->name = object_names[desc->id - 1]; + if(desc->disp_tid) { hres = get_typeinfo(desc->disp_tid, &dti); if(FAILED(hres)) { diff --git a/dlls/mshtml/htmlanchor.c b/dlls/mshtml/htmlanchor.c index 5f585ac61f6..0e1642b07bf 100644 --- a/dlls/mshtml/htmlanchor.c +++ b/dlls/mshtml/htmlanchor.c @@ -835,7 +835,6 @@ static const tid_t HTMLAnchorElement_iface_tids[] = { };
dispex_static_data_t HTMLAnchorElement_dispex = { - .name = "HTMLAnchorElement", .id = PROT_HTMLAnchorElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLAnchorElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmlarea.c b/dlls/mshtml/htmlarea.c index c26855e45e5..34e58473f72 100644 --- a/dlls/mshtml/htmlarea.c +++ b/dlls/mshtml/htmlarea.c @@ -445,7 +445,6 @@ static const tid_t HTMLAreaElement_iface_tids[] = { 0 }; dispex_static_data_t HTMLAreaElement_dispex = { - .name = "HTMLAreaElement", .id = PROT_HTMLAreaElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLAreaElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c index 5e91ddd4fd5..9057dfc7cd9 100644 --- a/dlls/mshtml/htmlbody.c +++ b/dlls/mshtml/htmlbody.c @@ -894,7 +894,6 @@ static const tid_t HTMLBodyElement_iface_tids[] = { };
dispex_static_data_t HTMLBodyElement_dispex = { - .name = "HTMLBodyElement", .id = PROT_HTMLBodyElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLBodyElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 14234cdfd69..3f74dbd2826 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -323,7 +323,6 @@ static const tid_t DocumentType_iface_tids[] = { };
dispex_static_data_t DocumentType_dispex = { - .name = "DocumentType", .id = PROT_DocumentType, .prototype_id = PROT_Node, .vtbl = &DocumentType_event_target_vtbl.dispex_vtbl, @@ -5710,13 +5709,11 @@ static void HTMLDocumentNode_init_dispex_info(dispex_data_t *info, compat_mode_t }
dispex_static_data_t Document_dispex = { - .name = "Document", .id = PROT_Document, .prototype_id = PROT_Node, };
dispex_static_data_t HTMLDocument_dispex = { - .name = "HTMLDocument", .id = PROT_HTMLDocument, .prototype_id = PROT_Document, .vtbl = &HTMLDocument_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 7001ff3b7da..2612b5988c1 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -7236,13 +7236,11 @@ static const IWineHTMLElementPrivateVtbl WineHTMLElementPrivateVtbl = { };
dispex_static_data_t Element_dispex = { - .name = "Element", .id = PROT_Element, .prototype_id = PROT_Node, };
dispex_static_data_t HTMLElement_dispex = { - .name = "HTMLElement", .id = PROT_HTMLElement, .prototype_id = PROT_Element, .vtbl = &HTMLElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmlform.c b/dlls/mshtml/htmlform.c index 83c13626a45..f9fa68c498a 100644 --- a/dlls/mshtml/htmlform.c +++ b/dlls/mshtml/htmlform.c @@ -909,7 +909,6 @@ static const tid_t HTMLFormElement_iface_tids[] = { };
dispex_static_data_t HTMLFormElement_dispex = { - .name = "HTMLFormElement", .id = PROT_HTMLFormElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLFormElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmlframe.c b/dlls/mshtml/htmlframe.c index 347861d2c10..bc8e76c3448 100644 --- a/dlls/mshtml/htmlframe.c +++ b/dlls/mshtml/htmlframe.c @@ -929,7 +929,6 @@ static const tid_t HTMLFrameElement_iface_tids[] = { };
dispex_static_data_t HTMLFrameElement_dispex = { - .name = "HTMLFrameElement", .id = PROT_HTMLFrameElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLFrameElement_event_target_vtbl.dispex_vtbl, @@ -1368,7 +1367,6 @@ static const tid_t HTMLIFrameElement_iface_tids[] = { };
dispex_static_data_t HTMLIFrameElement_dispex = { - .name = "HTMLIFrameElement", .id = PROT_HTMLIFrameElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLIFrameElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmlhead.c b/dlls/mshtml/htmlhead.c index 8fa64522a5d..36c66065b29 100644 --- a/dlls/mshtml/htmlhead.c +++ b/dlls/mshtml/htmlhead.c @@ -127,7 +127,6 @@ static const tid_t HTMLTitleElement_iface_tids[] = { 0 }; dispex_static_data_t HTMLTitleElement_dispex = { - .name = "HTMLTitleElement", .id = PROT_HTMLTitleElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLTitleElement_event_target_vtbl.dispex_vtbl, @@ -244,7 +243,6 @@ static const tid_t HTMLHtmlElement_iface_tids[] = { 0 }; dispex_static_data_t HTMLHtmlElement_dispex = { - .name = "HTMLHtmlElement", .id = PROT_HTMLHtmlElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLHtmlElement_event_target_vtbl.dispex_vtbl, @@ -425,7 +423,6 @@ static const tid_t HTMLMetaElement_iface_tids[] = { };
dispex_static_data_t HTMLMetaElement_dispex = { - .name = "HTMLMetaElement", .id = PROT_HTMLMetaElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLMetaElement_event_target_vtbl.dispex_vtbl, @@ -533,7 +530,6 @@ static const tid_t HTMLHeadElement_iface_tids[] = { 0 }; dispex_static_data_t HTMLHeadElement_dispex = { - .name = "HTMLHeadElement", .id = PROT_HTMLHeadElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLHeadElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmlimg.c b/dlls/mshtml/htmlimg.c index 08119464806..baa55462039 100644 --- a/dlls/mshtml/htmlimg.c +++ b/dlls/mshtml/htmlimg.c @@ -684,7 +684,6 @@ static void HTMLImgElement_init_dispex_info(dispex_data_t *info, compat_mode_t m }
dispex_static_data_t HTMLImageElement_dispex = { - .name = "HTMLImageElement", .id = PROT_HTMLImageElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLImgElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index f56589bef15..6d436ecffc1 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -1289,7 +1289,6 @@ static const tid_t HTMLInputElement_iface_tids[] = { 0 }; dispex_static_data_t HTMLInputElement_dispex = { - .name = "HTMLInputElement", .id = PROT_HTMLInputElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLInputElement_event_target_vtbl.dispex_vtbl, @@ -1434,7 +1433,6 @@ static const tid_t HTMLLabelElement_iface_tids[] = { };
dispex_static_data_t HTMLLabelElement_dispex = { - .name = "HTMLLabelElement", .id = PROT_HTMLLabelElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLLabelElement_event_target_vtbl.dispex_vtbl, @@ -1722,7 +1720,6 @@ static const tid_t HTMLButtonElement_iface_tids[] = { };
dispex_static_data_t HTMLButtonElement_dispex = { - .name = "HTMLButtonElement", .id = PROT_HTMLButtonElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLButtonElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmllink.c b/dlls/mshtml/htmllink.c index e499ee2232d..6ceb5bc2249 100644 --- a/dlls/mshtml/htmllink.c +++ b/dlls/mshtml/htmllink.c @@ -388,7 +388,6 @@ static const tid_t HTMLLinkElement_iface_tids[] = { 0 }; dispex_static_data_t HTMLLinkElement_dispex = { - .name = "HTMLLinkElement", .id = PROT_HTMLLinkElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLLinkElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index 263c04c4485..b20fe678091 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -1298,7 +1298,6 @@ static const tid_t HTMLDOMNode_iface_tids[] = { 0 }; dispex_static_data_t Node_dispex = { - .name = "Node", .id = PROT_Node, .vtbl = &Node_dispex_vtbl, .disp_tid = IHTMLDOMNode_tid, diff --git a/dlls/mshtml/htmlobject.c b/dlls/mshtml/htmlobject.c index 05d81ba7892..77ccaf12936 100644 --- a/dlls/mshtml/htmlobject.c +++ b/dlls/mshtml/htmlobject.c @@ -683,7 +683,6 @@ static const tid_t HTMLObjectElement_iface_tids[] = { 0 }; dispex_static_data_t HTMLObjectElement_dispex = { - .name = "HTMLObjectElement", .id = PROT_HTMLObjectElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLObjectElement_event_target_vtbl.dispex_vtbl, @@ -890,7 +889,6 @@ static const tid_t HTMLEmbedElement_iface_tids[] = { 0 }; dispex_static_data_t HTMLEmbedElement_dispex = { - .name = "HTMLEmbedElement", .id = PROT_HTMLEmbedElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLEmbedElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmlscript.c b/dlls/mshtml/htmlscript.c index 1defaba2efe..2a14b94bc08 100644 --- a/dlls/mshtml/htmlscript.c +++ b/dlls/mshtml/htmlscript.c @@ -415,7 +415,6 @@ static const tid_t HTMLScriptElement_iface_tids[] = { };
dispex_static_data_t HTMLScriptElement_dispex = { - .name = "HTMLScriptElement", .id = PROT_HTMLScriptElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLScriptElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c index 31f0e33a2b4..01729222041 100644 --- a/dlls/mshtml/htmlselect.c +++ b/dlls/mshtml/htmlselect.c @@ -346,7 +346,6 @@ static const tid_t HTMLOptionElement_iface_tids[] = { 0 }; dispex_static_data_t HTMLOptionElement_dispex = { - .name = "HTMLOptionElement", .id = PROT_HTMLOptionElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLOptionElement_event_target_vtbl.dispex_vtbl, @@ -1301,7 +1300,6 @@ static const tid_t HTMLSelectElement_tids[] = { };
dispex_static_data_t HTMLSelectElement_dispex = { - .name = "HTMLSelectElement", .id = PROT_HTMLSelectElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLSelectElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmlstorage.c b/dlls/mshtml/htmlstorage.c index f6131d14691..2ce8b951c20 100644 --- a/dlls/mshtml/htmlstorage.c +++ b/dlls/mshtml/htmlstorage.c @@ -1295,7 +1295,6 @@ static const tid_t HTMLStorage_iface_tids[] = { 0 }; dispex_static_data_t Storage_dispex = { - .name = "Storage", .id = PROT_Storage, .vtbl = &Storage_dispex_vtbl, .disp_tid = IHTMLStorage_tid, diff --git a/dlls/mshtml/htmlstyleelem.c b/dlls/mshtml/htmlstyleelem.c index 9a5d43ad36e..00142a353ec 100644 --- a/dlls/mshtml/htmlstyleelem.c +++ b/dlls/mshtml/htmlstyleelem.c @@ -336,7 +336,6 @@ static const tid_t HTMLStyleElement_iface_tids[] = { 0 }; dispex_static_data_t HTMLStyleElement_dispex = { - .name = "HTMLStyleElement", .id = PROT_HTMLStyleElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLStyleElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmltable.c b/dlls/mshtml/htmltable.c index 64edc89fd41..40fd13bc03d 100644 --- a/dlls/mshtml/htmltable.c +++ b/dlls/mshtml/htmltable.c @@ -431,7 +431,6 @@ static const NodeImplVtbl HTMLTableCellImplVtbl = { };
dispex_static_data_t HTMLTableCellElement_dispex = { - .name = "HTMLTableCellElement", .id = PROT_HTMLTableCellElement, .prototype_id = PROT_HTMLElement, }; @@ -455,7 +454,6 @@ static const tid_t HTMLTableDataCellElement_iface_tids[] = { };
dispex_static_data_t HTMLTableDataCellElement_dispex = { - .name = "HTMLTableDataCellElement", .id = PROT_HTMLTableDataCellElement, .prototype_id = PROT_HTMLTableCellElement, .vtbl = &HTMLTableDataCellElement_event_target_vtbl.dispex_vtbl, @@ -831,7 +829,6 @@ static const tid_t HTMLTableRowElement_iface_tids[] = { };
dispex_static_data_t HTMLTableRowElement_dispex = { - .name = "HTMLTableRowElement", .id = PROT_HTMLTableRowElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLTableRowElement_event_target_vtbl.dispex_vtbl, @@ -1686,7 +1683,6 @@ static const tid_t HTMLTableElement_iface_tids[] = { };
dispex_static_data_t HTMLTableElement_dispex = { - .name = "HTMLTableElement", .id = PROT_HTMLTableElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLTableElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmltextarea.c b/dlls/mshtml/htmltextarea.c index 613fe629117..4ab7ab961a9 100644 --- a/dlls/mshtml/htmltextarea.c +++ b/dlls/mshtml/htmltextarea.c @@ -416,7 +416,6 @@ static const tid_t HTMLTextAreaElement_iface_tids[] = { };
dispex_static_data_t HTMLTextAreaElement_dispex = { - .name = "HTMLTextAreaElement", .id = PROT_HTMLTextAreaElement, .prototype_id = PROT_HTMLElement, .vtbl = &HTMLTextAreaElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/htmltextnode.c b/dlls/mshtml/htmltextnode.c index d2bfc1fae58..7169e7f91db 100644 --- a/dlls/mshtml/htmltextnode.c +++ b/dlls/mshtml/htmltextnode.c @@ -258,7 +258,6 @@ static const NodeImplVtbl HTMLDOMTextNodeImplVtbl = { };
dispex_static_data_t CharacterData_dispex = { - .name = "CharactedData", .id = PROT_CharacterData, .prototype_id = PROT_Node, }; @@ -278,7 +277,6 @@ static const tid_t Text_iface_tids[] = { 0 }; dispex_static_data_t Text_dispex = { - .name = "Text", .id = PROT_Text, .prototype_id = PROT_CharacterData, .vtbl = &Text_dispex_vtbl, diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 799ed0a1f93..ea1f7f4b278 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -4189,7 +4189,6 @@ static const event_target_vtbl_t HTMLWindow_event_target_vtbl = { };
dispex_static_data_t Window_dispex = { - .name = "Window", .id = PROT_Window, .vtbl = &HTMLWindow_event_target_vtbl.dispex_vtbl, .disp_tid = DispHTMLWindow2_tid, diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c index 80079f79560..f23c31f861d 100644 --- a/dlls/mshtml/mutation.c +++ b/dlls/mshtml/mutation.c @@ -1181,7 +1181,6 @@ static const tid_t mutation_observer_iface_tids[] = { 0 }; dispex_static_data_t MutationObserver_dispex = { - .name = "MutationObserver", .id = PROT_MutationObserver, .init_constructor = create_mutation_observer_ctor, .vtbl = &mutation_observer_dispex_vtbl, diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index 873c55dcd40..043709d6de8 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -221,7 +221,6 @@ static const tid_t HTMLDOMImplementation_iface_tids[] = { 0 }; dispex_static_data_t DOMImplementation_dispex = { - .name = "DOMImplementation", .id = PROT_DOMImplementation, .vtbl = &DOMImplementation_dispex_vtbl, .disp_tid = DispHTMLDOMImplementation_tid, @@ -1153,7 +1152,6 @@ static const tid_t Navigator_iface_tids[] = { 0 }; dispex_static_data_t Navigator_dispex = { - .name = "Navigator", .id = PROT_Navigator, .vtbl = &Navigator_dispex_vtbl, .disp_tid = DispHTMLNavigator_tid, diff --git a/dlls/mshtml/svg.c b/dlls/mshtml/svg.c index ee06ea17061..ab72e0c95d9 100644 --- a/dlls/mshtml/svg.c +++ b/dlls/mshtml/svg.c @@ -157,7 +157,6 @@ static const event_target_vtbl_t SVGElement_event_target_vtbl = { };
dispex_static_data_t SVGElement_dispex = { - .name = "SVGElement", .id = PROT_SVGElement, .prototype_id = PROT_Element, .vtbl = &SVGElement_event_target_vtbl.dispex_vtbl, @@ -659,7 +658,6 @@ static const event_target_vtbl_t SVGSVGElement_event_target_vtbl = { };
dispex_static_data_t SVGSVGElement_dispex = { - .name = "SVGSVGElement", .id = PROT_SVGSVGElement, .prototype_id = PROT_SVGElement, .vtbl = &SVGSVGElement_event_target_vtbl.dispex_vtbl, @@ -791,7 +789,6 @@ static const event_target_vtbl_t SVGCircleElement_event_target_vtbl = { };
dispex_static_data_t SVGCircleElement_dispex = { - .name = "SVGCircleElement", .id = PROT_SVGCircleElement, .prototype_id = PROT_SVGElement, .vtbl = &SVGCircleElement_event_target_vtbl.dispex_vtbl, @@ -980,13 +977,11 @@ static void *SVGTSpanElement_query_interface(DispatchEx *dispex, REFIID riid) }
dispex_static_data_t SVGTextContentElement_dispex = { - .name = "SVGTextContentElement", .id = PROT_SVGTextContentElement, .prototype_id = PROT_SVGElement, };
dispex_static_data_t SVGTextPositioningElement_dispex = { - .name = "SVGTextPositioningElement", .id = PROT_SVGTextPositioningElement, .prototype_id = PROT_SVGTextContentElement, }; @@ -1011,7 +1006,6 @@ static const event_target_vtbl_t SVGTSpanElement_event_target_vtbl = { };
dispex_static_data_t SVGTSpanElement_dispex = { - .name = "SVGTSpanElement", .id = PROT_SVGTSpanElement, .prototype_id = PROT_SVGTextPositioningElement, .vtbl = &SVGTSpanElement_event_target_vtbl.dispex_vtbl, diff --git a/dlls/mshtml/xmlhttprequest.c b/dlls/mshtml/xmlhttprequest.c index 0798b2e2abb..fffc9fab51b 100644 --- a/dlls/mshtml/xmlhttprequest.c +++ b/dlls/mshtml/xmlhttprequest.c @@ -1482,7 +1482,6 @@ static const tid_t HTMLXMLHttpRequest_iface_tids[] = { 0 }; dispex_static_data_t XMLHttpRequest_dispex = { - .name = "XMLHttpRequest", .id = PROT_XMLHttpRequest, .init_constructor = HTMLXMLHttpRequestFactory_Create, .vtbl = &HTMLXMLHttpRequest_event_target_vtbl.dispex_vtbl,
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlstyle.c | 18 +++++++----------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index d916aecb420..14dd48439b2 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -9757,22 +9757,18 @@ HRESULT HTMLStyle_Create(HTMLElement *elem, HTMLStyle **ret) return S_OK; }
-static const dispex_static_data_vtbl_t HTMLW3CComputedStyle_dispex_vtbl = { +static const dispex_static_data_vtbl_t CSSStyleDeclaration_dispex_vtbl = { CSSSTYLE_DISPEX_VTBL_ENTRIES, .query_interface = CSSStyle_query_interface, .traverse = CSSStyle_traverse, .unlink = CSSStyle_unlink };
-static const tid_t HTMLW3CComputedStyle_iface_tids[] = { - 0 -}; -static dispex_static_data_t HTMLW3CComputedStyle_dispex = { - "CSSStyleDeclaration", - &HTMLW3CComputedStyle_dispex_vtbl, - DispHTMLW3CComputedStyle_tid, - HTMLW3CComputedStyle_iface_tids, - CSSStyle_init_dispex_info +dispex_static_data_t CSSStyleDeclaration_dispex = { + .id = PROT_CSSStyleDeclaration, + .vtbl = &CSSStyleDeclaration_dispex_vtbl, + .disp_tid = DispHTMLW3CComputedStyle_tid, + .init_info = CSSStyle_init_dispex_info, };
HRESULT create_computed_style(nsIDOMCSSStyleDeclaration *nsstyle, DispatchEx *owner, IHTMLCSSStyleDeclaration **p) @@ -9782,7 +9778,7 @@ HRESULT create_computed_style(nsIDOMCSSStyleDeclaration *nsstyle, DispatchEx *ow if(!(style = calloc(1, sizeof(*style)))) return E_OUTOFMEMORY;
- init_css_style(style, nsstyle, &HTMLW3CComputedStyle_dispex, owner); + init_css_style(style, nsstyle, &CSSStyleDeclaration_dispex, owner); *p = &style->IHTMLCSSStyleDeclaration_iface; return S_OK; } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index a268adbbc14..4170d1feeda 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(CSSStyleDeclaration) \ X(CharacterData) \ X(DOMImplementation) \ X(Document) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index e4e03cc8534..fb2aec43dcf 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3214,4 +3214,6 @@ sync_test("prototypes", function() { check(document.createTextNode(""), Text.prototype, "text"); check(Text.prototype, CharacterData.prototype, "text prototype"); check(CharacterData.prototype, Node.prototype, "character data prototype"); + check(window.getComputedStyle(document.body), CSSStyleDeclaration.prototype, "computed style"); + check(CSSStyleDeclaration.prototype, Object.prototype, "CSSStyleDeclaration"); });
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlstyle.c | 24 +++++++++++++++--------- dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/documentmode.js | 4 ++++ 3 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 14dd48439b2..33655698d43 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -9652,14 +9652,19 @@ void CSSStyle_init_dispex_info(dispex_data_t *info, compat_mode_t mode) dispex_info_add_interface(info, IHTMLCSSStyleDeclaration2_tid, NULL); }
-static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl = { +dispex_static_data_t MSCSSProperties_dispex = { + .id = PROT_MSCSSProperties, + .prototype_id = PROT_CSSStyleDeclaration, +}; + +static const dispex_static_data_vtbl_t MSStyleCSSProperties_dispex_vtbl = { CSSSTYLE_DISPEX_VTBL_ENTRIES, .query_interface = HTMLStyle_query_interface, .traverse = HTMLStyle_traverse, .unlink = HTMLStyle_unlink };
-static const tid_t HTMLStyle_iface_tids[] = { +static const tid_t MSStyleCSSProperties_iface_tids[] = { IHTMLStyle6_tid, IHTMLStyle5_tid, IHTMLStyle4_tid, @@ -9668,12 +9673,13 @@ static const tid_t HTMLStyle_iface_tids[] = { IHTMLStyle_tid, 0 }; -static dispex_static_data_t HTMLStyle_dispex = { - "MSStyleCSSProperties", - &HTMLStyle_dispex_vtbl, - DispHTMLStyle_tid, - HTMLStyle_iface_tids, - CSSStyle_init_dispex_info +dispex_static_data_t MSStyleCSSProperties_dispex = { + .id = PROT_MSStyleCSSProperties, + .prototype_id = PROT_MSCSSProperties, + .vtbl = &MSStyleCSSProperties_dispex_vtbl, + .disp_tid = DispHTMLStyle_tid, + .iface_tids = MSStyleCSSProperties_iface_tids, + .init_info = CSSStyle_init_dispex_info, };
static HRESULT get_style_from_elem(HTMLElement *elem, nsIDOMCSSStyleDeclaration **ret) @@ -9750,7 +9756,7 @@ HRESULT HTMLStyle_Create(HTMLElement *elem, HTMLStyle **ret) style->elem = elem; IHTMLDOMNode_AddRef(&elem->node.IHTMLDOMNode_iface);
- init_css_style(&style->css_style, nsstyle, &HTMLStyle_dispex, &elem->node.event_target.dispex); + init_css_style(&style->css_style, nsstyle, &MSStyleCSSProperties_dispex, &elem->node.event_target.dispex); nsIDOMCSSStyleDeclaration_Release(nsstyle);
*ret = style; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 4170d1feeda..ee269ac46b4 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -441,6 +441,8 @@ typedef struct { X(HTMLTableRowElement) \ X(HTMLTextAreaElement) \ X(HTMLTitleElement) \ + X(MSCSSProperties) \ + X(MSStyleCSSProperties) \ X(MutationObserver) \ X(Navigator) \ X(Node) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index fb2aec43dcf..fe5819c3a3a 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3216,4 +3216,8 @@ sync_test("prototypes", function() { check(CharacterData.prototype, Node.prototype, "character data prototype"); check(window.getComputedStyle(document.body), CSSStyleDeclaration.prototype, "computed style"); check(CSSStyleDeclaration.prototype, Object.prototype, "CSSStyleDeclaration"); + check(document.body.style, MSStyleCSSProperties.prototype, "style"); + check(MSStyleCSSProperties.prototype, MSCSSProperties.prototype, "MSStyleCSSProperties"); + check(MSCSSProperties.prototype, CSSStyleDeclaration.prototype, "MSCSSProperties"); + check(CSSStyleDeclaration.prototype, Object.prototype, "CSSStyleDeclaration"); });
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlcurstyle.c | 19 ++++++++++--------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index 135b1b735ee..f54879fb729 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -1127,26 +1127,27 @@ static void HTMLCurrentStyle_unlink(DispatchEx *dispex) } }
-static const dispex_static_data_vtbl_t HTMLCurrentStyle_dispex_vtbl = { +static const dispex_static_data_vtbl_t MSCurrentStyleCSSProperties_dispex_vtbl = { CSSSTYLE_DISPEX_VTBL_ENTRIES, .query_interface = HTMLCurrentStyle_query_interface, .traverse = HTMLCurrentStyle_traverse, .unlink = HTMLCurrentStyle_unlink };
-static const tid_t HTMLCurrentStyle_iface_tids[] = { +static const tid_t MSCurrentStyleCSSProperties_iface_tids[] = { IHTMLCurrentStyle_tid, IHTMLCurrentStyle2_tid, IHTMLCurrentStyle3_tid, IHTMLCurrentStyle4_tid, 0 }; -static dispex_static_data_t HTMLCurrentStyle_dispex = { - "MSCurrentStyleCSSProperties", - &HTMLCurrentStyle_dispex_vtbl, - DispHTMLCurrentStyle_tid, - HTMLCurrentStyle_iface_tids, - CSSStyle_init_dispex_info +dispex_static_data_t MSCurrentStyleCSSProperties_dispex = { + .id = PROT_MSCurrentStyleCSSProperties, + .prototype_id = PROT_MSCSSProperties, + .vtbl = &MSCurrentStyleCSSProperties_dispex_vtbl, + .disp_tid = DispHTMLCurrentStyle_tid, + .iface_tids = MSCurrentStyleCSSProperties_iface_tids, + .init_info = CSSStyle_init_dispex_info, };
HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p) @@ -1198,7 +1199,7 @@ HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p) ret->IHTMLCurrentStyle3_iface.lpVtbl = &HTMLCurrentStyle3Vtbl; ret->IHTMLCurrentStyle4_iface.lpVtbl = &HTMLCurrentStyle4Vtbl;
- init_css_style(&ret->css_style, nsstyle, &HTMLCurrentStyle_dispex, &elem->node.event_target.dispex); + init_css_style(&ret->css_style, nsstyle, &MSCurrentStyleCSSProperties_dispex, &elem->node.event_target.dispex); nsIDOMCSSStyleDeclaration_Release(nsstyle);
IHTMLElement_AddRef(&elem->IHTMLElement_iface); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index ee269ac46b4..d12353ae237 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -442,6 +442,7 @@ typedef struct { X(HTMLTextAreaElement) \ X(HTMLTitleElement) \ X(MSCSSProperties) \ + X(MSCurrentStyleCSSProperties) \ X(MSStyleCSSProperties) \ X(MutationObserver) \ X(Navigator) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index fe5819c3a3a..c0ae9d4473a 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3220,4 +3220,6 @@ sync_test("prototypes", function() { check(MSStyleCSSProperties.prototype, MSCSSProperties.prototype, "MSStyleCSSProperties"); check(MSCSSProperties.prototype, CSSStyleDeclaration.prototype, "MSCSSProperties"); check(CSSStyleDeclaration.prototype, Object.prototype, "CSSStyleDeclaration"); + check(document.body.currentStyle, MSCurrentStyleCSSProperties.prototype, "current style"); + check(MSCurrentStyleCSSProperties.prototype, MSCSSProperties.prototype, "MSCurrentStyleCSSProperties"); });
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlstylesheet.c | 23 ++++++++++++++--------- dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/documentmode.js | 5 +++++ 3 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/dlls/mshtml/htmlstylesheet.c b/dlls/mshtml/htmlstylesheet.c index fa674f08ccf..c8928f39a3c 100644 --- a/dlls/mshtml/htmlstylesheet.c +++ b/dlls/mshtml/htmlstylesheet.c @@ -1200,23 +1200,28 @@ static void HTMLStyleSheet_init_dispex_info(dispex_data_t *info, compat_mode_t m dispex_info_add_interface(info, IHTMLStyleSheet4_tid, NULL); }
-static const dispex_static_data_vtbl_t HTMLStyleSheet_dispex_vtbl = { +dispex_static_data_t StyleSheet_dispex = { + .id = PROT_StyleSheet, +}; + +static const dispex_static_data_vtbl_t CSSStyleSheet_dispex_vtbl = { .query_interface = HTMLStyleSheet_query_interface, .destructor = HTMLStyleSheet_destructor, .traverse = HTMLStyleSheet_traverse, .unlink = HTMLStyleSheet_unlink };
-static const tid_t HTMLStyleSheet_iface_tids[] = { +static const tid_t CSSStyleSheet_iface_tids[] = { IHTMLStyleSheet_tid, 0 }; -static dispex_static_data_t HTMLStyleSheet_dispex = { - "CSSStyleSheet", - &HTMLStyleSheet_dispex_vtbl, - DispHTMLStyleSheet_tid, - HTMLStyleSheet_iface_tids, - HTMLStyleSheet_init_dispex_info +dispex_static_data_t CSSStyleSheet_dispex = { + .id = PROT_CSSStyleSheet, + .prototype_id = PROT_StyleSheet, + .vtbl = &CSSStyleSheet_dispex_vtbl, + .disp_tid = DispHTMLStyleSheet_tid, + .iface_tids = CSSStyleSheet_iface_tids, + .init_info = HTMLStyleSheet_init_dispex_info, };
HRESULT create_style_sheet(nsIDOMStyleSheet *nsstylesheet, DispatchEx *owner, IHTMLStyleSheet **ret) @@ -1231,7 +1236,7 @@ HRESULT create_style_sheet(nsIDOMStyleSheet *nsstylesheet, DispatchEx *owner, IH style_sheet->IHTMLStyleSheet4_iface.lpVtbl = &HTMLStyleSheet4Vtbl; style_sheet->nsstylesheet = NULL;
- init_dispatch_with_owner(&style_sheet->dispex, &HTMLStyleSheet_dispex, owner); + init_dispatch_with_owner(&style_sheet->dispex, &CSSStyleSheet_dispex, owner);
if(nsstylesheet) { nsres = nsIDOMStyleSheet_QueryInterface(nsstylesheet, &IID_nsIDOMCSSStyleSheet, diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index d12353ae237..943725ddf37 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -408,6 +408,7 @@ typedef struct {
#define ALL_PROTOTYPES \ X(CSSStyleDeclaration) \ + X(CSSStyleSheet) \ X(CharacterData) \ X(DOMImplementation) \ X(Document) \ @@ -454,6 +455,7 @@ typedef struct { X(SVGTextContentElement) \ X(SVGTextPositioningElement) \ X(Storage) \ + X(StyleSheet) \ X(Text) \ X(Window) \ X(XMLHttpRequest) diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index c0ae9d4473a..51b423b953d 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3222,4 +3222,9 @@ sync_test("prototypes", function() { check(CSSStyleDeclaration.prototype, Object.prototype, "CSSStyleDeclaration"); check(document.body.currentStyle, MSCurrentStyleCSSProperties.prototype, "current style"); check(MSCurrentStyleCSSProperties.prototype, MSCSSProperties.prototype, "MSCurrentStyleCSSProperties"); + var e = document.createElement("style"); + document.body.appendChild(e); + check(e.sheet, CSSStyleSheet.prototype, "stylesheet"); + check(CSSStyleSheet.prototype, StyleSheet.prototype, "css stylesheet prototype"); + check(StyleSheet.prototype, Object.prototype, "stylesheet prototype"); });
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlstylesheet.c | 16 ++++++++-------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/htmlstylesheet.c b/dlls/mshtml/htmlstylesheet.c index c8928f39a3c..6ba0bbaa62d 100644 --- a/dlls/mshtml/htmlstylesheet.c +++ b/dlls/mshtml/htmlstylesheet.c @@ -715,7 +715,7 @@ static HRESULT HTMLStyleSheetsCollection_invoke(DispatchEx *dispex, DISPID id, L return S_OK; }
-static const dispex_static_data_vtbl_t HTMLStyleSheetsCollection_dispex_vtbl = { +static const dispex_static_data_vtbl_t StyleSheetList_dispex_vtbl = { .query_interface = HTMLStyleSheetsCollection_query_interface, .destructor = HTMLStyleSheetsCollection_destructor, .traverse = HTMLStyleSheetsCollection_traverse, @@ -724,15 +724,15 @@ static const dispex_static_data_vtbl_t HTMLStyleSheetsCollection_dispex_vtbl = { .get_prop_desc = dispex_index_prop_desc, .invoke = HTMLStyleSheetsCollection_invoke }; -static const tid_t HTMLStyleSheetsCollection_iface_tids[] = { +static const tid_t StyleSheetList_iface_tids[] = { IHTMLStyleSheetsCollection_tid, 0 }; -static dispex_static_data_t HTMLStyleSheetsCollection_dispex = { - "StyleSheetList", - &HTMLStyleSheetsCollection_dispex_vtbl, - DispHTMLStyleSheetsCollection_tid, - HTMLStyleSheetsCollection_iface_tids +dispex_static_data_t StyleSheetList_dispex = { + .id = PROT_StyleSheetList, + .vtbl = &StyleSheetList_dispex_vtbl, + .disp_tid = DispHTMLStyleSheetsCollection_tid, + .iface_tids = StyleSheetList_iface_tids, };
HRESULT create_style_sheet_collection(nsIDOMStyleSheetList *nslist, HTMLDocumentNode *doc, @@ -749,7 +749,7 @@ HRESULT create_style_sheet_collection(nsIDOMStyleSheetList *nslist, HTMLDocument nsIDOMStyleSheetList_AddRef(nslist); collection->nslist = nslist;
- init_dispatch(&collection->dispex, &HTMLStyleSheetsCollection_dispex, doc->script_global, + init_dispatch(&collection->dispex, &StyleSheetList_dispex, doc->script_global, dispex_compat_mode(&doc->node.event_target.dispex));
*ret = &collection->IHTMLStyleSheetsCollection_iface; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 943725ddf37..417fcb81def 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -456,6 +456,7 @@ typedef struct { X(SVGTextPositioningElement) \ X(Storage) \ X(StyleSheet) \ + X(StyleSheetList) \ X(Text) \ X(Window) \ X(XMLHttpRequest) diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 51b423b953d..01ae58df446 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3227,4 +3227,6 @@ sync_test("prototypes", function() { check(e.sheet, CSSStyleSheet.prototype, "stylesheet"); check(CSSStyleSheet.prototype, StyleSheet.prototype, "css stylesheet prototype"); check(StyleSheet.prototype, Object.prototype, "stylesheet prototype"); + check(document.styleSheets, StyleSheetList.prototype, "stylesheets list"); + check(StyleSheetList.prototype, Object.prototype, "stylesheets list prototype"); });
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlstylesheet.c | 16 ++++++++-------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/htmlstylesheet.c b/dlls/mshtml/htmlstylesheet.c index 6ba0bbaa62d..19f15c9a414 100644 --- a/dlls/mshtml/htmlstylesheet.c +++ b/dlls/mshtml/htmlstylesheet.c @@ -353,7 +353,7 @@ static HRESULT HTMLStyleSheetRulesCollection_invoke(DispatchEx *dispex, DISPID i return S_OK; }
-static const dispex_static_data_vtbl_t HTMLStyleSheetRulesCollection_dispex_vtbl = { +static const dispex_static_data_vtbl_t MSCSSRuleList_dispex_vtbl = { .query_interface = HTMLStyleSheetRulesCollection_query_interface, .destructor = HTMLStyleSheetRulesCollection_destructor, .traverse = HTMLStyleSheetRulesCollection_traverse, @@ -362,15 +362,15 @@ static const dispex_static_data_vtbl_t HTMLStyleSheetRulesCollection_dispex_vtbl .get_prop_desc = dispex_index_prop_desc, .invoke = HTMLStyleSheetRulesCollection_invoke }; -static const tid_t HTMLStyleSheetRulesCollection_iface_tids[] = { +static const tid_t MSCSSRuleList_iface_tids[] = { IHTMLStyleSheetRulesCollection_tid, 0 }; -static dispex_static_data_t HTMLStyleSheetRulesCollection_dispex = { - "MSCSSRuleList", - &HTMLStyleSheetRulesCollection_dispex_vtbl, - DispHTMLStyleSheetRulesCollection_tid, - HTMLStyleSheetRulesCollection_iface_tids +dispex_static_data_t MSCSSRuleList_dispex = { + .id = PROT_MSCSSRuleList, + .vtbl = &MSCSSRuleList_dispex_vtbl, + .disp_tid = DispHTMLStyleSheetRulesCollection_tid, + .iface_tids = MSCSSRuleList_iface_tids, };
static HRESULT create_style_sheet_rules_collection(nsIDOMCSSRuleList *nslist, DispatchEx *owner, @@ -384,7 +384,7 @@ static HRESULT create_style_sheet_rules_collection(nsIDOMCSSRuleList *nslist, Di collection->IHTMLStyleSheetRulesCollection_iface.lpVtbl = &HTMLStyleSheetRulesCollectionVtbl; collection->nslist = nslist;
- init_dispatch_with_owner(&collection->dispex, &HTMLStyleSheetRulesCollection_dispex, owner); + init_dispatch_with_owner(&collection->dispex, &MSCSSRuleList_dispex, owner);
if(nslist) nsIDOMCSSRuleList_AddRef(nslist); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 417fcb81def..dc6db701e0c 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -443,6 +443,7 @@ typedef struct { X(HTMLTextAreaElement) \ X(HTMLTitleElement) \ X(MSCSSProperties) \ + X(MSCSSRuleList) \ X(MSCurrentStyleCSSProperties) \ X(MSStyleCSSProperties) \ X(MutationObserver) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 01ae58df446..97c879ed679 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3229,4 +3229,6 @@ sync_test("prototypes", function() { check(StyleSheet.prototype, Object.prototype, "stylesheet prototype"); check(document.styleSheets, StyleSheetList.prototype, "stylesheets list"); check(StyleSheetList.prototype, Object.prototype, "stylesheets list prototype"); + check(e.sheet.rules, MSCSSRuleList.prototype, "css rule list"); + check(MSCSSRuleList.prototype, Object.prototype, "css rule list prototype"); });
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlstylesheet.c | 21 +++++++++++++-------- dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/documentmode.js | 4 ++++ 3 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/htmlstylesheet.c b/dlls/mshtml/htmlstylesheet.c index 19f15c9a414..277b2ea04d1 100644 --- a/dlls/mshtml/htmlstylesheet.c +++ b/dlls/mshtml/htmlstylesheet.c @@ -153,22 +153,27 @@ static void HTMLStyleSheetRule_destructor(DispatchEx *dispex) free(This); }
-static const dispex_static_data_vtbl_t HTMLStyleSheetRule_dispex_vtbl = { +dispex_static_data_t CSSRule_dispex = { + .id = PROT_CSSRule, +}; + +static const dispex_static_data_vtbl_t CSSStyleRule_dispex_vtbl = { .query_interface = HTMLStyleSheetRule_query_interface, .destructor = HTMLStyleSheetRule_destructor, .traverse = HTMLStyleSheetRule_traverse, .unlink = HTMLStyleSheetRule_unlink };
-static const tid_t HTMLStyleSheetRule_iface_tids[] = { +static const tid_t CSSStyleRule_iface_tids[] = { IHTMLStyleSheetRule_tid, 0 }; -static dispex_static_data_t HTMLStyleSheetRule_dispex = { - "CSSStyleRule", - &HTMLStyleSheetRule_dispex_vtbl, - DispHTMLStyleSheetRule_tid, - HTMLStyleSheetRule_iface_tids +dispex_static_data_t CSSStyleRule_dispex = { + .id = PROT_CSSStyleRule, + .prototype_id = PROT_CSSRule, + .vtbl = &CSSStyleRule_dispex_vtbl, + .disp_tid = DispHTMLStyleSheetRule_tid, + .iface_tids = CSSStyleRule_iface_tids, };
static HRESULT create_style_sheet_rule(nsIDOMCSSRule *nsstylesheetrule, DispatchEx *owner, @@ -183,7 +188,7 @@ static HRESULT create_style_sheet_rule(nsIDOMCSSRule *nsstylesheetrule, Dispatch rule->IHTMLStyleSheetRule_iface.lpVtbl = &HTMLStyleSheetRuleVtbl; rule->nsstylesheetrule = NULL;
- init_dispatch_with_owner(&rule->dispex, &HTMLStyleSheetRule_dispex, owner); + init_dispatch_with_owner(&rule->dispex, &CSSStyleRule_dispex, owner);
if (nsstylesheetrule) { diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index dc6db701e0c..91255b5035a 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -407,7 +407,9 @@ typedef struct { } dispex_static_data_vtbl_t;
#define ALL_PROTOTYPES \ + X(CSSRule) \ X(CSSStyleDeclaration) \ + X(CSSStyleRule) \ X(CSSStyleSheet) \ X(CharacterData) \ X(DOMImplementation) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 97c879ed679..87bf7879562 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3231,4 +3231,8 @@ sync_test("prototypes", function() { check(StyleSheetList.prototype, Object.prototype, "stylesheets list prototype"); check(e.sheet.rules, MSCSSRuleList.prototype, "css rule list"); check(MSCSSRuleList.prototype, Object.prototype, "css rule list prototype"); + e.sheet.insertRule("div { border: none }", 0); + check(e.sheet.rules[0], CSSStyleRule.prototype, "css rule"); + check(CSSStyleRule.prototype, CSSRule.prototype, "css rule prototype"); + check(CSSRule.prototype, Object.prototype, "css rule prototype"); });
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/htmlelem.c | 18 +++++++++--------- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ 3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 2612b5988c1..fbdc739a55e 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -750,23 +750,23 @@ void HTMLRect_init_dispex_info(dispex_data_t *info, compat_mode_t mode) dispex_info_add_interface(info, IHTMLRect2_tid, NULL); }
-static const dispex_static_data_vtbl_t HTMLRect_dispex_vtbl = { +static const dispex_static_data_vtbl_t ClientRect_dispex_vtbl = { .query_interface = HTMLRect_query_interface, .destructor = HTMLRect_destructor, .traverse = HTMLRect_traverse, .unlink = HTMLRect_unlink };
-static const tid_t HTMLRect_iface_tids[] = { +static const tid_t ClientRect_iface_tids[] = { IHTMLRect_tid, 0 }; -static dispex_static_data_t HTMLRect_dispex = { - "ClientRect", - &HTMLRect_dispex_vtbl, - IHTMLRect_tid, - HTMLRect_iface_tids, - HTMLRect_init_dispex_info +dispex_static_data_t ClientRect_dispex = { + .id = PROT_ClientRect, + .vtbl = &ClientRect_dispex_vtbl, + .disp_tid = IHTMLRect_tid, + .iface_tids = ClientRect_iface_tids, + .init_info = HTMLRect_init_dispex_info, };
static HRESULT create_html_rect(nsIDOMClientRect *nsrect, DispatchEx *owner, IHTMLRect **ret) @@ -780,7 +780,7 @@ static HRESULT create_html_rect(nsIDOMClientRect *nsrect, DispatchEx *owner, IHT rect->IHTMLRect_iface.lpVtbl = &HTMLRectVtbl; rect->IHTMLRect2_iface.lpVtbl = &HTMLRect2Vtbl;
- init_dispatch_with_owner(&rect->dispex, &HTMLRect_dispex, owner); + init_dispatch_with_owner(&rect->dispex, &ClientRect_dispex, owner);
nsIDOMClientRect_AddRef(nsrect); rect->nsrect = nsrect; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 91255b5035a..6a3d1e5c639 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -412,6 +412,7 @@ typedef struct { X(CSSStyleRule) \ X(CSSStyleSheet) \ X(CharacterData) \ + X(ClientRect) \ X(DOMImplementation) \ X(Document) \ X(DocumentType) \ diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 87bf7879562..c2230f61ce2 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3235,4 +3235,6 @@ sync_test("prototypes", function() { check(e.sheet.rules[0], CSSStyleRule.prototype, "css rule"); check(CSSStyleRule.prototype, CSSRule.prototype, "css rule prototype"); check(CSSRule.prototype, Object.prototype, "css rule prototype"); + check(document.body.getBoundingClientRect(), ClientRect.prototype, "rect"); + check(ClientRect.prototype, Object.prototype, "rect prototype"); });
From: Jacek Caban jacek@codeweavers.com
--- dlls/mshtml/mutation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c index f23c31f861d..3c1a25646db 100644 --- a/dlls/mshtml/mutation.c +++ b/dlls/mshtml/mutation.c @@ -1273,7 +1273,7 @@ static HRESULT mutation_observer_ctor_value(DispatchEx *dispex, LCID lcid, return S_OK; }
-static dispex_static_data_vtbl_t mutation_observer_ctor_dispex_vtbl = { +static const dispex_static_data_vtbl_t mutation_observer_ctor_dispex_vtbl = { .destructor = mutation_observer_ctor_destructor, .value = mutation_observer_ctor_value };