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
47d83520
Commit
47d83520
authored
Jun 23, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement::put_className implementation.
parent
0497c989
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
htmlelem.c
dlls/mshtml/htmlelem.c
+17
-2
dom.c
dlls/mshtml/tests/dom.c
+18
-0
No files found.
dlls/mshtml/htmlelem.c
View file @
47d83520
...
...
@@ -252,8 +252,23 @@ static HRESULT WINAPI HTMLElement_removeAttribute(IHTMLElement *iface, BSTR strA
static
HRESULT
WINAPI
HTMLElement_put_className
(
IHTMLElement
*
iface
,
BSTR
v
)
{
HTMLElement
*
This
=
HTMLELEM_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
classname_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
if
(
!
This
->
nselem
)
{
FIXME
(
"NULL nselem
\n
"
);
return
E_NOTIMPL
;
}
nsAString_Init
(
&
classname_str
,
v
);
nsres
=
nsIDOMHTMLElement_SetClassName
(
This
->
nselem
,
&
classname_str
);
nsAString_Finish
(
&
classname_str
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"SetClassName failed: %08x
\n
"
,
nsres
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement_get_className
(
IHTMLElement
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
47d83520
...
...
@@ -935,6 +935,22 @@ static void _test_elem_class(unsigned line, IUnknown *unk, const char *exclass)
SysFreeString
(
class
);
}
#define test_elem_set_class(u,c) _test_elem_set_class(__LINE__,u,c)
static
void
_test_elem_set_class
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
class
)
{
IHTMLElement
*
elem
=
_get_elem_iface
(
line
,
unk
);
BSTR
tmp
;
HRESULT
hres
;
tmp
=
class
?
a2bstr
(
class
)
:
NULL
;
hres
=
IHTMLElement_put_className
(
elem
,
tmp
);
IHTMLElement_Release
(
elem
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"put_className failed: %08x
\n
"
,
hres
);
SysFreeString
(
tmp
);
_test_elem_class
(
line
,
unk
,
class
);
}
#define get_child_item(c,i) _get_child_item(__LINE__,c,i)
static
IHTMLDOMNode
*
_get_child_item
(
unsigned
line
,
IHTMLDOMChildrenCollection
*
col
,
long
idx
)
{
...
...
@@ -1804,6 +1820,8 @@ static void test_elems(IHTMLDocument2 *doc)
test_elem_attr
(
elem
,
xxxW
,
NULL
);
test_elem_attr
(
elem
,
idW
,
sW
);
test_elem_class
((
IUnknown
*
)
elem
,
NULL
);
test_elem_set_class
((
IUnknown
*
)
elem
,
"cl"
);
test_elem_set_class
((
IUnknown
*
)
elem
,
NULL
);
IHTMLElement_Release
(
elem
);
}
...
...
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