Commit 321c9657 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLStyle6::boxSizing property implementation.

parent da6c7281
......@@ -91,6 +91,9 @@ static const WCHAR attrBorderWidth[] =
{'b','o','r','d','e','r','-','w','i','d','t','h',0};
static const WCHAR attrBottom[] =
{'b','o','t','t','o','m',0};
/* FIXME: Use unprefixed version (requires Gecko changes). */
static const WCHAR attrBoxSizing[] =
{'-','m','o','z','-','b','o','x','-','s','i','z','i','n','g',0};
static const WCHAR attrClear[] =
{'c','l','e','a','r',0};
static const WCHAR attrClip[] =
......@@ -221,6 +224,7 @@ static const style_tbl_entry_t style_tbl[] = {
{attrBorderTopWidth, DISPID_IHTMLSTYLE_BORDERTOPWIDTH},
{attrBorderWidth, DISPID_IHTMLSTYLE_BORDERWIDTH},
{attrBottom, DISPID_IHTMLSTYLE2_BOTTOM},
{attrBoxSizing, DISPID_IHTMLSTYLE6_BOXSIZING},
{attrClear, DISPID_IHTMLSTYLE_CLEAR},
{attrClip, DISPID_IHTMLSTYLE_CLIP},
{attrColor, DISPID_IHTMLSTYLE_COLOR},
......
......@@ -61,6 +61,7 @@ typedef enum {
STYLEID_BORDER_TOP_WIDTH,
STYLEID_BORDER_WIDTH,
STYLEID_BOTTOM,
STYLEID_BOX_SIZING,
STYLEID_CLEAR,
STYLEID_CLIP,
STYLEID_COLOR,
......
......@@ -762,15 +762,19 @@ static HRESULT WINAPI HTMLStyle6_get_outlineColor(IHTMLStyle6 *iface, VARIANT *p
static HRESULT WINAPI HTMLStyle6_put_boxSizing(IHTMLStyle6 *iface, BSTR v)
{
HTMLStyle *This = impl_from_IHTMLStyle6(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_BOX_SIZING, v, 0);
}
static HRESULT WINAPI HTMLStyle6_get_boxSizing(IHTMLStyle6 *iface, BSTR *p)
{
HTMLStyle *This = impl_from_IHTMLStyle6(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BOX_SIZING, p, 0);
}
static HRESULT WINAPI HTMLStyle6_put_boxSpacing(IHTMLStyle6 *iface, BSTR v)
......
......@@ -492,6 +492,23 @@ static void test_style6(IHTMLStyle6 *style)
ok(hres == S_OK, "get_outline failed: %08x\n", hres);
ok(wstr_contains(str, "1px"), "outline = %s\n", wine_dbgstr_w(str));
SysFreeString(str);
str = (void*)0xdeadbeef;
hres = IHTMLStyle6_get_boxSizing(style, &str);
ok(hres == S_OK, "get_boxSizing failed: %08x\n", hres);
ok(!str, "boxSizing = %s\n", wine_dbgstr_w(str));
SysFreeString(str);
str = a2bstr("border-box");
hres = IHTMLStyle6_put_boxSizing(style, str);
ok(hres == S_OK, "put_boxSizing failed: %08x\n", hres);
SysFreeString(str);
str = NULL;
hres = IHTMLStyle6_get_boxSizing(style, &str);
ok(hres == S_OK, "get_boxSizing failed: %08x\n", hres);
ok(!strcmp_wa(str, "border-box"), "boxSizing = %s\n", wine_dbgstr_w(str));
SysFreeString(str);
}
static void test_body_style(IHTMLStyle *style)
......
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