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
ab2bd77c
Commit
ab2bd77c
authored
Aug 28, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use generic value checks for IHTMLStyle::put_fontVariant implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4c59ce88
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
htmlstyle.c
dlls/mshtml/htmlstyle.c
+9
-9
No files found.
dlls/mshtml/htmlstyle.c
View file @
ab2bd77c
...
...
@@ -207,6 +207,7 @@ static const WCHAR word_wrapW[] =
static
const
WCHAR
z_indexW
[]
=
{
'z'
,
'-'
,
'i'
,
'n'
,
'd'
,
'e'
,
'x'
,
0
};
static
const
WCHAR
capsW
[]
=
{
's'
,
'm'
,
'a'
,
'l'
,
'l'
,
'-'
,
'c'
,
'a'
,
'p'
,
's'
,
0
};
static
const
WCHAR
italicW
[]
=
{
'i'
,
't'
,
'a'
,
'l'
,
'i'
,
'c'
,
0
};
static
const
WCHAR
normalW
[]
=
{
'n'
,
'o'
,
'r'
,
'm'
,
'a'
,
'l'
,
0
};
static
const
WCHAR
obliqueW
[]
=
{
'o'
,
'b'
,
'l'
,
'i'
,
'q'
,
'u'
,
'e'
,
0
};
...
...
@@ -218,6 +219,12 @@ static const WCHAR *font_style_values[] = {
NULL
};
static
const
WCHAR
*
font_variant_values
[]
=
{
capsW
,
normalW
,
NULL
};
#define ATTR_FIX_PX 0x0001
#define ATTR_FIX_URL 0x0002
#define ATTR_STR_TO_INT 0x0004
...
...
@@ -276,7 +283,7 @@ static const style_tbl_entry_t style_tbl[] = {
{
font_familyW
,
DISPID_IHTMLSTYLE_FONTFAMILY
},
{
font_sizeW
,
DISPID_IHTMLSTYLE_FONTSIZE
,
ATTR_FIX_PX
},
{
font_styleW
,
DISPID_IHTMLSTYLE_FONTSTYLE
,
0
,
font_style_values
},
{
font_variantW
,
DISPID_IHTMLSTYLE_FONTVARIANT
},
{
font_variantW
,
DISPID_IHTMLSTYLE_FONTVARIANT
,
0
,
font_variant_values
},
{
font_weightW
,
DISPID_IHTMLSTYLE_FONTWEIGHT
,
ATTR_STR_TO_INT
},
{
heightW
,
DISPID_IHTMLSTYLE_HEIGHT
,
ATTR_FIX_PX
},
{
leftW
,
DISPID_IHTMLSTYLE_LEFT
},
...
...
@@ -925,17 +932,10 @@ static HRESULT WINAPI HTMLStyle_get_fontStyle(IHTMLStyle *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLStyle_put_fontVariant
(
IHTMLStyle
*
iface
,
BSTR
v
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle
(
iface
);
static
const
WCHAR
szCaps
[]
=
{
's'
,
'm'
,
'a'
,
'l'
,
'l'
,
'-'
,
'c'
,
'a'
,
'p'
,
's'
,
0
};
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
/* fontVariant can only be one of the follow values. */
if
(
!
v
||
strcmpiW
(
normalW
,
v
)
==
0
||
strcmpiW
(
szCaps
,
v
)
==
0
)
{
return
set_style_property
(
This
,
STYLEID_FONT_VARIANT
,
v
);
}
return
E_INVALIDARG
;
return
set_style_property
(
This
,
STYLEID_FONT_VARIANT
,
v
);
}
static
HRESULT
WINAPI
HTMLStyle_get_fontVariant
(
IHTMLStyle
*
iface
,
BSTR
*
p
)
...
...
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