Commit 3fc74752 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Add IHTMLCSSStyleDeclaration2::perspective implementation.

parent 796f34e8
......@@ -813,6 +813,11 @@ static const style_tbl_entry_t style_tbl[] = {
DISPID_A_PAGEBREAKBEFORE
},
{
L"perspective",
DISPID_IHTMLCSSSTYLEDECLARATION2_PERSPECTIVE,
DISPID_UNKNOWN
},
{
positionW,
DISPID_IHTMLCSSSTYLEDECLARATION_POSITION,
DISPID_A_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)
......
......@@ -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,
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment