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
f82df0ac
Commit
f82df0ac
authored
Dec 11, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Dec 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLStyle put_fontStyle.
parent
16fb8fd8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
2 deletions
+43
-2
htmlstyle.c
dlls/mshtml/htmlstyle.c
+15
-2
dom.c
dlls/mshtml/tests/dom.c
+28
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
f82df0ac
...
...
@@ -133,6 +133,8 @@ static const WCHAR valLineThrough[] =
{
'l'
,
'i'
,
'n'
,
'e'
,
'-'
,
't'
,
'h'
,
'r'
,
'o'
,
'u'
,
'g'
,
'h'
,
0
};
static
const
WCHAR
valUnderline
[]
=
{
'u'
,
'n'
,
'd'
,
'e'
,
'r'
,
'l'
,
'i'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
szNormal
[]
=
{
'n'
,
'o'
,
'r'
,
'm'
,
'a'
,
'l'
,
0
};
static
const
WCHAR
px_formatW
[]
=
{
'%'
,
'd'
,
'p'
,
'x'
,
0
};
static
const
WCHAR
emptyW
[]
=
{
0
};
...
...
@@ -515,8 +517,19 @@ static HRESULT WINAPI HTMLStyle_get_fontFamily(IHTMLStyle *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLStyle_put_fontStyle
(
IHTMLStyle
*
iface
,
BSTR
v
)
{
HTMLStyle
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
static
const
WCHAR
szItalic
[]
=
{
'i'
,
't'
,
'a'
,
'l'
,
'i'
,
'c'
,
0
};
static
const
WCHAR
szOblique
[]
=
{
'o'
,
'b'
,
'l'
,
'i'
,
'q'
,
'u'
,
'e'
,
0
};
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
/* fontStyle can only be one of the follow values. */
if
(
!
v
||
strcmpiW
(
szNormal
,
v
)
==
0
||
strcmpiW
(
szItalic
,
v
)
==
0
||
strcmpiW
(
szOblique
,
v
)
==
0
)
{
return
set_nsstyle_attr
(
This
->
nsstyle
,
STYLEID_FONT_STYLE
,
v
,
0
);
}
return
E_INVALIDARG
;
}
static
HRESULT
WINAPI
HTMLStyle_get_fontStyle
(
IHTMLStyle
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
f82df0ac
...
...
@@ -2294,6 +2294,7 @@ static void test_default_style(IHTMLStyle *style)
HRESULT
hres
;
float
f
;
BSTR
sOverflowDefault
;
BSTR
sDefault
;
test_disp
((
IUnknown
*
)
style
,
&
DIID_DispHTMLStyle
);
test_ifaces
((
IUnknown
*
)
style
,
style_iids
);
...
...
@@ -2636,6 +2637,33 @@ static void test_default_style(IHTMLStyle *style)
ok
(
V_I4
(
&
v
)
==
1
,
"V_I4(v) = %d
\n
"
,
V_I4
(
&
v
));
VariantClear
(
&
v
);
/* fontStyle */
hres
=
IHTMLStyle_get_fontStyle
(
style
,
&
sDefault
);
ok
(
hres
==
S_OK
,
"get_fontStyle failed: %08x
\n
"
,
hres
);
str
=
a2bstr
(
"test"
);
hres
=
IHTMLStyle_put_fontStyle
(
style
,
str
);
ok
(
hres
==
E_INVALIDARG
,
"put_fontStyle failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"italic"
);
hres
=
IHTMLStyle_put_fontStyle
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_fontStyle failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"oblique"
);
hres
=
IHTMLStyle_put_fontStyle
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_fontStyle failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"normal"
);
hres
=
IHTMLStyle_put_fontStyle
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_fontStyle failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
hres
=
IHTMLStyle_put_fontStyle
(
style
,
sDefault
);
ok
(
hres
==
S_OK
,
"get_fontStyle failed: %08x
\n
"
,
hres
);
/* overflow */
hres
=
IHTMLStyle_get_overflow
(
style
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"get_overflow failed: %08x
\n
"
,
hres
);
...
...
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