From 957a50aa7225b2c5f9e192d883713f5dc76a3d5c Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Sun, 8 Feb 2009 20:12:59 +1100 Subject: [PATCH] mshtml: Implement IHTMLStyle_put_textDecorationLineThrough. --- dlls/mshtml/htmlstyle.c | 6 ++++-- dlls/mshtml/tests/dom.c | 11 +++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 084dd3590a7..86f2ca0c471 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -955,8 +955,10 @@ static HRESULT WINAPI HTMLStyle_get_textDecorationOverline(IHTMLStyle *iface, VA static HRESULT WINAPI HTMLStyle_put_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL v) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%x)\n", This, v); - return E_NOTIMPL; + + TRACE("(%p)->(%x)\n", This, v); + + return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valLineThrough : emptyW, 0); } static HRESULT WINAPI HTMLStyle_get_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL *p) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index a1d1e15ad30..feafcd187cb 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2566,6 +2566,17 @@ static void test_default_style(IHTMLStyle *style) ok(hres == S_OK, "get_textDecorationLineThrough failed: %08x\n", hres); ok(b == VARIANT_FALSE, "textDecorationLineThrough = %x\n", b); + hres = IHTMLStyle_put_textDecorationLineThrough(style, VARIANT_TRUE); + ok(hres == S_OK, "get_textDecorationLineThrough failed: %08x\n", hres); + ok(b == VARIANT_FALSE, "textDecorationLineThrough = %x\n", b); + + hres = IHTMLStyle_get_textDecorationLineThrough(style, &b); + ok(hres == S_OK, "get_textDecorationLineThrough failed: %08x\n", hres); + ok(b == VARIANT_TRUE, "textDecorationLineThrough = %x\n", b); + + hres = IHTMLStyle_put_textDecorationLineThrough(style, VARIANT_FALSE); + ok(hres == S_OK, "get_textDecorationLineThrough failed: %08x\n", hres); + hres = IHTMLStyle_get_posWidth(style, NULL); ok(hres == E_POINTER, "get_posWidth failed: %08x\n", hres); -- 2.11.4.GIT