mshtml: Copy filter value in HTMLElement_clone.
This commit is contained in:
parent
120962b30e
commit
d66dacce68
|
@ -269,7 +269,7 @@ static HRESULT WINAPI HTMLElement_setAttribute(IHTMLElement *iface, BSTR strAttr
|
|||
DISPPARAMS dispParams;
|
||||
EXCEPINFO excep;
|
||||
|
||||
TRACE("(%p)->(%s . %08x)\n", This, debugstr_w(strAttributeName), lFlags);
|
||||
TRACE("(%p)->(%s %s %08x)\n", This, debugstr_w(strAttributeName), debugstr_variant(&AttributeValue), lFlags);
|
||||
|
||||
hres = IDispatchEx_GetDispID(&This->node.dispex.IDispatchEx_iface, strAttributeName,
|
||||
fdexNameCaseInsensitive | fdexNameEnsure, &dispid);
|
||||
|
@ -1627,6 +1627,14 @@ HRESULT HTMLElement_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HTMLDOMNode **
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
if(This->filter) {
|
||||
new_elem->filter = heap_strdupW(This->filter);
|
||||
if(!new_elem->filter) {
|
||||
IHTMLElement_Release(&This->IHTMLElement_iface);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
IHTMLElement_AddRef(&new_elem->IHTMLElement_iface);
|
||||
*ret = &new_elem->node;
|
||||
return S_OK;
|
||||
|
|
|
@ -80,6 +80,17 @@ function test_remove_style_attribute() {
|
|||
ok(b === false, "removeAttribute returned " + b + " expected false");
|
||||
}
|
||||
|
||||
function test_clone_node() {
|
||||
var elem, cloned;
|
||||
|
||||
elem = document.getElementById("divid");
|
||||
elem.style.filter = "alpha(opacity=50)";
|
||||
ok(elem.style.filter === "alpha(opacity=50)", "elem.style.filter = " + elem.style.filter);
|
||||
|
||||
cloned = elem.cloneNode(true);
|
||||
ok(cloned.style.filter === "alpha(opacity=50)", "cloned.style.filter = " + cloned.style.filter);
|
||||
}
|
||||
|
||||
var globalVar = false;
|
||||
|
||||
function runTest() {
|
||||
|
@ -91,6 +102,7 @@ function runTest() {
|
|||
test_removeAttribute(document.getElementById("divid"));
|
||||
test_removeAttribute(document.body);
|
||||
test_select_index();
|
||||
test_clone_node();
|
||||
test_createDocumentFragment();
|
||||
test_document_name_as_index();
|
||||
test_remove_style_attribute();
|
||||
|
|
Loading…
Reference in New Issue