mshtml: Implement IHTMLStyle get/put letterSpacing.
This commit is contained in:
parent
15da6c94f5
commit
15bd593fae
@ -95,6 +95,8 @@ static const WCHAR attrHeight[] =
|
|||||||
{'h','e','i','g','h','t',0};
|
{'h','e','i','g','h','t',0};
|
||||||
static const WCHAR attrLeft[] =
|
static const WCHAR attrLeft[] =
|
||||||
{'l','e','f','t',0};
|
{'l','e','f','t',0};
|
||||||
|
static const WCHAR attrLetterSpacing[] =
|
||||||
|
{'l','e','t','t','e','r','-','s','p','a','c','i','n','g',0};
|
||||||
static const WCHAR attrMargin[] =
|
static const WCHAR attrMargin[] =
|
||||||
{'m','a','r','g','i','n',0};
|
{'m','a','r','g','i','n',0};
|
||||||
static const WCHAR attrMarginLeft[] =
|
static const WCHAR attrMarginLeft[] =
|
||||||
@ -162,6 +164,7 @@ static const struct{
|
|||||||
{attrFontWeight, DISPID_IHTMLSTYLE_FONTWEIGHT},
|
{attrFontWeight, DISPID_IHTMLSTYLE_FONTWEIGHT},
|
||||||
{attrHeight, DISPID_IHTMLSTYLE_HEIGHT},
|
{attrHeight, DISPID_IHTMLSTYLE_HEIGHT},
|
||||||
{attrLeft, DISPID_IHTMLSTYLE_LEFT},
|
{attrLeft, DISPID_IHTMLSTYLE_LEFT},
|
||||||
|
{attrLetterSpacing, DISPID_IHTMLSTYLE_LETTERSPACING},
|
||||||
{attrMargin, DISPID_IHTMLSTYLE_MARGIN},
|
{attrMargin, DISPID_IHTMLSTYLE_MARGIN},
|
||||||
{attrMarginLeft, DISPID_IHTMLSTYLE_MARGINLEFT},
|
{attrMarginLeft, DISPID_IHTMLSTYLE_MARGINLEFT},
|
||||||
{attrMarginRight, DISPID_IHTMLSTYLE_MARGINRIGHT},
|
{attrMarginRight, DISPID_IHTMLSTYLE_MARGINRIGHT},
|
||||||
@ -940,15 +943,15 @@ static HRESULT WINAPI HTMLStyle_get_wordSpacing(IHTMLStyle *iface, VARIANT *p)
|
|||||||
static HRESULT WINAPI HTMLStyle_put_letterSpacing(IHTMLStyle *iface, VARIANT v)
|
static HRESULT WINAPI HTMLStyle_put_letterSpacing(IHTMLStyle *iface, VARIANT v)
|
||||||
{
|
{
|
||||||
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
||||||
FIXME("(%p)->(v%d)\n", This, V_VT(&v));
|
TRACE("(%p)->(v%d)\n", This, V_VT(&v));
|
||||||
return E_NOTIMPL;
|
return set_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, &v, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLStyle_get_letterSpacing(IHTMLStyle *iface, VARIANT *p)
|
static HRESULT WINAPI HTMLStyle_get_letterSpacing(IHTMLStyle *iface, VARIANT *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_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, p, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLStyle_put_textDecoration(IHTMLStyle *iface, BSTR v)
|
static HRESULT WINAPI HTMLStyle_put_textDecoration(IHTMLStyle *iface, BSTR v)
|
||||||
|
@ -65,6 +65,7 @@ typedef enum {
|
|||||||
STYLEID_FONT_WEIGHT,
|
STYLEID_FONT_WEIGHT,
|
||||||
STYLEID_HEIGHT,
|
STYLEID_HEIGHT,
|
||||||
STYLEID_LEFT,
|
STYLEID_LEFT,
|
||||||
|
STYLEID_LETTER_SPACING,
|
||||||
STYLEID_MARGIN,
|
STYLEID_MARGIN,
|
||||||
STYLEID_MARGIN_LEFT,
|
STYLEID_MARGIN_LEFT,
|
||||||
STYLEID_MARGIN_RIGHT,
|
STYLEID_MARGIN_RIGHT,
|
||||||
|
@ -3747,6 +3747,26 @@ static void test_default_style(IHTMLStyle *style)
|
|||||||
ok(hres == S_OK, "put_wordSpacing: %08x\n", hres);
|
ok(hres == S_OK, "put_wordSpacing: %08x\n", hres);
|
||||||
VariantClear(&vDefault);
|
VariantClear(&vDefault);
|
||||||
|
|
||||||
|
/* letterSpacing */
|
||||||
|
hres = IHTMLStyle_get_letterSpacing(style, &vDefault);
|
||||||
|
ok(hres == S_OK, "get_letterSpacing: %08x\n", hres);
|
||||||
|
|
||||||
|
V_VT(&v) = VT_BSTR;
|
||||||
|
V_BSTR(&v) = a2bstr("11");
|
||||||
|
hres = IHTMLStyle_put_letterSpacing(style, v);
|
||||||
|
ok(hres == S_OK, "put_letterSpacing: %08x\n", hres);
|
||||||
|
VariantClear(&v);
|
||||||
|
|
||||||
|
hres = IHTMLStyle_get_letterSpacing(style, &v);
|
||||||
|
ok(hres == S_OK, "get_letterSpacing: %08x\n", hres);
|
||||||
|
ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v));
|
||||||
|
ok(!strcmp_wa(V_BSTR(&v), "11px"), "expected 10px = %s\n", wine_dbgstr_w(V_BSTR(&v)));
|
||||||
|
VariantClear(&v);
|
||||||
|
|
||||||
|
hres = IHTMLStyle_put_letterSpacing(style, vDefault);
|
||||||
|
ok(hres == S_OK, "put_letterSpacing: %08x\n", hres);
|
||||||
|
VariantClear(&vDefault);
|
||||||
|
|
||||||
hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2);
|
hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2);
|
||||||
ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres);
|
ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres);
|
||||||
if(SUCCEEDED(hres)) {
|
if(SUCCEEDED(hres)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user