mshtml: Implement IHTMLStyle get/put posHeight.
This commit is contained in:
parent
7a92db4e8b
commit
84abbd64ae
|
@ -1933,15 +1933,25 @@ static HRESULT WINAPI HTMLStyle_get_posWidth(IHTMLStyle *iface, float *p)
|
|||
static HRESULT WINAPI HTMLStyle_put_posHeight(IHTMLStyle *iface, float v)
|
||||
{
|
||||
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
|
||||
TRACE("(%p)->(%f)\n", This, v);
|
||||
|
||||
return set_style_pos(This, STYLEID_HEIGHT, v);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLStyle_get_posHeight(IHTMLStyle *iface, float *p)
|
||||
{
|
||||
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, p);
|
||||
|
||||
if(!p)
|
||||
return E_POINTER;
|
||||
|
||||
if(get_nsstyle_pos(This, STYLEID_HEIGHT, p) != S_OK)
|
||||
*p = 0.0f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLStyle_put_cursor(IHTMLStyle *iface, BSTR v)
|
||||
|
|
|
@ -2513,6 +2513,10 @@ static void test_default_style(IHTMLStyle *style)
|
|||
ok(!V_BSTR(&v), "V_BSTR(v) != NULL\n");
|
||||
VariantClear(&v);
|
||||
|
||||
/* Test posHeight */
|
||||
hres = IHTMLStyle_get_posHeight(style, NULL);
|
||||
ok(hres == E_POINTER, "get_left failed: %08x\n", hres);
|
||||
|
||||
V_VT(&v) = VT_EMPTY;
|
||||
hres = IHTMLStyle_get_height(style, &v);
|
||||
ok(hres == S_OK, "get_height failed: %08x\n", hres);
|
||||
|
@ -2520,6 +2524,18 @@ static void test_default_style(IHTMLStyle *style)
|
|||
ok(!V_BSTR(&v), "V_BSTR(v) != NULL\n");
|
||||
VariantClear(&v);
|
||||
|
||||
f = 1.0f;
|
||||
hres = IHTMLStyle_get_posHeight(style, &f);
|
||||
ok(hres == S_OK, "get_left failed: %08x\n", hres);
|
||||
ok(f == 0.0, "expected 0.0 got %f\n", f);
|
||||
|
||||
hres = IHTMLStyle_put_posHeight(style, 4.9f);
|
||||
ok(hres == S_OK, "get_left failed: %08x\n", hres);
|
||||
|
||||
hres = IHTMLStyle_get_posHeight(style, &f);
|
||||
ok(hres == S_OK, "get_left failed: %08x\n", hres);
|
||||
ok(f == 4.0, "expected 4.0 got %f\n", f);
|
||||
|
||||
V_VT(&v) = VT_BSTR;
|
||||
V_BSTR(&v) = a2bstr("64px");
|
||||
hres = IHTMLStyle_put_height(style, v);
|
||||
|
@ -2533,6 +2549,10 @@ static void test_default_style(IHTMLStyle *style)
|
|||
ok(!strcmp_wa(V_BSTR(&v), "64px"), "V_BSTR(v) = %s\n", dbgstr_w(V_BSTR(&v)));
|
||||
VariantClear(&v);
|
||||
|
||||
hres = IHTMLStyle_get_posHeight(style, &f);
|
||||
ok(hres == S_OK, "get_left failed: %08x\n", hres);
|
||||
ok(f == 64.0, "expected 64.0 got %f\n", f);
|
||||
|
||||
str = (void*)0xdeadbeef;
|
||||
hres = IHTMLStyle_get_cursor(style, &str);
|
||||
ok(hres == S_OK, "get_cursor failed: %08x\n", hres);
|
||||
|
|
Loading…
Reference in New Issue