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
8e984bcc
Commit
8e984bcc
authored
Dec 11, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Dec 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLStyle get/put fontVariant.
parent
5a8e31a3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
4 deletions
+47
-4
htmlstyle.c
dlls/mshtml/htmlstyle.c
+20
-4
htmlstyle.h
dlls/mshtml/htmlstyle.h
+1
-0
dom.c
dlls/mshtml/tests/dom.c
+26
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
8e984bcc
...
...
@@ -61,6 +61,8 @@ static const WCHAR attrFontSize[] =
{
'f'
,
'o'
,
'n'
,
't'
,
'-'
,
's'
,
'i'
,
'z'
,
'e'
,
0
};
static
const
WCHAR
attrFontStyle
[]
=
{
'f'
,
'o'
,
'n'
,
't'
,
'-'
,
's'
,
't'
,
'y'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
attrFontVariant
[]
=
{
'f'
,
'o'
,
'n'
,
't'
,
'-'
,
'v'
,
'a'
,
'r'
,
'i'
,
'a'
,
'n'
,
't'
,
0
};
static
const
WCHAR
attrFontWeight
[]
=
{
'f'
,
'o'
,
'n'
,
't'
,
'-'
,
'w'
,
'e'
,
'i'
,
'g'
,
'h'
,
't'
,
0
};
static
const
WCHAR
attrHeight
[]
=
...
...
@@ -111,6 +113,7 @@ static const struct{
{
attrFontFamily
,
DISPID_IHTMLSTYLE_FONTFAMILY
},
{
attrFontSize
,
DISPID_IHTMLSTYLE_FONTSIZE
},
{
attrFontStyle
,
DISPID_IHTMLSTYLE_FONTSTYLE
},
{
attrFontVariant
,
DISPID_IHTMLSTYLE_FONTVARIANT
},
{
attrFontWeight
,
DISPID_IHTMLSTYLE_FONTWEIGHT
},
{
attrHeight
,
DISPID_IHTMLSTYLE_HEIGHT
},
{
attrLeft
,
DISPID_IHTMLSTYLE_LEFT
},
...
...
@@ -544,15 +547,28 @@ static HRESULT WINAPI HTMLStyle_get_fontStyle(IHTMLStyle *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLStyle_put_fontVariant
(
IHTMLStyle
*
iface
,
BSTR
v
)
{
HTMLStyle
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
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
(
szNormal
,
v
)
==
0
||
strcmpiW
(
szCaps
,
v
)
==
0
)
{
return
set_nsstyle_attr
(
This
->
nsstyle
,
STYLEID_FONT_VARIANT
,
v
,
0
);
}
return
E_INVALIDARG
;
}
static
HRESULT
WINAPI
HTMLStyle_get_fontVariant
(
IHTMLStyle
*
iface
,
BSTR
*
p
)
{
HTMLStyle
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
p
)
return
E_INVALIDARG
;
return
get_style_attr
(
This
,
STYLEID_FONT_VARIANT
,
p
);
}
static
HRESULT
WINAPI
HTMLStyle_put_fontWeight
(
IHTMLStyle
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/htmlstyle.h
View file @
8e984bcc
...
...
@@ -44,6 +44,7 @@ typedef enum {
STYLEID_FONT_FAMILY
,
STYLEID_FONT_SIZE
,
STYLEID_FONT_STYLE
,
STYLEID_FONT_VARIANT
,
STYLEID_FONT_WEIGHT
,
STYLEID_HEIGHT
,
STYLEID_LEFT
,
...
...
dlls/mshtml/tests/dom.c
View file @
8e984bcc
...
...
@@ -2309,6 +2309,32 @@ static void test_default_style(IHTMLStyle *style)
ok
(
hres
==
S_OK
,
"get_fontWeight failed: %08x
\n
"
,
hres
);
ok
(
!
str
,
"fontWeight = %s
\n
"
,
dbgstr_w
(
str
));
/* font Variant */
hres
=
IHTMLStyle_get_fontVariant
(
style
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"get_fontVariant failed: %08x
\n
"
,
hres
);
hres
=
IHTMLStyle_get_fontVariant
(
style
,
&
sDefault
);
ok
(
hres
==
S_OK
,
"get_fontVariant failed: %08x
\n
"
,
hres
);
str
=
a2bstr
(
"test"
);
hres
=
IHTMLStyle_put_fontVariant
(
style
,
str
);
ok
(
hres
==
E_INVALIDARG
,
"fontVariant failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"small-caps"
);
hres
=
IHTMLStyle_put_fontVariant
(
style
,
str
);
ok
(
hres
==
S_OK
,
"fontVariant failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"normal"
);
hres
=
IHTMLStyle_put_fontVariant
(
style
,
str
);
ok
(
hres
==
S_OK
,
"fontVariant failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
hres
=
IHTMLStyle_put_fontVariant
(
style
,
sDefault
);
ok
(
hres
==
S_OK
,
"fontVariant failed: %08x
\n
"
,
hres
);
SysFreeString
(
sDefault
);
str
=
(
void
*
)
0xdeadbeef
;
hres
=
IHTMLStyle_get_display
(
style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_display 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