From e0631980467d5ed639d64c90e21faef564d1e924 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 15 Jul 2011 15:37:56 +0200 Subject: [PATCH] mshtml: Pass flags to get_nsstyle_attr. --- dlls/mshtml/htmlcurstyle.c | 42 +++++++++++++++++++------------------- dlls/mshtml/htmlstyle.c | 6 +++--- dlls/mshtml/htmlstyle.h | 2 +- dlls/mshtml/htmlstyle2.c | 2 +- dlls/mshtml/htmlstyle3.c | 2 +- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index ff8e0759685..a4a716335e1 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -134,7 +134,7 @@ static HRESULT WINAPI HTMLCurrentStyle_get_position(IHTMLCurrentStyle *iface, BS TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_POSITION, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_POSITION, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle *iface, BSTR *p) @@ -164,21 +164,21 @@ static HRESULT WINAPI HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle *iface, TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_FAMILY, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_FAMILY, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle *iface, BSTR *p) { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_STYLE, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_STYLE, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle *iface, BSTR *p) { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_VARIANT, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_VARIANT, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle *iface, VARIANT *p) @@ -199,7 +199,7 @@ static HRESULT WINAPI HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle *if { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_IMAGE, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_IMAGE, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle *iface, VARIANT *p) @@ -220,7 +220,7 @@ static HRESULT WINAPI HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle *i { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_REPEAT, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_REPEAT, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle *iface, VARIANT *p) @@ -255,28 +255,28 @@ static HRESULT WINAPI HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle *ifa { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_TOP_STYLE, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_TOP_STYLE, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle *iface, BSTR *p) { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_RIGHT_STYLE, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_RIGHT_STYLE, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle *iface, BSTR *p) { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_BOTTOM_STYLE, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_BOTTOM_STYLE, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle *iface, BSTR *p) { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_LEFT_STYLE, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_LEFT_STYLE, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle *iface, VARIANT *p) @@ -367,14 +367,14 @@ static HRESULT WINAPI HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle *iface, B { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_ALIGN, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_ALIGN, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle *iface, BSTR *p) { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_DECORATION, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_DECORATION, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_display(IHTMLCurrentStyle *iface, BSTR *p) @@ -383,7 +383,7 @@ static HRESULT WINAPI HTMLCurrentStyle_get_display(IHTMLCurrentStyle *iface, BST TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_DISPLAY, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_DISPLAY, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface, BSTR *p) @@ -392,7 +392,7 @@ static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface, TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_VISIBILITY, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_VISIBILITY, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle *iface, VARIANT *p) @@ -525,7 +525,7 @@ static HRESULT WINAPI HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle *iface, BS { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle *iface, BSTR *p) @@ -546,7 +546,7 @@ static HRESULT WINAPI HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle *iface, BSTR { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_CURSOR, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_CURSOR, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle *iface, BSTR *p) @@ -715,35 +715,35 @@ static HRESULT WINAPI HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle *iface, { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_STYLE, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_STYLE, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle *iface, BSTR *p) { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_COLOR, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_COLOR, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle *iface, BSTR *p) { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_WIDTH, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_WIDTH, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_padding(IHTMLCurrentStyle *iface, BSTR *p) { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_PADDING, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_PADDING, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_margin(IHTMLCurrentStyle *iface, BSTR *p) { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_MARGIN, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_MARGIN, p, 0); } static HRESULT WINAPI HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle *iface, BSTR *p) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index ff12bdd1759..b9a18c793d9 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -424,7 +424,7 @@ static HRESULT nsstyle_to_bstr(const WCHAR *val, DWORD flags, BSTR *p) return S_OK; } -HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR *p) +HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR *p, DWORD flags) { nsAString str_value; const PRUnichar *value; @@ -435,7 +435,7 @@ HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR get_nsstyle_attr_nsval(nsstyle, sid, &str_value); nsAString_GetData(&str_value, &value); - hres = nsstyle_to_bstr(value, 0, p); + hres = nsstyle_to_bstr(value, flags, p); nsAString_Finish(&str_value); TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_w(*p)); @@ -493,7 +493,7 @@ HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, static inline HRESULT get_style_attr(HTMLStyle *This, styleid_t sid, BSTR *p) { - return get_nsstyle_attr(This->nsstyle, sid, p); + return get_nsstyle_attr(This->nsstyle, sid, p, 0); } static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR exval, VARIANT_BOOL *p) diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index c1606e08cb9..f4f36a183d9 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -101,7 +101,7 @@ typedef enum { void HTMLStyle2_Init(HTMLStyle*) DECLSPEC_HIDDEN; void HTMLStyle3_Init(HTMLStyle*) DECLSPEC_HIDDEN; -HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,BSTR*) DECLSPEC_HIDDEN; +HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,BSTR*,DWORD) DECLSPEC_HIDDEN; HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,LPCWSTR,DWORD) DECLSPEC_HIDDEN; HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *value, DWORD flags) DECLSPEC_HIDDEN; diff --git a/dlls/mshtml/htmlstyle2.c b/dlls/mshtml/htmlstyle2.c index bc9e5b14e15..db445817173 100644 --- a/dlls/mshtml/htmlstyle2.c +++ b/dlls/mshtml/htmlstyle2.c @@ -182,7 +182,7 @@ static HRESULT WINAPI HTMLStyle2_get_position(IHTMLStyle2 *iface, BSTR *p) TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_POSITION, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_POSITION, p, 0); } static HRESULT WINAPI HTMLStyle2_put_unicodeBidi(IHTMLStyle2 *iface, BSTR v) diff --git a/dlls/mshtml/htmlstyle3.c b/dlls/mshtml/htmlstyle3.c index a946cb0d205..f95cbd7b787 100644 --- a/dlls/mshtml/htmlstyle3.c +++ b/dlls/mshtml/htmlstyle3.c @@ -141,7 +141,7 @@ static HRESULT WINAPI HTMLStyle3_get_wordWrap(IHTMLStyle3 *iface, BSTR *p) TRACE("(%p)->(%p)\n", This, p); - return get_nsstyle_attr(This->nsstyle, STYLEID_WORD_WRAP, p); + return get_nsstyle_attr(This->nsstyle, STYLEID_WORD_WRAP, p, 0); } static HRESULT WINAPI HTMLStyle3_put_textUnderlinePosition(IHTMLStyle3 *iface, BSTR v)