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
e2b7354a
Commit
e2b7354a
authored
Sep 18, 2014
by
Qian Hong
Committed by
Alexandre Julliard
Sep 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDOMAttribute::put_nodeValue implementation.
parent
cdd28b0a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
5 deletions
+55
-5
htmlattr.c
dlls/mshtml/htmlattr.c
+18
-4
dom.c
dlls/mshtml/tests/dom.c
+37
-1
No files found.
dlls/mshtml/htmlattr.c
View file @
e2b7354a
...
...
@@ -138,11 +138,25 @@ static HRESULT WINAPI HTMLDOMAttribute_get_nodeName(IHTMLDOMAttribute *iface, BS
return
IDispatchEx_GetMemberName
(
&
This
->
elem
->
node
.
dispex
.
IDispatchEx_iface
,
This
->
dispid
,
p
);
}
static
HRESULT
WINAPI
HTMLDOMAttribute_put_node
Nam
e
(
IHTMLDOMAttribute
*
iface
,
VARIANT
v
)
static
HRESULT
WINAPI
HTMLDOMAttribute_put_node
Valu
e
(
IHTMLDOMAttribute
*
iface
,
VARIANT
v
)
{
HTMLDOMAttribute
*
This
=
impl_from_IHTMLDOMAttribute
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
DISPID
dispidNamed
=
DISPID_PROPERTYPUT
;
DISPPARAMS
dp
=
{
&
v
,
&
dispidNamed
,
1
,
1
};
EXCEPINFO
ei
;
VARIANT
ret
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
if
(
!
This
->
elem
)
{
FIXME
(
"NULL This->elem
\n
"
);
return
E_UNEXPECTED
;
}
memset
(
&
ei
,
0
,
sizeof
(
ei
));
return
IDispatchEx_InvokeEx
(
&
This
->
elem
->
node
.
dispex
.
IDispatchEx_iface
,
This
->
dispid
,
LOCALE_SYSTEM_DEFAULT
,
DISPATCH_PROPERTYPUT
,
&
dp
,
&
ret
,
&
ei
,
NULL
);
}
static
HRESULT
WINAPI
HTMLDOMAttribute_get_nodeValue
(
IHTMLDOMAttribute
*
iface
,
VARIANT
*
p
)
...
...
@@ -216,7 +230,7 @@ static const IHTMLDOMAttributeVtbl HTMLDOMAttributeVtbl = {
HTMLDOMAttribute_GetIDsOfNames
,
HTMLDOMAttribute_Invoke
,
HTMLDOMAttribute_get_nodeName
,
HTMLDOMAttribute_put_node
Nam
e
,
HTMLDOMAttribute_put_node
Valu
e
,
HTMLDOMAttribute_get_nodeValue
,
HTMLDOMAttribute_get_specified
};
...
...
dlls/mshtml/tests/dom.c
View file @
e2b7354a
...
...
@@ -4236,10 +4236,19 @@ static void _get_attr_node_value(unsigned line, IHTMLDOMAttribute *attr, VARIANT
HRESULT
hres
;
hres
=
IHTMLDOMAttribute_get_nodeValue
(
attr
,
v
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_nodeValue failed: %08x
, expected VT_BSTR
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_nodeValue failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
V_VT
(
v
)
==
vt
,
"vt=%d, expected %d
\n
"
,
V_VT
(
v
),
vt
);
}
#define put_attr_node_value(a,b) _put_attr_node_value(__LINE__,a,b)
static
void
_put_attr_node_value
(
unsigned
line
,
IHTMLDOMAttribute
*
attr
,
VARIANT
v
)
{
HRESULT
hres
;
hres
=
IHTMLDOMAttribute_put_nodeValue
(
attr
,
v
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"put_nodeValue failed: %08x
\n
"
,
hres
);
}
#define get_window_doc(e) _get_window_doc(__LINE__,e)
static
IHTMLDocument2
*
_get_window_doc
(
unsigned
line
,
IHTMLWindow2
*
window
)
{
...
...
@@ -7548,12 +7557,31 @@ static void test_attr(IHTMLElement *elem)
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"divid"
),
"V_BSTR(v) = %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
"divid2"
);
put_attr_node_value
(
attr
,
v
);
get_attr_node_value
(
attr
,
&
v
,
VT_BSTR
);
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"divid2"
),
"V_BSTR(v) = %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
IHTMLDOMAttribute_Release
(
attr
);
attr
=
get_elem_attr_node
((
IUnknown
*
)
elem
,
"emptyattr"
,
TRUE
);
get_attr_node_value
(
attr
,
&
v
,
VT_BSTR
);
ok
(
!
V_BSTR
(
&
v
),
"V_BSTR(v) = %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
"newvalue"
);
put_attr_node_value
(
attr
,
v
);
VariantClear
(
&
v
);
attr
=
get_elem_attr_node
((
IUnknown
*
)
elem
,
"emptyattr"
,
TRUE
);
get_attr_node_value
(
attr
,
&
v
,
VT_BSTR
);
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"newvalue"
),
"V_BSTR(v) = %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
test_attr_specified
(
attr
,
VARIANT_TRUE
);
IHTMLDOMAttribute_Release
(
attr
);
...
...
@@ -7564,6 +7592,14 @@ static void test_attr(IHTMLElement *elem)
get_attr_node_value
(
attr
,
&
v
,
VT_I4
);
ok
(
V_I4
(
&
v
)
==
100
,
"V_I4(v) = %d
\n
"
,
V_I4
(
&
v
));
test_attr_specified
(
attr
,
VARIANT_TRUE
);
V_VT
(
&
v
)
=
VT_I4
;
V_I4
(
&
v
)
=
150
;
put_attr_node_value
(
attr
,
v
);
get_attr_node_value
(
attr
,
&
v
,
VT_I4
);
ok
(
V_I4
(
&
v
)
==
150
,
"V_I4(v) = %d
\n
"
,
V_I4
(
&
v
));
IHTMLDOMAttribute_Release
(
attr
);
attr
=
get_elem_attr_node
((
IUnknown
*
)
elem
,
"tabIndex"
,
TRUE
);
...
...
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