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
568f2695
Commit
568f2695
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::put_nodeValue implementation.
parent
26e23bdd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
24 deletions
+47
-24
htmlnode.c
dlls/mshtml/htmlnode.c
+20
-1
dom.c
dlls/mshtml/tests/dom.c
+27
-23
No files found.
dlls/mshtml/htmlnode.c
View file @
568f2695
...
...
@@ -460,7 +460,26 @@ static HRESULT WINAPI HTMLDOMNode_get_nodeName(IHTMLDOMNode *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLDOMNode_put_nodeValue
(
IHTMLDOMNode
*
iface
,
VARIANT
v
)
{
HTMLDOMNode
*
This
=
HTMLDOMNODE_THIS
(
iface
);
FIXME
(
"(%p)->()
\n
"
,
This
);
TRACE
(
"(%p)->()
\n
"
,
This
);
switch
(
V_VT
(
&
v
))
{
case
VT_BSTR
:
{
nsAString
val_str
;
TRACE
(
"bstr %s
\n
"
,
debugstr_w
(
V_BSTR
(
&
v
)));
nsAString_Init
(
&
val_str
,
V_BSTR
(
&
v
));
nsIDOMNode_SetNodeValue
(
This
->
nsnode
,
&
val_str
);
nsAString_Finish
(
&
val_str
);
return
S_OK
;
}
default:
FIXME
(
"unsupported vt %d
\n
"
,
V_VT
(
&
v
));
}
return
E_NOTIMPL
;
}
...
...
dlls/mshtml/tests/dom.c
View file @
568f2695
...
...
@@ -390,13 +390,10 @@ static IHTMLDOMNode *_get_node_iface(unsigned line, IUnknown *unk)
#define test_node_name(u,n) _test_node_name(__LINE__,u,n)
static
void
_test_node_name
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exname
)
{
IHTMLDOMNode
*
node
;
IHTMLDOMNode
*
node
=
_get_node_iface
(
line
,
unk
)
;
BSTR
name
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLDOMNode
,
(
void
**
)
&
node
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"QueryInterface(IID_IHTMLNode) failed: %08x
\n
"
,
hres
);
hres
=
IHTMLDOMNode_get_nodeName
(
node
,
&
name
);
IHTMLDOMNode_Release
(
node
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_nodeName failed: %08x
\n
"
,
hres
);
...
...
@@ -798,14 +795,10 @@ static void _test_elem_collection(unsigned line, IHTMLElementCollection *col,
#define get_first_child(n) _get_first_child(__LINE__,n)
static
IHTMLDOMNode
*
_get_first_child
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLDOMNode
*
node
,
*
child
=
NULL
;
IHTMLDOMNode
*
node
=
_get_node_iface
(
line
,
unk
);
IHTMLDOMNode
*
child
=
NULL
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLDOMNode
,
(
void
**
)
&
node
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get IHTMLDOMNode: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
NULL
;
hres
=
IHTMLDOMNode_get_firstChild
(
node
,
&
child
);
IHTMLDOMNode_Release
(
node
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_firstChild failed: %08x
\n
"
,
hres
);
...
...
@@ -816,13 +809,10 @@ static IHTMLDOMNode *_get_first_child(unsigned line, IUnknown *unk)
#define get_node_type(n) _get_node_type(__LINE__,n)
static
long
_get_node_type
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLDOMNode
*
node
;
IHTMLDOMNode
*
node
=
_get_node_iface
(
line
,
unk
)
;
long
type
=
-
1
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLDOMNode
,
(
void
**
)
&
node
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get IHTMLDOMNode: %08x
\n
"
,
hres
);
hres
=
IHTMLDOMNode_get_nodeType
(
node
,
&
type
);
ok
(
hres
==
S_OK
,
"get_nodeType failed: %08x
\n
"
,
hres
);
...
...
@@ -845,16 +835,11 @@ static void _test_input_get_disabled(unsigned line, IHTMLInputElement *input, VA
#define get_child_nodes(u) _get_child_nodes(__LINE__,u)
static
IHTMLDOMChildrenCollection
*
_get_child_nodes
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLDOMNode
*
node
=
_get_node_iface
(
line
,
unk
);
IHTMLDOMChildrenCollection
*
col
=
NULL
;
IHTMLDOMNode
*
node
;
IDispatch
*
disp
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLDOMNode
,
(
void
**
)
&
node
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get IHTMLDOMNode: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
NULL
;
hres
=
IHTMLDOMNode_get_childNodes
(
node
,
&
disp
);
IHTMLDOMNode_Release
(
node
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_childNodes failed: %08x
\n
"
,
hres
);
...
...
@@ -878,9 +863,8 @@ static IHTMLDOMNode *_get_child_item(unsigned line, IHTMLDOMChildrenCollection *
hres
=
IHTMLDOMChildrenCollection_item
(
col
,
idx
,
&
disp
);
ok
(
hres
==
S_OK
,
"item failed: %08x
\n
"
,
hres
);
hres
=
IDispatch_QueryInterface
(
disp
,
&
IID_IHTMLDOMNode
,
(
void
**
)
&
node
);
node
=
_get_node_iface
(
line
,
(
IUnknown
*
)
disp
);
IDispatch_Release
(
disp
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get IHTMLDOMNode: %08x
\n
"
,
hres
);
return
node
;
}
...
...
@@ -940,6 +924,22 @@ static void _test_node_get_value_str(unsigned line, IUnknown *unk, const char *e
VariantClear
(
&
var
);
}
#define test_node_put_value_str(u,v) _test_node_put_value_str(__LINE__,u,v)
static
void
_test_node_put_value_str
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
val
)
{
IHTMLDOMNode
*
node
=
_get_node_iface
(
line
,
unk
);
VARIANT
var
;
HRESULT
hres
;
V_VT
(
&
var
)
=
VT_BSTR
;
V_BSTR
(
&
var
)
=
a2bstr
(
val
);
hres
=
IHTMLDOMNode_put_nodeValue
(
node
,
var
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_nodeValue failed: %08x, expected VT_BSTR
\n
"
,
hres
);
IHTMLDOMNode_Release
(
node
);
VariantClear
(
&
var
);
}
static
void
test_elem_col_item
(
IHTMLElementCollection
*
col
,
LPCWSTR
n
,
const
elem_type_t
*
elem_types
,
long
len
)
{
...
...
@@ -1706,6 +1706,8 @@ static void test_elems(IHTMLDocument2 *doc)
test_input_get_disabled
(
input
,
VARIANT_FALSE
);
test_node_get_value_str
((
IUnknown
*
)
elem
,
NULL
);
test_node_put_value_str
((
IUnknown
*
)
elem
,
"test"
);
test_node_get_value_str
((
IUnknown
*
)
elem
,
NULL
);
IHTMLInputElement_Release
(
input
);
IHTMLElement_Release
(
elem
);
...
...
@@ -1727,6 +1729,8 @@ static void test_elems(IHTMLDocument2 *doc)
ok
(
type
==
3
,
"type=%ld
\n
"
,
type
);
test_node_get_value_str
((
IUnknown
*
)
node
,
"text test"
);
test_node_put_value_str
((
IUnknown
*
)
elem
,
"test text"
);
test_node_get_value_str
((
IUnknown
*
)
node
,
"text test"
);
IHTMLDOMNode_Release
(
node
);
}
...
...
@@ -1868,7 +1872,7 @@ static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, D
if
(
!
lstrcmpW
(
state
,
completeW
))
doc_complete
=
TRUE
;
SysFreeString
(
state
);
SysFreeString
(
state
);
}
return
S_OK
;
...
...
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