Jacek Caban : mshtml: Move style zoom property implementation to IHTMLCSSStyleDeclaration.
Alexandre Julliard
julliard at winehq.org
Mon Mar 25 16:54:57 CDT 2019
Module: wine
Branch: master
Commit: 15db389d4b0b8829132d42954515dfa50e3e6d66
URL: https://source.winehq.org/git/wine.git/?a=commit;h=15db389d4b0b8829132d42954515dfa50e3e6d66
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Mar 25 15:14:25 2019 +0100
mshtml: Move style zoom property implementation to IHTMLCSSStyleDeclaration.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mshtml/htmlstyle.c | 60 ++++++++++++++++++++++++++-----------------------
1 file changed, 32 insertions(+), 28 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 7d807eb..d4dfa7f 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -4193,46 +4193,22 @@ static HRESULT WINAPI HTMLStyle3_get_layoutFlow(IHTMLStyle3 *iface, BSTR *p)
return E_NOTIMPL;
}
-static const WCHAR zoomW[] = {'z','o','o','m',0};
-
static HRESULT WINAPI HTMLStyle3_put_zoom(IHTMLStyle3 *iface, VARIANT v)
{
HTMLStyle *This = impl_from_IHTMLStyle3(iface);
- VARIANT *var;
- HRESULT hres;
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- /* zoom property is IE CSS extension that is mostly used as a hack to workaround IE bugs.
- * The value is set to 1 then. We can safely ignore setting zoom to 1. */
- if(V_VT(&v) != VT_I4 || V_I4(&v) != 1)
- WARN("stub for %s\n", debugstr_variant(&v));
-
- hres = dispex_get_dprop_ref(&This->css_style.dispex, zoomW, TRUE, &var);
- if(FAILED(hres))
- return hres;
-
- return VariantChangeType(var, &v, 0, VT_BSTR);
+ return IHTMLCSSStyleDeclaration_put_zoom(&This->IHTMLCSSStyleDeclaration_iface, v);
}
static HRESULT WINAPI HTMLStyle3_get_zoom(IHTMLStyle3 *iface, VARIANT *p)
{
HTMLStyle *This = impl_from_IHTMLStyle3(iface);
- VARIANT *var;
- HRESULT hres;
TRACE("(%p)->(%p)\n", This, p);
- hres = dispex_get_dprop_ref(&This->css_style.dispex, zoomW, FALSE, &var);
- if(hres == DISP_E_UNKNOWNNAME) {
- V_VT(p) = VT_BSTR;
- V_BSTR(p) = NULL;
- return S_OK;
- }
- if(FAILED(hres))
- return hres;
-
- return VariantCopy(p, var);
+ return IHTMLCSSStyleDeclaration_get_zoom(&This->IHTMLCSSStyleDeclaration_iface, p);
}
static HRESULT WINAPI HTMLStyle3_put_wordWrap(IHTMLStyle3 *iface, BSTR v)
@@ -6674,18 +6650,46 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration_get_layoutFlow(IHTMLCSSStyleDeclar
return E_NOTIMPL;
}
+static const WCHAR zoomW[] = {'z','o','o','m',0};
+
static HRESULT WINAPI HTMLCSSStyleDeclaration_put_zoom(IHTMLCSSStyleDeclaration *iface, VARIANT v)
{
HTMLStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface);
+ VARIANT *var;
+ HRESULT hres;
+
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
- return IHTMLStyle3_put_zoom(&This->IHTMLStyle3_iface, v);
+
+ /* zoom property is IE CSS extension that is mostly used as a hack to workaround IE bugs.
+ * The value is set to 1 then. We can safely ignore setting zoom to 1. */
+ if(V_VT(&v) != VT_I4 || V_I4(&v) != 1)
+ WARN("stub for %s\n", debugstr_variant(&v));
+
+ hres = dispex_get_dprop_ref(&This->css_style.dispex, zoomW, TRUE, &var);
+ if(FAILED(hres))
+ return hres;
+
+ return VariantChangeType(var, &v, 0, VT_BSTR);
}
static HRESULT WINAPI HTMLCSSStyleDeclaration_get_zoom(IHTMLCSSStyleDeclaration *iface, VARIANT *p)
{
HTMLStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface);
+ VARIANT *var;
+ HRESULT hres;
+
TRACE("(%p)->(%p)\n", This, p);
- return IHTMLStyle3_get_zoom(&This->IHTMLStyle3_iface, p);
+
+ hres = dispex_get_dprop_ref(&This->css_style.dispex, zoomW, FALSE, &var);
+ if(hres == DISP_E_UNKNOWNNAME) {
+ V_VT(p) = VT_BSTR;
+ V_BSTR(p) = NULL;
+ return S_OK;
+ }
+ if(FAILED(hres))
+ return hres;
+
+ return VariantCopy(p, var);
}
static HRESULT WINAPI HTMLCSSStyleDeclaration_put_wordWrap(IHTMLCSSStyleDeclaration *iface, BSTR v)
More information about the wine-cvs
mailing list