mshtml: Added IHTMLStyle::pageBreakAfter property implementation.
This commit is contained in:
parent
8cdf735822
commit
dfaee0f3b1
|
@ -143,6 +143,8 @@ static const WCHAR attrPaddingRight[] =
|
|||
{'p','a','d','d','i','n','g','-','r','i','g','h','t',0};
|
||||
static const WCHAR attrPaddingTop[] =
|
||||
{'p','a','d','d','i','n','g','-','t','o','p',0};
|
||||
static const WCHAR attrPageBreakAfter[] =
|
||||
{'p','a','g','e','-','b','r','e','a','k','-','a','f','t','e','r',0};
|
||||
static const WCHAR attrPosition[] =
|
||||
{'p','o','s','i','t','i','o','n',0};
|
||||
static const WCHAR attrRight[] =
|
||||
|
@ -226,6 +228,7 @@ static const struct{
|
|||
{attrPaddingLeft, DISPID_IHTMLSTYLE_PADDINGLEFT},
|
||||
{attrPaddingRight, DISPID_IHTMLSTYLE_PADDINGRIGHT},
|
||||
{attrPaddingTop, DISPID_IHTMLSTYLE_PADDINGTOP},
|
||||
{attrPageBreakAfter, DISPID_IHTMLSTYLE_PAGEBREAKAFTER},
|
||||
{attrPosition, DISPID_IHTMLSTYLE2_POSITION},
|
||||
{attrRight, DISPID_IHTMLSTYLE2_RIGHT},
|
||||
{attrTextAlign, DISPID_IHTMLSTYLE_TEXTALIGN},
|
||||
|
@ -2359,15 +2362,19 @@ static HRESULT WINAPI HTMLStyle_get_pageBreakBefore(IHTMLStyle *iface, BSTR *p)
|
|||
static HRESULT WINAPI HTMLStyle_put_pageBreakAfter(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_PAGE_BREAK_AFTER, v, 0);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLStyle_get_pageBreakAfter(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_PAGE_BREAK_AFTER, p, 0);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLStyle_put_cssText(IHTMLStyle *iface, BSTR v)
|
||||
|
|
|
@ -85,6 +85,7 @@ typedef enum {
|
|||
STYLEID_PADDING_LEFT,
|
||||
STYLEID_PADDING_RIGHT,
|
||||
STYLEID_PADDING_TOP,
|
||||
STYLEID_PAGE_BREAK_AFTER,
|
||||
STYLEID_POSITION,
|
||||
STYLEID_RIGHT,
|
||||
STYLEID_TEXT_ALIGN,
|
||||
|
|
|
@ -5742,6 +5742,21 @@ static void test_default_style(IHTMLStyle *style)
|
|||
ok(!strcmp_wa(str, "rect(0px 1px 500px 505px)"), "clip = %s\n", wine_dbgstr_w(str));
|
||||
SysFreeString(str);
|
||||
|
||||
/* pageBreakAfter */
|
||||
hres = IHTMLStyle_get_pageBreakAfter(style, &str);
|
||||
ok(hres == S_OK, "get_pageBreakAfter failed: %08x\n", hres);
|
||||
ok(!str, "pageBreakAfter = %s\n", wine_dbgstr_w(str));
|
||||
|
||||
str = a2bstr("always");
|
||||
hres = IHTMLStyle_put_pageBreakAfter(style, str);
|
||||
ok(hres == S_OK, "put_pageBreakAfter failed: %08x\n", hres);
|
||||
SysFreeString(str);
|
||||
|
||||
hres = IHTMLStyle_get_pageBreakAfter(style, &str);
|
||||
ok(hres == S_OK, "get_pageBreakAfter failed: %08x\n", hres);
|
||||
ok(!strcmp_wa(str, "always"), "pageBreakAfter = %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)) {
|
||||
|
|
Loading…
Reference in New Issue