Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
47ebbbd4
Commit
47ebbbd4
authored
Feb 25, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDOMAttribute::get_nodeValue implementation.
parent
b0b77d4b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
3 deletions
+45
-3
htmlattr.c
dlls/mshtml/htmlattr.c
+21
-2
dom.c
dlls/mshtml/tests/dom.c
+24
-1
No files found.
dlls/mshtml/htmlattr.c
View file @
47ebbbd4
...
...
@@ -134,8 +134,27 @@ static HRESULT WINAPI HTMLDOMAttribute_put_nodeName(IHTMLDOMAttribute *iface, VA
static
HRESULT
WINAPI
HTMLDOMAttribute_get_nodeValue
(
IHTMLDOMAttribute
*
iface
,
VARIANT
*
p
)
{
HTMLDOMAttribute
*
This
=
impl_from_IHTMLDOMAttribute
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
const
PRUnichar
*
val
;
nsAString
val_str
;
HRESULT
hres
=
S_OK
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
val_str
,
NULL
);
nsIDOMAttr_GetNodeValue
(
This
->
nsattr
,
&
val_str
);
nsAString_GetData
(
&
val_str
,
&
val
);
V_VT
(
p
)
=
VT_BSTR
;
if
(
*
val
)
{
V_BSTR
(
p
)
=
SysAllocString
(
val
);
if
(
!
V_BSTR
(
p
))
hres
=
E_OUTOFMEMORY
;
}
else
{
V_BSTR
(
p
)
=
NULL
;
}
nsAString_Finish
(
&
val_str
);
return
hres
;
}
static
HRESULT
WINAPI
HTMLDOMAttribute_get_specified
(
IHTMLDOMAttribute
*
iface
,
VARIANT_BOOL
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
47ebbbd4
...
...
@@ -56,7 +56,7 @@ static const char elem_test_str[] =
"</body></html>"
;
static
const
char
elem_test2_str
[]
=
"<html><head><title>test</title><style>.body { margin-right: 0px; }</style>"
"<body><div id=
\"
divid
\"
></div></body>"
"<body><div id=
\"
divid
\"
emptyattr=""
></div></body>"
"</html>"
;
static
const
char
indent_test_str
[]
=
...
...
@@ -2845,6 +2845,23 @@ static IHTMLDOMAttribute *_get_elem_attr_node(unsigned line, IUnknown *unk, cons
return
attr
;
}
#define test_attr_node_value(a,b) _test_attr_node_value(__LINE__,a,b)
static
void
_test_attr_node_value
(
unsigned
line
,
IHTMLDOMAttribute
*
attr
,
const
char
*
exval
)
{
VARIANT
var
;
HRESULT
hres
;
hres
=
IHTMLDOMAttribute_get_nodeValue
(
attr
,
&
var
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_nodeValue failed: %08x, expected VT_BSTR
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
V_VT
(
&
var
)
==
VT_BSTR
,
"vt=%d
\n
"
,
V_VT
(
&
var
));
if
(
exval
)
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
V_BSTR
(
&
var
),
exval
),
"unexpected value %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
var
)));
else
ok_
(
__FILE__
,
line
)
(
!
V_BSTR
(
&
var
),
"nodeValue = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
var
)));
VariantClear
(
&
var
);
}
#define get_window_doc(e) _get_window_doc(__LINE__,e)
static
IHTMLDocument2
*
_get_window_doc
(
unsigned
line
,
IHTMLWindow2
*
window
)
{
...
...
@@ -6651,6 +6668,12 @@ static void test_attr(IHTMLElement *elem)
ok
(
iface_cmp
((
IUnknown
*
)
attr
,
(
IUnknown
*
)
attr2
),
"attr != attr2
\n
"
);
IHTMLDOMAttribute_Release
(
attr2
);
test_attr_node_value
(
attr
,
"divid"
);
IHTMLDOMAttribute_Release
(
attr
);
attr
=
get_elem_attr_node
((
IUnknown
*
)
elem
,
"emptyattr"
,
TRUE
);
test_attr_node_value
(
attr
,
NULL
);
IHTMLDOMAttribute_Release
(
attr
);
}
...
...
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