mshtml: Implement IHTMLStyle::{get, put}_border{Top, Bottom, Right}.
This commit is contained in:
parent
3007b73cc9
commit
d97b4d260e
|
@ -49,6 +49,8 @@ static const WCHAR attrBackgroundRepeat[] =
|
||||||
{'b','a','c','k','g','r','o','u','n','d','-','r','e','p','e','a','t',0};
|
{'b','a','c','k','g','r','o','u','n','d','-','r','e','p','e','a','t',0};
|
||||||
static const WCHAR attrBorder[] =
|
static const WCHAR attrBorder[] =
|
||||||
{'b','o','r','d','e','r',0};
|
{'b','o','r','d','e','r',0};
|
||||||
|
static const WCHAR attrBorderBottom[] =
|
||||||
|
{'b','o','r','d','e','r','-','b','o','t','t','o','m',0};
|
||||||
static const WCHAR attrBorderBottomColor[] =
|
static const WCHAR attrBorderBottomColor[] =
|
||||||
{'b','o','r','d','e','r','-','b','o','t','t','o','m','-','c','o','l','o','r',0};
|
{'b','o','r','d','e','r','-','b','o','t','t','o','m','-','c','o','l','o','r',0};
|
||||||
static const WCHAR attrBorderBottomStyle[] =
|
static const WCHAR attrBorderBottomStyle[] =
|
||||||
|
@ -65,12 +67,16 @@ static const WCHAR attrBorderLeftStyle[] =
|
||||||
{'b','o','r','d','e','r','-','l','e','f','t','-','s','t','y','l','e',0};
|
{'b','o','r','d','e','r','-','l','e','f','t','-','s','t','y','l','e',0};
|
||||||
static const WCHAR attrBorderLeftWidth[] =
|
static const WCHAR attrBorderLeftWidth[] =
|
||||||
{'b','o','r','d','e','r','-','l','e','f','t','-','w','i','d','t','h',0};
|
{'b','o','r','d','e','r','-','l','e','f','t','-','w','i','d','t','h',0};
|
||||||
|
static const WCHAR attrBorderRight[] =
|
||||||
|
{'b','o','r','d','e','r','-','r','i','g','h','t',0};
|
||||||
static const WCHAR attrBorderRightColor[] =
|
static const WCHAR attrBorderRightColor[] =
|
||||||
{'b','o','r','d','e','r','-','r','i','g','h','t','-','c','o','l','o','r',0};
|
{'b','o','r','d','e','r','-','r','i','g','h','t','-','c','o','l','o','r',0};
|
||||||
static const WCHAR attrBorderRightStyle[] =
|
static const WCHAR attrBorderRightStyle[] =
|
||||||
{'b','o','r','d','e','r','-','r','i','g','h','t','-','s','t','y','l','e',0};
|
{'b','o','r','d','e','r','-','r','i','g','h','t','-','s','t','y','l','e',0};
|
||||||
static const WCHAR attrBorderRightWidth[] =
|
static const WCHAR attrBorderRightWidth[] =
|
||||||
{'b','o','r','d','e','r','-','r','i','g','h','t','-','w','i','d','t','h',0};
|
{'b','o','r','d','e','r','-','r','i','g','h','t','-','w','i','d','t','h',0};
|
||||||
|
static const WCHAR attrBorderTop[] =
|
||||||
|
{'b','o','r','d','e','r','-','t','o','p',0};
|
||||||
static const WCHAR attrBorderTopColor[] =
|
static const WCHAR attrBorderTopColor[] =
|
||||||
{'b','o','r','d','e','r','-','t','o','p','-','c','o','l','o','r',0};
|
{'b','o','r','d','e','r','-','t','o','p','-','c','o','l','o','r',0};
|
||||||
static const WCHAR attrBorderStyle[] =
|
static const WCHAR attrBorderStyle[] =
|
||||||
|
@ -167,6 +173,7 @@ static const struct{
|
||||||
{attrBackgroundPositionY, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONY},
|
{attrBackgroundPositionY, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONY},
|
||||||
{attrBackgroundRepeat, DISPID_IHTMLSTYLE_BACKGROUNDREPEAT},
|
{attrBackgroundRepeat, DISPID_IHTMLSTYLE_BACKGROUNDREPEAT},
|
||||||
{attrBorder, DISPID_IHTMLSTYLE_BORDER},
|
{attrBorder, DISPID_IHTMLSTYLE_BORDER},
|
||||||
|
{attrBorderBottom, DISPID_IHTMLSTYLE_BORDERBOTTOM},
|
||||||
{attrBorderBottomColor, DISPID_IHTMLSTYLE_BORDERBOTTOMCOLOR},
|
{attrBorderBottomColor, DISPID_IHTMLSTYLE_BORDERBOTTOMCOLOR},
|
||||||
{attrBorderBottomStyle, DISPID_IHTMLSTYLE_BORDERBOTTOMSTYLE},
|
{attrBorderBottomStyle, DISPID_IHTMLSTYLE_BORDERBOTTOMSTYLE},
|
||||||
{attrBorderBottomWidth, DISPID_IHTMLSTYLE_BORDERBOTTOMWIDTH},
|
{attrBorderBottomWidth, DISPID_IHTMLSTYLE_BORDERBOTTOMWIDTH},
|
||||||
|
@ -175,10 +182,12 @@ static const struct{
|
||||||
{attrBorderLeftColor, DISPID_IHTMLSTYLE_BORDERLEFTCOLOR},
|
{attrBorderLeftColor, DISPID_IHTMLSTYLE_BORDERLEFTCOLOR},
|
||||||
{attrBorderLeftStyle, DISPID_IHTMLSTYLE_BORDERLEFTSTYLE},
|
{attrBorderLeftStyle, DISPID_IHTMLSTYLE_BORDERLEFTSTYLE},
|
||||||
{attrBorderLeftWidth, DISPID_IHTMLSTYLE_BORDERLEFTWIDTH},
|
{attrBorderLeftWidth, DISPID_IHTMLSTYLE_BORDERLEFTWIDTH},
|
||||||
|
{attrBorderRight, DISPID_IHTMLSTYLE_BORDERRIGHT},
|
||||||
{attrBorderRightColor, DISPID_IHTMLSTYLE_BORDERRIGHTCOLOR},
|
{attrBorderRightColor, DISPID_IHTMLSTYLE_BORDERRIGHTCOLOR},
|
||||||
{attrBorderRightStyle, DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE},
|
{attrBorderRightStyle, DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE},
|
||||||
{attrBorderRightWidth, DISPID_IHTMLSTYLE_BORDERRIGHTWIDTH},
|
{attrBorderRightWidth, DISPID_IHTMLSTYLE_BORDERRIGHTWIDTH},
|
||||||
{attrBorderStyle, DISPID_IHTMLSTYLE_BORDERSTYLE},
|
{attrBorderStyle, DISPID_IHTMLSTYLE_BORDERSTYLE},
|
||||||
|
{attrBorderTop, DISPID_IHTMLSTYLE_BORDERTOP},
|
||||||
{attrBorderTopColor, DISPID_IHTMLSTYLE_BORDERTOPCOLOR},
|
{attrBorderTopColor, DISPID_IHTMLSTYLE_BORDERTOPCOLOR},
|
||||||
{attrBorderTopStyle, DISPID_IHTMLSTYLE_BORDERTOPSTYLE},
|
{attrBorderTopStyle, DISPID_IHTMLSTYLE_BORDERTOPSTYLE},
|
||||||
{attrBorderTopWidth, DISPID_IHTMLSTYLE_BORDERTOPWIDTH},
|
{attrBorderTopWidth, DISPID_IHTMLSTYLE_BORDERTOPWIDTH},
|
||||||
|
@ -1433,43 +1442,43 @@ static HRESULT WINAPI HTMLStyle_get_border(IHTMLStyle *iface, BSTR *p)
|
||||||
static HRESULT WINAPI HTMLStyle_put_borderTop(IHTMLStyle *iface, BSTR v)
|
static HRESULT WINAPI HTMLStyle_put_borderTop(IHTMLStyle *iface, BSTR v)
|
||||||
{
|
{
|
||||||
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
||||||
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
||||||
return E_NOTIMPL;
|
return set_style_attr(This, STYLEID_BORDER_TOP, v, ATTR_FIX_PX);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLStyle_get_borderTop(IHTMLStyle *iface, BSTR *p)
|
static HRESULT WINAPI HTMLStyle_get_borderTop(IHTMLStyle *iface, BSTR *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_style_attr(This, STYLEID_BORDER_TOP, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLStyle_put_borderRight(IHTMLStyle *iface, BSTR v)
|
static HRESULT WINAPI HTMLStyle_put_borderRight(IHTMLStyle *iface, BSTR v)
|
||||||
{
|
{
|
||||||
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
||||||
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
||||||
return E_NOTIMPL;
|
return set_style_attr(This, STYLEID_BORDER_RIGHT, v, ATTR_FIX_PX);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLStyle_get_borderRight(IHTMLStyle *iface, BSTR *p)
|
static HRESULT WINAPI HTMLStyle_get_borderRight(IHTMLStyle *iface, BSTR *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_style_attr(This, STYLEID_BORDER_RIGHT, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLStyle_put_borderBottom(IHTMLStyle *iface, BSTR v)
|
static HRESULT WINAPI HTMLStyle_put_borderBottom(IHTMLStyle *iface, BSTR v)
|
||||||
{
|
{
|
||||||
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
||||||
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
||||||
return E_NOTIMPL;
|
return set_style_attr(This, STYLEID_BORDER_BOTTOM, v, ATTR_FIX_PX);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLStyle_get_borderBottom(IHTMLStyle *iface, BSTR *p)
|
static HRESULT WINAPI HTMLStyle_get_borderBottom(IHTMLStyle *iface, BSTR *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_style_attr(This, STYLEID_BORDER_BOTTOM, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLStyle_put_borderLeft(IHTMLStyle *iface, BSTR v)
|
static HRESULT WINAPI HTMLStyle_put_borderLeft(IHTMLStyle *iface, BSTR v)
|
||||||
|
|
|
@ -42,6 +42,7 @@ typedef enum {
|
||||||
STYLEID_BACKGROUND_POSITION_Y,
|
STYLEID_BACKGROUND_POSITION_Y,
|
||||||
STYLEID_BACKGROUND_REPEAT,
|
STYLEID_BACKGROUND_REPEAT,
|
||||||
STYLEID_BORDER,
|
STYLEID_BORDER,
|
||||||
|
STYLEID_BORDER_BOTTOM,
|
||||||
STYLEID_BORDER_BOTTOM_COLOR,
|
STYLEID_BORDER_BOTTOM_COLOR,
|
||||||
STYLEID_BORDER_BOTTOM_STYLE,
|
STYLEID_BORDER_BOTTOM_STYLE,
|
||||||
STYLEID_BORDER_BOTTOM_WIDTH,
|
STYLEID_BORDER_BOTTOM_WIDTH,
|
||||||
|
@ -50,10 +51,12 @@ typedef enum {
|
||||||
STYLEID_BORDER_LEFT_COLOR,
|
STYLEID_BORDER_LEFT_COLOR,
|
||||||
STYLEID_BORDER_LEFT_STYLE,
|
STYLEID_BORDER_LEFT_STYLE,
|
||||||
STYLEID_BORDER_LEFT_WIDTH,
|
STYLEID_BORDER_LEFT_WIDTH,
|
||||||
|
STYLEID_BORDER_RIGHT,
|
||||||
STYLEID_BORDER_RIGHT_COLOR,
|
STYLEID_BORDER_RIGHT_COLOR,
|
||||||
STYLEID_BORDER_RIGHT_STYLE,
|
STYLEID_BORDER_RIGHT_STYLE,
|
||||||
STYLEID_BORDER_RIGHT_WIDTH,
|
STYLEID_BORDER_RIGHT_WIDTH,
|
||||||
STYLEID_BORDER_STYLE,
|
STYLEID_BORDER_STYLE,
|
||||||
|
STYLEID_BORDER_TOP,
|
||||||
STYLEID_BORDER_TOP_COLOR,
|
STYLEID_BORDER_TOP_COLOR,
|
||||||
STYLEID_BORDER_TOP_STYLE,
|
STYLEID_BORDER_TOP_STYLE,
|
||||||
STYLEID_BORDER_TOP_WIDTH,
|
STYLEID_BORDER_TOP_WIDTH,
|
||||||
|
|
|
@ -4285,6 +4285,108 @@ static void test_default_style(IHTMLStyle *style)
|
||||||
ok(hres == S_OK, "put_borderColor failed: %08x\n", hres);
|
ok(hres == S_OK, "put_borderColor failed: %08x\n", hres);
|
||||||
SysFreeString(sDefault);
|
SysFreeString(sDefault);
|
||||||
|
|
||||||
|
/* BorderRight */
|
||||||
|
hres = IHTMLStyle_get_borderRight(style, &sDefault);
|
||||||
|
ok(hres == S_OK, "get_borderRight failed: %08x\n", hres);
|
||||||
|
|
||||||
|
str = a2bstr("thick dotted red");
|
||||||
|
hres = IHTMLStyle_put_borderRight(style, str);
|
||||||
|
ok(hres == S_OK, "put_borderRight failed: %08x\n", hres);
|
||||||
|
SysFreeString(str);
|
||||||
|
|
||||||
|
/* IHTMLStyle_get_borderRight appears to have a bug where
|
||||||
|
it returns the first letter of the color. So we check
|
||||||
|
each style individually.
|
||||||
|
*/
|
||||||
|
V_BSTR(&v) = NULL;
|
||||||
|
hres = IHTMLStyle_get_borderRightColor(style, &v);
|
||||||
|
todo_wine ok(hres == S_OK, "get_borderRightColor failed: %08x\n", hres);
|
||||||
|
todo_wine ok(!strcmp_wa(V_BSTR(&v), "red"), "str=%s\n", wine_dbgstr_w(V_BSTR(&v)));
|
||||||
|
VariantClear(&v);
|
||||||
|
|
||||||
|
V_BSTR(&v) = NULL;
|
||||||
|
hres = IHTMLStyle_get_borderRightWidth(style, &v);
|
||||||
|
ok(hres == S_OK, "get_borderRightWidth failed: %08x\n", hres);
|
||||||
|
ok(!strcmp_wa(V_BSTR(&v), "thick"), "str=%s\n", wine_dbgstr_w(V_BSTR(&v)));
|
||||||
|
VariantClear(&v);
|
||||||
|
|
||||||
|
hres = IHTMLStyle_get_borderRightStyle(style, &str);
|
||||||
|
ok(hres == S_OK, "get_borderRightStyle failed: %08x\n", hres);
|
||||||
|
ok(!strcmp_wa(str, "dotted"), "str=%s\n", wine_dbgstr_w(str));
|
||||||
|
SysFreeString(str);
|
||||||
|
|
||||||
|
hres = IHTMLStyle_put_borderRight(style, sDefault);
|
||||||
|
ok(hres == S_OK, "put_borderRight failed: %08x\n", hres);
|
||||||
|
SysFreeString(sDefault);
|
||||||
|
|
||||||
|
/* BorderTop */
|
||||||
|
hres = IHTMLStyle_get_borderTop(style, &sDefault);
|
||||||
|
ok(hres == S_OK, "get_borderTop failed: %08x\n", hres);
|
||||||
|
|
||||||
|
str = a2bstr("thick dotted red");
|
||||||
|
hres = IHTMLStyle_put_borderTop(style, str);
|
||||||
|
ok(hres == S_OK, "put_borderTop failed: %08x\n", hres);
|
||||||
|
SysFreeString(str);
|
||||||
|
|
||||||
|
/* IHTMLStyle_get_borderTop appears to have a bug where
|
||||||
|
it returns the first letter of the color. So we check
|
||||||
|
each style individually.
|
||||||
|
*/
|
||||||
|
V_BSTR(&v) = NULL;
|
||||||
|
hres = IHTMLStyle_get_borderTopColor(style, &v);
|
||||||
|
todo_wine ok(hres == S_OK, "get_borderTopColor failed: %08x\n", hres);
|
||||||
|
todo_wine ok(!strcmp_wa(V_BSTR(&v), "red"), "str=%s\n", wine_dbgstr_w(V_BSTR(&v)));
|
||||||
|
VariantClear(&v);
|
||||||
|
|
||||||
|
V_BSTR(&v) = NULL;
|
||||||
|
hres = IHTMLStyle_get_borderTopWidth(style, &v);
|
||||||
|
ok(hres == S_OK, "get_borderTopWidth failed: %08x\n", hres);
|
||||||
|
ok(!strcmp_wa(V_BSTR(&v), "thick"), "str=%s\n", wine_dbgstr_w(V_BSTR(&v)));
|
||||||
|
VariantClear(&v);
|
||||||
|
|
||||||
|
hres = IHTMLStyle_get_borderTopStyle(style, &str);
|
||||||
|
ok(hres == S_OK, "get_borderTopStyle failed: %08x\n", hres);
|
||||||
|
ok(!strcmp_wa(str, "dotted"), "str=%s\n", wine_dbgstr_w(str));
|
||||||
|
SysFreeString(str);
|
||||||
|
|
||||||
|
hres = IHTMLStyle_put_borderTop(style, sDefault);
|
||||||
|
ok(hres == S_OK, "put_borderTop failed: %08x\n", hres);
|
||||||
|
SysFreeString(sDefault);
|
||||||
|
|
||||||
|
/* BorderBottom */
|
||||||
|
hres = IHTMLStyle_get_borderBottom(style, &sDefault);
|
||||||
|
ok(hres == S_OK, "get_borderBottom failed: %08x\n", hres);
|
||||||
|
|
||||||
|
str = a2bstr("thick dotted red");
|
||||||
|
hres = IHTMLStyle_put_borderBottom(style, str);
|
||||||
|
ok(hres == S_OK, "put_borderBottom failed: %08x\n", hres);
|
||||||
|
SysFreeString(str);
|
||||||
|
|
||||||
|
/* IHTMLStyle_get_borderBottom appears to have a bug where
|
||||||
|
it returns the first letter of the color. So we check
|
||||||
|
each style individually.
|
||||||
|
*/
|
||||||
|
V_BSTR(&v) = NULL;
|
||||||
|
hres = IHTMLStyle_get_borderBottomColor(style, &v);
|
||||||
|
todo_wine ok(hres == S_OK, "get_borderBottomColor failed: %08x\n", hres);
|
||||||
|
todo_wine ok(!strcmp_wa(V_BSTR(&v), "red"), "str=%s\n", wine_dbgstr_w(V_BSTR(&v)));
|
||||||
|
VariantClear(&v);
|
||||||
|
|
||||||
|
V_BSTR(&v) = NULL;
|
||||||
|
hres = IHTMLStyle_get_borderBottomWidth(style, &v);
|
||||||
|
ok(hres == S_OK, "get_borderBottomWidth failed: %08x\n", hres);
|
||||||
|
ok(!strcmp_wa(V_BSTR(&v), "thick"), "str=%s\n", wine_dbgstr_w(V_BSTR(&v)));
|
||||||
|
VariantClear(&v);
|
||||||
|
|
||||||
|
hres = IHTMLStyle_get_borderBottomStyle(style, &str);
|
||||||
|
ok(hres == S_OK, "get_borderBottomStyle failed: %08x\n", hres);
|
||||||
|
ok(!strcmp_wa(str, "dotted"), "str=%s\n", wine_dbgstr_w(str));
|
||||||
|
SysFreeString(str);
|
||||||
|
|
||||||
|
hres = IHTMLStyle_put_borderBottom(style, sDefault);
|
||||||
|
ok(hres == S_OK, "put_borderBottom failed: %08x\n", hres);
|
||||||
|
SysFreeString(sDefault);
|
||||||
|
|
||||||
/* BorderLeft */
|
/* BorderLeft */
|
||||||
hres = IHTMLStyle_get_borderLeft(style, &sDefault);
|
hres = IHTMLStyle_get_borderLeft(style, &sDefault);
|
||||||
ok(hres == S_OK, "get_borderLeft failed: %08x\n", hres);
|
ok(hres == S_OK, "get_borderLeft failed: %08x\n", hres);
|
||||||
|
|
Loading…
Reference in New Issue