Commit 06db253e authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Add IHTMLCSSStyleDeclaration2::columnCount property semi-stub implementation.

parent b5d0c988
......@@ -549,6 +549,11 @@ static const style_tbl_entry_t style_tbl[] = {
ATTR_HEX_INT
},
{
L"column-count",
DISPID_IHTMLCSSSTYLEDECLARATION2_COLUMNCOUNT,
DISPID_UNKNOWN
},
{
cursorW,
DISPID_IHTMLCSSSTYLEDECLARATION_CURSOR,
DISPID_A_CURSOR
......@@ -8794,15 +8799,15 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_colorInterpolationFilters(IHT
static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_columnCount(IHTMLCSSStyleDeclaration2 *iface, VARIANT v)
{
CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration2(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
WARN("(%p)->(%s) semi-stub\n", This, debugstr_variant(&v));
return set_style_property_var(This, STYLEID_COLUMN_COUNT, &v);
}
static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_columnCount(IHTMLCSSStyleDeclaration2 *iface, VARIANT *p)
{
CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration2(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
WARN("(%p)->(%p) semi-stub\n", This, p);
return get_style_property_var(This, STYLEID_COLUMN_COUNT, p);
}
static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_columnWidth(IHTMLCSSStyleDeclaration2 *iface, VARIANT v)
......
......@@ -81,6 +81,7 @@ typedef enum {
STYLEID_CLEAR,
STYLEID_CLIP,
STYLEID_COLOR,
STYLEID_COLUMN_COUNT,
STYLEID_CURSOR,
STYLEID_DIRECTION,
STYLEID_DISPLAY,
......
......@@ -19,7 +19,6 @@
#define COBJMACROS
#define CONST_VTABLE
#include <wine/test.h>
#include <stdarg.h>
#include <stdio.h>
......@@ -29,6 +28,7 @@
#include "mshtml.h"
#include "mshtmhst.h"
#include "docobj.h"
#include "wine/test.h"
static BOOL is_ie9plus;
......@@ -831,6 +831,7 @@ static void test_css_style_declaration(IHTMLCSSStyleDeclaration *css_style)
static void test_css_style_declaration2(IHTMLCSSStyleDeclaration2 *css_style)
{
VARIANT v;
BSTR str;
HRESULT hres;
......@@ -889,6 +890,37 @@ static void test_css_style_declaration2(IHTMLCSSStyleDeclaration2 *css_style)
ok(hres == S_OK, "get_transition failed: %08x\n", hres);
ok(!wcsncmp(str, L"marigin-right 1s", wcslen(L"marigin-right 1s")), "transition = %s\n", wine_dbgstr_w(str));
SysFreeString(str);
V_VT(&v) = VT_ERROR;
hres = IHTMLCSSStyleDeclaration2_get_columnCount(css_style, &v);
ok(hres == S_OK, "get_columnCount failed: %08x\n", hres);
ok(V_VT(&v) == VT_BSTR && !V_BSTR(&v), "columnCount = %s\n", wine_dbgstr_variant(&v));
VariantClear(&v);
V_VT(&v) = VT_I4;
V_I4(&v) = 2;
hres = IHTMLCSSStyleDeclaration2_put_columnCount(css_style, v);
ok(hres == S_OK, "put_columnCount failed: %08x\n", hres);
V_VT(&v) = VT_ERROR;
hres = IHTMLCSSStyleDeclaration2_get_columnCount(css_style, &v);
ok(hres == S_OK, "get_columnCount failed: %08x\n", hres);
todo_wine
ok(V_VT(&v) == VT_BSTR && V_BSTR(&v) && !lstrcmpW(V_BSTR(&v), L"2"), "columnCount = %s\n", wine_dbgstr_variant(&v));
VariantClear(&v);
V_VT(&v) = VT_BSTR;
V_BSTR(&v) = SysAllocString(L"auto");
hres = IHTMLCSSStyleDeclaration2_put_columnCount(css_style, v);
ok(hres == S_OK, "put_columnCount failed: %08x\n", hres);
VariantClear(&v);
V_VT(&v) = VT_ERROR;
hres = IHTMLCSSStyleDeclaration2_get_columnCount(css_style, &v);
ok(hres == S_OK, "get_columnCount failed: %08x\n", hres);
todo_wine
ok(V_VT(&v) == VT_BSTR && V_BSTR(&v) && !lstrcmpW(V_BSTR(&v), L"auto"), "columnCount = %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