mshtml: Don't use nsIDOMHTMLParamElement.

It will be removed in the next Gecko update anyway.
This commit is contained in:
Jacek Caban 2014-09-19 13:26:10 +02:00 committed by Alexandre Julliard
parent 8b4c120453
commit 2f849ce3c9
2 changed files with 11 additions and 31 deletions

View File

@ -2218,23 +2218,6 @@ interface nsIDOMHTMLObjectElement : nsIDOMHTMLElement
nsresult SetCustomValidity(const nsAString *error); nsresult SetCustomValidity(const nsAString *error);
} }
[
object,
uuid(f85e1b05-6dc4-442d-bea8-7cf551f9bc9f),
local
]
interface nsIDOMHTMLParamElement : nsIDOMHTMLElement
{
nsresult GetName(nsAString *aName);
nsresult SetName(const nsAString *aName);
nsresult GetType(nsAString *aType);
nsresult SetType(const nsAString *aType);
nsresult GetValue(nsAString *aValue);
nsresult SetValue(const nsAString *aValue);
nsresult GetValueType(nsAString *aValueType);
nsresult SetValueType(const nsAString *aValueType);
}
[ [
object, object,
uuid(e81273e1-d440-4dd3-9073-8199f7a9525e), uuid(e81273e1-d440-4dd3-9073-8199f7a9525e),

View File

@ -270,15 +270,18 @@ static const IPropertyBag2Vtbl PropertyBag2Vtbl = {
static HRESULT fill_props(nsIDOMHTMLElement *nselem, PropertyBag *prop_bag) static HRESULT fill_props(nsIDOMHTMLElement *nselem, PropertyBag *prop_bag)
{ {
nsIDOMHTMLParamElement *nsparam; const PRUnichar *name, *value;
nsAString name_str, value_str; nsAString name_str, value_str;
nsIDOMHTMLCollection *params; nsIDOMHTMLCollection *params;
nsIDOMHTMLElement *param_elem;
UINT32 length, i; UINT32 length, i;
nsIDOMNode *nsnode; nsIDOMNode *nsnode;
nsresult nsres; nsresult nsres;
HRESULT hres = S_OK; HRESULT hres = S_OK;
static const PRUnichar nameW[] = {'n','a','m','e',0};
static const PRUnichar paramW[] = {'p','a','r','a','m',0}; static const PRUnichar paramW[] = {'p','a','r','a','m',0};
static const PRUnichar valueW[] = {'v','a','l','u','e',0};
nsAString_InitDepend(&name_str, paramW); nsAString_InitDepend(&name_str, paramW);
nsres = nsIDOMHTMLElement_GetElementsByTagName(nselem, &name_str, &params); nsres = nsIDOMHTMLElement_GetElementsByTagName(nselem, &name_str, &params);
@ -297,31 +300,25 @@ static HRESULT fill_props(nsIDOMHTMLElement *nselem, PropertyBag *prop_bag)
break; break;
} }
nsres = nsIDOMNode_QueryInterface(nsnode, &IID_nsIDOMHTMLParamElement, (void**)&nsparam); nsres = nsIDOMNode_QueryInterface(nsnode, &IID_nsIDOMHTMLElement, (void**)&param_elem);
nsIDOMNode_Release(nsnode); nsIDOMNode_Release(nsnode);
if(NS_FAILED(nsres)) { if(NS_FAILED(nsres)) {
hres = E_FAIL; hres = E_FAIL;
break; break;
} }
nsAString_Init(&name_str, NULL); nsres = get_elem_attr_value(param_elem, nameW, &name_str, &name);
nsres = nsIDOMHTMLParamElement_GetName(nsparam, &name_str);
if(NS_SUCCEEDED(nsres)) { if(NS_SUCCEEDED(nsres)) {
nsAString_Init(&value_str, NULL); nsres = get_elem_attr_value(param_elem, valueW, &value_str, &value);
nsres = nsIDOMHTMLParamElement_GetValue(nsparam, &value_str);
if(NS_SUCCEEDED(nsres)) { if(NS_SUCCEEDED(nsres)) {
const PRUnichar *name, *value;
nsAString_GetData(&name_str, &name);
nsAString_GetData(&value_str, &value);
hres = add_prop(prop_bag, name, value); hres = add_prop(prop_bag, name, value);
nsAString_Finish(&value_str);
} }
nsAString_Finish(&value_str);
nsAString_Finish(&name_str);
} }
nsAString_Finish(&name_str); nsIDOMHTMLElement_Release(param_elem);
nsIDOMHTMLParamElement_Release(nsparam);
if(FAILED(hres)) if(FAILED(hres))
break; break;
if(NS_FAILED(nsres)) { if(NS_FAILED(nsres)) {