Commit 7db2691e authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLStyle::whiteSpace property implementation.

parent 366929f1
......@@ -171,6 +171,8 @@ static const WCHAR attrVerticalAlign[] =
{'v','e','r','t','i','c','a','l','-','a','l','i','g','n',0};
static const WCHAR attrVisibility[] =
{'v','i','s','i','b','i','l','i','t','y',0};
static const WCHAR attrWhiteSpace[] =
{'w','h','i','t','e','-','s','p','a','c','e',0};
static const WCHAR attrWidth[] =
{'w','i','d','t','h',0};
static const WCHAR attrWordSpacing[] =
......@@ -257,6 +259,7 @@ static const style_tbl_entry_t style_tbl[] = {
{attrTop, DISPID_IHTMLSTYLE_TOP},
{attrVerticalAlign, DISPID_IHTMLSTYLE_VERTICALALIGN},
{attrVisibility, DISPID_IHTMLSTYLE_VISIBILITY},
{attrWhiteSpace, DISPID_IHTMLSTYLE_WHITESPACE},
{attrWidth, DISPID_IHTMLSTYLE_WIDTH},
{attrWordSpacing, DISPID_IHTMLSTYLE_WORDSPACING},
{attrWordWrap, DISPID_IHTMLSTYLE3_WORDWRAP},
......@@ -2214,15 +2217,19 @@ static HRESULT WINAPI HTMLStyle_get_listStyle(IHTMLStyle *iface, BSTR *p)
static HRESULT WINAPI HTMLStyle_put_whiteSpace(IHTMLStyle *iface, BSTR v)
{
HTMLStyle *This = impl_from_IHTMLStyle(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
return set_nsstyle_attr(This->nsstyle, STYLEID_WHITE_SPACE, v, 0);
}
static HRESULT WINAPI HTMLStyle_get_whiteSpace(IHTMLStyle *iface, BSTR *p)
{
HTMLStyle *This = impl_from_IHTMLStyle(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_WHITE_SPACE, p, 0);
}
static HRESULT WINAPI HTMLStyle_put_top(IHTMLStyle *iface, VARIANT v)
......
......@@ -101,6 +101,7 @@ typedef enum {
STYLEID_TOP,
STYLEID_VERTICAL_ALIGN,
STYLEID_VISIBILITY,
STYLEID_WHITE_SPACE,
STYLEID_WIDTH,
STYLEID_WORD_SPACING,
STYLEID_WORD_WRAP,
......
......@@ -2028,6 +2028,22 @@ static void test_body_style(IHTMLStyle *style)
ok(hres == S_OK, "get_pageBreakBefore failed: %08x\n", hres);
ok(!str, "pageBreakBefore = %s\n", wine_dbgstr_w(str));
str = (void*)0xdeadbeef;
hres = IHTMLStyle_get_whiteSpace(style, &str);
ok(hres == S_OK, "get_whiteSpace failed: %08x\n", hres);
ok(!str, "whiteSpace = %s\n", wine_dbgstr_w(str));
str = a2bstr("nowrap");
hres = IHTMLStyle_put_whiteSpace(style, str);
SysFreeString(str);
ok(hres == S_OK, "put_whiteSpace failed: %08x\n", hres);
str = NULL;
hres = IHTMLStyle_get_whiteSpace(style, &str);
ok(hres == S_OK, "get_whiteSpace failed: %08x\n", hres);
ok(!strcmp_wa(str, "nowrap"), "whiteSpace = %s\n", wine_dbgstr_w(str));
SysFreeString(str);
hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2);
ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", 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