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

mshtml: Implement IHTMLElement6::msMatchesSelector.

parent 6e34275f
......@@ -4514,8 +4514,27 @@ static HRESULT WINAPI HTMLElement6_getElementsByClassName(IHTMLElement6 *iface,
static HRESULT WINAPI HTMLElement6_msMatchesSelector(IHTMLElement6 *iface, BSTR v, VARIANT_BOOL *pfMatches)
{
HTMLElement *This = impl_from_IHTMLElement6(iface);
FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), pfMatches);
return E_NOTIMPL;
nsAString nsstr;
cpp_bool b;
nsresult nsres;
TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pfMatches);
if(!This->dom_element) {
FIXME("No dom element\n");
return E_UNEXPECTED;
}
nsAString_InitDepend(&nsstr, v);
nsres = nsIDOMElement_MozMatchesSelector(This->dom_element, &nsstr, &b);
nsAString_Finish(&nsstr);
if(NS_FAILED(nsres)) {
WARN("MozMatchesSelector failed: %08x\n", nsres);
return map_nsresult(nsres);
}
*pfMatches = b;
return S_OK;
}
static HRESULT WINAPI HTMLElement6_put_onabort(IHTMLElement6 *iface, VARIANT v)
......
......@@ -207,6 +207,8 @@ function test_query_selector() {
ok(e.tagName === "DIV", "e.tagName = " + e.tagName);
e = document.body.querySelector(".class1");
ok(e.tagName === "DIV", "e.tagName = " + e.tagName);
ok(e.msMatchesSelector(".class1") === true, "msMatchesSelector returned " + e.msMatchesSelector(".class1"));
ok(e.msMatchesSelector(".class2") === false, "msMatchesSelector returned " + e.msMatchesSelector(".class2"));
e = document.querySelector("a");
ok(e.tagName === "A", "e.tagName = " + e.tagName);
......
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