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
5ee21f9a
Commit
5ee21f9a
authored
Aug 18, 2014
by
Zhenbo Li
Committed by
Alexandre Julliard
Aug 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLImgElement::isMap property implementation.
parent
06c66876
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
4 deletions
+47
-4
htmlimg.c
dlls/mshtml/htmlimg.c
+26
-4
dom.c
dlls/mshtml/tests/dom.c
+21
-0
No files found.
dlls/mshtml/htmlimg.c
View file @
5ee21f9a
...
...
@@ -102,15 +102,37 @@ static HRESULT WINAPI HTMLImgElement_Invoke(IHTMLImgElement *iface, DISPID dispI
static
HRESULT
WINAPI
HTMLImgElement_put_isMap
(
IHTMLImgElement
*
iface
,
VARIANT_BOOL
v
)
{
HTMLImgElement
*
This
=
impl_from_IHTMLImgElement
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
v
);
return
E_NOTIMPL
;
nsresult
nsres
;
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
v
);
nsres
=
nsIDOMHTMLImageElement_SetIsMap
(
This
->
nsimg
,
v
!=
VARIANT_FALSE
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Set IsMap failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLImgElement_get_isMap
(
IHTMLImgElement
*
iface
,
VARIANT_BOOL
*
p
)
{
HTMLImgElement
*
This
=
impl_from_IHTMLImgElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
cpp_bool
b
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
p
==
NULL
)
return
E_INVALIDARG
;
nsres
=
nsIDOMHTMLImageElement_GetIsMap
(
This
->
nsimg
,
&
b
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Get IsMap failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
*
p
=
b
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLImgElement_put_useMap
(
IHTMLImgElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
5ee21f9a
...
...
@@ -2810,6 +2810,25 @@ static void _test_img_complete(unsigned line, IHTMLElement *elem, VARIANT_BOOL e
IHTMLImgElement_Release
(
img
);
}
#define test_img_isMap(u, c) _test_img_isMap(__LINE__,u, c)
static
void
_test_img_isMap
(
unsigned
line
,
IUnknown
*
unk
,
VARIANT_BOOL
v
)
{
IHTMLImgElement
*
img
=
_get_img_iface
(
line
,
unk
);
VARIANT_BOOL
b
=
100
;
HRESULT
hres
;
hres
=
IHTMLImgElement_put_isMap
(
img
,
v
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"put_isMap failed: %08x
\n
"
,
hres
);
hres
=
IHTMLImgElement_get_isMap
(
img
,
&
b
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_isMap failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
b
==
v
,
"isMap = %x, expected %x
\n
"
,
b
,
v
);
hres
=
IHTMLImgElement_get_isMap
(
img
,
NULL
);
ok_
(
__FILE__
,
line
)
(
hres
==
E_INVALIDARG
,
"ret = %08x, expected E_INVALIDARG
\n
"
,
hres
);
IHTMLImgElement_Release
(
img
);
}
static
void
test_dynamic_properties
(
IHTMLElement
*
elem
)
{
static
const
WCHAR
attr1W
[]
=
{
'a'
,
't'
,
't'
,
'r'
,
'1'
,
0
};
...
...
@@ -6958,6 +6977,8 @@ static void test_elems(IHTMLDocument2 *doc)
test_img_set_alt
((
IUnknown
*
)
elem
,
"alt test"
);
test_img_name
((
IUnknown
*
)
elem
,
"WineImg"
);
test_img_complete
(
elem
,
VARIANT_FALSE
);
test_img_isMap
((
IUnknown
*
)
elem
,
VARIANT_TRUE
);
test_img_isMap
((
IUnknown
*
)
elem
,
VARIANT_FALSE
);
IHTMLElement_Release
(
elem
);
}
...
...
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