mshtml: Move style zoom property implementation to IHTMLCSSStyleDeclaration.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
153f666b64
commit
15db389d4b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue