From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- include/mshtml.idl | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
diff --git a/include/mshtml.idl b/include/mshtml.idl index 9f168202d3c..68e49a0f012 100644 --- a/include/mshtml.idl +++ b/include/mshtml.idl @@ -8408,6 +8408,36 @@ interface IHTMLDOMAttribute2 : IDispatch [retval, out] IHTMLDOMAttribute **clonedNode); }
+/***************************************************************************** + * IHTMLDOMAttribute3 interface + */ +[ + odl, + oleautomation, + dual, + uuid(30510468-98b5-11cf-bb82-00aa00bdce0b) +] +interface IHTMLDOMAttribute3 : IDispatch +{ + [propput, id(DISPID_IHTMLDOMATTRIBUTE3_IE8_NODEVALUE)] + HRESULT nodeValue([in] VARIANT v); + + [propget, id(DISPID_IHTMLDOMATTRIBUTE3_IE8_NODEVALUE)] + HRESULT nodeValue([retval, out] VARIANT *p); + + [propput, id(DISPID_IHTMLDOMATTRIBUTE3_IE8_VALUE)] + HRESULT value([in] BSTR v); + + [propget, id(DISPID_IHTMLDOMATTRIBUTE3_IE8_VALUE)] + HRESULT value([retval, out] BSTR *p); + + [propget, id(DISPID_IHTMLDOMATTRIBUTE3_IE8_SPECIFIED)] + HRESULT specified([retval, out] VARIANT_BOOL *p); + + [propget, id(DISPID_IHTMLDOMATTRIBUTE3_OWNERELEMENT)] + HRESULT ownerElement([retval, out] IHTMLElement2 **p); +} + /***************************************************************************** * IHTMLDOMTextNode interface */
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlattr.c | 87 +++++++++++++++++++++++++++++++ dlls/mshtml/mshtml_private.h | 2 + dlls/mshtml/tests/documentmode.js | 53 +++++++++++++++++++ dlls/mshtml/tests/dom.c | 1 + 4 files changed, 143 insertions(+)
diff --git a/dlls/mshtml/htmlattr.c b/dlls/mshtml/htmlattr.c index d1e8a8e71bb..77d90837ef9 100644 --- a/dlls/mshtml/htmlattr.c +++ b/dlls/mshtml/htmlattr.c @@ -409,6 +409,83 @@ static const IHTMLDOMAttribute2Vtbl HTMLDOMAttribute2Vtbl = { HTMLDOMAttribute2_cloneNode };
+static inline HTMLDOMAttribute *impl_from_IHTMLDOMAttribute3(IHTMLDOMAttribute3 *iface) +{ + return CONTAINING_RECORD(iface, HTMLDOMAttribute, IHTMLDOMAttribute3_iface); +} + +DISPEX_IDISPATCH_IMPL(HTMLDOMAttribute3, IHTMLDOMAttribute3, impl_from_IHTMLDOMAttribute3(iface)->dispex) + +static HRESULT WINAPI HTMLDOMAttribute3_put_nodeValue(IHTMLDOMAttribute3 *iface, VARIANT v) +{ + HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute3(iface); + + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + + return HTMLDOMAttribute_put_nodeValue(&This->IHTMLDOMAttribute_iface, v); +} + +static HRESULT WINAPI HTMLDOMAttribute3_get_nodeValue(IHTMLDOMAttribute3 *iface, VARIANT *p) +{ + HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute3(iface); + + TRACE("(%p)->(%p)\n", This, p); + + return HTMLDOMAttribute_get_nodeValue(&This->IHTMLDOMAttribute_iface, p); +} + +static HRESULT WINAPI HTMLDOMAttribute3_put_value(IHTMLDOMAttribute3 *iface, BSTR v) +{ + HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute3(iface); + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + return HTMLDOMAttribute2_put_value(&This->IHTMLDOMAttribute2_iface, v); +} + +static HRESULT WINAPI HTMLDOMAttribute3_get_value(IHTMLDOMAttribute3 *iface, BSTR *p) +{ + HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute3(iface); + + TRACE("(%p)->(%p)\n", This, p); + + return HTMLDOMAttribute2_get_value(&This->IHTMLDOMAttribute2_iface, p); +} + +static HRESULT WINAPI HTMLDOMAttribute3_get_specified(IHTMLDOMAttribute3 *iface, VARIANT_BOOL *p) +{ + HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute3(iface); + + TRACE("(%p)->(%p)\n", This, p); + + return HTMLDOMAttribute_get_specified(&This->IHTMLDOMAttribute_iface, p); +} + +static HRESULT WINAPI HTMLDOMAttribute3_get_ownerElement(IHTMLDOMAttribute3 *iface, IHTMLElement2 **p) +{ + HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute3(iface); + + FIXME("(%p)->(%p)\n", This, p); + + return E_NOTIMPL; +} + +static const IHTMLDOMAttribute3Vtbl HTMLDOMAttribute3Vtbl = { + HTMLDOMAttribute3_QueryInterface, + HTMLDOMAttribute3_AddRef, + HTMLDOMAttribute3_Release, + HTMLDOMAttribute3_GetTypeInfoCount, + HTMLDOMAttribute3_GetTypeInfo, + HTMLDOMAttribute3_GetIDsOfNames, + HTMLDOMAttribute3_Invoke, + HTMLDOMAttribute3_put_nodeValue, + HTMLDOMAttribute3_get_nodeValue, + HTMLDOMAttribute3_put_value, + HTMLDOMAttribute3_get_value, + HTMLDOMAttribute3_get_specified, + HTMLDOMAttribute3_get_ownerElement +}; + static inline HTMLDOMAttribute *impl_from_DispatchEx(DispatchEx *iface) { return CONTAINING_RECORD(iface, HTMLDOMAttribute, dispex); @@ -422,6 +499,8 @@ static void *HTMLDOMAttribute_query_interface(DispatchEx *dispex, REFIID riid) return &This->IHTMLDOMAttribute_iface; if(IsEqualGUID(&IID_IHTMLDOMAttribute2, riid)) return &This->IHTMLDOMAttribute2_iface; + if(IsEqualGUID(&IID_IHTMLDOMAttribute3, riid)) + return &This->IHTMLDOMAttribute3_iface;
return NULL; } @@ -469,6 +548,12 @@ static const dispex_static_data_vtbl_t HTMLDOMAttribute_dispex_vtbl = { .unlink = HTMLDOMAttribute_unlink };
+static void HTMLDOMAttribute_init_dispex_info(dispex_data_t *info, compat_mode_t mode) +{ + if(mode >= COMPAT_MODE_IE8) + dispex_info_add_interface(info, IHTMLDOMAttribute3_tid, NULL); +} + static const tid_t HTMLDOMAttribute_iface_tids[] = { IHTMLDOMAttribute_tid, IHTMLDOMAttribute2_tid, @@ -480,6 +565,7 @@ dispex_static_data_t Attr_dispex = { .vtbl = &HTMLDOMAttribute_dispex_vtbl, .disp_tid = DispHTMLDOMAttribute_tid, .iface_tids = HTMLDOMAttribute_iface_tids, + .init_info = HTMLDOMAttribute_init_dispex_info, };
HTMLDOMAttribute *unsafe_impl_from_IHTMLDOMAttribute(IHTMLDOMAttribute *iface) @@ -500,6 +586,7 @@ HRESULT HTMLDOMAttribute_Create(const WCHAR *name, HTMLElement *elem, DISPID dis
ret->IHTMLDOMAttribute_iface.lpVtbl = &HTMLDOMAttributeVtbl; ret->IHTMLDOMAttribute2_iface.lpVtbl = &HTMLDOMAttribute2Vtbl; + ret->IHTMLDOMAttribute3_iface.lpVtbl = &HTMLDOMAttribute3Vtbl; ret->dispid = dispid; ret->elem = elem;
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 4bee0a26607..4c055325575 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -201,6 +201,7 @@ struct constructor; XIID(IHTMLDocument7) \ XIID(IHTMLDOMAttribute) \ XIID(IHTMLDOMAttribute2) \ + XIID(IHTMLDOMAttribute3) \ XIID(IHTMLDOMChildrenCollection) \ XIID(IHTMLDOMImplementation) \ XIID(IHTMLDOMImplementation2) \ @@ -1334,6 +1335,7 @@ typedef struct { DispatchEx dispex; IHTMLDOMAttribute IHTMLDOMAttribute_iface; IHTMLDOMAttribute2 IHTMLDOMAttribute2_iface; + IHTMLDOMAttribute3 IHTMLDOMAttribute3_iface;
/* value is valid only for detached attributes (when elem == NULL). */ VARIANT value; diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index d41f82647f0..c2847ce7643 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -575,6 +575,59 @@ sync_test("elem_props", function() { test_exposed("fileSize", v < 11); });
+sync_test("attr_props", function() { + var v = document.documentMode, elem = document.createElement("div"), attr; + + /* FIXME: Wine's IE9+ attributes don't sync with our attribute node implementation which is based on legacy attrs */ + if(!broken(true)) + attr = elem.attributes[0]; + else { + elem.setAttribute("id", "test"); + attr = elem.getAttributeNode("id"); + } + + function test_exposed(prop, expect) { + if(expect) + ok(prop in attr, prop + " not found in attribute."); + else + ok(!(prop in attr), prop + " found in attribute."); + } + + test_exposed("appendChild", true); + test_exposed("attributes", true); + test_exposed("childNodes", true); + test_exposed("cloneNode", true); + test_exposed("compareDocumentPosition", v >= 9); + test_exposed("expando", true); + test_exposed("firstChild", true); + test_exposed("hasChildNodes", true); + test_exposed("insertBefore", true); + test_exposed("isDefaultNamespace", v >= 9); + test_exposed("isEqualNode", v >= 9); + test_exposed("isSameNode", v >= 9); + test_exposed("isSupported", v >= 9); + test_exposed("lastChild", true); + test_exposed("localName", v >= 9); + test_exposed("lookupNamespaceURI", v >= 9); + test_exposed("lookupPrefix", v >= 9); + test_exposed("name", true); + test_exposed("namespaceURI", v >= 9); + test_exposed("nextSibling", true); + test_exposed("nodeName", true); + test_exposed("nodeType", true); + test_exposed("nodeValue", true); + test_exposed("ownerDocument", true); + test_exposed("ownerElement", v >= 8); + test_exposed("parentNode", true); + test_exposed("prefix", v >= 9); + test_exposed("previousSibling", true); + test_exposed("removeChild", true); + test_exposed("replaceChild", true); + test_exposed("specified", true); + test_exposed("textContent", v >= 9); + test_exposed("value", true); +}); + sync_test("doc_props", function() { function test_exposed(prop, expect, is_todo) { var ok_ = is_todo ? todo_wine.ok : ok; diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index dd987350e72..b1625b619ca 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -319,6 +319,7 @@ static const IID * const text_iids[] = { static const IID * const attr_iids[] = { &IID_IHTMLDOMAttribute, &IID_IHTMLDOMAttribute2, + &IID_IHTMLDOMAttribute3, &IID_IDispatchEx, NULL };
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlattr.c | 11 +++++++++-- dlls/mshtml/tests/dom.js | 13 +++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlattr.c b/dlls/mshtml/htmlattr.c index 77d90837ef9..64e57718174 100644 --- a/dlls/mshtml/htmlattr.c +++ b/dlls/mshtml/htmlattr.c @@ -465,9 +465,16 @@ static HRESULT WINAPI HTMLDOMAttribute3_get_ownerElement(IHTMLDOMAttribute3 *ifa { HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute3(iface);
- FIXME("(%p)->(%p)\n", This, p); + TRACE("(%p)->(%p)\n", This, p); + + if(!This->elem) { + *p = NULL; + return S_OK; + }
- return E_NOTIMPL; + *p = &This->elem->IHTMLElement2_iface; + IHTMLElement2_AddRef(*p); + return S_OK; }
static const IHTMLDOMAttribute3Vtbl HTMLDOMAttribute3Vtbl = { diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js index 300e22cd684..46dc239c3eb 100644 --- a/dlls/mshtml/tests/dom.js +++ b/dlls/mshtml/tests/dom.js @@ -1020,3 +1020,16 @@ sync_test("importNode", function() { ok(node2.hasChildNodes() === false, "node2 has child nodes"); ok(node2.parentNode === null, "node2.parentNode = " + node2.parentNode); }); + +sync_test("attributeNode", function() { + document.body.innerHTML = '<div id="test" attr="wine"></div>'; + var elem = document.getElementById("test"); + var attr = elem.attributes[0]; + + ok(attr.ownerDocument === document, "ownerDocument = " + attr.ownerDocument); + ok(attr.ownerElement === elem, "ownerElement = " + attr.ownerElement); + + attr = document.createAttribute("id"); + ok(attr.ownerDocument === document, "detached attr ownerDocument = " + attr.ownerDocument); + ok(attr.ownerElement === null, "detached attr ownerElement = " + attr.ownerElement); +});
From: Gabriel Ivăncescu gabrielopcode@gmail.com
And simplify attribute nodes' `specified` prop with it.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com ---
This will also be useful later. --- dlls/mshtml/dispex.c | 11 +++++++++++ dlls/mshtml/htmlattr.c | 9 +-------- dlls/mshtml/mshtml_private.h | 1 + 3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 024d7c8fee4..695cdaad0e2 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -2489,6 +2489,17 @@ HRESULT dispex_prop_name(DispatchEx *dispex, DISPID id, BSTR *ret) return *ret ? S_OK : E_OUTOFMEMORY; }
+const WCHAR *dispex_builtin_prop_name(DispatchEx *dispex, DISPID id) +{ + func_info_t *func; + HRESULT hres; + + hres = get_builtin_func(dispex->info, id, &func); + assert(SUCCEEDED(hres)); + + return func->name; +} + static HRESULT WINAPI DispatchEx_GetMemberName(IWineJSDispatchHost *iface, DISPID id, BSTR *pbstrName) { DispatchEx *This = impl_from_IWineJSDispatchHost(iface); diff --git a/dlls/mshtml/htmlattr.c b/dlls/mshtml/htmlattr.c index 64e57718174..1a95c1b482e 100644 --- a/dlls/mshtml/htmlattr.c +++ b/dlls/mshtml/htmlattr.c @@ -89,9 +89,7 @@ static HRESULT WINAPI HTMLDOMAttribute_get_specified(IHTMLDOMAttribute *iface, V HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface); nsIDOMAttr *nsattr; nsAString nsname; - BSTR name; nsresult nsres; - HRESULT hres;
TRACE("(%p)->(%p)\n", This, p);
@@ -105,15 +103,10 @@ static HRESULT WINAPI HTMLDOMAttribute_get_specified(IHTMLDOMAttribute *iface, V return S_OK; }
- hres = dispex_prop_name(&This->elem->node.event_target.dispex, This->dispid, &name); - if(FAILED(hres)) - return hres; - /* FIXME: This is not exactly right, we have some attributes that don't map directly to Gecko attributes. */ - nsAString_InitDepend(&nsname, name); + nsAString_InitDepend(&nsname, dispex_builtin_prop_name(&This->elem->node.event_target.dispex, This->dispid)); nsres = nsIDOMElement_GetAttributeNode(This->elem->dom_element, &nsname, &nsattr); nsAString_Finish(&nsname); - SysFreeString(name); if(NS_FAILED(nsres)) return E_FAIL;
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 4c055325575..4319c8b4725 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -648,6 +648,7 @@ HRESULT dispex_next_id(DispatchEx *dispex, DISPID id, BOOL enum_all_own_props, D HRESULT dispex_prop_name(DispatchEx *dispex, DISPID id, BSTR *ret); HRESULT dispex_define_property(DispatchEx *dispex, const WCHAR *name, DWORD flags, VARIANT *v, DISPID *id); HRESULT dispex_index_prop_desc(DispatchEx*,DISPID,struct property_info*); +const WCHAR *dispex_builtin_prop_name(DispatchEx *dispex, DISPID id); IWineJSDispatchHost *dispex_outer_iface(DispatchEx *dispex); HRESULT get_constructor(HTMLInnerWindow *script_global, object_id_t id, DispatchEx **ret); HRESULT get_prototype(HTMLInnerWindow *script_global, object_id_t id, DispatchEx **ret);
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlelem.c | 47 +++++++++++++----------------------------- 1 file changed, 14 insertions(+), 33 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 89fa136ddd2..16de05c2e77 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -7729,28 +7729,29 @@ static inline HRESULT get_attr_dispid_by_name(HTMLAttributeCollection *This, con return dispex_get_id(&This->elem->node.event_target.dispex, name, fdexNameCaseInsensitive, id); }
-static inline HRESULT get_domattr(HTMLAttributeCollection *This, DISPID id, LONG *list_pos, HTMLDOMAttribute **attr) +static inline HRESULT get_domattr(HTMLAttributeCollection *This, DISPID id, LONG *list_pos, IHTMLDOMAttribute **ret) { - HTMLDOMAttribute *iter; + HTMLDOMAttribute *attr, *iter; LONG pos = 0; HRESULT hres;
- *attr = NULL; + attr = NULL; LIST_FOR_EACH_ENTRY(iter, &This->attrs, HTMLDOMAttribute, entry) { if(iter->dispid == id) { - *attr = iter; + attr = iter; break; } pos++; }
- if(!*attr) { - hres = HTMLDOMAttribute_Create(NULL, This->elem, id, This->elem->node.doc, attr); + if(!attr) { + hres = HTMLDOMAttribute_Create(NULL, This->elem, id, This->elem->node.doc, &attr); if(FAILED(hres)) return hres; }
- IHTMLDOMAttribute_AddRef(&(*attr)->IHTMLDOMAttribute_iface); + *ret = &attr->IHTMLDOMAttribute_iface; + IHTMLDOMAttribute_AddRef(*ret); if(list_pos) *list_pos = pos; return S_OK; @@ -7819,7 +7820,6 @@ static HRESULT WINAPI HTMLAttributeCollectionEnum_Next(IEnumVARIANT *iface, ULON { HTMLAttributeCollectionEnum *This = HTMLAttributeCollectionEnum_from_IEnumVARIANT(iface); DISPID tmp, dispid = This->iter_dispid; - HTMLDOMAttribute *attr; LONG rel_index = 0; HRESULT hres; ULONG i; @@ -7830,7 +7830,7 @@ static HRESULT WINAPI HTMLAttributeCollectionEnum_Next(IEnumVARIANT *iface, ULON hres = get_attr_dispid_by_relative_idx(This->col, &rel_index, dispid, &tmp); if(SUCCEEDED(hres)) { dispid = tmp; - hres = get_domattr(This->col, dispid, NULL, &attr); + hres = get_domattr(This->col, dispid, NULL, (IHTMLDOMAttribute**)&V_DISPATCH(&rgVar[i])); } else if(hres == DISP_E_UNKNOWNNAME) break; @@ -7842,7 +7842,6 @@ static HRESULT WINAPI HTMLAttributeCollectionEnum_Next(IEnumVARIANT *iface, ULON }
V_VT(&rgVar[i]) = VT_DISPATCH; - V_DISPATCH(&rgVar[i]) = (IDispatch*)&attr->IHTMLDOMAttribute_iface; }
This->iter_dispid = dispid; @@ -7952,7 +7951,6 @@ static HRESULT WINAPI HTMLAttributeCollection__newEnum(IHTMLAttributeCollection static HRESULT WINAPI HTMLAttributeCollection_item(IHTMLAttributeCollection *iface, VARIANT *name, IDispatch **ppItem) { HTMLAttributeCollection *This = impl_from_IHTMLAttributeCollection(iface); - HTMLDOMAttribute *attr; DISPID id; HRESULT hres;
@@ -7974,12 +7972,7 @@ static HRESULT WINAPI HTMLAttributeCollection_item(IHTMLAttributeCollection *ifa if(FAILED(hres)) return hres;
- hres = get_domattr(This, id, NULL, &attr); - if(FAILED(hres)) - return hres; - - *ppItem = (IDispatch*)&attr->IHTMLDOMAttribute_iface; - return S_OK; + return get_domattr(This, id, NULL, (IHTMLDOMAttribute**)ppItem); }
static const IHTMLAttributeCollectionVtbl HTMLAttributeCollectionVtbl = { @@ -8007,7 +8000,6 @@ static HRESULT WINAPI HTMLAttributeCollection2_getNamedItem(IHTMLAttributeCollec IHTMLDOMAttribute **newretNode) { HTMLAttributeCollection *This = impl_from_IHTMLAttributeCollection2(iface); - HTMLDOMAttribute *attr; DISPID id; HRESULT hres;
@@ -8021,12 +8013,7 @@ static HRESULT WINAPI HTMLAttributeCollection2_getNamedItem(IHTMLAttributeCollec return hres; }
- hres = get_domattr(This, id, NULL, &attr); - if(FAILED(hres)) - return hres; - - *newretNode = &attr->IHTMLDOMAttribute_iface; - return S_OK; + return get_domattr(This, id, NULL, newretNode); }
static HRESULT WINAPI HTMLAttributeCollection2_setNamedItem(IHTMLAttributeCollection2 *iface, @@ -8092,7 +8079,6 @@ static HRESULT WINAPI HTMLAttributeCollection3_removeNamedItem(IHTMLAttributeCol static HRESULT WINAPI HTMLAttributeCollection3_item(IHTMLAttributeCollection3 *iface, LONG index, IHTMLDOMAttribute **ppNodeOut) { HTMLAttributeCollection *This = impl_from_IHTMLAttributeCollection3(iface); - HTMLDOMAttribute *attr; DISPID id; HRESULT hres;
@@ -8104,12 +8090,7 @@ static HRESULT WINAPI HTMLAttributeCollection3_item(IHTMLAttributeCollection3 *i if(FAILED(hres)) return hres;
- hres = get_domattr(This, id, NULL, &attr); - if(FAILED(hres)) - return hres; - - *ppNodeOut = &attr->IHTMLDOMAttribute_iface; - return S_OK; + return get_domattr(This, id, NULL, ppNodeOut); }
static HRESULT WINAPI HTMLAttributeCollection3_get_length(IHTMLAttributeCollection3 *iface, LONG *p) @@ -8188,7 +8169,7 @@ static void HTMLAttributeCollection_destructor(DispatchEx *dispex) static HRESULT HTMLAttributeCollection_get_dispid(DispatchEx *dispex, const WCHAR *name, DWORD flags, DISPID *dispid) { HTMLAttributeCollection *This = HTMLAttributeCollection_from_DispatchEx(dispex); - HTMLDOMAttribute *attr; + IHTMLDOMAttribute *attr; LONG pos; HRESULT hres;
@@ -8201,7 +8182,7 @@ static HRESULT HTMLAttributeCollection_get_dispid(DispatchEx *dispex, const WCHA hres = get_domattr(This, *dispid, &pos, &attr); if(FAILED(hres)) return hres; - IHTMLDOMAttribute_Release(&attr->IHTMLDOMAttribute_iface); + IHTMLDOMAttribute_Release(attr);
*dispid = MSHTML_DISPID_CUSTOM_MIN+pos; return S_OK;
Jacek Caban (@jacek) commented about dlls/mshtml/tests/documentmode.js:
test_exposed("fileSize", v < 11);
});
+sync_test("attr_props", function() {
- var v = document.documentMode, elem = document.createElement("div"), attr;
- /* FIXME: Wine's IE9+ attributes don't sync with our attribute node implementation which is based on legacy attrs */
- if(!broken(true))
Please don't abuse `broken()` like that, we don't want to test different things on Wine and Windows. If `todo_wine` is not enough, you may just skip the test until it's ready.
On Tue May 27 12:08:45 2025 +0000, Jacek Caban wrote:
Please don't abuse `broken()` like that, we don't want to test different things on Wine and Windows. If `todo_wine` is not enough, you may just skip the test until it's ready.
Sorry, I thought it wouldn't be a big deal since it will start failing once Wine is fixed (and act like a todo_wine in that sense).
Also, I removed the last patch since now I might use that yet in next MR, we'll see how it goes, so I'll postpone it.