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
26e23bdd
Commit
26e23bdd
authored
Jun 18, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDOMNode::get_nodeValue implementation.
parent
0cb99eef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
2 deletions
+55
-2
htmlnode.c
dlls/mshtml/htmlnode.c
+19
-2
dom.c
dlls/mshtml/tests/dom.c
+36
-0
No files found.
dlls/mshtml/htmlnode.c
View file @
26e23bdd
...
...
@@ -467,8 +467,25 @@ static HRESULT WINAPI HTMLDOMNode_put_nodeValue(IHTMLDOMNode *iface, VARIANT v)
static
HRESULT
WINAPI
HTMLDOMNode_get_nodeValue
(
IHTMLDOMNode
*
iface
,
VARIANT
*
p
)
{
HTMLDOMNode
*
This
=
HTMLDOMNODE_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
const
PRUnichar
*
val
;
nsAString
val_str
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
val_str
,
NULL
);
nsIDOMNode_GetNodeValue
(
This
->
nsnode
,
&
val_str
);
nsAString_GetData
(
&
val_str
,
&
val
);
if
(
*
val
)
{
V_VT
(
p
)
=
VT_BSTR
;
V_BSTR
(
p
)
=
SysAllocString
(
val
);
}
else
{
V_VT
(
p
)
=
VT_NULL
;
}
nsAString_Finish
(
&
val_str
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLDOMNode_get_firstChild
(
IHTMLDOMNode
*
iface
,
IHTMLDOMNode
**
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
26e23bdd
...
...
@@ -376,6 +376,17 @@ static IHTMLElement *_get_elem_iface(unsigned line, IUnknown *unk)
return
elem
;
}
#define get_node_iface(u) _get_node_iface(__LINE__,u)
static
IHTMLDOMNode
*
_get_node_iface
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLDOMNode
*
node
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLDOMNode
,
(
void
**
)
&
node
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Coule not get IHTMLDOMNode: %08x
\n
"
,
hres
);
return
node
;
}
#define test_node_name(u,n) _test_node_name(__LINE__,u,n)
static
void
_test_node_name
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exname
)
{
...
...
@@ -908,6 +919,27 @@ static void _test_elem_put_id(unsigned line, IUnknown *unk, const char *new_id)
_test_elem_id
(
line
,
unk
,
new_id
);
}
#define test_node_get_value_str(u,e) _test_node_get_value_str(__LINE__,u,e)
static
void
_test_node_get_value_str
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exval
)
{
IHTMLDOMNode
*
node
=
_get_node_iface
(
line
,
unk
);
VARIANT
var
;
HRESULT
hres
;
hres
=
IHTMLDOMNode_get_nodeValue
(
node
,
&
var
);
IHTMLDOMNode_Release
(
node
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_nodeValue failed: %08x, expected VT_BSTR
\n
"
,
hres
);
if
(
exval
)
{
ok_
(
__FILE__
,
line
)
(
V_VT
(
&
var
)
==
VT_BSTR
,
"vt=%d
\n
"
,
V_VT
(
&
var
));
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
V_BSTR
(
&
var
),
exval
),
"unexpected value %s
\n
"
,
dbgstr_w
(
V_BSTR
(
&
var
)));
}
else
{
ok_
(
__FILE__
,
line
)
(
V_VT
(
&
var
)
==
VT_NULL
,
"vt=%d, expected VT_NULL
\n
"
,
V_VT
(
&
var
));
}
VariantClear
(
&
var
);
}
static
void
test_elem_col_item
(
IHTMLElementCollection
*
col
,
LPCWSTR
n
,
const
elem_type_t
*
elem_types
,
long
len
)
{
...
...
@@ -1673,6 +1705,8 @@ static void test_elems(IHTMLDocument2 *doc)
test_elem_put_id
((
IUnknown
*
)
elem
,
"newin"
);
test_input_get_disabled
(
input
,
VARIANT_FALSE
);
test_node_get_value_str
((
IUnknown
*
)
elem
,
NULL
);
IHTMLInputElement_Release
(
input
);
IHTMLElement_Release
(
elem
);
}
...
...
@@ -1692,6 +1726,8 @@ static void test_elems(IHTMLDocument2 *doc)
type
=
get_node_type
((
IUnknown
*
)
node
);
ok
(
type
==
3
,
"type=%ld
\n
"
,
type
);
test_node_get_value_str
((
IUnknown
*
)
node
,
"text test"
);
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