mshtml: Use Gecko attributes for non-HTML elements IHTMLElement::title implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ec20f767fb
commit
83fc6f0ee3
|
@ -1318,7 +1318,7 @@ static HRESULT WINAPI HTMLElement_put_title(IHTMLElement *iface, BSTR v)
|
||||||
|
|
||||||
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
||||||
|
|
||||||
if(!This->html_element) {
|
if(!This->dom_element) {
|
||||||
VARIANT *var;
|
VARIANT *var;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
|
@ -1332,6 +1332,9 @@ static HRESULT WINAPI HTMLElement_put_title(IHTMLElement *iface, BSTR v)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!This->html_element)
|
||||||
|
return elem_string_attr_setter(This, L"title", v);
|
||||||
|
|
||||||
nsAString_InitDepend(&title_str, v);
|
nsAString_InitDepend(&title_str, v);
|
||||||
nsres = nsIDOMHTMLElement_SetTitle(This->html_element, &title_str);
|
nsres = nsIDOMHTMLElement_SetTitle(This->html_element, &title_str);
|
||||||
nsAString_Finish(&title_str);
|
nsAString_Finish(&title_str);
|
||||||
|
@ -1349,7 +1352,7 @@ static HRESULT WINAPI HTMLElement_get_title(IHTMLElement *iface, BSTR *p)
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
if(!This->html_element) {
|
if(!This->dom_element) {
|
||||||
VARIANT *var;
|
VARIANT *var;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
|
@ -1366,6 +1369,9 @@ static HRESULT WINAPI HTMLElement_get_title(IHTMLElement *iface, BSTR *p)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!This->html_element)
|
||||||
|
return elem_string_attr_getter(This, L"title", FALSE, p);
|
||||||
|
|
||||||
nsAString_Init(&title_str, NULL);
|
nsAString_Init(&title_str, NULL);
|
||||||
nsres = nsIDOMHTMLElement_GetTitle(This->html_element, &title_str);
|
nsres = nsIDOMHTMLElement_GetTitle(This->html_element, &title_str);
|
||||||
return return_nsstr(nsres, &title_str, p);
|
return return_nsstr(nsres, &title_str, p);
|
||||||
|
|
|
@ -34,6 +34,7 @@ sync_test("elem_props", function() {
|
||||||
test_exposed("doScroll", v < 11);
|
test_exposed("doScroll", v < 11);
|
||||||
test_exposed("readyState", v < 11);
|
test_exposed("readyState", v < 11);
|
||||||
test_exposed("clientTop", true);
|
test_exposed("clientTop", true);
|
||||||
|
test_exposed("title", true);
|
||||||
test_exposed("querySelectorAll", v >= 8);
|
test_exposed("querySelectorAll", v >= 8);
|
||||||
test_exposed("textContent", v >= 9);
|
test_exposed("textContent", v >= 9);
|
||||||
test_exposed("prefix", v >= 9);
|
test_exposed("prefix", v >= 9);
|
||||||
|
|
|
@ -458,3 +458,13 @@ async_test("animation_frame", function() {
|
||||||
});
|
});
|
||||||
ok(typeof(id) === "number", "id = " + id);
|
ok(typeof(id) === "number", "id = " + id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
sync_test("title", function() {
|
||||||
|
var elem = document.createElement("div");
|
||||||
|
ok(elem.title === "", "div.title = " + elem.title);
|
||||||
|
todo_wine.
|
||||||
|
ok(elem.getAttribute("title") === null, "title attribute = " + elem.getAttribute("title"));
|
||||||
|
elem.title = "test";
|
||||||
|
ok(elem.title === "test", "div.title = " + elem.title);
|
||||||
|
ok(elem.getAttribute("title") === "test", "title attribute = " + elem.getAttribute("title"));
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue