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
98e14337
Commit
98e14337
authored
Dec 17, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 17, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLStyleElement::type property implementation.
parent
09c63b22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
4 deletions
+58
-4
htmlstyleelem.c
dlls/mshtml/htmlstyleelem.c
+22
-4
dom.c
dlls/mshtml/tests/dom.c
+36
-0
No files found.
dlls/mshtml/htmlstyleelem.c
View file @
98e14337
...
...
@@ -98,15 +98,33 @@ static HRESULT WINAPI HTMLStyleElement_Invoke(IHTMLStyleElement *iface, DISPID d
static
HRESULT
WINAPI
HTMLStyleElement_put_type
(
IHTMLStyleElement
*
iface
,
BSTR
v
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
type_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_InitDepend
(
&
type_str
,
v
);
nsres
=
nsIDOMHTMLStyleElement_SetType
(
This
->
nsstyle
,
&
type_str
);
nsAString_Finish
(
&
type_str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetType failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLStyleElement_get_type
(
IHTMLStyleElement
*
iface
,
BSTR
*
p
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
nsstr
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
nsstr
,
NULL
);
nsres
=
nsIDOMHTMLStyleElement_GetType
(
This
->
nsstyle
,
&
nsstr
);
return
return_nsstr
(
nsres
,
&
nsstr
,
p
);
}
static
HRESULT
WINAPI
HTMLStyleElement_get_readyState
(
IHTMLStyleElement
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
98e14337
...
...
@@ -2480,6 +2480,40 @@ static void _test_style_put_media(unsigned line, IUnknown *unk, const char *medi
_test_style_media
(
line
,
unk
,
media
);
}
#define test_style_type(s,m) _test_style_type(__LINE__,s,m)
static
void
_test_style_type
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
extype
)
{
IHTMLStyleElement
*
style
=
_get_style_iface
(
line
,
unk
);
BSTR
type
;
HRESULT
hres
;
hres
=
IHTMLStyleElement_get_type
(
style
,
&
type
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_type failed: %08x
\n
"
,
hres
);
if
(
extype
)
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
type
,
extype
),
"type = %s, expected %s
\n
"
,
wine_dbgstr_w
(
type
),
extype
);
else
ok_
(
__FILE__
,
line
)(
!
type
,
"type = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
type
));
IHTMLStyleElement_Release
(
style
);
SysFreeString
(
type
);
}
#define test_style_put_type(s,m) _test_style_put_type(__LINE__,s,m)
static
void
_test_style_put_type
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
type
)
{
IHTMLStyleElement
*
style
=
_get_style_iface
(
line
,
unk
);
BSTR
str
;
HRESULT
hres
;
str
=
a2bstr
(
type
);
hres
=
IHTMLStyleElement_put_type
(
style
,
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_type failed: %08x
\n
"
,
hres
);
IHTMLStyleElement_Release
(
style
);
SysFreeString
(
str
);
_test_style_type
(
line
,
unk
,
type
);
}
#define test_elem_filters(u) _test_elem_filters(__LINE__,u)
static
void
_test_elem_filters
(
unsigned
line
,
IUnknown
*
unk
)
{
...
...
@@ -6328,6 +6362,8 @@ static void test_elems(IHTMLDocument2 *doc)
if
(
elem
)
{
test_style_media
((
IUnknown
*
)
elem
,
NULL
);
test_style_put_media
((
IUnknown
*
)
elem
,
"screen"
);
test_style_type
((
IUnknown
*
)
elem
,
NULL
);
test_style_put_type
((
IUnknown
*
)
elem
,
"text/css"
);
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