From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlcurstyle.c | 14 ++++++++++++-- dlls/mshtml/htmlstyle.c | 13 +++++++++++-- dlls/mshtml/tests/documentmode.js | 4 ++-- 3 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index 0d80381b986..ffccceb2457 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -24,6 +24,7 @@ #include "winbase.h" #include "winuser.h" #include "ole2.h" +#include "mshtmdid.h"
#include "mshtml_private.h" #include "htmlstyle.h" @@ -1170,6 +1171,16 @@ static void HTMLCurrentStyle_unlink(DispatchEx *dispex) } }
+static void MSCurrentStyleCSSProperties_init_dispex_info(dispex_data_t *info, compat_mode_t mode) +{ + static const dispex_hook_t currentstyle_ie11_hooks[] = { + {DISPID_IHTMLCURRENTSTYLE_BEHAVIOR}, + {DISPID_UNKNOWN} + }; + MSCSSProperties_init_dispex_info(info, mode); + dispex_info_add_interface(info, IHTMLCurrentStyle_tid, mode >= COMPAT_MODE_IE11 ? currentstyle_ie11_hooks : NULL); +} + static const dispex_static_data_vtbl_t MSCurrentStyleCSSProperties_dispex_vtbl = { CSSSTYLE_DISPEX_VTBL_ENTRIES, .query_interface = HTMLCurrentStyle_query_interface, @@ -1178,7 +1189,6 @@ static const dispex_static_data_vtbl_t MSCurrentStyleCSSProperties_dispex_vtbl = };
static const tid_t MSCurrentStyleCSSProperties_iface_tids[] = { - IHTMLCurrentStyle_tid, IHTMLCurrentStyle2_tid, IHTMLCurrentStyle3_tid, IHTMLCurrentStyle4_tid, @@ -1190,7 +1200,7 @@ dispex_static_data_t MSCurrentStyleCSSProperties_dispex = { .vtbl = &MSCurrentStyleCSSProperties_dispex_vtbl, .disp_tid = DispHTMLCurrentStyle_tid, .iface_tids = MSCurrentStyleCSSProperties_iface_tids, - .init_info = MSCSSProperties_init_dispex_info, + .init_info = MSCurrentStyleCSSProperties_init_dispex_info, };
HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 10c0ca3a604..d59757c62ac 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -9727,6 +9727,16 @@ dispex_static_data_t MSCSSProperties_dispex = { .init_info = MSCSSProperties_init_dispex_info, };
+static void MSStyleCSSProperties_init_dispex_info(dispex_data_t *info, compat_mode_t mode) +{ + static const dispex_hook_t style2_ie11_hooks[] = { + {DISPID_IHTMLSTYLE2_BEHAVIOR}, + {DISPID_UNKNOWN} + }; + MSCSSProperties_init_dispex_info(info, mode); + dispex_info_add_interface(info, IHTMLStyle2_tid, mode >= COMPAT_MODE_IE11 ? style2_ie11_hooks : NULL); +} + static const dispex_static_data_vtbl_t MSStyleCSSProperties_dispex_vtbl = { CSSSTYLE_DISPEX_VTBL_ENTRIES, .query_interface = HTMLStyle_query_interface, @@ -9739,7 +9749,6 @@ static const tid_t MSStyleCSSProperties_iface_tids[] = { IHTMLStyle5_tid, IHTMLStyle4_tid, IHTMLStyle3_tid, - IHTMLStyle2_tid, IHTMLStyle_tid, 0 }; @@ -9749,7 +9758,7 @@ dispex_static_data_t MSStyleCSSProperties_dispex = { .vtbl = &MSStyleCSSProperties_dispex_vtbl, .disp_tid = DispHTMLStyle_tid, .iface_tids = MSStyleCSSProperties_iface_tids, - .init_info = MSCSSProperties_init_dispex_info, + .init_info = MSStyleCSSProperties_init_dispex_info, };
static HRESULT get_style_from_elem(HTMLElement *elem, nsIDOMCSSStyleDeclaration **ret) diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 715baa36f75..37fcc95109a 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3947,12 +3947,12 @@ sync_test("prototype props", function() { "textAutospace", "textJustifyTrim", "textKashida", "textKashidaSpace", "writingMode", "zoom" ]); check(MSCurrentStyleCSSProperties, [ "blockDirection", "clipBottom", "clipLeft", "clipRight", "clipTop", "hasLayout" ], - [ ["behavior",11], "clipBottom", "clipLeft", "clipRight", "clipTop"]); + [ "clipBottom", "clipLeft", "clipRight", "clipTop"]); check(MSStyleCSSProperties, [ "pixelBottom", "pixelHeight", "pixelLeft", "pixelRight", "pixelTop", "pixelWidth", "posBottom", "posHeight", "posLeft", "posRight", "posTop", "posWidth", "textDecorationBlink", "textDecorationLineThrough", "textDecorationNone", "textDecorationOverline", "textDecorationUnderline" - ], [ ["behavior",11], "getExpression", "removeExpression", "setExpression", "toString" ]); + ], [ "getExpression", "removeExpression", "setExpression", "toString" ]); check(Node, [ "ATTRIBUTE_NODE", "CDATA_SECTION_NODE", "COMMENT_NODE", "DOCUMENT_FRAGMENT_NODE", "DOCUMENT_NODE", "DOCUMENT_POSITION_CONTAINED_BY", "DOCUMENT_POSITION_CONTAINS", "DOCUMENT_POSITION_DISCONNECTED",