mshtml: Use variant_to_nsstr in IHTMLDOMNode3::put_textContent.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2019-04-19 16:37:23 +02:00 committed by Alexandre Julliard
parent 1593364466
commit d538e86a60
2 changed files with 6 additions and 6 deletions

View File

@ -1245,12 +1245,7 @@ static HRESULT WINAPI HTMLDOMNode3_put_textContent(IHTMLDOMNode3 *iface, VARIANT
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
if(V_VT(&v) != VT_BSTR) {
FIXME("unsupported argument %s\n", debugstr_variant(&v));
return E_NOTIMPL;
}
nsAString_Init(&nsstr, V_BSTR(&v));
variant_to_nsstr(&v, FALSE, &nsstr);
nsres = nsIDOMNode_SetTextContent(This->nsnode, &nsstr);
nsAString_Finish(&nsstr);
if(NS_FAILED(nsres)) {

View File

@ -77,6 +77,11 @@ function test_textContent() {
ok(div.textContent === "", "div.textContent = " + div.textContent);
ok(div.childNodes.length === 0, "div.childNodes.length = " + div.childNodes.length);
div.textContent = null;
ok(div.textContent === "", "div.textContent = " + div.textContent);
div.textContent = 11;
ok(div.textContent === "11", "div.textContent = " + div.textContent);
ok(document.textContent === null, "document.textContent = " + document.textContent);
next_test();