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
10a832cc
Commit
10a832cc
authored
Dec 06, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Properly handle NULL value in set_nsstyle_attr.
parent
36a47dd0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
htmlstyle.c
dlls/mshtml/htmlstyle.c
+3
-1
style.c
dlls/mshtml/tests/style.c
+13
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
10a832cc
...
...
@@ -351,16 +351,18 @@ static LPWSTR fix_url_value(LPCWSTR val)
return
ret
;
}
HRESULT
set_nsstyle_attr
(
nsIDOMCSSStyleDeclaration
*
nsstyle
,
styleid_t
sid
,
LPCWSTR
value
,
DWORD
flags
)
HRESULT
set_nsstyle_attr
(
nsIDOMCSSStyleDeclaration
*
nsstyle
,
styleid_t
sid
,
const
WCHAR
*
value
,
DWORD
flags
)
{
nsAString
str_name
,
str_value
,
str_empty
;
LPWSTR
val
=
NULL
;
nsresult
nsres
;
if
(
value
)
{
if
(
flags
&
ATTR_FIX_PX
)
val
=
fix_px_value
(
value
);
if
(
flags
&
ATTR_FIX_URL
)
val
=
fix_url_value
(
value
);
}
nsAString_InitDepend
(
&
str_name
,
style_tbl
[
sid
].
name
);
nsAString_InitDepend
(
&
str_value
,
val
?
val
:
value
);
...
...
dlls/mshtml/tests/style.c
View file @
10a832cc
...
...
@@ -1052,6 +1052,19 @@ static void test_body_style(IHTMLStyle *style)
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"70px"
),
"V_BSTR(v) = %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
NULL
;
hres
=
IHTMLStyle_put_height
(
style
,
v
);
ok
(
hres
==
S_OK
,
"put_height failed: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_EMPTY
;
hres
=
IHTMLStyle_get_height
(
style
,
&
v
);
ok
(
hres
==
S_OK
,
"get_height failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(v)=%d
\n
"
,
V_VT
(
&
v
));
ok
(
!
V_BSTR
(
&
v
),
"V_BSTR(v) = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_I4
;
V_I4
(
&
v
)
=
64
;
hres
=
IHTMLStyle_put_height
(
style
,
v
);
...
...
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