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
20bd8889
Commit
20bd8889
authored
Feb 04, 2009
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Feb 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLStyle_put_fontWeight.
parent
9056d4d2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
105 additions
and
2 deletions
+105
-2
htmlstyle.c
dlls/mshtml/htmlstyle.c
+29
-2
dom.c
dlls/mshtml/tests/dom.c
+76
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
20bd8889
...
...
@@ -618,8 +618,35 @@ static HRESULT WINAPI HTMLStyle_get_fontVariant(IHTMLStyle *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLStyle_put_fontWeight
(
IHTMLStyle
*
iface
,
BSTR
v
)
{
HTMLStyle
*
This
=
HTMLSTYLE_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
static
const
WCHAR
styleBold
[]
=
{
'b'
,
'o'
,
'l'
,
'd'
,
0
};
static
const
WCHAR
styleBolder
[]
=
{
'b'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
styleLighter
[]
=
{
'l'
,
'i'
,
'g'
,
'h'
,
't'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
style100
[]
=
{
'1'
,
'0'
,
'0'
,
0
};
static
const
WCHAR
style200
[]
=
{
'2'
,
'0'
,
'0'
,
0
};
static
const
WCHAR
style300
[]
=
{
'3'
,
'0'
,
'0'
,
0
};
static
const
WCHAR
style400
[]
=
{
'4'
,
'0'
,
'0'
,
0
};
static
const
WCHAR
style500
[]
=
{
'5'
,
'0'
,
'0'
,
0
};
static
const
WCHAR
style600
[]
=
{
'6'
,
'0'
,
'0'
,
0
};
static
const
WCHAR
style700
[]
=
{
'7'
,
'0'
,
'0'
,
0
};
static
const
WCHAR
style800
[]
=
{
'8'
,
'0'
,
'0'
,
0
};
static
const
WCHAR
style900
[]
=
{
'9'
,
'0'
,
'0'
,
0
};
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
/* fontWeight can only be one of the following */
if
(
!
v
||
strcmpiW
(
szNormal
,
v
)
==
0
||
strcmpiW
(
styleBold
,
v
)
==
0
||
strcmpiW
(
styleBolder
,
v
)
==
0
||
strcmpiW
(
styleLighter
,
v
)
==
0
||
strcmpiW
(
style100
,
v
)
==
0
||
strcmpiW
(
style200
,
v
)
==
0
||
strcmpiW
(
style300
,
v
)
==
0
||
strcmpiW
(
style400
,
v
)
==
0
||
strcmpiW
(
style500
,
v
)
==
0
||
strcmpiW
(
style600
,
v
)
==
0
||
strcmpiW
(
style700
,
v
)
==
0
||
strcmpiW
(
style800
,
v
)
==
0
||
strcmpiW
(
style900
,
v
)
==
0
)
{
return
set_nsstyle_attr
(
This
->
nsstyle
,
STYLEID_FONT_WEIGHT
,
v
,
0
);
}
return
E_INVALIDARG
;
}
static
HRESULT
WINAPI
HTMLStyle_get_fontWeight
(
IHTMLStyle
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
20bd8889
...
...
@@ -2431,6 +2431,82 @@ 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
));
hres
=
IHTMLStyle_get_fontWeight
(
style
,
&
sDefault
);
ok
(
hres
==
S_OK
,
"get_fontWeight failed: %08x
\n
"
,
hres
);
str
=
a2bstr
(
"test"
);
hres
=
IHTMLStyle_put_fontWeight
(
style
,
str
);
ok
(
hres
==
E_INVALIDARG
,
"put_fontWeight failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"bold"
);
hres
=
IHTMLStyle_put_fontWeight
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_fontWeight failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"bolder"
);
hres
=
IHTMLStyle_put_fontWeight
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_fontWeight failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"lighter"
);
hres
=
IHTMLStyle_put_fontWeight
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_fontWeight failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"100"
);
hres
=
IHTMLStyle_put_fontWeight
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_fontWeight failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"200"
);
hres
=
IHTMLStyle_put_fontWeight
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_fontWeight failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"300"
);
hres
=
IHTMLStyle_put_fontWeight
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_fontWeight failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"400"
);
hres
=
IHTMLStyle_put_fontWeight
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_fontWeight failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"500"
);
hres
=
IHTMLStyle_put_fontWeight
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_fontWeight failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"600"
);
hres
=
IHTMLStyle_put_fontWeight
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_fontWeight failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"700"
);
hres
=
IHTMLStyle_put_fontWeight
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_fontWeight failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"800"
);
hres
=
IHTMLStyle_put_fontWeight
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_fontWeight failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
a2bstr
(
"900"
);
hres
=
IHTMLStyle_put_fontWeight
(
style
,
str
);
ok
(
hres
==
S_OK
,
"put_fontWeight failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
hres
=
IHTMLStyle_get_fontWeight
(
style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_fontWeight failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"900"
),
"str != style900
\n
"
);
SysFreeString
(
str
);
hres
=
IHTMLStyle_put_fontWeight
(
style
,
sDefault
);
ok
(
hres
==
S_OK
,
"put_fontWeight failed: %08x
\n
"
,
hres
);
/* font Variant */
hres
=
IHTMLStyle_get_fontVariant
(
style
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"get_fontVariant 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