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
27555a52
Commit
27555a52
authored
Mar 30, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use proper helpers in IHTMLStyle::backgroundColor implementation.
parent
1cd6da26
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
17 deletions
+15
-17
htmlstyle.c
dlls/mshtml/htmlstyle.c
+3
-17
style.c
dlls/mshtml/tests/style.c
+12
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
27555a52
...
...
@@ -921,30 +921,16 @@ static HRESULT WINAPI HTMLStyle_put_backgroundColor(IHTMLStyle *iface, VARIANT v
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
switch
(
V_VT
(
&
v
))
{
case
VT_BSTR
:
return
set_style_attr
(
This
,
STYLEID_BACKGROUND_COLOR
,
V_BSTR
(
&
v
),
0
);
case
VT_I4
:
{
WCHAR
value
[
10
];
static
const
WCHAR
format
[]
=
{
'#'
,
'%'
,
'0'
,
'6'
,
'x'
,
0
};
wsprintfW
(
value
,
format
,
V_I4
(
&
v
));
return
set_style_attr
(
This
,
STYLEID_BACKGROUND_COLOR
,
value
,
0
);
}
default:
FIXME
(
"unsupported vt %d
\n
"
,
V_VT
(
&
v
));
}
return
S_OK
;
return
set_nsstyle_attr_var
(
This
->
nsstyle
,
STYLEID_BACKGROUND_COLOR
,
&
v
,
ATTR_HEX_INT
);
}
static
HRESULT
WINAPI
HTMLStyle_get_backgroundColor
(
IHTMLStyle
*
iface
,
VARIANT
*
p
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
V_VT
(
p
)
=
VT_BSTR
;
return
get_style_attr
(
This
,
STYLEID_BACKGROUND_COLOR
,
&
V_BSTR
(
p
));
return
get_nsstyle_attr_var
(
This
->
nsstyle
,
STYLEID_BACKGROUND_COLOR
,
p
,
0
);
}
static
HRESULT
WINAPI
HTMLStyle_put_backgroundImage
(
IHTMLStyle
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/style.c
View file @
27555a52
...
...
@@ -1256,6 +1256,18 @@ static void test_body_style(IHTMLStyle *style)
ok
(
!
V_BSTR
(
&
v
),
"str=%s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
"red"
);
hres
=
IHTMLStyle_put_backgroundColor
(
style
,
v
);
ok
(
hres
==
S_OK
,
"put_backgroundColor failed: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
hres
=
IHTMLStyle_get_backgroundColor
(
style
,
&
v
);
ok
(
hres
==
S_OK
,
"get_backgroundColor: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"type failed: %d
\n
"
,
V_VT
(
&
v
));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"red"
),
"str=%s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
/* padding */
hres
=
IHTMLStyle_get_padding
(
style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_padding 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