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
f95e7a4e
Commit
f95e7a4e
authored
Dec 15, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Improved IHTMLStyle3::zoom stub.
parent
76f7be04
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
6 deletions
+58
-6
htmlstyle3.c
dlls/mshtml/htmlstyle3.c
+26
-6
style.c
dlls/mshtml/tests/style.c
+32
-0
No files found.
dlls/mshtml/htmlstyle3.c
View file @
f95e7a4e
...
...
@@ -103,26 +103,46 @@ static HRESULT WINAPI HTMLStyle3_get_layoutFlow(IHTMLStyle3 *iface, BSTR *p)
return
E_NOTIMPL
;
}
static
const
WCHAR
zoomW
[]
=
{
'z'
,
'o'
,
'o'
,
'm'
,
0
};
static
HRESULT
WINAPI
HTMLStyle3_put_zoom
(
IHTMLStyle3
*
iface
,
VARIANT
v
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle3
(
iface
);
VARIANT
*
var
;
HRESULT
hres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
/* zoom property is IE CSS extension that is mostly used as a hack to workaround IE bugs.
* The value is set to 1 then. We can safely ignore setting zoom to 1. */
if
(
V_VT
(
&
v
)
==
VT_I4
&&
V_I4
(
&
v
)
=
=
1
)
return
S_OK
;
if
(
V_VT
(
&
v
)
!=
VT_I4
||
V_I4
(
&
v
)
!
=
1
)
WARN
(
"stub for %s
\n
"
,
debugstr_variant
(
&
v
))
;
FIXME
(
"stub for %s
\n
"
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
hres
=
dispex_get_dprop_ref
(
&
This
->
dispex
,
zoomW
,
TRUE
,
&
var
);
if
(
FAILED
(
hres
))
return
hres
;
return
VariantChangeType
(
var
,
&
v
,
0
,
VT_BSTR
);
}
static
HRESULT
WINAPI
HTMLStyle3_get_zoom
(
IHTMLStyle3
*
iface
,
VARIANT
*
p
)
{
HTMLStyle
*
This
=
impl_from_IHTMLStyle3
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
VARIANT
*
var
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
hres
=
dispex_get_dprop_ref
(
&
This
->
dispex
,
zoomW
,
FALSE
,
&
var
);
if
(
hres
==
DISP_E_UNKNOWNNAME
)
{
V_VT
(
p
)
=
VT_BSTR
;
V_BSTR
(
p
)
=
NULL
;
return
S_OK
;
}
if
(
FAILED
(
hres
))
return
hres
;
return
VariantCopy
(
p
,
var
);
}
static
HRESULT
WINAPI
HTMLStyle3_put_wordWrap
(
IHTMLStyle3
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/style.c
View file @
f95e7a4e
...
...
@@ -453,6 +453,7 @@ static void test_style2(IHTMLStyle2 *style2)
static
void
test_style3
(
IHTMLStyle3
*
style3
)
{
VARIANT
v
;
BSTR
str
;
HRESULT
hres
;
...
...
@@ -471,6 +472,37 @@ static void test_style3(IHTMLStyle3 *style3)
ok
(
hres
==
S_OK
,
"get_wordWrap failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"break-word"
),
"get_wordWrap returned %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
V_VT
(
&
v
)
=
VT_ERROR
;
hres
=
IHTMLStyle3_get_zoom
(
style3
,
&
v
);
ok
(
hres
==
S_OK
,
"get_zoom failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(zoom) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
!
V_BSTR
(
&
v
),
"V_BSTR(zoom) = %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
"100%"
);
hres
=
IHTMLStyle3_put_zoom
(
style3
,
v
);
ok
(
hres
==
S_OK
,
"put_zoom failed: %08x
\n
"
,
hres
);
V_VT
(
&
v
)
=
VT_ERROR
;
hres
=
IHTMLStyle3_get_zoom
(
style3
,
&
v
);
ok
(
hres
==
S_OK
,
"get_zoom failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(zoom) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"100%"
),
"V_BSTR(zoom) = %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_I4
;
V_I4
(
&
v
)
=
1
;
hres
=
IHTMLStyle3_put_zoom
(
style3
,
v
);
ok
(
hres
==
S_OK
,
"put_zoom failed: %08x
\n
"
,
hres
);
V_VT
(
&
v
)
=
VT_ERROR
;
hres
=
IHTMLStyle3_get_zoom
(
style3
,
&
v
);
ok
(
hres
==
S_OK
,
"get_zoom failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(zoom) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"1"
),
"V_BSTR(zoom) = %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
}
static
void
test_style4
(
IHTMLStyle4
*
style4
)
...
...
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