Commit 4975243d authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

mshtml: Implement IHTMLStyle get/put wordSpacing.

parent bed507bf
...@@ -121,6 +121,8 @@ static const WCHAR attrVisibility[] = ...@@ -121,6 +121,8 @@ static const WCHAR attrVisibility[] =
{'v','i','s','i','b','i','l','i','t','y',0}; {'v','i','s','i','b','i','l','i','t','y',0};
static const WCHAR attrWidth[] = static const WCHAR attrWidth[] =
{'w','i','d','t','h',0}; {'w','i','d','t','h',0};
static const WCHAR attrWordSpacing[] =
{'w','o','r','d','-','s','p','a','c','i','n','g',0};
static const WCHAR attrWordWrap[] = static const WCHAR attrWordWrap[] =
{'w','o','r','d','-','w','r','a','p',0}; {'w','o','r','d','-','w','r','a','p',0};
static const WCHAR attrZIndex[] = static const WCHAR attrZIndex[] =
...@@ -173,6 +175,7 @@ static const struct{ ...@@ -173,6 +175,7 @@ static const struct{
{attrVerticalAlign, DISPID_IHTMLSTYLE_VERTICALALIGN}, {attrVerticalAlign, DISPID_IHTMLSTYLE_VERTICALALIGN},
{attrVisibility, DISPID_IHTMLSTYLE_VISIBILITY}, {attrVisibility, DISPID_IHTMLSTYLE_VISIBILITY},
{attrWidth, DISPID_IHTMLSTYLE_WIDTH}, {attrWidth, DISPID_IHTMLSTYLE_WIDTH},
{attrWordSpacing, DISPID_IHTMLSTYLE_WORDSPACING},
{attrWordWrap, DISPID_IHTMLSTYLE3_WORDWRAP}, {attrWordWrap, DISPID_IHTMLSTYLE3_WORDWRAP},
{attrZIndex, DISPID_IHTMLSTYLE_ZINDEX} {attrZIndex, DISPID_IHTMLSTYLE_ZINDEX}
}; };
...@@ -923,15 +926,15 @@ static HRESULT WINAPI HTMLStyle_get_backgroundPositionY(IHTMLStyle *iface, VARIA ...@@ -923,15 +926,15 @@ static HRESULT WINAPI HTMLStyle_get_backgroundPositionY(IHTMLStyle *iface, VARIA
static HRESULT WINAPI HTMLStyle_put_wordSpacing(IHTMLStyle *iface, VARIANT v) static HRESULT WINAPI HTMLStyle_put_wordSpacing(IHTMLStyle *iface, VARIANT v)
{ {
HTMLStyle *This = HTMLSTYLE_THIS(iface); HTMLStyle *This = HTMLSTYLE_THIS(iface);
FIXME("(%p)->(v%d)\n", This, V_VT(&v)); TRACE("(%p)->(v%d)\n", This, V_VT(&v));
return E_NOTIMPL; return set_nsstyle_attr_var(This->nsstyle, STYLEID_WORD_SPACING, &v, 0);
} }
static HRESULT WINAPI HTMLStyle_get_wordSpacing(IHTMLStyle *iface, VARIANT *p) static HRESULT WINAPI HTMLStyle_get_wordSpacing(IHTMLStyle *iface, VARIANT *p)
{ {
HTMLStyle *This = HTMLSTYLE_THIS(iface); HTMLStyle *This = HTMLSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p); TRACE("(%p)->(%p)\n", This, p);
return E_NOTIMPL; return get_nsstyle_attr_var(This->nsstyle, STYLEID_WORD_SPACING, p, 0);
} }
static HRESULT WINAPI HTMLStyle_put_letterSpacing(IHTMLStyle *iface, VARIANT v) static HRESULT WINAPI HTMLStyle_put_letterSpacing(IHTMLStyle *iface, VARIANT v)
......
...@@ -78,6 +78,7 @@ typedef enum { ...@@ -78,6 +78,7 @@ typedef enum {
STYLEID_VERTICAL_ALIGN, STYLEID_VERTICAL_ALIGN,
STYLEID_VISIBILITY, STYLEID_VISIBILITY,
STYLEID_WIDTH, STYLEID_WIDTH,
STYLEID_WORD_SPACING,
STYLEID_WORD_WRAP, STYLEID_WORD_WRAP,
STYLEID_Z_INDEX STYLEID_Z_INDEX
} styleid_t; } styleid_t;
......
...@@ -3689,6 +3689,26 @@ static void test_default_style(IHTMLStyle *style) ...@@ -3689,6 +3689,26 @@ static void test_default_style(IHTMLStyle *style)
ok(hres == S_OK, "put_borderLeftWidth: %08x\n", hres); ok(hres == S_OK, "put_borderLeftWidth: %08x\n", hres);
VariantClear(&vDefault); VariantClear(&vDefault);
/* wordSpacing */
hres = IHTMLStyle_get_wordSpacing(style, &vDefault);
ok(hres == S_OK, "get_wordSpacing: %08x\n", hres);
V_VT(&v) = VT_BSTR;
V_BSTR(&v) = a2bstr("10");
hres = IHTMLStyle_put_wordSpacing(style, v);
ok(hres == S_OK, "put_wordSpacing: %08x\n", hres);
VariantClear(&v);
hres = IHTMLStyle_get_wordSpacing(style, &v);
ok(hres == S_OK, "get_wordSpacing: %08x\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v));
ok(!strcmp_wa(V_BSTR(&v), "10px"), "expected 10px = %s\n", wine_dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
hres = IHTMLStyle_put_wordSpacing(style, vDefault);
ok(hres == S_OK, "put_wordSpacing: %08x\n", hres);
VariantClear(&vDefault);
hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2); hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2);
ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres); ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres);
if(SUCCEEDED(hres)) { if(SUCCEEDED(hres)) {
......
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