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
352e0ec8
Commit
352e0ec8
authored
Feb 08, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use set_nsstyle_attr_var in IHTMLStyle::put_width implementation.
parent
a3ff647c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
htmlstyle.c
dlls/mshtml/htmlstyle.c
+5
-11
dom.c
dlls/mshtml/tests/dom.c
+12
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
352e0ec8
...
...
@@ -345,10 +345,12 @@ HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid,
case
VT_I4
:
{
WCHAR
str
[
14
];
static
const
WCHAR
format
[]
=
{
'%'
,
'd'
,
0
};
static
const
WCHAR
px_format
[]
=
{
'%'
,
'd'
,
'p'
,
'x'
,
0
};
wsprintfW
(
str
,
format
,
V_I4
(
value
));
return
set_nsstyle_attr
(
nsstyle
,
sid
,
str
,
flags
);
wsprintfW
(
str
,
f
lags
&
ATTR_FIX_PX
?
px_format
:
f
ormat
,
V_I4
(
value
));
return
set_nsstyle_attr
(
nsstyle
,
sid
,
str
,
flags
&
~
ATTR_FIX_PX
);
}
default:
FIXME
(
"not implemented vt %d
\n
"
,
V_VT
(
value
));
...
...
@@ -1779,15 +1781,7 @@ static HRESULT WINAPI HTMLStyle_put_width(IHTMLStyle *iface, VARIANT v)
TRACE
(
"(%p)->(v%d)
\n
"
,
This
,
V_VT
(
&
v
));
switch
(
V_VT
(
&
v
))
{
case
VT_BSTR
:
TRACE
(
"%s
\n
"
,
debugstr_w
(
V_BSTR
(
&
v
)));
return
set_style_attr
(
This
,
STYLEID_WIDTH
,
V_BSTR
(
&
v
),
0
);
default:
FIXME
(
"unsupported vt %d
\n
"
,
V_VT
(
&
v
));
}
return
E_NOTIMPL
;
return
set_nsstyle_attr_var
(
This
->
nsstyle
,
STYLEID_WIDTH
,
&
v
,
ATTR_FIX_PX
);
}
static
HRESULT
WINAPI
HTMLStyle_get_width
(
IHTMLStyle
*
iface
,
VARIANT
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
352e0ec8
...
...
@@ -3869,6 +3869,18 @@ static void test_default_style(IHTMLStyle *style)
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"auto"
),
"V_BSTR(v)=%s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_I4
;
V_I4
(
&
v
)
=
100
;
hres
=
IHTMLStyle_put_width
(
style
,
v
);
ok
(
hres
==
S_OK
,
"put_width failed: %08x
\n
"
,
hres
);
V_VT
(
&
v
)
=
VT_EMPTY
;
hres
=
IHTMLStyle_get_width
(
style
,
&
v
);
ok
(
hres
==
S_OK
,
"get_width failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(v)=%d
\n
"
,
V_VT
(
&
v
));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"100px"
),
"V_BSTR(v)=%s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
/* margin tests */
str
=
(
void
*
)
0xdeadbeef
;
hres
=
IHTMLStyle_get_margin
(
style
,
&
str
);
...
...
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