Module: wine Branch: master Commit: 1d428f48379b2efb694b5b443a26f5d4b7cf813d URL: http://source.winehq.org/git/wine.git/?a=commit;h=1d428f48379b2efb694b5b443a...
Author: Jacek Caban jacek@codeweavers.com Date: Sun Jun 10 11:55:25 2007 +0200
mshtml: Added IHTMLStyle::get_fontFamily implementation.
---
dlls/mshtml/htmlstyle.c | 30 ++++++++++++++++++++++++++++-- 1 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index ea84ea6..3657033 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -77,6 +77,30 @@ static HRESULT set_style_attr(HTMLStyle *This, LPCWSTR name, LPCWSTR value) return S_OK; }
+static HRESULT get_style_attr(HTMLStyle *This, LPCWSTR name, BSTR *p) +{ + nsAString str_name, str_value; + const PRUnichar *value; + nsresult nsres; + + nsAString_Init(&str_name, name); + nsAString_Init(&str_value, NULL); + + nsres = nsIDOMCSSStyleDeclaration_GetPropertyValue(This->nsstyle, &str_name, &str_value); + if(NS_FAILED(nsres)) + ERR("SetProperty failed: %08x\n", nsres); + + nsAString_GetData(&str_value, &value, NULL); + *p = SysAllocString(value); + + nsAString_Finish(&str_name); + nsAString_Finish(&str_value); + + TRACE("%s -> %s\n", debugstr_w(name), debugstr_w(*p)); + + return S_OK; +} + #define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle, iface)
static HRESULT WINAPI HTMLStyle_QueryInterface(IHTMLStyle *iface, REFIID riid, void **ppv) @@ -175,8 +199,10 @@ static HRESULT WINAPI HTMLStyle_put_fontFamily(IHTMLStyle *iface, BSTR v) static HRESULT WINAPI HTMLStyle_get_fontFamily(IHTMLStyle *iface, BSTR *p) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_style_attr(This, attrFontFamily, p); }
static HRESULT WINAPI HTMLStyle_put_fontStyle(IHTMLStyle *iface, BSTR v)