mshtml: Added IHTMLStyle3::wordWrap property implementation.
This commit is contained in:
parent
2d5a8763fc
commit
77ff2df83a
|
@ -119,6 +119,8 @@ static const WCHAR attrVisibility[] =
|
|||
{'v','i','s','i','b','i','l','i','t','y',0};
|
||||
static const WCHAR attrWidth[] =
|
||||
{'w','i','d','t','h',0};
|
||||
static const WCHAR attrWordWrap[] =
|
||||
{'w','o','r','d','-','w','r','a','p',0};
|
||||
static const WCHAR attrZIndex[] =
|
||||
{'z','-','i','n','d','e','x',0};
|
||||
|
||||
|
@ -168,6 +170,7 @@ static const struct{
|
|||
{attrVerticalAlign, DISPID_IHTMLSTYLE_VERTICALALIGN},
|
||||
{attrVisibility, DISPID_IHTMLSTYLE_VISIBILITY},
|
||||
{attrWidth, DISPID_IHTMLSTYLE_WIDTH},
|
||||
{attrWordWrap, DISPID_IHTMLSTYLE3_WORDWRAP},
|
||||
{attrZIndex, DISPID_IHTMLSTYLE_ZINDEX}
|
||||
};
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@ typedef enum {
|
|||
STYLEID_VERTICAL_ALIGN,
|
||||
STYLEID_VISIBILITY,
|
||||
STYLEID_WIDTH,
|
||||
STYLEID_WORD_WRAP,
|
||||
STYLEID_Z_INDEX
|
||||
} styleid_t;
|
||||
|
||||
|
|
|
@ -117,15 +117,19 @@ static HRESULT WINAPI HTMLStyle3_get_zoom(IHTMLStyle3 *iface, VARIANT *p)
|
|||
static HRESULT WINAPI HTMLStyle3_put_wordWrap(IHTMLStyle3 *iface, BSTR v)
|
||||
{
|
||||
HTMLStyle *This = HTMLSTYLE3_THIS(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_WORD_WRAP, v, 0);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLStyle3_get_wordWrap(IHTMLStyle3 *iface, BSTR *p)
|
||||
{
|
||||
HTMLStyle *This = HTMLSTYLE3_THIS(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, p);
|
||||
|
||||
return get_nsstyle_attr(This->nsstyle, STYLEID_WORD_WRAP, p);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLStyle3_put_textUnderlinePosition(IHTMLStyle3 *iface, BSTR v)
|
||||
|
|
|
@ -2627,6 +2627,28 @@ static void test_style2(IHTMLStyle2 *style2)
|
|||
SysFreeString(str);
|
||||
}
|
||||
|
||||
static void test_style3(IHTMLStyle3 *style3)
|
||||
{
|
||||
BSTR str;
|
||||
HRESULT hres;
|
||||
|
||||
str = (void*)0xdeadbeef;
|
||||
hres = IHTMLStyle3_get_wordWrap(style3, &str);
|
||||
ok(hres == S_OK, "get_wordWrap failed: %08x\n", hres);
|
||||
ok(!str, "str != NULL\n");
|
||||
|
||||
str = a2bstr("break-word");
|
||||
hres = IHTMLStyle3_put_wordWrap(style3, str);
|
||||
ok(hres == S_OK, "put_wordWrap failed: %08x\n", hres);
|
||||
SysFreeString(str);
|
||||
|
||||
str = NULL;
|
||||
hres = IHTMLStyle3_get_wordWrap(style3, &str);
|
||||
ok(hres == S_OK, "get_wordWrap failed: %08x\n", hres);
|
||||
ok(!strcmp_wa(str, "break-word"), "get_wordWrap returned %s\n", dbgstr_w(str));
|
||||
SysFreeString(str);
|
||||
}
|
||||
|
||||
static void test_style4(IHTMLStyle4 *style4)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
@ -2655,6 +2677,7 @@ static void test_style4(IHTMLStyle4 *style4)
|
|||
static void test_default_style(IHTMLStyle *style)
|
||||
{
|
||||
IHTMLStyle2 *style2;
|
||||
IHTMLStyle3 *style3;
|
||||
IHTMLStyle4 *style4;
|
||||
VARIANT_BOOL b;
|
||||
VARIANT v;
|
||||
|
@ -3637,6 +3660,13 @@ static void test_default_style(IHTMLStyle *style)
|
|||
IHTMLStyle2_Release(style2);
|
||||
}
|
||||
|
||||
hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle3, (void**)&style3);
|
||||
ok(hres == S_OK, "Could not get IHTMLStyle3 iface: %08x\n", hres);
|
||||
if(SUCCEEDED(hres)) {
|
||||
test_style3(style3);
|
||||
IHTMLStyle3_Release(style3);
|
||||
}
|
||||
|
||||
hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle4, (void**)&style4);
|
||||
ok(hres == S_OK, "Could not get IHTMLStyle4 iface: %08x\n", hres);
|
||||
if(SUCCEEDED(hres)) {
|
||||
|
|
Loading…
Reference in New Issue