Commit d66dacce authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Copy filter value in HTMLElement_clone.

parent 120962b3
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment