diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 6df930e19a9..02de13580f9 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -812,6 +812,11 @@ static const style_tbl_entry_t style_tbl[] = { DISPID_IHTMLCSSSTYLEDECLARATION_PAGEBREAKBEFORE, DISPID_A_PAGEBREAKBEFORE }, + { + L"perspective", + DISPID_IHTMLCSSSTYLEDECLARATION2_PERSPECTIVE, + DISPID_UNKNOWN + }, { positionW, DISPID_IHTMLCSSSTYLEDECLARATION_POSITION, @@ -9709,15 +9714,15 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_backfaceVisibility(IHTMLCSSSt static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_perspective(IHTMLCSSStyleDeclaration2 *iface, VARIANT v) { CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration2(iface); - FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); - return E_NOTIMPL; + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + return set_style_property_var(This, STYLEID_PERSPECTIVE, &v); } static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_perspective(IHTMLCSSStyleDeclaration2 *iface, VARIANT *p) { CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration2(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, p); + return get_style_property_var(This, STYLEID_PERSPECTIVE, p); } static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_perspectiveOrigin(IHTMLCSSStyleDeclaration2 *iface, BSTR v) diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 8746558fded..a21dfe88d38 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -128,6 +128,7 @@ typedef enum { STYLEID_PADDING_TOP, STYLEID_PAGE_BREAK_AFTER, STYLEID_PAGE_BREAK_BEFORE, + STYLEID_PERSPECTIVE, STYLEID_POSITION, STYLEID_RIGHT, STYLEID_TABLE_LAYOUT, diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c index 2ed6ef2e220..69f1e61cac1 100644 --- a/dlls/mshtml/tests/style.c +++ b/dlls/mshtml/tests/style.c @@ -1088,6 +1088,24 @@ static void test_css_style_declaration2(IHTMLCSSStyleDeclaration2 *css_style) hres = IHTMLCSSStyleDeclaration2_get_columnRule(css_style, &str); ok(hres == S_OK, "get_columnRule failed: %08x\n", hres); ok(!str, "columnRule = %s\n", wine_dbgstr_w(str)); + + V_VT(&v) = VT_ERROR; + hres = IHTMLCSSStyleDeclaration2_get_perspective(css_style, &v); + ok(hres == S_OK, "get_perspective failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR && !V_BSTR(&v), "perspective = %s\n", wine_dbgstr_variant(&v)); + VariantClear(&v); + + V_VT(&v) = VT_BSTR; + V_BSTR(&v) = SysAllocString(L"100px"); + hres = IHTMLCSSStyleDeclaration2_put_perspective(css_style, v); + ok(hres == S_OK, "put_perspective failed: %08x\n", hres); + VariantClear(&v); + + V_VT(&v) = VT_ERROR; + hres = IHTMLCSSStyleDeclaration2_get_perspective(css_style, &v); + ok(hres == S_OK, "get_perspective failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR && V_BSTR(&v) && !lstrcmpW(V_BSTR(&v), L"100px"), "perspective = %s\n", wine_dbgstr_variant(&v)); + VariantClear(&v); } static void test_body_style(IHTMLStyle *style)