mshtml: Added IHTMLUniqueName::get_uniqueID implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
881b2f08d9
commit
a52cb2b87a
|
@ -2021,15 +2021,10 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I
|
||||||
static HRESULT WINAPI HTMLDocument3_get_uniqueID(IHTMLDocument3 *iface, BSTR *p)
|
static HRESULT WINAPI HTMLDocument3_get_uniqueID(IHTMLDocument3 *iface, BSTR *p)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
|
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
|
||||||
WCHAR buf[32];
|
|
||||||
|
|
||||||
static const WCHAR formatW[] = {'m','s','_','_','i','d','%','u',0};
|
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
sprintfW(buf, formatW, ++This->doc_node->unique_id);
|
return elem_unique_id(++This->doc_node->unique_id, p);
|
||||||
*p = SysAllocString(buf);
|
|
||||||
return *p ? S_OK : E_OUTOFMEMORY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLDocument3_attachEvent(IHTMLDocument3 *iface, BSTR event,
|
static HRESULT WINAPI HTMLDocument3_attachEvent(IHTMLDocument3 *iface, BSTR event,
|
||||||
|
|
|
@ -3843,6 +3843,17 @@ static HRESULT WINAPI HTMLUniqueName_Invoke(IHTMLUniqueName *iface, DISPID dispI
|
||||||
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HRESULT elem_unique_id(unsigned id, BSTR *p)
|
||||||
|
{
|
||||||
|
WCHAR buf[32];
|
||||||
|
|
||||||
|
static const WCHAR formatW[] = {'m','s','_','_','i','d','%','u',0};
|
||||||
|
|
||||||
|
sprintfW(buf, formatW, id);
|
||||||
|
*p = SysAllocString(buf);
|
||||||
|
return *p ? S_OK : E_OUTOFMEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
static void ensure_unique_id(HTMLElement *elem)
|
static void ensure_unique_id(HTMLElement *elem)
|
||||||
{
|
{
|
||||||
if(!elem->unique_id)
|
if(!elem->unique_id)
|
||||||
|
@ -3863,8 +3874,11 @@ static HRESULT WINAPI HTMLUniqueName_get_uniqueNumber(IHTMLUniqueName *iface, LO
|
||||||
static HRESULT WINAPI HTMLUniqueName_get_uniqueID(IHTMLUniqueName *iface, BSTR *p)
|
static HRESULT WINAPI HTMLUniqueName_get_uniqueID(IHTMLUniqueName *iface, BSTR *p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = impl_from_IHTMLUniqueName(iface);
|
HTMLElement *This = impl_from_IHTMLUniqueName(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, p);
|
|
||||||
return E_NOTIMPL;
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
|
ensure_unique_id(This);
|
||||||
|
return elem_unique_id(This->unique_id, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const IHTMLUniqueNameVtbl HTMLUniqueNameVtbl = {
|
static const IHTMLUniqueNameVtbl HTMLUniqueNameVtbl = {
|
||||||
|
|
|
@ -713,6 +713,7 @@ typedef struct {
|
||||||
HTMLStyle *runtime_style;
|
HTMLStyle *runtime_style;
|
||||||
HTMLAttributeCollection *attrs;
|
HTMLAttributeCollection *attrs;
|
||||||
WCHAR *filter;
|
WCHAR *filter;
|
||||||
|
unsigned unique_id;
|
||||||
} HTMLElement;
|
} HTMLElement;
|
||||||
|
|
||||||
#define HTMLELEMENT_TIDS \
|
#define HTMLELEMENT_TIDS \
|
||||||
|
@ -1019,6 +1020,8 @@ nsresult get_elem_attr_value(nsIDOMHTMLElement*,const WCHAR*,nsAString*,const PR
|
||||||
HRESULT elem_string_attr_getter(HTMLElement*,const WCHAR*,BOOL,BSTR*) DECLSPEC_HIDDEN;
|
HRESULT elem_string_attr_getter(HTMLElement*,const WCHAR*,BOOL,BSTR*) DECLSPEC_HIDDEN;
|
||||||
HRESULT elem_string_attr_setter(HTMLElement*,const WCHAR*,const WCHAR*) DECLSPEC_HIDDEN;
|
HRESULT elem_string_attr_setter(HTMLElement*,const WCHAR*,const WCHAR*) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
HRESULT elem_unique_id(unsigned id, BSTR *p) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* commands */
|
/* commands */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DWORD id;
|
DWORD id;
|
||||||
|
|
Loading…
Reference in New Issue