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
042b881b
Commit
042b881b
authored
Sep 09, 2014
by
Jactry Zeng
Committed by
Alexandre Julliard
Sep 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Add IHTMLStyle::pixelHeight property implementation.
parent
7152077b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
4 deletions
+46
-4
htmlstyle.c
dlls/mshtml/htmlstyle.c
+8
-4
style.c
dlls/mshtml/tests/style.c
+38
-0
No files found.
dlls/mshtml/htmlstyle.c
View file @
042b881b
...
...
@@ -2510,15 +2510,19 @@ static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, LONG *p)
static
HRESULT
WINAPI
HTMLStyle_put_pixelHeight
(
IHTMLStyle
*
iface
,
LONG
v
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle
(
iface
);
FIXME
(
"(%p)->()
\n
"
,
This
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
v
);
return
set_style_pxattr
(
This
->
nsstyle
,
STYLEID_HEIGHT
,
v
);
}
static
HRESULT
WINAPI
HTMLStyle_get_pixelHeight
(
IHTMLStyle
*
iface
,
LONG
*
p
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle
(
iface
);
FIXME
(
"(%p)->()
\n
"
,
This
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
get_nsstyle_pixel_val
(
This
,
STYLEID_HEIGHT
,
p
);
}
static
HRESULT
WINAPI
HTMLStyle_put_posTop
(
IHTMLStyle
*
iface
,
float
v
)
...
...
dlls/mshtml/tests/style.c
View file @
042b881b
...
...
@@ -1254,6 +1254,11 @@ static void test_body_style(IHTMLStyle *style)
ok
(
hres
==
S_OK
,
"get_posHeight failed: %08x
\n
"
,
hres
);
ok
(
f
==
0
.
0
,
"expected 0.0 got %f
\n
"
,
f
);
l
=
0xdeadbeef
;
hres
=
IHTMLStyle_get_pixelHeight
(
style
,
&
l
);
ok
(
hres
==
S_OK
,
"get_pixelHeight failed: %08x
\n
"
,
hres
);
ok
(
!
l
,
"pixelHeight = %d
\n
"
,
l
);
hres
=
IHTMLStyle_put_posHeight
(
style
,
4
.
9
f
);
ok
(
hres
==
S_OK
,
"put_posHeight failed: %08x
\n
"
,
hres
);
...
...
@@ -1263,6 +1268,13 @@ static void test_body_style(IHTMLStyle *style)
f
==
4
.
9
f
,
/* IE8 */
"expected 4.0 or 4.9 (IE8) got %f
\n
"
,
f
);
l
=
0xdeadbeef
;
hres
=
IHTMLStyle_get_pixelHeight
(
style
,
&
l
);
ok
(
hres
==
S_OK
,
"get_pixelHeight failed: %08x
\n
"
,
hres
);
ok
(
l
==
4
||
l
==
5
,
/* IE8 */
"pixelHeight = %d
\n
"
,
l
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
"70px"
);
hres
=
IHTMLStyle_put_height
(
style
,
v
);
...
...
@@ -1276,6 +1288,11 @@ 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
);
l
=
0xdeadbeef
;
hres
=
IHTMLStyle_get_pixelHeight
(
style
,
&
l
);
ok
(
hres
==
S_OK
,
"get_pixelHeight failed: %08x
\n
"
,
hres
);
ok
(
l
==
70
,
"pixelHeight = %d
\n
"
,
l
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
NULL
;
hres
=
IHTMLStyle_put_height
(
style
,
v
);
...
...
@@ -1289,6 +1306,22 @@ static void test_body_style(IHTMLStyle *style)
ok
(
!
V_BSTR
(
&
v
),
"V_BSTR(v) = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
l
=
0xdeadbeef
;
hres
=
IHTMLStyle_get_pixelHeight
(
style
,
&
l
);
ok
(
hres
==
S_OK
,
"get_pixelHeight failed: %08x
\n
"
,
hres
);
ok
(
!
l
,
"pixelHeight = %d
\n
"
,
l
);
hres
=
IHTMLStyle_put_pixelHeight
(
style
,
50
);
ok
(
hres
==
S_OK
,
"put_pixelHeight failed: %08x
\n
"
,
hres
);
l
=
0xdeadbeef
;
hres
=
IHTMLStyle_get_pixelHeight
(
style
,
&
l
);
ok
(
hres
==
S_OK
,
"get_pixelHeight failed: %08x
\n
"
,
hres
);
ok
(
l
==
50
,
"pixelHeight = %d
\n
"
,
l
);
hres
=
IHTMLStyle_get_pixelHeight
(
style
,
NULL
);
ok
(
hres
==
E_POINTER
,
"get_pixelHeight failed: %08x
\n
"
,
hres
);
V_VT
(
&
v
)
=
VT_I4
;
V_I4
(
&
v
)
=
64
;
hres
=
IHTMLStyle_put_height
(
style
,
v
);
...
...
@@ -1305,6 +1338,11 @@ static void test_body_style(IHTMLStyle *style)
ok
(
hres
==
S_OK
,
"get_posHeight failed: %08x
\n
"
,
hres
);
ok
(
f
==
64
.
0
,
"expected 64.0 got %f
\n
"
,
f
);
l
=
0xdeadbeef
;
hres
=
IHTMLStyle_get_pixelHeight
(
style
,
&
l
);
ok
(
hres
==
S_OK
,
"get_pixelHeight failed: %08x
\n
"
,
hres
);
ok
(
l
==
64
,
"pixelHeight = %d
\n
"
,
l
);
str
=
(
void
*
)
0xdeadbeef
;
hres
=
IHTMLStyle_get_cursor
(
style
,
&
str
);
ok
(
hres
==
S_OK
,
"get_cursor 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