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
3d2d9596
Commit
3d2d9596
authored
Apr 04, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 04, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use helpers for IHTMLStyle::put_verticalAlign property implementation.
parent
e87cb774
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
19 deletions
+16
-19
htmlstyle.c
dlls/mshtml/htmlstyle.c
+2
-18
style.c
dlls/mshtml/tests/style.c
+14
-1
No files found.
dlls/mshtml/htmlstyle.c
View file @
3d2d9596
...
...
@@ -1350,32 +1350,16 @@ static HRESULT WINAPI HTMLStyle_put_verticalAlign(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_VERTICAL_ALIGN
,
V_BSTR
(
&
v
),
0
);
default:
FIXME
(
"not implemented vt %d
\n
"
,
V_VT
(
&
v
));
return
E_NOTIMPL
;
}
return
S_OK
;
return
set_nsstyle_attr_var
(
This
->
nsstyle
,
STYLEID_VERTICAL_ALIGN
,
&
v
,
ATTR_FIX_PX
);
}
static
HRESULT
WINAPI
HTMLStyle_get_verticalAlign
(
IHTMLStyle
*
iface
,
VARIANT
*
p
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle
(
iface
);
BSTR
ret
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
hres
=
get_style_attr
(
This
,
STYLEID_VERTICAL_ALIGN
,
&
ret
);
if
(
FAILED
(
hres
))
return
hres
;
V_VT
(
p
)
=
VT_BSTR
;
V_BSTR
(
p
)
=
ret
;
return
S_OK
;
return
get_nsstyle_attr_var
(
This
->
nsstyle
,
STYLEID_VERTICAL_ALIGN
,
p
,
0
);
}
static
HRESULT
WINAPI
HTMLStyle_put_textTransform
(
IHTMLStyle
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/style.c
View file @
3d2d9596
...
...
@@ -1022,6 +1022,19 @@ static void test_body_style(IHTMLStyle *style)
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"middle"
),
"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_verticalAlign
(
style
,
v
);
ok
(
hres
==
S_OK
,
"put_vertivalAlign failed: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_EMPTY
;
hres
=
IHTMLStyle_get_verticalAlign
(
style
,
&
v
);
ok
(
hres
==
S_OK
,
"get_verticalAlign 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
);
str
=
(
void
*
)
0xdeadbeef
;
hres
=
IHTMLStyle_get_textAlign
(
style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_textAlign failed: %08x
\n
"
,
hres
);
...
...
@@ -2099,7 +2112,7 @@ static void test_current_style(IHTMLCurrentStyle *current_style)
hres
=
IHTMLCurrentStyle_get_verticalAlign
(
current_style
,
&
v
);
ok
(
hres
==
S_OK
,
"get_verticalAlign failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"
middle
"
),
"get_verticalAlign returned %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"
100px
"
),
"get_verticalAlign returned %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
hres
=
IHTMLCurrentStyle_get_marginRight
(
current_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