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