Jacek Caban : mshtml: Add IHTMLCSSStyleDeclaration2::columnRule property semi-stub implementation.
Alexandre Julliard
julliard at winehq.org
Tue Jun 9 15:27:48 CDT 2020
Module: wine
Branch: master
Commit: dbc5dc893bfd81132758986ef480403d44cf7f94
URL: https://source.winehq.org/git/wine.git/?a=commit;h=dbc5dc893bfd81132758986ef480403d44cf7f94
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Jun 9 16:16:43 2020 +0200
mshtml: Add IHTMLCSSStyleDeclaration2::columnRule property semi-stub implementation.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mshtml/htmlstyle.c | 13 +++++++++----
dlls/mshtml/htmlstyle.h | 1 +
dlls/mshtml/tests/style.c | 15 +++++++++++++++
3 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 388d200fa3..022d49993f 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -563,6 +563,11 @@ static const style_tbl_entry_t style_tbl[] = {
DISPID_IHTMLCSSSTYLEDECLARATION2_COLUMNGAP,
DISPID_UNKNOWN
},
+ {
+ L"column-rule",
+ DISPID_IHTMLCSSSTYLEDECLARATION2_COLUMNRULE,
+ DISPID_UNKNOWN
+ },
{
L"column-rule-color",
DISPID_IHTMLCSSSTYLEDECLARATION2_COLUMNRULECOLOR,
@@ -8918,15 +8923,15 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_columns(IHTMLCSSStyleDeclarat
static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_columnRule(IHTMLCSSStyleDeclaration2 *iface, BSTR v)
{
CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration2(iface);
- FIXME("(%p)->(%s)\n", This, debugstr_w(v));
- return E_NOTIMPL;
+ WARN("(%p)->(%s) semi-stub\n", This, debugstr_w(v));
+ return set_style_property(This, STYLEID_COLUMN_RULE, v);
}
static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_columnRule(IHTMLCSSStyleDeclaration2 *iface, BSTR *p)
{
CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration2(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ WARN("(%p)->(%p) semi-stub\n", This, p);
+ return get_style_property(This, STYLEID_COLUMN_RULE, p);
}
static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_columnRuleColor(IHTMLCSSStyleDeclaration2 *iface, VARIANT v)
diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h
index c85e2be9e6..f6154c9214 100644
--- a/dlls/mshtml/htmlstyle.h
+++ b/dlls/mshtml/htmlstyle.h
@@ -84,6 +84,7 @@ typedef enum {
STYLEID_COLUMN_COUNT,
STYLEID_COLUMN_FILL,
STYLEID_COLUMN_GAP,
+ STYLEID_COLUMN_RULE,
STYLEID_COLUMN_RULE_COLOR,
STYLEID_COLUMN_RULE_STYLE,
STYLEID_COLUMN_RULE_WIDTH,
diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c
index f56b68d2b2..2ed6ef2e22 100644
--- a/dlls/mshtml/tests/style.c
+++ b/dlls/mshtml/tests/style.c
@@ -1073,6 +1073,21 @@ static void test_css_style_declaration2(IHTMLCSSStyleDeclaration2 *css_style)
todo_wine
ok(V_VT(&v) == VT_BSTR && V_BSTR(&v) && !lstrcmpW(V_BSTR(&v), L"10px"), "columnRuleWidth = %s\n", wine_dbgstr_variant(&v));
VariantClear(&v);
+
+ str = NULL;
+ hres = IHTMLCSSStyleDeclaration2_get_columnRule(css_style, &str);
+ ok(hres == S_OK, "get_columnRule failed: %08x\n", hres);
+ todo_wine
+ ok(str && !lstrcmpW(str, L"10px solid red"), "columnRule = %s\n", wine_dbgstr_w(str));
+ SysFreeString(str);
+
+ hres = IHTMLCSSStyleDeclaration2_put_columnRule(css_style, NULL);
+ ok(hres == S_OK, "put_columnRule failed: %08x\n", hres);
+
+ str = (void*)0xdeadbeef;
+ hres = IHTMLCSSStyleDeclaration2_get_columnRule(css_style, &str);
+ ok(hres == S_OK, "get_columnRule failed: %08x\n", hres);
+ ok(!str, "columnRule = %s\n", wine_dbgstr_w(str));
}
static void test_body_style(IHTMLStyle *style)
More information about the wine-cvs
mailing list