From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/dispex.c | 5 + dlls/mshtml/htmlstyle.c | 141 ++++++++++++++++++++++++--- dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/mshtml_private.h | 2 + dlls/mshtml/mshtml_private_iface.idl | 17 ++++ dlls/mshtml/tests/documentmode.js | 70 ++++++++++++- dlls/mshtml/tests/dom.js | 27 ++++- 7 files changed, 246 insertions(+), 17 deletions(-)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 77eec049912..6c8838198c8 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -839,6 +839,11 @@ HRESULT dispex_get_dynid(DispatchEx *This, const WCHAR *name, BOOL hidden, DISPI return S_OK; }
+dispex_static_data_t *dispex_get_static_data_desc(DispatchEx *dispex) +{ + return dispex->info->desc; +} + IWineJSDispatchHost *dispex_outer_iface(DispatchEx *dispex) { if(dispex->info->vtbl->get_outer_iface) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 92dd9f853be..8fcf3d656cb 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -102,13 +102,14 @@ static const WCHAR *overflow_values[] = { NULL };
-#define ATTR_FIX_PX 0x0001 -#define ATTR_FIX_URL 0x0002 -#define ATTR_STR_TO_INT 0x0004 -#define ATTR_HEX_INT 0x0008 -#define ATTR_REMOVE_COMMA 0x0010 -#define ATTR_NO_NULL 0x0020 -#define ATTR_COMPAT_IE10 0x0040 +#define ATTR_FIX_PX 0x0001 +#define ATTR_FIX_URL 0x0002 +#define ATTR_STR_TO_INT 0x0004 +#define ATTR_HEX_INT 0x0008 +#define ATTR_REMOVE_COMMA 0x0010 +#define ATTR_NO_NULL 0x0020 +#define ATTR_COMPAT_IE10 0x0040 +#define ATTR_COMPAT_IE10_DECL 0x0080
typedef struct { const WCHAR *name; @@ -422,7 +423,8 @@ static const style_tbl_entry_t style_tbl[] = { { L"filter", DISPID_IHTMLCSSSTYLEDECLARATION_FILTER, - DISPID_A_FILTER + DISPID_A_FILTER, + ATTR_COMPAT_IE10_DECL }, { L"float", @@ -734,8 +736,11 @@ static const style_tbl_entry_t *lookup_style_tbl(CSSStyle *style, const WCHAR *n
c = wcscmp(style_tbl[i].name, name); if(!c) { - if((style_tbl[i].flags & ATTR_COMPAT_IE10) && dispex_compat_mode(&style->dispex) < COMPAT_MODE_IE10) + if((style_tbl[i].flags & (ATTR_COMPAT_IE10 | ATTR_COMPAT_IE10_DECL)) && + dispex_compat_mode(&style->dispex) < COMPAT_MODE_IE10 && + ((style_tbl[i].flags & ATTR_COMPAT_IE10) || dispex_get_static_data_desc(&style->dispex) == &CSSStyleDeclaration_dispex)) return NULL; + return style_tbl+i; }
@@ -9547,6 +9552,64 @@ static const IHTMLCSSStyleDeclaration2Vtbl HTMLCSSStyleDeclaration2Vtbl = { HTMLCSSStyleDeclaration2_get_animationFillMode };
+static inline CSSStyle *impl_from_IWineCSSProperties(IWineCSSProperties *iface) +{ + return CONTAINING_RECORD(iface, CSSStyle, IWineCSSProperties_iface); +} + +static inline HTMLStyle *HTMLStyle_from_IWineCSSProperties(IWineCSSProperties *iface) +{ + return CONTAINING_RECORD(iface, HTMLStyle, css_style.IWineCSSProperties_iface); +} + +DISPEX_IDISPATCH_IMPL(CSSProperties, IWineCSSProperties, impl_from_IWineCSSProperties(iface)->dispex) + +static HRESULT WINAPI CSSProperties_setAttribute(IWineCSSProperties *iface, BSTR name, VARIANT value, LONG flags) +{ + CSSStyle *This = impl_from_IWineCSSProperties(iface); + + if(dispex_get_static_data_desc(&This->dispex) == &MSStyleCSSProperties_dispex) + return HTMLStyle_setAttribute(&HTMLStyle_from_IWineCSSProperties(iface)->IHTMLStyle_iface, name, value, flags); + + FIXME("(%p)->(%s %s %08lx)\n", This, debugstr_w(name), debugstr_variant(&value), flags); + return E_NOTIMPL; +} + +static HRESULT WINAPI CSSProperties_getAttribute(IWineCSSProperties *iface, BSTR name, LONG flags, VARIANT *p) +{ + CSSStyle *This = impl_from_IWineCSSProperties(iface); + + if(dispex_get_static_data_desc(&This->dispex) == &MSStyleCSSProperties_dispex) + return HTMLStyle_getAttribute(&HTMLStyle_from_IWineCSSProperties(iface)->IHTMLStyle_iface, name, flags, p); + + FIXME("(%p)->(%s %08lx %p)\n", This, debugstr_w(name), flags, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI CSSProperties_removeAttribute(IWineCSSProperties *iface, BSTR name, LONG flags, VARIANT_BOOL *p) +{ + CSSStyle *This = impl_from_IWineCSSProperties(iface); + + if(dispex_get_static_data_desc(&This->dispex) == &MSStyleCSSProperties_dispex) + return HTMLStyle_removeAttribute(&HTMLStyle_from_IWineCSSProperties(iface)->IHTMLStyle_iface, name, flags, p); + + FIXME("(%p)->(%s %08lx %p)\n", This, debugstr_w(name), flags, p); + return E_NOTIMPL; +} + +static const IWineCSSPropertiesVtbl CSSPropertiesVtbl = { + CSSProperties_QueryInterface, + CSSProperties_AddRef, + CSSProperties_Release, + CSSProperties_GetTypeInfoCount, + CSSProperties_GetTypeInfo, + CSSProperties_GetIDsOfNames, + CSSProperties_Invoke, + CSSProperties_setAttribute, + CSSProperties_getAttribute, + CSSProperties_removeAttribute +}; + static inline CSSStyle *impl_from_DispatchEx(DispatchEx *dispex) { return CONTAINING_RECORD(dispex, CSSStyle, dispex); @@ -9560,6 +9623,8 @@ void *CSSStyle_query_interface(DispatchEx *dispex, REFIID riid) return &This->IHTMLCSSStyleDeclaration_iface; if(IsEqualGUID(&IID_IHTMLCSSStyleDeclaration2, riid)) return &This->IHTMLCSSStyleDeclaration2_iface; + if(IsEqualGUID(&IID_IWineCSSProperties, riid)) + return &This->IWineCSSProperties_iface;
return NULL; } @@ -9649,8 +9714,14 @@ static void HTMLStyle_unlink(DispatchEx *dispex)
void CSSStyle_init_dispex_info(dispex_data_t *info, compat_mode_t mode) { - if(mode >= COMPAT_MODE_IE9) - dispex_info_add_interface(info, IHTMLCSSStyleDeclaration_tid, NULL); + static const dispex_hook_t styledecl_ie11_hooks[] = { + {DISPID_IHTMLCSSSTYLEDECLARATION_BEHAVIOR}, + {DISPID_UNKNOWN} + }; + if(mode >= COMPAT_MODE_IE9) { + dispex_info_add_interface(info, IHTMLCSSStyleDeclaration_tid, mode >= COMPAT_MODE_IE11 ? styledecl_ie11_hooks : NULL); + dispex_info_add_interface(info, IWineCSSProperties_tid, NULL); + } if(mode >= COMPAT_MODE_IE10) dispex_info_add_interface(info, IHTMLCSSStyleDeclaration2_tid, NULL); } @@ -9658,6 +9729,7 @@ void CSSStyle_init_dispex_info(dispex_data_t *info, compat_mode_t mode) dispex_static_data_t MSCSSProperties_dispex = { .id = PROT_MSCSSProperties, .prototype_id = PROT_CSSStyleDeclaration, + .init_info = CSSStyle_init_dispex_info, };
static const dispex_static_data_vtbl_t MSStyleCSSProperties_dispex_vtbl = { @@ -9727,6 +9799,7 @@ void init_css_style(CSSStyle *style, nsIDOMCSSStyleDeclaration *nsstyle, dispex_ { style->IHTMLCSSStyleDeclaration_iface.lpVtbl = &HTMLCSSStyleDeclarationVtbl; style->IHTMLCSSStyleDeclaration2_iface.lpVtbl = &HTMLCSSStyleDeclaration2Vtbl; + style->IWineCSSProperties_iface.lpVtbl = &CSSPropertiesVtbl; style->nsstyle = nsstyle; nsIDOMCSSStyleDeclaration_AddRef(nsstyle);
@@ -9766,6 +9839,50 @@ HRESULT HTMLStyle_Create(HTMLElement *elem, HTMLStyle **ret) return S_OK; }
+static void CSSStyleDeclaration_init_dispex_info(dispex_data_t *info, compat_mode_t mode) +{ + static const dispex_hook_t styledecl_hooks[] = { + {DISPID_IHTMLCSSSTYLEDECLARATION_FILTER}, + + /* IE10+ */ + {DISPID_IHTMLCSSSTYLEDECLARATION_BACKGROUNDPOSITIONX}, + {DISPID_IHTMLCSSSTYLEDECLARATION_BACKGROUNDPOSITIONY}, + {DISPID_IHTMLCSSSTYLEDECLARATION_STYLEFLOAT}, + {DISPID_IHTMLCSSSTYLEDECLARATION_BEHAVIOR}, + {DISPID_IHTMLCSSSTYLEDECLARATION_IMEMODE}, + {DISPID_IHTMLCSSSTYLEDECLARATION_LAYOUTGRIDCHAR}, + {DISPID_IHTMLCSSSTYLEDECLARATION_LAYOUTGRIDLINE}, + {DISPID_IHTMLCSSSTYLEDECLARATION_LAYOUTGRIDMODE}, + {DISPID_IHTMLCSSSTYLEDECLARATION_LAYOUTGRIDTYPE}, + {DISPID_IHTMLCSSSTYLEDECLARATION_LAYOUTGRID}, + {DISPID_IHTMLCSSSTYLEDECLARATION_LINEBREAK}, + {DISPID_IHTMLCSSSTYLEDECLARATION_TEXTJUSTIFYTRIM}, + {DISPID_IHTMLCSSSTYLEDECLARATION_TEXTKASHIDA}, + {DISPID_IHTMLCSSSTYLEDECLARATION_TEXTAUTOSPACE}, + {DISPID_IHTMLCSSSTYLEDECLARATION_ACCELERATOR}, + {DISPID_IHTMLCSSSTYLEDECLARATION_LAYOUTFLOW}, + {DISPID_IHTMLCSSSTYLEDECLARATION_ZOOM}, + {DISPID_IHTMLCSSSTYLEDECLARATION_SCROLLBARBASECOLOR}, + {DISPID_IHTMLCSSSTYLEDECLARATION_SCROLLBARFACECOLOR}, + {DISPID_IHTMLCSSSTYLEDECLARATION_SCROLLBAR3DLIGHTCOLOR}, + {DISPID_IHTMLCSSSTYLEDECLARATION_SCROLLBARSHADOWCOLOR}, + {DISPID_IHTMLCSSSTYLEDECLARATION_SCROLLBARHIGHLIGHTCOLOR}, + {DISPID_IHTMLCSSSTYLEDECLARATION_SCROLLBARDARKSHADOWCOLOR}, + {DISPID_IHTMLCSSSTYLEDECLARATION_SCROLLBARARROWCOLOR}, + {DISPID_IHTMLCSSSTYLEDECLARATION_SCROLLBARTRACKCOLOR}, + {DISPID_IHTMLCSSSTYLEDECLARATION_WRITINGMODE}, + {DISPID_IHTMLCSSSTYLEDECLARATION_TEXTKASHIDASPACE}, + {DISPID_IHTMLCSSSTYLEDECLARATION_MSINTERPOLATIONMODE}, + {DISPID_IHTMLCSSSTYLEDECLARATION_MSBLOCKPROGRESSION}, + {DISPID_UNKNOWN} + }; + const dispex_hook_t *const styledecl_ie10_hooks = styledecl_hooks + 1; + + dispex_info_add_interface(info, IHTMLCSSStyleDeclaration_tid, mode >= COMPAT_MODE_IE10 ? styledecl_ie10_hooks : styledecl_hooks); + if(mode >= COMPAT_MODE_IE10) + dispex_info_add_interface(info, IHTMLCSSStyleDeclaration2_tid, NULL); +} + static const dispex_static_data_vtbl_t CSSStyleDeclaration_dispex_vtbl = { CSSSTYLE_DISPEX_VTBL_ENTRIES, .query_interface = CSSStyle_query_interface, @@ -9777,7 +9894,7 @@ dispex_static_data_t CSSStyleDeclaration_dispex = { .id = PROT_CSSStyleDeclaration, .vtbl = &CSSStyleDeclaration_dispex_vtbl, .disp_tid = DispHTMLW3CComputedStyle_tid, - .init_info = CSSStyle_init_dispex_info, + .init_info = CSSStyleDeclaration_init_dispex_info, };
HRESULT create_computed_style(nsIDOMCSSStyleDeclaration *nsstyle, DispatchEx *owner, IHTMLCSSStyleDeclaration **p) diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index b37daf95fa6..0236186c21b 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -22,6 +22,7 @@ struct CSSStyle { DispatchEx dispex; IHTMLCSSStyleDeclaration IHTMLCSSStyleDeclaration_iface; IHTMLCSSStyleDeclaration2 IHTMLCSSStyleDeclaration2_iface; + IWineCSSProperties IWineCSSProperties_iface;
nsIDOMCSSStyleDeclaration *nsstyle; }; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index f3ba8f75c15..8bc710b68e9 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -304,6 +304,7 @@ typedef struct ScriptHost ScriptHost; XIID(IWineHTMLElementPrivate) \ XIID(IWineHTMLWindowPrivate) \ XIID(IWineHTMLWindowCompatPrivate) \ + XIID(IWineCSSProperties) \ XIID(IWinePageTransitionEvent) \ XIID(IWineXMLHttpRequestPrivate) \ XIID(IWineMSHTMLConsole) \ @@ -642,6 +643,7 @@ HRESULT dispex_next_id(DispatchEx *dispex, DISPID id, BOOL enum_all_own_props, D HRESULT dispex_prop_name(DispatchEx *dispex, DISPID id, BSTR *ret); HRESULT dispex_define_property(DispatchEx *dispex, const WCHAR *name, DWORD flags, VARIANT *v, DISPID *id); HRESULT dispex_index_prop_desc(DispatchEx*,DISPID,struct property_info*); +dispex_static_data_t *dispex_get_static_data_desc(DispatchEx*); IWineJSDispatchHost *dispex_outer_iface(DispatchEx *dispex); HRESULT get_constructor(HTMLInnerWindow *script_global, prototype_id_t id, DispatchEx **ret); HRESULT get_prototype(HTMLInnerWindow *script_global, prototype_id_t id, DispatchEx **ret); diff --git a/dlls/mshtml/mshtml_private_iface.idl b/dlls/mshtml/mshtml_private_iface.idl index 6fcf465e5be..bcaeb7f5f5c 100644 --- a/dlls/mshtml/mshtml_private_iface.idl +++ b/dlls/mshtml/mshtml_private_iface.idl @@ -204,6 +204,23 @@ interface IWineHTMLElementPrivate : IDispatch HRESULT classList([retval, out] IDispatch **class_list); }
+[ + odl, + oleautomation, + dual, + hidden, + uuid(465908fd-f394-489f-b7a3-4c00fbbe9eed) +] +interface IWineCSSProperties : IDispatch +{ + [id(DISPID_IHTMLSTYLE_SETATTRIBUTE)] + HRESULT setAttribute([in] BSTR name, [in] VARIANT value, [defaultvalue(1), in] LONG flags); + [id(DISPID_IHTMLSTYLE_GETATTRIBUTE)] + HRESULT getAttribute([in] BSTR name, [defaultvalue(0), in] LONG flags, [out, retval] VARIANT *p); + [id(DISPID_IHTMLSTYLE_REMOVEATTRIBUTE)] + HRESULT removeAttribute([in] BSTR name, [defaultvalue(1), in] LONG flags, [out, retval] VARIANT_BOOL *p); +} + [ odl, oleautomation, diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 39e0df198bc..c6c9f725756 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -853,10 +853,10 @@ sync_test("style_props", function() {
var v = document.documentMode;
- test_exposed("removeAttribute", true, broken(true) ? v >= 9 : false /* todo_wine */, false); + test_exposed("removeAttribute", true, v >= 9, false); test_exposed("zIndex", true, true, true); test_exposed("z-index", true, true, true, true); - test_exposed("filter", true, true, broken(true) ? v >= 10 : v >= 9 /* todo_wine */); + test_exposed("filter", true, true, v >= 10); test_exposed("pixelTop", true, false, false); test_exposed("float", true, true, true, true); test_exposed("css-float", false, false, false); @@ -877,7 +877,7 @@ sync_test("style_props", function() { todo_wine. ok(!r.length, "currentStyle has own props: " + r); r = Object.getOwnPropertyNames(computedStyle); - todo_wine. + todo_wine_if(v >= 10). ok(!r.length, "computedStyle has own props: " + r);
r = Object.getOwnPropertyDescriptor(style, "z-index"); @@ -3766,6 +3766,55 @@ sync_test("prototype props", function() {
check(CharacterData, [ "appendData", "data", "deleteData", "insertData", "length", "replaceData", "substringData" ]); check(Comment, [ "text" ]); + check(CSSStyleDeclaration, [ + ["alignContent",11], ["alignItems",11], ["alignSelf",11], "alignmentBaseline", ["animation",10], ["animationDelay",10], + ["animationDirection",10], ["animationDuration",10], ["animationFillMode",10], ["animationIterationCount",10], ["animationName",10], + ["animationPlayState",10], ["animationTimingFunction",10], ["backfaceVisibility",10], "background", "backgroundAttachment", + "backgroundClip", "backgroundColor", "backgroundImage", "backgroundOrigin", "backgroundPosition", "backgroundRepeat", "backgroundSize", + "baselineShift", "border", "borderBottom", "borderBottomColor", "borderBottomLeftRadius", "borderBottomRightRadius", "borderBottomStyle", + "borderBottomWidth", "borderCollapse", "borderColor", ["borderImage",11], ["borderImageOutset",11], ["borderImageRepeat",11], + ["borderImageSlice",11], ["borderImageSource",11], ["borderImageWidth",11], "borderLeft", "borderLeftColor", "borderLeftStyle", + "borderLeftWidth", "borderRadius", "borderRight", "borderRightColor", "borderRightStyle", "borderRightWidth", "borderSpacing", + "borderStyle", "borderTop", "borderTopColor", "borderTopLeftRadius", "borderTopRightRadius", "borderTopStyle", "borderTopWidth", + "borderWidth", "bottom", "boxShadow", "boxSizing", ["breakAfter",10], ["breakBefore",10], ["breakInside",10], "captionSide", "clear", + "clip", "clipPath", "clipRule", "color", ["colorInterpolationFilters",10], ["columnCount",10], ["columnFill",10], ["columnGap",10], + ["columnRule",10], ["columnRuleColor",10], ["columnRuleStyle",10], ["columnRuleWidth",10], ["columnSpan",10], ["columnWidth",10], + ["columns",10], "content", "counterIncrement", "counterReset", "cssFloat", "cssText", "cursor", "direction", "display", "dominantBaseline", + "emptyCells", ["enableBackground",10], "fill", "fillOpacity", "fillRule", ["filter",10], ["flex",11], ["flexBasis",11], ["flexDirection",11], + ["flexFlow",11], ["flexGrow",11], ["flexShrink",11], ["flexWrap",11], ["floodColor",10], ["floodOpacity",10], "font", "fontFamily", + ["fontFeatureSettings",10], "fontSize", "fontSizeAdjust", "fontStretch", "fontStyle", "fontVariant", "fontWeight", "getPropertyPriority", + "getPropertyValue", "glyphOrientationHorizontal", "glyphOrientationVertical", "height", "item", ["justifyContent",11], "kerning", "left", + "length", "letterSpacing", ["lightingColor",10], "lineHeight", "listStyle", "listStyleImage", "listStylePosition", "listStyleType", "margin", + "marginBottom", "marginLeft", "marginRight", "marginTop", "marker", "markerEnd", "markerMid", "markerStart", "mask", "maxHeight", "maxWidth", + "minHeight", "minWidth", ["msAnimation",10], ["msAnimationDelay",10], ["msAnimationDirection",10], ["msAnimationDuration",10], + ["msAnimationFillMode",10], ["msAnimationIterationCount",10], ["msAnimationName",10], ["msAnimationPlayState",10], ["msAnimationTimingFunction",10], + ["msBackfaceVisibility",10], ["msContentZoomChaining",10], ["msContentZoomLimit",10], ["msContentZoomLimitMax",10], ["msContentZoomLimitMin",10], + ["msContentZoomSnap",10], ["msContentZoomSnapPoints",10], ["msContentZoomSnapType",10], ["msContentZooming",10], ["msFlex",10], ["msFlexAlign",10], + ["msFlexDirection",10], ["msFlexFlow",10], ["msFlexItemAlign",10], ["msFlexLinePack",10], ["msFlexNegative",10], ["msFlexOrder",10], + ["msFlexPack",10], ["msFlexPositive",10], ["msFlexPreferredSize",10], ["msFlexWrap",10], ["msFlowFrom",10], ["msFlowInto",10], + ["msFontFeatureSettings",10], ["msGridColumn",10], ["msGridColumnAlign",10], ["msGridColumnSpan",10], ["msGridColumns",10], ["msGridRow",10], + ["msGridRowAlign",10], ["msGridRowSpan",10], ["msGridRows",10], ["msHighContrastAdjust",10], ["msHyphenateLimitChars",10], + ["msHyphenateLimitLines",10], ["msHyphenateLimitZone",10], ["msHyphens",10], ["msImeAlign",11], ["msOverflowStyle",10], ["msPerspective",10], + ["msPerspectiveOrigin",10], ["msScrollChaining",10], ["msScrollLimit",10], ["msScrollLimitXMax",10], ["msScrollLimitXMin",10], + ["msScrollLimitYMax",10], ["msScrollLimitYMin",10], ["msScrollRails",10], ["msScrollSnapPointsX",10], ["msScrollSnapPointsY",10], + ["msScrollSnapType",10], ["msScrollSnapX",10], ["msScrollSnapY",10], ["msScrollTranslation",10], ["msTextCombineHorizontal",11], + ["msTextSizeAdjust",11], ["msTouchAction",10], ["msTouchSelect",10], "msTransform", "msTransformOrigin", ["msTransformStyle",10], ["msTransition",10], + ["msTransitionDelay",10], ["msTransitionDuration",10], ["msTransitionProperty",10], ["msTransitionTimingFunction",10], ["msUserSelect",10], + ["msWrapFlow",10], ["msWrapMargin",10], ["msWrapThrough",10], "opacity", ["order",11], "orphans", "outline", "outlineColor", "outlineStyle", + "outlineWidth", "overflow", "overflowX", "overflowY", "padding", "paddingBottom", "paddingLeft", "paddingRight", "paddingTop", "pageBreakAfter", + "pageBreakBefore", "pageBreakInside", "parentRule", ["perspective",10], ["perspectiveOrigin",10], "pointerEvents", "position", "quotes", + "removeProperty", "right", "rubyAlign", "rubyOverhang", "rubyPosition", "setProperty", "stopColor", "stopOpacity", "stroke", "strokeDasharray", + "strokeDashoffset", "strokeLinecap", "strokeLinejoin", "strokeMiterlimit", "strokeOpacity", "strokeWidth", "tableLayout", "textAlign", "textAlignLast", + "textAnchor", "textDecoration", "textIndent", "textJustify", "textOverflow", ["textShadow",10], "textTransform", "textUnderlinePosition", "top", + ["touchAction",11], ["transform",10], ["transformOrigin",10], ["transformStyle",10], ["transition",10], ["transitionDelay",10], ["transitionDuration",10], + ["transitionProperty",10], ["transitionTimingFunction",10], "unicodeBidi", "verticalAlign", "visibility", "whiteSpace", "widows", "width", "wordBreak", + "wordSpacing", "wordWrap", "zIndex" + ], [ + ["alignContent",11], ["alignItems",11], ["alignSelf",11], ["borderImage",11], ["borderImageOutset",11], ["borderImageRepeat",11], ["borderImageSlice",11], + ["borderImageSource",11], ["borderImageWidth",11], "clipBottom", "clipLeft", "clipRight", "clipTop", ["flex",11], ["flexBasis",11], ["flexDirection",11], + ["flexFlow",11], ["flexGrow",11], ["flexShrink",11], ["flexWrap",11], ["justifyContent",11], ["msImeAlign",11], ["msTextCombineHorizontal",11], + ["msTextSizeAdjust",11], ["order",11], ["touchAction",11] + ]); check(CSSStyleRule, [ "readOnly", "selectorText", "style" ]); check(CustomEvent, [ "detail", "initCustomEvent" ]); check(Document, [ @@ -3888,6 +3937,21 @@ sync_test("prototype props", function() { "initMouseEvent", "layerX", "layerY", "metaKey", "offsetX", "offsetY", "pageX", "pageY", "relatedTarget", "screenX", "screenY", "shiftKey", "toElement", "which", "x", "y" ]); + check(MSCSSProperties, [ + "accelerator", "backgroundPositionX", "backgroundPositionY", ["behavior",9,10], ["filter",9,9], "getAttribute", + "imeMode", "layoutFlow", "layoutGrid", "layoutGridChar", "layoutGridLine", "layoutGridMode", "layoutGridType", + "lineBreak", "msBlockProgression", "msInterpolationMode", "removeAttribute", "scrollbar3dLightColor", + "scrollbarArrowColor", "scrollbarBaseColor", "scrollbarDarkShadowColor", "scrollbarFaceColor", + "scrollbarHighlightColor", "scrollbarShadowColor", "scrollbarTrackColor", "setAttribute", "styleFloat", + "textAutospace", "textJustifyTrim", "textKashida", "textKashidaSpace", "writingMode", "zoom" + ]); + check(MSCurrentStyleCSSProperties, [ "blockDirection", "clipBottom", "clipLeft", "clipRight", "clipTop", "hasLayout" ], + [ ["behavior",11], "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" ]); check(Node, [ "ATTRIBUTE_NODE", "CDATA_SECTION_NODE", "COMMENT_NODE", "DOCUMENT_FRAGMENT_NODE", "DOCUMENT_NODE", "DOCUMENT_POSITION_CONTAINED_BY", "DOCUMENT_POSITION_CONTAINS", "DOCUMENT_POSITION_DISCONNECTED", diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js index 5ee5a788c90..256cab60d7c 100644 --- a/dlls/mshtml/tests/dom.js +++ b/dlls/mshtml/tests/dom.js @@ -470,12 +470,35 @@ sync_test("style_properties", function() { try { current_style.zIndex = 1; ok(false, "expected exception"); - }catch(e) {} + }catch(e) { + todo_wine. + ok(e.name === "NoModificationAllowedError", "setting current_style.zIndex threw " + e.name); + }
try { computed_style.zIndex = 1; ok(false, "expected exception"); - }catch(e) {} + }catch(e) { + todo_wine. + ok(e.name === "NoModificationAllowedError", "setting computed_style.zIndex threw " + e.name); + } + + /* prop not found in any IHTMLCurrentStyle* interfaces, but exposed from common CSSStyleDeclarationPrototype */ + try { + current_style.perspective = 1; + ok(false, "expected exception"); + }catch(e) { + todo_wine. + ok(e.name === "NoModificationAllowedError", "setting current_style.perspective threw " + e.name); + } + + try { + computed_style.perspective = 1; + ok(false, "expected exception"); + }catch(e) { + todo_wine. + ok(e.name === "NoModificationAllowedError", "setting computed_style.perspective threw " + e.name); + }
elem = elem.nextSibling; computed_style = window.getComputedStyle(elem);