Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4ee45b2e
Commit
4ee45b2e
authored
Jun 18, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement::get_id implementation.
parent
88b4f292
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
2 deletions
+47
-2
htmlelem.c
dlls/mshtml/htmlelem.c
+22
-2
dom.c
dlls/mshtml/tests/dom.c
+25
-0
No files found.
dlls/mshtml/htmlelem.c
View file @
4ee45b2e
...
...
@@ -297,8 +297,28 @@ static HRESULT WINAPI HTMLElement_put_id(IHTMLElement *iface, BSTR v)
static
HRESULT
WINAPI
HTMLElement_get_id
(
IHTMLElement
*
iface
,
BSTR
*
p
)
{
HTMLElement
*
This
=
HTMLELEM_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
const
PRUnichar
*
id
;
nsAString
id_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
NULL
;
if
(
!
This
->
nselem
)
return
S_OK
;
nsAString_Init
(
&
id_str
,
NULL
);
nsres
=
nsIDOMHTMLElement_GetId
(
This
->
nselem
,
&
id_str
);
nsAString_GetData
(
&
id_str
,
&
id
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"GetId failed: %08x
\n
"
,
nsres
);
else
if
(
*
id
)
*
p
=
SysAllocString
(
id
);
nsAString_Finish
(
&
id_str
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement_get_tagName
(
IHTMLElement
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
4ee45b2e
...
...
@@ -866,6 +866,28 @@ static IHTMLDOMNode *_get_child_item(unsigned line, IHTMLDOMChildrenCollection *
return
node
;
}
#define test_elem_id(e,i) _test_elem_id(__LINE__,e,i)
static
void
_test_elem_id
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exid
)
{
IHTMLElement
*
elem
;
BSTR
id
=
(
void
*
)
0xdeadbeef
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLElement
,
(
void
**
)
&
elem
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Coule not get IHTMLElement: %08x
\n
"
,
hres
);
hres
=
IHTMLElement_get_id
(
elem
,
&
id
);
IHTMLElement_Release
(
elem
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_id failed: %08x
\n
"
,
hres
);
if
(
exid
)
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
id
,
exid
),
"unexpected id %s
\n
"
,
dbgstr_w
(
id
));
else
ok_
(
__FILE__
,
line
)
(
!
id
,
"id=%s
\n
"
,
dbgstr_w
(
id
));
SysFreeString
(
id
);
}
static
void
test_elem_col_item
(
IHTMLElementCollection
*
col
,
LPCWSTR
n
,
const
elem_type_t
*
elem_types
,
long
len
)
{
...
...
@@ -1628,6 +1650,7 @@ static void test_elems(IHTMLDocument2 *doc)
hres
=
IHTMLElement_QueryInterface
(
elem
,
&
IID_IHTMLInputElement
,
(
void
**
)
&
input
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLInputElement: %08x
\n
"
,
hres
);
test_elem_id
((
IUnknown
*
)
elem
,
"in"
);
test_input_get_disabled
(
input
,
VARIANT_FALSE
);
IHTMLInputElement_Release
(
input
);
...
...
@@ -1676,6 +1699,8 @@ static void test_elems(IHTMLDocument2 *doc)
if
(
node
)
{
type
=
get_node_type
((
IUnknown
*
)
node
);
ok
(
type
==
8
,
"type=%ld
\n
"
,
type
);
test_elem_id
((
IUnknown
*
)
node
,
NULL
);
IHTMLDOMNode_Release
(
node
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment