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"); });